Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DF Hackery questions  (Read 677 times)

Werdna

  • Bay Watcher
  • Mad Overlord
    • View Profile
DF Hackery questions
« on: January 06, 2017, 11:44:56 am »

1.  Is anyone aware of a DFHack command or other utility to change a fortress name after embark?

2.  I am playing Fortress Defense, ~6 hostile races, and about 10 years in (read: there's lots of dead).  My fort stopped having immigrants, dwarf caravans, and liaison (human caravans still arrive).  Civ still exists, 3k dwarves.  The no-immigration messages simply say no immigrants this season and do not mention danger or anything like that.  This sounds a lot like the fix/dead-units issue, but when I run that command I get a simple "0 out of 233 units" or something like that.  Is it working correctly?  My fort turfs that many invaders per year; the dead must number at least 1-2 thousand here alone so the 233 number seems awful low?

The other possibility is that goblins have sacked all the nearby dwarven sites and they were abandoned, does the distance to nearest settlement matter for immigration and the like?  Anyone know what that distance is?

Thanks, W
Logged
ProvingGrounds was merely a setback.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DF Hackery questions
« Reply #1 on: January 07, 2017, 02:21:22 pm »

Not sure on the second one.

On the first: open-legends > export sites and pops > find your fort in the list and subtract 1 from the number of it's entry, if it's "168: Yourfort", put 167 where the k is in this command:
gui/gm-editor df.global.world.world_data.sites[k].name

I don't have my names script working since dfhack isn't all the way functional on stuff I need to bugfix it, but if you pull up the raw/objects/language_DWARF.txt file in a text editor with line numbers, subtract six from the word you're after. Like deler/steel is entry 82 I think, so to change the first part of the name to Steel you'd change the number of the first entry under the words heading there to 76, then the parts_of_speech entry should be 0 generally, that one only matters if you want something like "Steelhammer" or "Steelhammered" you'd change the relevant parts_of_speech entry to 0 or 1 or whatnot, at most they go up to 9 or 10, but that's rare.
Logged

Werdna

  • Bay Watcher
  • Mad Overlord
    • View Profile
Re: DF Hackery questions
« Reply #2 on: January 07, 2017, 09:30:37 pm »

Worked great, Max, thank you for the detailed explanation!
Logged
ProvingGrounds was merely a setback.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DF Hackery questions
« Reply #3 on: January 08, 2017, 12:05:56 am »

Rock on, I figured it would get ya through it enough, and once you save and reload it should update all the references properly.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DF Hackery questions
« Reply #4 on: January 08, 2017, 10:27:56 am »

On the first: open-legends > export sites and pops > find your fort in the list and subtract 1 from the number of it's entry, if it's "168: Yourfort", put 167 where the k is in this command:
gui/gm-editor df.global.world.world_data.sites[k].name
There's actually an easier way: "gui/gm-editor df.world_site.find(df.global.ui.site_id).name"
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.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DF Hackery questions
« Reply #5 on: January 08, 2017, 12:15:13 pm »

I always forget the format for that and fuck it up, but that wouldn't work in adventurer or legends mode either.
Logged

Werdna

  • Bay Watcher
  • Mad Overlord
    • View Profile
Re: DF Hackery questions
« Reply #6 on: January 08, 2017, 02:49:25 pm »

In case anyone is searching the forums, the problem with my missing migrants is a side-effect of missing dwarven caravans, with possible DF Hack solutions discussed in this thread.
Logged
ProvingGrounds was merely a setback.