Scyth Posted February 14, 2022 Share Posted February 14, 2022 (edited) I'm working on a mod to debuff building and mining on our server - mostly so the molemen don't need to feel bad about hopping on grinding out while they are on a business meeting. Unfortunately, I can't seem to get PlayerExpGain to work as an Append. If I edit the XML directly, it works just fine. If I try to do it properly, it doesn't work. <!--Test Case Eliminate XP--> <append xpath="items/item[starts-with(@name, 'meleeToolRepair']/effect_group[starts-with(@name, 'meleetoolRepair')]"> <effect_group> <passive_effect name="PlayerExpGain" operation="perc_add" value="-1" /> </effect_group> </append> Edited February 14, 2022 by Scyth (see edit history) Link to comment Share on other sites More sharing options...
Cranberry Monster Posted February 14, 2022 Share Posted February 14, 2022 Are you trying to add it as an effect_group within the existing effect_group? Because that's how the code reads. If it's just a single passive_effect you want to stick into the existing effect_group, remove the <effect_group> and </effect_group> lines. My apologies if things have changed drastically in items.xml in alpha 20. I'm at work and only have the a19 configs to look at. Link to comment Share on other sites More sharing options...
Scyth Posted February 14, 2022 Author Share Posted February 14, 2022 I had tried that earlier, and it didn't work, and I saw a suggestion somewhere about using a second effect group, so I figured I'd try it and see if any of the spaghetti stuck to the wall. Link to comment Share on other sites More sharing options...
Cranberry Monster Posted February 15, 2022 Share Posted February 15, 2022 Okay, here's an idea: try making the second effect_group independent of the first, rather than nested inside it. To do that, I'd change your "append xpath" to "insertAfter xpath" in the code and see if that works. I do see instances in the vanilla configs of items with a second un-named effect_group after the first. Link to comment Share on other sites More sharing options...
BFT2020 Posted February 15, 2022 Share Posted February 15, 2022 Also look into your configdump folder (located in the saves folder) to see how the game is editing the xml code based on your modlet 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