Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 7 8 [9] 10 11 ... 13

Author Topic: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-04-02  (Read 65790 times)

Soor

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #120 on: March 24, 2009, 04:18:16 am »

How do I use the Determine Memory Layout thing? I did as the instructions requested, then edited the proper XML file with the updated variables.

However, I get an error on start-up saying I use an Unknown Version and it refuses to start. This is trying to get it to work with 40d10.

System.Exception: Unknown DwarfFortress version (checksum is 0x49c59b94)
The mem locator won't give you all the values needed anyway.

F.ex, a quick test run on d11 gives 3 CreatureVector values, but only about 1/4th of all the values needed overall.
Logged

Tavonx

  • Escaped Lunatic
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #121 on: March 25, 2009, 09:32:12 pm »

I've been using this utility on 40d and it's been amazing!

Updated to 40d11, and it doesn't work anymore... My dwarfs and children are lazy now...  :(
Logged

codewright

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #122 on: March 26, 2009, 11:43:56 am »

The mem locator won't give you all the values needed anyway.

F.ex, a quick test run on d11 gives 3 CreatureVector values, but only about 1/4th of all the values needed overall.

Yes, it does give only a few values, but these are the values that change most often (i.e. global pointer addresses). It is intended for "lightweight" upgrades and does not handle structural changes, because they are even harder to determine. The values returned can be used in creating a new memory layout and adding some of them that seem changed. Example:
Code: [Select]
<MemoryLayout Name="v0.28.181.40d-something" CheckSum="-whatever it tells you in the error-" Base="-name of layout to override, i.e. the previous version-">
<Address Name="DwarvenRaceIndex" Value="-whatever the memory locator tells you-"/>
<Address Name="LanguageVector" Value="-whatever the memory locator tells you-"/>
<Address Name="CreatureVector" Value="-whatever the memory locator tells you-"/>
<Address Name="TranslationsVector" Value="-whatever the memory locator tells you-"/>
</MemoryLayout>
Any address/offset/value not defined in the current layout will be taken from the base layout. This also means that you do not need to add values that are the same as in the base version. In case of the three creature vectors: that's generally a thing of trial and error, because there are three global creature vectors for different tasks. They may contain different creatures for different uses, but which one is "correct" (i.e. contains all dwarfs at all times) can only be found out by trying them out. You can, however, do an educated guess based on the location of the global pointer in the last version, because it'll most likely be very close to this.

For now, I don't intend to update the memory stuff for every interim release, because they don't bring great new features that make it impossible to stick to the older versions. But please feel free to try the memory locator to find some working layout and post it here. In case Toady did more complicated changes, however, it'll take more than this little tool. (so don't try too long if it doesn't work ;))

How do I use the Determine Memory Layout thing? I did as the instructions requested, then edited the proper XML file with the updated variables.

However, I get an error on start-up saying I use an Unknown Version and it refuses to start. This is trying to get it to work with 40d10.

System.Exception: Unknown DwarfFortress version (checksum is 0x49c59b94)
As it seems, the memory locator does not report the checksum to use, but the error message does. Try to put the reported checksum into the checksum field as shown above. The checksum is used to identify which memory layout to use. If it works, please post your values/the xml-snipped here.
Logged

Soor

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #123 on: March 27, 2009, 04:27:20 pm »

Yeah, I figured the 'base' tag out, set it to d8.

No luck however, DM crashes with all 3 CreatureVector values. Its possible that I screwed something up, but I ran it with a vanilla d11 and was careful, so the addresses picked up should be correct. Hence, as you suggested, I'm bravely giving up. \o/

Guess its back to d9 for me :)
Logged

docvego

  • Escaped Lunatic
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #124 on: March 27, 2009, 07:36:29 pm »

codewright, Dwarf Manager is awesome, I can't imagine playing the game without it.

I have a suggestion that with any luck is easy to add in:  Is there any way we could see the gender of the dwarf on the 'edit creature' screen?  This would make renaming the dwarfs easier, and most importantly, help with my bad luck drafting women carrying babies into war  :-\

Logged

Slitherrr

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #125 on: March 28, 2009, 10:16:45 am »

Address LanguageVector: 0x15615c8 (0x15615c8)
Offset Translation.WordTable: 0x58 (0x58)
Address TranslationsVector: 0x15615f8 (0x15615f8)
Address CreatureVector: 0x151b354 (0x151b354)
Offset Creature.CustomProfession: 0x6c (0x6c)
Offset Creature.Labors: 0x544 (0x544)

From v0.28.181.40d11 (checksum 0x49c82d3).

These are as reported by the DM memory finder.  I didn't know how to change any of the language properties (to make so and so word the xth word of the language, and so on), but I was making the assumption that that didn't change (and the vectors found by the tool didn't change from 40d8, so I'm thinking that assumption will hold).

I would assume that all the offsets and values would remain the same, since it's just a graphics engine change, so the only thing that is missing is the DwarvenRaceIndex.  Using values from previous versions doesn't work, which I kind of expected (it's changed in almost every one).  How can we find this value?
Logged

roelroel

  • Escaped Lunatic
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #126 on: March 28, 2009, 12:32:18 pm »

dmanagaer didnt work for me. i changed the exe to dwarfort.exe, then it did.
Logged

Stray Elvis (Tame)

  • Guest
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #127 on: March 28, 2009, 03:42:34 pm »

tried that, no dice with d11
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #128 on: March 29, 2009, 06:20:44 pm »

Okay.  Add this block to the MemoryLayouts.xml file:
Code: [Select]
<MemoryLayout Name="v0.28.181.40d11" CheckSum="0x49C82D3F" Base="v0.28.181.40d8">
<Address Name="DwarvenRaceIndex" Value="0x132A850"/>
<!-- http://www.bay12games.com/forum/index.php?topic=25585.msg482112#msg482112 -->
<Address Name="LanguageVector" Value="0x15615c8"/>
<Address Name="CreatureVector" Value="0x151b354"/>
<Address Name="TranslationsVector" Value="0x15615f8"/>
</MemoryLayout>
I put it right after the "<MemoryLayouts xmlns:xsi..." line.

Note that I have not done much testing of this.

Also, this is for Dwarf Manager 0.6, not 0.3.
Logged

Slitherrr

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #129 on: March 29, 2009, 10:29:23 pm »

Out of curiosity, and for future reference, how did you find the Dwarven Race Index?
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #130 on: March 29, 2009, 11:32:33 pm »

Out of curiosity, and for future reference, how did you find the Dwarven Race Index?

A private tool, not available for general use.  But this is the search pattern:
Code: [Select]
// 40d#
set_hexsearch2_limits(df_data_start, df_data_end);
t = df_memmem("A group of ", strlen("A group of ")+1);
if (t) {
set_hexsearch2_limits(df_code_start, df_code_end);
hexsearch2(0x68, DWORD_, t, SKIP_UP_TO, 40, 0x66, 0x39, BYTERANGE, 0x00, 0x3F, HERE, ADDRESS, JZ, EOL);
dwarven_race_index = peekd(here[1]);
}

And what that means is: find the C string "A group of",
then find a reference to it that is a PUSH of that address (68 ADDRESS),
then look 30 to 40 bytes after that for the pattern 66 39 ?? ADDRESS2.
ADDRESS2 is the dwarven race index.
Logged

codewright

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #131 on: March 30, 2009, 10:20:16 am »

Okay.  Add this block to the MemoryLayouts.xml file:
Code: [Select]
<MemoryLayout Name="v0.28.181.40d11" CheckSum="0x49C82D3F" Base="v0.28.181.40d8">
<Address Name="DwarvenRaceIndex" Value="0x132A850"/>
<!-- http://www.bay12games.com/forum/index.php?topic=25585.msg482112#msg482112 -->
<Address Name="LanguageVector" Value="0x15615c8"/>
<Address Name="CreatureVector" Value="0x151b354"/>
<Address Name="TranslationsVector" Value="0x15615f8"/>
</MemoryLayout>
I put it right after the "<MemoryLayouts xmlns:xsi..." line.

Note that I have not done much testing of this.

Also, this is for Dwarf Manager 0.6, not 0.3.
Thanks 0x517A5D.

Looks like I scrapped my simple DwarvenRaceIndex lookup, because it generated way too many possible results. I will try to refine the lookup using your little snipped and enable it again for the next version, if it works nicely.
Logged

Stray Elvis (Tame)

  • Guest
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-23
« Reply #132 on: April 02, 2009, 07:03:05 am »

I'm not computer literate enough to follow what's going on, but I'll just say that a lot of people appreciate the work you guys put into keeping DM up to date. DF isn't the same game without it.
Logged

codewright

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-04-02
« Reply #133 on: April 02, 2009, 10:45:21 am »

I'm not computer literate enough to follow what's going on, but I'll just say that a lot of people appreciate the work you guys put into keeping DM up to date. DF isn't the same game without it.
Thank you and all you other nice people that like DM!

New version! Apart from bugfixes and compatibility with 40d11, the major new feature is the (much requested) functionality to automatically set labors when switching a dwarfs profession. Example: You have 3 guys with the custom profession "Stoneworkers" doing masonry and engraving and one of them also doing mining. Now, you can select a fourth dwarf and instead of only assigning the profession name to him, you can now also assign all fully enabled labors to him (in this case masonry and engraving, but not mining).

I hope this helps a lot already, additionally one might later add prepared profession templates that are always available (i.e. not just when there are dwarfs in the current savegame with the given profession and labors).

Have fun!

Version 0.7 [2009-04-02]
  * Fixed crash on empty last names
  * Fixed crash on empty first names
  * Changed encoding of ingame-strings to IBM437 (thanks to shaja)
  * Added type to labor descriptions to improve merging operations
  * Added new context menu item which allows to set profession and labors
  * Added DwarvenRaceIndex and checksum lookups to the memory locator
  * Fixed max length of custom profession and nickname to 20 chars
  * Added memory layout for 40d11
Logged

Jurph

  • Bay Watcher
  • Minister of Belt-fed Weaponry
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-04-02
« Reply #134 on: April 02, 2009, 01:42:50 pm »

I hope this helps a lot already, additionally one might later add prepared profession templates that are always available (i.e. not just when there are dwarfs in the current savegame with the given profession and labors).

I love the new feature that moves labor settings, and I can't wait to see permanent (user editable?  plaintext?) worker templates make it into the build.  Ideally that would cause a flurry of activity in the community, with people publishing their job templates like people share world seeds today. 
Logged
Dreambrother has my original hammer-shaped Great Hall.  Towerweak has taken the idea to the next level.
Pages: 1 ... 7 8 [9] 10 11 ... 13