Since DFHack and DFusion haven't been updated yet and the previous methods used that I had been using to change the amount of dwarves I embarked with hadn't had their offsets located, I decided to find these myself.
The methods I am referring to are memory hacking via cheat engine and simple hex editing of the df executable. I learned about these methods here:
http://www.bay12forums.com/smf/index.php?topic=78311.0http://www.bay12forums.com/smf/index.php?topic=59928.0Memory Hacking
With this method, you have to edit the memory each time you wish to embark.
- Open up dwarf fortress 0.34.02
- Open up cheat engine and open the dwarf fortress process
- From here you have to add an address manually
- The address you are looking for is 9AA180
- Right click on the newly add item in the list box at the bottom and select "Change Record -> Value"
- You can change this value to anything you want that is above 7. Less than 7 will crash DF. I believe this value is a 32 bit unsigned int but the program freezes up after a couple hundred million dwarves... In theory, a 4 billion dwarf outpost on embark, in reality, probably a couple thousand for those with beefy machines.
Hex Editting the DF Executable
- DF SDL executable
- Hex editor such as HXD or Hex Workshop
This change is persistent and as long as you use this executable, the amount of embark dwarves will be the same.
- Launch your hex editor and open up your dwarffortress.exe
- Bring up the go function (ctrl+g) and go to the offset 0x5A9580
- You should see the string of bytes "24 18 07 00 00 00 8B 35" and as you probably guessed, the 07 00 00 00 string of bytes is the amount of embark dwarves.
- If you read the memory hacking segment, you would know that these bytes allow for a lot larger amount of dwarves than your computer can handle. Ideally this should be left well under 1000 dwarves. These bytes are also little endian aligned so instead of being 7000000 its actually 00000007. Remember to convert the amount of dwarves you want into hex before changing the value.
A problem I have noticed is that if you edit a number of dwarves for your embark that is larger than your population cap, immigrants will keep coming.
I also don't see a point in finding the offsets for 0.34.01 as Toady has said they have a save corrupting glitch in them and these methods require you to make a new fortress so it really makes no sense to create a new fort in a version that has a save corrupting bug.