Log in

View Full Version : Fog of War lift script



Spoonfrog
06-10-2005, 21:36
Is there any way of lifting the fog of war on the campaign map through scripting? The senate missions can reveal a settlement, so perhaps there is a way of scripting this?

Ianofsmeg16
06-10-2005, 21:49
press the ` button (above Tab) and it'll bring you into rome_shell, from there type in Toggle_fow then the fow should be lifted until you type it again. N.B this is on the campaign map, i dont know where the script for it is, this method seems easier.
Hope this helps ~:cheers:

Epistolary Richard
06-10-2005, 22:16
There's also a reveal_tile command, which is probably what the Senate are using. toggle_fow through RomeShell is a lot better way of just seeing the whole map.

Spoonfrog
06-11-2005, 10:00
Thanks for the help, what I am trying to do is to reveal the map just around a certain point...

A player needs to be able to 'see' a volcano for it to erupt. Because of the change in scale on the Sicily campaign map, it is very unlikely that a player will have units near MT Etna when it erupts, so the volcano effect is lost. Perhaps if I could use a script to reveal the volcano for the player (but not the rest of the map), the player would be able to see it erupting...

Epistolary Richard
06-11-2005, 11:33
Yes, in that case you'll want the reveal_tile script command. It's been used in vanilla so we know it works:

reveal_tile Sample use: reveal_tile 25, 43
Unless you're incorporating a background script then you'll need to activate it through an event script. If Mt Etna is erupting at a set date each campaign then this would be quite straightforward.

These entries would go in your export_descr_advice:
This would be your trigger:

;------------------------------------------
Trigger 3000_Etna_erupts_Trigger
WhenToTest FactionTurnStart

Condition FactionIsLocal
and I_TurnNumber = 1 ; insert turn number here

AdviceThread Etna_erupts_Thread 0
Here's your advice thread, also in eda.

;------------------------------------------
AdviceThread Etna_erupts_Thread
GameArea Campaign

Item Etna_erupts_Text_01
Uninhibitable
Verbosity 0
Threshold 1
Attitude Normal
Presentation Default
Title Etna_erupts_Text_01_Title
Script scripts\show_me\etna.txt
Text Etna_erupts_Text_01_Text1

Add the following to export_descr_advice_enums

Etna_erupts_Text_01_Title
Etna_erupts_Text_01_Text1
In your text\export_advice

¬-------------------

{Etna_erupts_Text_01_Title} Etna erupts!

{Etna_erupts_Text_01_Text1}
Click on the show me how button to see it.

Then create a new file in \scripts\show_me\ called etna

script
snap_strat_camera 25,43
reveal_tile 25, 43
end_script

If you want to know more about scripts and their terminology, then read this (https://forums.totalwar.org/vb/showthread.php?t=46738).

Epistolary Richard
06-11-2005, 12:08
Hmmm.... actually the reveal_tile command doesn't seem to do much of anything at all....

Right, there's another way of doing this, but this is far simpler, so replace the script with this:

script
inhibit_camera_input true
zoom_strat_camera 0.8
snap_strat_camera 25,43
console_command toggle_fow
wait 5
console_command toggle_fow
inhibit_camera_input false
end_script
This works, but allows the player to see the whole map on the minimap for five seconds. If this okay for you, then great, if not there's another way.

Myrddraal
06-11-2005, 12:10
reveal tile does work I believe, it is used in sons of mars for sure...

Myrddraal
06-11-2005, 12:12
snap_strat_camera 21, 54

reveal_tile 8, 57


That comes straight from the suns of mars tutorial.

R u sure you got the right tile when testing...

Epistolary Richard
06-11-2005, 12:24
Yes, it's in the prologue, which is why I assumed it worked. But I tried it out and snapped the camera to the same position but nothing was revealed. I even put it in a loop so it would continue to fire while the advisor was visible, but nothing changed. Maybe I mistyped the parameters though, if anyone gets it working then let us know.

Spoonfrog
06-12-2005, 11:55
Thanks for the help guys I'll try those ~:)