View Full Version : Add a building, CTD. Take building out, CTD.????
wotan321 Mar 17, 2007, 10:14 AM I've added buildings to mods for years, no problem. But I am trying to add a building to a mod with weird CTDs.
I cut-n-paste barracks in the civ4buildinginfos.xml file, change the buildingtype and type. Change the description.
I go into civ4buildingclassinfos.xml, cut-n-paste barracks, change the type and default building.
Load mod. Loads fine.
Run a scenario, CTD.
Go back, edit OUT all I did before, save files, clear out the cache, run the scenario, CTD.
What??
If I delete the 2 files, and restore backups of just those 2 files, no CTD.
What am I missing?
woodelf Mar 17, 2007, 10:16 AM Without seeing the files I could only guess Custom Assets. The only other building crashes I've seen are when a building is created and the ART_DEFINES is incorrect. That's a CTD everytime.
wotan321 Mar 17, 2007, 11:09 AM Thanks for the help.
The artdefines_building.xml file referenced is the same as barracks, I don't change that. I ONLY changed the type and the building class and the description.
I used "Beyond Compare" to compare the backup and the editted/corrected file that crashes, and they are EXACTLY the same, no difference.
What would Custom Assets have to do with it? I don't touch that.
woodelf Mar 17, 2007, 12:05 PM I've never touched Custom Assets either so I don't know exactly what they do, but by "clearing" them I've solved issues in the past. Normally I find my Custom Assets folder here:
My Documents\My Games\Sid Meier's Civilization 4
and rename it to something else (instead of deleting it) just in case I'm screwing something up. I then create a new Custom Assets folder in the same spot. It's worked three times for me so far most likely because I try out so many mods that modify all sorts of files.
strategyonly Mar 17, 2007, 12:41 PM Best thing to do it copy here what you did and let someone take a look at them, i bet it has to do with Building class? we'll see, if you put them here ok??
wotan321 Mar 17, 2007, 07:06 PM I appreciate all the feedback. Here is what I have discovered in my troubleshooting. It makes no sense to me, but its true.
If I make backup copies of the xml files, in this case a file called "copy of civ4buildinginfos.xml" and "copy of civ4buildingclassinfos.xml", and try to start a scenario, it crashes. If I remove the "copy of" files, the scenario loads.
I am glad I found this, because it is gonna save me a lot of money on liquor, as that was my next troubleshooting step....<g>
Has anyone ever seen this before, or perhaps someone could EXPLAIN why this occurs?
asioasioasio Mar 19, 2007, 01:44 PM I've seen this in patch 1.1 for 1939 Mod :D
i don't know why it's happens, you may true to enter changes one more time - sometimes it helps
Yakk Mar 19, 2007, 02:11 PM Civ4 might be searching for files matching certain patterns, and then trying to hook them together, or otherwise barfing on them.
To solve: Don't pollute your mod directories with unused .xml files. If you want to leave the file there, call it:
blahblahblah.xml.copy
wotan321 Mar 19, 2007, 04:50 PM Thanks Yakk, that makes sense but I have never heard of such a thing in a game. Maybe Firaxis will show up and clarify why this happens.
asiox3, It WAS in the 1939 scenario. Is this something you programmed in? <g>.
Yakk Mar 19, 2007, 05:15 PM There is something like that for text files -- I ran into a mention of it somewhere.
The idea is that it makes adding content to Civ4 easier. Just create a file with the right name patterns, instead of having to copy the old content and modify it.
Wish I could remember where I saw that feature mentioned ... I think it was in the modular XML loader thread...
primordial stew Mar 20, 2007, 02:34 AM The game loads assets/xml/*/*.xml, and assets/xml/text/* (any file in the text dir will get loaded).
in the civilizationIV.ini, just enable logging. then in the My Documents\My Games\Warlords\Logs\xml.log it will list all the files that get loaded. It doesn't give the full path, but if the file exists in the mod somewhere it will be used instead of the one that comes with the game.
BTW, my mod is CTDing as well.. various graphics problems it seems. I'm going to try to write a script to go over the art files and look for missing data. The game is just no help at all here. What would be really cool is if some SDKer could add a check before a graphics file gets loaded to check for it's existence. It would save soooo much pain!
asioasioasio Mar 20, 2007, 02:46 AM The game loads assets/xml/*/*.xml, and assets/xml/text/* (any file in the text dir will get loaded).
in the civilizationIV.ini, just enable logging. then in the My Documents\My Games\Warlords\Logs\xml.log it will list all the files that get loaded. It doesn't give the full path, but if the file exists in the mod somewhere it will be used instead of the one that comes with the game.
BTW, my mod is CTDing as well.. various graphics problems it seems. I'm going to try to write a script to go over the art files and look for missing data. The game is just no help at all here. What would be really cool is if some SDKer could add a check before a graphics file gets loaded to check for it's existence. It would save soooo much pain!
I agree with that - it would be beautiful to have this tool.
http://forums.civfanatics.com/showthread.php?t=212704
It's connecte to wotan321 work - it gives a lot of weird CTD :(
I'll try to use this .log file - maybe it would give answers
|
|