JymBoe Posted August 2, 2021 Share Posted August 2, 2021 I'm having trouble with my mod code can anyone suggest a fix? Here's the stock items.xml: <item name="ammoDartIron"> <property name="Extends" value="ammoArrowIron" param1="HandMeshfile"/> <property name="Meshfile" value="Entities/Electrical/steel_dartPrefab"/> <property name="HoldType" value="45"/> <property name="HandMeshfile" value="#Other/Items?Misc/sackPrefab.prefab"/> <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/> <property name="Stacknumber" value="500"/> <!-- STK ammo --> <property name="EconomicValue" value="34"/> <property name="EconomicBundleSize" value="10"/> <property name="DisplayType" value="ammoDart"/> <property class="Action1"> <property name="Velocity" value="55"/> <property name="Gravity" value="-4"/> <property name="LifeTime" value="2"/> </property> <property class="Attributes"> <property name="EntityDamage" value="22,45"/> <property name="BlockDamage" value="3,8"/> </property> <effect_group name="ammoDartIron" tiered="false"> <passive_effect name="EntityDamage" operation="base_set" value="45"/> <passive_effect name="BlockDamage" operation="base_set" value="2"/> <passive_effect name="DamageModifier" operation="perc_set" value=".1" tags="wood"/> <passive_effect name="DamageModifier" operation="perc_set" value="0" tags="earth,metal,cloth,stone"/> <passive_effect name="ProjectileVelocity" operation="base_set" value="55"/> </effect_group> </item> Here's my mod items.xml code: <set xpath="/items/item[@name='ammoDartIron']/effect_group[@name='ammoDartIron']/passive_effect[@name='EntityDamage']/operation[@name='base_set']/@value">500</set> Here's the error from the log: WRN XML patch for "items.xml" from mod "JymBoe" did not apply: <set xpath="/items/item[@name='ammoDartIron']/effect_group[@name='ammoDartIron'] /passive_effect[@name='EntityDamage']/operation[@name='base_set']/@value" Link to comment Share on other sites More sharing options...
khzmusik Posted August 3, 2021 Share Posted August 3, 2021 Your XPath isn't correct. "operation" is an attribute, not a tag. So it would be this: <set xpath="/items/item[@name='ammoDartIron']/effect_group[@name='ammoDartIron']/passive_effect[@name='EntityDamage' and @operation='base_set']/@value">500</set> Link to comment Share on other sites More sharing options...
JymBoe Posted August 3, 2021 Author Share Posted August 3, 2021 Thanks khzmusik, the code you wrote works and explains some other problems I've encountered. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now