DerRadikaleRichard Posted December 7, 2021 Share Posted December 7, 2021 (edited) <remove xpath="items/item[@name='gunRifleT2LeverActionRifle' or @name='gunMGT1AK47' or @name='gunMGT2TacticalAR' or @name='gunMGT0PipeMachineGun']/@value"> ammo762mmBulletBall,ammo762mmBulletHP,ammo762mmBulletAP </remove> i want to remove all 762mm ammo from the lists of these guns but it doesnt work adding ammo with <append> works fine Edited December 7, 2021 by DerRadikaleRichard (see edit history) Link to comment Share on other sites More sharing options...
Gouki Posted December 7, 2021 Share Posted December 7, 2021 39 minutes ago, DerRadikaleRichard said: <remove xpath="items/item[@name='gunRifleT2LeverActionRifle' or @name='gunMGT1AK47' or @name='gunMGT2TacticalAR' or @name='gunMGT0PipeMachineGun']/@value"> ammo762mmBulletBall,ammo762mmBulletHP,ammo762mmBulletAP </remove> i want to remove all 762mm ammo from the lists of these guns but it doesnt work adding ammo with <append> works fine Hi Richard I think you are missing a / before the word items, it sure works for you. Regards Link to comment Share on other sites More sharing options...
DerRadikaleRichard Posted December 7, 2021 Author Share Posted December 7, 2021 nope that wasnt it, the game actually reads the code without an error but instead gives me a warning that it didnt apply it to the xml but it doesnt tell me why WRN XML patch for "items.xml" from mod "Richards weapon overhaul" did not apply Link to comment Share on other sites More sharing options...
Gouki Posted December 7, 2021 Share Posted December 7, 2021 The Wrn Xml is just a minimal warning, not a error. Because you better not modify the xml file directly from the Overhaul Richard and remove the ammunition that you do not want for the weapon, it would be easier. Regards Link to comment Share on other sites More sharing options...
DerRadikaleRichard Posted December 7, 2021 Author Share Posted December 7, 2021 i know i allways edited the vanilla xmls in the past but then my mod is incompatible with most other mods Link to comment Share on other sites More sharing options...
Gouki Posted December 7, 2021 Share Posted December 7, 2021 5 minutes ago, DerRadikaleRichard said: i know i allways edited the vanilla xmls in the past but then my mod is incompatible with most other mods If your mod is incompatible with other mods, it is because they apply something the same as yours (items, loot, blocks, etc), but it is easy to correct them. You say that adding "append" works for you, then apply it that way. Regards Apply using "set xpath" instead of "remove" and see if it works for you. But change the type of ammunition, the one you want to serve only in those weapons. Link to comment Share on other sites More sharing options...
BFT2020 Posted December 7, 2021 Share Posted December 7, 2021 (edited) I think you don't have the full path for it. Try this instead <remove xpath="/items/item[@name='gunRifleT2LeverActionRifle' or @name='gunMGT1AK47' or @name='gunMGT2TacticalAR' or @name='gunMGT0PipeMachineGun']/property[@class='Action0']/property[@name='Magazine_items']"> </remove> However, that removes the ammo value completely. If you are changing the ammo, you should just do set xpath as recommended by Gouki or append Edited December 7, 2021 by BFT2020 (see edit history) Link to comment Share on other sites More sharing options...
BFT2020 Posted December 7, 2021 Share Posted December 7, 2021 If you are trying to remove just part of the attribute, you would need to use removeattribute The code for that would be <removeattribute xpath="/items/item[@name='gunRifleT2LeverActionRifle' or @name='gunMGT1AK47' or @name='gunMGT2TacticalAR' or @name='gunMGT0PipeMachineGun']/property[@class='Action0']/property[@name='Magazine_items']/@value"> </removeattribute > 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