Question about Debug Mode and Battlescript?

Post Reply
lambobo
Posts: 3
Joined: Fri Mar 05, 2021 10:13 am

Question about Debug Mode and Battlescript?

Post by lambobo »

Just bought it last weekend and I am very happy with it so far. Thank you for taking CC to the next level~

I am quite curious about BATTLESCRIPT since it wasn't available in the previous CC. Here are my questions:

1) Is there a DEBUG (mode) console so that I can test the functions specified in BATTLESCRIPT.TXT? I saw "DEBUGMODE, 0" in TWEAKS.TXT but not sure how to use it.

2) What is TWEAKS.TXT? Is this an auto-gen file or a configuration file?

3) What is the difference between DrawStringDirect() and DrawString()? Can you please share an example if I just want to write "Hello" on the screen somewhere?

Thank you.
User avatar
PipFromSlitherine
Posts: 1505
Joined: Wed Jun 23, 2010 7:11 pm

RE: Question about Debug Mode and Battlescript?

Post by PipFromSlitherine »

You should not change any of the files in your install folder. You add tweak tags (such as DEBUGMODE) to the USER.TXT file in Documents/My Games/CloseCombatTheBloodyFirst (where all your mods will go).

To start tinkering with the scripting you will really need to create your own map and then make use of the scripts that you can attach to it.

I am not sure that we have the UI hookups to allow writing to the screen directly, though you might be able to make it work if you create your own campaign and use the DATA/BATTLE/SCRIPTS/HELPER.BSF file and define a HELPER_SHOW_TIME function (you can see an example in the existing helper file in the install folder at the same path).

Cheers

Pip
follow me on Twitter here
User avatar
ineffable
Posts: 410
Joined: Fri Dec 13, 2019 3:41 pm
Location: Fishers Ferry

RE: Question about Debug Mode and Battlescript?

Post by ineffable »

Despite a lot of kvetching from the peanut gallery, here and on Steam, I agree CC has been taken to the next level. Beaucoup functional improvements and all peeps wanna bitch about is the (serviceable) grfx

Battle scripting is most useful in setting deployment, 'auto-launching' a battle without a manual deployment phase, AI 'stance' (6 attack/defend settings), limiting a player's control to a one team, and my favorite, having the AI play both sides.

See the Omaha.bsf (battle script file) in \Close Combat The Bloody First\Campaigns\MAIN\DATA\BATTLES for an example of fixed deployment. Ive explained how to tweak all the variables in the above scripting on various threads here.
https://www.matrixgames.com/forums/tm.asp?m=4758583
https://www.matrixgames.com/forums/tm.asp?m=4757931
https://www.matrixgames.com/forums/tm.asp?m=4758864
Quid si
lambobo
Posts: 3
Joined: Fri Mar 05, 2021 10:13 am

RE: Question about Debug Mode and Battlescript?

Post by lambobo »

PipFromSlitherine,

Thanks for your quick response. As suggested I put DEBUGMODE and DEBUGDISPLAY in USER.TXT and got "Unknown Tag" in error.log.

UNKNOWN TAGS IN: ../My Games/CloseCombatTheBloodyFirst/USER.TXT
Unknown Tag: DEBUGMODE,
Unknown Tag: DEBUGDISPLAY,
END: ../My Games/CloseCombatTheBloodyFirst/USER.TXT

I guess maybe DEBUGMODE is disabled in the release .exe?

ineffable,

Thank you very much. That's a lot of good information!

I can see those being negative are also true Close Combat fans who love and care about the series. Hopefully, continuous improvements in 3D CC will convince them later on.

Cheers.
User avatar
ineffable
Posts: 410
Joined: Fri Dec 13, 2019 3:41 pm
Location: Fishers Ferry

RE: Question about Debug Mode and Battlescript?

Post by ineffable »

If you havent already, you'll want to adjust the camera limits in \Close Combat The Bloody First\Data\Mapview.txt to allow closer viewing, and at at a lower angle. That way you can get down in the weeds with the troops, tracers and explosions.
Quid si
User avatar
PipFromSlitherine
Posts: 1505
Joined: Wed Jun 23, 2010 7:11 pm

RE: Question about Debug Mode and Battlescript?

Post by PipFromSlitherine »

There should not be any commas in the user.txt. E.g.

DEBUGMODE 1

Cheers

Pip
follow me on Twitter here
lambobo
Posts: 3
Joined: Fri Mar 05, 2021 10:13 am

RE: Question about Debug Mode and Battlescript?

Post by lambobo »

DEBUGMODE 1
It works! Thank you~

Out of curiosity, I tried to update an existing message on the "MsgList" UI and it works.

Print("CC TBF");
UpdateUIListboxItem("MsgList", 3);

However, adding a new message doesn't. Any ideas?

Print("CC TBF");
AddUIListboxItem("MsgList");
... adjust the camera limits in \Close Combat The Bloody First\Data\Mapview.txt to allow closer viewing ...
Thanks ineffable. Setting ZOOMINLIMIT to 40 from 80 is much better to me.
User avatar
PipFromSlitherine
Posts: 1505
Joined: Wed Jun 23, 2010 7:11 pm

RE: Question about Debug Mode and Battlescript?

Post by PipFromSlitherine »

I don't recall whether the list is managed by code. What are you trying to achieve?

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “Close Combat The Bloody First - Modding”