I'm curious, is there a way to print out some info to the screen (via Lua code) when trying to debug?
Like those battlefield updates (red or blue) where "Han Solo has killed stormtrooper12"
Also, is there a way to run a custom debug function by typing into the SWBF2 command line?
Using BF2ModTools debug interface (FAQ)
Moderator: Moderators
- cbadal
- Corporal
- Posts: 155
- Joined: Sun Jan 18, 2015 5:23 pm
- Projects :: SWBF2 XBOX Mod Environment
- xbox live or psn: No gamertag set
- Contact:
- Anakin
- 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)
idk abput the debug interface but using
print("Hello World")
you can print into the debug log file.
print("Hello World")
you can print into the debug log file.
- cbadal
- Corporal
- Posts: 155
- Joined: Sun Jan 18, 2015 5:23 pm
- Projects :: SWBF2 XBOX Mod Environment
- xbox live or psn: No gamertag set
- Contact:
Re: Using BF2ModTools debug interface (FAQ)
All of the images in this post are gone.Maveritchell wrote: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:Hidden/Spoiler: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.Hidden/Spoiler:
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.)
My 'BFront2.log' file isn't showing up for some reason. Would it be possible to paste in the contents of that "BF2ModToolsDEBUG.bat" file into a code block?
-
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: Using BF2ModTools debug interface (FAQ)
http://www.gametoast.com/viewtopic.php?f=27&t=13806cbadal wrote:My 'BFront2.log' file isn't showing up for some reason.
See the note to Vista users in question #4.
No need for the batch file. Just right-click your debugger's exe, Create Shortcut, then open the shortcut's Properties and add /debugcombos (starting with a single space) to the end of the Target field's contents. Note that it *might* need to be -debugcombos instead.cbadal wrote:Would it be possible to paste in the contents of that "BF2ModToolsDEBUG.bat" file into a code block?
- cbadal
- Corporal
- Posts: 155
- Joined: Sun Jan 18, 2015 5:23 pm
- Projects :: SWBF2 XBOX Mod Environment
- xbox live or psn: No gamertag set
- Contact:
Re: Using BF2ModTools debug interface (FAQ)
Thanks for the Quick reply.
I was able to get the log file by running the 'BF2_ModTools_NoDVD.exe' program as 'Administrator'.
I was able to get the log file by running the 'BF2_ModTools_NoDVD.exe' program as 'Administrator'.