I'm trying to learn how to mod rimworld and I've been following some tutorials. I'm trying to start out with something that seems like a simple concept but might not be that simple in reality.
I want to add animals as a valid target that sanguophages can use the bloodfeed ability on.
I found the file with the value that I need to patch (biotech/defs/abilitydefs/abilities.xml)
So I'm trying to patch into that the ability to target animals.
I've got to the point where it's not throwing out errors in the log. But when testing in-game, it doesn't seem to work. If I target an animal the red "no" circle appears around it and the error message "cannot target animals only humans" pops up on the screen.
So I'm not sure if I messed up with my patch code there, or if I'm missing a value somewhere else that needs to be changed instead.
The error message makes me think that I need to be patching a different file as well, but I'm not sure which. Where would targeting rules be stored?
Thank you.
I want to add animals as a valid target that sanguophages can use the bloodfeed ability on.
I found the file with the value that I need to patch (biotech/defs/abilitydefs/abilities.xml)
So I'm trying to patch into that the ability to target animals.
Code Select
<Patch>
<Operation Class="PatchOperationAdd">
<xpath>/Defs/AbilityDef[defName = "Bloodfeed"]/verbProperties/targetParams</xpath>
<value>
<canTargetAnimals>True</canTargetAnimals>
</value>
</Operation>
</Patch>
I've got to the point where it's not throwing out errors in the log. But when testing in-game, it doesn't seem to work. If I target an animal the red "no" circle appears around it and the error message "cannot target animals only humans" pops up on the screen.
So I'm not sure if I messed up with my patch code there, or if I'm missing a value somewhere else that needs to be changed instead.
The error message makes me think that I need to be patching a different file as well, but I'm not sure which. Where would targeting rules be stored?
Thank you.