JustBoredYo
New member
Hi I'm trying to add back that you get an empty glass jar or can after consuming the item, since I think this change was stupid and only slows down gameplay in an unimaginative and annoying way.
This is the first time I'm trying to make a 7Dtd mod, so this might just be a noob issue.
Right now my goal is to add the "drinkJarEmpty" item into the inventory after Action0 is executed. I have added this behaviour successfully by manipulating the items.xml file of the game and now tried to implement the same using the config/items.xml file of my mod using this code:
<insertBefore xpath="/items/item[@name='drinkJarBoiledWater']">
<item name="drinkJarEmpty">
<property name="HoldType" value="3"/>
<property name="Meshfile" value="@:Other/Items/Food/emptyJarPrefab.prefab"/>
<property name="DropMeshfile" value="@:Other/Items/Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Mglass"/>
<property name="Stacknumber" value="125"/>
<property name="CustonIcon" value="drinkJarEmpty"/>
<property name="EconomicValue" value="6"/>
<property name="CraftingIngredientTime" value="9"/>
<property class="Action1">
<property name="Class" value="CollectWater"/>
<property name="Delay" value="1.0"/>
<property name="Change_item_to" value="drinkJarRiverWater"/>
<property name="Sound_start" value="bucketfill_water"/>
</property>
<property name="Group" value="Resources"/>
</item>
</insertBefore>
<append xpath="/items/item[@name='drinkJarBoiledWater']/property[@class='Action0']">
<property name="Create_item" value="drinkJarEmpty"/>
</append>
From my understanding the code does the following:
1. Inserts the "drinkJarEmpty" item before the "drinkJarBoiledWater" item(idk if it is important although I could imagine so)
2. Appends the '<property name="Create_item" value="drinkJarEmpty">' inside the '<property class="Action0">' node
I have verified that my mod is being loaded successfully so I am pretty sure here is where my mod fails.
I have no idea if my understanding is correct however what I do know is that the code doesn't work.
This is the first time I'm trying to make a 7Dtd mod, so this might just be a noob issue.
Right now my goal is to add the "drinkJarEmpty" item into the inventory after Action0 is executed. I have added this behaviour successfully by manipulating the items.xml file of the game and now tried to implement the same using the config/items.xml file of my mod using this code:
<insertBefore xpath="/items/item[@name='drinkJarBoiledWater']">
<item name="drinkJarEmpty">
<property name="HoldType" value="3"/>
<property name="Meshfile" value="@:Other/Items/Food/emptyJarPrefab.prefab"/>
<property name="DropMeshfile" value="@:Other/Items/Misc/sack_droppedPrefab.prefab"/>
<property name="Material" value="Mglass"/>
<property name="Stacknumber" value="125"/>
<property name="CustonIcon" value="drinkJarEmpty"/>
<property name="EconomicValue" value="6"/>
<property name="CraftingIngredientTime" value="9"/>
<property class="Action1">
<property name="Class" value="CollectWater"/>
<property name="Delay" value="1.0"/>
<property name="Change_item_to" value="drinkJarRiverWater"/>
<property name="Sound_start" value="bucketfill_water"/>
</property>
<property name="Group" value="Resources"/>
</item>
</insertBefore>
<append xpath="/items/item[@name='drinkJarBoiledWater']/property[@class='Action0']">
<property name="Create_item" value="drinkJarEmpty"/>
</append>
From my understanding the code does the following:
1. Inserts the "drinkJarEmpty" item before the "drinkJarBoiledWater" item(idk if it is important although I could imagine so)
2. Appends the '<property name="Create_item" value="drinkJarEmpty">' inside the '<property class="Action0">' node
I have verified that my mod is being loaded successfully so I am pretty sure here is where my mod fails.
I have no idea if my understanding is correct however what I do know is that the code doesn't work.
Last edited by a moderator: