v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "User talk:0x517A5D"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Reverse questions)
Line 80: Line 80:
  
 
As you seem to have delved into the UI, do you know where the displayed map coordinates are stored? (not the cursor coordinates) [[User:Bartavelle|Bartavelle]] 07:44, 8 January 2008 (EST)
 
As you seem to have delved into the UI, do you know where the displayed map coordinates are stored? (not the cursor coordinates) [[User:Bartavelle|Bartavelle]] 07:44, 8 January 2008 (EST)
 +
:Which map?  I suspect you're talking about Dwarf Fortress mode post-embark, in the actual gameplay.  And my answer is no, I haven't looked for that.  As a half-assed guess, look in the block of data (.33g) from 0146963C to 014696BC (near other map data variables), and from 00906294 to 009062B4 (near the mouse-coord-on-map variables).<br/>&mdash;[[User:0x517A5D|0x517A5D]] 23:26, 8 January 2008 (EST)

Revision as of 04:26, 9 January 2008

Current Build

Interesting setup you've got there. I run something similar, though not completely abusive to game limits. (Leg+5 in everything? comeon! :P)

Got one guy with proficient in everything, while the rest have no skills and are purely haulers and pre-dabbling farmers. Hauling and farming were the only tasks I decided to free my 'hero' dwarf from, since they're so god-awfully time consuming.

As for items: A single full suit of steel armor and one of each weapon, with only a handful of bolts, should an errant fire imp come over in the first season. A couple dozen of each booze and both plump helmet and spawn, with 11 each of the remaining seeds. Of course the mandatory 1 each of food and whatnot. A hefty stock of giant cave spider thread to jumpstart my trading power (a single shoe will go for no less than 900 I think... initial investment is only 120p each) A miscellany of assorted bars, wood, ores, and stone to spend the remaining points. Also took along 3 wardogs for some additional protection and 10 cattle to get a herd going.

All-in-all I limit myself to 32000 total points, as it's the highest clean number that the signed integer will accept in a once-off edit. Also used adjust start to give me 10 dwarves, and set Max_Pop to only 7, so no immigrants unless I get really short on helpers.

My guy's got something of a demi-god complex too, as his name is Master, the rest are named Servant, and the world is "Kôr Nòm" (Master of God). Remembered to look it up when I dabbled with the Regional Prospector ;)

Anyways, saw that you had a very similar idea for a build and thought you might want to hear you're not the only one going for the "God and Servants" route ;) --n9103 01:49, 20 Dec 2007 (PST)

Search Function

It may be helpful to make it clear the search function used in your version-independent code examples is a user-define function and is not associated with the STL search algorithm. I would also recommend posting the source files for search function, or commenting that they are available from the enable magma buildings zip file

--Masdus 22:08, 28 November 2007 (EST)

That's a good point about search(). I've just renamed it hexsearch() in my most recent (not yet released) source.
I had started to document the search patterns in a more generic way, but decided that (a) it took me too long to translate, and (b) few of the target audience would be able and willing to retranslate into their own search-like functions. So I just started cutting and pasting patterns out of my source.
As for posing the source to hexsearch(), I think that the target audience can track it down. (If we could host arbitrary files directly on this wiki, I would. I just think it's too big to put into a <code> block.)
0x517A5D 16:17, 29 November 2007 (EST)


Seekret Projekt

Wow, just tried it out and it works great in 33g. It's amazing the way it reveals the locations of all major features on every map square. I've only briefly checked it out, but I picked a 5x5 area which your tool revealed to have 2 magma vents, an underground water pool, adamantine, and part of a chasm. After embarking and running reveal.exe I confirmed that all features shown by your tool matched the features available and the correct locations. Your tool will make looking for good starting locations at least 5000x easier, considering you can see every single feature location when selecting where to embark. No need to embark and run reveal to find where the major features (especially adamantine) are. Truly great work. --Janus 21:53, 22 December 2007 (EST)

Great! Good to hear. I am particularly interested in any feature that reveal turns up but was not shown by this tool. Also if you see a question mark in the local map view, please report that. (If at all possible, with world-seed and a screenshot showing the X cursors.)
Off on a tangent, what should I call it? FeatureFinder? feature-finder, with a dash? Regional Prospector?
0x517A5D 22:15, 22 December 2007 (EST)
I've scanned around a fair bit on a couple of my current world maps and didn't come across any question mark squares. I have noted that caves don't show up. I don't know whether you could locate them in memory the same way as the map features though, since they're probably generated and allocated differently. I can provide a seed and location with a kobold cave if you need it.
As for the name, FeatureFinder is concise, but the name "Regional Prospector" gives a better general idea of what it does. I like that one, particularly the "prospector" part. --Janus 23:02, 22 December 2007 (EST)
I didn't even think of caves. Yes, I'd like the seed and location. I can't promise anything though. I think caves are not a per-tile thing.
0x517A5D 23:08, 22 December 2007 (EST)
Understandable. Here it is, the world seed is 7810 as posted in the description: Image:Local_Kobold_Cave.png --Janus 00:47, 23 December 2007 (EST)
I don't think I can do caves. It's gotta be stored somewhere, but it's not in the place that this tool looks. I will keep an eye out.
Not a total loss, though, because I found a bug from looking at this map: the tool is not displaying underground rivers. Easy fix, but I'm not going to do a new beta version just to fix that one.
I also saw some interesting behavior from DF's map sizing. If you choose a 2x2 with that volcano at top left, you get a 2x2. But if you choose a 3x3 with volcano at top left, you get a 5x5 with volcano at middle left. It looks like either the chasm or the cave triggers this, even though the chasm is entirely out of the 3x3 selection, and the cave appears to be built so that it is out of the selection as well. I need to play with this some more.
0x517A5D 01:53, 23 December 2007 (EST)
Just wanted to chime in and say I vote for Regional Prospector.--N9103 16:05, 23 December 2007 (EST)

I'm impressed. I didn't even realise the features were in memory before you embarked into areas. This baby finds chasms, lakes, adamantine, and the smaller magma lakes that never showed up on the map. Finding good start locations has never been easier. Before I was having to find squares with good minerals and then just embark on the entire map and reveal it all to see if it had good features, with this you can just look at a glance. The only things I see missing are the caves and cave rivers, which you two already noticed. No errors so far, I'll report any if I find any. Thanks for a great tool. Also, I think FeatureFinder is a fitting name. - Paul 12:55, 23 December 2007 (EST)

I may have found a bug. Your utility shows a magma pool right next to a goblin tower, but upon reveal, it doesn't appear to exist. The seed is 3590640052 and the location is here. I have to say, though, that overall this is a fantastic utility- the most useful external program for this game since reveal. Heck, it's probably better than reveal in the long run. Thank you for finally allowing me to satisfy my OCD. --Eiba 14:06, 24 December 2007 (EST)

Yes, I get the same behavior. I didn't actually check with a debugger, but I checked with my test version, and it's definately flagged by the game for being a magma pool.
0x517A5D Eiba's bug report location.png
I actually suspect that this is correct (if unexpected) behavior: the game's local-map generator is preventing features from being generated under or too close to civilization areas. It might be worth exploring other towns with a feature next to them. Anyway, I don't think I can do anything about this... it's just one of those things, y'know?

And good luck with that OCD; this utility made mine worse. (I just know that if I keep looking, I'll find a 4x4 limestone magma water chasm pits trees haunted location.)
0x517A5D 15:27, 24 December 2007 (EST)
So I was looking all over for the discussion of this thing - and I just got to hand it to you - you just saved countless hours of my life looking for the perfect starting location. Holy shit this is awesome. I could practically open-mouth kiss you. *cough
I can verify cavelakes and whatnot are revealed :) Anyhow, thanks - and I'm surprised that there aren't too many raving posts on the forums about this. (I'll also give you a heads up if I find that legendary adamantine/magma/trees/chasm/flux/sand epic location in a terrifying 5x5 or less) --KaelGotRice 00:43, 26 December 2007 (EST)
You should post about this tool in the forums! Bartavelle 06:17, 27 December 2007 (EST)
Great frickin' utility. If I find that haunted superdense 4x4 I'll let you know, I've been looking for it too. (Terrifying's even better, as it is evil + savage.)
Small request: add a "map legend" to the Utilities page or include one in the zip. I've never seen those numbers displayed in the above screenshot, just #s and ~s.
I saw one map where a red single ~ next to a long set of #s didn't turn up magma at any depth, so what you say about the local-map generator probably applies to features other than civilizations.--Maximus 19:49, 26 December 2007 (EST)
A map key is a good idea. I'll package one with the next release, and I'll throw up a quick one one on the utilities page as well.
The numbers in the screenshot are from my initial alpha test version, which I never released. Do you think that I should put them in the normal tool, as an alternate display mode? I thought they wouldn't be useful.
Was there any feature where the magma should have been? Could it have drained out into the chasm? If you still have the seed and location, I'll look at it.
0x517A5D 20:02, 26 December 2007 (EST)
Seed 92001, generated under .33e, I think. Image:92001_busy.png It didn't drain into the chasm; there's no "empty space" anywhere in the column indicated by RP. This is a really nice location btw; two chasms, surface and underground river and lake, steel, sand, pits, and my favorite, skeletal elephants. There's over 200 hostiles on the map right at the outset. However, the pits/cave river and magma/elephants are not near each other, requiring a starting location at least 7x10.
I don't think having RP display numbers is necessary. I assume they indicate depth -- I'd rather know nothing about the actual placement of things as long as I know the grid contains the features I want.
Say, maybe you could create an automated map-searcher where you tick off what features you want and the searcher identifies starting locations containing them without telling you exactly where each feature is...--Maximus 22:44, 26 December 2007 (EST)
The numbers are the internal feature flag value. 2, for instance, is cave pool. I have been pondering such a map searcher. It would require extremely intimate knowledge of the internal map representation, which is presently beyond me. Regional Prospector does its magic by hooking into the drawing of each map cell, so it doesn't have to traverse the data structures itself.
0x517A5D 22:59, 26 December 2007 (EST)
If you're just hooking into the drawing of a map cell, couldn't you also add a call to something that would keep track of where, for instance, magma vents are? Something like that would make Ziusudra's magma search utility a lot faster; instead of waiting a quarter second and looking through the screen, such a search utility would scan across the map as fast as the game can update.
Tacroy 00:16, 31 December 2007 (EST)
Maybe... Hmm. Maybe. I could make a list with little problem. The hard part would be getting the info out. I immediately envision a co-process, probably a custom debugger, that collects the information from code tweaks in DF. And either that program, or an AHK script, would feed input to DF to traverse the map. Hmm. Really, this sounds like a project that's a couple orders of magnitude harder than RP was. With RP, I just inject a few lines of carefully written assembly code. Debuggers are hard. Interesting idea, though. Also, nice m-dash.
0x517A5D 01:24, 31 December 2007 (EST)
I only copy from the best :) But anyway, as long as you're injecting assembly code, couldn't you extend it to open a file and write out the interesting features it finds? This probably wouldn't work if you're limited to a certain amount of injected code; I have to say that I have absolutely no idea whether or not this would work as I've never done anything with x86 assembly, nor have I ever messed around with injecting code into memory.
Tacroy 23:03, 31 December 2007 (EST)
I theoretically could dump data to a file. The limit on how much code can be injected is so high that it will never actually be hit in real-world use. However, I would have to (a) do all of the file operations myself using relocatable assembly code (which is even harder to write than normal assembly language), and (b) track down the operating system call addresses from scratch, the way viruses do. (Have to do that because they can be at different addresses in different processes, so I can't just find them in the patcher process and copy them across.) I estimate 1000-2000 lines of assembly, all carefully coded to not disrupt DF itself. Using a custom-built debugger might actually be easier. I am, frankly, not eager to do such a project for little personal gain. RP suits my needs and tastes quite well. Now, if you can find someone else willing to do the gruntwork, I can give info such as good patch locations, and critique their techniques. Though I probably am not willing to debug crashes — and crashes will happen, and they can be weird and mysterious.
0x517A5D 02:37, 1 January 2008 (EST)
Why don't you let the patcher do the grunt work to find the system function addresses, all you'd have to do is read in the entire EXE image from the DF processes. The relocatable assembly is still definitely going to be a pain. I'd look into doing it myself, but I've already got my plate full just trying to make DFUF useful.
-- Jifodus 15:09, 1 January 2008 (EST)
That's a interesting thought. Since the target is a single known executable, which almost certainly already imports the system calls I would need, I could indeed suck them out of the image. So that counters point b. I'll give it some thought. However if I do take on this project, I am actually leaning toward the custom debugger route. I could use C that way. And I'd learn more skills and techniques, I'm sure.
0x517A5D 16:49, 1 January 2008 (EST)

Maybe it's only me, and I'm doing something extremely stupid, but I can't get it to apply the patch. When I run the .exe it says that it can't find the files that it needs to patch, and suggests that they perhaps already are patched, which, of course, they aren't. I'm probably doing something stupid, aren't I? I suspected that I had possibly put it in the wrong place or something, so I ended up running it from a whole bunch of different DF folders. Alas, there wasn't any sort of readme to help us simple people. Help would be appreciated though, it sounds like a fantastic utility. I'm tired of looking for underground pools with the random chance method. I'm using .33g--Yabbadabba 00:55, 1 January 2008 (EST)

Okay, lets cover the misconception first: it doesn't patch files. It grabs the running copy of Dwarf Fortress by the balls throat, and patches its memory. But if DF isn't running, you will get a different error message. So it was running. So... try this: quit out of DF, then start it back up. When DF is at the initial title screen, run the RP utility. Only once. It should not give an error message. In fact, it should give no feedback at all. Then go back to DF and choose the Start Playing menu choice. When you're looking at the Choose a Fortress Location screen, you should automatically be looking at a region which has mountains. At this point, you should notice extra symbols on the local map view on the left of the screen. Report back if this doesn't work, and we can do some diagnostics. I do agree, there should be a readme to explain stuff, as well as give a map key of the new symbols. Soon.
0x517A5D 02:37, 1 January 2008 (EST)
Hey, thanks for the help man. Worked like a charm. I guess I just ran it before it got to the main menu last time. Or maybe I opened it twice. Either way, cheers.--Yabbadabba 03:21, 1 January 2008 (EST)

I gotta say, this is an awesome utility, I was thinking, exactly, wouldn't it be cool if someone would make a program that would fool the main DF exec into rendering "hidden" features? And a couple months later, you make it. I don't exactly know how it works, but is there a way to do the same thing to the "region" map? (the one in the middle) like, for example show the tiles that have any magma with a red background. Sergius 23:13, 4 January 2008 (EST)

Maybe. I have given this a little thought, but haven't done any of the necessary analysis of DF. The maps are rendered at different times, and by different routines, and I haven't explored what data is easily available to the Region renderer. I may look at this, or I may try to jump all the way to a "Map Info Dumper" or "Good Region Finder" as discussed above. Currently I'm devoting my efforts to art defacement tantrums. I am able to shut them off beforehand, but I can't yet counter the effect after the fact.
0x517A5D 21:51, 5 January 2008 (EST)

Just wanted to say once again, damn fine job on the Regional Prospector. I've just posted a couple of locations found using it over here. --Janus 21:55, 6 January 2008 (EST)

Reverse questions

As you seem to have delved into the UI, do you know where the displayed map coordinates are stored? (not the cursor coordinates) Bartavelle 07:44, 8 January 2008 (EST)

Which map? I suspect you're talking about Dwarf Fortress mode post-embark, in the actual gameplay. And my answer is no, I haven't looked for that. As a half-assed guess, look in the block of data (.33g) from 0146963C to 014696BC (near other map data variables), and from 00906294 to 009062B4 (near the mouse-coord-on-map variables).
0x517A5D 23:26, 8 January 2008 (EST)