Results 1 to 15 of 15

Thread: Reveal part of map with scripting.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Reveal part of map with scripting.

    Code:
    monitor_event FactionTurnStart FactionIsLocal
    and I_TurnNumber = 3
    
    snap_strat_camera 287, 143
    zoom_strat_camera 0.3
    reveal_tile 287, 143
    
    historic_event ring
    
    terminate_monitor
    end_monitor
    I figured this would do the trick to remove the fog of war in a small area for a turn. Nothing is revealed though so I obviously eff'd up . Anyone know a correct way to do it?

  2. #2
    kevindrosario's Avatar Ordinarius
    Join Date
    Jan 2011
    Location
    New Jersey
    Posts
    791

    Default Re: Reveal part of map with scripting.

    I'm not 100% sure, but try putting "hide_all_revealed_tiles" in the line after you reveal the tile like this:
    Code:
    monitor_event FactionTurnStart FactionIsLocal
    and I_TurnNumber = 3
    
    snap_strat_camera 287, 143
    zoom_strat_camera 0.3
    reveal_tile 287, 143
    hide_all_revealed_tiles
    
    historic_event ring
    
    terminate_monitor
    end_monitor
    Edit: Also, I should mention that I really am not sure what that does, but just from looking at the reveal_tile scripts already present, they all have that there. So I'm guessing it probably does something important.

  3. #3
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Reveal part of map with scripting.

    reveal_tile: reveals one single tile on the campaign map
    hide_all_revealed_tiles: does exactly that - because otherwise the tile (unrevealed by the command in the line before) would remain revealed all the time

    Remark: revealing a tile that has nothing on it will most of the time look as if nothing has happened.

    I have recently used it for scripted events, example: an army spawns near a town per script. This town belongs to another faction, hence you cannot see it. But the spawn has some historical value and I have written a historical event with all the cute pictures, a wall of text and provided that little magnifying glass to jump to the place of this spawn. As mentioned you cannot see that army, so what the heck am I doing the jump for? And that's where the reveal command comes into play. In the next round that revealing isn't necessary anymore and that's why I hide the tile again.

    The picture is from the upcoming "The Last Kingdom" mod - at that point we had just changed some dislpay names and not adjusted the text files yet - hence the difference in town name.



    .
    Last edited by Gigantus; April 30, 2011 at 02:22 AM.










  4. #4

    Default Re: Reveal part of map with scripting.

    So there needs to be a settlement or unit on the coordinates for it to work?

  5. #5
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Reveal part of map with scripting.

    Nope. Your script looks fine. Is your campaign script loading at all? Does the log say anything?

  6. #6
    kevindrosario's Avatar Ordinarius
    Join Date
    Jan 2011
    Location
    New Jersey
    Posts
    791

    Default Re: Reveal part of map with scripting.

    Sorry for the false info. I guess I shouldn't make random guesses

  7. #7

    Default Re: Reveal part of map with scripting.

    All scripts in my campaign are working fine. It zooms and magnifies, the only problem is the FOW isn't lifting so I can't see what is supposed to be seen. Do I need to reveal more than just one tile?

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Reveal part of map with scripting.

    Quote Originally Posted by alreadyded View Post
    All scripts in my campaign are working fine. It zooms and magnifies, the only problem is the FOW isn't lifting so I can't see what is supposed to be seen. Do I need to reveal more than just one tile?
    Quote Originally Posted by Gigantus View Post
    reveal_tile: reveals one single tile on the campaign map

    Remark: revealing a tile that has nothing on it will most of the time look as if nothing has happened
    Check the remark. You need to reveal a tile with co-ordinates where something can be seen (settlement or unit) else you will think it didn't work.










  9. #9

    Default Re: Reveal part of map with scripting.

    The thing I am trying to reveal is a volcano erupting, but I guess that isn't good enough for the game . Thanks for the info.

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Reveal part of map with scripting.

    To determine the co-ordinates of the volcano, put your mouse over it, pull down the console by pressing the key with tilde symbol ( ~ ) on the top left of your keyboard. Then enter show_cursorstat that will give you the co-ordinates. You might have to give it several tries in your script as the volcano isn't very well defined.

    Just a final question: did that historic event (ring) show up? Because if it didn't then your script as a whole didn't work.










  11. #11

    Default Re: Reveal part of map with scripting.

    I think too many commands in a single event are causing a conflict of some sort.

  12. #12

    Default Re: Reveal part of map with scripting.

    All my scripts, including the ring event are showing up. I went ahead and revealed several tiles around the volcano and I guess I finally got the right one, so it is showing now. However, I can't see it erupting unless I turn FOW off the turn before... any idea why that is? Not a huge deal, but seeing it erupt would really add to the effect of the event.

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Reveal part of map with scripting.

    I have played with the erupting volcano and it appears that the eruption will only play\be visible if it happens in a region of the human player. I have tried it with the reveal tile command when it was in the AI's region and it didn't work (as you found out as well). Removing the FoW for this doesn't make sense from the point of game play, so I never tried that.










  14. #14
    Swagger's Avatar Imperial Coffee-Runner
    Join Date
    Apr 2007
    Location
    Portugal
    Posts
    12,453

    Default Re: Reveal part of map with scripting.

    Under the Patronage of the Dreadful cedric37!
    Ancs Guide, Emergent Factions , Yes/No Events |L'Outremer for Modders| Swagger's Skymod


  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Reveal part of map with scripting.

    Nice workaround with an invisible princess and increased line of sight.










Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •