Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 96 97 [98] 99 100 ... 192

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

vityav

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1455 on: March 16, 2012, 05:32:13 pm »

Is there any particular reason that splinterz's branch would require different linux memory offsets from the main DT? Splinterz's always seems to read my number of dwarves wrong, and give crazy attributes which change every few seconds (miner just went from 0 recuperation to -20249 in a few steps). Tested with the latest fresh clone of both and the linux offsets from the main branch in 34.03 and 34.05.

Edit: Nevermind, found that the linux ini doesn't have a "physical_attrs" offset in it. Though still don't know why it reads the wrong number of dwarves.

Edit Edit: Fiddled around in memory for an hour to get the mental_attrs, and just stole the physical_attrs offset from dfhack and it works:
Code: [Select]
physical_attrs=0x328

[soul_details]
mental_attrs=0x0068

Both work perfectly for linux 34.05. Haven't tried going backwards yet, but likely the same.
« Last Edit: March 16, 2012, 10:11:11 pm by vityav »
Logged

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1456 on: March 16, 2012, 05:55:35 pm »

Here's a recommended update to the weighted stuff.  I did some tests on it and was quite happy:

Spoiler (click to show/hide)

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1457 on: March 16, 2012, 06:02:48 pm »

Hello again!

DFHack now has a very basic API for communicating with external apps. It's built on top of TCP and google protobufs. I'm interested in adding a DFhack backend to DT using this. Question is, what should be included in the protocol - ideally some reasonable subset of what we have documented on DFHack side, because adding support for everything would be either a large mountain's worth of work or a large mountain's worth of generated code.

Anyone interested in this, please, look at https://github.com/peterix/df-structures and tell me what would be best to include in such a protocol. The files related to units, jobs, job types and military should be relevant. The protocol doesn't have to mirror the game's data exactly, and maybe even shouldn't, because DF can change. Even things like enums can be exposed. And it's definitely possible to filter and pre-process data on DF side, if that makes things easier to work with.

vorpal+5

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1458 on: March 17, 2012, 06:59:12 am »

Is anyone interest by reports about erroneous icons or missing icons for the tasks?
Logged

Intrinsic

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1459 on: March 17, 2012, 12:00:21 pm »

Some of these attribs associated with skills are bonkers, Analytical Ability for cooking? O.o
I only noticed as i have someone who is apparently a potentially useless cook and yet is skill 9 after doing maybe 30-40(maybe more but no more than 50, fortress is less than a year old) easy meals, it makes no sense. His attribs are very average to awful, 383 for Kinesthetic Sense for example.

Another [dwarf_jobs]
Code: [Select]
218/name = "Make rock Pot"
#218/name = "Pen/Pasture Large Animal"
#218/type = ANIMAL
« Last Edit: March 17, 2012, 01:02:58 pm by Intrinsic »
Logged
Start Duelyst with a bonus 100gold, use referral code: Buttfungus
Enter during signup or ingame under Settings.

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1460 on: March 17, 2012, 01:10:28 pm »

Has anyone gotten a script to show up in a role?  Splinterz coded it in, but when I add the role I get nan% when I hover my mouse over the column

Intrinsic

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1461 on: March 17, 2012, 01:19:23 pm »

I have no idea how to use those scripts, i tried adding it via the scripting menu just plain copy pasting it but it didn't do a thing so guessed i was doing something wrong.
Logged
Start Duelyst with a bonus 100gold, use referral code: Buttfungus
Enter during signup or ingame under Settings.

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1462 on: March 17, 2012, 02:54:23 pm »

Some of these attribs associated with skills are bonkers, Analytical Ability for cooking? O.o
I only noticed as i have someone who is apparently a potentially useless cook and yet is skill 9 after doing maybe 30-40(maybe more but no more than 50, fortress is less than a year old) easy meals, it makes no sense. His attribs are very average to awful, 383 for Kinesthetic Sense for example.

Another [dwarf_jobs]
Code: [Select]
218/name = "Make rock Pot"
#218/name = "Pen/Pasture Large Animal"
#218/type = ANIMAL

most of the attributes for roles have been taken directly from the wiki. i'm purely working under the assumption it's not complete bs. :P perhaps we should add some default weights? in regards to your cook, it's hard to tell you what might be happening. what are your weights? do you have other cooks with more skill? way better attributes? i can take a look if you want to send me the save.

i'm pretty sure i've got all the jobs fixed, so you don't need to worry about those anymore.

Has anyone gotten a script to show up in a role?  Splinterz coded it in, but when I add the role I get nan% when I hover my mouse over the column

make sure your script results in a value, and isn't a > or something like the filter scripts.

vityav

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1463 on: March 17, 2012, 03:04:41 pm »

Memory hacking question: Looking for the skills manually, I start by searching the creature_vector and find the dwarf I want (in this case, 0xeded6810 shows his first name). Then I add the soul offset and skills offset (now at 0xeded6fcc), and from here, looking at dwarf.cpp, there should be a vector to vectors with the type, rating, etc. But when telling DT to print that vector (the printing uses the same enumerate_vector() function), it says there are zero entries. Did I miss something, or do I need to use gdb to handle this?
Logged

zwei

  • Bay Watcher
  • [ECHO][MENDING]
    • View Profile
    • Fate of Heroes
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1464 on: March 17, 2012, 03:11:57 pm »

Are you planning to incporporate item and material likes into "counselor"?

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1465 on: March 17, 2012, 03:17:20 pm »

Memory hacking question: Looking for the skills manually, I start by searching the creature_vector and find the dwarf I want (in this case, 0xeded6810 shows his first name). Then I add the soul offset and skills offset (now at 0xeded6fcc), and from here, looking at dwarf.cpp, there should be a vector to vectors with the type, rating, etc. But when telling DT to print that vector (the printing uses the same enumerate_vector() function), it says there are zero entries. Did I miss something, or do I need to use gdb to handle this?

depending on what offsets you're using to get to that point you may or may not be at the right place. the vector may be above/below and you'll have to poke around. i'd highly recommend looking at dfhack's df-structures for the linux offsets (i'm assuming you're trying to find the linux offsets yes?)

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1466 on: March 17, 2012, 03:20:21 pm »

Quote
make sure your script results in a value, and isn't a > or something like the filter scripts.

My script has
Code: [Select]
findAlternative(avgMDeviation, avgDev)*100;

as it's last line, that results in a number between 0 to 100, but it doesn't show up.

The name of the script is Base, and in the .ini file, I have the name of the script as "Base".

What am I doing wrong here?  There's not a filter operation (i.e. comparison operator).

On further note, the last line can have a >50 on it, and it will produce results.

Update:

Splinterz, how about an example that you know for sure will produce a result, then I can work mine around that.
« Last Edit: March 17, 2012, 03:27:49 pm by thistleknot »
Logged

vityav

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1467 on: March 17, 2012, 03:33:40 pm »

depending on what offsets you're using to get to that point you may or may not be at the right place. the vector may be above/below and you'll have to poke around. i'd highly recommend looking at dfhack's df-structures for the linux offsets (i'm assuming you're trying to find the linux offsets yes?)
I've actually already found the linux offsets (see top of this page), and DT automatically reads them all correctly, but I'm working on using gdb to manually change values (for, say, making an instantly legendary weaponsmith). Unethical, but educational :) In any case, both DT and dfhack treat the skills offset as pointing at a vector, DT's brute force vector printing just says there's nothing there.

So plugging in the creature_vector (0x095921ac), finding a dwarf (0xeb7398d0), adding the souls offset (0x05e8), then the skills offset (0x01d4), I should be at a vector containing a vector for each skill, right?
Logged

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1468 on: March 17, 2012, 04:00:33 pm »

depending on what offsets you're using to get to that point you may or may not be at the right place. the vector may be above/below and you'll have to poke around. i'd highly recommend looking at dfhack's df-structures for the linux offsets (i'm assuming you're trying to find the linux offsets yes?)
I've actually already found the linux offsets (see top of this page), and DT automatically reads them all correctly, but I'm working on using gdb to manually change values (for, say, making an instantly legendary weaponsmith). Unethical, but educational :) In any case, both DT and dfhack treat the skills offset as pointing at a vector, DT's brute force vector printing just says there's nothing there.

So plugging in the creature_vector (0x095921ac), finding a dwarf (0xeb7398d0), adding the souls offset (0x05e8), then the skills offset (0x01d4), I should be at a vector containing a vector for each skill, right?

the soul offset should point to a vector, and you want the first soul in the vector. then you add the skills offset, and you should have a vector of structs which represent the skills.

vityav

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1469 on: March 17, 2012, 04:05:59 pm »

the soul offset should point to a vector, and you want the first soul in the vector. then you add the skills offset, and you should have a vector of structs which represent the skills.

That did it :) For some reason I just assumed the m_first_soul was just the soul offset, not an element in a vector there. Does this mean dwarves can have multiple souls? Thanks for the help
Logged
Pages: 1 ... 96 97 [98] 99 100 ... 192