Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 193 194 [195] 196 197 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1124181 times)

kane_t

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2910 on: July 01, 2015, 02:36:59 pm »

I guess this is the thread for research?  If so, I think I found something that doesn't seem to be mentioned anywhere else.  Is the connection between the Recuperation attribute and dwarf obesity widely known?

I was trying to figure out why most of my starting dwarves had gotten severely obese by a couple years into the game, and had assumed it had something to do with all the lavish meals I was feeding them, so I looked around to see if there was any information on how weight gain works in Dwarf Fortress, and couldn't find anything.

I did a bit of research myself with dfhack, and found that the answer is that most of my starting dwarves have poor Recuperation.  While mining on a full stomach, a particular dwarf with 800 Recuperation will actually gain around 300 stored_fat every 150 ticks; the exact same dwarf with their Recuperation changed to 2200 will lose 1000 stored_fat every 150 ticks.  I strongly suspect that Recuperation determines a Dwarf's target stored_fat, and their weight loss/gain is modified to keep them near that target value.

A dwarf's job doesn't seem to impact this at all.  Miners who work flat out for years will still be fat if they have low Recuperation, while completely sedentary nobles will still be thin if they have high Recuperation.  And the game doesn't seem to differentiate types of food, either.

In case anyone finds it useful for testing, here's the script I used to monitor changes to dwarves' weight:
Code: [Select]
local utils = require 'utils'

validArgs = validArgs or utils.invert({ 'unit' })
local args = utils.processArgs({...}, validArgs)

local unit = nil

if args.unit and tonumber(args.unit) then
unit = df.unit.find(tonumber(args.unit))
else
print('No unit selected')
return
end

if unit == nil then print('Bad unit ID') return end

lastWeights = lastWeights or {}
local previousWeight = lastWeights[tonumber(args.unit)] or nil
local currentWeight = unit.counters2.stored_fat
lastWeights[tonumber(args.unit)] = currentWeight

local output = dfhack.TranslateName(dfhack.units.getVisibleName(unit)) .. ': weight=' .. currentWeight
if previousWeight ~= nil then output = output .. ' (' .. (currentWeight - previousWeight) .. ')' end
output = output .. ' job='
if unit.job.current_job == nil then
output = output .. 'No Job'
else
output = output .. dfhack.job.getName(unit.job.current_job)
end

output = output .. ' content=' .. unit.counters2.stomach_content .. ' food=' .. unit.counters2.stomach_food

print(output)

Takes a unit ID and prints their weight, stomach_content, and stomach_food, as well as the weight change since the script was last called for that unit.  Works well with the repeat script set to a tick interval.
« Last Edit: July 01, 2015, 02:47:59 pm by kane_t »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2911 on: July 01, 2015, 06:40:17 pm »

Well that's a fascinating discovery belarded with hanging sacks of neat.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2912 on: July 01, 2015, 07:17:05 pm »

...So recuperation is somewhat of a metabolism stat? Huh.

kane_t

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2913 on: July 01, 2015, 07:48:15 pm »

...So recuperation is somewhat of a metabolism stat? Huh.

It would appear so!  I had to put my current fort on hold for a few days, but when I get back to it on the weekend I'm going to set each of my starting dwarves to a different Recuperation value, and see if after a few months the stored_fat values they've settled on form a nice line.  That should either verify or disprove my theory that Recuperation is the main thing that determines a dwarf's weight.

Oddly enough, I also checked Immoderation, to see if it was related, but there's no correlation in my fort between Immoderation and fatness.  Either that personality trait doesn't currently influence dwarves to gluttony, or the effect of Recuperation dominates the effect of overeating.  For the record, from what I can tell every meal and drink adds ~50,000 to a dwarf's stomach_contents, and that seems to always reduce by 750 per 150 ticks (5 per tick).
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2914 on: July 01, 2015, 09:27:14 pm »

wait is it possible to dfhack 2 civs into a war?
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

someone12345

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2915 on: July 03, 2015, 02:19:04 am »

How do you work at a building with advfort? I have made a workshop, but do not know how to perform reactions in it.
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2916 on: July 03, 2015, 04:08:02 am »

Hit tab?
Logged

someone12345

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2917 on: July 03, 2015, 04:35:34 am »

It does nothing except cause Site:Ilolum to show up in the top left corner, below the line discussing the job (R CarveFortification T).
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2918 on: July 03, 2015, 09:42:13 am »

When you stand in the workshop it doesn't add Tab to open workshop window to the right of the job selection (R stuff T) line?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2919 on: July 03, 2015, 09:58:22 am »

It does nothing except cause Site:Ilolum to show up in the top left corner, below the line discussing the job (R CarveFortification T).
Are you using TwbT?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

someone12345

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2920 on: July 04, 2015, 01:50:03 am »

Yes, I am using TWBT. I know that causes a black screen, but advfort still works, as I was able to dig and build the workshop.
Logged
GENERATION 26:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experime

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2921 on: July 04, 2015, 07:53:43 am »

 that would explain it as Advfort boots up a menu which might break TWBT transparency settings, guessing from your scenario.
though on the subject of Advfort how far are we with jobs that we can tell a unit in adventurer mode to repeatly do a job forever?
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2922 on: July 04, 2015, 05:01:22 pm »

I can't help but picture some horrific adventurer-children child labor camp involving cats and bone extraction.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2923 on: July 05, 2015, 08:58:19 pm »

Just had a chuckle at one of the snippets in the script I'm forging at the moment.  The Rube-Goldbergness of it is positively Dwarven.

df.global.world.raws.inorganics[dfhack.matinfo.find(hiddenGem_list[GetLayerMat(pos)]).index].material.state_name.Solid

It's really that complicated to get the name of a mineral?  This game has a Mandelbrot fractal quality to it, that it feel Dwarven at any scale from overview to microscopic.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2924 on: July 05, 2015, 10:16:02 pm »

Just had a chuckle at one of the snippets in the script I'm forging at the moment.  The Rube-Goldbergness of it is positively Dwarven.

df.global.world.raws.inorganics[dfhack.matinfo.find(hiddenGem_list[GetLayerMat(pos)]).index].material.state_name.Solid

It's really that complicated to get the name of a mineral?  This game has a Mandelbrot fractal quality to it, that it feel Dwarven at any scale from overview to microscopic.

Pretty sure just dfhack.matinfo.find(hiddenGem_list[GetLayerMat(pos)]).material.state_name.Solid would work
Logged
Pages: 1 ... 193 194 [195] 196 197 ... 360