1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

civchecker - avoid crashes in your mod

Discussion in 'Civ4 - Utility Programs' started by davidlallen, May 25, 2008.

  1. davidlallen

    davidlallen Chieftain

    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.
     
  2. PotterDK

    PotterDK Chieftain

    Joined:
    May 23, 2008
    Messages:
    19
    What did you mean by: "Edit civcheck.config in your editor." My XML editor? I couldn't open it with that. Please advice.
     
  3. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    In your text editor, like notepad. It is a plain text file.
     
  4. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    Hi,

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

    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
     
  5. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    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.
     
  6. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    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:
     
  7. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    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.
     
  8. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    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...
     
  9. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    That is odd. Are you using a standard windows XP system? Several people besides myself have run it and gotten the GUI.
     
  10. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    I'm running Vista Ultimate. Might that be the culprit??
     
  11. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    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.
     
  12. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    I'll try at work. Just don't tell the boss! ;)

    [EDIT] Request to other Vista users to try this utility. Please report whether it runs or not...
     
  13. General Tso

    General Tso Panzer General

    Joined:
    Oct 12, 2007
    Messages:
    1,518
    Location:
    U. S. of A.
    I have Vista Home Premium and civcheck works fine for me.
     
  14. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    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:

    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 :)
     
  15. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    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:

     

    Attached Files:

  16. Arian

    Arian No more ghostbusting!!

    Joined:
    May 10, 2008
    Messages:
    2,088
    Location:
    The Netherlands
    I feel really stupid now! It's been there all the time!! Disregard all my previous posts. I apologize for the hassle, shame on me...
     
  17. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    Glad to know it is working.
     
  18. Omathaar

    Omathaar Chieftain

    Joined:
    Jun 30, 2008
    Messages:
    133
    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?
     
  19. davidlallen

    davidlallen Chieftain

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    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.
     
  20. Commander Bello

    Commander Bello Say No 2 Net Validations

    Joined:
    Sep 3, 2003
    Messages:
    3,794
    Location:
    near Koblenz, Germany
    @ 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 :)
     

Share This Page