getInfo: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
m (Formatting; add "Themes" category)
 
(36 intermediate revisions by 11 users not shown)
Line 3: Line 3:
|version=1.3b69
|version=1.3b69
|description=
|description=
Returns a json with lots of information about a specified topic.
Returns a [[JSON Object]] with lots of information about a specified topic.
 
[[Category:MapTool]]
|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getInfo(topic)
getInfo(topic)
</source>
</syntaxhighlight >
'''Parameter'''
'''Parameter'''
{{param|topic|A string specifying the topic of the retrieved information. Can be "map", "client" or "server". "campaign" is an option you can use since b70}}
{{param|topic|A string specifying the topic of the retrieved information. Can be {{code|"map"}}, {{code|"client"}}, {{code|"server"}}, {{code|"theme"}}, {{code|"campaign"}}, {{code|"debug"}}, or {{code|"zone"}} (older version of {{code|"map"}}).}}


|examples=
|examples=
<source lang="mtmacro" line>
Examples of the different options.
<!-- print the info json about the current map to the chat -->
 
=== Retrieve {{code|map}} Information ===
 
<syntaxhighlight lang="mtmacro" line>
<!-- print the JSON Object about the current map to the chat window -->
[h:themeInfo = getInfo("map")]
<pre>
[r: json.indent(themeInfo, 2)]
</pre>
</syntaxhighlight>
 
Sample output:
<syntaxhighlight lang="json">
{
  "name":"Grasslands"
  "display name":"Grasslands"
  "image x scale":1.0
  "image y scale":1.0
  "player visible":1
  "id":"5A405229C16844869018F80F98DBF496"
  "creation time":1702257111841
  "width":0
  "height":0
  "largest Z order":0
  "vision type":"OFF"
  "vision distance":1000
  "lighting style":"OVERTOP"
  "has fog":false
  "ai rounding":"NONE"
  "grid":{
    "type":"Square"
    "color":"ff000000"
    "units per cell":5.0
    "cell height":100.0
    "cell width":100.0
    "cell offset width":0.0
    "cell offset height":0.0
    "size":100
    "x offset":0
    "y offset":0
    "second dimension":0.0
  }
  "background paint":"asset://c93660c09e3d3f9aff04df49a6c594b4"
  "fog paint":"#ff000000"
  "map asset":null
}
</syntaxhighlight>
 
=== Retrieve {{code|client}} Information ===
 
<syntaxhighlight lang="mtmacro" line>
<!-- print the JSON Object about client information to the chat window -->
<pre>
[r: json.indent(getInfo("client"), 4)]
</pre>
</syntaxhighlight >
 
Sample output:
<syntaxhighlight lang="json">
{
    "face edge": 1,
    "face vertex": 1,
    "portrait size": 175,
    "show portrait": true,
    "show stat sheet": true,
    "file sync directory": "",
    "show avatar in chat": true,
    "suppress tooltips for macroLinks": false,
    "use tooltips for inline rolls": false,
    "version": "1.12.0",
    "isFullScreen": 0,
    "timeInMs": 1659941691370,
    "timeDate": "2022-08-08 08:54:51",
    "isoTimeDate": "2022-08-08T08:54:51.3704561+02:00",
    "isHosting": false,
    "isPersonalServer": true,
    "userLanguage": "en",
    "dialogs": {
        "Dialog Name": {
            "width": 650,
            "height": 535,
            "temporary": 1,
            "title": "Title of the dialog",
            "visible": 1,
            "noframe": 0,
            "input": 1,
            "closebutton": 0,
            "html5": 1,
            "value": ""
        }
    },
    "frames": {
        "Frame Name": {
            "width": 650,
            "height": 535,
            "temporary": 1,
            "title": "Title of the frame",
            "visible": 1,
            "noframe": 0,
            "input": 1,
            "closebutton": 0,
            "html5": 1,
            "value": ""
        }
    },
    "overlays": {
        "Framework Macros": {
            "name": "Framework Macros",
            "zorder": 4,
            "visible": 1
        }
    },
    "library tokens": {
        "Name": "libVersion"
    },
    "user defined functions": {
        "function Name": "MacroName@Library"
    },
    "client id": "062b5d31-5569-412f-8f42-21faccbba44d"
}</syntaxhighlight>
 
'''Note:'''
The {{code|getInfo("client")}} function returns the names of all Lib: tokens. As a bonus if the Lib: token has a property called {{code|libversion}}, the value of this property will be reported as the value.
 
=== Retrieve {{code|server}} Information ===
 
<syntaxhighlight lang="mtmacro" line>
<!-- print the JSON Object about server information to the chat window -->
<pre>
[r: json.indent(getInfo("server"), 4)]
</pre>
</syntaxhighlight >
 
Sample output:
<syntaxhighlight lang="json">
{
    "GM reveals vision for unowned tokens": 0,
    "restricted impersonation": 0,
    "tooltips for default roll format": 1,
    "movement locked": 0,
    "gm": ["GM"],
    "hide map select ui": 0,
    "disable player asset panel": 0,
    "movement metric": "ONE_TWO_ONE",
    "hosting server": 1,
    "personal server": 1,
    "players can reveal": 1,
    "players receive campaign macros": 1,
    "auto reveal on movement": 1,
    "strict token management": 1,
    "using ai": 1,
    "vbl blocks movement": 1,
    "timeDate": "2019-09-22 18:09:02",
    "timeInMs": 1569197342110,
    "token editor locked": 0,
    "individual views": 1,
    "individual fow": 0,
    "useWebRTC": 0,
    "usePasswordFile": 1,
    "server name": "Z is for Zombie",
    "port number": 51234
}
</syntaxhighlight>
 
=== Retrieve {{code|campaign}} Information ===
 
<syntaxhighlight lang="mtmacro" line>
<!-- print the JSON Object about the campaign to the chat window -->
<pre>
<pre>
[r:json.indent(getInfo("map"), 4)]
[r: json.indent(getInfo("campaign"), 2)]
</pre>
</pre>
</source>
</syntaxhighlight>
 
Sample output:
<syntaxhighlight lang="json">
{
    "tables": [],
    "initiative owner permissions": 1,
    "id": "C0A8001E7F7E199B0B0000008008001E",
    "sight": {
"Darkvision": {
    "distance": 0,
    "arc": 0,
    "shape": "CIRCLE",
    "type": 0,
    "multiplier": 1 },
"Normal Vision - Short Range": {
    "distance": 0,
    "arc": 0,
    "shape": "CIRCLE",
    "type": 0,
    "multiplier": 1 },
"Normal": {
    "distance": 0,
    "arc": 0,
    "shape": "CIRCLE",
    "type": 0,
    "multiplier": 1 },
"Square Vision": {
    "distance": 0,
    "arc": 0,
    "shape": "SQUARE",
    "type": 0,
    "multiplier": 1 },
"Lowlight": {
    "distance": 0,
    "arc": 0,
    "shape": "CIRCLE",
    "type": 0,
    "multiplier": 2 },
"Conic Vision": {
    "distance": 120,
    "arc": 120,
    "shape": "CONE",
    "type": 0,
    "multiplier": 1 }
    },
    "initiative movement locked": 1,
    "light sources": {
"D20": [
    {
"name": "Lantern, Hooded - 30",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 30,
"shape": null },
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": {"color":1677721600},
"radius": 60,
"shape": null } ],
"type": "NORMAL",
"max range": 60 },
    {
"name": "Candle - 5",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 5,
"shape": null },
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": {"color":1677721600},
"radius": 10,
"shape": null } ],
"type": "NORMAL",
"max range": 10 },
    {
"name": "Lamp - 15",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 15,
"shape": null },
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": {"color":1677721600},
"radius": 30,
"shape": null } ],
"type": "NORMAL",
"max range": 30 },
    {
"name": "Torch - 20",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 20,
"shape": null },
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": {"color":1677721600},
"radius": 40,
"shape": null } ],
"type": "NORMAL",
"max range": 40 },
    {
"name": "Sunrod - 30",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 30,
"shape": null },
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": {"color":1677721600},
"radius": 60,
"shape": null } ],
"type": "NORMAL",
"max range": 60 },
    {
"name": "Everburning - 20",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 20,
"shape": null },
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": {"color":1677721600},
"radius": 40,
"shape": null } ],
"type": "NORMAL",
"max range": 40 } ],
"Generic": [
    {
"name": "5",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 5,
"shape": null } ],
"type": "NORMAL",
"max range": 5 },
    {
"name": "40",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 40,
"shape": null } ],
"type": "NORMAL",
"max range": 40 },
    {
"name": "20",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 20,
"shape": null } ],
"type": "NORMAL",
"max range": 20 },
    {
"name": "60",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 60,
"shape": null } ],
"type": "NORMAL",
"max range": 60 },
    {
"name": "15",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 15,
"shape": null } ],
"type": "NORMAL",
"max range": 15 },
    {
"name": "30",
"light segments": [
    {
"GM": false,
"arcAngle": 360,
"facingOffset": 0,
"ownerOnly": false,
"paint": null,
"radius": 30,
"shape": null } ],
"type": "NORMAL",
"max range": 30 } ] },
    "bars": {
"no group": [
    {
"increment": 0,
"side": "TOP",
"name": "Health" } ] },
    "states": {
"no group": [
    "Incapacitated",
    "Disabled",
    "Other2",
    "Other",
    "Other3",
    "Prone",
    "Hidden",
    "Dead",
    "Other4" ] },
    "remote repository": [],
    "zones": {
"Grasslands": "C0A8001E7E7F199B0C0000008008001E" }
}
</syntaxhighlight>
 
=== Retrieve {{code|theme}} Information ===
 
Colors are returned as ARGB hex values.  The key names are for the various GUI elements.  See the [[Themes for MapTool]] page for more information about themes and the TinyLaF theme editor.


Sample output for the given topics:
[[Category:Themes]]
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
map
<!-- print the JSON Object about the campaign to the chat window -->
<pre>
[r: json.indent(getInfo("theme"), 2)]
</pre>
</syntaxhighlight>
<syntaxhighlight lang="json">
{
{
"id": "0A00010782897D2C3700000008000102",
  "Button.background": "fff1f1f1",
"image y scale": 1,
  "Button.darkShadow": "ff666666",
"height": 0,
  "Button.disabledText": "ff8f8e8b",
"largest Z order": 2,
  "Button.focus": "ff9999cc",
"width": 0,
  "Button.foreground": "ff000000",
"name": "Grasslands",
  "Button.highlight": "ffffffff",
"creation time": 1276351711618,
  "Button.light": "ffffffff",
"grid":    {
  "Button.select": "ff999999",
"cell offset height": 0,
  "Button.shadow": "ff999999",
"cell width": 50,
  "CheckBox.background": "ffefefef",
"color": "ff000000",
  "CheckBox.disabledText": "ff8f8e8b",
"cell offset width": 0,
  ... plus 300 more lines.
"units per cell": 5,
"cell height": 50,
"second dimension": 0,
"type": "Square",
"x offset": 0,
"y offset": 0,
"size": 50
},
"vision type": "off",
"image x scale": 1,
"player visible": 1
}
}
</syntaxhighlight>


client
=== Retrieve {{code|debug}} Information ===
{   "movement metric": "ONE_TWO_ONE",    "library tokens": {"Lib:cifMacroIO": "unknown"},    "timeDate": "2010-10-13 19:03:38",    "portrait size": 175,    "user defined functions":    [        "getMacroGroups",        "redefined_1_getMacroGroups",        "l.decode",        "redefined_0_l.decode"    ],    "timeInMs": 1286989418105,    "show stat sheet": true,    "face vertex": 1,    "version": "DEVELOPMENT",    "face edge": 1 }


Retrieve debug information, including MapTool version, Java settings, language setting, and operating system.


server
<syntaxhighlight lang="mtmacro" line>
<!-- print the JSON Object with debug info to the chat window -->
<pre>
[r: json.indent(getInfo("debug"), 2)]
</pre>
</syntaxhighlight>
 
<syntaxhighlight lang="json">
{
{
"initiative owner permissions": 0,
  "maptool":{"version":"1.13.1","max mem avail":"16,312","max mem used":"251,658,240"}
"players can reveal": 0,
  "java":{"vendor":"Eclipse Adoptium"
"movement locked": 0,
  "home":"C:\\Users\\usenrame\\AppData\\Local\\MapTool\\runtime"
"tooltips for default roll format": 1,
  "version":"17.0.1"}
"individual views": 0,
  "locale":{"country":"United States","language":"English"}
"players receive campaign macros": 0,
  "locale":"English (United States)"
"strict token management": 0,
  "variant":""}
"restricted impersonation": 0
  "os":{"name":"Windows 10","version":"10.0","arch":"amd64"
}
}
</source>
</syntaxhighlight>
 
=== Retrieve {{code|zone}} Information ===
 
Retrieve information about the current map.
 
<syntaxhighlight lang="mtmacro" line>
<!-- print the JSON Object with zone info to the chat window -->
<pre>
[r: json.indent(getInfo("zone"), 2)]
</pre>
</syntaxhighlight>
 
<syntaxhighlight lang="json">
{
  "name":"Grasslands","display name":"Grasslands"
  "image x scale":1.0
  "image y scale":1.0
  "player visible":1
  "id":"AB238DF229604240BC1FB33A3BB733CB"
  "creation time":1702182845421
  "width":0
  "height":0
  "largest Z order":0
  "vision type":"OFF"
  "vision distance":1000
  "grid":{"type":"Square","color":"ff000000"}
  "units per cell":5.0
  "cell height":100.0
  "cell width":100.0
  "cell offset width":0.0
  "cell offset height":0.0
  "size":100
  "x offset":0
  "y offset":0
  "second dimension":0.0
}
</syntaxhighlight>
 


'''Note:'''
The {{code|getInfo("client")}} function returns the names of all the of lib: tokens. As a bonus if the
lib:token has a property called {{code|libversion}} the value of this property will be reported as the version.


|changes=
|changes=
* '''1.3b70''' - Added campaign option for {{code|topic}}
* '''1.3b70''' - Added "{{code|campaign"}} option for {{code|topic}}
* '''1.3b76''' - Added values 'timeInMS' and 'timeDate' to both server- and client-info
* '''1.3b76''' - Added values {{code|"timeInMS"}} and {{code|"timeDate"}} to both {{code|client}} and {{code|server}} return values
* '''1.3b90''' - Added value {{code|"gm"}} to {{code|server}} return value that holds an array of logged in game masters
* '''1.5.4''' - Added values {{code|"auto reveal on movement"}} and {{code|"individual fow"}} to {{code|server}} return values
* '''1.5.5''' - Added values {{code|"GM reveals vision for unowned tokens"}} and {{code|"hosting server"}} to {{code|server}} return values
* '''1.5.7''' - Added prefs setting {{code|"file sync directory"}} and {{code|"isoTimeDate"}} to {{code|client}} return values
* '''1.5.9''' - Removed {{code|"initiative owner permissions "}} from {{code|server}} return values. Still in {{code|campaign}} info.
* '''1.6.0''' - Added {{code|"using ai"}} and {{code|"vbl blocks movment"}} to {{code|server}} return values.
* '''1.7.0''' - Added macro location information to {{code|"user defined functions"}} portion of {{code|client}} info
* '''1.8.0''' - Added additional client preferences to {{code|client}} info, and {{code|"personal server"}} indicator to {{code|server}} info
* '''1.9.0''' - Map vision type returned will be upper case {{code|OFF}}, {{code|"NIGHT"}} or {{code|DAY}}. Map display name will also be returned for map parameters.
* '''1.11.0''' - Added {{code|useWebRTC}}, {{code|usePasswordFile}}, {{code|server name}} and {{code|port number}} to {{code|server}} results.
* '''1.11.0''' - Added "theme" option to retrieve the color information from the currently loaded theme.
* '''1.12.0''' - Added "userLanguage" to the client info. This will allow add-ons and macros to localize according to the client's UI.
* '''1.14.0''' - Added "lighting style", "has fog", "ai rounding", "background paint", "fog paint", "map asset" to zone info.
 
}}
}}
[[Category:Miscellaneous Function]]

Latest revision as of 21:24, 23 February 2024

getInfo() Function

Introduced in version 1.3b69
Returns a JSON Object with lots of information about a specified topic.

Usage

getInfo(topic)

Parameter

  • topic - A string specifying the topic of the retrieved information. Can be "map", "client", "server", "theme", "campaign", "debug", or "zone" (older version of "map").

Examples

Examples of the different options.

Retrieve map Information

<!-- print the JSON Object about the current map to the chat window -->
[h:themeInfo = getInfo("map")]
<pre>
[r: json.indent(themeInfo, 2)]
</pre>

Sample output:

{
  "name":"Grasslands"
  "display name":"Grasslands"
  "image x scale":1.0
  "image y scale":1.0
  "player visible":1
  "id":"5A405229C16844869018F80F98DBF496"
  "creation time":1702257111841
  "width":0
  "height":0
  "largest Z order":0
  "vision type":"OFF"
  "vision distance":1000
  "lighting style":"OVERTOP"
  "has fog":false
  "ai rounding":"NONE"
  "grid":{
    "type":"Square"
    "color":"ff000000"
    "units per cell":5.0
    "cell height":100.0
    "cell width":100.0
    "cell offset width":0.0
    "cell offset height":0.0
    "size":100
    "x offset":0
    "y offset":0
    "second dimension":0.0
  }
  "background paint":"asset://c93660c09e3d3f9aff04df49a6c594b4"
  "fog paint":"#ff000000"
  "map asset":null
}

Retrieve client Information

<!-- print the JSON Object about client information to the chat window -->
<pre>
[r: json.indent(getInfo("client"), 4)]
</pre>

Sample output:

{
    "face edge": 1,
    "face vertex": 1,
    "portrait size": 175,
    "show portrait": true,
    "show stat sheet": true,
    "file sync directory": "",
    "show avatar in chat": true,
    "suppress tooltips for macroLinks": false,
    "use tooltips for inline rolls": false,
    "version": "1.12.0",
    "isFullScreen": 0,
    "timeInMs": 1659941691370,
    "timeDate": "2022-08-08 08:54:51",
    "isoTimeDate": "2022-08-08T08:54:51.3704561+02:00",
    "isHosting": false,
    "isPersonalServer": true,
    "userLanguage": "en",
    "dialogs": {
        "Dialog Name": {
            "width": 650,
            "height": 535,
            "temporary": 1,
            "title": "Title of the dialog",
            "visible": 1,
            "noframe": 0,
            "input": 1,
            "closebutton": 0,
            "html5": 1,
            "value": ""
        }
    },
    "frames": {
        "Frame Name": {
            "width": 650,
            "height": 535,
            "temporary": 1,
            "title": "Title of the frame",
            "visible": 1,
            "noframe": 0,
            "input": 1,
            "closebutton": 0,
            "html5": 1,
            "value": ""
        }
    },
    "overlays": {
        "Framework Macros": {
            "name": "Framework Macros",
            "zorder": 4,
            "visible": 1
        }
    },
    "library tokens": {
        "Name": "libVersion"
    },
    "user defined functions": {
        "function Name": "MacroName@Library"
    },
    "client id": "062b5d31-5569-412f-8f42-21faccbba44d"
}

Note: The getInfo("client") function returns the names of all Lib: tokens. As a bonus if the Lib: token has a property called libversion, the value of this property will be reported as the value.

Retrieve server Information

<!-- print the JSON Object about server information to the chat window -->
<pre>
[r: json.indent(getInfo("server"), 4)]
</pre>

Sample output:

{
    "GM reveals vision for unowned tokens": 0,
    "restricted impersonation": 0,
    "tooltips for default roll format": 1,
    "movement locked": 0,
    "gm": ["GM"],
    "hide map select ui": 0,
    "disable player asset panel": 0,
    "movement metric": "ONE_TWO_ONE",
    "hosting server": 1,
    "personal server": 1,
    "players can reveal": 1,
    "players receive campaign macros": 1,
    "auto reveal on movement": 1,
    "strict token management": 1,
    "using ai": 1,
    "vbl blocks movement": 1,
    "timeDate": "2019-09-22 18:09:02",
    "timeInMs": 1569197342110,
    "token editor locked": 0,
    "individual views": 1,
    "individual fow": 0,
    "useWebRTC": 0,
    "usePasswordFile": 1,
    "server name": "Z is for Zombie",
    "port number": 51234
}

Retrieve campaign Information

<!-- print the JSON Object about the campaign to the chat window -->
<pre>
[r: json.indent(getInfo("campaign"), 2)]
</pre>

Sample output:

{
    "tables": [],
    "initiative owner permissions": 1,
    "id": "C0A8001E7F7E199B0B0000008008001E",
    "sight": {
	"Darkvision": {
	    "distance": 0,
	    "arc": 0,
	    "shape": "CIRCLE",
	    "type": 0,
	    "multiplier": 1 },
	"Normal Vision - Short Range": {
	    "distance": 0,
	    "arc": 0,
	    "shape": "CIRCLE",
	    "type": 0,
	    "multiplier": 1 },
	"Normal": {
	    "distance": 0,
	    "arc": 0,
	    "shape": "CIRCLE",
	    "type": 0,
	    "multiplier": 1 },
	"Square Vision": {
	    "distance": 0,
	    "arc": 0,
	    "shape": "SQUARE",
	    "type": 0,
	    "multiplier": 1 },
	"Lowlight": {
	    "distance": 0,
	    "arc": 0,
	    "shape": "CIRCLE",
	    "type": 0,
	    "multiplier": 2 },
	"Conic Vision": {
	    "distance": 120,
	    "arc": 120,
	    "shape": "CONE",
	    "type": 0,
	    "multiplier": 1 }
    },
    "initiative movement locked": 1,
    "light sources": {
	"D20": [
	    {
		"name": "Lantern, Hooded - 30",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 30,
			"shape": null },
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": {"color":1677721600},
			"radius": 60,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 60 },
	    {
		"name": "Candle - 5",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 5,
			"shape": null },
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": {"color":1677721600},
			"radius": 10,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 10 },
	    {
		"name": "Lamp - 15",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 15,
			"shape": null },
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": {"color":1677721600},
			"radius": 30,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 30 },
	    {
		"name": "Torch - 20",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 20,
			"shape": null },
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": {"color":1677721600},
			"radius": 40,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 40 },
	    {
		"name": "Sunrod - 30",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 30,
			"shape": null },
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": {"color":1677721600},
			"radius": 60,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 60 },
	    {
		"name": "Everburning - 20",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 20,
			"shape": null },
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": {"color":1677721600},
			"radius": 40,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 40 } ],
	"Generic": [
	    {
		"name": "5",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 5,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 5 },
	    {
		"name": "40",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 40,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 40 },
	    {
		"name": "20",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 20,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 20 },
	    {
		"name": "60",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 60,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 60 },
	    {
		"name": "15",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 15,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 15 },
	    {
		"name": "30",
		"light segments": [
		    {
			"GM": false,
			"arcAngle": 360,
			"facingOffset": 0,
			"ownerOnly": false,
			"paint": null,
			"radius": 30,
			"shape": null } ],
		"type": "NORMAL",
		"max range": 30 } ] },
    "bars": {
	"no group": [
	    {
		"increment": 0,
		"side": "TOP",
		"name": "Health" } ] },
    "states": {
	"no group": [
	    "Incapacitated",
	    "Disabled",
	    "Other2",
	    "Other",
	    "Other3",
	    "Prone",
	    "Hidden",
	    "Dead",
	    "Other4" ] },
    "remote repository": [],
    "zones": {
	"Grasslands": "C0A8001E7E7F199B0C0000008008001E" }
}

Retrieve theme Information

Colors are returned as ARGB hex values. The key names are for the various GUI elements. See the Themes for MapTool page for more information about themes and the TinyLaF theme editor.

<!-- print the JSON Object about the campaign to the chat window -->
<pre>
[r: json.indent(getInfo("theme"), 2)]
</pre>
{
  "Button.background": "fff1f1f1",
  "Button.darkShadow": "ff666666",
  "Button.disabledText": "ff8f8e8b",
  "Button.focus": "ff9999cc",
  "Button.foreground": "ff000000",
  "Button.highlight": "ffffffff",
  "Button.light": "ffffffff",
  "Button.select": "ff999999",
  "Button.shadow": "ff999999",
  "CheckBox.background": "ffefefef",
  "CheckBox.disabledText": "ff8f8e8b",
  ... plus 300 more lines.
}

Retrieve debug Information

Retrieve debug information, including MapTool version, Java settings, language setting, and operating system.

<!-- print the JSON Object with debug info to the chat window -->
<pre>
[r: json.indent(getInfo("debug"), 2)]
</pre>
{
  "maptool":{"version":"1.13.1","max mem avail":"16,312","max mem used":"251,658,240"}
  "java":{"vendor":"Eclipse Adoptium"
  "home":"C:\\Users\\usenrame\\AppData\\Local\\MapTool\\runtime"
  "version":"17.0.1"}
  "locale":{"country":"United States","language":"English"}
  "locale":"English (United States)"
  "variant":""}
  "os":{"name":"Windows 10","version":"10.0","arch":"amd64"
}

Retrieve zone Information

Retrieve information about the current map.

<!-- print the JSON Object with zone info to the chat window -->
<pre>
[r: json.indent(getInfo("zone"), 2)]
</pre>
{
  "name":"Grasslands","display name":"Grasslands"
  "image x scale":1.0
  "image y scale":1.0
  "player visible":1
  "id":"AB238DF229604240BC1FB33A3BB733CB"
  "creation time":1702182845421
  "width":0
  "height":0
  "largest Z order":0
  "vision type":"OFF"
  "vision distance":1000
  "grid":{"type":"Square","color":"ff000000"}
  "units per cell":5.0
  "cell height":100.0
  "cell width":100.0
  "cell offset width":0.0
  "cell offset height":0.0
  "size":100
  "x offset":0
  "y offset":0
  "second dimension":0.0
}

Version Changes

  • 1.3b70 - Added "campaign" option for topic
  • 1.3b76 - Added values "timeInMS" and "timeDate" to both client and server return values
  • 1.3b90 - Added value "gm" to server return value that holds an array of logged in game masters
  • 1.5.4 - Added values "auto reveal on movement" and "individual fow" to server return values
  • 1.5.5 - Added values "GM reveals vision for unowned tokens" and "hosting server" to server return values
  • 1.5.7 - Added prefs setting "file sync directory" and "isoTimeDate" to client return values
  • 1.5.9 - Removed "initiative owner permissions " from server return values. Still in campaign info.
  • 1.6.0 - Added "using ai" and "vbl blocks movment" to server return values.
  • 1.7.0 - Added macro location information to "user defined functions" portion of client info
  • 1.8.0 - Added additional client preferences to client info, and "personal server" indicator to server info
  • 1.9.0 - Map vision type returned will be upper case OFF, "NIGHT" or DAY. Map display name will also be returned for map parameters.
  • 1.11.0 - Added useWebRTC, usePasswordFile, server name and port number to server results.
  • 1.11.0 - Added "theme" option to retrieve the color information from the currently loaded theme.
  • 1.12.0 - Added "userLanguage" to the client info. This will allow add-ons and macros to localize according to the client's UI.
  • 1.14.0 - Added "lighting style", "has fog", "ai rounding", "background paint", "fog paint", "map asset" to zone info.