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.

User talk:0x517A5D

From Dwarf Fortress Wiki
Jump to navigation Jump to search

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)
I just came here to request this feature as well. Red backgrounds for lava tiles in the region map is _exactly_ what I need!
I'd love to. I really would. But it's seriously hard. In my investigations, I have learned that the localmap view is generated dynamically. That makes sense — it would be wasteful to have 257*257 localmaps in memory all at once, when only one is needed at a time. But the consequence is that the magma flag that I am looking for is not available for any regionmap tile except the currently selected one. There has to be some flag somewhere, but I haven't found it yet, and I may not be able to.
0x517A5D 17:24, 12 January 2008 (EST)
Made some progress I think. Haven't found the flag but have found the area where it must be. So maybe I can do this.
0x517A5D 21:53, 12 January 2008 (EST)
I believe that magma is centered around some sort of invisible map feature, as all the magma I've found is in clusters. Volcanoes are obvious of course, but I've found many clusters that aren't near volcanoes. By clusters, I mean 9+ local areas with one or two pockets of magma, usually all touching, with the occasional pocket that's not touching the cluster. Anytime I'm searching, if I find one pocket, there are bound to be a handful of others in the immediate vicinity. Hope this helps in finding the token or flag that marks the clusters. --Edward 00:18, 13 January 2008 (EST)
This is proving to be very hard. I've already invested maybe 100 times the effort that the original RP features took me. I've gone down two or three long routes that lead to dead ends. Now I think I have found the list of map features — the same ones that show up in the region folders. If I can walk those looking for matching world x and y coordinates, and figure out where the magma flag is set in them, then it should work. If magma is even a feature, which I am not totally sure of yet.
0x517A5D 18:05, 14 January 2008 (EST)
I'm wondering if you couldn't create a utility that automatically traverses every single local square and updates the regional map if it finds something...--Maximus 02:24, 15 January 2008 (EST)
Possibly. What for?  —0x517A5D 04:06, 15 January 2008 (EST)
I was suggesting that as a kludge if you couldn't find the magma data you were looking for (if there's magma on the local map, update the regional map), but apparently you have finally found it.--Maximus 15:03, 15 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)

I'd just like to say great job on your Seekrit Projekt. It does not have to be updated for .38a. Mephisto 21:06, 5 February 2008 (EST)

You need to upload the file to a different mirror, the server site you download from has an array of pornographic ads strewn about the page below where you type the numbers.--Richards 19:43, 19 April 2008 (EDT)
Oh dear, I'm very unhappy to learn that. Truely sorry. But I just can't deal with it at this time. I'm deeply mired in a depressive spell that I can't seem to break out of, and frankly, I am barely able to shower each day.
So. I hereby give permission to any good samaritan or passerby to upload any or all of my utilities to a better host. Just please send me the account & password info using this wiki's PM or email facilities. Thanks much! And, again, sorry.
0x517A5D 17:43, 20 April 2008 (EDT)

Regional Prospector version 2

There is now a beta test version that highlights regional map squares containing magma in dark red. Thank you to Sergius and Polpoint for the idea. Hop on over to my main page. Leave feedback below. This project baked my brain; I am now off to bed.
0x517A5D 04:09, 15 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)

Incompatible with 38a.

"Failed to find memory locations to patch. Please report this at http://www.dwarffortresswiki.net/index.php/User_talk:0x517A5D"

It is expected to work with future releases of Dwarf Fortress, as long as the embark code doesn't change too much.

Hehe, not too surprising considering the version jump, that Toady could have made some major changes to embarkation. --Edward 09:35, 5 February 2008 (EST)

The embark screen still looks the same to me, exept that Seekret Projekt doesn't work anymore ofcourse.

Worked fine for me, at least, when the world is generated in 38a--Dorten 00:30, 6 February 2008 (EST)

Correction, and clarification for those confused: the original Regional Prospector release (listed on the utilities page) works in 38a. However, the newer improved beta2 and beta3 releases (on his user page) do not work in 38a. So, you can at least get the core functionality in 38a by using the non-beta release. --Janus 04:55, 6 February 2008 (EST)

Okay, thanks for the report. I've not been working on it recently, but I will get back to it soon. Without checking, I imagine the problem is the new functionality in the beta. I hooked several more places in the DF code — if those hook points changed, then they can't be hooked.
0x517A5D 14:32, 7 February 2008 (EST)
Yeah, im trying beta3 on 38c, and getting the error message. But the original version still works fine. (Oh and magma enabler fails too now) -Ctrlfrk 21:01, 4 March 2008 (EST)
Glad the old one still works. It's the new functionality that is the sticky point. Unfortunately I have not felt up to recreational programming for a couple of months now, much less the effort of disasssembling DF executables. I am starting to feel better, so expect beta4 soon, perhaps this weekend. That's not a promise though.
I'll look at magma soon as well, thanks for the report.
0x517A5D 22:11, 5 March 2008 (EST)

Enable magman buildings

Due to Vista being a pile of shit with DF I run my maps revealed because of the large speed up this gives on Vista (at least on my machine) Tneable magman buildings does not work with .38c --Gorfob 02:21, 18 March 2008 (EDT)