Raise severity per shot

Started by equal, January 23, 2020, 07:19:34 PM

Previous topic - Next topic

equal

Hello,

first of all sorry for my bad english. Its a bit rusty atm. Im completly new to rimworld modding but had some mod ideas in my mind for quite a while now and now i have the time to work on their realization. :D Right now im just getting used to the defs and general structure and i'm trying to create a sort of star gate stun gun. The weapon should stun with the first shot and kill with the second shot. As now i've created the ThingDef, DamageDef and HediffDef and the stun effect is working as intendet (First shot stuns without any other damage). But as soon as i set a lethalSeverity every shot is lethal. I tried to look into other defs but couldnt find anything that may help me out here. Right now my plan is to set a fixed amount of severity per Shot, like every shot adds about 0.9 severity. So the second one is always lethal. I just don't know if thats even possible without c#. I had a bit of c++ during my studies but wasn't a fan at all. Another problem here is the way i created my HediffDef. I just couldn't figure out how to add a completly new Hediff as a weapon effect so i just changed the gunshot one. Problem here is that every shot hits another part of the body. Is there a way to always hit the same part? Or even the whole body, like a disease? Tried to add a disease instead of a injury but it just isn't working. Hope thats enough info to begin with.  ;)



Thats the Hediff i'm using atm. The minimum Severity is intentionally because i just don't want to know when the pawn is waking up. ;)
I figured that i can use minSeverity for the stage, but here i get to the problem that every shot hits another part and their still is a big chance that the first shot kills cause maxSeverity isn't working here. :/



Got it. Just used the Plaguegun tutorial and edited it for my use. Works like a charm. :)