Generating a Log file

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Generating a Log file

Post by PirateJock_Wargamer »

Anybody know how to - or if it's possible - to generate a log file of what's being returned from scripts?

Looking through the current game scripts there are log instructions commented out, e.g. in Tools.bsf, or inclusion of writeLog in functions, e.g. CalculateChanceToHitAP(me, unit, aimedShot, writeLog) in FireLogic_AP.bsf. I've tried to get debugging to work but failed to get any output. Any ideas?

Cheers
pipfromslitherine
Site Admin
Site Admin
Posts: 9863
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

You can use the Log( function (check the docs) to output script info.

You then need to set

DEBUGMODE 1

in your user.txt file, then you can use F6 to open up the script debug pane in battle. Note that the pane can be dragged around by its top edge.

Cheers

Pip
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

Thanks :) Will give it a go tonight
PirateJock_Wargamer
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 325
Joined: Fri Apr 17, 2009 9:21 pm
Location: North West, UK
Contact:

Post by PirateJock_Wargamer »

That works great thanks. Also found in the manual .... hey who reads manuals :oops:

Useful shortcut keys:
F3 – Debug Current Unit script.
F4 – Debug AI script.
F5 – Debug scenario script.
F6 – Toggles script log window.
SHIFT+F7 – Toggles extra AI info mode
Post Reply

Return to “Battle Academy : Modders Corner ”