Mac Mod doesn't work on PC?

curtadams

Warlord
Joined
Sep 30, 2004
Messages
146
I rescued a mod (see sig) and got it working (such as it is) on my Mac. For me, it works fine. But when I post it, most PC users apparently can't get it to work. It comes up with hundreds of XML errors, apparently. I even reinstalled Civ4 to make sure I hadn't tweaked something - still fine. What's going on? At least one user has assured me he's running 1.61 and has my current version.
 
You're not alone ... I downloaded the mod earlier this week out of curiosity, but didn't have time to look at it. It would make things far easier if you could give me a pointer to the XML files that are cited in the error messages on the PC version. I don't have a PC version so can't generate that information myself. Without those clues I have to look for needles in the one hundred or so XML file haystack in the mod :eek:
 
Naukadem posted some error messages:
Naokaukodem said:
How do we do this to work? I placed your mod (curtadams, from your profile) in the Mod folder, started the game with Advanced, loaded the mod and it restarted the game with one hundred errors.

I wrote down only the first one, it was something like that:

Failed Loading XML file XML\GameInfo/CIV4GamespeedInfo.xml [.\FXml.cpp:133]Error parsing XML File -
File: XML\GameInfo/CIV4GameSpeedInfo.xml
Reason Contenu d'élément non valide selon la DTD/schéma.
En attente de: {x-schema:CIV4GameInfoSchema.xml}iGrowthPercent.

Line: 13,10
Source: <Type>GAMESPEED_NORMAL</Type>
I believe that translates as "Reason: Contains an invalid element with respect to the schema". Note : I didn't alter that (or any) schema and AcidSphinx didn't either, as far as I can tell.

Naokaukodem said:
Yes it was 0.41, I deleted the old one and it was in the folder name therefore in the Civ4 mod screen.

I am sorry that I can't help you... I tried to read some Python lessons but I have been "stuck" around the fifth, too much of a headache for me.

In case, I wrote down the 4 first errors after the very first one above, knowing they are coming again and again or slighely differently:

Naokaukodem said:
Load XML call failed for GameInfo/CIV4GameSpeedInfo.xml.
Current XML file is: BasicInfos.xml

Naokaukodem said:
Allocating zero or less memory in CvXMLLoadUtility::SetVariableListTagPair
Current XML file is: GameInfo/CIV4CultureLevelInfo.xml


Naokaukodem said:
There are more siblings than memory allocated for them in CvXMLLoadUtility::SetVariableListTagPair
Current XML file is: GameInfo/CIV4CultureLevelInfo.xml


Naokaukodem said:
Tag: GAMESPEED_RECOMENDED in Info class was incorrect
Current XML file is: GameInfo/CIV4CultureLevelInfo.xml

Note: there are changes to the GAMESPEEDINFO file. AcidSphinx added 4 eras and I altered some rates for one of them.
 
Naokaukodem said:
Seems you are on your own on this one curtadams... couldn't you mod the game on one of your old PC and test your progs on your Mac?
I would have to buy the PC version of CIV4. There's no way it would run acceptably on my 4 year old PC, so it would be an otherwise useless purchase for me. It might well not run at all - I've had other modern games refuse to run on that computer. Seems like a lot to pay for an experiment.

If there were people interested in doing some work on this I'd be more inclined to blow money on it. But so far you're the only guy who's done anything (which I really appreciate!) and there's still not a whiff of anybody with any artistic inclinations.
 
It looks like you have a multiple TYPE entries in GameSpeedInfo.xml.

<Civ4GameSpeedInfo xmlns="x-schema:CIV4GameInfoSchema.xml">
<GameSpeedInfos>
<GameSpeedInfo>
<Type>GAMESPEED_RECOMENDED</Type>
<Description>TXT_KEY_GAMESPEED_RECOMENDED</Description>
<Help>TXT_KEY_GAMESPEED_RECOMENDED_HELP</Help>
<Type>GAMESPEED_NORMAL</Type>
<iGrowthPercent>150</iGrowthPercent>

which ties up with the error message

Line: 13,10
Source: <Type>GAMESPEED_NORMAL</Type>

posted by Naokaukodem

Probably not the only problem but you might as well work your way through them. :)
 
I think that *is* the first problem. It'll confuse the heck out of the software, and all the above reports probably relate to that error.

After you fix that you'll have to tell us what the next error message is ...
 
I suspect the Mac XML parsing code is not using the schema to pre-allocate memory for the structures. So it doesn't fall over when you assign two different values for the <type> element. It does seem unusual, as my overall impression has been that the Mac XML parser has been more fussy than the PC one - particularly regarding non-Latin text characters.
 
Naokaukodem said:
It shows that the file downloaded have been modified the 9/11/06 (in winzip), is this normal?
No, but I just checked and it is the right file. I changed it a few hours ago so it should be 9/16/06 for me and 16/09/06 for you (European style, right?) So something is odd about the date but the file isn't affected.

But just to be sure, check the GAMESPEEDINFO file in Assets/XML/GameInfo. It should be altered Sept 16. Maybe somehow you're getting the old download, which probably was 9/11
 
I looked at folders date instead of files one yesterday.

I still had a lot of errors. (the first one was different though, but I did not write it down)

However when loading the mod this morning, I didn't have any error. Plus I didn't see any modification. I'm sure I had the mod loaded as I could see the name in the upper right hand corner. I tried it several times, with the same result.
 
Naokaukodem said:
I looked at folders date instead of files one yesterday.

I still had a lot of errors. (the first one was different though, but I did not write it down)

However when loading the mod this morning, I didn't have any error. Plus I didn't see any modification. I'm sure I had the mod loaded as I could see the name in the upper right hand corner. I tried it several times, with the same result.

Have you cleared the cache by holding shift down whilst the game is loading? You should see INIT XML(uncached).
 
Looking at the zip you appear to be overwriting the files under Assets. :nono: This means that you are changing the original game files.

Your changed files should go under CustomAssets in your personal folder instead. This should then mean that you don't need a copy of all the other unchanged XML files in your download which will make it rather smaller and faster to download. :)

EDIT: Thinking about it perhaps it should go under the MODs folder in the main game installation folder instead. However either way there should be no need to have all the other files. The game should pick up missing files from the main game install folder.
 
Sam_Yeager said:
Looking at the zip you appear to be overwriting the files under Assets. :nono: This means that you are changing the original game files.

Your changed files should go under CustomAssets in your personal folder instead. This should then mean that you don't need a copy of all the other unchanged XML files in your download which will make it rather smaller and faster to download. :)

EDIT: Thinking about it perhaps it should go under the MODs folder in the main game installation folder instead. However either way there should be no need to have all the other files. The game should pick up missing files from the main game install folder.

The entire folder is supposed to go into MOD. That's how all the mods are done on the Mac, and I assumed the PC as well. I included all the files because the errors people were getting made me think there were file incompatibility problems (ie, from differences between Mac and PC) and I wanted to be absolutely sure all the XML was compatible.
 
Naokaukodem said:
I just did it, maybe the wrong way (i saw INIT XML(uncached) however) but it changed nothing.
So - let me get this straight - you can run a standard Civ game with the Mod unloaded, load the mod (seeing no errors), start up a game, and it's normal Civ4?

FWIW, the first difference will show up at leader choice. You will see a list of continents and relatively old cultures (Indo-European, African, etc.) rather than the standard set.
 
curtadams said:
So - let me get this straight - you can run a standard Civ game with the Mod unloaded, load the mod (seeing no errors), start up a game, and it's normal Civ4?

Exactly.

FWIW, the first difference will show up at leader choice. You will see a list of continents and relatively old cultures (Indo-European, African, etc.) rather than the standard set.

I have the usual Empires expressed in french, as usual. "Empire du Milieu", "Empire Britanique", "Empire Germanique"...

EDIT: wait, there's something wrong with the folders, it's Mods\Stone Age 0[1].41\Stone Age 0.41, and there is a Stone Age 0[1].41.ini file in the Mods\Stone Age 0[1].41\ folder. I can delete this folder, but what should I do with the INI file?

EDIT: Well, as this file were already in the Stone Age 0.41 folder, I just deleted it. I launched the mod and hundreds errors occured, very similar to those:

Failing loading XML file XML\GameInfo/CIV4GameSpeedInfo.xml. [.\FXml.cpp:133]Error parsing XML File -
File: XML\GameInfo/CIV4GameSpeedInfo.xml
Reason: Contenu d'&#233;l&#233;ment non valide selon la DTD/sch&#233;ma.
En attente de: {x-schema:CIV4GameInfoSchema.xml}Help.

Line: 108, 20
Source: <iGrowthPercent>67</iGrowthPercent>

LoadXML call failed for GameInfo/CIV4GameSpeedInfo.xml.
Current XML file is: BasicInfos/CIV4BasicsInfos.xml

Allocating zero or less memory in CvXMLLoadUtility::SetVariableListTagPair
Current XML file is: GameInfo/CIV4CultureLevelInfo.xml

There are more siblings than memory allocated for them in CvXMLLoadUtility::SetVariableListTagPair
Current XML file is: GameInfo/CIV4CultureLevelInfo.xml

Tag: GAMESPEED_RECOMENDED in Info class was incorrect
Current XML file is: GameInfo/CIV4CultureLevelInfo.xml

Tag: GAMESPEED_MARATHON in Info class was incorrect
Current XML file is: GameInfo/CIV4CultureLevelInfo.xml

etc...
 
Ok I've been doing a bit of playing this afternoon. I copied the folder Stone Age 0.41 tobe under the Mods folder so the path is Mods\Stone Age 0.41.

I then tried to load the mod and got this:

StoneAgeError.jpg


Apparently the HELP tag was missing from GameSpeedInfos.xml under GAME_SPEED_EPIC. After changing that I tried again and got this:

StoneAgeError2.jpg


I copied the entries from the standard CivImprovementInfos.xml for

  • IMPROVEMENT_OFFSHORE_PLATFORM
  • IMPROVEMENT_WELL
  • IMPROVEMENT_WHALING_BOATS
  • IMPROVEMENT_FARM

and had another try. I now got this:

StoneAgeError3.jpg


This error was for IMPROVEMENT_FISHERY so I copied the entry for FISHING_BOATS. So I then got this:

StoneAgeError4.jpg


After scratching my head a bit I pressed OK. I got the same message again and then it loaded. I was then able to start a game.

I've copied the two xml files to the attached zip. Copy the two files to the correct location and have a go. There's obviously still problems but this should get you going.
 

Attachments

Back
Top Bottom