exposeFOW: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: {{MacroFunction | name=exposeFOW | version=1.3b76 | description= {{stub}} Expose FOW. | usage= <source lang="mtmacro"> exposeFOW()</source> </source> <source lang="mtmacro" line> exposeF...)
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(13 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
| name=exposeFOW
| name=exposeFOW
| version=1.3b76
| version=1.3b76
|trusted=true
| description=
| description=
{{stub}}
Clears the Fog of War (FOW) for all '''selected''' tokens on the current map according to their sight settings. An optional {{code|mapName}} parameter allows exposure on maps other than the current map.  ''Note that unless the optional {{code|tokens}} parameter is provided there must be tokens selected on the map.''
Expose FOW.


| usage=
| usage=
<source lang="mtmacro">
<syntaxhighlight lang="mtmacro">
exposeFOW()</source>
exposeFOW()
</source>
<source lang="mtmacro" line>
exposeFOW(mapname)
exposeFOW(mapname)
</source>
exposeFOW(mapName,tokens)
exposeFOW(mapName,tokens, delim)
</syntaxhighlight>
'''Parameters'''
{{param|mapname|Optional map name.}}
{{param|tokens|Optional delimited string list or JSON array of tokens.}}
{{param|delim|Delimiter for tokens parameter.  Defaults to ",".  Use "json" for a JSON array.}}
 
| example=
<syntaxhighlight lang="mtmacro" line>
<!-- Expose FoW for selected tokens on current map. -->
[h: exposeFOW()]
<!-- Expose FoW for selected tokens on the named map. -->
[h: exposeFOW("Pit of Despair")]
<!-- Expose FoW for indicated tokens on the named map. -->
[h: exposeFOW("Pit of Despair", "Westley, Count Rugen")]
<!-- Expose FoW for indicated tokens, in a list delimited by a colon (":"), on the named map. -->
[h: exposeFOW("Pit of Despair", "Westley:Count Rugen", ":")])]
<!-- Expose FoW for indicated tokens in a JSON array on the named map. -->
[h: exposeFOW("Pit of Despair",'["Westley", "Count Rugen"]', "json")]
</syntaxhighlight>
| changes=
* '''1.5.4''' - Added tokens and delim parameters.
 
}}
}}
 
[[Category:Miscellaneous Function]] [[Category:FoW]]
[[Category:Miscellaneous Function]]

Latest revision as of 19:58, 14 March 2023

exposeFOW() Function

 Note: This function can only be used in a Trusted Macro

Introduced in version 1.3b76
Clears the Fog of War (FOW) for all selected tokens on the current map according to their sight settings. An optional mapName parameter allows exposure on maps other than the current map. Note that unless the optional tokens parameter is provided there must be tokens selected on the map.

Usage

exposeFOW()
exposeFOW(mapname)
exposeFOW(mapName,tokens)
exposeFOW(mapName,tokens, delim)

Parameters

  • mapname - Optional map name.
  • tokens - Optional delimited string list or JSON array of tokens.
  • delim - Delimiter for tokens parameter. Defaults to ",". Use "json" for a JSON array.

Example

<!-- Expose FoW for selected tokens on current map. -->
[h: exposeFOW()]
<!-- Expose FoW for selected tokens on the named map. -->
[h: exposeFOW("Pit of Despair")]
<!-- Expose FoW for indicated tokens on the named map. -->
[h: exposeFOW("Pit of Despair", "Westley, Count Rugen")]
<!-- Expose FoW for indicated tokens, in a list delimited by a colon (":"), on the named map. -->
[h: exposeFOW("Pit of Despair", "Westley:Count Rugen", ":")])]
<!-- Expose FoW for indicated tokens in a JSON array on the named map. -->
[h: exposeFOW("Pit of Despair",'["Westley", "Count Rugen"]', "json")]


Version Changes

  • 1.5.4 - Added tokens and delim parameters.