Extra fields in XML

Started by KingOfAwesomnia, December 28, 2014, 12:26:43 PM

Previous topic - Next topic

KingOfAwesomnia

Hi all

As you may have seen over at the mod tools forum, I'm making a mod manager / game launcher. For some of the extra features I would implement, I was thinking of adding fields to the About.xml file in the mods (like <modVersion> and <modSettings>). I tested this and the game doesn't seem to make a big deal out of it (it runs just like normal) but in the debug log I can see XML error messages appear because of the extra fields.



Could this potentially break a mod / the game or should it be okay to include the extra properties in About.xml?

The game seems to work just fine, and I know that in general XML should be scalable like this, but upon seeing the errors I thought I would ask if anyone knows more (I'm not very familiar with RW modding itself).

Igabod

I put the <modVersion></modVersion> field in my About.xml for the new release of my plants mod and I haven't seen any error messages about it yet. I'll let you know if someone reports it on my mod thread.

mrofa

This is how the game reads the about.xml
using System;
namespace Verse
{
public class ModMetaData
{
public string name = string.Empty;
public string author = "Anonymous";
public string url = string.Empty;
public string targetVersion = "Unknown";
public string description = "No description provided.";
}
}
All i do is clutter all around.

Igabod

just now noticed the warning message in the debug screen. It is only a yellow warning though so it didn't force the window to pop up and I had already fixed the errors with my mod before I added that in to my about.xml which is why I didn't see it before. Does this mean the mod installer won't be able to utilize that extra field in the about.xml?

mrofa

Nope it wont, it will only read the stuff you see in the code and the .png file if its in the folder althrugh didnt find that part so maybe thers something in there
All i do is clutter all around.

KingOfAwesomnia

#5
Quote from: Igabod on December 28, 2014, 02:34:34 PMIt is only a yellow warning though so it didn't force the window to pop up
This was my main concern, I was a bit confused by the fact that it said "error", which in my experience means something that will make the program go wrong. But as long as it's just a warning, it should be okay.

Quote from: Igabod on December 28, 2014, 02:34:34 PMDoes this mean the mod installer won't be able to utilize that extra field in the about.xml?
My launcher will work fine with the XML, I was just concerned that the extra data would mess up something ingame.


EDIT: I'm going with an extra xml file after all.