Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 256 257 [258] 259 260 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1456912 times)

whitecold

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3855 on: May 26, 2013, 12:58:38 am »

Hi, I have two different problems with DFhack:

The first is regarding the steam engine, I have built a magma-powered one, when I stroke the boiler, the water appears and the little gears on the engine turn, but I can't tap that power. I built 4 gears right beside the ones of the engine, and they won't turn, and there is no other load currently.
Second is regarding stonesense, somehow when I'm in the stonesense window all keyboard input still goes to DF, so I can't toggle anything.

I'm using the mac version, anyone can help me?
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3856 on: May 26, 2013, 01:07:17 am »

The mac stonesense keybinds not working is a known issue. Don't really know hot to fix it either.
Logged

whitecold

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3857 on: May 27, 2013, 12:24:11 am »

Thanks for the answer,

Anyone can help with the engines? I have a huge room with a ton of engines, I really don't want to redesign the whole thing to water reactors.
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3858 on: May 27, 2013, 01:55:35 am »

Did you build the connecting axles and/or gears after the engine, as it says in the readme in big letters?
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3859 on: May 27, 2013, 02:18:57 pm »

Thanks for the answer,

Anyone can help with the engines? I have a huge room with a ton of engines, I really don't want to redesign the whole thing to water reactors.

I have been having...

Yes, I built the gear boxes after the magma steam engine, yes they had enough water/magma.  I had some  partial success by replacing one of the two engine on the gearbox with a normal engine (and then replacing the gearbox).  I was surprised that that allowed the magma version to transfer power too.

What seems to have ultimately worked for me was building the magma engines with iron components (rather than the copper components I was using)

So.. it seems to me that there is a minor bug in the steam engine plugin that either doesn't allow magma steam engines built with copper unsafe materials to provide power during their short lifespan, or that allows them to generate power when a normal steam engine activates the gear.
« Last Edit: May 27, 2013, 03:24:55 pm by Kurik Amudnil »
Logged

CriticallyAshamed

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3860 on: May 28, 2013, 01:20:44 am »

Is there any way to make DF slaughter only animals of a certain fatness/muscle? I'm trying to reduce the number of Skinny/Weak pigs and dogs I have but the autobutcher command seems to just remove everything based on age. Is it possible to do this? Failing that, am I correct in imagining that
      unit.flags2.slaughter=true
will allow me to alttab between hack and df and put my cursor over the units I want gone rather than checking via the unit list, v, c then slaughter?
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3861 on: May 28, 2013, 02:13:12 am »

Is there any way to make DF slaughter only animals of a certain fatness/muscle? I'm trying to reduce the number of Skinny/Weak pigs and dogs I have but the autobutcher command seems to just remove everything based on age. Is it possible to do this? Failing that, am I correct in imagining that
      unit.flags2.slaughter=true
will allow me to alttab between hack and df and put my cursor over the units I want gone rather than checking via the unit list, v, c then slaughter?

Yes, unit.flags2.slaughter=true marks the unit for slaughter and the dwarfs will go ahead and take the job.

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3862 on: May 28, 2013, 07:29:20 am »

It should be simple in principle.  I haven't yet figured out how to have a plugin / script fire an event automatically periodically (or however plugins like autobutcher work), but you should be able to modify autobutcher to create a new plugin that did this.  The most straightforward way I can think of is to check for a threshold on their strength and body fat level.  I believe strength is under unit.body.physical_attrs.strength.value, and fat levels are under unit.body or unit.health somewhere.  I don't have DFHack open at the moment and don't have time to check the df-structures Github.

You'll probably have to toy with the numbers to get the effect you want.  Any strength < 1000 is going to be weak on some level, but I can't remember the fat level numbers.  They range much higher typically, if memory serves.
Logged
Through pain, I find wisdom.

Crashmaster

  • Bay Watcher
  • CARP, Canada's new helth care plan for the elderly
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3863 on: May 28, 2013, 12:15:29 pm »

When painting trees and shrubs with the tiletypes tool I only get generic trees and shrubs which can be felled or gathered but give no logs or plants. Is there a syntax to define the specific plant material? I can make the trees dead and tried messing with the varients but no luck.

eg. ??  paint sh tree, paint m plant:oak   ??

kingubu

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3864 on: May 28, 2013, 01:45:55 pm »

Making a script to tag peafowl for slaughter that are big enough to yield bones.  This is what I got so far.

Code: (slaughter.lua) [Select]
local this = dfhack.gui.getSelectedUnit()
if this.body.blood_max >= 282 then
this.flags2.slaughter = true
end
print(this.body.blood_max)
Code: [Select]
keybinding add Shift-B slaughter
Works fine.  Put the cursor on a dude, big B, if it's large enough, it's tagged.  The actual number is between 285 and 280.  I'm still refining it, just waiting on the next generation to grow up.

My question is, does anyone know when animals grow?  It's been like 3 or 4 months I think and all the remaining birds are stuck at their current size.

Do I have to take them out of a cage for them to grow?  Or does the grow event only fire twice a year or something?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #3865 on: May 28, 2013, 03:45:55 pm »

When painting trees and shrubs with the tiletypes tool I only get generic trees and shrubs which can be felled or gathered but give no logs or plants. Is there a syntax to define the specific plant material? I can make the trees dead and tried messing with the varients but no luck.

eg. ??  paint sh tree, paint m plant:oak   ??
No, there is not, because the tree/shrub type is stored in a completely different object which needs to be created separately, and the tiletypes tool doesn't do any of that for you.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3866 on: May 28, 2013, 05:04:12 pm »

Making a script to tag peafowl for slaughter that are big enough to yield bones.  This is what I got so far.

Code: (slaughter.lua) [Select]
local this = dfhack.gui.getSelectedUnit()
if this.body.blood_max >= 282 then
this.flags2.slaughter = true
end
print(this.body.blood_max)
Code: [Select]
keybinding add Shift-B slaughter
Works fine.  Put the cursor on a dude, big B, if it's large enough, it's tagged.  The actual number is between 285 and 280.  I'm still refining it, just waiting on the next generation to grow up.

My question is, does anyone know when animals grow?  It's been like 3 or 4 months I think and all the remaining birds are stuck at their current size.

Do I have to take them out of a cage for them to grow?  Or does the grow event only fire twice a year or something?

In the script I have been working on, I have been estimating body size based on age and the creature caste body growth scale followed by the height, width, and length body modifiers.  I hadn't noticed that my results for adults closely match (often equal) blood max.  For babies and children though it varies quite a bit, even to the point that my two babies have a greater blood max than many of my children. 

I am inclined to think that perhaps blood_max is not a reliable metric and that it recalculated at need rather than on any particular recurring schedule.

*edit trying to use a pressure plate to see if blood_max would change (induce an update to blood_max) on the premise that blood_max had a relationship to body size, did not have any effect on animals (I would have tested on my dwarf kids but I can't pasture them).  Manualy modified blood_max stayed modified.  I did take the opportunity to use the pressure plate to measure the effectiveness of my body size calculation.  Although I think the plates should work on weight rather than body size, resources suggest body size is the pressure plate trigger for creatures.  For the 2 critters I tested:
Code: [Select]
(blood_max)   (~body size)   (plate trigger size)
8                  61                8                            buck rabbit
2808             1006             3257                       wild boar piglet
« Last Edit: May 28, 2013, 07:18:49 pm by Kurik Amudnil »
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3867 on: May 28, 2013, 05:58:45 pm »

Did the dfhack for version 34.07 have support for lua scripts?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

CriticallyAshamed

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3868 on: May 28, 2013, 08:47:49 pm »

Despite my best intentions to be good at this sort of thing (and work in the field..) I am very inexperienced with code. So far I've devised this but I know it's wrong.

unit=dfhack.gui.getSelectedUnit()
if unit.body.physical_attrs.STRENGTH.value<1200 then
unit.flags2.slaughter=true
else print('unit is not weak')
end

As it is just slaughtering everything. Also, my intentions are to do a global check ala Autobutcher rather than selectedunit. For now, crawling before walking and such. Can someone explain what's wrong here?
Logged

ORCACommander

  • Bay Watcher
  • [ETHIC:TORTURE_ELVES: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3869 on: May 28, 2013, 08:53:32 pm »

Did the dfhack for version 34.07 have support for lua scripts?

yep it can do LUA.
Logged
Pages: 1 ... 256 257 [258] 259 260 ... 373