Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFhack Scripts that heal motor nerve damage.  (Read 819 times)

Korgoth

  • Bay Watcher
    • View Profile
DFhack Scripts that heal motor nerve damage.
« on: April 16, 2023, 10:33:59 pm »

Hello my fellow dwarves! :D
 I have a request to make, I would like to know if there is a script for DFhack that enable the healing of nerve damage of a unit, and only the nerve damage.
You see... I truly get my enjoyment from dwarf fortress by playing adventurer mod, hence I like to Roleplay and have long seasons playing the same characters, and sometimes my adventurer gets his tendons cut by some foul beast or some lucky wild dog and loses his ability to grasp, or to even stand on his on.
For roleplay purposes, sometimes I like to use the DFhack Script "full-heal" to heal the character that got his tendons cut, but this script heals the entirety of the unity, hence also making my adventurer pristine clean! Without my battle hardened scars, some teeth or nose that got lost in some battle and I dont want that! I just don't want my adventurer losing his motor nerve autonomy, but I want to keep the scars and whatever else that got cut of from my adventurer on the course of his life.

Thanks in advance for considering my request.
Strike the earth!!!
Logged

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: DFhack Scripts that heal motor nerve damage.
« Reply #1 on: April 16, 2023, 11:01:51 pm »

Hello my fellow dwarves! :D
 I have a request to make, I would like to know if there is a script for DFhack that enable the healing of nerve damage of a unit, and only the nerve damage.
You see... I truly get my enjoyment from dwarf fortress by playing adventurer mod, hence I like to Roleplay and have long seasons playing the same characters, and sometimes my adventurer gets his tendons cut by some foul beast or some lucky wild dog and loses his ability to grasp, or to even stand on his on.
For roleplay purposes, sometimes I like to use the DFhack Script "full-heal" to heal the character that got his tendons cut, but this script heals the entirety of the unity, hence also making my adventurer pristine clean! Without my battle hardened scars, some teeth or nose that got lost in some battle and I dont want that! I just don't want my adventurer losing his motor nerve autonomy, but I want to keep the scars and whatever else that got cut of from my adventurer on the course of his life.
So, I would like to know if there is someone with knowledge on the subject, and I would also appreciate any syndrome or interactions made by the community addressing the topic discussed by this thread, like reactions in adventurer mode for making healing potion, interactions making possible to heal the adventurer and etc.
Thanks in advance for considering my request.
Strike the earth!!!

This sounds like it might be better to add options to “full-heal”.  Maybe rename it heal while we’re at it.

For example:

Code: [Select]
heal —full                        Original behavior.

heal —by-type <TOKEN>           Heals the specified type of tissue.

,etc.
Logged
Really hoping somebody puts this in their signature.

Korgoth

  • Bay Watcher
    • View Profile
Re: DFhack Scripts that heal motor nerve damage.
« Reply #2 on: April 17, 2023, 01:56:22 pm »

Thank you for your reply, my friend!
So, this is the full script from "Full-heal"
Spoiler (click to show/hide)

Reading more carefully and also abinding by your sugestion, three specific parts caught my attention in the script, this one right here:

Spoiler (click to show/hide)

This one being the one that I think is tha part that is causing the scars to disappear from my character? Do I simply delete from the script?

The second one:

Spoiler (click to show/hide)

This one being responsible for the healing of the nerves, assuming that "unit.flags.calculated nerves = false" is the responsible for that, also would like to know if "unit.flags2.calculated_bodyparts = false" means the healing of lost limbs, if so, do I have to wright "true" instead of "false"?.

and the last one:

Spoiler (click to show/hide)
And this one right here I'm guessing that also is responsible for the healing of lost limbs because of the "comp.layer status[in].whole = 0 -- severed, leaking layers (Urist Da Vinci)" in that case I don't know what to change in that sentence, and the last part " for _, status in ipairs(unit.body.components.body_part status) do status.missing = false" That I think putting "true" might solve the problem?
I know nothing about programming, so It's like a shot in the dark here  :D
Any suggestions?.
« Last Edit: April 17, 2023, 01:59:20 pm by Korgoth »
Logged