Bay 12 Games Forum

Please login or register.

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

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

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1470 on: March 17, 2012, 04:14:12 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

great! i made the same assumption my first attempt messing around in memory as well. i would assume that they could have multiple souls, but i haven't seen it happen yet. (i was doing testing thinking vampires would have a second soul with the fake identity. as if it could be so easy :P)

thistleknot

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

Spoiler (click to show/hide)

Thank you Splinterz (exchanged via the emails).

I needed to paste the script into game_data.ini (inside the dt\etc folder).

thistleknot

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

I think

Attributes should outweigh labors, I know labors at legendary best everything...  but for simple embark and efficiency (i.e. peeps trying to come up rather than dealing with dwarves they have now), it might be best to use attributes > labors.  I would say 75-95%.  I myself disregard labors.  I just started yesterday doing careful embarks to ensure my labors were assigned appropriately.

I don't know what skills really are yet.  To me they seem a hybrid setup between attributes and labors...

So here's an alternative formula system I had going for attribute's, it's not venerated

Code: [Select]
37/name="Wood cutter"
37/attributes="1::strength:1.1,agility:1.1,endurance:1.1,willpower:0.9,spatial sense:1.2, kinesthetic sense:0.9"
37/traits=""
38/name="Trapper"
38/attributes="1::agility:1,analytical ability:1,creativity:1,spatial sense:1.1"
38/traits=""
38/skills=""
39/name="Trapper, Alt"
39/script="
function findZ(x, mean, stdev){ var result = ((x-mean)/stdev); return result}
function normalcdf(X){ var T=1/(1+.2316419*Math.abs(X)); var D=.3989423*Math.exp(-X*X/2); var Prob=D*T*(.3193815+T*(-.3565638+T*(1.781478+T*(-1.821256+T*1.330274)))); if (X>0) { Prob=1-Prob } return Prob }

function strDev() {return d.attribute_stdev(0)}
function agiDev() {return d.attribute_stdev(1)}
function tuffDev() {return d.attribute_stdev(2)}             
function endDev() {return d.attribute_stdev(3)}             
function recDev() {return d.attribute_stdev(4)}             
function disRDev() {return d.attribute_stdev(5)}             
function anaADev() {return d.attribute_stdev(6)}             
function focDev() {return d.attribute_stdev(7)}             
function willDev() {return d.attribute_stdev(8)}             
function creDev() {return d.attribute_stdev(9)}             
function intuDev() {return d.attribute_stdev(10)}             
function patDev() {return d.attribute_stdev(11)}             
function memDev() {return d.attribute_stdev(12)}             
function linADev() {return d.attribute_stdev(13)}             
function spaSDev() {return d.attribute_stdev(14)}             
function musDev() {return d.attribute_stdev(15)}             
function kinSDev() {return d.attribute_stdev(16)}             
function empDev()  {return d.attribute_stdev(17)}             
function socADev(){return d.attribute_stdev(18)}           
                 
function str() {return normalcdf(findZ(d.strength(), d.attribute_mean(0), d.attribute_stdev(0)))}
function agi() {return normalcdf(findZ(d.agility(), d.attribute_mean(1), d.attribute_stdev(1)))}
function tuff() {return normalcdf(findZ(d.toughness(), d.attribute_mean(2), d.attribute_stdev(2)))}
function end() {return normalcdf(findZ(d.endurance(), d.attribute_mean(3), d.attribute_stdev(3)))}
function rec() {return normalcdf(findZ(d.recuperation(), d.attribute_mean(4), d.attribute_stdev(4)))}
function disR() {return normalcdf(findZ(d.disease_resistance(), d.attribute_mean(5), d.attribute_stdev(5)))}
function anaA() {return normalcdf(findZ(d.analytical_ability(), d.attribute_mean(6), d.attribute_stdev(6)))}
function foc() {return normalcdf(findZ(d.focus(), d.attribute_mean(7), d.attribute_stdev(7)))}
function will() {return normalcdf(findZ(d.willpower(), d.attribute_mean(8), d.attribute_stdev(8)))}
function cre() {return normalcdf(findZ(d.creativity(), d.attribute_mean(9), d.attribute_stdev(9)))}
function intu() {return normalcdf(findZ(d.intuition(), d.attribute_mean(10), d.attribute_stdev(10)))}
function pat() {return normalcdf(findZ(d.patience(), d.attribute_mean(11), d.attribute_stdev(11)))}
function mem() {return normalcdf(findZ(d.memory(), d.attribute_mean(12), d.attribute_stdev(12)))}
function linA() {return normalcdf(findZ(d.linguistic_ability(), d.attribute_mean(13), d.attribute_stdev(13)))}
function spaS() {return normalcdf(findZ(d.spatial_sense(), d.attribute_mean(14), d.attribute_stdev(14)))}
function mus() {return normalcdf(findZ(d.musicality(), d.attribute_mean(15), d.attribute_stdev(15)))}
function kinS() {return normalcdf(findZ(d.kinesthetic_sense(), d.attribute_mean(16), d.attribute_stdev(16)))}
function emp() {return normalcdf(findZ(d.empathy(), d.attribute_mean(17), d.attribute_stdev(17)))}
function socA() {return normalcdf(findZ(d.social_awareness(), d.attribute_mean(18), d.attribute_stdev(18)))}

function d_str() {return d.strength()-d.attribute_mean(0)}
function d_agi() {return d.agility()-d.attribute_mean(1)}
function d_tuff() {return d.toughness()-d.attribute_mean(2)}
function d_end() {return d.endurance()-d.attribute_mean(3)}
function d_rec() {return d.recuperation()-d.attribute_mean(4)}
function d_disR() {return d.disease_resistance()-d.attribute_mean(5)}
function d_anaA() {return d.analytical_ability()-d.attribute_mean(6)}
function d_foc() {return d.focus()-d.attribute_mean(7)}
function d_will() {return d.willpower()-d.attribute_mean(8)}
function d_cre() {return d.creativity()-d.attribute_mean(9)}
function d_intu() {return d.intuition()-d.attribute_mean(10)}
function d_pat() {return d.patience()-d.attribute_mean(11)}
function d_mem() {return d.memory()-d.attribute_mean(12)}
function d_linA() {return d.linguistic_ability()-d.attribute_mean(13)}
function d_spaS() {return d.spatial_sense()-d.attribute_mean(14)}
function d_mus() {return d.musicality()-d.attribute_mean(15)}
function d_kinS() {return d.kinesthetic_sense()-d.attribute_mean(16)}
function d_emp() {return d.empathy()-d.attribute_mean(17)}
function d_socA() {return d.social_awareness()-d.attribute_mean(18)}

function findAlternative(x, y){return normalcdf(findZ(x, 0, y))}

totalAttributes=4;

avgMDeviation=
(
(d_agi()*1)+
(d_anaA()*1)+
(d_cre()*1)+
(d_spaS()*1.1)
)/totalAttributes;

avgDev=
(
(
(agiDev()*1)+
(anaADev()*1)+
(creDev()*1)+
(spaSDev()*1.1)
)/totalAttributes
);

findAlternative(avgMDeviation, avgDev)*100;
"
40/name="Close Combat"
40/attributes="1::strength:1.2,agility:1,toughness:1.3,endurance:1,recuperation:0.8,disease resistance:0.8,willpower:0.7,spatial sense:1.1,kinesthetic sense:0.9,focus:0.8"
40/traits=""
40/skills=""
41/name="Close Combat, alt"
41/script="
function findZ(x, mean, stdev){ var result = ((x-mean)/stdev); return result}
function normalcdf(X){ var T=1/(1+.2316419*Math.abs(X)); var D=.3989423*Math.exp(-X*X/2); var Prob=D*T*(.3193815+T*(-.3565638+T*(1.781478+T*(-1.821256+T*1.330274)))); if (X>0) { Prob=1-Prob } return Prob }

function strDev() {return d.attribute_stdev(0)}
function agiDev() {return d.attribute_stdev(1)}
function tuffDev() {return d.attribute_stdev(2)}             
function endDev() {return d.attribute_stdev(3)}             
function recDev() {return d.attribute_stdev(4)}             
function disRDev() {return d.attribute_stdev(5)}             
function anaADev() {return d.attribute_stdev(6)}             
function focDev() {return d.attribute_stdev(7)}             
function willDev() {return d.attribute_stdev(8)}             
function creDev() {return d.attribute_stdev(9)}             
function intuDev() {return d.attribute_stdev(10)}             
function patDev() {return d.attribute_stdev(11)}             
function memDev() {return d.attribute_stdev(12)}             
function linADev() {return d.attribute_stdev(13)}             
function spaSDev() {return d.attribute_stdev(14)}             
function musDev() {return d.attribute_stdev(15)}             
function kinSDev() {return d.attribute_stdev(16)}             
function empDev()  {return d.attribute_stdev(17)}             
function socADev(){return d.attribute_stdev(18)}           
                 
function str() {return normalcdf(findZ(d.strength(), d.attribute_mean(0), d.attribute_stdev(0)))}
function agi() {return normalcdf(findZ(d.agility(), d.attribute_mean(1), d.attribute_stdev(1)))}
function tuff() {return normalcdf(findZ(d.toughness(), d.attribute_mean(2), d.attribute_stdev(2)))}
function end() {return normalcdf(findZ(d.endurance(), d.attribute_mean(3), d.attribute_stdev(3)))}
function rec() {return normalcdf(findZ(d.recuperation(), d.attribute_mean(4), d.attribute_stdev(4)))}
function disR() {return normalcdf(findZ(d.disease_resistance(), d.attribute_mean(5), d.attribute_stdev(5)))}
function anaA() {return normalcdf(findZ(d.analytical_ability(), d.attribute_mean(6), d.attribute_stdev(6)))}
function foc() {return normalcdf(findZ(d.focus(), d.attribute_mean(7), d.attribute_stdev(7)))}
function will() {return normalcdf(findZ(d.willpower(), d.attribute_mean(8), d.attribute_stdev(8)))}
function cre() {return normalcdf(findZ(d.creativity(), d.attribute_mean(9), d.attribute_stdev(9)))}
function intu() {return normalcdf(findZ(d.intuition(), d.attribute_mean(10), d.attribute_stdev(10)))}
function pat() {return normalcdf(findZ(d.patience(), d.attribute_mean(11), d.attribute_stdev(11)))}
function mem() {return normalcdf(findZ(d.memory(), d.attribute_mean(12), d.attribute_stdev(12)))}
function linA() {return normalcdf(findZ(d.linguistic_ability(), d.attribute_mean(13), d.attribute_stdev(13)))}
function spaS() {return normalcdf(findZ(d.spatial_sense(), d.attribute_mean(14), d.attribute_stdev(14)))}
function mus() {return normalcdf(findZ(d.musicality(), d.attribute_mean(15), d.attribute_stdev(15)))}
function kinS() {return normalcdf(findZ(d.kinesthetic_sense(), d.attribute_mean(16), d.attribute_stdev(16)))}
function emp() {return normalcdf(findZ(d.empathy(), d.attribute_mean(17), d.attribute_stdev(17)))}
function socA() {return normalcdf(findZ(d.social_awareness(), d.attribute_mean(18), d.attribute_stdev(18)))}

function d_str() {return d.strength()-d.attribute_mean(0)}
function d_agi() {return d.agility()-d.attribute_mean(1)}
function d_tuff() {return d.toughness()-d.attribute_mean(2)}
function d_end() {return d.endurance()-d.attribute_mean(3)}
function d_rec() {return d.recuperation()-d.attribute_mean(4)}
function d_disR() {return d.disease_resistance()-d.attribute_mean(5)}
function d_anaA() {return d.analytical_ability()-d.attribute_mean(6)}
function d_foc() {return d.focus()-d.attribute_mean(7)}
function d_will() {return d.willpower()-d.attribute_mean(8)}
function d_cre() {return d.creativity()-d.attribute_mean(9)}
function d_intu() {return d.intuition()-d.attribute_mean(10)}
function d_pat() {return d.patience()-d.attribute_mean(11)}
function d_mem() {return d.memory()-d.attribute_mean(12)}
function d_linA() {return d.linguistic_ability()-d.attribute_mean(13)}
function d_spaS() {return d.spatial_sense()-d.attribute_mean(14)}
function d_mus() {return d.musicality()-d.attribute_mean(15)}
function d_kinS() {return d.kinesthetic_sense()-d.attribute_mean(16)}
function d_emp() {return d.empathy()-d.attribute_mean(17)}
function d_socA() {return d.social_awareness()-d.attribute_mean(18)}

function findAlternative(x, y){return normalcdf(findZ(x, 0, y))}

totalAttributes=10;

avgMDeviation=
(
(d_str()*1.2)+
(d_agi()*1)+
(d_tuff()*1.3)+
(d_end()*1)+
(d_rec()*.8)+
(d_disR()*.8)+
(d_will()*.7)+
(d_spaS()*1.1)+
(d_kinS()*.9)+
(d_foc()*.8)
)/totalAttributes;

avgDev=(
(
(strDev()*1.2)+
(agiDev()*1)+
(tuffDev()*1.3)+
(endDev()*1)+
(recDev()*.8)+
(disRDev()*.8)+
(willDev()*.7)+
(spaSDev()*1.1)+
(kinSDev()*.9)+
(focDev()*.8)
)
/totalAttributes);

Math.round(findAlternative(avgMDeviation, avgDev)*100);
"

Update:
  Forgot to apply weights to sdev's... oops.
  Also removed d_can_set_labor references that were throwing stuff off
  This example uses the mean and sdev methods that Splinterz provided vs static ones.
« Last Edit: March 18, 2012, 04:07:30 pm by thistleknot »
Logged

AnnanFay

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1473 on: March 18, 2012, 07:11:04 pm »

I don't know what skills really are yet.  To me they seem a hybrid setup between attributes and labors...

The whole terminology is very confusing.

The black squares on the labours screen in Dwarf Therapist represent the Skill that's associated with the labour. You choose your starting skills not starting labours. (labour = original UK spelling :P)

So you get dwarves with Legendary skills not legendary labours. Some labours don't have skills, hence don't have squares in DT. Labours are groupings of related actions governed by a skill, or skills. Noble positions can pretty much be treated as labours as well.

Edit: I see Professions as completly player defined grouping of related dwarf activites (ie. what your dwarf does). Though there are built in professions which are mapped to the dwarf's highest skill.

I'm not sure if attributes are connected to labours, skills or actions. It could be that different actions within a labour group have different formula using different attributes as far as I know.

Much more SCIENCE needs done!!!!! :D
« Last Edit: March 18, 2012, 07:16:59 pm by AnnanFay »
Logged

brucemo

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

Hi, I have a question about DT.

I'm running with Windows 7, and the "edit script" menu option does nothing.  I made some scripts and saved them.  Now I can't access them.  Where are these scripts stored please?  I've dug through the source code and that was no help.
Logged

plaidman

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1475 on: March 18, 2012, 07:20:48 pm »

I just got a mac computer and wanted to run the mac osx version of Dwarf Fortress and Dwarf Therapist. Also, I wanted to package up the DF files into a single .app file instead of just a set of files. This post doesn't have any questions or anything but I want to document what I learned, in case anybody else wants to do something like this. My apologies if this has already been posted somewhere else. I did some quick searches beforehand but didn't find anything.

PROBLEM:
I want to package DwarfFortress into a .app file, and maintain compatibility with DwarfTherapist.

CONTROL:
First I tested the control, just to be sure. I fired up the non-apped DF, embarked in a world, and fired up DT. Everything works great. I'm able to load dwarfs' skills and change their jobs perfectly.

TEST 1:
Next I packaged up everything into DwarfFortress.app (thanks Google), fired it up, and it works fine. Now to try it with DT... nothing. "Unable to locate a running copy of Dwarf Fortress." is the error message. Why did this happen? Obviously something in DT is looking for a specific process running. What's changed about the installation? I basically just moved it into a different folder!

Note: For those who don't know, osx .app files are basically folders with .app at the end.

OBSERVATION 1:
I figured out that when running DwarfFortress.app, the process is actually called DwarfFortress, regardless of the executable file that gets run inside the .app directory. I also figured out with a bit of intuition that it's looking for a process called dwarfort.exe.

TEST 2:
I changed the DwarfFortress.app folder to dwarfort.exe.app (stupid, I know). Ran it, ran DT, got a different error message: "I don't know how to talk to this version of Dwarf Fortress. Checksum: 0x00000000". A different error message is good; it recognizes that DF is running, but it apparently doesn't recognize the version.

OBSERVATION 2:
With a bit of searching, I found that DT has a config file that has the a checksum of each version of DF, so it knows which version is running and which memory offsets to use. I also learned that it uses the path of the running process to calculate the checksum. Since dwarfort.exe.app is really just a folder, it probably fails and returns 0x00000000 instead of a "real" checksum.

TEST 3:
I opened that config file (DwarfTherapist.app/Contents/MacOS/etc/memory_layouts/osx/v0.34.05.ini) and changed the checksum line to 0x00000000, fire it up and voila, it works perfectly!

OBSERVATION 3:
This worked but it's not ideal. When a new version of DF was released, if we changed that config file to 0x0000000, I believe DT would think it's the older version or crash. Also, we'd want to be able to name the .app file whatever we want. Let's see if we can do that.

TEST 4:
First, I renamed the .app to something a little cleaner (DwarfFortress.app). Next I did a slight modification to DF itself. I added an & at the end of the command that starts the dwarfort.exe process. This made it fire up dwarfort.exe in its own process called - you guessed it - dwarfort.exe! I reverted the config file to have its old checksum. Tested, and everything worked!

OBSERVATION 4:
This was great too, but again not perfect. If you have the .app in the dock and you run it, you'll end up with two icons in the dock - one for DwarfFortress.app and one for dwarfort.exe. Another problem is whenever you update to a new version of DF, you'll have to remember to add that & on the last line of the df file.

CONCLUSION:
We have two solutions: One will potentially give us a duplicate icon on the dock (if you keep the .app there) and the other will require a specific .app name to work. Additionally, both will require us to maintain a file in DT or DF if the versions update.

Ideally, if the dev were to add just two extra config options, we could define the exact exe file on the filesystem to be used for checksumming and we could define the process name to see where the memory chunks start (or however that works). That way we can have the .app called anything we want, and we wouldn't have to start the dwarfort.exe in its own process! In reality, I'm sure it would take far too much work to add these things, so I'm not holding my breath, but a guy can dream...

If you made it this far, I appreciate you sticking with my wall of text. If you have any comments, corrections to any of my assumptions made here, or solutions I might not have thought of please please let me know.
« Last Edit: March 19, 2012, 11:35:31 am by plaidman »
Logged

MarcAFK

  • Bay Watcher
  • [INSANITY INTENSIFIES]
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1476 on: March 18, 2012, 11:04:20 pm »

I have someone who isn't a vampire displaying a different name in Therapist than DF does, Does it make a difference that i have modded humans to be playable? Ingame his name is Casot Ebeakan Carpenter, but in therapist he's Casot Erithdak.
I'm sure he isn't a vampire because he has thoughts about sleeping in the dirt, drinking filthy water, etc.
EDIT: Attempting to make some squads i'm seeing the same thing with someone else.
Logged
They're nearly as bad as badgers. Build a couple of anti-buzzard SAM sites marksdwarf towers and your fortress will look like Baghdad in 2003 from all the aerial bolt spam. You waste a lot of ammo and everything is covered in unslightly exploded buzzard bits and broken bolts.

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1477 on: March 19, 2012, 12:12:00 am »

So my formula's are starting to make sense to splinterz.  I knew I wasn't mad...

It's taken a lot of trial and error, but in theory, what it does is give more weight to deviations from the mean, as well as give a wider spread of %.

Here's a taste of what I've been working on:

Code: [Select]
37/name="Wood cutter"
37/attributes="1::strength:1.1,agility:1.1,endurance:1.1,willpower:0.9,spatial sense:1.2, kinesthetic sense:0.9"
37/traits=""
38/name="Trapper"
38/attributes="1::agility:1,analytical ability:1,creativity:1,spatial sense:1.1"
38/traits=""
38/skills=""
39/name="Trapper, Alt"
39/script="
function findZ(x, mean, stdev){ var result = ((x-mean)/stdev); return result}
function normalcdf(X){ var T=1/(1+.2316419*Math.abs(X)); var D=.3989423*Math.exp(-X*X/2); var Prob=D*T*(.3193815+T*(-.3565638+T*(1.781478+T*(-1.821256+T*1.330274)))); if (X>0) { Prob=1-Prob } return Prob }

function strDev() {return d.attribute_stdev(0)}
function agiDev() {return d.attribute_stdev(1)}
function tuffDev() {return d.attribute_stdev(2)}             
function endDev() {return d.attribute_stdev(3)}             
function recDev() {return d.attribute_stdev(4)}             
function disRDev() {return d.attribute_stdev(5)}             
function anaADev() {return d.attribute_stdev(6)}             
function focDev() {return d.attribute_stdev(7)}             
function willDev() {return d.attribute_stdev(8)}             
function creDev() {return d.attribute_stdev(9)}             
function intuDev() {return d.attribute_stdev(10)}             
function patDev() {return d.attribute_stdev(11)}             
function memDev() {return d.attribute_stdev(12)}             
function linADev() {return d.attribute_stdev(13)}             
function spaSDev() {return d.attribute_stdev(14)}             
function musDev() {return d.attribute_stdev(15)}             
function kinSDev() {return d.attribute_stdev(16)}             
function empDev()  {return d.attribute_stdev(17)}             
function socADev(){return d.attribute_stdev(18)}           
                 
function str() {return normalcdf(findZ(d.strength(), d.attribute_mean(0), d.attribute_stdev(0)))}
function agi() {return normalcdf(findZ(d.agility(), d.attribute_mean(1), d.attribute_stdev(1)))}
function tuff() {return normalcdf(findZ(d.toughness(), d.attribute_mean(2), d.attribute_stdev(2)))}
function end() {return normalcdf(findZ(d.endurance(), d.attribute_mean(3), d.attribute_stdev(3)))}
function rec() {return normalcdf(findZ(d.recuperation(), d.attribute_mean(4), d.attribute_stdev(4)))}
function disR() {return normalcdf(findZ(d.disease_resistance(), d.attribute_mean(5), d.attribute_stdev(5)))}
function anaA() {return normalcdf(findZ(d.analytical_ability(), d.attribute_mean(6), d.attribute_stdev(6)))}
function foc() {return normalcdf(findZ(d.focus(), d.attribute_mean(7), d.attribute_stdev(7)))}
function will() {return normalcdf(findZ(d.willpower(), d.attribute_mean(8), d.attribute_stdev(8)))}
function cre() {return normalcdf(findZ(d.creativity(), d.attribute_mean(9), d.attribute_stdev(9)))}
function intu() {return normalcdf(findZ(d.intuition(), d.attribute_mean(10), d.attribute_stdev(10)))}
function pat() {return normalcdf(findZ(d.patience(), d.attribute_mean(11), d.attribute_stdev(11)))}
function mem() {return normalcdf(findZ(d.memory(), d.attribute_mean(12), d.attribute_stdev(12)))}
function linA() {return normalcdf(findZ(d.linguistic_ability(), d.attribute_mean(13), d.attribute_stdev(13)))}
function spaS() {return normalcdf(findZ(d.spatial_sense(), d.attribute_mean(14), d.attribute_stdev(14)))}
function mus() {return normalcdf(findZ(d.musicality(), d.attribute_mean(15), d.attribute_stdev(15)))}
function kinS() {return normalcdf(findZ(d.kinesthetic_sense(), d.attribute_mean(16), d.attribute_stdev(16)))}
function emp() {return normalcdf(findZ(d.empathy(), d.attribute_mean(17), d.attribute_stdev(17)))}
function socA() {return normalcdf(findZ(d.social_awareness(), d.attribute_mean(18), d.attribute_stdev(18)))}

function d_str() {return d.strength()-d.attribute_mean(0)}
function d_agi() {return d.agility()-d.attribute_mean(1)}
function d_tuff() {return d.toughness()-d.attribute_mean(2)}
function d_end() {return d.endurance()-d.attribute_mean(3)}
function d_rec() {return d.recuperation()-d.attribute_mean(4)}
function d_disR() {return d.disease_resistance()-d.attribute_mean(5)}
function d_anaA() {return d.analytical_ability()-d.attribute_mean(6)}
function d_foc() {return d.focus()-d.attribute_mean(7)}
function d_will() {return d.willpower()-d.attribute_mean(8)}
function d_cre() {return d.creativity()-d.attribute_mean(9)}
function d_intu() {return d.intuition()-d.attribute_mean(10)}
function d_pat() {return d.patience()-d.attribute_mean(11)}
function d_mem() {return d.memory()-d.attribute_mean(12)}
function d_linA() {return d.linguistic_ability()-d.attribute_mean(13)}
function d_spaS() {return d.spatial_sense()-d.attribute_mean(14)}
function d_mus() {return d.musicality()-d.attribute_mean(15)}
function d_kinS() {return d.kinesthetic_sense()-d.attribute_mean(16)}
function d_emp() {return d.empathy()-d.attribute_mean(17)}
function d_socA() {return d.social_awareness()-d.attribute_mean(18)}

function findAlternative(x, y){return normalcdf(findZ(x, 0, y))}

totalAttributes=4;

avgMDeviation=
(
(d_agi()*1)+
(d_anaA()*1)+
(d_cre()*1)+
(d_spaS()*1.1)
)/totalAttributes;

avgDev=
Math.sqrt
(
(
Math.pow((agiDev()*1),2)+
Math.pow((anaADev()*1),2)+
Math.pow((creDev()*1),2)+
Math.pow((spaSDev()*1.1),2)
)
/
totalAttributes
);
findAlternative(avgMDeviation, avgDev)*100;
"
40/name="Close Combat"
40/attributes="1::strength:1.2,agility:1,toughness:1.3,endurance:1,recuperation:0.8,disease resistance:0.8,willpower:0.7,spatial sense:1.1,kinesthetic sense:0.9,focus:0.8"
40/traits=""
40/skills=""
41/name="Close Combat, alt"
41/script="
function findZ(x, mean, stdev){ var result = ((x-mean)/stdev); return result}
function normalcdf(X){ var T=1/(1+.2316419*Math.abs(X)); var D=.3989423*Math.exp(-X*X/2); var Prob=D*T*(.3193815+T*(-.3565638+T*(1.781478+T*(-1.821256+T*1.330274)))); if (X>0) { Prob=1-Prob } return Prob }

function strDev() {return d.attribute_stdev(0)}
function agiDev() {return d.attribute_stdev(1)}
function tuffDev() {return d.attribute_stdev(2)}             
function endDev() {return d.attribute_stdev(3)}             
function recDev() {return d.attribute_stdev(4)}             
function disRDev() {return d.attribute_stdev(5)}             
function anaADev() {return d.attribute_stdev(6)}             
function focDev() {return d.attribute_stdev(7)}             
function willDev() {return d.attribute_stdev(8)}             
function creDev() {return d.attribute_stdev(9)}             
function intuDev() {return d.attribute_stdev(10)}             
function patDev() {return d.attribute_stdev(11)}             
function memDev() {return d.attribute_stdev(12)}             
function linADev() {return d.attribute_stdev(13)}             
function spaSDev() {return d.attribute_stdev(14)}             
function musDev() {return d.attribute_stdev(15)}             
function kinSDev() {return d.attribute_stdev(16)}             
function empDev()  {return d.attribute_stdev(17)}             
function socADev(){return d.attribute_stdev(18)}           
                 
function str() {return normalcdf(findZ(d.strength(), d.attribute_mean(0), d.attribute_stdev(0)))}
function agi() {return normalcdf(findZ(d.agility(), d.attribute_mean(1), d.attribute_stdev(1)))}
function tuff() {return normalcdf(findZ(d.toughness(), d.attribute_mean(2), d.attribute_stdev(2)))}
function end() {return normalcdf(findZ(d.endurance(), d.attribute_mean(3), d.attribute_stdev(3)))}
function rec() {return normalcdf(findZ(d.recuperation(), d.attribute_mean(4), d.attribute_stdev(4)))}
function disR() {return normalcdf(findZ(d.disease_resistance(), d.attribute_mean(5), d.attribute_stdev(5)))}
function anaA() {return normalcdf(findZ(d.analytical_ability(), d.attribute_mean(6), d.attribute_stdev(6)))}
function foc() {return normalcdf(findZ(d.focus(), d.attribute_mean(7), d.attribute_stdev(7)))}
function will() {return normalcdf(findZ(d.willpower(), d.attribute_mean(8), d.attribute_stdev(8)))}
function cre() {return normalcdf(findZ(d.creativity(), d.attribute_mean(9), d.attribute_stdev(9)))}
function intu() {return normalcdf(findZ(d.intuition(), d.attribute_mean(10), d.attribute_stdev(10)))}
function pat() {return normalcdf(findZ(d.patience(), d.attribute_mean(11), d.attribute_stdev(11)))}
function mem() {return normalcdf(findZ(d.memory(), d.attribute_mean(12), d.attribute_stdev(12)))}
function linA() {return normalcdf(findZ(d.linguistic_ability(), d.attribute_mean(13), d.attribute_stdev(13)))}
function spaS() {return normalcdf(findZ(d.spatial_sense(), d.attribute_mean(14), d.attribute_stdev(14)))}
function mus() {return normalcdf(findZ(d.musicality(), d.attribute_mean(15), d.attribute_stdev(15)))}
function kinS() {return normalcdf(findZ(d.kinesthetic_sense(), d.attribute_mean(16), d.attribute_stdev(16)))}
function emp() {return normalcdf(findZ(d.empathy(), d.attribute_mean(17), d.attribute_stdev(17)))}
function socA() {return normalcdf(findZ(d.social_awareness(), d.attribute_mean(18), d.attribute_stdev(18)))}

function d_str() {return d.strength()-d.attribute_mean(0)}
function d_agi() {return d.agility()-d.attribute_mean(1)}
function d_tuff() {return d.toughness()-d.attribute_mean(2)}
function d_end() {return d.endurance()-d.attribute_mean(3)}
function d_rec() {return d.recuperation()-d.attribute_mean(4)}
function d_disR() {return d.disease_resistance()-d.attribute_mean(5)}
function d_anaA() {return d.analytical_ability()-d.attribute_mean(6)}
function d_foc() {return d.focus()-d.attribute_mean(7)}
function d_will() {return d.willpower()-d.attribute_mean(8)}
function d_cre() {return d.creativity()-d.attribute_mean(9)}
function d_intu() {return d.intuition()-d.attribute_mean(10)}
function d_pat() {return d.patience()-d.attribute_mean(11)}
function d_mem() {return d.memory()-d.attribute_mean(12)}
function d_linA() {return d.linguistic_ability()-d.attribute_mean(13)}
function d_spaS() {return d.spatial_sense()-d.attribute_mean(14)}
function d_mus() {return d.musicality()-d.attribute_mean(15)}
function d_kinS() {return d.kinesthetic_sense()-d.attribute_mean(16)}
function d_emp() {return d.empathy()-d.attribute_mean(17)}
function d_socA() {return d.social_awareness()-d.attribute_mean(18)}

function findAlternative(x, y){return normalcdf(findZ(x, 0, y))}

totalAttributes=10;

avgMDeviation=
(
(d_str()*1.2)+
(d_agi()*1)+
(d_tuff()*1.3)+
(d_end()*1)+
(d_rec()*.8)+
(d_disR()*.8)+
(d_will()*.7)+
(d_spaS()*1.1)+
(d_kinS()*.9)+
(d_foc()*.8)
)/totalAttributes;

avgDev=
Math.sqrt
(
(
Math.pow((strDev()  *1.2) ,2) +
Math.pow((agiDev()  *1)   ,2) +
Math.pow((tuffDev() *1.3) ,2) +
Math.pow((endDev()  *1)   ,2) +
Math.pow((recDev()  *.8)  ,2) +
Math.pow((disRDev() *.8)  ,2) +
Math.pow((willDev() *.7)  ,2) +
Math.pow((spaSDev() *1.1) ,2) +
Math.pow((kinSDev() *.9)  ,2) +
Math.pow((focDev()  *.8)  ,2)
)
/
totalAttributes
);

Math.round(findAlternative(avgMDeviation, avgDev)*100);
"

Intrinsic

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1478 on: March 19, 2012, 04:15:34 am »

waffle

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.

Yeah i know it's from the wiki not you ;p some of them just don't make sense though in my mind. For the weights i just 90% on attribs, 10% on skills. I have no other cooks, it was a young embark.

On general weights, i wonder if Toady assigned any importance to specific skills for each profession. Usually he's very detailed when it comes to things like this so maybe he did. Taking the cook as an example, would KS be that important? whereas for a melee soldier/wrestler it should be very important. Should physical vs mental attribs be weighted differently...well i guess we could go on forever and i doubt we'll never know for sure anyways. I think it best just to keep things simple for now :)
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 #1479 on: March 19, 2012, 04:23:03 am »

waffle

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.

Yeah i know it's from the wiki not you ;p some of them just don't make sense though in my mind. For the weights i just 90% on attribs, 10% on skills. I have no other cooks, it was a young embark.

On general weights, i wonder if Toady assigned any importance to specific skills for each profession. Usually he's very detailed when it comes to things like this so maybe he did. Taking the cook as an example, would KS be that important? whereas for a melee soldier/wrestler it should be very important. Should physical vs mental attribs be weighted differently...well i guess we could go on forever and i doubt we'll never know for sure anyways. I think it best just to keep things simple for now :)

yeah i'm not happy with the current method to determine the ratings either, it certainly has some flaws which i'm hoping i can correct using thistleknot's work. since we don't know if any attributes are weighted, the safest bet is just to leave the weighting of individual aspects at 1.0 and just apply a global weight to aspect groups as you did. this is what i intend to do with the default roles i'll have packaged in, as i'm assuming most people will never bother tweaking individual weights.

MarcAFK

  • Bay Watcher
  • [INSANITY INTENSIFIES]
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1480 on: March 20, 2012, 12:00:30 am »

as a chef ill say that kinesthetic sense is basically only needed for not dropping stuff. oh and theres that whole thing where you'e chopping without looking like a boss and kinda don' want to loose a finger.
Logged
They're nearly as bad as badgers. Build a couple of anti-buzzard SAM sites marksdwarf towers and your fortress will look like Baghdad in 2003 from all the aerial bolt spam. You waste a lot of ammo and everything is covered in unslightly exploded buzzard bits and broken bolts.

Kaer Fyzarc

  • Escaped Lunatic
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1481 on: March 20, 2012, 01:49:00 am »

I feel horrible, I had a bit of a cavein accident, one miner died, other one knocked unconscious. Worst thing, one had a baby on the job. 6 days old. Baby survived, but had both legs broken and lower spine broken. The mother was the one knocked unconscious I think, (similar names, is that how it works?), but she just left the baby. Baby crawled all the way back to the dining hall, draging it's broken body along.

Now the problem is DT does not see the baby, It's name is nowhere to be found, my bookkeeper reports 53 dwarfs, DF only 52. Has DF already given up on this broken baby? Surely this baby is not a vampire?
Logged

Intrinsic

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (LATEST 0.6.12 3/6/12 see first post)
« Reply #1482 on: March 20, 2012, 04:46:43 am »

yeah i'm not happy with the current method to determine the ratings either, it certainly has some flaws which i'm hoping i can correct using thistleknot's work. since we don't know if any attributes are weighted, the safest bet is just to leave the weighting of individual aspects at 1.0 and just apply a global weight to aspect groups as you did. this is what i intend to do with the default roles i'll have packaged in, as i'm assuming most people will never bother tweaking individual weights.

Just found this which may be of interest from a FotF post by Toady:

Q: Attributes are supposed to impact performance at various tasks, but according to my testing impact of attributes on quality of products is completely unimportant compared to skill. There is no noticeable difference between "legendary carpenter with a boundless creative imagination" and "legendary carpenter (with average creativity)". Is it intended?

A: It's not intended, but that is how it is, for all attributes and all skills (with some combat related exceptions probably).  In response to the discussion, creativity is an attribute for carpentry and it does effect the roll, but skill outpaces it.  To check, just ran a test - an unskilled, meager creativity dwarf with no other notable atts made 10 lowest quality items, where an unskilled, great creativity dwarf with no other notable atts had 5 come out well-crafted.  Once they are legendary and churning out exceptional goods and masterpieces, it doesn't matter anymore.  I don't want attributes to dominate the game, but I think they should be important even at the highest levels.  It kind of makes me want to split quality into different categories though.


So, i would guess it's similar for all crafting in which case creativity could have more value as an attribute.
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 #1483 on: March 20, 2012, 05:08:32 am »

I feel horrible, I had a bit of a cavein accident, one miner died, other one knocked unconscious. Worst thing, one had a baby on the job. 6 days old. Baby survived, but had both legs broken and lower spine broken. The mother was the one knocked unconscious I think, (similar names, is that how it works?), but she just left the baby. Baby crawled all the way back to the dining hall, draging it's broken body along.

Now the problem is DT does not see the baby, It's name is nowhere to be found, my bookkeeper reports 53 dwarfs, DF only 52. Has DF already given up on this broken baby? Surely this baby is not a vampire?
i wouldn't mind getting my hands on that save to take a look if it's not too much trouble.

Just found this which may be of interest from a FotF post by Toady:

Q: Attributes are supposed to impact performance at various tasks, but according to my testing impact of attributes on quality of products is completely unimportant compared to skill. There is no noticeable difference between "legendary carpenter with a boundless creative imagination" and "legendary carpenter (with average creativity)". Is it intended?

A: It's not intended, but that is how it is, for all attributes and all skills (with some combat related exceptions probably).  In response to the discussion, creativity is an attribute for carpentry and it does effect the roll, but skill outpaces it.  To check, just ran a test - an unskilled, meager creativity dwarf with no other notable atts made 10 lowest quality items, where an unskilled, great creativity dwarf with no other notable atts had 5 come out well-crafted.  Once they are legendary and churning out exceptional goods and masterpieces, it doesn't matter anymore.  I don't want attributes to dominate the game, but I think they should be important even at the highest levels.  It kind of makes me want to split quality into different categories though.


So, i would guess it's similar for all crafting in which case creativity could have more value as an attribute.

that's very interesting. i'll have to make sure that for the default roles i'm giving creativity a heavier weight for craft related roles. in general though it sounds like what was previously mentioned for the general/global weights should be accurate as well. that being skills > traits > attributes for the defaults. it'll still be possible to change that for those who prefer different balancing.

thistleknot

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

Here's an update to my formula, it standardizes all the data first, then apply's weights.

Code: [Select]
Close Combat, alt"
1/script="
function findZ(x, mean, stdev){ var result = ((x-mean)/stdev); return result}
function normalcdf(X){ var T=1/(1+.2316419*Math.abs(X)); var D=.3989423*Math.exp(-X*X/2); var Prob=D*T*(.3193815+T*(-.3565638+T*(1.781478+T*(-1.821256+T*1.330274)))); if (X>0) { Prob=1-Prob } return Prob }

function strDev() {return d.attribute_stdev(0)}
function agiDev() {return d.attribute_stdev(1)}
function tuffDev() {return d.attribute_stdev(2)}             
function endDev() {return d.attribute_stdev(3)}             
function recDev() {return d.attribute_stdev(4)}             
function disRDev() {return d.attribute_stdev(5)}             
function anaADev() {return d.attribute_stdev(6)}             
function focDev() {return d.attribute_stdev(7)}             
function willDev() {return d.attribute_stdev(8)}             
function creDev() {return d.attribute_stdev(9)}             
function intuDev() {return d.attribute_stdev(10)}             
function patDev() {return d.attribute_stdev(11)}             
function memDev() {return d.attribute_stdev(12)}             
function linADev() {return d.attribute_stdev(13)}             
function spaSDev() {return d.attribute_stdev(14)}             
function musDev() {return d.attribute_stdev(15)}             
function kinSDev() {return d.attribute_stdev(16)}             
function empDev()  {return d.attribute_stdev(17)}             
function socADev(){return d.attribute_stdev(18)}           
                 
function str() {return normalcdf(findZ(d.strength(), d.attribute_mean(0), d.attribute_stdev(0)))}
function agi() {return normalcdf(findZ(d.agility(), d.attribute_mean(1), d.attribute_stdev(1)))}
function tuff() {return normalcdf(findZ(d.toughness(), d.attribute_mean(2), d.attribute_stdev(2)))}
function end() {return normalcdf(findZ(d.endurance(), d.attribute_mean(3), d.attribute_stdev(3)))}
function rec() {return normalcdf(findZ(d.recuperation(), d.attribute_mean(4), d.attribute_stdev(4)))}
function disR() {return normalcdf(findZ(d.disease_resistance(), d.attribute_mean(5), d.attribute_stdev(5)))}
function anaA() {return normalcdf(findZ(d.analytical_ability(), d.attribute_mean(6), d.attribute_stdev(6)))}
function foc() {return normalcdf(findZ(d.focus(), d.attribute_mean(7), d.attribute_stdev(7)))}
function will() {return normalcdf(findZ(d.willpower(), d.attribute_mean(8), d.attribute_stdev(8)))}
function cre() {return normalcdf(findZ(d.creativity(), d.attribute_mean(9), d.attribute_stdev(9)))}
function intu() {return normalcdf(findZ(d.intuition(), d.attribute_mean(10), d.attribute_stdev(10)))}
function pat() {return normalcdf(findZ(d.patience(), d.attribute_mean(11), d.attribute_stdev(11)))}
function mem() {return normalcdf(findZ(d.memory(), d.attribute_mean(12), d.attribute_stdev(12)))}
function linA() {return normalcdf(findZ(d.linguistic_ability(), d.attribute_mean(13), d.attribute_stdev(13)))}
function spaS() {return normalcdf(findZ(d.spatial_sense(), d.attribute_mean(14), d.attribute_stdev(14)))}
function mus() {return normalcdf(findZ(d.musicality(), d.attribute_mean(15), d.attribute_stdev(15)))}
function kinS() {return normalcdf(findZ(d.kinesthetic_sense(), d.attribute_mean(16), d.attribute_stdev(16)))}
function emp() {return normalcdf(findZ(d.empathy(), d.attribute_mean(17), d.attribute_stdev(17)))}
function socA() {return normalcdf(findZ(d.social_awareness(), d.attribute_mean(18), d.attribute_stdev(18)))}

function d_str() {return d.strength()-d.attribute_mean(0)}
function d_agi() {return d.agility()-d.attribute_mean(1)}
function d_tuff() {return d.toughness()-d.attribute_mean(2)}
function d_end() {return d.endurance()-d.attribute_mean(3)}
function d_rec() {return d.recuperation()-d.attribute_mean(4)}
function d_disR() {return d.disease_resistance()-d.attribute_mean(5)}
function d_anaA() {return d.analytical_ability()-d.attribute_mean(6)}
function d_foc() {return d.focus()-d.attribute_mean(7)}
function d_will() {return d.willpower()-d.attribute_mean(8)}
function d_cre() {return d.creativity()-d.attribute_mean(9)}
function d_intu() {return d.intuition()-d.attribute_mean(10)}
function d_pat() {return d.patience()-d.attribute_mean(11)}
function d_mem() {return d.memory()-d.attribute_mean(12)}
function d_linA() {return d.linguistic_ability()-d.attribute_mean(13)}
function d_spaS() {return d.spatial_sense()-d.attribute_mean(14)}
function d_mus() {return d.musicality()-d.attribute_mean(15)}
function d_kinS() {return d.kinesthetic_sense()-d.attribute_mean(16)}
function d_emp() {return d.empathy()-d.attribute_mean(17)}
function d_socA() {return d.social_awareness()-d.attribute_mean(18)}

function findAlternative(x, y){return normalcdf(findZ(x, 0, y))}

totalAttributes=10;

avgMDeviation=
(
((d_str()/strDev())*1.2)+
((d_agi()/agiDev())*1)+
((d_tuff()/tuffDev())*1.3)+
((d_end()/endDev())*1)+
((d_rec()/recDev())*.8)+
((d_disR()/disRDev())*.8)+
((d_will()/willDev())*.7)+
((d_spaS()/spaSDev())*1.1)+
((d_kinS()/kinSDev())*.9)+
((d_foc()/focDev())*.8)
)/totalAttributes;

avgDev=
Math.sqrt
(
(
Math.pow(1.2,2)+
Math.pow(1,2)+
Math.pow(1.3,2)+
Math.pow(1,2)+
Math.pow(.8,2)+
Math.pow(.8,2)+
Math.pow(.7,2)+
Math.pow(1.1,2)+
Math.pow(.9,2)+
Math.pow(.8,2)
)
/
totalAttributes
);

Math.round(findAlternative(avgMDeviation, avgDev)*100)"
Pages: 1 ... 97 98 [99] 100 101 ... 192