Mods: Mac to PC compatibility?

Flintlock1415

Emperor
Joined
Feb 24, 2008
Messages
1,057
Location
MN
As we all know, and know well, most PC mods simply don't work on Mac computers for various reasons. Yet, when a Windows user wants to use My mod, they run into a million and one XML errors. :mad:
There is only one other mod made on a Mac that I'm aware of, and I PMed the creator to see if he had any solutions for it.

I was wondering if anyone here knows about the differences in XML between Macs and Windows. If anyone here who runs both windows and Mac would please check this out for me or at least provide some info, I would be eternally grateful! :D
 
I've gone through the XML errors that are thrown when your mod is loaded in the Windows version of Warlords, and resolved them all. Basically, the Mac XML parser doesn't like some things that Windows will accept, and vice versa.

However, the mod still doesn't load in Windows. Warlords crashes when it gets to InitFonts. Could be something incompatible in the graphics? I tried deleting all .DS_Store files from the Windows copy of the Mod, just in case it was confusing those with real files, but that didn't fix it. I may have missed one or two, though, as there are a lot of folders.

I also went through and fixed the line endings on all the other XML files that needed it, though it doesn't look as if line endings were a problem.

Below is the list of changes I had to make to eliminate the XML errors, and I have attached a zip file containing the entire Battle of Hastings XML directory including those changes. This version gets through both the Mac and Windows XML parsers.

Spoiler XML Error Fixes :

Battle of Hastings issues

/XML/art/CIV4ArtDefines_Building.xml

Space at the start of the first/header line is not allowed.

/XML/technologies/CIV4TechInfos.xml

Straightened out line endings by opening in BBEdit, selecting all and using Normalise Line Endings
That didn't solve the problem with this file, but made it far easier to see its structure.
<bRiverTrade> is not an allowed tag according to the schema, and I couldn't persuade BBEdit to find it in any standard files in my Civ4 folders.
Deleted all lines containing that tag, and that file loaded OK.

/XML/buildings/CIV4BuildingInfos.xml
Fixed line endings
The schema only allows <Bonus> elements in <PrereqBonuses> tags.
Changed the tags <PrereqBonus> to <Bonus>.
Extra period at the end of line 5109 removed

/XML/units/CIV4UnitInfos.xml
Fixed line endings
<UnitClassUpgrade> can't be empty.
Line 7469 Changed <UnitClassUpgrades> to <UnitClassUpgrades/> and deleted the next three lines.
Lines 7628, 7808 Deleted two lines at each location.
Line 7988 Deleted 4 lines.

/XML/civilizations/CIV4CivilizationInfos.xml
Fixed line endings
<Building> tag can't be empty.
Line 26 Changed <Buildings> to <Buildings/> and deleted the next lines to and including </Buildings>.
Lines 90, 451, 514, 569 ditto
 

Attachments

Thanks for all the work Alan, I really appreciate it! :) I don't have much time to work on this right now, since I just got home from my last basketball game of the season (a first round playoff loss... :cry: :mad: :mad: :mad:) and now I have to write an essay before class starts in 7 hours. [pissed] :suicide:
I've got spring break coming up next week and a forgotten Target giftcard with Civ Complete written all over it, so I will be of more help tomorrow and over the next week. :D
 
Well, wouldn't you know it, Target only carries Vanilla Civ and BTS, so I'll just wait until my birthday (a month & a half away) to get it, since I'm not dropping $60 on a game I already have. :sad:
Anyway, I think I'll link this in the BoH thread and see how the other users handle it.

Do you think this could have anything to do with the differences in the patched xml versions? Nwabudike Morgan's mod was made in 2.13, and the only problems he had was with loading the map. I could merge the 2.13 files with my files using FileMerge, but I don't want to go through unnecessary pain with this.

Does the Windows version draw the Gamefonts from different places? I don't have any custom Gamefonts in any of my folders, but N.M.'s mod uses the on included in the Omens folder.

One final thing I noticed is the N.M. deleted the art references to the units that were no longer in the mod; is this commonplace in Windows modding?

Like I said, I'll link to this thread so Windows users can see if they are able to assist with this problem as well.
 
Dled it an tried it out (deleted the original XML assets and placed this one in) and the game crashed on startup with an error in the ntdll.dll file.
Slightly OT, but if you need a soundtrack, I could get you the soundtrack from Medieval Total War 2.
 
I updated the download and opened a yet another thread in the main C&C forum to provide some heavier traffic to my mod. I'm sorry for the rapid thread spawning, but I would like more than two people to provide help for me. (and thank you both very much for the help! :D ) I've worked much to hard on this to give up, and I am determined to find a solution. Please send any future support over in the new thread and thank you for the amazing help! :goodjob:
 
Dled it an tried it out (deleted the original XML assets and placed this one in) and the game crashed on startup with an error in the ntdll.dll file.
Slightly OT, but if you need a soundtrack, I could get you the soundtrack from Medieval Total War 2.

For my education ... How do you know that it's the ntdll.dll file that crashed? The crash report on my system lists a large number of .dll modules running, and I haven't worked out how to isolate which one the crash occurred in. The compatibility report that is generated includes details of the .dll modules loaded by Warlords, and also the windows32.dll and ntdll.dll files, but doesn't point a finger at any specific item.
 
On the error message, it said the problem was related to the ntdll.dll file.
Just checking to make sure I added the new XML in right, I deleted the entire XML folder, and pasted the entire new folder in. Was I supposed to replace the filed individualy?
 
You should be able to replace the entire XML folder inside "Battle of Hastings/Assets/" with an unzipped copy of the file I uploaded. When I load the mod with that set of XML installed the launch progress indicator completes the InitXML successfully, then InitEngine. When it gets to InitFonts Warlords crashes.

The crash displays a message box with an invitation to send a report to Microsoft, and there's a link to display the error log that would be sent. Scrolling through that I just see a lot of modules, then a lot of hex dumps. I don't see a specific ntdll.dll message. I'm running Windows XP SP3.
 
I've tried that. It makes no difference here.

[Edit] Well, actually, I think it may crash a bit earlier - immediately as the InitEngine segment ends and before InitFonts appears. I'll try reverting and see if the timing also reverts.

[Edit2] No, it now seems to crash before getting to InitFonts, but it may just be a timing thing in the interface.
 
I've never built a mod in my life, only adapted existing ones for Mac compatibility. So I don't know what is required to make one work, and I don't have any ideas as to why yours isn't working. The logs don't give any clues that I can understand.

Using the same random guessing strategy as you are on, I've tried deleting all the empty folders and removing the WorldBuilder file in case they were affecting it. Nothing I've tried has any significant effect, so I imagine there has to be a problem with your graphics files or a logical error (not a syntax error) in your XML.
 
One more quick guess I have is to try dropping the attached folder into the assets/res folder. I don't really think it would work, but it is worth a try, I guess. :crazyeye:

Another more extreme method is to use Filemerge to smash together the 2.13 files with my current XML files. (I built this with 2.08, in case you don't remember.) I don't want to do this if it probably won't have an effect, so I'd like your opinion. :confused:

Oh, I just got one more idea. I deleted four of the religions and a few resources, so could that be causing a crash? I might replace the religions/resources and post them here.

Thanks for testing this stuff out for me, I really do appreciate it! :goodjob:
 

Attachments

Hey Flintlock,

Loading your mod on Windows (yeah, I play Civ on the Windows side), the mod loads okay when I load it manually (although your "fixed" version of the XML files forgot to delete the errant space at the beginning of the Building Art_defines file, once I fixed that it loaded okay). I get your splash screen and choose your scenario, and then it crashes with no useful errors in the logs. Very strange.

Just one more data point for this puzzle. Sorry I can't be of more help right now, but I'll let you know if I think of anything.
 
Oh, I just got one more idea. I deleted four of the religions and a few resources, so could that be causing a crash? I might replace the religions/resources and post them here.

There is this warning at the beginning of CIV4BonusInfos

Code:
<!-- WARNING: It is not recommended that you remove Bonuses due to complications with the LSystem -->

Oh -- also, including a "good" res folder makes no difference (on my machine at least).
 
Wow, great find Sedna! :goodjob: It seems I am now to the point that NwabudikeMorgan's mod got to; a loaded mod w/ a crash when loading the scenario. At least I am one step closer to fixing up this mod. I went ahead and put the resources back, as I didn't see that warning. (I'm not much for reading until I run into trouble. :crazyeye: )
Hopefully we can resolve this issue and I'll finally be able to do some real work on my mod! :)

p.s. I figured you had to use some form of Windows with RFC Europe. I'll definitely check it out once/if I get BTS! :D

EDIT: One thing I noticed when comparing a my map (& Nwabudike's) with Windows made ones is the Modpath tag. It is blank in my mod, but the name of the mod is typed in in the Windows mod (namely Napoleonic Europe.) Maybe if you tried typing in Battle of Hastings into that tag it could help?
 
I tried downloading the latest version to ensure that we are on the same page. I fixed the space at the start of /XML/art/CIV4ArtDefines_Building.xml again, and used your /res/fonts/ folder in place of the empty one. Warlords still crashes for me after InitEngine, so I must be doing something different from sedna17.

I tried moving the mod from the \My Games\...\Mods\ path into the \Program Files\...\Mods\ path, and it still crashes.

I tried loading it manually and from the .ini file with no change in behaviour.

Also, I looked in the xml.log and couldn't see the warning message sedna17 posted above. It just gives:

[8269.375] Loading XML file XML\Terrain/CIV4BonusInfos.xml
[8269.390] Load XML file XML\Terrain/CIV4BonusInfos.xml SUCCEEDED
Where should I be looking for that warning?
 
Warlords still crashes for me after InitEngine, so I must be doing something different from sedna17.

I tried loading it manually and from the .ini file with no change in behaviour.

All I did was put it in \My Games...\MODS\ and then 1) Run Warlords, 2) Advances>Load Mod. However, I must say from our recent problems with RFCEurope crashes that sometimes a problem can manifest itself in different places on different systems.

Where should I be looking for that warning?

That warning is in the Resources xml file. Assets/XML/Terrain/CIV4Bonuses.xml (or something like that).
 
Back
Top Bottom