Jump to content
Official BF Editor Forums
Sign in to follow this  
Kev4000

Battlefield 2 Debugger

Recommended Posts

Woah this i got to see! I've been using bergerkiller's debugger tool, which skips the errors for you. I wonder what this one does!

EDIT: I get this "DirectX version 9.0c or higher is required to run BF2. Please install DX9c and try again." if i click Okay, the screen goes black and says "aBF2r.exe is not responding" copied over the DLLS, but didn't replace them.

Edited by rhysm_08

Share this post


Link to post
Share on other sites

Woah this i got to see! I've been using bergerkiller's debugger tool, which skips the errors for you. I wonder what this one does!

EDIT: I get this "DirectX version 9.0c or higher is required to run BF2. Please install DX9c and try again." if i click Okay, the screen goes black and says "aBF2r.exe is not responding" copied over the DLLS, but didn't replace them.

Oh, lol, I forgot to mention that part.

Run in Win XP compatibillity!

+ignoreAsserts 1 works eitherway.

The only thing changed in the .exe itself is the path to /My Documents/Battlefield 2/ to /My Documents/DebuggerBF 2/ in order to separate it from 1.5's incompatible controls.

Edited by Kev4000

Share this post


Link to post
Share on other sites

just one question..

In the video the user types in the renderer. prefix and then hits a button to list all available commands using this prefix. What is the button?

Edited by Coronaextra

Share this post


Link to post
Share on other sites

just one question..

In the video the user types in the renderer. prefix and then hits a button to list all available commands using this prefix. What is the button?

Few tricks,

<tab> autocompletes, so if you type ren<tab> renderer.dr<tab> renderer.draw<tab><tab> brings up list over all commands starting with "renderer.draw*".

Hit <tab> a few more times and it'll bring up a list over the input arguments.

Also, typing "objecttemplate.active" and hitting enter, will return which object is active.

You can reload blocks of code by typing "Console.run folder/filename.tweak". Typically it starts in /mods/modname/. It may not work properly if you objecttemplate.create existing templates in mentioned file, but you may objecttemplate.activeSafe and tweak existing templates. Useful for testing physics on the run.

Up arrow will bring you to your last typed command, and pgup/pgdown to scroll through history.

Edited by Kev4000

Share this post


Link to post
Share on other sites

More debugger fun :D

Today : Draw CollisionMeshes.

* Enter this command collisionManager.buildDebugCollisionMeshes

This will need a few moments. Now enter collisionManager.drawMeshes 1

col1's will be drawn where different colors mean different materials. Switch to col0's by entering collisionManager.setActiveLod 0 and accordingly to col2's with collisionManager.setActiveLod 2

Switch it off with collisionManager.drawMeshes 0

Note that clipping is not done for the rendering so that objects seem to shine through e.g. terrain.

Enjoy !

Share this post


Link to post
Share on other sites

objecttemplate.activeSafe Engine WillysMB_US_aaMotor

objecttempllate.<tab><tab>

Brings up list over engine properties which you can change.

You can also create a file in mods/modname/tweak.con, copy the block of engine code in here, and type:

Console.run tweak.con

Executes code in the tweak.con. Can be used to, for example, update the engine values while ingame.

vars.set old-turn-mod 3.5

turn radius for tanks

vars.set camera-shake-distance 40

Causes tanks to shake the ground upto 40m away. Unfortunately this only works in debugger.

shadowManager.shadowMapSize 2048

higher quality shadows.

And there's so much more. Have fun!

Edited by Kev4000

Share this post


Link to post
Share on other sites

Today : Test your python scripts without even leaving the game

The core command is

pythonHost.reinitialize

which brings you back to the spawn screen. If everything went well the tickets are reset to the maps start amount and you're able to spawn. If your script contains an error the tickets will remain at 0 ( zero ).

Python errors are written to /<MOD>/logs/BFlog_<MACHINE>_<DATE>_<TIME>_server.log Correct them and enter the reinit command.

'Print' statements in python are shown in the debugger console as well which can be used to view variables or other stuff.

Edited by mschoeldgen[Xww2]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×