Hi there. Im online on the forums and ready to fix my issue that I didn't like. I opened your link. I know I'm not a code freak, but do I replace the current "
entityclasses.xml" file of the game with yours? Or certain lines? Any help would be appreciated.
(Or maybe some instructions? I prefer instructions if you can please.)
Apologies, I didn't know how much you knew about XPath and modding.
The code that is in my file would be suitable for putting in your own modlet, if you were making one. You could just paste that code into
your modlet's entityclasses.xml file and it should work.
But, if you're modifying
the game's entityclasses.xml, then you shouldn't do that. Instead, what you should do is add the code to the
existing entityclasses.xml file, and specifically in the entity class named "playerMale".
Here's a general idea of how that would look:
<entity_class name="playerMale">
<!-- ...Lots of <property> and <effect_group> tags omitted for brevity. Don't change those, add this code right before the next </entyty_class>, as shown. -->
<effect_group name="Damage All NPCs">
<triggered_effect trigger="onSelfFirstSpawn" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
<triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
</effect_group>
</entity_class>
(The stuff between "<!--" and "-->" are comments in XML, don't type those in.)
If you're curious, the code in my modlet is using XPath commands to modify the vanilla game XML. That only works for mods and modlets; the vanilla game's XML files aren't parsed for XPath commands.
Here's a good overview of XPath: