Hi,
How I access the Corpse ThingDef? I want my mechanoid corpse provide cover, like the rock slag!
Quote from: soulkata on March 19, 2015, 01:25:14 PM
Hi,
How I access the Corpse ThingDef? I want my mechanoid corpse provide cover, like the rock slag!
It automatically generates by ThingDefGenerator_Corpse. There's no way modify its ThingDef AFAIK.
Thanks!
Dll moding, here I go! :)
Quote from: soulkata on March 20, 2015, 09:26:54 AM
Thanks!
Dll moding, here I go! :)
You can just make a ThingDef like:
<ThingDef>
<defName>MD2DroidCorpse</defName>
<label>dead droid</label>
<eType>Corpse</eType>
<thingClass>MD2.DroidCorpse</thingClass>
<tickerType>Normal</tickerType>
<comps>
<li>
<compClass>CompForbiddable</compClass>
</li>
</comps>
</ThingDef>
And add parts that you want. This is taken from my droids in Mechanical defence 2. The hard part is getting pawns to use the specific corpse. A few alphas back there was a <corpseDef> tag in the PawnKindsDef, but it didn't really work. It may still be there and might work now, you could give it a go :)
EDIT: the <corpseDef> tag is now located in the <race> part of the pawns race ThingDef. So adding the corpse to a pawn would look something like:
<ThingDef>
<defName>PawnRace</defName>
<race>
<corpseDef>MyCorpseDefName</corpseDef>
</race>
</ThingDef>
Obviously with all the other parts included as well :)
Thanks!!
I have made a "Dll Workaround" to manually change the corpse ThingDef! I will use this solution! :)
Quote from: mipen on March 22, 2015, 04:07:10 PM
EDIT: the <corpseDef> tag is now located in the <race> part of the pawns race ThingDef. So adding the corpse to a pawn would look something like:
<ThingDef>
<defName>PawnRace</defName>
<race>
<corpseDef>MyCorpseDefName</corpseDef>
</race>
</ThingDef>
Obviously with all the other parts included as well :)
Hello, I tried the method you described, however, the method: 'ThingDefGenerator_Corpses.ImpliedCorpseDefs()' overwrites the property declared in ThingDef.race.corpseDef.
I manually modified the corpse ThingDef in my mod AbilityPack (https://ludeon.com/forums/index.php?topic=11192.0)