Page 1 of 1

Is there any way to "save" and "load" fog of war?

Posted: Fri Jun 16, 2017 9:15 pm
by goldensword52
Hi all, I'm working on a MapTool macro, and it would be very helpful if there was some way for MapTool to "save" the information about where fog of war has been revealed, and then later "load" that information and reapply it to the map. Is this possible in any way using MapTool? Thanks in advance.

Re: Is there any way to "save" and "load" fog of war?

Posted: Sat Jun 17, 2017 1:35 am
by aliasmask
Not really.

Re: Is there any way to "save" and "load" fog of war?

Posted: Mon Jun 19, 2017 9:03 am
by jfrazierjr
goldensword52 wrote:Hi all, I'm working on a MapTool macro, and it would be very helpful if there was some way for MapTool to "save" the information about where fog of war has been revealed, and then later "load" that information and reapply it to the map. Is this possible in any way using MapTool? Thanks in advance.
So what are you actually doing and trying to do? Are you creating the FOW, then running some tests by moving tokens around and THEN wnt to get back to the pre test state? IF so, the SIMPLE answer is: make a copy of your campaign file and then test on the COPY. If that's not what you are trying to do, please explain more.

Re: Is there any way to "save" and "load" fog of war?

Posted: Mon Jun 19, 2017 3:10 pm
by goldensword52
jfrazierjr wrote:
goldensword52 wrote:Hi all, I'm working on a MapTool macro, and it would be very helpful if there was some way for MapTool to "save" the information about where fog of war has been revealed, and then later "load" that information and reapply it to the map. Is this possible in any way using MapTool? Thanks in advance.
So what are you actually doing and trying to do? Are you creating the FOW, then running some tests by moving tokens around and THEN wnt to get back to the pre test state? IF so, the SIMPLE answer is: make a copy of your campaign file and then test on the COPY. If that's not what you are trying to do, please explain more.
I'm trying to make a macro that switches between different floors of a dungeon without actually moving any tokens around or having the second floor off to the side. I actually have the macro working pretty well for doing all that, but the problem is that once switching to the new floor, the exposed fog of war would reveal too much information based on what had been explored in the old floor. An option would always be to just reset the entire fog of war each time the players switch floors; that wouldn't be terrible but it would be preferable to switch back and forth between revealed fog of war just like switching floors.

I've been reading about individual fog of war options with a sever, and apparently that information about what fog has been revealed is stored on the token somewhere. Is there any way to access that stored information, or switch between which token's for of war information is currently being "used"?

Re: Is there any way to "save" and "load" fog of war?

Posted: Wed Jun 21, 2017 2:00 pm
by JamzTheMan
When stored on the token, you can right click tokens and add/remove FoW, but when you have no tokens selected, it show fow for ALL tokens.

I don't believe there are macros to edit this, so it would be manual steps (create a token to store current groups FoW, then erase from PC tokens, repeat for each floor).

Your other option would be to have separate PC tokens for each floor but that seems silly. Really, the best use is usually to have multiple floors on the same map but not on top of each other? Not sure exactly how you are set up or trying to solve really (other than storing FoW).

FoW is a java object that COULD be translated into coordinates (I've done it for VBL) but it's complicated and not sure how much use the macro would really get...

Re: Is there any way to "save" and "load" fog of war?

Posted: Thu Jun 22, 2017 2:36 pm
by goldensword52
JamzTheMan wrote:When stored on the token, you can right click tokens and add/remove FoW, but when you have no tokens selected, it show fow for ALL tokens.

I don't believe there are macros to edit this, so it would be manual steps (create a token to store current groups FoW, then erase from PC tokens, repeat for each floor).

Your other option would be to have separate PC tokens for each floor but that seems silly. Really, the best use is usually to have multiple floors on the same map but not on top of each other? Not sure exactly how you are set up or trying to solve really (other than storing FoW).

FoW is a java object that COULD be translated into coordinates (I've done it for VBL) but it's complicated and not sure how much use the macro would really get...
As to the question of why, I plan to make a map representing a sprawling city. I know there's no technical limit on how big a map can be, but I think it would be more convenient not to place the floors too far apart. That and I feel that the player's immersion will be improved. Basically it's all for aesthetic reasons, rather than practical ones.

As to the question of how, I've attached a demo campaign of the general idea. Basically, it takes advantage of the [setTokenVBL()] command to show or hide the VBL for tokens and backgrounds based on what floor they are on. There are still a few bugs to work out, but I'm happy with it so far except for the FOW issues already mentioned. I plan to share the final version and a tutorial once it's finished.

You say that it is an option to have separate PC tokens for each floor, that doesn't sound all that silly to me depending on how it works. Could you go into more detail about what that would mean and how to do it? Thanks!

Re: Is there any way to "save" and "load" fog of war?

Posted: Thu Jun 22, 2017 3:21 pm
by JamzTheMan
This could get complicated quickly but there are some examples and maybe AM or Wolph42 may comment but giving the correct server settings, FoW is stored on a token and also the combined view of PC's is stored. These are untested theories and just coming off the top of my head:

Possible Method: PC's have no vision/fow. Instead, there is a shadow token under them that follow them exposing/storing FoW. Look up any of the various "Invisible" shadow token macros for examples. Here, you would have "Some Name: Floor 1" token and "Some Name: Floor 2" token, etc. To toggle FoW, I believe you would just change ownership and/or PC/NPC state via macro to control current vision.

This is the only way I can think of using macro's only. I assuming you already have a method to handle PC's on different floors at the same time?

And of course, word of warning. Although technically possible, the more VBl, the more tokens, and worse, the more lighting you add to this single map, your performance WILL degrade. Furthermore, stored FoW on tokens is not efficient. Most people complain about slow performance until you clear FoW on a token. YMMV

I still think a better solution would be to implement Wolph42's teleport macros. Token enters building on main map, gets teleported to new map with floor locations (I would have 1 map for the building maybe with multiple floors spread out on that map). Given that a map has VBL, generally speaking, the players are going to see blackness around the building anyway and would never know they are on a different map. If you have windows/doors looking out, you would have to duplicate the main map possibly if you want to portray that...

Bottom line, what is cool vs what is technically viable vs what is needed is a ven diagram... I know personally I've sometimes spent hours writing macros for things when in the end, during actual game play, it really wasn't needed. Remembering just a few years ago it was markers, mini's and paper! :)

Re: Is there any way to "save" and "load" fog of war?

Posted: Thu Jun 22, 2017 4:37 pm
by aliasmask
MT doesn't handle sight very well beyond a single plane. So, I've always just put different floors next to the lower floors or on a different map. All this FOW hacking is probably not worth the effort.

Re: Is there any way to "save" and "load" fog of war?

Posted: Thu Jun 22, 2017 5:26 pm
by wolph42
yes what you want is potentially possible but as said: complicated. The best method IMO is to use the single teleport macros for entering and exiting buildings. and put the inside of a building somewhere else. This way you can enter a building and are then teleported and when you exit the building you are teleported back. This is the most 'safe and elegant' approach.

Re: Is there any way to "save" and "load" fog of war?

Posted: Thu Jun 22, 2017 9:06 pm
by goldensword52
Thanks a lot for the suggestion of "shadow tokens"! I've gotten another prototype up and running and for the most part it does exactly what I want. It needs a bit more polish, but using shadow tokens it looks like I can even "save" the revealed fog for each floor individually.

That's good to know that there may be performance issues as things scale up; I'll try to keep that in mind when moving on to multiple tokens and light sources. As I said, I never expected the project to be "practical," and I won't mind giving up if it turns out that it can't work. But what I have so far looks promising, so thanks again for your help!