Problem: Crashing Mod

Intricarus

Chieftain
Joined
Mar 20, 2009
Messages
9
Location
Finland
Greetings, fellow Civ players!

I have encountered a problem, and I would be most grateful if any one of you could give me a helping hand.

Allow me to start from the very beginning.

I have been creating my first mod for some time now, and after finishing everything (and finally getting rid of all the xml typos and errors that prevented the mod from running...), I, exhilarated of course, started a new game to enjoy the first fruit of my labour. And everything worked just perfectly -- all the techs, buildings, units, improvements and resources -- until I reached turn number 44.

At that point, the game crashed and threw me back to Windows.

Surprised, I tried to load the last save and tried again -- with the same results. Somewhat more frustrated, I started an entirely new game, reached turn 44, and experienced the same crash again.

After this, I've tried several different games with different map sizes, different speeds, with and without events, with random seed enabled -- and without success. The turn number is somewhat different when I use slower game speed (around 88 with Marathon, etc.), but the crash always eventually occurs.

I'm sorry if all this sounds a little vague, but I'm a bit clueless myself. I would appreciate any ideas and suggestions you Wise Veteran Modders might have, and I will try to provide more details if needed and if I can (as said, I'm still rather new in this whole modding business).
 
Unfortunately, Civ itself doesn't give any error messages that would certainly help to solve the issue -- I just get the regular "This program has performed an illegal operation and will be terminated" error message by Windows.
 
This sounds like an art bug. Try to build whatever you've added in your cities, ie, use world builder, give yourself the techs, and then click on the button, see what happens.

Also turn on Python Exceptions and the logging errors features in the main civ ini file. And check your dump. Though to be honest if it's an art related bug, like it sounds like, you probably wol't get anything useful from the crash dump (but you never know).

Also based on what you've told us, no one can really help you. You need to try to isolate the cause further. Usually things like this are caused by bad buttons 90% of the time I'd say (remember custom buttons can't have a , in them--I'd wager a donut a , is causing your problem). That or Ethnic Unit art pointing to non existant things in the relevant art defines file.
 
Once i pointed a building to the wrong place; I forgot to put an extension .dds, and when i tried to build "The Terracotta Army", it immediately crashed. It had displayed a pink square, but when fixed it, it ran perfectly. Check the Civiliopedia for missing entries, pink squares, etc. That might help track down the source.


PS: I wouldn't take phungus' bet; donuts are very tasty and i wouldn't want to lose it.
 
All buttons seem to work well, and I have no problems with unit/building graphics either. I've tested them all, and building them no longer causes errors (I did have some button-related problems before, but that's already fixed). Checked all , in art defining xml, too.

Perhaps I should just start all over, creating a new mod and moving the old mod's xml files one by one to the new mod to see if I can pinpoint the problem.
 
Hmm. I experimented with my idea, created a new mod and transported the old xml files. After sorting out the few xml-related errors Civ gave me (a few things I forgot to change initially)... the game crashes while loading the xml files and throws me back to Windows, again with the same generic Windows error message.

What bothers me is that I solved all the xml errors Civ itself gave me; there's no feedback whatsoever about what I may have done wrong this time.

I guess I am not meant to become a Great Modder. *sighs* Or perhaps I should just try to take smaller steps instead and triple-check everything while doing so.
 
What bothers me is that I solved all the xml errors Civ itself gave me; there's no feedback whatsoever about what I may have done wrong this time.

This is almost always caused by a refference to a non existent ArtDefines entry.
 
Hi! I'm back! ;)

This time, I got my mod working perfectly. Everything checked out okay. I was even able to play! Yay.

Then, after triple-checking that all was indeed well, I added two new buildings to my mod. These use pre-existing art, so nothing new was added to that section. Basically I just added to new entries to building type info and building class info, plus the texts (like I have done countless times before).

Surprise, surprise. Now the mod crashes every time when loading the xml.

Quickly, I deleted my latest additions. Didn't help -- I can't load the mod anymore, and I feel like banging my head against the wall.

To me, this doesn't make much sense.

I'm baffled, and certain that Civ hates me. Any ideas? :confused:
 
Oh, never mind. I managed to get the mod working again. Double-yay. :)

It seems the culprit was an art defining entry after all.

Funny thing, you know. This particular entry worked perfectly YESTERDAY. I didn't change it at all! Perhaps it corrupted itself in a midnight orgy (and I wasn't invited).

Sometimes, I feel like computers are controlled by a malevolent sentience whose sinister object is to make us all go insane. :crazyeye:

Oh. And this time, I'm back-uping the entire XML file. Just to be certain I don't have to start all over again when my mod decides to stop working...
 
Back
Top Bottom