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?
Printable View
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?
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:
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.
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...
Yes, in that case you'll want the reveal_tile script command. It's been used in vanilla so we know it works:
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.Code:reveal_tile Sample use: reveal_tile 25, 43
These entries would go in your export_descr_advice:
This would be your trigger:
Here's your advice thread, also in eda.Code:;------------------------------------------
Trigger 3000_Etna_erupts_Trigger
WhenToTest FactionTurnStart
Condition FactionIsLocal
and I_TurnNumber = 1 ; insert turn number here
AdviceThread Etna_erupts_Thread 0
Add the following to export_descr_advice_enumsCode:;------------------------------------------
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
In your text\export_adviceCode:Etna_erupts_Text_01_Title
Etna_erupts_Text_01_Text1
Then create a new file in \scripts\show_me\ called etnaCode:¬-------------------
{Etna_erupts_Text_01_Title} Etna erupts!
{Etna_erupts_Text_01_Text1}
Click on the show me how button to see it.
If you want to know more about scripts and their terminology, then read this.Code:script
snap_strat_camera 25,43
reveal_tile 25, 43
end_script
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:
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.Code: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
reveal tile does work I believe, it is used in sons of mars for sure...
That comes straight from the suns of mars tutorial.Code:snap_strat_camera 21, 54
reveal_tile 8, 57
R u sure you got the right tile when testing...
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.
Thanks for the help guys I'll try those ~:)