Hello together,
I will start with a easy item. I have experience with programming old languages C++, Pascal, Sharp ans wo on. I Understand the xml files with change the values. That realy easy. But Now I will create a new item. I not know xpath. So I do not understand what is wrong.
I create a folder
Mods - Test_1
//Modinfo.xml
Config//
//Localization.txt
//items.xml
UIAtlases - ItemIconAtlas
//foodCornBread_V.png
Here the Code from items.xml:
<?xml version="1.0" encoding="UTF-8"?>
<append xpath="/items">
<item name="foodCornBread_V">
<property name="Tags" value="food"/>
<property name="HoldType" value="31"/>
<!-- <property name="DisplayType" value="food"/> -->
<property name="DisplayType" value="foodWaterNegative"/>
<property name="Meshfile" value="#Other/Items?Misc/parcelPrefab.prefab"/>
<property name="CustomIcon" value="foodCornBread_V"/>
<property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Morganic"/>
<property name="Stacknumber" value="10"/> <!-- STK food -->
<property name="EconomicValue" value="16"/>
<property name="UnlockedBy" value="perkMasterChef,foodCornBreadSchematic"/>
<property class="Action0">
<property name="Class" value="Eat"/>
<property name="Delay" value="1.0"/>
<property name="Use_time" value="..."/>
<property name="Sound_start" value="player_eating"/>
<!-- jar from cooking food <property name="Create_item" value="drinkJarEmpty"/> -->
</property>
<property name="Group" value="Food/Cooking,CFFood/Cooking"/>
<effect_group tiered="false" name="Food Tier 1">
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="$foodAmountAdd" operation="add" value="10"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar="foodHealthAmount" operation="add" value="5"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyStats" stat="water" operation="add" value="-5"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="ModifyCVar" cvar=".foodStaminaBonusAdd" operation="add" value="10"/>
<triggered_effect trigger="onSelfPrimaryActionEnd" action="AddBuff" buff="buffProcessConsumables"/>
<display_value name="$waterAmountAdd" value="-5"/>
</effect_group>
</item>
</append>
But I get a xpath error: I cannot find a solution in this forum or in the internet. Can you help? 660 ERR XML loader: Patching 'items.xml" from mod 'Test_1' failed:
661 EXC XML.Patch (/append/item, line 5 at pos 2): Patch element does not have an 'xpath' attribute
Thanks for your help or ideas.
best regeards Pascal