Bladestorm Games Posted July 21, 2023 Share Posted July 21, 2023 Hello, I've run into an issue where when I try to use "and" operator, I seem to get errors. The goal is to change a few item's passive_effect in 1 section of code, so instead of doing something like this: <append xpath="/items/item[@name='meleeWpnKnucklesT0LeatherKnuckles']"> <effect_group name="inc_range"> <passive_effect name="MaxRange" operation="base_add" value="1" /> <passive_effect name="BlockRange" operation="base_add" value="1" /> </effect_group> </append> <append xpath="/items/item[@name='meleeWpnKnucklesT1IronKnuckles']"> <effect_group name="inc_range"> <passive_effect name="MaxRange" operation="base_add" value="1" /> <passive_effect name="BlockRange" operation="base_add" value="1" /> </effect_group> </append> <append xpath="/items/item[@name='meleeWpnKnucklesT3SteelKnuckles']"> <effect_group name="inc_range"> <passive_effect name="MaxRange" operation="base_add" value="1" /> <passive_effect name="BlockRange" operation="base_add" value="1" /> </effect_group> </append> I am trying to do something like this: <append xpath="/items/item[@name='meleeWpnKnucklesT0LeatherKnuckles' and @name='meleeWpnKnucklesT1IronKnuckles' and @name='meleeWpnKnucklesT3SteelKnuckles']"> <effect_group name="inc_range"> <passive_effect name="MaxRange" operation="base_add" value="1" /> <passive_effect name="BlockRange" operation="base_add" value="1" /> </effect_group> </append> Is that not a valid option? Or am I structuring it wrong? Thanks! Link to comment Share on other sites More sharing options...
BFT2020 Posted July 21, 2023 Share Posted July 21, 2023 (edited) 1 hour ago, Bladestorm Games said: I am trying to do something like this: <append xpath="/items/item[@name='meleeWpnKnucklesT0LeatherKnuckles' and @name='meleeWpnKnucklesT1IronKnuckles' and @name='meleeWpnKnucklesT3SteelKnuckles']"> <effect_group name="inc_range"> <passive_effect name="MaxRange" operation="base_add" value="1" /> <passive_effect name="BlockRange" operation="base_add" value="1" /> </effect_group> </append> Is that not a valid option? Or am I structuring it wrong? Thanks! Not valid, the and operator in this case is looking for an item that includes all three listed. Correct way to use And is to specify a specific node, like @name='MaxRange' and operation='base_add" In your case, you should use contains contains(@name,'meleeWpnKnuckles') - This will update any item that has that in the name. Example <remove xpath="//passive_effect[contains(@tags,'T0')]"/> This is in my progression file for crafting and would remove all code with the tags T0 in it. Easy way to remove ability to craft any T0 gear past Quality level 1. Edited July 21, 2023 by BFT2020 (see edit history) 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