Jump to content

A bit rusty, can't solve problem updating mod - please help


Recommended Posts

Superior_Goggles

 

I have been alternating between modifying and searching the internet for a couple hours, yet I can't remember how to properly write mods. Especially with the changes to make custom recipes craft-able. There are two errors I can't fix:
1.

Quote

2023-07-21T07:44:28 39.943 ERR XML loader: Loading and parsing 'items.xml' failed
2023-07-21T07:44:28 39.946 EXC Requested value 'LootGamestage' was not found.

2.

Quote

2023-07-21T07:44:28 40.333 ERR XML loader: Loading and parsing 'recipes.xml' failed
2023-07-21T07:44:28 40.333 EXC No item/block with name 'Superior_Goggles' existing at RecipesFromXml+<LoadRecipies>d__1.MoveNext () [0x000e7] in <0266d593c0f442fa83ca9e728741ee90>:0  at ThreadManager+<CoroutineWrapperWithExceptionCallback>d__51.MoveNext () [0x00044] in <0266d593c0f442fa83ca9e728741ee90>:0

 

Link to comment
Share on other sites

My guess: first error is causing the second.  Ive seen a few of these "ambiguous generic XML  errors with no indication what lone of code it failed on" and its a pain on the ass (TFP: please always give line numbers on all XML/parse errors if possible!).

 

im going to also guess that you are missing a required property or attribute called "LootGamestage" OR you put "LootGamestage" in a place it is not valid... or there is a weird typo.

 

anyway: these errors are hard to troubleshoot and if you make the module available for people to look at they may spot the error.  my general troubleshooting steps are:

 

- make sure the XML is "valid" in an XML parser. I use an editor to make my mods that does this automatically, however, all they do is make sure your XML tags match and you don't have a major XML formatting error (like an attribute is missing an = or a ". They do NOT check the data/strings inside the XML tags (as thats not something an XML parser can check.

 

- All the other "generic parsing errors" i have seen are because of typos or mis formatting the data inside the xpath or XML attributes and the game cannot parse the data. The XML is valid (all tags match, etc) just the data inside them the game uses has an issue and (my guess) is the game loads the xml (it parses ok) an then tries to read the data in it and it chokes on something.

 

Here are some Made up Examples of what it might be:

1. You have a non number in a numeric field. Like value="2," or value="2-"

 

2. you have a mismatched square bracket orin the xpath tag. Like;

<xpath="/items/item[@name='xyz'">
 

3. or you have a single quote where there should be a double quote, or similar, like:

<xpath="/items/item[@name="xyz"]"

 

3. maybe? You have an attribute or property in your item/block that is not valid. Like:

instead of "value="10" you have something like "number="10". 
or for a property you have a property that is totally wrong (like a typo in the property name) or is not allowed or recognized for that item/block like:

<property nane="bananas"\>
or

<promperty> ... stuff here ... </promperty>

Edited by doughphunghus (see edit history)
Link to comment
Share on other sites

There is also a lootstage_bonus in the biomes.xml file, not sure if the mod is trying to affect that value.

2 hours ago, seven said:

There is a link to the mod at the top of OPs post.

 

Couldn't download it this morning on a tablet  😏

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...