View Full Version : Events Modding Error...need help, please


Seidrik_The_Gray
Aug 09, 2007, 02:34 PM
I am working on modding an event for BtS. Here is the error I get when starting a new game with my mod:

(I actually had three critical errors, the others were because these critical errors kept all of the invormation on events from loading)
First error window:

LoadXML call failed for Events/CIV4EventInfos.xml

Second error window:

Tag: TECH_CIVILSERVICE in info class was incorrect current XML file is:xml\Events/CIV4EventTriggerInfos.xml

(I had another one for TECH_BRONZEWORKING...these were both in the orPrereq section of my EventTriggerInfos.xml for the event.)

Third error window:

Failed Loading XML file xml\Events/CIV4EventInfos.xml

[.\FXml.cpp:133] Error parsing XML File -
File:xml\Events/CIV4EventsInfos.xml
Reason:Element content is invalid according to the DTD/Schema.[]
Expecting:{x-schema:CIV4EventSchem.xml}BuildingClass.[]

Line: 23962, 34
Source: -


Please help me, thank you!

JeBuS27
Aug 09, 2007, 04:25 PM
Well, a schema problem usually means you've put in a tag that doesn't belong in that file, or you've left out a required tag. Another possibility is that if you named the event "TECH_CIVILSERVICE" it could be clashing with the actual tech of that name. The event should probably be named "EVENT_CIVILSERVICE" or some such. Without seeing your XML files, though, these are only guesses.

Seidrik_The_Gray
Aug 09, 2007, 06:36 PM
I found out the problem, I think...I am building a mod, when I should be trying to set this up as a modular piece of xml and python code. As a mod, I have to copy allot of the original game data...and I think that's causing a conflict, since the game also runs the same xml and python files, so the files that are not uniquely named conflict via the schema files.

I'm going to try just building a modules folder in custom assets and hope it lodes as just the xml and python, modularly loaded with the other game files...fingers crossed.

Seidrik_The_Gray
Aug 09, 2007, 09:20 PM
Down to just a few errors now...found out how to get it done as a mod, but am still running into some frustrating errors.

Here are some screen captures:
157823
157824

Here is the zip of my tiny mod in progress:
157828

snarko
Aug 10, 2007, 08:28 AM
It tells you the line, it tells you what it's expecting and it tells you it's getting something else... not too difficult to solve based on that.

The problem is this:
<UnitClassPromotions/>
Since it ends with /> this means: There are no UnitClassPromotions. Don't look for any.
Then, on the next line, you have:
<UnitClassPromotion>
But you already said there aren't any, so it's not looking for it.

<something> <-- this has a value, look for it.
</something> <-- this ends the value, look for the next one.
<somethingelse/> <-- this has no value, look for the next one.