Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 164 165 [166] 167 168 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1407965 times)

Box

  • Bay Watcher
  • [VERMINHUNTER]
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2475 on: November 02, 2012, 11:11:05 pm »

Is there any way at all to use dfusion or dfhack to fool the game into thinking I have 80 dwarves so I qualify for invasions?

I just learned I can't be invaded without 80 dwarves but I want to try and take on invasions using only 20 or so, and I've already carved out a fort prepped for them.  Would I really have to regenerate my entire world and edit some kind of civ tag just to be invaded at that point?
Logged
You should come inside the box.

Then you'll know what I mean.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2476 on: November 02, 2012, 11:25:55 pm »

oh I just rez units by finding where they died, or just make a rez by checking all active units if they have the dead flag on.
oh wait that's my post here's the new ressurect code.

Code: [Select]
function tools.heal2(unit)
if unit==nil then
unit=getCreatureAtPos(getxyz())
end
unit.body.wounds:resize(0) -- memory leak here :/
unit.body.blood_count=unit.body.blood_max
--set flags for standing and grasping...
unit.status2.able_stand=4
unit.status2.able_stand_impair=4
unit.status2.able_grasp=4
unit.status2.able_grasp_impair=4
--should also set temperatures, and flags for breath etc...
unit.flags1.dead=false
unit.flags2.calculated_bodyparts=false
unit.flags2.calculated_nerves=false
unit.flags2.circulatory_spray=false
unit.flags2.vision_good=true
unit.flags2.vision_damaged=false
unit.flags2.vision_missing=false
unit.flags2.breathing_good=true
unit.counters.winded=0
unit.counters.unconscious=0
for k,v in pairs(unit.body.components) do
for kk,vv in pairs(v) do
v[kk]=0
end
end
end
tools.menu:add("heal2",tools.heal2)

the issue was the kk,vv in the old code was broken.
though this is also good for healing units also just that to revive any one you need to know where they died last.

Instead of causing a memory leak with unit.body.wounds:resize(0), you could go into the wounds structure and zero some of the specific items (but leave the wounds in place), which would leave the wounds as harmless scars (or even have them vanish later due to deallocation and garbage collection). This might have to wait until the next dfhack version or update though, as the wounds structure was only recently documented.
I think this could be possible in Dfusion/dfhack now, I just posted an modern version of the heal command because the one the guy was referencing was really outdated.
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

Aerval

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2477 on: November 03, 2012, 10:17:11 am »

Rumrusher, do you have a collection of your various dfusion skripts (and techniques) ? I know you post them from time to time on the forum but I can't find them when I need them.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2478 on: November 03, 2012, 12:17:19 pm »

well I keep a large collection of them in the dfusion thread though I could drop a pastebin of my recent folder.
though its filled with stuff that might break your game due to either I was testing something or I half way work on something, or use an modified common.lua.
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

Aerval

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2479 on: November 03, 2012, 02:24:58 pm »

Okay, that was the point I was asking for: Whether you have kept your scripts in a way that would allow other players to run them out of the box without much figuring out on their own, just like normal dfhack plugins. But in this case, never mind. Nevertheless many thanks for sharing them occasionally (and your sig)
Logged

Lopezruy

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2480 on: November 03, 2012, 09:56:46 pm »

Okay so, I am trying to install scripts for DFHack, but it won't load up the scripts. I've tried reload PLUGIN and reload all. Help?
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2481 on: November 04, 2012, 02:36:40 am »

oh and all the scripts are for Dfusion and you need to dump them into the tools folder.
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

danaris

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2482 on: November 04, 2012, 09:25:15 am »

Okay so, I am trying to install scripts for DFHack, but it won't load up the scripts. I've tried reload PLUGIN and reload all. Help?

What, exactly, are you trying, and what, exactly, is it telling you when you do?
Logged

Tharg

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2483 on: November 04, 2012, 02:15:54 pm »

I'm trying to get autobutcher to work but no luck.  This is in my Workflow.txt :

Code: [Select]
autobutcher unwatch all
autobutcher forget all
autobutcher noautowatch
autobutcher stop

autobutcher target 2 2 10 2 CAVY PIG
autobutcher target 5 2 20 2 SHEEP
autobutcher target 0 0 0 0 RABBIT
autobutcher watch CAVY PIG SHEEP RABBIT
autobutcher start

but

Code: [Select]
[DFHack]# autobutcher list
Autobutcher status: not enabled, noautowatch, sleep: 6000
Default setting for new races: fk=50 mk=50 fa=50 ma=50
The autobutcher race list is empty.

If I change the script to

Code: [Select]
autobutcher unwatch all
autobutcher forget all
autobutcher noautowatch
autobutcher stop
autobutcher start
autobutcher target 2 2 10 2 CAVY PIG
autobutcher target 5 2 20 2 SHEEP
autobutcher target 0 0 0 0 RABBIT
autobutcher watch CAVY PIG SHEEP RABBIT

I get

Code: [Select]
[DFHack]# autobutcher list
Autobutcher status: not enabled, noautowatch, sleep: 6000
Default setting for new races: fk=50 mk=50 fa=50 ma=50
Races on autobutcher list:
watched: PIG fk=2 mk=2 fa=10 ma=2
watched: CAVY fk=2 mk=2 fa=10 ma=2
watched: SHEEP fk=5 mk=2 fa=20 ma=2
watched: RABBIT fk=0 mk=0 fa=0 ma=0

and nothing is butchered.

Oddly, if I try the example

Code: [Select]
autobutcher target 0 0 0 0 new
autobutcher autowatch
autobutcher start

I get

Code: [Select]
[DFHack]# autobutcher list
Autobutcher status: not enabled, autowatch, sleep: 6000
Default setting for new races: fk=0 mk=0 fa=0 ma=0
Races on autobutcher list:
watched: GIANT_KEA fk=0 mk=0 fa=0 ma=0
watched: BIRD_PEAFOWL_BLUE fk=0 mk=0 fa=0 ma=0
watched: PIG fk=0 mk=0 fa=0 ma=0
watched: SHEEP fk=0 mk=0 fa=0 ma=0
watched: CAT fk=0 mk=0 fa=0 ma=0
watched: BIRD_GUINEAFOWL fk=0 mk=0 fa=0 ma=0
watched: DOG fk=0 mk=0 fa=0 ma=0
watched: RABBIT fk=0 mk=0 fa=0 ma=0
watched: CAVY fk=0 mk=0 fa=0 ma=0
watched: MINK fk=0 mk=0 fa=0 ma=0
watched: GIANT_BARN_OWL fk=0 mk=0 fa=0 ma=0
watched: BIRD_TURKEY fk=0 mk=0 fa=0 ma=0

But everything is market for slaughter

I have the top Windows version of dfhack from here :

https://github.com/peterix/dfhack/downloads

Looking back a few pages in this thread I see this linked :

https://github.com/angavrilov/dfhack/commit/6fefd0907281b41bbcbe27df1bea113ab8c46c1b

which seems to be what I need ... But I don't know if it's included in what I have, or if not, how to add it.

Thanks in advance for any help! 

dfhack has been very useful, I have most of my workshop production automated nicely.  As a future feature request, how about auto-rotate-war training?  So I can somehow select, say, 30 dwarves and then have them each train a different dog.
Logged

T86g

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2484 on: November 04, 2012, 04:51:44 pm »

If you use version 0.34.11-r2 (posted in this thread) the patch is not yet included. If you compiled dfhack from the repository (yourself), it should be included.


How is it possible to process plants (to bag, barrel, vial)? Commands like
Code: [Select]
workflow count LEAVES//BUSH_QUARRY 1000
workflow count POWDER_MISC//MUSHROOM_CUP_DIMPLE:MILL 1000
are accepted, but the no jobs are found. Producing thread from pig tails (THREAD) works fine.

Thank you for your help!
And thank you for dfhack. Especially workflow and autobutcher are great tools.
Logged

Tharg

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2485 on: November 04, 2012, 05:07:31 pm »

If you use version 0.34.11-r2 (posted in this thread) the patch is not yet included. If you compiled dfhack from the repository (yourself), it should be included.

Thanks!  Guess I'll be trying to get that to work ...

How is it possible to process plants (to bag, barrel, vial)? Commands like
Code: [Select]
workflow count LEAVES//BUSH_QUARRY 1000
workflow count POWDER_MISC//MUSHROOM_CUP_DIMPLE:MILL 1000
are accepted, but the no jobs are found. Producing thread from pig tails (THREAD) works fine.

Thank you for your help!
And thank you for dfhack. Especially workflow and autobutcher are great tools.

For the quarry bushes You have to select the workshop and do :

Code: [Select]
job item-material 1 BUSH_QUARRY
which I think locks the material to the workshop.  Then you can do, e.g,

Code: [Select]
workflow count LEAVES//BUSH_QUARRY:LEAF 50 10
Might be a similar story with the powder.
Logged

T86g

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2486 on: November 04, 2012, 05:25:40 pm »

Thank you, this worked!
Logged

Tharg

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2487 on: November 04, 2012, 07:46:40 pm »

Thank you, this worked!

And thank you also, I managed to build dfhack with the butcher fix, it seems. 

I could have done something wrong but it seems to me that the latest on

https://github.com/peterix/dfhack

that I got with git did not have the fix in.  So I edited the zone.cpp file as per the other link, and now all seems good.  I think this is the first time I've ever managed to build anything successfully on windows.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2488 on: November 04, 2012, 07:55:50 pm »

Is there a way to have announcements in the gamelog.txt activate plugins and such? (Just in case I feel like coming up with something good later)

EDIT: And by that I mean have a plugin running that will do something when a certain announcement shows up, of course.
« Last Edit: November 04, 2012, 09:18:18 pm by Putnam »
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2489 on: November 05, 2012, 10:17:10 am »

Yes. Even a few things that don't visibly show up in the announcements show up in the announcements data structure. You can make something that's triggered by any dwarf standing up, if you want.
Logged
Pages: 1 ... 164 165 [166] 167 168 ... 373