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

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

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

Post 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.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

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

Post by aliasmask »

Not really.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

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

Post 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.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

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

Post 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"?

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

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

Post 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...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

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

Post 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!
Attachments
Floors Beta.cmpgn
(516.38 KiB) Downloaded 33 times

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

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

Post 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! :)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

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

Post 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.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

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

Post 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.

User avatar
goldensword52
Cave Troll
Posts: 42
Joined: Thu Jul 31, 2014 1:24 am

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

Post 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!
Attachments
Floors Beta FoW.cmpgn
(1.03 MiB) Downloaded 47 times

Post Reply

Return to “MapTool”