Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 133 134 [135] 136 137 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1452829 times)

Cardinal

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2010 on: June 25, 2012, 09:32:08 pm »

Has anyone written a script that will allow me to simply retire a fort and then later unretire it? I know the procedure to retire one (change to adventurer, die) and unretire *should work* (go to site, change to Fortress Mode, but all your dwarves need to be swapped to members of the Fortress and so as soon as you unpause, your fortress crumbles--changing dwarf allegiance isn't one of those simple DFHack things) but I'd really love if there was a "retirefort" script and a "unretirefort" script. Or at the very least detailed instructions on how to do it.
Logged
Engraved is an image of a Human and a video game. The Human is making a plaintive gesture.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2011 on: June 26, 2012, 02:26:40 am »

Has anyone written a script that will allow me to simply retire a fort and then later unretire it? I know the procedure to retire one (change to adventurer, die) and unretire *should work* (go to site, change to Fortress Mode, but all your dwarves need to be swapped to members of the Fortress and so as soon as you unpause, your fortress crumbles--changing dwarf allegiance isn't one of those simple DFHack things) but I'd really love if there was a "retirefort" script and a "unretirefort" script. Or at the very least detailed instructions on how to do it.
you can unretire a fort by either just going back to the fort via reclaim it or just use this script which if you select on a citizen will remove the is resident flag on all the citizens.
Slso you don't need to die now when Dfhack had figure out how to get body swap characters to retire in the fort.

so here the return to fort functions I made then remade and ported for 34.10 dfusion I haven't upgraded to 34.11 but I guess there nothing that drastically different between the two.
Code: [Select]
function tools.Zomb(unit)
if unit==nil then
unit=getCreatureAtPos(getxyz())
end
if unit.flags2.resident==true then
unit.flags2.resident=false
end
end
tools.menu:add("Return2fort",tools.Zomb)
function tools.Homb(unit)
if unit==nil then
unit=getCreatureAtPos(getxyz())
end
if unit.flags2.resident==false then
unit.flags2.resident=true
end
end
tools.menu:add("leavefort",tools.Homb)
function tools.Zomb2(unit)
if unit==nil then
unit=getCreatureAtPos(getxyz())
end

for k,v in pairs(df.global.world.units.active) do
if v.civ_id==unit.civ_id then
if v.flags2.resident==true then
v.flags2.resident=false
end
end
end
end
tools.menu:add("Return2fortall",tools.Zomb2)
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

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2012 on: June 26, 2012, 03:37:39 am »

For the attribute points - you can make them mor ethan max_value with vjek's script. They won't be growing by training but that's not a problem:) And the safe max value for this is 32000. Somewhere near 32500 it goes in negative numbers:( But with 32000 of strength your dwarfes easily move most boulders (still gold and platinum is too heave for them).
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2013 on: June 26, 2012, 04:16:46 am »

32767 would be the max, because that's the maximum size of a signed integer.
Logged

Tierre

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2014 on: June 26, 2012, 04:38:33 am »

seems right:) But i am still useing 32000 just to be on the safe side:)
Logged

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2015 on: June 26, 2012, 12:13:50 pm »

Not sure if anyone's posted this before, but if you want a safe way to kill something, use this:

unit=dfhack.gui.getSelectedUnit()
unit.body.blood_count=0

Obviously this only works on creatures that need blood to survive.  For undead, I think that removing the tags that keep them alive despite the shape their body is in might work, especially if followed by the above command.  Sort of an undeath-to-death spell I guess.

For mineral and other unusual material creatures, will need to do more !!SCIENCE!!.

Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2016 on: June 26, 2012, 12:22:25 pm »

Even hacking cannot save you from the towering elephant made of granite. Unless you use dfLiquids of course.
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?

TwilightWalker

  • Bay Watcher
  • Oops.
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2017 on: June 26, 2012, 01:04:49 pm »

Not sure if anyone's posted this before, but if you want a safe way to kill something, use this:

unit=dfhack.gui.getSelectedUnit()
unit.body.blood_count=0

Obviously this only works on creatures that need blood to survive.  For undead, I think that removing the tags that keep them alive despite the shape their body is in might work, especially if followed by the above command.  Sort of an undeath-to-death spell I guess.

For mineral and other unusual material creatures, will need to do more !!SCIENCE!!.

So, for someone who has absolutely no idea on how to use that little snippet, what do I do?
Logged

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2018 on: June 26, 2012, 01:12:34 pm »

It looks like wounds can be added manually, but the challenge is figuring out what type of wound you're adding and what body part you're applying it to.  It might be possible to gray out every body part, which ought to kill even sponges.  Still not sure how that would affect undead, since they don't work the same way.  A universal kill script would probably need to:

1)remove any undead tags
2)drain all blood
3)gray out the head if there is one
4)gray out the body if it's one mass

As for adding neighbors, I have not looked into it, but there is stuff you can do with the world map and region with lua.  At the very least, I'm pretty sure you can toggle biome features like corpse animation.  I'm pretty sure that somewhere there'd be a flag you can toggle to change which neighbors you have.

Check out https://github.com/peterix/df-structures/tree/c381884664c71adefbec44258a734def2c88dacc, especially the map, world, and world data xmls.  Might want to download them and search their contents for keywords pertaining to your goal.

Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2019 on: June 26, 2012, 01:16:26 pm »

Not sure if anyone's posted this before, but if you want a safe way to kill something, use this:

unit=dfhack.gui.getSelectedUnit()
unit.body.blood_count=0

Obviously this only works on creatures that need blood to survive.  For undead, I think that removing the tags that keep them alive despite the shape their body is in might work, especially if followed by the above command.  Sort of an undeath-to-death spell I guess.

For mineral and other unusual material creatures, will need to do more !!SCIENCE!!.

So, for someone who has absolutely no idea on how to use that little snippet, what do I do?

Copy the two lines of script.

Open your text editor of choice.

Paste the text and save as drainblood.lua or whatever name you want, and put it in the scripts folder of your DFhack directory. 

In dwarf mode, you only need to highlight the unit with v.  In adventure mode, you'll need to use l to look at the unit and then select that unit from the a/b/c/d/e list so you're viewing the creature's status screen. 

In the DFhack console, make sure you're in the root menu and not in liquids, dfusion or lua mode.  Type drainblood or whatever name you used for the script.

Nothing will seem to have happened, but the creature will be a corpse as soon as time advances.



Be aware that if you fail to properly select the unit and somehow unit=your adventurer or one of your dwarves from a previous script, this will apply to you or the dwarf instead.
« Last Edit: June 26, 2012, 01:34:43 pm by Makbeth »
Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2020 on: June 26, 2012, 02:05:08 pm »

you could just use this.
Code: [Select]
function tools.frozen(unit)
if unit==nil then
unit=getCreatureAtPos(getxyz())
end
print("which flag")
unit.flags1.projectile=true
end
tools.menu:add("freeze",tools.frozen)

this will freeze them in place until you want to deal with them. though to use this you have to go into your dfusion/tools folder and find the init.lua file.
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

guitarxe

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2021 on: June 26, 2012, 09:04:01 pm »

Hi, I notice that DF2Minecraft command seems to be gone in the current version, but there's no mention of it in the change logs. The last mention of it was in 34.05 where it "came back".
Has this been dropped?
Logged
Feeling down? Click Here!

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2022 on: June 26, 2012, 09:14:28 pm »

I reached the point where it would be more work to update it than to write a new one entirely.
Logged

guitarxe

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2023 on: June 26, 2012, 10:04:55 pm »

Ah. Well, there doesn't seem to be much interest in it, it seems, but I've recently got interested in minecraft again (what with all the new changes) and I'd love to be able to explore my DF forts in minecraft. Heck, maybe even convert some of my friends that see the awesome fort that I made  ;D
Logged
Feeling down? Click Here!

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2024 on: June 27, 2012, 01:17:36 am »

Is the dfusion command working? When I type dfusion into the console I get

Code: [Select]
dfusion/common.lua:45: .Text region not found!
I tried reinstalling DFHack and it didn't change anything.
Logged
Pages: 1 ... 133 134 [135] 136 137 ... 373