ST Clock - ironmonk108/monks-module-wiki GitHub Wiki

A "mostly accurate" clock; I chose this method instead of just a simple loop so that it stays consistent & doesn't go off-course across server restarts.
This requires two tiles; they are Tagged Small_Hand and Large_Hand in the setup below.
You could use the Rotation action instead of Alter, but that has the rewinding behavior when going over 360 degrees; see Rotation's notes section.

-
Alter
- Attribute:
rotation- Value:
+ 6
- Value:
- Attribute:
-
Check Variable
- Go to landing on fail: this needs to jump back to the
Secondslanding or whatever you choose to name it.
- Go to landing on fail: this needs to jump back to the
- Delay Actions
- Jump to Landing
- Landing
- Set Active Tiles Variable
Click here to view Tile Template JSON Data
Copy & paste this into Notepad and save it as a .JSON file. Then import it using MATT's Tile Templates.
{
"width": 100,
"height": 100,
"rotation": 0,
"elevation": 0,
"sort": 100008,
"flags": {
"monks-active-tiles": {
"name": "Clock v13.02",
"active": false,
"record": false,
"restriction": "all",
"controlled": "all",
"trigger": [
"enter"
],
"allowpaused": false,
"usealpha": false,
"pointer": false,
"vision": true,
"pertoken": false,
"minrequired": null,
"cooldown": null,
"chance": 100,
"fileindex": 0,
"actions": [
{
"action": "anchor",
"data": {
"tag": "Seconds",
"stop": false
},
"id": "RXKzbFa9v71yz27W"
},
{
"action": "setvariable",
"data": {
"entity": {
"id": "tile",
"name": "This Tile"
},
"name": "ticks",
"value": "+ 1"
},
"id": "UOSIhjwNCJCApr0X"
},
{
"action": "alter",
"data": {
"entity": {
"id": "tagger:Small Hand",
"match": "all",
"scene": "_active",
"name": "<i class=\"fas fa-tag fa-sm\"></i> Small Hand"
},
"collection": "tokens",
"attribute": "rotation",
"value": "+ 6",
"chatMessage": false,
"rollmode": "roll"
},
"id": "9TUNCfdgvdPWllwm"
},
{
"action": "delay",
"data": {
"delay": "1"
},
"id": "Cb6lo3OMOiMJpo94"
},
{
"action": "checkvariable",
"data": {
"entity": {
"id": "tile",
"name": "This Tile"
},
"type": "all",
"name": "ticks",
"value": "= 60",
"fail": "Seconds"
},
"id": "MBfEzlANmhTmITNl"
},
{
"action": "anchor",
"data": {
"tag": "Minute",
"stop": false
},
"id": "nBiHF9WAB9oHEBOP"
},
{
"action": "alter",
"data": {
"entity": {
"id": "tagger:Large Hand",
"match": "all",
"scene": "_active",
"name": "<i class=\"fas fa-tag fa-sm\"></i> Large Hand"
},
"collection": "tokens",
"attribute": "rotation",
"value": "+ 6",
"chatMessage": false,
"rollmode": "roll"
},
"id": "4qvvBI3LHT0KRLO1"
},
{
"action": "setvariable",
"data": {
"entity": {
"id": "tile",
"name": "This Tile"
},
"name": "ticks",
"value": "= 0"
},
"id": "cX0Ukv6c9FohmWoM"
},
{
"action": "goto",
"data": {
"tag": "Seconds",
"limit": "",
"rollmode": "roll",
"resume": false
},
"id": "OU9Dj2xo3ehgFyXf"
}
],
"files": [],
"variables": {
"ticks": 16
}
},
"tagger": {}
},
"texture": {
"src": "icons/vtt-512.png",
"scaleX": 1,
"scaleY": 1,
"tint": "#ffffff",
"anchorX": 0.5,
"anchorY": 0.5,
"offsetX": 0,
"offsetY": 0,
"fit": "fill",
"rotation": 0,
"alphaThreshold": 0.75
},
"alpha": 1,
"occlusion": {
"mode": 0,
"alpha": 0
},
"restrictions": {
"light": false,
"weather": false
},
"hidden": false,
"locked": false,
"video": {
"loop": true,
"autoplay": true,
"volume": 0
},
"name": "Clock v13.02",
"visible": true,
"img": "icons/vtt-512.png",
"thumbnail": "icons/vtt-512.png"
}
- Foundry 13.351
- MATT 13.06