Results 1 to 4 of 4

Thread: Give Hidden Zones a Scripting GUID

  1. #1

    Give Hidden Zones a Scripting GUID

    I like to remove all components from players that are not seated at the table when my script is run but because hidden zones don't seem to have a GUID, they are not removed when I destroy all the objects in the scripting zone.

  2. #2
    I'd second that suggestion.

    I would like to be able to script a button to reveal and hide each playerboard. That doesn't seem to be possible at the moment.

  3. #3
    I will +1 this - however they actualy DO have a GUID, it's just not normally visible. If you make an empty table, with a Hidden Zone on it, and then save it - you can look at the save file .json, and see that the hidden zone has a GUID - it's just not shown out in the game interface anywhere. Like this one, for example - a save file at the Octagon table, with nothing on it besides a hidden zone. You'll see near the middle, in an object called "FogOfWarTrigger", at the end of that entry it has a GUID of "ad9724". So they have them, you just don't see them by normal means.
    Code:
    {
      "SaveName": "zone test",
      "GameMode": "None",
      "Date": "7/2/2016 9:30:03 PM",
      "Table": "Table_Octagon",
      "Sky": "Sky_Downtown",
      "Note": "",
      "Rules": "",
      "PlayerTurn": "",
      "LuaScript": "--[[ Lua code. See documentation: http://berserk-games.com/knowledgebase/scripting/ --]]\n\n--[[ The OnLoad function. This is called after everything in the game save finishes loading.\nMost of your script code goes here. --]]\nfunction onload()\n    --[[ print('Onload!') --]]\nend\n\n--[[ The Update function. This is called once per frame. --]]\nfunction update ()\n    --[[ print('Update loop!') --]]\nend",
      "LuaScriptState": "",
      "Grid": {
        "Type": 0,
        "Lines": false,
        "Snapping": false,
        "Offset": false,
        "BothSnapping": false,
        "xSize": 0.0,
        "ySize": 0.0,
        "PosOffset": {
          "x": 0.0,
          "y": 1.0,
          "z": 0.0
        }
      },
      "Hands": {
        "Enable": true,
        "DisableUnused": false,
        "Hidding": 0,
        "HandTransforms": [
          {
            "Color": "Red",
            "Transform": {
              "posX": -12.3078947,
              "posY": 3.66349649,
              "posZ": -12.4467278,
              "rotX": 0.0,
              "rotY": 44.9999962,
              "rotZ": 0.0,
              "scaleX": 9.413998,
              "scaleY": 8.961139,
              "scaleZ": 5.46584654
            }
          },
          {
            "Color": "Yellow",
            "Transform": {
              "posX": -12.3997469,
              "posY": 3.66349745,
              "posZ": 12.1996889,
              "rotX": 0.0,
              "rotY": 135.0,
              "rotZ": 0.0,
              "scaleX": 9.413991,
              "scaleY": 8.961139,
              "scaleZ": 5.465841
            }
          },
          {
            "Color": "Purple",
            "Transform": {
              "posX": 17.39027,
              "posY": 3.66349983,
              "posZ": 0.04493646,
              "rotX": 0.0,
              "rotY": 270.0,
              "rotZ": 0.0,
              "scaleX": 9.413989,
              "scaleY": 8.961139,
              "scaleZ": 5.46583939
            }
          },
          {
            "Color": "Blue",
            "Transform": {
              "posX": 12.3691387,
              "posY": 3.6634984,
              "posZ": 12.2303019,
              "rotX": 0.0,
              "rotY": 225.000015,
              "rotZ": 0.0,
              "scaleX": 9.413986,
              "scaleY": 8.961139,
              "scaleZ": 5.46584129
            }
          },
          {
            "Color": "White",
            "Transform": {
              "posX": 2.41050725E-06,
              "posY": 3.66349745,
              "posZ": -17.3454018,
              "rotX": 0.0,
              "rotY": 0.0,
              "rotZ": 0.0,
              "scaleX": 9.413987,
              "scaleY": 8.961141,
              "scaleZ": 5.46584
            }
          },
          {
            "Color": "Green",
            "Transform": {
              "posX": 1.66636391E-06,
              "posY": 3.6634984,
              "posZ": 17.1985073,
              "rotX": 0.0,
              "rotY": 179.8,
              "rotZ": 0.0,
              "scaleX": 9.413986,
              "scaleY": 8.961139,
              "scaleZ": 5.46584034
            }
          },
          {
            "Color": "Pink",
            "Transform": {
              "posX": 12.3691339,
              "posY": 3.66349888,
              "posZ": -12.1405659,
              "rotX": 0.0,
              "rotY": 315.000031,
              "rotZ": 0.0,
              "scaleX": 9.413983,
              "scaleY": 8.961139,
              "scaleZ": 5.46583843
            }
          },
          {
            "Color": "Orange",
            "Transform": {
              "posX": -17.4208813,
              "posY": 3.663497,
              "posZ": -0.169386163,
              "rotX": 0.0,
              "rotY": 90.0,
              "rotZ": 0.0,
              "scaleX": 9.413999,
              "scaleY": 8.961139,
              "scaleZ": 5.46584558
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DBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgy8DQx5DAABHyNK3wAAAABJRU5ErkJggg==",
      "VectorLines": [],
      "ObjectStates": [
        {
          "Name": "FogOfWarTrigger",
          "Transform": {
            "posX": -2.48736382,
            "posY": 2.71113467,
            "posZ": 0.255624771,
            "rotX": 0.0,
            "rotY": 0.0,
            "rotZ": 0.0,
            "scaleX": 14.1865139,
            "scaleY": 3.5,
            "scaleZ": 7.35836935
          },
          "Nickname": "",
          "Description": "",
          "ColorDiffuse": {
            "r": 1.0,
            "g": 1.0,
            "b": 1.0
          },
          "Locked": true,
          "Grid": true,
          "Snap": true,
          "Autoraise": true,
          "Sticky": true,
          "FogColor": "White",
          "FogHidePointers": false,
          "FogReverseHiding": false,
          "FogSeethrough": true,
          "LuaScript": "",
          "LuaScriptState": "",
          "GUID": "ad9724"
        }
      ],
      "TabStates": {
        "0": {
          "title": "Rules",
          "body": "",
          "visibleColor": {
            "r": 0.5,
            "g": 0.5,
            "b": 0.5
          },
          "id": 0
        },
        "1": {
          "title": "White",
          "body": "",
          "visibleColor": {
            "r": 1.0,
            "g": 1.0,
            "b": 1.0
          },
          "id": 1
        },
        "2": {
          "title": "Brown",
          "body": "",
          "visibleColor": {
            "r": 0.443,
            "g": 0.231,
            "b": 0.09
          },
          "id": 2
        },
        "3": {
          "title": "Red",
          "body": "",
          "visibleColor": {
            "r": 0.856,
            "g": 0.1,
            "b": 0.094
          },
          "id": 3
        },
        "4": {
          "title": "Orange",
          "body": "",
          "visibleColor": {
            "r": 0.956,
            "g": 0.392,
            "b": 0.113
          },
          "id": 4
        },
        "5": {
          "title": "Yellow",
          "body": "",
          "visibleColor": {
            "r": 0.905,
            "g": 0.898,
            "b": 0.172
          },
          "id": 5
        },
        "6": {
          "title": "Green",
          "body": "",
          "visibleColor": {
            "r": 0.192,
            "g": 0.701,
            "b": 0.168
          },
          "id": 6
        },
        "7": {
          "title": "Blue",
          "body": "",
          "visibleColor": {
            "r": 0.118,
            "g": 0.53,
            "b": 1.0
          },
          "id": 7
        },
        "8": {
          "title": "Teal",
          "body": "",
          "visibleColor": {
            "r": 0.129,
            "g": 0.694,
            "b": 0.607
          },
          "id": 8
        },
        "9": {
          "title": "Purple",
          "body": "",
          "visibleColor": {
            "r": 0.627,
            "g": 0.125,
            "b": 0.941
          },
          "id": 9
        },
        "10": {
          "title": "Pink",
          "body": "",
          "visibleColor": {
            "r": 0.96,
            "g": 0.439,
            "b": 0.807
          },
          "id": 10
        },
        "11": {
          "title": "Black",
          "body": "",
          "visibleColor": {
            "r": 0.25,
            "g": 0.25,
            "b": 0.25
          },
          "id": 11
        }
      }
    }
    This might only be helpful for someone with only one or two hidden zones on the table, but you can't "name" a hidden zone by normal means, either - so for someone with say, half a dozen or so of them on the table for an RPG map, getting them this way would not be a good idea.

  4. #4
    I do the exact same thing you are describing, clean up unused stuff from empty player seats.

    I've gotten the GUIDs from the JSON savegame as described and stored them per player color. Then you can convert them to object references and destruct them for the empty seats.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •