Help modifying core values?

Started by obuw, October 30, 2014, 11:28:18 AM

Previous topic - Next topic

obuw

I wanted to make a quick mod that changes some body part health values.

I had already made the changes directly to the Core mod, and it worked fine that way. But when I take the definitions and make it into a separate mod, it just doesn't work. (The game runs fine, but the body parts have their regular health values not the modded ones).

Attached is the mod files. This is my first attempt at modmaking in Rimworld, so I have probably overlooked something very basic. Any help would be appreciated!

[attachment deleted by admin: too old]

Rikiki

There is a missing folder level in your mod.
Try putting BodyParts.xml in Reduced Lethality\Defs\BodyPartDefs
and Stats_Pawns_Combat.xml in Reduced Lethality\Defs\StatDefs.

obuw

#2
Ah! Now I feel silly. :P

I thought I saw some mods putting defs in arbitrary folders so I thought the actual folder structure wasn't important. I was wrong though.

Thanks for pointing it out. :-)

Edit: By the way, can I actually omit parts of the definition that I'm not changing, and just have something like:

  <BodyPartDef>
    <defName>Head</defName>
<health>50</health>
  </BodyPartDef>


I guess I'd need some kind of special injection tag for that?

Rikiki

I did not tested it myself but I read that you have to completely redefine the item when you overwrite a core definition.
Testing in-game will be your best ally! :)

obuw

I guess so. :-)

Thanks again for the help.

Rikiki

You're welcome, it's always a pleasure to help polite people! :)