-
Notifications
You must be signed in to change notification settings - Fork 183
Development
This page is about using development features built into OpenRW and general development tips.
If you want to know how you could help developing OpenRW in general you should check out the contributing page instead.
There are many tools within OpenRW geared to helping development of features or fixing issues.
The test mode, accessible from the main menu or using the --test
option spawns the player in the map with access to some weapons and vehicles, without running the game script. This can be useful for testing some non-script related functionality such as AI behaviour, vehicle dynamics, collision detection, or world rendering.
There is a developer menu, accessible in-game via M. This menu provides quick access to useful locations in the world, many vehicles, pedestrian followers and weapons. Pressing F in the menu will enable a free-look camera which is Mouse-Look + WASD with Shift as speed-modifier.
There are debug views accessible via the function keys that will present the game data in-world.
- F1 General statistics and state
- F2 Show AI paths, garage bounds, and vehicle spawner locations.
- F3 Render physics objects.
- F4 View object state.
OpenRW can load original game saves. Simply loading a saved created with GTA III with the situation you need to test is a helpful way to speed up debugging or development. The -l/--load
switch can be used to provide a file path to a .b
save file to load.
There are many tools within OpenRW geared to helping development of features or fixing issues.
When investigating a script issue it is useful to see the opcodes the game executes. Configuring the game with the ENABLE_SCRIPT_DEBUG=1
option will print out each opcode as it is executed, the thread executing it, the program counter, conditional flag and the argument values. Output can be limited to a single thread by setting the environment variable OPENRW_DEBUG_THREAD
to the name of the thread.
The RWViewer application is a Qt GUI program for inspecting the game's data files. It currently supports viewing object information, some models, loading and playing animations, as well as viewing map files. More work is needed on this tool to make it usable as a useful tool for both debugging. Missing features include: a file picker for viewing arbitrary files, a texture viewer, more detailed object information.