Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 244 245 [246] 247 248 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 973532 times)

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3675 on: April 30, 2013, 06:39:44 am »

The DFusion commands in DFHack will allow it.  I can't remember the exact sequence, but it's under the DFusion menu inside DFHack.  Just remember to run it before you go to the embark screen.

i cannot find simple_embark in dfhack r3 anywhere.
i think it was removed. if it is still there can you tell me how to find it. its not simple_embark or under the dfusion menu

hope that some one can tell me were to find simple_embark for dfhack r3
simple embark as in embark anywhere or the bit that allows you to alter how many units can spawn on the map simple embark?
because embark anywhere has been converted into a lua script called embark.
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

Trev_lite

  • Bay Watcher
  • Likes the forum for its helpful members
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3676 on: April 30, 2013, 06:41:23 am »

the old dfusion script simple_embark. the one that let you change how many units you start with.
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3677 on: April 30, 2013, 07:25:21 am »

When I try to run the script, I get this error: \Dwarf Fortress\hack\scripts/heal2.lua:2: attempt to call global 'getxyz' (a nil value) stack traceback: \Dwarf Fortress\hack\scripts/heal2.lua2: in function 'heal2' \Dwarf Fortress\hack\scripts/heal2.lua:11: in main chunk (...tail calls...)   When I type ls in the DFhack console, heal2 does show up as a possible command, don't know if that's any help.

Try this instead:

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
end
if unit.caste == 1 then
unit.caste = 0
end
end
heal2()

That will still require you to select a unit with the 'v' or 'k' keys in fort mode (no idea for adventure mode, but 'l' I think).  Again, this won't directly allow you to revive dead things without a reference to the dead unit instead of the dfhack.gui.getSelectedUnit() line.
Logged
Success requires no explanation.  Failure allows none.

drayath

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3678 on: April 30, 2013, 07:47:46 am »

Maklak, try the following version. It definatly works on my machine at least but it has only been tested under windows. If you are getting error writing the file try just export:filename rather than export:c:\path\filename or export:\usr\me\filename, not quite sure how the ruby filename parsing works via wine.

--

Fix: stupid typo that prevented script running (note to self: stop making changes between testing and uploading!!!)
Enh: Various display improvements in html output
New: If only some effects in a syndrome are presently active, inactive effects are marked.

Spoiler (click to show/hide)

For example output www.brightsoft.net/examplesyndromereport.html (only good syndromes in this case which is why they are all green)
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

Mr S

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3679 on: April 30, 2013, 08:45:15 am »

The lack of proper capitalization!  It burns my eyes!   :P

Seriously though, that's an awesome script.  I'll have to start playing with it.  Thanks!
Logged

drayath

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3680 on: April 30, 2013, 12:18:42 pm »

People are never happy  :P

ShowUnitSyndromes.rb v6
Fix: Capitalization, spelling, missing commas and spaces
Fix: Quick code tidy up
Enh: Decode transformation race and caste to nice names.
Enh: Material force multiplier now shows material if the bonus if for a certain type (e.g. werewolf's vs silver)

Spoiler (click to show/hide)

New example showing all syndromes in the world so you can see some of the different types: www.brightsoft.net/examplesyndromereport2.html
« Last Edit: April 30, 2013, 12:43:01 pm by drayath »
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

Imperator314

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3681 on: April 30, 2013, 12:36:56 pm »


Try this instead:

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
end
if unit.caste == 1 then
unit.caste = 0
end
end
heal2()

That will still require you to select a unit with the 'v' or 'k' keys in fort mode (no idea for adventure mode, but 'l' I think).  Again, this won't directly allow you to revive dead things without a reference to the dead unit instead of the dfhack.gui.getSelectedUnit() line.

This script does run, thanks. Now where is df.global.world.units.all located?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3682 on: April 30, 2013, 01:37:47 pm »

New example showing all syndromes in the world so you can see some of the different types: www.brightsoft.net/examplesyndromereport2.html
These look familiar.. seems like I have some work cut out, giving all of them proper names... Would you be willing to write a short readme for this, so I can include it in MasterworkDF?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3683 on: April 30, 2013, 03:07:24 pm »


Try this instead:

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
end
if unit.caste == 1 then
unit.caste = 0
end
end
heal2()

That will still require you to select a unit with the 'v' or 'k' keys in fort mode (no idea for adventure mode, but 'l' I think).  Again, this won't directly allow you to revive dead things without a reference to the dead unit instead of the dfhack.gui.getSelectedUnit() line.

This script does run, thanks. Now where is df.global.world.units.all located?

I would recommend using the dead/missing units list to highlight the intended recipient as dfhack.gui.getSelectedUnit() works from there.  Also, I would change those if statements to
Code: [Select]
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
so that female dwarfs will be regenerated too.

Also, some way to make sure the unit is regenerated in a valid location might be useful as I think that using this script on a dwarf who went swimming in magma would just get incinerated again.  Also dwarfs who became encased in ice or obsidian might have problems if their position is still impassable.
« Last Edit: April 30, 2013, 03:19:25 pm by Kurik Amudnil »
Logged

Imperator314

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3684 on: April 30, 2013, 03:29:28 pm »


Try this instead:

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
end
if unit.caste == 1 then
unit.caste = 0
end
end
heal2()

That will still require you to select a unit with the 'v' or 'k' keys in fort mode (no idea for adventure mode, but 'l' I think).  Again, this won't directly allow you to revive dead things without a reference to the dead unit instead of the dfhack.gui.getSelectedUnit() line.

This script does run, thanks. Now where is df.global.world.units.all located?

I would recommend using the dead/missing units list to highlight the intended recipient as dfhack.gui.getSelectedUnit() works from there.  Also, I would change those if statements to
Code: [Select]
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
so that female dwarfs will be regenerated too.

Also, some way to make sure the unit is regenerated in a valid location might be useful as I think that using this script on a dwarf who went swimming in magma would just get incinerated again.  Also dwarfs who became encased in ice or obsidian might have problems if their position is still impassable.


This script did work. Since she (turns out it was a female dwarf, thanks for that fix) starved to death, location wasn't a problem. However, all of her body parts are gone. Could this have something to do with the fact that her body is sitting in a stockpile, but she resurrected on top of the spot that she died? Right now, all of her body parts are grayed out (missing), and her health status says winded, ability to breathe lost, vision lost, ability to stand lost, ability to grasp lost. Is there a script to replace all of her body parts?
« Last Edit: April 30, 2013, 03:34:25 pm by Imperator314 »
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3685 on: April 30, 2013, 03:46:49 pm »

.. snip ..
Code: [Select]
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
so that female dwarfs will be regenerated too.

This script did work. Since she (turns out it was a female dwarf, thanks for that fix) starved to death, location wasn't a problem. However, all of her body parts are gone. Could this have something to do with the fact that her body is sitting in a stockpile, but she resurrected on top of the spot that she died? Right now, all of her body parts are grayed out (missing), and her health status says winded, ability to breathe lost, vision lost, ability to stand lost, ability to grasp lost. Is there a script to replace all of her body parts?

The missing body parts are the reason for the change to the if statements since the second if statement undid the change of the first one.  what changing the caste here does is make it so that they go through the magical transformation back to themselves like a were creature and regenerate everything.  run the script again with her unit selected and with the if fix and she should regenerate her missing parts.

Another thing I have noticed is that units brought back from the dead with this script won't show up in dwarf therapist
« Last Edit: April 30, 2013, 03:49:28 pm by Kurik Amudnil »
Logged

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3686 on: April 30, 2013, 03:55:39 pm »

Good catch on the if statement, I didn't test it and sure enough that would have caused a problem.

I don't know if the game updates a unit's position as their corpse is hauled around (probably not), and if it doesn't that would mean she'd pop up back where she kicked the bucket.  Having random body parts lying around shouldn't matter, so far as I know.
Logged
Success requires no explanation.  Failure allows none.

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3687 on: April 30, 2013, 04:05:04 pm »

Good catch on the if statement, I didn't test it and sure enough that would have caused a problem.

I don't know if the game updates a unit's position as their corpse is hauled around (probably not), and if it doesn't that would mean she'd pop up back where she kicked the bucket.  Having random body parts lying around shouldn't matter, so far as I know.

True, unit position is not updated by corpse movement.  I tested this on two deaths, one was a military dwarf that wandered too far from the station point and stepped on the rising bridge and was atomized.  He retained his position.  The other was a female baby (the only female death I could test on) who had been stabbed by a snatcher.  Interestingly, her position when resurrected was not where she died, and not at her coffin, but with her mother.  Apparently babies follow their mothers in death as well as in life.

Imperator314

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3688 on: April 30, 2013, 04:12:30 pm »


The missing body parts are the reason for the change to the if statements since the second if statement undid the change of the first one.  what changing the caste here does is make it so that they go through the magical transformation back to themselves like a were creature and regenerate everything.  run the script again with her unit selected and with the if fix and she should regenerate her missing parts.

Another thing I have noticed is that units brought back from the dead with this script won't show up in dwarf therapist

Ah, found the problem. When I modified the script, I pasted the new code in without deleting the old section, so it stopped running before it got to the second part. As for Dwarf Therapist, you were right. Oh well. All she does is sit around in the control room waiting to pull levers and shoot the ballista. Thanks for the help, guys  :)
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3689 on: April 30, 2013, 06:21:34 pm »


The missing body parts are the reason for the change to the if statements since the second if statement undid the change of the first one.  what changing the caste here does is make it so that they go through the magical transformation back to themselves like a were creature and regenerate everything.  run the script again with her unit selected and with the if fix and she should regenerate her missing parts.

Another thing I have noticed is that units brought back from the dead with this script won't show up in dwarf therapist

Ah, found the problem. When I modified the script, I pasted the new code in without deleting the old section, so it stopped running before it got to the second part. As for Dwarf Therapist, you were right. Oh well. All she does is sit around in the control room waiting to pull levers and shoot the ballista. Thanks for the help, guys  :)

I found why they don't show up in Dwarf Therapist.  DT filters out dwarfs who have flags2.killed == true , therefore we can revise the script to add flags2.killed = false so that DT won't filter them.

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
unit.flags2.killed = false
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
end
heal2()
Pages: 1 ... 244 245 [246] 247 248 ... 373