Page 1 of 1

Generating a Log file

Posted: Tue Sep 21, 2010 11:43 am
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

Posted: Wed Sep 22, 2010 3:15 pm
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

Posted: Wed Sep 22, 2010 3:51 pm
by PirateJock_Wargamer
Thanks :) Will give it a go tonight

Posted: Fri Sep 24, 2010 11:58 am
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