Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFHack Question: Embark screen modding?  (Read 1177 times)

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
DFHack Question: Embark screen modding?
« on: April 21, 2014, 10:09:24 am »



Question:  What is the current state of DFHack's knowledge of the Embark screen?

I'd like to write a plugin to show details of entities, map features, sites, resident creatures, and layers on the embark screen, but not seeing much in the source code for it.
After finishing that, a programmable site location tool would be cool.  E.g. search for all embark sites which have Giant Eagles to capture.
(The existing "embark anywhere" patch is unrelated)

Does DFHack know anything about the world map before embark?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack Question: Embark screen modding?
« Reply #1 on: April 21, 2014, 12:52:12 pm »

Creature populations should be available for any tile in the entire world - world.world_data->regions[] describes all of the distinct regions in the world (mountains, plains, forests, swamps, deserts, lakes, oceans, etc.) along with plant and animal populations, and you can do similar stuff to find which regions have certain desirable minerals (look at how prospect works during embark).

Map features should also be available within world.world_data.feature_map (see the DFHack "maps" module), but they will only be populated for region tiles you've actually viewed at one point (though I believe you can populate all of them by invoking the site finder).

Entities, sites, and resident creatures ought to be fairly straightforward - resident creatures are historical figures, and they generally live in specific sites (generally caves) which you can determine by looking at their site links (and then locate the sites themselves on the world map).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.