Debugging Techniques: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (+ TroopMon debug console)
(Added note to debug with the help of arma.RPT)
Line 10: Line 10:
If something is not working, check which variables could be wrong, check the output of the variables using hints.
If something is not working, check which variables could be wrong, check the output of the variables using hints.


*In Armed Assault the [[arma.RPT]] is your first and foremost thing to check when you have problems with custom addon configs or mission scripts!
   
   
*[[User:Vektorboson|Vektorboson]] released a [http://home.arcor.de/vektorboson/res/console2.0.zip debugging console] for advanced users that is very helpful at debugging your scripting in real time.<br />Documentation on using the console can be found [http://home.arcor.de/vektorboson/res/console2.0docs.zip here].
*[[User:Vektorboson|Vektorboson]] released a [http://home.arcor.de/vektorboson/res/console2.0.zip debugging console] for advanced users that is very helpful at debugging your scripting in real time.<br />Documentation on using the console can be found [http://home.arcor.de/vektorboson/res/console2.0docs.zip here].
Line 26: Line 27:
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.
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.


[[category:Armed Assault: Editing]]
[[category:Operation Flashpoint: Editing]]
[[category:Operation Flashpoint: Editing]]
[[Category: Scripting Topics]]
[[Category: Scripting Topics]]

Revision as of 13:58, 10 August 2007

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.

  • In Armed Assault the arma.RPT is your first and foremost thing to check when you have problems with custom addon configs or mission scripts!
  • 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 here.

Armed Assault debug consoles:

  • Debug console made by Str. It's in form of addon and it's available in all singleplayer missions, intros and outros. Easy and simple to use (Escape-Enter execute).
  • TroopMon V 0.7 *Mission debugger - Complex debugging system providing lot of informations for mission-makers, escpecially about AI.

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.