Howdy!
I've been working on a "no crafting" mod, and this thread has been gold! for information. I've learned a lot about xpath, etc.
I have unfortunately run into something.. Ive been able to get everything working the way i want it, but one part is giving me some issue.
The short story is this:
<config>
<remove xpath="/items/item[@name='modArmorPlatingBasicSchematic']" />
<append xpath="/items">
<item name="modArmorPlatingBasicSchematic">
<property name="Extends" value="schematicNoQualityMaster"/>
<property name="CreativeMode" value="Player"/>
<property name="CustomIcon" value="modArmorPlatingBasic"/>
<property name="Unlocks" value="modArmorPlatingBasic"/>
<effect_group tiered="false">
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar"
cvar="modArmorPlatingBasic" operation="set" value="0"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="GiveExp" exp="50"/>
</effect_group>
</item>
</append>
</config>
this works, but everything i have tried to try to write it shorter.. to take up less space, and not have to
include everything... how am i trying to say this...
For some reason, just the way the game is, and does what it does right now, i can remove
all recipes from "recipes.xml", BUT, when i do, the trader sells all the item mods at 0 cost..
while all other items they sell DO have cost..
my workaround was to leave the recipes in there (that works fine), then to change
this line from value=1 --> value=0
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar"
cvar="modArmorPlatingBasic" operation="set" value="0"/>
that allows the trader to sell the item mods for #cost, but when you read the schematic,
you get the xp, but not the ability to craft it.
This is the intended goal, but i am looking for a shorter way to write this, rather than
write it the way i did above for every mod*schematic...
btw.. if i have to, i will. but i am sure there is a better way..
also, before i try with xpath, i DO try the changes in the actual xml file,
to make sure what i am trying is even valid..
i have tried starts-with, ends-with, set, etc...
each time it looks me right in the eye, and says F you,
for example:
<set xpath="/items/item[starts-with(@name, 'mod')]/triggered_effect[@operation='set']/@value">0</set>
this fails, for some reason..
Thanks!