Turn your Light Sources (and flame images) On/Off

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
User avatar
Oryan77
Dragon
Posts: 452
Joined: Sun Feb 20, 2011 3:14 pm

Turn your Light Sources (and flame images) On/Off

Post by Oryan77 »

Here is a set up that I've had for several years that allows me to easily turn tokens with light sources on and off. Not only does it turn the light source on/off, it also switches the graphic of the token so that the graphic appears to be "burning" or not burning. This is done by having the opposite graphic within the token as a "handout". So the macro just switches back and forth between the handout image and the normal token image.

I am not sure if the token images can be shared since I forget where I got them. Also, I photoshopped a bunch of existing ones to remove the flames. So I'm not sure if they can be shared. Hopefully anyone interested in doing this can generate their own images.

It was just brought to my attention that I should share this. I always just assume people were already doing something like this which is why I never thought to mention it before. :P

Here are example pictures....
Spoiler
Lights Off
Lights Off
Lights Off.jpg (446.35 KiB) Viewed 1078 times
Lights On
Lights On
Lights On.jpg (447.11 KiB) Viewed 1078 times
Here are a few example macros (sconce, brazier, campfire)...
Spoiler

Code: Select all

[h: type = "D20"]
[h: light = "Sconce - 20'"]

[h: SelectedTokens=getSelected()]
[FOREACH(TokenID, SelectedTokens, " "), CODE:
 {[h: switchToken(TokenID)]
  [h: NewState=if(getLights(type)==light,0,1)]
  [h: setLight(type, light, NewState)]
  [h, if(NewState==1): setTokenImage(getTokenHandout()); setTokenImage(getTokenPortrait())]
 }
]
[H: abort(0)]

Code: Select all

[h: type = "D20"]
[h: light = "Brazier - 40'"]

[h: SelectedTokens=getSelected()]
[FOREACH(TokenID, SelectedTokens, " "), CODE:
 {[h: switchToken(TokenID)]
  [h: NewState=if(getLights(type)==light,0,1)]
  [h: setLight(type, light, NewState)]
  [h, if(NewState==1): setTokenImage(getTokenHandout()); setTokenImage(getTokenPortrait())]
 }
]
[H: abort(0)]

Code: Select all

[h: type = "D20"]
[h: light = "Campfire - 40'"]

[h: SelectedTokens=getSelected()]
[FOREACH(TokenID, SelectedTokens, " "), CODE:
 {[h: switchToken(TokenID)]
  [h: NewState=if(getLights(type)==light,0,1)]
  [h: setLight(type, light, NewState)]
  [h, if(NewState==1): setTokenImage(getTokenHandout()); setTokenImage(getTokenPortrait())]
 }
]
[H: abort(0)]

User avatar
Tanthos
Giant
Posts: 176
Joined: Thu Mar 28, 2013 6:55 pm
Location: United States

Re: Turn your Light Sources (and flame images) On/Off

Post by Tanthos »

Sweet mother of luminescence, this is a brilliant idea! :shock:

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

Re: Turn your Light Sources (and flame images) On/Off

Post by JamzTheMan »

Sometimes it is the small things that do so much to enhance the game. I like it.

If I get some time I'll see if I can do the auto switch on/off code...
-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

Post Reply

Return to “User Creations”