Page 1 of 2
Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 1:33 pm
by Maveritchell
While there may be a few (or more than a few) who already know this or at least parts of it; this is some really simple stuff that I just honestly hadn't even looked at until someone asked me how to do something specific; I looked a little harder at BF2Modtools and realized there were a few things that even after a while spent modding, I never used.
BF2Modtools.exe is, as you know, the developer executable version of the game. You can access a pseudo-command line in the tools by pressing the "`" button (this is the button to the upper left of your keyboard, just next to "1" and under "Esc").
There is a long list of things you can do using this particular interface. If you press "Tab," you can scroll through a list of command prefixes (like ai., combo., render., etc.). If you press enter on
just a prefix, you can see a list of suffixes that you can use with that prefix to create a full command.
For example, you can see how I used the command "EntityProp.Enable" (which toggles prop meshes, but not collision meshes, on and off) to make normal Mos Eisley:
Look like this:
You'll note you can also access anything you could previously access through the original fake console (not counting Zerted's additions) in this menu as well.
Some of the commands in here, you will notice, require you to run a command line parameter before opening the modtools. For example, combo. commands will ask you to set "/debugcombos" on the command line to use them, like this:

You can either run your modtools through the command prompt, or you can use a batch file like this one:
"BF2ModToolsDEBUG.bat Download
That batch file can be used by placing it in your "GameData" folder (with BF2Modtools.exe) and running it instead of the modtools.exe. It enables the combo debug commands and the animation debug commands, two of the more useful ones I saw. Any additional debug commands can be enabled by opening up the batch file and editing it as common sense would dictate.
So, for example, now that you have combo debug commands open, you can use it to show the damage area of combos, like this (note that the red wireframe spheres represent area in which damage is being done;):

Note that this uses the command "combo.Damage". At any time you may exit out of the debug interface by pressing the "`" key again.
(You may notice in the last picture I removed the green bar; this is not recommended as it will remove the interface (menus etc.) entirely.)
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 1:43 pm
by Teancum
Nice stuff

I wondered if anyone would ever make a FAQ like this.
Regarding the AI commands, there's some great documentation over
HERE that outlines some of those functions.
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 1:46 pm
by MetalcoreRancor
Thanks Mav, another great asset.
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 1:47 pm
by Maveritchell
Teancum wrote:Nice stuff

I wondered if anyone would ever make a FAQ like this.
Regarding the AI commands, there's some great documentation over
HERE that outlines some of those functions.
Yes, I'd read some of fred's stuff and knew about using this to render collisionbodies, but I didn't know any of this other stuff could be done until someone asked a question about it and I looked a little harder. Shows that there's always something new to be learned.
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 9:07 pm
by AceMastermind
Here are the ones outlined in the
BF2 Jedi Creation.doc (extremely useful)
Extra console commands:
Useful console commands when debugging a Jedi are:
combo.damage – toggles on and off the showing of a Jedi’s saber edges that can do damage as a red bar with a sphere at the end. The bar indicates the length, while the sphere indicates the radius. Note that this is the Length and Width that come from within the Attack() sections of a combo file, NOT the length and width from the weapon ODF.
anim.show – toggles on and off display of the animation(s) that the player character’s legs and upper body are playing, the total length of the animation (in frames) as well as the current frame number, and the percentage of blending out of the last animation.
ESPECIALLY useful with:
slowmo [number] (like "slowmo 5"). The number is the number of times slower to play the entire game…um…it’s the denominator in the speed, so if you say "slowmo 5" then the game plays at 1/5 speed, if you say "slowmo 2" then it plays at ½ speed, etc. "slowmo" by itself, or "slowmo 1" turns it off. Note that you can also speed up gameplay with "slowmo .2" or "slowmo .5", but this has no practical use for animation debugging. After inputting a "slowmo", turn off the console and check your character for bugs or animation pops.
I posted this in the XSI forum some time ago but i'll post it again here.
To remove the green overlay/interface while playing your map with the
BF2_modtools.exe:
If you want to remove the green overlay to get a better screenshot when using the BF2_modtools.exe press the tilde key (~) then type:
Interface.Enable
press Enter then tilde and resume play.
To get it back press the tilde key then press the up arrow key and press Enter.
Pressing the
up arrow key will cycle back through the last command entered so you won't have to re-type it, very useful since the interface will not display until this command is deactivated.
EDIT:
Another useful command to see if your cloth collision is working properly:
render_cloth_connections
To see how much memory your map is using type:
mem
It will post memory usage, which will also appear in BFront2.log
After you press the tilde key to bring up the console window you can use the "Tab" key to cycle through any available choices.
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 9:14 pm
by Null_1138
Nice work, Mav. Does this thing shed light on the ToggleQosDisplay in the Fake Console?
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 9:17 pm
by Teancum
AceMastermind wrote:Interface.Enable
Ugh. I've been trying to remember that command for ages! Thanks much!
ToggleQosDisplay is basically just a HUD toggle.
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Mar 23, 2009 10:51 pm
by obiboba3po
woah this is some really neat and useful stuff! mav always finding ways to make modding swbf2 "better"

Re: Using BF2ModTools debug interface (FAQ)
Posted: Tue Mar 24, 2009 2:20 pm
by [RDH]Zerted
Null_1138 wrote:...shed light on the ToggleQosDisplay in the Fake Console?
Info on that is in the comments in the Lua source code. It was a way to toggle how the server/player ping values were displayed. One way displayed numbers (retail version) and the other way displayed something like graphical bars.
Edit:
ToggleQosDisplay most likely meaning
Toggle quality of service display
Re: Using BF2ModTools debug interface (FAQ)
Posted: Tue Mar 24, 2009 2:29 pm
by Teancum
Huh... I never knew that. Just goes to show you that you learn something new every day. I just thought it was a HUD toggle since that's all I saw it do. Thanks for the info Zerted!

Re: Using BF2ModTools debug interface (FAQ)
Posted: Tue Mar 24, 2009 4:15 pm
by Delta 47
Hey, this is great and nice to know!
Re: Using BF2ModTools debug interface (FAQ)
Posted: Sat Aug 08, 2009 9:44 am
by The_Fett_Squad
So how do I use this to post a debug log?
Re: Using BF2ModTools debug interface (FAQ)
Posted: Sat Aug 08, 2009 11:40 am
by mswf
Running the game with the BF2_Modtools.exe generates a debug log in your gamedata folder, its not related to these extra things you can do. You could look this up in the FAQ or use Search next time first.
Re: Using BF2ModTools debug interface (FAQ)
Posted: Sat Aug 08, 2009 1:12 pm
by fiddler_on_the_roof
wow, thanks Mav!
debugger Profiler
Posted: Sat Aug 20, 2016 8:04 am
by Anakin
Hi,
did you know there is a profiler in the debugger exe?? press ALT+e
Re: Using BF2ModTools debug interface (FAQ)
Posted: Sat Aug 20, 2016 2:54 pm
by Marth8880
Nice find, Anakin! Here's what it looks like:
Alt+W expands the Frame tree like so:
Any other profiler hotkeys? One would assume you'd be able to also expand the Non-Render and Render trees, but how...
EDIT:
Ah-ha! So holding Alt and pressing the arrow keys moves the selection up or down, and pressing Alt+W expands/collapses the selected item! Like so:
Re: Using BF2ModTools debug interface (FAQ)
Posted: Sun Aug 21, 2016 4:53 am
by Anakin
Try alt+h it's doing something, too. If try it in the stock game without a custom HUD that removes some fonts, you can see the explanation of hotkeys at the bottom.
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Aug 22, 2016 6:54 am
by Deviss
could anyone reupload .bat file please? because the link was broken filefront :S
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Aug 22, 2016 1:48 pm
by Marth8880
Deviss wrote:could anyone reupload .bat file please? because the link was broken filefront :S
What .bat file?
Re: Using BF2ModTools debug interface (FAQ)
Posted: Mon Aug 22, 2016 5:59 pm
by Deviss
Marth8880 wrote:Deviss wrote:could anyone reupload .bat file please? because the link was broken filefront :S
What .bat file?
the file from first post
BF2ModToolsDEBUG.bat