How can I give characters a damage boost?

Started by SpaceCoder, July 28, 2016, 03:31:50 PM

Previous topic - Next topic

SpaceCoder

Hi I am a new modder trying to create a mod that adds drugs that give temporary stats boost to the game, kind of like psycho and mentats from fallout. I have been looking through all the base xml files seeing if I can find anything to reference and work off of (what I have been doing until this point) but I can not seem to find anything that boosts or hinders a certain trait like melee, research, shooting, ect. Do you guys know how to do this in xml or will i need to learn C# in order to accomplish this task?

Thank you for your help,
SpaceCoder

kaptain_kavern

One way i see for doing this : Your drugs should grant a HediffDefs that can add some tags that defining damage (that's how it's done with bionic arms, scyther blades and such). You can look at the code in RimWorld\Mods\Core\Defs\HediffDefs\Hediffs_Local_AddedParts.xml

SpaceCoder

Quote from: kaptain_kavern on July 28, 2016, 07:35:07 PM
One way i see for doing this : Your drugs should grant a HediffDefs that can add some tags that defining damage (that's how it's done with bionic arms, scyther blades and such). You can look at the code in RimWorld\Mods\Core\Defs\HediffDefs\Hediffs_Local_AddedParts.xml

ok thank you, that seems like it will be helpful. My next question would be how does the game switch stages in the Alcohol def that is located at
Mods\Core\Defs\HediffDefs\Hediffs_Local_Drugs.xml
I want to know how this works because for my mod I want the drugs to have temporary effects and not permanent ones like alcohol, and I do not want to just copy and paste the code without having an understanding of how it goes through the stages.

Thanks again,
SpaceCoder