I am stumbling upon more and more strange things when it comes to modding my race of undeads. As far as I know this has not been done before, so I thought I share some oddities and fixes with everyone, as well as post problems and bugs. This will probably go on for the entire month, and I dont want to bore people that make suggestions/play with things only relevant to modders.
First of all:
NO_AGING. This is the key. Creature that are affected with no aging are treated as friendly to undeads. Civilians will still be frightened, but NOFEAR helps with that.
OPPOSED_TO_LIFE. This removed the creature from your civs, and you lose control. If everyone is opposed to life, your fort crumbles. Pets cant be trained or sheared or pastured anymore. So only use this tag for random-undeads-that-roam-the-map.
ANIMATE. By using animation in the interaction, you will get a undead-unit. They dont necessarily have to be opposed to life, so you can make 'friendly'-tagged undeads. Just copy the vanilla df interaction raise-corpse and removed the opposed to life.
RESSURECT. By using this you will bring the unit back to life, as they were before. With all their injuries, which means that they instantly die again. Add a 1-tick transformation to it to heal them, then you get fully healed and resurrected civ members. The problem is that creatures retain their AI, so if you resurrect invaders, you just have more invaders. I would only use this in specific workshops that you build near your graveyard, for more control.
Tombs and Necromancer Towers make excellent starting embarks, as the undeads will run out of the buildings, scatter across the map, kill wildlife and protect you from thieves, ambushes and later one distract sieges. 'Embark Everywhere' will allow starting on those.
NOEMOTION. Does not stop friends. It stops tantrums, but the unit description will still list feelings and relations. Its a good tag for skeletons or zombies, so that they dont tantrum, but they will still have skeleton and zombie friends.
SOULS: I added this to all creatures: [EXTRA_BUTCHER_OBJECT:BY_TYPE:THOUGHT][EBO_ITEM:PLANT:NONE:PLANT_MAT:SOUL:STRUCTURAL]. It will drop a soul when being butchered, which will wither away after 4 weeks. It makes a nice currency to barter with demons, or to animate objects/creatures. It uses a fairly basic fake-plant:
//souls that wither away
[PLANT:SOUL]
[NAME:soul][NAME_PLURAL:souls][ADJ:soul]
[USE_MATERIAL_TEMPLATE:STRUCTURAL:TORCH_TEMPLATE]
[MATERIAL_VALUE:1]
[BASIC_MAT:LOCAL_PLANT_MAT:STRUCTURAL]
[PREFSTRING:lingering essence]
[FREQUENCY:0][REACTION_CLASS:SOUL]
[PICKED_TILE:15][DEAD_PICKED_TILE:15]
[PICKED_COLOR:6:0:1]
Problems:
NECROSIS. Rotten civ-members like zombies will constantly spam requests for diagnosis, cleaning and surgery. I did not find a way around this.
WEREBEASTS. As soon as I added werebeast-civ members, which use the vanilla DF werebeast interaction found in the interaction-examples folder, the worldgen or embark crash 100% of the time. I dont know why. I just added this to the creature file:
---------------------------------------------------------------------------------------------------------------
///select werebeast female
---------------------------------------------------------------------------------------------------------------
[CASTE:WARLOCK_W_F][CREATURE_CLASS:WARLOCK_F]
[DESCRIPTION:A werewolf that has joined your ranks. A fearless hunter every full moon, this warlock has been blessed with lycanthropy.]
[FEMALE][NOT_LIVING][NOFEAR]
[CASTE_NAME:werewolf:werewolves:lycanthropic]
[POP_RATIO:2500]
[PROFESSION_NAME:PIKEMAN:Werewolf:Werewolves]
[PROFESSION_NAME:MASTER_PIKEMAN:Ferocious Werewolf:Ferocious Werewolves]
[PROFESSION_NAME:STRAND_EXTRACTOR:Necromancer:Necromancers]
[CASTE_PROFESSION_NAME:STANDARD:Werewolf:Werewolves]
[CAN_DO_INTERACTION:MAKE_WEREBEAST]
[CDI:TARGET:A:SELF_ONLY]
[CDI:FREE_ACTION]
---------------------------------------------------------------------------------------------------------------
///select werebeast male
---------------------------------------------------------------------------------------------------------------
[CASTE:WARLOCK_W_F][CREATURE_CLASS:WARLOCK_M]
[DESCRIPTION:A werewolf that has joined your ranks. A fearless hunter every full moon, this warlock has been blessed with lycanthropy.]
[MALE][NOT_LIVING][NOFEAR]
[CASTE_NAME:werewolf:werewolves:lycanthropic]
[POP_RATIO:25]
[PROFESSION_NAME:PIKEMAN:Werewolf:Werewolves]
[PROFESSION_NAME:MASTER_PIKEMAN:Ferocious Werewolf:Ferocious Werewolves]
[PROFESSION_NAME:STRAND_EXTRACTOR:Necromancer:Necromancers]
[CASTE_PROFESSION_NAME:STANDARD:Werewolf:Werewolves]
[CAN_DO_INTERACTION:MAKE_WEREBEAST]
[CDI:TARGET:A:SELF_ONLY]
[CDI:FREE_ACTION]
[INTERACTION:MAKE_WEREBEAST]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:CREATURE]
[IT_CANNOT_TARGET_IF_ALREADY_AFFECTED]
[IT_CANNOT_HAVE_SYNDROME_CLASS:WEREBEAST]
[IT_LOCATION:CONTEXT_CREATURE]
[I_EFFECT:ADD_SYNDROME]
[IE_TARGET:A]
[IE_IMMEDIATE]
[SYNDROME]
[IE_ARENA_NAME:Werewolf]
[SYN_CLASS:WERECURSE]
[SYN_CLASS:WEREBEAST]
[CE_BODY_TRANSFORMATION:START:0]
[CE:CREATURE:WEREBEAST:DEFAULT]
[CE:PERIODIC:MOON_PHASE:27:0]
[CE_ADD_TAG:NO_AGING:STERILE:START:0]
MONOLITH: I have an immobile creature that should animate all dead around it, but it does not do anything. I can spawn it in the Arena and it will animate corpses just fine, but it wont do it in fort mode. I already posted that in the modding quesions thread, so I just copy+past the post:
I have a little problem with a creature I wrote. A immobile monolith, that doesnt want to do the interactions it can do. It should raise corpses around it, but it does not. The raise-corpse interaction itself works well, I use it on other creatures as well, but the Monolith doesnt use it. Maybe because its missing a brain, eyes, something like that?
[BODY:MONOLITH]
[BP:UB:core:cores][UPPERBODY][THOUGHT][SIGHT][EMBEDDED][SMALL][CATEGORY:BODY_UPPER]
[DEFAULT_RELSIZE:10]
[BP:LB:body:bodies][CON:UB][LOWERBODY][CATEGORY:BODY_LOWER]
[DEFAULT_RELSIZE:1000]
[CREATURE:MONOLITH]
[DESCRIPTION:A black monolith. It seems to hum in a frequency just below hearing. Tendrils of green smoky light search the area around it, gently touching and probing its surroundings for anything that once hold a spark of light, animating it to eternal unlife.]
[NAME:black monolith:black monoliths:black monolith]
[CASTE_NAME:black monolith:black monoliths:black monolith]
[CREATURE_TILE:244][COLOR:3:0:0]
[FREQUENCY:0][CANNOT_UNDEAD][BENIGN]
[FIREIMMUNE][WEBIMMUNE][MAGMA_VISION]
[SMALL_REMAINS][NOT_BUTCHERABLE][IMMOBILE]
[NO_DRINK][NO_EAT][NO_SLEEP][NOPAIN][EXTRAVISION][NO_FEVERS]
[NOBREATHE][NOSTUN][NONAUSEA][NOEMOTION][NOBONES][NO_DIZZINESS]
[BODY:MONOLITH]
[SOUND:PEACEFUL_INTERMITTENT:12:15000:NONE:hum:hums:humming]
[SOUND:ALERT:20:8000:NONE:resonate:resonates:a resonating tone]
[USE_MATERIAL_TEMPLATE:BONE:BONE_TEMPLATE]
[USE_TISSUE_TEMPLATE:BONE:BONE_TEMPLATE]
[TISSUE_LAYER:BY_CATEGORY:ALL:BONE]
[BODY_SIZE:0:0:35000]
[CASTE:GENERIC]
[CAN_DO_INTERACTION:RAISE_CORPSE] => should animate dead.
[CDI:ADV_NAME:Animate corpse]
[CDI:TARGET_RANGE:A:10]
[CDI:VERB:hum:hums:NA]
[CDI:TARGET_VERB:shudder and begin to move:shudders and begins to move]
[CDI:WAIT_PERIOD:10]
[CAN_DO_INTERACTION:MAKE_VAMPIRE] => to make them friendly to undead.
[CDI:TARGET:A:SELF_ONLY]
[CDI:FREE_ACTION]
[INTERACTION:RAISE_CORPSE]
[I_TARGET:A:CORPSE]
[IT_LOCATION:CONTEXT_ITEM]
[IT_AFFECTED_CLASS:GENERAL_POISON]
[IT_AFFECTED_CLASS:ALL_CREATURES]
[IT_REQUIRES:FIT_FOR_ANIMATION]
[IT_FORBIDDEN:NOT_LIVING]
[IT_MANUAL_INPUT:corpses]
[I_EFFECT:ANIMATE]
[IE_TARGET:A]
[IE_IMMEDIATE]
[IE_ARENA_NAME:Animated corpse]
[SYNDROME]
[CE_FLASH_TILE:TILE:165:3:0:0:FREQUENCY:2000:1000:START:0]
[CE_PHYS_ATT_CHANGE:STRENGTH:300:1000:TOUGHNESS:300:1000:START:0]
[CE_SPEED_CHANGE:SPEED_PERC:60:START:0]
[CE_ADD_TAG:NO_AGING:NOT_LIVING:OPPOSED_TO_LIFE:EXTRAVISION:NOEXERT:NOPAIN:NOBREATHE:NOSTUN:NONAUSEA:NO_DIZZINESS:NO_FEVERS:NOEMOTION:PARALYZEIMMUNE:NOFEAR:NO_EAT:NO_DRINK:NO_SLEEP:NO_PHYS_ATT_GAIN:NO_PHYS_ATT_RUST:NOTHOUGHT:NO_THOUGHT_CENTER_FOR_MOVEMENT:NO_CONNECTIONS_FOR_MOVEMENT:START:0]
[CE_REMOVE_TAG:HAS_BLOOD:TRANCES:LIKES_FIGHTING:MISCHIEVOUS:START:0]
I tested in in Arena, it can resurrect corpses. Dont know why the AI wont use it in fort mode.