Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - expwnent

Pages: 1 ... 17 18 [19] 20 21 ... 113
271
There was a fairly recent version in the DFHack thread somewhere. I seem to remember that friendly creatures turn hostile after save/load with that version. I don't have a link, sorry.

272
The idea is to make it so that it works better, including nemesis entries. It just doesn't work yet.

273
https://github.com/DFHack/dfhack/blob/master/Lua%20API.rst#save-init-script

This is also implemented in "vanilla" DFHack. It's open source so you can use whatever you want internally of course. I just wanted to see if there were any features that needed to be pulled into the main project.

275
Oh, is it working now? Are nemesis entries handled? It would be nice to (re?)-add that to DFHack, since a lot of people have asked about it.

taldarus - creating units is not a simple task, largely because DFHack doesn't have access to the code DF uses (and it's unlikely that DF has code to create units from scratch in arbitrary locations in any case).

Can't you use viewscreen_layer_arena_creaturest? It doesn't create hf/nemesis, but seems to do everything else much easier than doing it manually.

I think the current version of the script is at least that functional.

276
Most of the time someone implements something they do a script version. The main insight behind script_environment is that there is no need for people to create a separate script version and library/module version. They can just do it all at once in one file. So instead of having syndrome-util and add-syndrome it's possible to combine those into one script (not currently implemented for backwards compatibility reasons but it will be at some point). Scripts will be loaded only as needed at runtime instead of all at once at the start. Also new in the most recent version is that it no longer recompiles every script just before running it. It only recompiles if necessary, which should greatly improve things.

What problems exactly are you trying to solve with this? I have no idea what you mean by "side show".

It is not a matter of how you do things, it's just that we've worked on similar things and if your way is better then it should be incorporated into DFHack proper.

277
As of the most recent release, DFHack already searches in the raw folder of the current save for scripts. First it searches there, then it searches in df/objects/raw then it searches in hack/scripts. The script_environment function works just as well as modules, but it allows circular dependencies and correctly updates if you unload a save and load a save with a different version of the same script, whereas the module version will not.

278
Posting to watch.

279
Utilities and 3rd Party Applications / Re: Item Syndrome Reborn
« on: July 15, 2015, 02:40:01 am »
Posting to monitor item-trigger error report.

280
DF Suggestions / Re: Customizable Signs/Slabs
« on: July 11, 2015, 01:05:05 am »
This should be possible with DFHack. I'll add it to my list.

281
DF General Discussion / Re: Future of the Fortress
« on: July 09, 2015, 04:18:29 am »
Will I be able to sing songs of my defeated foes mid-battle?
*slaughter this guy*
"I slaughtered this guy!"
*slaughter that guy*
"I slaughtered that guy!"

Note to self: never lose a fight to Wayne Brady.

282
Perhaps followed by "conquer the rest of the fortress, followed by the world"

And then what? Live a life of administration over the whole world? Sounds like a big hassle to me.

283
Posting to watch.

284
Utilities and 3rd Party Applications / Re: DFHack 0.40.24-r3
« 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.

285
DF Suggestions / Re: Where is the Polygamy / Polyandry?
« on: June 29, 2015, 01:10:43 am »
My two cents: there is a noteworthy difference between serial monogamy where marriage is supposed to last until one partner dies and a system where it's understood that the marriage is never intended to be permanent (either until they get bored or until they've raised one set of children, etc).

Pages: 1 ... 17 18 [19] 20 21 ... 113