Bay 12 Games Forum

Please login or register.

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

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

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2925 on: July 06, 2015, 04:38:23 am »

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.

Very interesting! Thank you.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2926 on: July 06, 2015, 11:17:23 am »

Pretty sure just dfhack.matinfo.find(hiddenGem_list[GetLayerMat(pos)]).material.state_name.Solid would work
I was pretty sure there was a more efficient way to summon the name, but what you saw reflected the path I followed to find it.  And it has twice as many dots as your way ;)
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

ChairmanPoo

  • Bay Watcher
  • Send in the clowns
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2927 on: July 07, 2015, 12:13:43 pm »

How do you install this thing again?
Logged
There's two kinds of performance reviews: the one you make they don't read, the one they make whilst they sharpen their daggers
Everyone sucks at everything. Until they don't. Not sucking is a product of time invested.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2928 on: July 07, 2015, 12:41:50 pm »

First post:
How to install DFHack:
  • First, get the archive meant for your system. Extract the contents into your DF folder.
  • On Windows, you're ready to use DFHack. An extra command line window should appear when you run DF.
  • On Linux, use the 'dfhack' script from a terminal to run DF with DFHack. If you have stonesense problems, you might have to get your own allegro 5 libraries and delete the ones in stonesense/deplibs.
(The "Linux" instructions apply to OS X too.)
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.

TheFlame52

  • Bay Watcher
  • Master of the randomly generated
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2929 on: July 12, 2015, 05:41:31 pm »

Where can I trigger rage in gm-editor?

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2930 on: July 12, 2015, 06:56:09 pm »

Where can I trigger rage in gm-editor?
It depends on your tolerance for meat-and-potatoes interfaces.  I get most enraged when dealing with the bits about materials...

Oh you meant for an in-game creature?  I'd like to know the answer to that, too.
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

TheFlame52

  • Bay Watcher
  • Master of the randomly generated
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2931 on: July 12, 2015, 07:46:20 pm »

Yeah, in-game. I want to see if an angry GCS will web when a calm one will not.

Atomic Chicken

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2932 on: July 13, 2015, 05:35:36 am »

Where can I trigger rage in gm-editor?
Select the unit, open gm-editor, select "counters".
Set "soldier_mood" to 1 (Enraged)
Now enter a value for "soldier_mood_countdown" to determine how long the rage will last (each figure is equal to one tick, if I remember correctly).
Logged
As mentioned in the previous turn, the most exciting field of battle this year will be in the Arstotzkan capitol, with plenty of close-quarter fighting and siege warfare.  Arstotzka, accordingly, spent their design phase developing a high-altitude tactical bomber. 

TheFlame52

  • Bay Watcher
  • Master of the randomly generated
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2933 on: July 13, 2015, 07:32:15 am »

thanks

tahu16

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2934 on: July 13, 2015, 09:44:34 am »

Hello! I'm not sure that this is the right place to report this bug, but still, here is my problem:
Any time when I'm using one of the "rendermax" commands, the game instantly crashes in fortress mode, right after I press ENTER in the DFHack window(or after I enter in the fortress mode). I'm not using any mods. Do I have any hope to use this command?

https://github.com/DFHack/dfhack#rendermax

Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2935 on: July 13, 2015, 10:13:45 am »

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.

tahu16

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2936 on: July 13, 2015, 11:32:30 am »

I forgot to say: I use 40_24 Starter Pack r13 whit Phoebus tileset.
Yes: I'm using TwbT.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2937 on: July 13, 2015, 11:48:03 am »

TwbT breaks rendermax, unfortunately (and several other plugins as well).
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.

tahu16

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2938 on: July 13, 2015, 11:54:24 am »

I replaced [PRINT_MODE:TwbT] whit [PRINT_MODE:STANDARD] just as you said in the original thread of the mod. Now it works.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2939 on: July 24, 2015, 05:52:38 am »

hmm is it possible to say send an attack to a spawn unit for the purpose of copying that attack and sending that unit to attack to a far away opponent by teleporting it?
if you need to be adjacent to the opponent you want to mega punch then it should be possible to send a dummy unit to do the blow for you then delete the unit after the assault. 
« Last Edit: July 24, 2015, 05:56:24 am by Rumrusher »
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
Pages: 1 ... 194 195 [196] 197 198 ... 360