Jump to content

removing objects/items from loot table


Dark Wun

Recommended Posts

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

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 by BFT2020 (see edit history)
Link to comment
Share on other sites

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

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

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.

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...