ST Password Input (Alter Method) - ironmonk88/monks-module-wiki GitHub Wiki

DEPRECATED

This setup still works, but it has been made drastically simpler and has been replaced with Password Input (Basic) as of MATT 10.16.

Password Input (Alter Method)

A tile that prompts the triggering player to enter a password, then depending if they have the password right, runs different actions. The example below is set up to work with a door trigger but it could open a loot entity or anything else you want.

This tile requires a dummy token on the scene to be used with several actions; these have the Password_NPC Tag in the screenshot below. Change the Filter by Attributes action to be your desired password; your password cannot contain and or or.

Setup Required

Actions

Click here to view the Show Dialog HTML

Copy & paste the code block into the Show Dialog's content field.

<form>
Please enter the password.
<input name="password" />
</form>
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
  },
  "z": 1017,
  "width": 100,
  "height": 100,
  "rotation": 0,
  "alpha": 1,
  "flags": {
    "tagger": {
      "tags": ""
    },
    "perfect-vision": {
      "lighting": ""
    },
    "tile-scroll": {
      "enableScroll": false,
      "scrollDirection": 0,
      "enableRotate": false,
      "scrollSpeed": 1,
      "repeat": 1,
      "pivotx": 0.5,
      "pivoty": 0.5,
      "offsetx": 0,
      "offsety": 0
    },
    "monks-active-tiles": {
      "active": true,
      "record": false,
      "restriction": "all",
      "controlled": "all",
      "trigger": [
        "",
        "door"
      ],
      "allowpaused": false,
      "usealpha": false,
      "pointer": false,
      "pertoken": false,
      "minrequired": 0,
      "chance": 100,
      "fileindex": 0,
      "actions": [
        {
          "action": "anchor",
          "data": {
            "tag": "_doorchecklock",
            "stop": false
          },
          "id": "pLNCJxD16QtwrAJX"
        },
        {
          "action": "dialog",
          "data": {
            "dialogtype": "confirm",
            "title": "Password",
            "content": "<form>\nPlease enter the password.\n<input name=\"password\" />\n</form>",
            "for": "token",
            "yes": "Password Enter",
            "no": ""
          },
          "id": "WaYlKYnpg456vuCo"
        },
        {
          "action": "anchor",
          "data": {
            "tag": "Password Enter",
            "stop": true
          },
          "id": "fiHHbh8EjgON2HRx"
        },
        {
          "action": "alter",
          "data": {
            "entity": {
              "id": "tagger:Password_NPC",
              "match": "all",
              "scene": "_active",
              "name": "<i class=\"fas fa-tag fa-sm\"></i> Password_NPC"
            },
            "attribute": "name",
            "value": "= \"{{value.password}}\"",
            "chatMessage": false,
            "rollmode": "roll"
          },
          "id": "a3fM1VPoOP4LohNU"
        },
        {
          "action": "runbatch",
          "id": "7TO1vdBHhVF1ad3h"
        },
        {
          "action": "attribute",
          "data": {
            "entity": {
              "id": "tagger:Password_NPC",
              "match": "all",
              "scene": "_active",
              "name": "<i class=\"fas fa-tag fa-sm\"></i> Password_NPC"
            },
            "collection": "tokens",
            "attribute": "name",
            "value": "= \"Hello1234\""
          },
          "id": "XyKZ5ar0WzbKhNad"
        },
        {
          "action": "exists",
          "data": {
            "entity": "",
            "collection": "tokens",
            "count": "> 0",
            "none": "Incorrect"
          },
          "id": "uNR8beXii0aNeowp"
        },
        {
          "action": "notification",
          "data": {
            "text": "Correct.",
            "type": "info",
            "showto": "all"
          },
          "id": "weil58mprwSpl9aI"
        },
        {
          "action": "changedoor",
          "data": {
            "entity": {
              "id": "tagger:Password_Door",
              "match": "all",
              "scene": "_active",
              "name": "<i class=\"fas fa-tag fa-sm\"></i> Password_Door"
            },
            "state": "close",
            "type": "door"
          },
          "id": "KvmE6cRqrSOrDtI3"
        },
        {
          "action": "anchor",
          "data": {
            "tag": "Incorrect",
            "stop": true
          },
          "id": "v10u9uf1gmrMLtSC"
        },
        {
          "action": "notification",
          "data": {
            "text": "Security alert.",
            "type": "error",
            "showto": "all"
          },
          "id": "bgxqOHqPzFUpHWWS"
        }
      ],
      "files": []
    },
    "exportSource": {
      "world": "matt-test",
      "system": "dnd5e",
      "coreVersion": "10.291",
      "systemVersion": "2.1.5"
    }
  },
  "overhead": false,
  "roof": false,
  "occlusion": {
    "mode": 1,
    "alpha": 0,
    "radius": null
  },
  "video": {
    "loop": true,
    "autoplay": true,
    "volume": 0
  },
  "hidden": false,
  "locked": false,
  "x": 2000,
  "y": 2500,
  "id": "SEXHsvtUJqYC59zQ",
  "name": "Password_Input",
  "visible": true,
  "img": null,
  "thumbnail": "modules/monks-active-tiles/img/cube.svg"
}

Page Last Updated

MATT 10.18

⚠️ **GitHub.com Fallback** ⚠️