getInfo
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 bemap
,client
, orserver
.campaign
is an option you can use since 1.3b70.
Examples
===Retrieve
Retrieve
Retrieve
map
Information===
<!-- print the JSON Object about the current map to the chat window -->
<pre>
[r: json.indent(getInfo("map"), 2)]
</pre>
Sample output:
map
{
"id": "0A00010782897D2C3700000008000102",
"image y scale": 1,
"height": 0,
"largest Z order": 2,
"width": 0,
"name": "Grasslands",
"creation time": 1276351711618,
"grid": {
"cell offset height": 0,
"cell width": 50,
"color": "ff000000",
"cell offset width": 0,
"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
}
Retrieve client
Information
<!-- print the JSON Object about client information to the chat window -->
<pre>
[r: json.indent(getInfo("client"), 2)]
</pre>
Sample output:
client
{
"movement metric": "ONE_TWO_ONE",
"library tokens": {
"Lib:cifMacroIO": "unknown"
},
"portrait size": 175,
"user defined functions": [
"getMacroGroups",
"redefined_1_getMacroGroups",
"l.decode",
"redefined_0_l.decode"
],
"timeDate": "2010-10-13 19:03:38",
"timeInMs": 1286989418105,
"show stat sheet": true,
"face vertex": 1,
"version": "DEVELOPMENT",
"face edge": 1
}
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"), 2)]
</pre>
Sample output:
server
{
"initiative owner permissions": 0,
"players can reveal": 0,
"movement locked": 0,
"tooltips for default roll format": 1,
"individual views": 0,
"players receive campaign macros": 0,
"strict token management": 0,
"restricted impersonation": 0
}
Version Changes
- 1.3b70 - Added campaign option for
topic
- 1.3b76 - Added values 'timeInMS' and 'timeDate' to both
client
andserver
return values