WEEK 3: Workshop - Debug Mode

Instructor: Raeven Davis

Hacked objects are bound to have some coding errors. In worst case scenarios the game crashes or may lock up so badly that files are corrupted. Even minor errors end up using extra resources, causing the game to run slower, perhaps to the point the game isn't playable on lower end machines. Other "minor" errors can reset the sim or the lot disrupting gameplay. Badness all 'round

To avoid this you must test your objects thoroughly and this is done by testing your objects while the game is running in "Debug Mode." Debug mode was designed as a troubleshooting tool and will help you pinpoint errors in your code, saving you searching blindly and helping you to produce error free objects. Good stuff.

STARTING THE GAME IN DEBUG MODE

If you already have a desktop shortcut to the sims you can right click that and choose Properties from the menu that appears. Just under the icon you'll see a section that includes "Target Type", "Target Location" and simply "Target". That last is the file path for your sims game. Scroll to the end of that path and then, AFTER the closing quotation mark add a space and the command -debug_objects

C:\Program Files\Maxis\The Sims\Sims.exe" -debug_objects

An optional command you might wish to include is to state a resolution size for the game to play in:
C:\Program Files\Maxis\The Sims\Sims.exe" -r1024x768 -debug_objects
or -r800x600 if you are using the lower resolution.

PLAYING THE GAME IN DEBUG MODE

Debug mode will prompt a message whenever it encounters an error. It is a simple popup window called a dialog box ... the same sort you see in game play all of the time. This one has three buttons.

Cancel - This is meant to continue with the error I believe but to date I have never gotten it to do anything but lock my game up. I hear using the "prepare_lot" cheat will usually fix that right up but have not tried it. Instead I opt to avoid it at all cost but do feel free to experiment some on your own to see what circumstances it'll work under.

Reset - Attempts to recover from the error (usually with a great deal of success) and generates an error report for you. This report is a simple text file that is placed in the same directory as your Sims.exe file. The file name (which it tells you at the time) looks like a bunch of garble but it's chock full of info about when and where the error occurred.

Delete - Deletes what the game perceives as the offending object from the lot. There are times when an error is in the middle of a looping BHAV and you end up unable to do anything because the error message pops right back up again. Deleting the object generating the error helps out tremendously. The downside is that objects "push" actions onto each other so the object listed in the error message may not be the one with the 'wonky' coding. You'll find, in fact, the Sim trying to use the object is often sited as the offending object.

Continued on Next Page . . .