Debugging Techniques: Difference between revisions
m (→Introduction) |
mNo edit summary |
||
Line 1: | Line 1: | ||
==Introduction== | ==Introduction== | ||
These are | These are a few techniques which should help you to find bugs more efficiently when you're scripting. It should be noted that any techniques unless otherwise specified will work in each of the BI game titles. | ||
Line 11: | Line 11: | ||
Vektorboson released a '''debugging console'' for advanced users that is very helpful at debugging your scripting in real time. | Vektorboson released a '''debugging console''' for advanced users that is very helpful at debugging your scripting in real time. | ||
[http://home.arcor.de/vektorboson/res/console2.0.zip Download] | [http://home.arcor.de/vektorboson/res/console2.0.zip Download] | ||
Documentation on using the console can be found http://home.arcor.de/vektorboson/res/console2.0docs.zip here | Documentation on using the console can be found http://home.arcor.de/vektorboson/res/console2.0docs.zip here. | ||
If you're at an advanced stage of a project, you can save the game when the bug appears and check the variable and script states with '''Chain of Command's''' [http://www.mapfact.net/include.php?path=content/download_eng.php&contentid=282 Binary gamefile viewer]. | If you're at an advanced stage of a project, you can save the game when the bug appears and check the variable and script states with '''Chain of Command's''' [http://www.mapfact.net/include.php?path=content/download_eng.php&contentid=282 Binary gamefile viewer]. | ||
Line 21: | Line 21: | ||
==Keep it simple== | ==Keep it simple== | ||
If | If you're having great difficulty solving a problem, simplify the problem, take the part of the mission which does not work, paste it into a new test mission so that you don't have to watch the effect of the rest of the script(s). | ||
== Addon Tips == | == Addon Tips == | ||
If you're scripting for an addon, don't pack the scripts in the PBO, as you have to restart after every change, make a test mission with the script included there. | If you're scripting for an addon, don't pack the scripts in the PBO, as you have to restart after every change. Rather, make a test mission with the script included there. |
Revision as of 22:59, 3 July 2006
Introduction
These are a few techniques which should help you to find bugs more efficiently when you're scripting. It should be noted that any techniques unless otherwise specified will work in each of the BI game titles.
Feel free to add any tips that you may feel will benefit other Operation Flashpoint/Armed Assault fans.
Hints
If something is not working, check which variables could be wrong, check the output of the variables using hints.
Vektorboson released a debugging console for advanced users that is very helpful at debugging your scripting in real time.
Documentation on using the console can be found http://home.arcor.de/vektorboson/res/console2.0docs.zip here.
If you're at an advanced stage of a project, you can save the game when the bug appears and check the variable and script states with Chain of Command's Binary gamefile viewer.
Keep it simple
If you're having great difficulty solving a problem, simplify the problem, take the part of the mission which does not work, paste it into a new test mission so that you don't have to watch the effect of the rest of the script(s).
Addon Tips
If you're scripting for an addon, don't pack the scripts in the PBO, as you have to restart after every change. Rather, make a test mission with the script included there.