civchecker - avoid crashes in your mod

davidlallen

Deity
Joined
Apr 28, 2008
Messages
4,743
Location
California
When you are modding XML files, the game should check for all kinds of missing definitions when it loads your XML. It checks for some, but not all. If you have used a symbol but the definition is missing, the game may randomly crash, either at startup or during play. This checker tries to catch all kinds of missing definitions so your mod doesn't crash.

See the user documentation for full details.

I have submitted it to the forum download page, but it is in the "moderation queue".

You can download the latest version of the program from this link.
 
What did you mean by: "Edit civcheck.config in your editor." My XML editor? I couldn't open it with that. Please advice.
 
Hi,

I tried to check my mod and all I got is this:

Edit D:/Games/Civilization 4/Beyond the Sword/CivCheck/civcheck.config and then use File=>Run

This is in the config:

Code:
# The installation path is probably right.  Change it if you installed
# the game somewhere else.
set install_dir "[COLOR="Red"]d:/games/civilization 4[/COLOR]"

# If you have files in your local CustomAssets you want checked, 
# uncomment the next line and make sure the path is correct.  For
# non-English language installations, you will need to change "my documents"
# to the right name also. 
# add_directory custom "c:/documents and settings/jena/my documents/my games/beyond the sword/customassets"

# If you want to run this on a mod, uncomment the next line and make
# sure the path points to your mod.
[COLOR="red"]add_directory HitM2 "$install_dir/beyond the sword/mods/History in the Making2/assets"
# add_directory fury "$install_dir/beyond the sword/mods/fury road/assets"[/COLOR]

# If you don't have BTS or warlords, comment out the corresponding lines
add_directory bts "$install_dir/beyond the sword/assets"
add_directory warlords "$install_dir/warlords/assets"
add_directory vanilla "$install_dir/assets"

# Uncomment these lines to enable some more verbose reports
[COLOR="red"]report_filenames
report_definitions
report_unused[/COLOR]

....unchanged

My changes are in red

I'd appreciate your advice.

Regards, Arian
 
I tried to check my mod and all I got is this:

Edit D:/Games/Civilization 4/Beyond the Sword/CivCheck/civcheck.config and then use File=>Run

When you used the File=>Run menu choice in the window, did any output appear in the window? Afterwards, you should open your text editor on the civconfig.txt file it produces.

I have noticed that the 3.17 patch appears to generate more than a hundred undefined art references. As far as I can tell, these are real errors in the distribution files. In the 3.13 version there were only four undefined art references, which is ignorable. For over a hundred, I will have to add something to the checker so your own errors don't get buried among these Firaxis errors.
 
I haven't upgraded to 3.17 yet.
But I must be doing something wrong.

Running from the DOS-commandprompt:

D:\Games\Civilization 4\Beyond the Sword\CivCheck>CivCheck

I now get this message:

Code:
Edit ./civcheck.config and then use File=>Run

It beats me :confused:
 
I haven't upgraded to 3.17 yet.
But I must be doing something wrong.
Running from the DOS-commandprompt:

OK, let me stop you here. Instead of running this from the DOS prompt, please double click on the executable from the windows explorer. This will launch a *GUI* and you will see that there is a File=>Run menu.

I am kind of surprised it starts in a non-gui mode when run from a DOS prompt; I did not think anybody would do that.
 
OK, let me stop you here. Instead of running this from the DOS prompt, please double click on the executable from the windows explorer. This will launch a *GUI* and you will see that there is a File=>Run menu.

I am kind of surprised it starts in a non-gui mode when run from a DOS prompt; I did not think anybody would do that.

I did try to run it from the explorer and then got the first message. Later I tried to run it from the DOS-promptm and got the second message. The GUI just doesn't show up...
 
That is odd. Are you using a standard windows XP system? Several people besides myself have run it and gotten the GUI.
 
I'm running Vista Ultimate. Might that be the culprit??

As far as I know nobody has tried civchecker on vista, and I don't have access to a vista machine. Do you have access to a windows xp machine? It doesn't have to have the game installed. But, if you could just install the small civchecker program and verify that it comes up for you on XP, then we would know it is a vista specific problem.
 
I have Vista Home Premium and civcheck works fine for me.
 
Still can't get it to work :(

The GUI doesn't show up. Tried to check the original game (no mod) but still get this message:

Edit D:/Games/Civilization 4/Beyond the Sword/CivCheck/civcheck.config and then use File=>Run

I've edited civcheck.config about a dozen times but it seems the program can't find the civcheck.config (all files are in the same folder) :confused:

Must be me, I guess :)
 
Still can't get it to work :(

The GUI doesn't show up. Tried to check the original game (no mod) but still get this message:

The problem is that the GUI isn't showing up. There is no way I can think of, where that should even happen. It does not matter what is in the config file or the directories you are checking. Something is different about your computer, where it works on mine and others. The message you are seeing is supposed to be printed into the GUI log window. I don't understand why the GUI is failing to be created on your computer.

Have you had a chance to try it on your windows XP computer? The game doesn't even need to be installed, I just want to know if the GUI comes up. This is what it should look like:

 

Attachments

  • civcheck.gif
    civcheck.gif
    14.6 KB · Views: 5,117
Hey, I've been having a problem with my mod, but the civchecker says I have no problem files except for undefined text strings. Could those make it ctd?

There's something like 13 civs in the game, and if I play any of the first 4 civs, the game works fine...until I go to the next turn, then ctd. I suspected something was happening with one of the fifth-thirteenth civs, so I tried playing one turn as any of them, and as soon as the game loads, ctd. It could be a prob with just the 5th civ, but I don't know what it could be yet... Does this sound like something an undefined text string could cause?
 
Just to be sure, when you say "undefined text string", do you mean that you get messages like an undefined reference for TXT_KEY_something? If those are the only undefined references, it is unlikely to cause a CTD. The most common crash I have seen is a unitclass given as a possible upgrade, but the unitclass isn't defined.

Are you running the 3.17 patch or something earlier? I ask because 3.17 itself, without any mods, causes a large number of undefined references, and it is possible to miss one of yours among a large number of theirs.

I wasn't quite sure what you meant by playing one turn as any of the civs. Are you using a SDK mod such as autoplay which allows you to switch players? I don't know anything about those, but I suppose they are widely used and unlikely to cause a crash.
 
@ davidlallen:
Thanks for your effort and great work.

I just checked and it seems to work as you have described.:goodjob:

As I was checking the RoM mod, which comes with some fpk files, I assume that the >1000 missing art definitions might be due to the fact that these definitions should be in those files?

Anyway, that is something for me to check...

Thanks for your little program, I assume it will become very helpful for my own modding attempts :)
 
Top Bottom