[REFERENCE] "Smoke testing" a mod: how to detect most crashes before you start playing

WildWeazel

Carthago Creanda Est
Joined
Jul 14, 2003
Messages
7,325
Location
%CIV3%\Conquests\Scenarios\
In engineering, "smoke testing" is a somewhat tongue-in-cheek term meaning "turn it on (for the first time) and check for smoke". It's the most basic form of test to detect obvious and unavoidable failures. For software like game mods, "smoke" comes in the form of error dialogs, major graphic glitches, and of course crashes.

In this post I will recommend "smoke tests" that you can quickly perform to detect most of the potential causes of crashes and major errors in Civ3 mods. Depending on the scope of your mod, you may want to do any or all of these before starting a new game or uploading the mod for others to try. Most but not all of these issues are caused and can be corrected outside of the BIQ, meaning that you can fix them for a game already in progress. But still, it's better to find and fix these problems before you've released your new mod to the public and someone is halfway through their first game!

Create a "smoke test" scenario
  • If you're not already using it, check your BIQ with the Cross-Platform Editor by @Quintillus! It can selectively detect many errors including subtleties that are not covered here.
  • Make a copy of your BIQ and create a custom map
  • IF you have modified any map graphics, add each terrain type, overlay, resource, city style, etc of the types you have touched to the map. At this point you can detect PCX issues right here in the editor. Look for magenta, green, purple, or other "special" colors that are supposed to be (semi)transparent, indicating palette issues, or misalignment, etc.
  • Place one of every unit type on its own tile, belonging to Player 1.
  • Place a city belonging to Player 1 with every building in it - except for one spaceship part, if you're on a system where the game crashes when launching the spaceship.
  • Enable Custom Player Data.
  • In Player Properties, set Initial Era for Player 1 to Future Era.
  • In Scenario Properties, enable Debug Mode and set Number of Players to the maximum.
Fire it up!
  • Select your smoke test scenario and world settings
  • On the game setup screen, select each civilization to show the leaderhead
  • At the last one, click the description button to open the Civilopedia
  • Go up to the index (where all pages are listed) and quickly page through every entry. Besides crashes, watch for missing/wrong icons and "too many links" errors.
  • Start the game!
  • Open the science advisor and click through each tech era (check the arrows), and any other screen you may have edited.
  • Open the city screen (the one with all the buildings) and scroll through the whole buildings column and the build menu.
  • Use your settler unit to build a new city.
  • If you really want to be thorough, interact with the other units to check animations and sounds. If you got here without problems, the most common issues with units have already been screened.
  • Cycle the turn.
  • Make contact with AIs and then open the foreign advisor. Swap out leaders as needed.
  • Retire and click through the end game screens.
In short, try to render as many of your art files and text entries to the screen as possible. The game will catch some errors (that is, crash) when processing the BIQ, and many others the first time the data is to be displayed. By cycling through all of this content we're forcing the game to process the corresponding data and fail early.

If you've made it this far, congratulations. This method should detect a large majority of the most common causes of crashes and glitches. Of course there are still things that could go wrong: for example we didn't test all leaderhead graphics, or era transitions. But you're much less likely to be surprised by an untimely crash when you or someone else starts playing a real game. Now, actually fixing any errors you may have come across is outside the scope of this post - there are plenty of other tutorials for that!
 
  • At the last one, click the description button to open the Civilopedia
  • Go up to the index (where all pages are listed) and quickly page through every entry. Besides crashes, watch for missing/wrong icons and "too many links" errors.
O that Firaxis had done so with its translated versions.
 
Top Bottom