Bubba Jones
Refugee
I'm very new to modding 7 Days to Die and am just getting started. I have some small background modding with Morrowind/Oblivion/Skyrim (adding meshes, some animations, quests and scripting) so I'm not totally new to modding, but I don't have any experience with the system this game uses.
It appears to me that the .xml files have a small amount of functionality like the scripts do from bethesda games. However, I can't find any reference of what all the available commands and syntaxes are for the .xml files.
I've successfully modded .xml files to change values or remove items, but am having trouble trying to figure out how to trigger (or prevent triggering) certain events.
Is there any documentation out there that lists commands and values for the .xml files?
To be more specific, I'm trying to edit the Weaponry mod by Majic that was just released. One issue I'm trying to fix is that for each of the weapons fired in the game, shell casings eject every time the weapon fires. The issue is that, even when the weapon is out of ammo, shell casing still eject each time the weapon is trying to be fired.
I've found the two lines of code that animate the shell casings being ejected:
<triggered_effect trigger="onSelfPrimaryActionStart" action="AnimatorSetBool" target="self" property="shooting" value="true"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AnimatorSetBool" target="self" property="shooting" value="false"/>
If I delete those lines, shell casings will no longer eject no matter what. However, upon looking at the standard items.xml file, I found you can add requirements to the triggered effect command. The only problem is I don't know what commands to use for requirements. I'm trying to do something like:
<triggered_effect trigger="onSound_Start" action="AnimatorSetBool" target="self" property="shooting" value="true">
<requirement name="CVarCompare" cvar="Magazine/AmmoLeft" operation="GreaterThanorEqualTo" value="1" /> </triggered_effect>
Know I know the cvar Magazine or AmmoLeft aren't real variables to add, but I don't know what is.
Also, I know there is the operation "Equals", but I would need a >= operation or at least a > than, but I don't know if those exist.
Another method I was thinking of doing would be:
<triggered_effect trigger="onSound_Start" action="AnimatorSetBool" target="self" property="shooting" value="true"/>
However, the value "onSound_Start" is not a real value to add here. I know earlier up in the .xml file, there is a property for onSound_Start, so I was hoping maybe I could call when that sound was played as the trigger, but I don't know how to properly reference that.
TLDR; I would like to know if there is a list of properties/actions/cvars/triggers etc on these .xml files so I can see what is available for me to use! If anyone knows of this, I'd greatly appreciate the link!
It appears to me that the .xml files have a small amount of functionality like the scripts do from bethesda games. However, I can't find any reference of what all the available commands and syntaxes are for the .xml files.
I've successfully modded .xml files to change values or remove items, but am having trouble trying to figure out how to trigger (or prevent triggering) certain events.
Is there any documentation out there that lists commands and values for the .xml files?
To be more specific, I'm trying to edit the Weaponry mod by Majic that was just released. One issue I'm trying to fix is that for each of the weapons fired in the game, shell casings eject every time the weapon fires. The issue is that, even when the weapon is out of ammo, shell casing still eject each time the weapon is trying to be fired.
I've found the two lines of code that animate the shell casings being ejected:
<triggered_effect trigger="onSelfPrimaryActionStart" action="AnimatorSetBool" target="self" property="shooting" value="true"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AnimatorSetBool" target="self" property="shooting" value="false"/>
If I delete those lines, shell casings will no longer eject no matter what. However, upon looking at the standard items.xml file, I found you can add requirements to the triggered effect command. The only problem is I don't know what commands to use for requirements. I'm trying to do something like:
<triggered_effect trigger="onSound_Start" action="AnimatorSetBool" target="self" property="shooting" value="true">
<requirement name="CVarCompare" cvar="Magazine/AmmoLeft" operation="GreaterThanorEqualTo" value="1" /> </triggered_effect>
Know I know the cvar Magazine or AmmoLeft aren't real variables to add, but I don't know what is.
Also, I know there is the operation "Equals", but I would need a >= operation or at least a > than, but I don't know if those exist.
Another method I was thinking of doing would be:
<triggered_effect trigger="onSound_Start" action="AnimatorSetBool" target="self" property="shooting" value="true"/>
However, the value "onSound_Start" is not a real value to add here. I know earlier up in the .xml file, there is a property for onSound_Start, so I was hoping maybe I could call when that sound was played as the trigger, but I don't know how to properly reference that.
TLDR; I would like to know if there is a list of properties/actions/cvars/triggers etc on these .xml files so I can see what is available for me to use! If anyone knows of this, I'd greatly appreciate the link!