getInfo
getInfo() Function
• Introduced in version 1.3b69
Returns a json 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" or "server". "campaign" is an option you can use since b70
Examples
<!-- print the info json about the current map to the chat -->
<pre>
[r:json.indent(getInfo("map"), 4)]
</pre>
Sample output for the given topics:
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
}
client
{ "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 }
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
}
Note:
The getInfo("client")
function returns the names of all the of lib: tokens. As a bonus if the
libversion
the value of this property will be reported as the version.Version Changes
- 1.3b70 - Added campaign option for
topic
- 1.3b76 - Added values 'timeInMS' and 'timeDate' to both server- and client-info