Reduced visibility and hidden units

Moderator: rbodleyscott

Post Reply
Lysimachos
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1504
Joined: Tue Dec 08, 2009 9:38 am
Location: Italy

Reduced visibility and hidden units

Post 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 ...
"Audentis fortuna iuvat"
- Virgilius

(Good luck favours the brave)
Paul59
General - King Tiger
General - King Tiger
Posts: 3864
Joined: Tue Jul 21, 2015 11:26 pm

Re: Reduced visibility and hidden units

Post 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
Field of Glory II Scenario Designer - Age of Belisarius, Rise of Persia, Wolves at the Gate and Swifter than Eagles.

Field of Glory II Medieval Scenario Designer.

FOGII TT Mod Creator

Warhammer 40,000: Sanctus Reach Tournament Scenario Designer.
Lysimachos
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1504
Joined: Tue Dec 08, 2009 9:38 am
Location: Italy

Re: Reduced visibility and hidden units

Post by Lysimachos »

Thank you Paul for your much appreciated help! :D

I'll try to sort out something for my new scenarios ... :mrgreen:
"Audentis fortuna iuvat"
- Virgilius

(Good luck favours the brave)
Post Reply

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