ST Slot Machine Basic - ironmonk88/monks-module-wiki GitHub Wiki
A slot machine that runs different sets of actions depending on which images match.
- Optional: Delay Actions
- Only needed if the Switch Tile Image has transitions.
-
Landing
- Name:
_failedlanding
- Name: A set of numbers separated by periods that corresponds with images on the secondary tiles. The tile index numbering starts at 0, not 1. Use as many numbers as you have secondary tiles.
- You can add more landings with different matches if you want to get in-depth.
- Name:
-
Jump to Landing
- Use as many
{{variable.valuename}}
as you have secondary tiles. Separate them with periods.
- Use as many
-
Switch Tile Image
- Needs to switch all the secondary tiles at once via Tagger.
-
Trigger Tile
- This needs to trigger all of the secondary tiles via Tagger.
The Chat Message are for informative purposes only.
Main Tile Template
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.
{
"texture": {
"src": null,
"scaleX": 1,
"scaleY": 1,
"tint": null,
"offsetX": 0,
"offsetY": 0,
"rotation": 0
},
"x": 700,
"y": 800,
"z": 100,
"width": 100,
"height": 100,
"rotation": 0,
"alpha": 1,
"flags": {
"tagger": {
"tags": [
"Slot_Machine"
]
},
"monks-active-tiles": {
"active": true,
"record": false,
"restriction": "all",
"controlled": "all",
"trigger": [
"",
"dblclick"
],
"allowpaused": false,
"usealpha": false,
"pointer": false,
"pertoken": false,
"minrequired": 0,
"chance": 100,
"fileindex": 0,
"actions": [
{
"action": "tileimage",
"data": {
"entity": {
"id": "tagger:Slot_Wheels",
"match": "all",
"scene": "_active",
"name": "<i class=\"fas fa-tag fa-sm\"></i> Slot_Wheels"
},
"select": "random",
"transition": "none",
"speed": 1,
"loop": 1
},
"id": "lzk3rJyrh8t7JzvK"
},
{
"action": "trigger",
"data": {
"entity": {
"id": "tagger:Slot_Wheels",
"match": "all",
"scene": "_active",
"name": "<i class=\"fas fa-tag fa-sm\"></i> Slot_Wheels"
},
"token": "",
"landing": "",
"return": true,
"allowdisabled": false
},
"id": "yP5Kejbf34yIWvLl"
},
{
"action": "goto",
"data": {
"tag": "{{variable.Wheel1}}.{{variable.Wheel2}}.{{variable.Wheel3}}.{{variable.Wheel4}}",
"limit": null,
"resume": false
},
"id": "GXgWLqXWAW8R5fx3"
},
{
"action": "anchor",
"data": {
"tag": "0.0.0.0",
"stop": true
},
"id": "xe6Zc7hw3Vc5NiLY"
},
{
"action": "chatmessage",
"data": {
"flavor": "",
"text": "Winner",
"entity": "",
"incharacter": false,
"chatbubble": "true",
"for": "all",
"language": ""
},
"id": "8kU9QRoIVxauRtG3"
},
{
"action": "anchor",
"data": {
"tag": "_failedlanding",
"stop": true
},
"id": "UIvNkJiXnYwadMHG"
},
{
"action": "chatmessage",
"data": {
"flavor": "",
"text": "Loser",
"entity": "",
"incharacter": false,
"chatbubble": "true",
"for": "all",
"language": ""
},
"id": "03nkYC8rBSCTLG14"
}
],
"files": [],
"variables": {
"Wheel1": 0,
"Wheel2": 0,
"Wheel3": 0,
"Wheel4": 1
}
},
"exportSource": {
"world": "module-assembly",
"system": "pf2e",
"coreVersion": "10.291",
"systemVersion": "4.12.1"
}
},
"overhead": false,
"roof": false,
"occlusion": {
"mode": 1,
"alpha": 0,
"radius": null
},
"video": {
"loop": true,
"autoplay": true,
"volume": 0
},
"hidden": false,
"locked": false,
"id": "99gzmSW2b7XaLmCJ",
"name": "Slot_Machine_Basic_Main",
"visible": true,
"img": null,
"thumbnail": "modules/monks-active-tiles/img/cube.svg"
}
-
Set Active Tiles Variable
- Variable Name: Needs to increment on each tile and needs to target the main tile.
- Value:
{{tile.flags.monks-active-tiles.fileindex}}
Images should be loaded into each secondary tile in the same order.
MATT 10.20