Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Creature that heals ??  (Read 1149 times)

Axecleaver

  • Bay Watcher
    • View Profile
Creature that heals ??
« on: December 02, 2010, 06:12:11 am »

There's one creature that I really want to see in DF. And I'm willing to learn modding to make it happen. However, I seriously doubt that it's possible to do this:

Strange Blob - Blob type creature (no head or limbs) that attacks by either enveloping target, or coating it in goo, enzymes, or some sort of gas (i.e., whatever is possible to code). This does not directly damage target. However, target is stunned or passes out for a number of turns. (Instead of taking damage, perhaps target becomes dehydrated, hungry and/or nauseous?) As a side effect, it mutates the target, which HEALS all damage (including spine, brain, organs, & bones) and randomly does one of the following:

* Adds an extra finger to a random hand, with a max of 8 per hand
* Adds an extra toe to a random foot, with a max of 8 per foot
* Adds an extra eye, with a max total of 7 eyes in total
* Adds an extra arm, with a max total of 4 arms
* Adds an extra leg, with a max total of 3 legs
* Switches gender

After this, the creature becomes friendly and leaves the target stunned or unconscious, vulnerable to attack by others.

Note 1: I'd prefer that when it heals target, it does not automatically regenerate lost body parts. That's what's random. And it won't regenerate some parts, such as the nose... But I'd be flexible if this could work.

Note 2: This creature is inspired by the Weird Fume in Ragnarok, a cool DOS roguelike.

Axecleaver

  • Bay Watcher
    • View Profile
Re: Creature that heals ??
« Reply #1 on: December 02, 2010, 06:13:49 am »

I've done a little reading about modding, but I don't know much yet. However, from what I've seen so far, I can't see how it would be possible to do things like add a limb or body part, nor do I see how it could possibly check whether the maximum fingers/eyes/limbs was reached and would not add more. To get around some obstacles, I'd be willing to split it into separate creatures, but I doubt that would solve much.

As it is, I'm guessing I'd be lucky just to find a way to have a creature heal or switch gender as an attack. As for the former, all I could find was a method to manually alter files, cheating to heal:

2010 Mod-to-Heal

In the older versions, you could edit the body_default.txt and it would instantly heal your dwarves of their wounds. Is that no longer possible?

you or someone else can retry the same way but you have to go into the save folder files because the raws are copied into the saves on world creation.

Simple Healing Utility

1. Get a dwarf injuries location ( Let say its the left arm. )
2. Save
3. Go in raw/object and open both body_Default.txt and Creature_Standard.txt
4. In the line [BODY:HUMANOID:2EYES:2EARS:NOSE:2LUNGS:HEART:GUTS:ORGANS:HUMANOID_JOINTS:THROAT:NECK:SPINE:BRAIN:5FINGERS:5TOES:MOUTH]
5. Find out what may include the left arm ( Ill help you here its in the HUMANOID 1st after body.
---To find out what body part are include in each *Entry* simply search the right entry in the body_default.txt
6. Remove the left arm tag in the Humanoid Entry
7. Save file
8. Fire game/Load game/Save game
9. Rinse/Repeat

AFAIK, it doesn't matter what you remove; I delete the NOSE from the dwarven BODY tag, and it heals all wounds, spines, hearts, eyes, what have you. My procedure, to be perfectly clear:
1. Open and edit raw file, in this case creatures_standard.txt. Find the [BODY:PARTS] section. Remove any part you like.
2. Open DF and load game. Immediately on loading, save and quit.
3. Return raw file to previous condition. Save file, return to business.

The way i see it ( would be great if toady could confirm or infirm it ) is that body part in the entity file is an array store with the *character information* for each *entity* present. So if you remove an entry in the array it reset the whole array to default value ( Wich is undamaged/no-wound whatever ).

Game load read the *character information* apply the information your set. But what if the game while loading get information about nose from savefile, but the raw file doesnt have nose the game dont know what to do with null-reference but instead of crashing a safe-guard exist and apply the new raw-file bodypart array (just like when it create a new *character* with default) instead of the corrupted information wich ould lead to crash.

What jocan2003 says here at the bottom seems like a good theory on how it works. But such a proceedure would not help much with what I'm trying to do, would it?

I thought of how some weapons and natural attacks can sever a limb. But I suspect that studying the mechanics of this would not help with adding limbs. Then again, if I could find a way to have a creature trigger the "body damage array" reset for creature or character, that would at least accomplish the healing and regeneration of all limbs.

Thoughts? Suggestions? Is my dream creature hopeless?

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Creature that heals ??
« Reply #2 on: December 02, 2010, 08:16:46 am »

This isn't currently possible though when transformation and/or positive syndromes get added it might work.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Lancensis

  • Bay Watcher
    • View Profile
Re: Creature that heals ??
« Reply #3 on: December 02, 2010, 12:02:00 pm »

The list of things a syndrome can do is limited, and hardcoded. http://df.magmawiki.com/index.php/Syndrome

If you want something mutagenic, you could have body parts swell, rot off, or blister (no biblical boils, I'm afraid) or turn a dwarf into a vomit, or pus spewing monster. I don't know how numbness functions; maybe you could make a creature numb to pain with it which could be considered an advantage, however meagre. Apart from that attacks are generally limited to smashing, burning and the like. They can certainly change the number of bodyparts a creature possesses, but only through subtraction.

You could try a utility if you want to go down that route.
Logged

Axecleaver

  • Bay Watcher
    • View Profile
Re: Creature that heals ??
« Reply #4 on: December 02, 2010, 02:41:16 pm »

The list of things a syndrome can do is limited, and hardcoded. http://df.magmawiki.com/index.php/Syndrome

Vattic seems to imply in his reply that there are (or might be) plans to add "transformation and/or positive syndromes" sometime down the road - in a later version... I'm hoping this is the case and I might dig around the development pages to verify.

If you want something mutagenic, you could have body parts swell, rot off, or blister...

Sorry, but that's not what I'm looking for. Quite the opposite. My critter must be able to add limbs and/or heal (with certain side effects) or I wouldn't have a desire to pursue this.

I don't know how numbness functions... [snip] Apart from that attacks are generally limited to smashing, burning and the like.

I see from the DF2010:Syndrome page that Syndromes can handle some of the effects I'm looking for. Still undecided, but I'm thinking of some combination of two or more of these: CE_UNCONSCIOUSNESS, CE_DROWSINESS, CE_DIZZINESS, CE_NAUSEA

Anyway, I've been skimming the DF2010:Creature token list on the wiki and I found some things that might be relevant:
Spoiler (click to show/hide)

As I said, I'm still very new to modding DF. But I'm wondering if the above could be used to have a creature add limbs by using this with an attack? [Interestingly, I did a file search in the DF game directories and I could not find a file that uses "PLUS_BP_GROUP"... Is this token new or just unused?]

Syndrome Tokens:
Spoiler (click to show/hide)

If I could somehow trigger it like a flag, I wondering if "creates an exception" could be useful to prevent the further addition of limbs on a specific creature (victim). That is, assuming new functionality to allow syndromes be used for this will be added in a later version. But is it even possible to test for, say, the number of eyes a target has and use it as a conditional to trigger something?

BTW: Is there some way to have a creature force the swapping of one body part for another? Like if I wanted to replace a victims right arm with a different right arm?
« Last Edit: December 02, 2010, 02:44:23 pm by bsperan »
Logged

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Creature that heals ??
« Reply #5 on: December 02, 2010, 02:58:27 pm »

Vattic seems to imply in his reply that there are (or might be) plans to add "transformation and/or positive syndromes" sometime down the road - in a later version... I'm hoping this is the case and I might dig around the development pages to verify.

Indeed, though I can't find much now I search so perhaps he mentioned more in the podcast.

Quote from: Toady One
Quote from: JoshuaFH
In the future, will it be possible to create creatures that 'transform' upon receiving certain stimuli, or after meeting some condition? Like, a snake that transforms into a bird and back? Or a caterpillar that undergoes the various stages of cacoon to a butterfly?
There are a boatload of problems that I think were brought up, but it's something that'll likely happen as we move toward magic and also work out how things like metamorphosis and eggs and all that work out.
Source

Quote from:  author=Toady One
Yeah -- cursed items can be nasty.  In addition to the more item specific things (melding, not being lost), you could really have an item do just about anything untoward...  slowly transform the wielder into a kobold -- the item might not even be cursed in any other way, and the user could drop it if he or she is willing to part with it (the item might otherwise be very snazzy).  Most users would probably wait until they've become six inches shorter and are slightly hairy.
Source, this one is from his old game Slaves to Armok - God of Blood but DF is going to contain many similar things.

Quote from: Toady One
Quote from: Captain Mayday
I'll also ask, are you planning to use creature variations to help with the stock night creature type creatures?
To clarify, let me give an example - the werewolf.
Werewolves may possess a syndrome that allows them to infect on a bite.
This syndrome would trigger a creature variation (possibly even delayed by time), which would add, remove or change tags on the base creature.

This would of course cause them to gain the syndrome causing bite as well.
I'm not sure if I'll be able to use something as broad as a creature variation, at least for things beyond the body.  The ability to have a custom body has been partially supported and unused for a long time, but allowing any tag to be replaced is difficult without creating a new creature definition.
Source

Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Creature that heals ??
« Reply #6 on: December 02, 2010, 03:11:31 pm »

The [PLUS_BP_GROUP] is almost certainly used to select body parts for modification within the creature's own raw files.  I haven't seen it used, but it's probably similar to the [PLUS_TISSUE_LAYER] which is used along with [SELECT_TISSUE_LAYER] to add specific tissue types to a part of a creature, such as making hippo teeth use the ivory material type.  So no, you can't use it to make a syndrome that adds body parts to an affected creature.  I am fairly certain what you are trying to do is impossible.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Lancensis

  • Bay Watcher
    • View Profile
Re: Creature that heals ??
« Reply #7 on: December 02, 2010, 03:17:52 pm »

A custom night creature that turns people into what you want is the closest you can get right now. Or modding raw files ingame, and saying your creature did it. Sorry.
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Creature that heals ??
« Reply #8 on: December 02, 2010, 10:10:53 pm »

Yeah at the moment syndromes and other special attacks is rather limited in what its current capabilities are. However, Toady has expressed a want to eventually expand this greatly, adding new types of syndromes and new methods of infection so in the future hopefully much more will be possible. However for the moment there isn't much we can do in what you are looking for.  :-\
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.