Page 1 of 1

Reduced visibility and hidden units

Posted: Sun Jun 06, 2021 3:45 pm
by Lysimachos
I was wondering if it is possible to hide units during the first turn of play and also asking myself if it is really possible to reduce somehow the visibility during the game.

Any hints or tips about that?
I tried to have a look into the templatescenario.bsf file but didn't find any line regarding this possible options ...

Re: Reduced visibility and hidden units

Posted: Sun Jun 06, 2021 4:19 pm
by Paul59
Lysimachos wrote: Sun Jun 06, 2021 3:45 pm I was wondering if it is possible to hide units during the first turn of play and also asking myself if it is really possible to reduce somehow the visibility during the game.

Any hints or tips about that?
I tried to have a look into the templatescenario.bsf file but didn't find any line regarding this possible options ...
If you look at my Tinchebrai_N.bsf file you can see how to hide an area in the first turn:

Just add this function to the end of the .BSF file:

Image


The area to be hidden is defined by this line: SetAreaLOS(39,36,59,49,0,0). The first number is the lowest X Tile, the second number the lowest Y Tile, the third number the highest X Tile, and the fourth number the highest Y tile.

To reduce the visibility, download my Castulo scenario for FoG2 Ancients:

You need to add this to the FUNCTION StartTurnPost(side):


Image


The if (GetTurn() < 8) reduces the visibility up to turn 7, after that visibility returns to normal. So you can change the value to whatever you want.

Note that the reduced visibility range is random, and varies from turn to turn.

You will also need to add these variables to the start of the function:

Image



Good Luck!

Paul

Re: Reduced visibility and hidden units

Posted: Mon Jun 07, 2021 5:21 pm
by Lysimachos
Thank you Paul for your much appreciated help! :D

I'll try to sort out something for my new scenarios ... :mrgreen: