Dark Wun Posted August 15, 2023 Share Posted August 15, 2023 Hi all, Is it possible, and fairly simple, for someone new to modding, to outright remove something from the loot table so it never shows up randomly in loot containers? e.g., cotton Link to comment Share on other sites More sharing options...
BFT2020 Posted August 15, 2023 Share Posted August 15, 2023 yes <remove xpath ="//item[@name='resourceCropCottonPlant']"/> That will remove all instances of cotton in the loot file Link to comment Share on other sites More sharing options...
Dark Wun Posted August 16, 2023 Author Share Posted August 16, 2023 6 hours ago, BFT2020 said: That will remove all instances of cotton in the loot file nice, thank you. So just stick this line right at the end in loot.xml in a particular save game and cotton in random loot is gone from that point on? Link to comment Share on other sites More sharing options...
BFT2020 Posted August 16, 2023 Share Posted August 16, 2023 (edited) 8 hours ago, Dark Wun said: nice, thank you. So just stick this line right at the end in loot.xml in a particular save game and cotton in random loot is gone from that point on? No you need to create a new file for mods, grab a small one example but your mod loot file would look something like <config> <remove xpath=“//item[@name=‘resourceCropCottonPlant’]”/> </config> Edited August 16, 2023 by BFT2020 (see edit history) Link to comment Share on other sites More sharing options...
Dark Wun Posted August 17, 2023 Author Share Posted August 17, 2023 19 hours ago, BFT2020 said: No you need to create a new file for mods, grab a small one example but your mod loot file would look something like Alright, thanks, so I've got the directory structure worked out for my small mod and I think I can figure out what to put in the ModInfo.xml no problem: NoCotton \config \loot.xml \ModInfo.xml So now I make the loot.xml file: <config> <remove xpath=“//item[@name=‘resourceCropCottonPlant’]”/> </config> Just those three lines and my mod is complete? Or is there some code I need to tell it to call the default loot.xml file and then modify it with xpath? Link to comment Share on other sites More sharing options...
BFT2020 Posted August 17, 2023 Share Posted August 17, 2023 @Dark Wun Nope that should work for you. If it doesn't give a shout and I will help you troubleshoot it 1 Link to comment Share on other sites More sharing options...
Dark Wun Posted August 17, 2023 Author Share Posted August 17, 2023 Cool, appreciated, I'll give it a try Link to comment Share on other sites More sharing options...
Dark Wun Posted August 17, 2023 Author Share Posted August 17, 2023 2 hours ago, BFT2020 said: Nope that should work for you. If it doesn't give a shout and I will help you troubleshoot it No dice on the first try. I think there's a syntax error. I got this message in the console in red letters: ERR XML loader: Loading XML patch file 'loot.xml' from mod 'Noloot' failed: EXC "" is an unexpected token. The expected token is "" or "", Line 2, position 15. Is there a way I can copy feedback from the console, I had to manually type that and may have got some of the " symbols wrong? Link to comment Share on other sites More sharing options...
BFT2020 Posted August 17, 2023 Share Posted August 17, 2023 19 minutes ago, Dark Wun said: No dice on the first try. I think there's a syntax error. I got this message in the console in red letters: ERR XML loader: Loading XML patch file 'loot.xml' from mod 'Noloot' failed: EXC "" is an unexpected token. The expected token is "" or "", Line 2, position 15. Is there a way I can copy feedback from the console, I had to manually type that and may have got some of the " symbols wrong? My code works for me. Line 2, position 15 would be the first character after the = sign. Make sure that is a double quotation mark not a single apostrophe twice If you copy it from here, the text also might get messed up. So I would type it in manually. 1 Link to comment Share on other sites More sharing options...
Dark Wun Posted August 18, 2023 Author Share Posted August 18, 2023 23 hours ago, BFT2020 said: If you copy it from here, the text also might get messed up yep, you're spot on; some of the characters copied directly from here don't get properly recognized in the text editor. I changed that and everything seems to be working as planned. First step of my modding complete, cheers! 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