What’s Log(“credible distant frontal threat”,CredibleFrontalThreat); for?

Moderator: rbodleyscott

Post Reply
locustmustdie
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Fri Mar 05, 2021 11:33 am

What’s Log(“credible distant frontal threat”,CredibleFrontalThreat); for?

Post by locustmustdie »

Reading Towton_Y.bsf
Can’t figure out what it was for?
It should have returned a value by log();However it seems never be called by any other functions;,if()s,for()s,neither by any UniversalVars.
Or perhaps merely a logfile-export that have no effect for AI movements itself? It happened in Loja_C.bsf too.
Sorry,it might be a dumb question,but I haven’t coded after graduation until this game.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28401
Joined: Sun Dec 04, 2005 6:25 pm

Re: What’s Log(“credible distant frontal threat”,CredibleFrontalThreat); for?

Post by rbodleyscott »

locustmustdie wrote: Wed Oct 05, 2022 8:14 am Reading Towton_Y.bsf
Can’t figure out what it was for?
It should have returned a value by log();However it seems never be called by any other functions;,if()s,for()s,neither by any UniversalVars.
Or perhaps merely a logfile-export that have no effect for AI movements itself? It happened in Loja_C.bsf too.
Sorry,it might be a dumb question,but I haven’t coded after graduation until this game.
Log() is not an arithmetical function and does not return a value, it just writes something to the Debug Log. Primarily for my use when debugging the game.

If you are trying to mod scripts, you should set the game to run in Debug Mode, by putting the line

DEBUGMODE 1

in

/Documents/My Games/FieldOfGloryMedieval/User.txt

You can then see the debug log in game by pressing f6.

If the debug log comes on automatically without clicking f6, it means there has been a script error - you should be able to find the error by scrolling back through the log - the error message will be prefaced by **

This in-battle Debug Log is separate from the error logging into error.log in /Documents/My Games/FieldOfGloryMedieval. You can write to that using DebugLog("string");, or DebugLogY( "string", param1); or DebugLogX("string", param1, param2, param3, param4);

where the params are integers or integer variables.
Richard Bodley Scott

Image
locustmustdie
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 117
Joined: Fri Mar 05, 2021 11:33 am

Re: What’s Log(“credible distant frontal threat”,CredibleFrontalThreat); for?

Post by locustmustdie »

Thanks,Richard.
Post Reply

Return to “Field of Glory II: Medieval - Scenario Design”