Using BF2ModTools debug interface (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Using BF2ModTools debug interface (FAQ)

Post 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.
Image

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:
Hidden/Spoiler:
Image
Look like this:
Hidden/Spoiler:
Image
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:
Image
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;):
Image
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.)
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Using BF2ModTools debug interface (FAQ)

Post by Teancum »

Nice stuff :thumbs: 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.
MetalcoreRancor
Brigadier General
Brigadier General
Posts: 628
Joined: Thu Jun 07, 2007 11:13 am
Projects :: No Mod project currently.
Games I'm Playing :: swbf origin
xbox live or psn: No gamertag set

Re: Using BF2ModTools debug interface (FAQ)

Post by MetalcoreRancor »

Thanks Mav, another great asset.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Using BF2ModTools debug interface (FAQ)

Post by Maveritchell »

Teancum wrote:Nice stuff :thumbs: 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.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Using BF2ModTools debug interface (FAQ)

Post 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.

Hidden/Spoiler:
[code]ai.
aimaxflyheight
aiminflyheight
cam
camdown
camup
cps
playermaxflyheight
playerminflyheight
QueueVisionRayTests
renderdist
showadrenaline
showallpaths
showconnectivitygraph
showHintNodes
showobstacles
showobstaclesradius
showtypemask
showunitpathingradius
anim.
Data
OutputSANM
Play
Show
Trace
blur.
ConstantBlend
DownSizeFactor
Enable
bWeaponMelee.
Render
ColorControl.
Draw
Enable
GammaBrightness
GammaContrast
GammaCorrection
combo.
Damage
List
print
Trace
debug.
TogglePauseReverb
debugmenu.
EnableAllAwards
enableheroes
ForceDefeat
ForceVictory
framerate
InfiniteReinforce
invincible
InvincibleAll
PrintPlayerCoords
PrintPostCoords
RenderAABB
EntityProp.
Enable
FirstPerson.
OffsetX
OffsetY
OffsetZ
Scale
flyer.
contrailsActive
fog.
color
range
reflectioncolor
worldrange
freecamlight.
color
enable
freeze
radius
GodRay.
UpdateEnable
GrassPatch.
Enable
FadeDist
FadeDistMul
HDR.
DownSizeFactor
Enable
GlowFactor
GlowThreshold
MaxTotalWeight
NumBloomPasses
ImmediateMode.
FarScene
NearScene
ReflectionScene
ZPrepass
Interface.
Enable
LeafPatch.
Enable
Lighting.
BottomAmbientColor
Draw
DrawShadowRegions
Enable
ProjectionEnable
SetGlobalDirColor
TopAmbientColor
UseBoxForModels
LightSaberTrail.
Enable
map.
displayall
Mouse.
Invert
movetension.
x
y
z
nearScene.
PushInfinite
Net.
CloseJournal
nearobjects
toggleqostext
NormalShader.
Minimal
Occlusion.
DebugDraw
ItemsEnable
MaxObjectRadius
QueryEnable
particles.
Enable
PropCluster.
AlphaFade
DistCheck1
DistCheck2
DistCheck3
DistMult
Enable
RenderClipped
TraceRenders
PropGen.
DelayedFlush
PropModel.
AlphaFade
DistCheck1
DistCheck2
DistCheck3
Enable
FadeAdj
MidFrameFlush
RenderClipped
SphereCullCheck
Reflections.
Draw
Enable
render.
FarScene
QueryWait
Reflections
SortMaterial
UseStateManager
Renderer.
ScreenshotSetup
SetAspect
rendering.
disableLod3
maxVertexDensity
minScreenSize
showMissingLOD
soldiers
SortShaderFirst
screenshot.
gammacorrection
samplesperpixel
sizeincrease
Shadow.
BlurEnable
DebugDraw
Enable
Intensity
SkyDome.
Enable
snd.
display
set
unused
view
terrain.
drawnormals
Enable
enablePerPixel
ForceFullDetail
forceperpixel
forcesimple
lightingEnable
maxDetailSteps
vis.
BackFaceCull
DebugDraw
Enable
ProximityTest
SaveCam
walker.
ShowDamage
Water.
Enable
FresnelMinMax
ReflectionColor
RefractionColor
SpecularEnable
UnderwaterColor
Weapon.
Render



--Commands--

aidiff
aigoals
aimode
aimtension
aspectratio
BackDrop
CreateCubeMap
damageobject
disablegroup
DrawEntityPaths
DumpAnim
DumpCamera
DumpModel
DumpPools
DumpTexture
EnableAllAwards
enablegroup
enableheroes
eyepointoffset
FarSceneTint
fixframerate
ForceDefeat
ForceVictory
fov
framerate
FreeCameraInvertAxis
FreeCameraQuakeMode
FreeCameraStop
GetCameraPos
Hardware
invincible
InvincibleAll
Lua
Mem
nearplane
NighInfiniteReinforcements
PrintPlayerCoords
profile
ProfileAverage
ProfileMinTime
profileMP
render_cloth_connections
render_soldier_checking
render_soldier_colliding
render_soldier_ignores
RenderAABB
renderdamagearrows
renderhitlocations
RenderNoCollision
RenderOrdCollision
RenderRigidCollision
RenderSoftCollision
rendersphere
RenderStaticCollision
RenderTerrainCollision
Screenshot
SelfDestruct
SetControls
SetFOV
setviewrange
showaimers
showflyerheights
showpolycount
showreticuleinfo
showsegmentcount
showtargets
showtopcollision
skipplayer
slowmo
SnapCamera
SoldierModels
SoldierPolyCount
SoundDisplay
SoundUnused
stepframe
Strips
tiltvalue
ToggleDisplay
ToggleDudes
ToggleSoldierModels
trackcenter
trackoffset
TrackOffsetmax
TrackOffsetMin
unlimitedammo
UnlimitedEnergyAll
ViewLod
warning_colors[/code]
Null_1138
Jedi
Jedi
Posts: 1192
Joined: Thu Oct 16, 2008 4:05 pm

Re: Using BF2ModTools debug interface (FAQ)

Post by Null_1138 »

Nice work, Mav. Does this thing shed light on the ToggleQosDisplay in the Fake Console?
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Using BF2ModTools debug interface (FAQ)

Post by Teancum »

AceMastermind wrote:Interface.Enable
Ugh. I've been trying to remember that command for ages! Thanks much! :thumbs:

ToggleQosDisplay is basically just a HUD toggle.
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: Using BF2ModTools debug interface (FAQ)

Post by obiboba3po »

woah this is some really neat and useful stuff! mav always finding ways to make modding swbf2 "better" :P
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Using BF2ModTools debug interface (FAQ)

Post 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
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Using BF2ModTools debug interface (FAQ)

Post 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! :thumbs:
User avatar
Delta 47
Jedi
Jedi
Posts: 1127
Joined: Sun Dec 23, 2007 12:07 am
Games I'm Playing :: BioShock
xbox live or psn: Delta811
Location: MI, USA
Contact:

Re: Using BF2ModTools debug interface (FAQ)

Post by Delta 47 »

Hey, this is great and nice to know!
User avatar
The_Fett_Squad
Private
Posts: 30
Joined: Fri Jul 31, 2009 5:58 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Coruscant

Re: Using BF2ModTools debug interface (FAQ)

Post by The_Fett_Squad »

So how do I use this to post a debug log?
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Using BF2ModTools debug interface (FAQ)

Post 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.
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Using BF2ModTools debug interface (FAQ)

Post by fiddler_on_the_roof »

wow, thanks Mav!
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

debugger Profiler

Post by Anakin »

Hi,

did you know there is a profiler in the debugger exe?? press ALT+e
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Using BF2ModTools debug interface (FAQ)

Post by Marth8880 »

Nice find, Anakin! Here's what it looks like:
Hidden/Spoiler:
Image
Alt+W expands the Frame tree like so:
Hidden/Spoiler:
Image
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:
Hidden/Spoiler:
Image
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Using BF2ModTools debug interface (FAQ)

Post 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.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Using BF2ModTools debug interface (FAQ)

Post by Deviss »

could anyone reupload .bat file please? because the link was broken filefront :S
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Using BF2ModTools debug interface (FAQ)

Post by Marth8880 »

Deviss wrote:could anyone reupload .bat file please? because the link was broken filefront :S
What .bat file?
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Using BF2ModTools debug interface (FAQ)

Post 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
Post Reply