jkoppel/project-ironfist

creatures.xml

Closed this issue · 4 comments

Okay this is driving me nuts, I keep running into issues when switching between branches / updating from the master branch with 'Unable to load creatures.xml' errors.

There are two different versions of the creatures.xml file, one in the /bin directory (29kb), and another in the /installer directory (31kb). They seem to differ in that the latter has

<?xml version="1.0"?>
<creatures xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="creatures_xml.xsd">

included, and when debugging on my machine, only the 31kb version with this schema info gets parsed correctly. I always have to end up copying the 31kb version over from the /installer directory over to the /bin directory before I can debug.

Actually, there's really only one creatures.xml file: ironfist/data/creatures.xml .

The copy in the installer folder is only there for the convenience of anyone building the installer. The one in the bin folder is only there for the convenience of debugging. Apparently it's not being so convenient, so I removed it.

Okay. I still have to move the file from the /bin folder to the /bin/data folder because that is where the binary looks:

const char* CREATURE_DATA = ".\\DATA\\creatures.xml";

The game also only seems to spit out "Error loading creatures.xml. Try reinstalling Ironfist." regardless of if the file is not found, or if the file is found but there is a parsing error, it might help to change this.

Yes. That is indeed where the file is located in a typical Ironfist install.

Are you saying you want to have a full Heroes 2 install in your ironfist/bin folder to make testing easier? That's perfectly doable; just put all the necessary files there and don't check them into git

I'm adding a task to our Trello about the parsing error message thing