Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 60 61 [62] 63 64 ... 192

Author Topic: Dwarf Therapist (LATEST 0.6.12 5/23/12 see first post)  (Read 871086 times)

ClubFoot

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #915 on: February 15, 2012, 02:48:42 pm »

For the OS X users:

If you right-click the app and click "Show Package Contents", you can click through to Contents\Resources\etc.  The ini files for the offsets live there.  Unfortunately I'm in the middle of a sprint at work, so I probably won't have time to test offsets on the OS X side until after work tonight.

thank you!
See - I knew there was an easy answer and I was just dumb.
Logged

sergisaf

  • Escaped Lunatic
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #916 on: February 15, 2012, 02:52:35 pm »

So let's say that with dyn's .ini everything was working just great (souls! yay!) but then a fucking migration wave of 3 dwarves (can 3 dwarves actually be called a migration wave? it'd be more like switching homes or whatever) fucked up and DT now just freezes every time I run it.

Dang.

P.S.: Is there a way to debug DT to know where is exactly the loading failing?
« Last Edit: February 15, 2012, 02:55:34 pm by sergisaf »
Logged

Gearheart

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #917 on: February 15, 2012, 02:56:00 pm »

Preliminary release possibly tonight?

DE, you are a gentleman and a scholar and I wish to subscribe to your newsletter.
Logged

stevedore

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #918 on: February 15, 2012, 02:58:54 pm »

So let's say that with dyn's .ini everything was working just great (souls! yay!) but then a fucking migration wave of 3 dwarves (can 3 dwarves actually be called a migration wave? it'd be more like switching homes or whatever) fucked up and DT now just freezes every time I run it.

Dang.

P.S.: Is there a way to debug DT to know where is exactly the loading failing?

You can try restarting both DF and DT; that might solve it (I think it did for me when I encountered a similar issue while trying to find offsets).

As far as the debugging goes, in theory run.log should have some information, but I found that the stuff it prints while reading dwarves doesn't give enough information. If it crashes even after restarting DF, if you could zip up your save and put it somewhere that we can download it, that may be helpful for debugging the issue (if it's tied to some condition in the save and not some other factor entirely)
« Last Edit: February 15, 2012, 03:00:44 pm by stevedore »
Logged

sergisaf

  • Escaped Lunatic
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #919 on: February 15, 2012, 03:03:15 pm »

@stevedore
Hell yeah.
Restarting worked.

Lots of thanks.
Logged

ClubFoot

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #920 on: February 15, 2012, 03:08:26 pm »

For the OS X users:

If you right-click the app and click "Show Package Contents", you can click through to Contents\Resources\etc.  The ini files for the offsets live there.  Unfortunately I'm in the middle of a sprint at work, so I probably won't have time to test offsets on the OS X side until after work tonight.

See - I knew there was an easy answer and I was just dumb.

is there a doc someplace on the structure of ini files for DT?  I observe that the structure of the ini files are different for windows vs osx.
Windows:
  a <version>_legacy.ini and a <version>_graphics.ini file for each release
osx:
  just a single <version>.ini file for each release.

Is the windows structure to support legacy versions of DT, or do I somehow need to have both?

Also - I've got a mac (clearly), and I can read hex - so I'm happy to go looking for the mac-specific offsets myself if someone can point me to a guide for how you identify what you're looking for in the core...surely you're not just randomly guessing memory addresses....


Logged

Molay

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #921 on: February 15, 2012, 03:19:32 pm »

I'm so glad the DF community is made out of some really smart people. It's great to follow the research on DT and to see every little news on what people find out on the matter.

You make me smile. You give me hope DT will be fixed earlier than we thought.

Thanks for all your dedication, glad we have skilled people here!
Logged
The best alternative to having a functional steel industry is to have a really, really, really good hospital. And a lot of coffins.

KaminaSquirtle

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #922 on: February 15, 2012, 03:20:22 pm »

Dunno about documentation, but I'm willing to bet that the Windows version uses <version>_legacy.ini for the legacy version of DF, and <version>_graphics.ini for the SDL version. The OS X and Linux versions only have the one because they only work with the SDL releases.
Logged

Feb

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #923 on: February 15, 2012, 03:24:27 pm »

I'm so glad the DF community is made out of some really smart people. It's great to follow the research on DT and to see every little news on what people find out on the matter.

You make me smile. You give me hope DT will be fixed earlier than we thought.

Thanks for all your dedication, glad we have skilled people here!

Not only we have smart people, we even have considerate, grateful not-so-smart people (self included)  I looked at our community fortress and I looked at the MC servers.  Hell, we have people (as in virtual strangers) here that are willing to work together ffs!  You've no idea how rare it's to see nowadays, all the other games are filled with people like !!XWeaselCakeX!! (I just learned what those icons mean today when I melted to death :P)
Logged

Sparrorf

  • Escaped Lunatic
  • dorfs dorfs dorfs
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #924 on: February 15, 2012, 03:27:13 pm »

I just like that i know something about programmin so i could helped you with the DT, the only thing i can do is cheer you up DwarfEngineer and all the inteligent people supporting him!

i hope that you can manage  to make the DT compatible with the new version, we'll be waiting patiently :)
Logged

vemiermark4

  • Escaped Lunatic
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #925 on: February 15, 2012, 03:35:37 pm »

Woot! Reporting DT working so far, with the Fixes/Hacks given by our brave heroes. The only 'bug' I've got is peasants being called glazers when ordered by profession, but seeing as all of my professions are custom names, it doesn't bother me much. Thanks for the work, guys! Can't wait to see DE's release.
Logged

stevedore

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #926 on: February 15, 2012, 03:36:06 pm »

For the OS X users:

If you right-click the app and click "Show Package Contents", you can click through to Contents\Resources\etc.  The ini files for the offsets live there.  Unfortunately I'm in the middle of a sprint at work, so I probably won't have time to test offsets on the OS X side until after work tonight.

See - I knew there was an easy answer and I was just dumb.

is there a doc someplace on the structure of ini files for DT?  I observe that the structure of the ini files are different for windows vs osx.
Windows:
  a <version>_legacy.ini and a <version>_graphics.ini file for each release
osx:
  just a single <version>.ini file for each release.

Is the windows structure to support legacy versions of DT, or do I somehow need to have both?

Also - I've got a mac (clearly), and I can read hex - so I'm happy to go looking for the mac-specific offsets myself if someone can point me to a guide for how you identify what you're looking for in the core...surely you're not just randomly guessing memory addresses....

Yes, the Windows structure is for side-by-side support of legacy and SDL versions.

As for finding the offsets... some of it has been guesswork, some more deterministic. There's a wiki post on the google code site (http://code.google.com/p/dwarftherapist/wiki/MappingNewVersions) that describes it, but it's quite outdated so only gives you a very rough idea.

Here's a quick guide to how I figured out some values:

modify DwarfTherapist\etc\game_data.ini, and change the following values:
Code: [Select]
total_words_per_table = 2173
expected_dwarf_race = 465

I don't know for sure that expected_dwarf_race should be changed; it's just a guess. I'm thinking it will probably have the same index in windows and on mac, but it might not. Worst case, this won't be any more incorrect than the value from the old version.

Generate a new world. When you go to embark, give your first dwarf the nickname "this_is_a_long_name" and custom profession "0123456789abcdef".

Once you're in game, just pause.

If you start dwarf therapist and click "connect to DF", it should say "connected to unknown version" in the status bar. Look for run.log (I assume it's within the package, maybe? Not absolutely sure) and look for a line where it says that it can't find a memory layout for checksum 0xXXXXXXXX - copy this hex value.

Close down DT, and copy v0.31.25.ini to v0.34.01.ini. Change the first two sections to look like (copying the checksum value you got from run.log):
Code: [Select]
[info]
checksum=0xXXXXXXXX
version_name=v0.34.01 (graphics)
complete=false

[addresses]
translation_vector=0x0
language_vector=0x0
creature_vector=0x0
dwarf_race_index=0x0
squad_vector=0x0

You can start DT again and connect to DF. Now, hit "Scan Memory". In this dialog, you want to try the four buttons on the right for finding creature vector, dwarf race index, translation vector, and squad vector. If they work, they'll print out some values that you can put into your .ini file, then restart DT and see if it's starting to read anything.

If it's reading the dwarves, you can right click on them and select Dump Memory to get, surprise surprise, a dump of the memory pertaining to that dwarf. From here it's been a bit more guess-work for me, but mostly I was looking at the offsets in my .ini file and trying to determine if the values at those offsets made sense. If DT finds your dwarf race index (more on that a bit later), for instance, that's an easy one to verify, since you just look for a specific hex value at an offset (remembering that it will be in little-endian representation). The labour offset is another semi-easy one; you'll be looking for a large area of repeated bytes that are either 01 or 00. Mining has index 0, so if you go in game and toggle it, you should see one byte going from 00 to 01 and back, etc, and the address of that byte is your labour offset.

on the dwarf race index:
DT didnt' find this value for me. I found that if I looked in run.log, I saw some lines like this after running the search for it:
Code: [Select]
2012-Feb-15 15:30:51.231 DEBUG core PTR 13734bf "" [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:77] (go)
2012-Feb-15 15:30:51.231 DEBUG core MATCH! offset 46 2e [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:80] (go)
2012-Feb-15 15:30:51.231 DEBUG core READ ADDR FROM 13734ed = 252be9c [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:82] (go)
2012-Feb-15 15:30:51.231 DEBUG core RACE VALUE 465 HEX 1d1 [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:84] (go)
2012-Feb-15 15:30:51.231 DEBUG core PTR 13736eb "" [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:77] (go)
2012-Feb-15 15:30:51.231 DEBUG core MATCH! offset 31 1f [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:80] (go)
2012-Feb-15 15:30:51.231 DEBUG core READ ADDR FROM 137370a = 252be9c [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:82] (go)
2012-Feb-15 15:30:51.231 DEBUG core RACE VALUE 465 HEX 1d1 [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:84] (go)
2012-Feb-15 15:30:51.231 DEBUG core PTR 15558c6 "" [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:77] (go)
2012-Feb-15 15:30:51.231 DEBUG core MATCH! offset 28 1c [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:80] (go)
2012-Feb-15 15:30:51.231 DEBUG core READ ADDR FROM 15558e2 = 252be9c [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:82] (go)
2012-Feb-15 15:30:51.231 DEBUG core RACE VALUE 465 HEX 1d1 [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:84] (go)
2012-Feb-15 15:30:51.231 DEBUG core PTR 19b0537 "" [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:77] (go)
2012-Feb-15 15:30:51.231 DEBUG core MATCH! offset 25 19 [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:80] (go)
2012-Feb-15 15:30:51.231 DEBUG core READ ADDR FROM 19b0550 = 252be9c [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:82] (go)
2012-Feb-15 15:30:51.231 DEBUG core RACE VALUE 465 HEX 1d1 [bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:84] (go)

If you're seeing several lines like this that all have a matching race value pop up, then just try one of the addresses from one of these lines (the address is in red)

Code: [Select]
2012-Feb-15 15:30:51.231 DEBUG core READ ADDR FROM 19b0550 = [color=red]252be9c[/color][bin/release/../../../dwarftherapist/inc/dwarfraceindexsearchjob.h:82] (go)

You'll have to subtract the appropriate offset from it first, however, before it's appropriate for putting into your .ini file. Look for this value (again, red) in run.log:

Code: [Select]
2012-Feb-15 15:30:49.001 DEBUG core base address: "0x01360000" [../dwarftherapist/src/dfinstancewindows.cpp:258] (find_running_copy)
2012-Feb-15 15:30:49.001 DEBUG core memory correction: "[color=red]0x00f60000[/color]" [../dwarftherapist/src/dfinstancewindows.cpp:259] (find_running_copy)

And subtract that value from the address you got a step before. That's what you'll put in your .ini file.

I hope that gives you at least somewhere to start.
« Last Edit: February 15, 2012, 03:54:40 pm by stevedore »
Logged

talrave

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #927 on: February 15, 2012, 04:28:15 pm »

Hmmm... so using the modified .ini,  everything loads and appears to be working right,  however I might have run in to a small problem.

I have the habit of assigning everyone to do mining until the basic layout of the first floor is done so everyone can have shelter and all items and food can be put away.   Well, I assigned everyone via DT, committed changes, and unpaused DF...  Nothing.  Just my two miners from before whittling away while everyone else sets on their thumbs. 
I check; we have 7 pickaxes, everyone has 'mining' set in game.   Huh.   I manually turned their mining off and on, unpaused, and OFF to work they go!!

So yeah, not sure if they are actually doing the jobs they get assigned in DT or not, but I had to manually un-switch then re-switch them in DF for it to work.
Logged

stevedore

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #928 on: February 15, 2012, 04:30:00 pm »

Hmmm... so using the modified .ini,  everything loads and appears to be working right,  however I might have run in to a small problem.

I have the habit of assigning everyone to do mining until the basic layout of the first floor is done so everyone can have shelter and all items and food can be put away.   Well, I assigned everyone via DT, committed changes, and unpaused DF...  Nothing.  Just my two miners from before whittling away while everyone else sets on their thumbs. 
I check; we have 7 pickaxes, everyone has 'mining' set in game.   Huh.   I manually turned their mining off and on, unpaused, and OFF to work they go!!

So yeah, not sure if they are actually doing the jobs they get assigned in DT or not, but I had to manually un-switch then re-switch them in DF for it to work.

I've read about some bugs with workshops and construction - it's possible they're actually labour bugs, and it was manifesting here. If it showed as enabled in-game, then there's not much more DT can do.
Logged

smirk

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.10 3/15/11 see first post)
« Reply #929 on: February 15, 2012, 04:39:10 pm »

Hmmm... so using the modified .ini,  everything loads and appears to be working right,  however I might have run in to a small problem.

I have the habit of assigning everyone to do mining until the basic layout of the first floor is done so everyone can have shelter and all items and food can be put away.   Well, I assigned everyone via DT, committed changes, and unpaused DF...  Nothing.  Just my two miners from before whittling away while everyone else sets on their thumbs. 
I check; we have 7 pickaxes, everyone has 'mining' set in game.   Huh.   I manually turned their mining off and on, unpaused, and OFF to work they go!!

So yeah, not sure if they are actually doing the jobs they get assigned in DT or not, but I had to manually un-switch then re-switch them in DF for it to work.


I seem to recall that this was a DT bug for a while back in DF2010 as well, where setting mining and woodcutting wouldn't appropriately flag the dwarf to go pick up its equipment. It was only a problem with those two, because they required tools. It was fixed, but I have no idea how. Most likely the new version has broken that fix again. Just one more thing to dig back out of memory.


DwarfEngineer, stevedore, dyn, thanks for all your work getting this thing back on its feet. You are good people.
Logged
When i think of toady i think of a toad hopping arround on a keyboard
also
he should stay out of the light it will dry out his skin
his moist amphibian skin
.
Pages: 1 ... 60 61 [62] 63 64 ... 192