Merge branch 'main' into table-layout

This commit is contained in:
Chr1Z 2023-01-07 00:58:48 +01:00 committed by GitHub
commit 77eaaa3dfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 524 additions and 1009 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
img/headers/olive.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -75,14 +75,24 @@
"URL": "http://cloud-3.steamusercontent.com/ugc/2027213118466516005/113C19D37CFFA9E554394FD5B11B32967F846A62/" "URL": "http://cloud-3.steamusercontent.com/ugc/2027213118466516005/113C19D37CFFA9E554394FD5B11B32967F846A62/"
}, },
{ {
"Name": "header_core", "Name": "header_cover",
"Type": 0, "Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2024962321894443102/5727544F24E8C4546031F4DDE8BD4B45D93AC3FC/" "URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977312342/0D22712378B1F9A5A1FC7DA40C355943C878DDC0/"
}, },
{ {
"Name": "header_acolyte", "Name": "header_acolyte",
"Type": 0, "Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/2024962321894443022/3262DF2ABAE8D9A2BF64ECB74C1BB34B33814554/" "URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977311773/B8B2021D42CFB084AFDCCA42EE6B9A57F3E30AC6/"
},
{
"Name": "header_ruins",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977312917/E24A34736C912186C7AC58270E3819B6A44B3EE8/"
},
{
"Name": "header_olive",
"Type": 0,
"URL": "http://cloud-3.steamusercontent.com/ugc/5118935530977377198/4E88B41107A29D027D86E6B80D47B03617335990/"
}, },
{ {
"Name": "option_on", "Name": "option_on",

View File

@ -1,5 +1,3 @@
ASSEMBLY_POSITION = {69.08, 4, 36.45}
function onload() function onload()
chaosbag = getChaosBag() chaosbag = getChaosBag()
manager = getObjectFromGUID("5933fb") manager = getObjectFromGUID("5933fb")

View File

@ -14,16 +14,16 @@
"r": 1 "r": 1
}, },
"ContainedObjects_order": [ "ContainedObjects_order": [
"Custom_Tile.b2b7be", "Bless.b2b7be",
"Custom_Tile.b2b7be", "Bless.b2b7be",
"Custom_Tile.09aa04", "Bless.b2b7be",
"Custom_Tile.90e57c", "Bless.b2b7be",
"Custom_Tile.5ca99d", "Bless.b2b7be",
"Custom_Tile.b2b7be", "Bless.b2b7be",
"Custom_Tile.bc1c12", "Bless.b2b7be",
"Custom_Tile.e9c4f9", "Bless.b2b7be",
"Custom_Tile.eb0b16", "Bless.b2b7be",
"Custom_Tile.eb0b16" "Bless.b2b7be"
], ],
"ContainedObjects_path": "Blesstokens.afa06b", "ContainedObjects_path": "Blesstokens.afa06b",
"CustomMesh": { "CustomMesh": {

View File

@ -37,7 +37,7 @@
"LuaScriptState": "", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Tile", "Name": "Custom_Tile",
"Nickname": "", "Nickname": "Bless",
"Snap": true, "Snap": true,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -54,4 +54,4 @@
}, },
"Value": 0, "Value": 0,
"XmlUI": "" "XmlUI": ""
} }

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.04894,
"g": 0.32859,
"r": 0.37456
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778627699/339FB716CB25CA6025C338F13AFDFD9AC6FA8356/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "09aa04",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -1.465,
"posY": 1.694,
"posZ": -26.93,
"rotX": 0,
"rotY": 90,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.04894,
"g": 0.32859,
"r": 0.37456
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778627699/339FB716CB25CA6025C338F13AFDFD9AC6FA8356/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "5ca99d",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -1.465,
"posY": 1.709,
"posZ": -26.93,
"rotX": 0,
"rotY": 90,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.04894,
"g": 0.32859,
"r": 0.37456
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778627699/339FB716CB25CA6025C338F13AFDFD9AC6FA8356/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "90e57c",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -1.465,
"posY": 1.706,
"posZ": -26.93,
"rotX": 0,
"rotY": 90,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.04894,
"g": 0.32859,
"r": 0.37456
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778627699/339FB716CB25CA6025C338F13AFDFD9AC6FA8356/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "bc1c12",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -1.465,
"posY": 1.688,
"posZ": -26.93,
"rotX": 0,
"rotY": 90,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.04894,
"g": 0.32859,
"r": 0.37456
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778627699/339FB716CB25CA6025C338F13AFDFD9AC6FA8356/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "e9c4f9",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -1.465,
"posY": 1.697,
"posZ": -26.93,
"rotX": 0,
"rotY": 90,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.04894,
"g": 0.32859,
"r": 0.37456
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778627699/339FB716CB25CA6025C338F13AFDFD9AC6FA8356/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "eb0b16",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -45.934,
"posY": 1.814,
"posZ": 4.076,
"rotX": 0,
"rotY": 90,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -14,16 +14,16 @@
"r": 1 "r": 1
}, },
"ContainedObjects_order": [ "ContainedObjects_order": [
"Custom_Tile.678891", "Curse.678891",
"Custom_Tile.678891", "Curse.678891",
"Custom_Tile.adec97", "Curse.678891",
"Custom_Tile.678891", "Curse.678891",
"Custom_Tile.f82dd9", "Curse.678891",
"Custom_Tile.678891", "Curse.678891",
"Custom_Tile.5b224c", "Curse.678891",
"Custom_Tile.678891", "Curse.678891",
"Custom_Tile.b92c2b", "Curse.678891",
"Custom_Tile.678891" "Curse.678891"
], ],
"ContainedObjects_path": "Cursetokens.bd0253", "ContainedObjects_path": "Cursetokens.bd0253",
"CustomMesh": { "CustomMesh": {

View File

@ -37,7 +37,7 @@
"LuaScriptState": "", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Tile", "Name": "Custom_Tile",
"Nickname": "", "Nickname": "Curse",
"Snap": true, "Snap": true,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
@ -54,4 +54,4 @@
}, },
"Value": 0, "Value": 0,
"XmlUI": "" "XmlUI": ""
} }

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.44425,
"g": 0.00387,
"r": 0.27072
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778636039/2A25BD38E8C44701D80DD96BF0121DA21843672E/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "5b224c",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 4.233,
"posY": 1.607,
"posZ": -21.577,
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.44425,
"g": 0.00387,
"r": 0.27072
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778636039/2A25BD38E8C44701D80DD96BF0121DA21843672E/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "adec97",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 4.233,
"posY": 1.607,
"posZ": -21.577,
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.44425,
"g": 0.00387,
"r": 0.27072
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778636039/2A25BD38E8C44701D80DD96BF0121DA21843672E/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "b92c2b",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -45.493,
"posY": 1.791,
"posZ": -3.886,
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,57 +0,0 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.44425,
"g": 0.00387,
"r": 0.27072
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 2
},
"ImageScalar": 1,
"ImageSecondaryURL": "",
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1655601092778636039/2A25BD38E8C44701D80DD96BF0121DA21843672E/",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "f82dd9",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 4.233,
"posY": 1.607,
"posZ": -21.577,
"rotX": 0,
"rotY": 270,
"rotZ": 0,
"scaleX": 0.81,
"scaleY": 1,
"scaleZ": 0.81
},
"Value": 0,
"XmlUI": ""
}

View File

@ -22,7 +22,7 @@
"ImageURL": "http://cloud-3.steamusercontent.com/ugc/1838053776205435595/ECFB88938ADBD1EF7AEF713111A11330FD9FAA5A/", "ImageURL": "http://cloud-3.steamusercontent.com/ugc/1838053776205435595/ECFB88938ADBD1EF7AEF713111A11330FD9FAA5A/",
"WidthScale": 0 "WidthScale": 0
}, },
"Description": "Searches your top X cards by setting your hand aside and putting the cards into your hand.\n\nPut the target of your search on your set aside hand.\n\nSelect \"Shuffle\" or \"No Shuffle\" to put the cards back in your deck.\n\nCheck context menu for additional information.", "Description": "Searches the top X cards of the nearest playmat by setting your hand aside and putting the cards into your hand.\n\nPut the target of your search on your set aside hand.",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",
"GUID": "17aed0", "GUID": "17aed0",
@ -34,7 +34,7 @@
"LayoutGroupSortIndex": 0, "LayoutGroupSortIndex": 0,
"Locked": false, "Locked": false,
"LuaScript": "require(\"accessories/SearchAssistant\")", "LuaScript": "require(\"accessories/SearchAssistant\")",
"LuaScriptState": "\"White\"", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Tile", "Name": "Custom_Tile",
"Nickname": "Search Assistant", "Nickname": "Search Assistant",

View File

@ -1 +1 @@
{"optionPanel":{"playAreaSnapTags":true,"showAttachmentHelper":false,"showChaosBagManager":false,"showCleanUpHelper":false,"showCustomPlaymatImages":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showNavigationOverlay":false,"showTitleSplash":true,"showTokenArranger":false,"useClueClickers":false,"useSnapTags":true}} {"optionPanel":{"playAreaSnapTags":true,"showAttachmentHelper":false,"showChaosBagManager":false,"showCleanUpHelper":false,"showCustomPlaymatImages":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":[],"showNavigationOverlay":false,"showSearchAssistant":[],"showTitleSplash":true,"showTokenArranger":false,"useClueClickers":false,"useSnapTags":true}}

View File

@ -22,7 +22,7 @@
"ImageURL": "https://i.imgur.com/gs1mtXJ.png", "ImageURL": "https://i.imgur.com/gs1mtXJ.png",
"WidthScale": 0 "WidthScale": 0
}, },
"Description": "Allows changing of the playmat image. Provide URL to the image or leave empty for default image.\n\nSee context menu for additional information.", "Description": "Allows changing of the playmat image. Provide URL to the image or leave empty for default image.",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",
"GUID": "b7b45b", "GUID": "b7b45b",
@ -34,7 +34,7 @@
"LayoutGroupSortIndex": 0, "LayoutGroupSortIndex": 0,
"Locked": true, "Locked": true,
"LuaScript": "require(\"core/PlayAreaSelector\")", "LuaScript": "require(\"core/PlayAreaSelector\")",
"LuaScriptState": "{\"cd\":{\"move\":false,\"scale\":false},\"tid\":[]}", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Playmat Image Swapper", "Nickname": "Playmat Image Swapper",
@ -42,9 +42,9 @@
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": -10.358, "posX": -10.36,
"posY": 1.675, "posY": 1.5,
"posZ": 17.063, "posZ": 17.06,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,
"rotZ": 0, "rotZ": 0,

View File

@ -18,6 +18,7 @@
"Damage.cd2a02", "Damage.cd2a02",
"Horror.36be72", "Horror.36be72",
"ClueDoom.a3fb6c", "ClueDoom.a3fb6c",
"Path.7234af",
"Resource.00d19a", "Resource.00d19a",
"ResourceCounter.498ec0" "ResourceCounter.498ec0"
], ],

View File

@ -0,0 +1,176 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.60453,
"g": 0.60453,
"r": 0.60453
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 3
},
"ImageScalar": 1,
"ImageSecondaryURL": "https://i.imgur.com/vppt2my.png",
"ImageURL": "https://i.imgur.com/vppt2my.png",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "path",
"GUID": "7234af",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "Path",
"Snap": true,
"States": {
"2": {
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.6045295,
"g": 0.6045295,
"r": 0.6045295
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 3
},
"ImageScalar": 1,
"ImageSecondaryURL": "https://i.imgur.com/HyfE8m8.png",
"ImageURL": "https://i.imgur.com/HyfE8m8.png",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "44b0c5",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -39.7933121,
"posY": 1.63758957,
"posZ": 2.038383,
"rotX": 359.9201,
"rotY": 269.9961,
"rotZ": 0.0168742146,
"scaleX": 1,
"scaleY": 1,
"scaleZ": 1
},
"Value": 0,
"XmlUI": ""
},
"3": {
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"ColorDiffuse": {
"b": 0.6045295,
"g": 0.6045295,
"r": 0.6045295
},
"CustomImage": {
"CustomTile": {
"Stackable": false,
"Stretch": true,
"Thickness": 0.1,
"Type": 3
},
"ImageScalar": 1,
"ImageSecondaryURL": "https://i.imgur.com/HyfE8m8.png",
"ImageURL": "https://i.imgur.com/dHKBLoD.png",
"WidthScale": 0
},
"Description": "",
"DragSelectable": true,
"GMNotes": "",
"GUID": "5b38c6",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScript": "",
"LuaScriptState": "",
"MeasureMovement": false,
"Name": "Custom_Tile",
"Nickname": "",
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": -38.8217163,
"posY": 1.99356019,
"posZ": 0.4159239,
"rotX": 359.9201,
"rotY": 272.9828,
"rotZ": 0.01687373,
"scaleX": 0.8,
"scaleY": 1,
"scaleZ": 0.8
},
"Value": 0,
"XmlUI": ""
}
},
"Sticky": true,
"Tags": [
"Location"
],
"Tooltip": true,
"Transform": {
"posX": -50.369,
"posY": 1.746,
"posZ": -0.17,
"rotX": 0,
"rotY": 0,
"rotZ": 0,
"scaleX": 1,
"scaleY": 1,
"scaleZ": 1
},
"Value": 0,
"XmlUI": ""
}

View File

@ -1,13 +1,17 @@
-- Search Assistant local playmatAPI = require("playermat/PlaymatApi")
-- made by: Chr1Z
-- original by: Tikatoy
-- description: search the top X cards of your deck
information = {
version = "1.4",
last_updated = "12.11.2022"
}
MAT_GUIDS = { "8b081b", "bd0ff4", "383d8b", "0840d5" } -- forward declaration of variables that are used across functions
local matColor
local setAsidePosition
local setAsideRotation
local drawDeckPosition
local quickParameters = {}
quickParameters.function_owner = self
quickParameters.font_size = 165
quickParameters.width = 275
quickParameters.height = 275
quickParameters.color = "White"
-- common parameters -- common parameters
local buttonParameters = {} local buttonParameters = {}
@ -15,11 +19,12 @@ buttonParameters.function_owner = self
buttonParameters.font_size = 125 buttonParameters.font_size = 125
buttonParameters.width = 650 buttonParameters.width = 650
buttonParameters.height = 225 buttonParameters.height = 225
buttonParameters.color = "White"
local inputParameters = {} local inputParameters = {}
inputParameters.function_owner = self inputParameters.function_owner = self
inputParameters.input_function = "updateSearchNumber" inputParameters.input_function = "updateSearchNumber"
inputParameters.tooltip = "number of cards to search" inputParameters.tooltip = "custom search amount"
inputParameters.label = "#" inputParameters.label = "#"
inputParameters.font_size = 175 inputParameters.font_size = 175
inputParameters.width = 400 inputParameters.width = 400
@ -28,236 +33,161 @@ inputParameters.position = { 0, 0.11, 0 }
inputParameters.alignment = 3 inputParameters.alignment = 3
inputParameters.validation = 2 inputParameters.validation = 2
function onSave() return JSON.encode(playerColor) end function onLoad()
normalView()
function onLoad(save_state)
if save_state ~= nil then
playerColor = JSON.decode(save_state)
end
if playerColor == nil then
playerColor = Player.getAvailableColors()[1]
end
normalView()
self.addContextMenuItem("More Information", function()
printToAll("------------------------------", "White")
printToAll("Search Assistant v" .. information["version"] .. " by Chr1Z", "Orange")
printToAll("last updated: " .. information["last_updated"], "White")
printToAll("original concept by Tikatoy", "White")
end)
end end
-- regular view with search box and color switcher -- regular view with search box
function normalView() function normalView()
self.clearButtons() self.clearButtons()
self.clearInputs() self.clearInputs()
self.createInput(inputParameters)
createSearchButton() -- create custom search button
changeColor("initialize") buttonParameters.click_function = "searchCustom"
self.createInput(inputParameters) buttonParameters.tooltip = "Search the entered number of cards"
buttonParameters.position = { 0, 0.11, 0.65 }
buttonParameters.label = "Search"
self.createButton(buttonParameters)
-- create buttons to search 3, 6 or 9 cards
quickParameters.click_function = "search3"
quickParameters.label = "3"
quickParameters.position = { -0.65, 0.11, -0.65 }
self.createButton(quickParameters)
quickParameters.click_function = "search6"
quickParameters.label = "6"
quickParameters.position = { 0, 0.11, -0.65 }
self.createButton(quickParameters)
quickParameters.click_function = "search9"
quickParameters.label = "9"
quickParameters.position = { 0.65, 0.11, -0.65 }
self.createButton(quickParameters)
end end
-- click functions
function search3(_, playerColor) startSearch(playerColor, 3) end
function search6(_, playerColor) startSearch(playerColor, 6) end
function search9(_, playerColor) startSearch(playerColor, 9) end
-- view during a search with "done" buttons -- view during a search with "done" buttons
function searchView() function searchView()
self.clearButtons() self.clearButtons()
self.clearInputs() self.clearInputs()
createDoneButton(true) -- create the "End Search" button
createDoneButton(false) buttonParameters.click_function = "endSearch"
end buttonParameters.tooltip = "Left-click: Return cards and shuffle\nRight-click: Return cards without shuffling"
buttonParameters.position = { 0, 0.11, 0 }
-- change color (or initialize button) buttonParameters.label = "End Search"
function changeColor(arg, _, isRightClick) self.createButton(buttonParameters)
if arg ~= "initialize" then
-- update table with colors
COLORS = Player.getAvailableColors()
local pos = indexOf(COLORS, playerColor)
if isRightClick then
if pos == nil or pos == 1 then pos = #COLORS
else pos = pos - 1 end
else
if pos == nil or pos == #COLORS then pos = 1
else pos = pos + 1 end
end
-- update playerColor
playerColor = COLORS[pos]
-- remove button and recreate it afterwards
self.removeButton(1)
end
buttonParameters.click_function = "changeColor"
buttonParameters.tooltip = "change color"
buttonParameters.position = { 0, 0.11, -0.65 }
buttonParameters.label = playerColor
buttonParameters.color = Color.fromString(playerColor)
buttonParameters.hover_color = buttonParameters.color
self.createButton(buttonParameters)
end
-- create the search button
function createSearchButton()
buttonParameters.click_function = "startSearch"
buttonParameters.tooltip = "start the search"
buttonParameters.position = { 0, 0.11, 0.65 }
buttonParameters.label = "Search"
buttonParameters.color = Color.fromString("White")
buttonParameters.hover_color = nil
self.createButton(buttonParameters)
end
-- create the done buttons (with and without shuffle)
function createDoneButton(arg)
if arg then
buttonParameters.click_function = "endSearch1"
buttonParameters.tooltip = "Done (Shuffle)"
buttonParameters.position = { 0, 0.11, -0.65 }
buttonParameters.label = "Shuffle"
else
buttonParameters.click_function = "endSearch2"
buttonParameters.tooltip = "Done (No Shuffle)"
buttonParameters.position = { 0, 0.11, 0.65 }
buttonParameters.label = "No Shuffle"
end
buttonParameters.color = Color.fromString("White")
buttonParameters.hover_color = nil
self.createButton(buttonParameters)
end
-- get the draw deck from the player mat
function getDrawDeck()
mat.call("getDrawDiscardDecks")
return mat.getVar("drawDeck")
end end
-- input_function to get number of cards to search -- input_function to get number of cards to search
function updateSearchNumber(_, _, input) function updateSearchNumber(_, _, input)
inputParameters.value = tonumber(input) inputParameters.value = tonumber(input)
end end
-- start the search (change UI, set hand aside, draw cards) -- starts the search with the number from the input field
function startSearch(_, color) function searchCustom(_, messageColor)
if inputParameters.value == nil then local number = inputParameters.value
printToColor("Enter the number of cards to search in the textbox.", color, "Orange") if number ~= nil then
return startSearch(messageColor, number)
end else
printToColor("Enter the number of cards to search in the textbox.", messageColor, "Orange")
local hand_data = Player[playerColor].getHandTransform() end
-- make distinction between players based on hand position
if hand_data.position.x < -30 then
if hand_data.position.z > 0 then
playerNumber = 1
else
playerNumber = 2
end
else
if hand_data.position.z > 0 then
playerNumber = 3
else
playerNumber = 4
end
end
mat = getObjectFromGUID(MAT_GUIDS[playerNumber])
local zoneID = mat.getVar("zoneID")
drawDeck = getDrawDeck()
if drawDeck == nil then
printToColor("Draw pile could not be found!", color, "Red")
return
end
drawDeckPos = drawDeck.getPosition()
printToColor("Place target(s) of search on set aside hand.", color, "Green")
-- get position for set aside cards
local hand = Player[playerColor].getHandObjects()
deck_rotation = { hand_data.rotation.x, hand_data.rotation.y + 180, 180 }
-- for left players (p1 and p3) move to the left, for right players (p2 and p4) to the right
if playerNumber == 1 or playerNumber == 3 then
set_aside_pos = hand_data.position - 15 * hand_data.right
else
set_aside_pos = hand_data.position + 15 * hand_data.right
end
for i = #hand, 1, -1 do
hand[i].setPosition(set_aside_pos - Vector(0, i * 0.3, 0))
hand[i].setRotation(deck_rotation)
end
searchView()
-- handling for Norman Withers
for _, object in ipairs(getObjectFromGUID(zoneID).getObjects()) do
local pos = self.positionToLocal(object.getPosition())
if pos.z < -0.5 and object.tag == "Card" and not object.is_face_down then
object.flip()
Wait.time(function() drawDeck = getDrawDeck() end, 1)
break
end
end
Wait.time(function() drawDeck.deal(inputParameters.value, playerColor) end, 1)
end end
-- place hand back into deck and optionally shuffle -- start the search (change UI, set handCards aside, draw cards)
function endSearch1() endSearch(true) end function startSearch(messageColor, number)
matColor = playmatAPI.getMatColorByPosition(self.getPosition())
function endSearch2() endSearch(false) end -- get draw deck
local drawDeck = playmatAPI.getDrawDeck(matColor)
if drawDeck == nil then
printToColor(matColor .. " draw deck could not be found!", messageColor, "Red")
return
end
function endSearch(shuffle) drawDeckPosition = drawDeck.getPosition()
local hand = Player[playerColor].getHandObjects() printToColor("Place target(s) of search on set aside hand.", messageColor, "Green")
for i = #hand, 1, -1 do -- get playmat orientation
hand[i].setPosition(drawDeckPos + Vector(0, 6 - i * 0.3, 0)) local offset = -15
hand[i].setRotation(deck_rotation) if matColor == "Orange" or matColor == "Red" then
offset = 15
end
-- get position and rotation for set aside cards
local handData = Player[matColor].getHandTransform()
local handCards = Player[matColor].getHandObjects()
setAsidePosition = handData.position + offset * handData.right
setAsideRotation = { handData.rotation.x, handData.rotation.y + 180, 180 }
for i = #handCards, 1, -1 do
handCards[i].setPosition(setAsidePosition - Vector(0, i * 0.3, 0))
handCards[i].setRotation(setAsideRotation)
end
-- handling for Norman Withers
for _, v in ipairs(searchArea(drawDeckPosition)) do
local object = v.hit_object
if object.tag == "Card" and not object.is_face_down then
object.flip()
Wait.time(function() drawDeck = playmatAPI.getDrawDeck(matColor) end, 1)
break
end end
end
if shuffle then Wait.time(function() drawDeck.deal(number, matColor) end, 1)
Wait.time(function() searchView()
local deck = getDrawDeck()
if deck ~= nil then
deck.shuffle()
end
end, 2)
end
-- draw set aside cards (from the ground!)
local objs = Physics.cast({
origin = set_aside_pos - Vector(0, 5, 0),
direction = { 0, 1, 0 },
type = 3,
size = { 2, 2, 2 },
max_distance = 0
})
for _, v in ipairs(objs) do
local obj = v.hit_object
if obj.tag == "Deck" then
Wait.time(function()
obj.deal(#obj.getObjects(), playerColor)
end, 1)
break
elseif obj.tag == "Card" then
obj.setPosition(Player[playerColor].getHandTransform().position)
obj.flip()
break
end
end
normalView()
end end
-- helper to search array -- place handCards back into deck and optionally shuffle
function indexOf(array, value) function endSearch(_, _, isRightClick)
for i, v in ipairs(array) do local handCards = Player[matColor].getHandObjects()
if v == value then return i end
for i = #handCards, 1, -1 do
handCards[i].setPosition(drawDeckPosition + Vector(0, 6 - i * 0.3, 0))
handCards[i].setRotation(setAsideRotation)
end
if not isRightClick then
Wait.time(function()
local deck = playmatAPI.getDrawDeck(matColor)
if deck ~= nil then
deck.shuffle()
end
end, 2)
end
-- draw set aside cards (from the ground!)
for _, v in ipairs(searchArea(setAsidePosition - Vector(0, 5, 0))) do
local obj = v.hit_object
if obj.tag == "Deck" then
Wait.time(function()
obj.deal(#obj.getObjects(), matColor)
end, 1)
break
elseif obj.tag == "Card" then
obj.setPosition(Player[matColor].getHandTransform().position)
obj.flip()
break
end end
end
normalView()
end
-- utility function
function searchArea(position)
return Physics.cast({
origin = position,
direction = { 0, 1, 0 },
type = 3,
size = { 2, 2, 2 },
max_distance = 0
})
end end

View File

@ -168,7 +168,7 @@ function isCardOrDeck(x) return x.tag == 'Card' or x.tag == 'Deck' end
-- container is being searched, a TTS bug can cause tokens to duplicate or vanish. We lock the -- container is being searched, a TTS bug can cause tokens to duplicate or vanish. We lock the
-- chaos bag during search operations to avoid this. -- chaos bag during search operations to avoid this.
function onObjectSearchStart(object, playerColor) function onObjectSearchStart(object, playerColor)
findChaosBag() chaosbag = findChaosBag()
if object == chaosbag then if object == chaosbag then
bagSearchers[playerColor] = true bagSearchers[playerColor] = true
end end
@ -178,7 +178,7 @@ end
-- container is being searched, a TTS bug can cause tokens to duplicate or vanish. We lock the -- container is being searched, a TTS bug can cause tokens to duplicate or vanish. We lock the
-- chaos bag during search operations to avoid this. -- chaos bag during search operations to avoid this.
function onObjectSearchEnd(object, playerColor) function onObjectSearchEnd(object, playerColor)
findChaosBag() chaosbag = findChaosBag()
if object == chaosbag then if object == chaosbag then
bagSearchers[playerColor] = nil bagSearchers[playerColor] = nil
end end
@ -266,7 +266,9 @@ end
-- checks scripting zone for chaos bag -- checks scripting zone for chaos bag
function findChaosBag() function findChaosBag()
for _, item in ipairs(getObjectFromGUID("83ef06").getObjects()) do for _, item in ipairs(getObjectFromGUID("83ef06").getObjects()) do
if item.getDescription() == "Chaos Bag" then chaosbag = item end if item.getDescription() == "Chaos Bag" then
return item
end
end end
end end
@ -301,7 +303,7 @@ function drawChaostoken(params)
local mat = params[1] local mat = params[1]
local tokenOffset = params[2] local tokenOffset = params[2]
local isRightClick = params[3] local isRightClick = params[3]
findChaosBag() chaosbag = findChaosBag()
-- return token(s) on other playmat first -- return token(s) on other playmat first
if chaosTokensLastMat ~= nil and chaosTokensLastMat ~= mat and #chaosTokens ~= 0 then if chaosTokensLastMat ~= nil and chaosTokensLastMat ~= mat and #chaosTokens ~= 0 then
@ -466,7 +468,7 @@ end
---@param key string Name of the scenario ---@param key string Name of the scenario
---@param mode string diffculty (e.g. "hard" or "expert") ---@param mode string diffculty (e.g. "hard" or "expert")
function fillContainer(args) function fillContainer(args)
findChaosBag() chaosbag = findChaosBag()
if chaosbag ~= nil then if chaosbag ~= nil then
local data = getDataValue('modeData', args.key) local data = getDataValue('modeData', args.key)
@ -851,6 +853,13 @@ function applyOptionPanelChange(id, state)
optionPanel[id][3] = spawnOrRemoveHelper(state, "Hand Helper", {-39.27, 1.6, 22.44}, {0, 000, 0}, "Green") optionPanel[id][3] = spawnOrRemoveHelper(state, "Hand Helper", {-39.27, 1.6, 22.44}, {0, 000, 0}, "Green")
optionPanel[id][4] = spawnOrRemoveHelper(state, "Hand Helper", {-21.51, 1.6, -22.44}, {0, 180, 0}, "Red") optionPanel[id][4] = spawnOrRemoveHelper(state, "Hand Helper", {-21.51, 1.6, -22.44}, {0, 180, 0}, "Red")
-- option: Show search assistant for each player
elseif id == "showSearchAssistant" then
optionPanel[id][1] = spawnOrRemoveHelper(state, "Search Assistant", {-50.84, 1.6, 10.16}, {0, 270, 0})
optionPanel[id][2] = spawnOrRemoveHelper(state, "Search Assistant", {-50.90, 1.6, -21.96}, {0, 270, 0})
optionPanel[id][3] = spawnOrRemoveHelper(state, "Search Assistant", {-36.21, 1.6, 22.44}, {0, 000, 0})
optionPanel[id][4] = spawnOrRemoveHelper(state, "Search Assistant", {-24.46, 1.6, -22.44}, {0, 180, 0})
-- option: Show chaos bag manager -- option: Show chaos bag manager
elseif id == "showChaosBagManager" then elseif id == "showChaosBagManager" then
optionPanel[id] = spawnOrRemoveHelper(state, "Chaos Bag Manager", {-67.8, 1.6, -49.5}) optionPanel[id] = spawnOrRemoveHelper(state, "Chaos Bag Manager", {-67.8, 1.6, -49.5})
@ -937,6 +946,7 @@ function removeHelperObject(name)
["Token Arranger"] = "showTokenArranger", ["Token Arranger"] = "showTokenArranger",
["Clean Up Helper"] = "showCleanUpHelper", ["Clean Up Helper"] = "showCleanUpHelper",
["Hand Helper"] = "showHandHelper", ["Hand Helper"] = "showHandHelper",
["Search Assistant"] = "showSearchAssistant",
["Chaos Bag Manager"] = "showChaosBagManager", ["Chaos Bag Manager"] = "showChaosBagManager",
["jaqenZann's Navigation Overlay"] = "showNavigationOverlay", ["jaqenZann's Navigation Overlay"] = "showNavigationOverlay",
["Displacement Tool"] = "showDisplacementTool", ["Displacement Tool"] = "showDisplacementTool",
@ -984,6 +994,7 @@ function onClick_defaultSettings()
showDrawButton = false, showDrawButton = false,
showHandHelper = {}, showHandHelper = {},
showNavigationOverlay = false, showNavigationOverlay = false,
showSearchAssistant = {},
showTitleSplash = true, showTitleSplash = true,
showTokenArranger = false, showTokenArranger = false,
useClueClickers = false, useClueClickers = false,

View File

@ -1,32 +1,16 @@
-- Playmat Image Swapper local controlActive = false
-- updated by: Chr1Z local DEFAULT_URL = "http://cloud-3.steamusercontent.com/ugc/998015670465071049/FFAE162920D67CF38045EFBD3B85AD0F916147B2/"
-- original by: -
-- description: changes the big playmats image
information = {
version = "1.2",
last_updated = "12.11.2022"
}
defaultURL = "http://cloud-3.steamusercontent.com/ugc/998015670465071049/FFAE162920D67CF38045EFBD3B85AD0F916147B2/"
-- parameters for open/close button for reusing -- parameters for open/close button for reusing
local BUTTON_PARAMETERS = {} local buttonParameters = {}
BUTTON_PARAMETERS.function_owner = self buttonParameters.function_owner = self
BUTTON_PARAMETERS.click_function = "click_toggleControl" buttonParameters.click_function = "click_toggleControl"
BUTTON_PARAMETERS.height = 1500 buttonParameters.height = 1500
BUTTON_PARAMETERS.width = 1500 buttonParameters.width = 1500
BUTTON_PARAMETERS.color = { 1, 1, 1, 0 } buttonParameters.color = { 1, 1, 1, 0 }
function onLoad() function onLoad()
controlActive = false
createOpenCloseButton() createOpenCloseButton()
self.addContextMenuItem("More Information", function()
printToAll("------------------------------", "White")
printToAll("Playmat Image Swapper v" .. information["version"] .. " by Chr1Z", "Orange")
printToAll("last updated: " .. information["last_updated"], "White")
printToAll("Original made by unknown", "White")
end)
end end
-- click function for main button -- click function for main button
@ -78,11 +62,7 @@ end
-- click function for apply button -- click function for apply button
function click_applySurface(_, _, isRightClick) function click_applySurface(_, _, isRightClick)
if isRightClick then updateSurface(isRightClick and "" or self.getInputs()[1].value)
updateSurface()
else
updateSurface(self.getInputs()[1].value)
end
end end
-- input function for the input box -- input function for the input box
@ -93,17 +73,17 @@ function updateSurface(newURL)
local playArea = getObjectFromGUID("721ba2") local playArea = getObjectFromGUID("721ba2")
local customInfo = playArea.getCustomObject() local customInfo = playArea.getCustomObject()
if newURL ~= "" and newURL ~= nil and newURL ~= defaultURL then if newURL ~= "" and newURL ~= nil and newURL ~= DEFAULT_URL then
customInfo.image = newURL customInfo.image = newURL
broadcastToAll("New Playmat Image Applied", { 0.2, 0.9, 0.2 }) broadcastToAll("New Playmat Image Applied", { 0.2, 0.9, 0.2 })
else else
customInfo.image = defaultURL customInfo.image = DEFAULT_URL
broadcastToAll("Default Playmat Image Applied", { 0.2, 0.9, 0.2 }) broadcastToAll("Default Playmat Image Applied", { 0.2, 0.9, 0.2 })
end end
playArea.setCustomObject(customInfo) playArea.setCustomObject(customInfo)
-- get custom data helper and call it after reloading -- get custom data helper and call the playarea with it after reloading
local guid = playArea.getVar("customDataHelper") local guid = playArea.getVar("customDataHelper")
playArea = playArea.reload() playArea = playArea.reload()
@ -114,6 +94,6 @@ end
-- creates the main button -- creates the main button
function createOpenCloseButton() function createOpenCloseButton()
BUTTON_PARAMETERS.tooltip = (controlActive and "Close" or "Open") .. " Playmat Panel" buttonParameters.tooltip = (controlActive and "Close" or "Open") .. " Playmat Panel"
self.createButton(BUTTON_PARAMETERS) self.createButton(buttonParameters)
end end

View File

@ -0,0 +1,36 @@
do
local CHAOS_TOKEN_NAMES = {
["Elder Sign"] = true,
["+1"] = true,
["0"] = true,
["-1"] = true,
["-2"] = true,
["-3"] = true,
["-4"] = true,
["-5"] = true,
["-6"] = true,
["-7"] = true,
["-8"] = true,
["Skull"] = true,
["Cultist"] = true,
["Tablet"] = true,
["Elder Thing"] = true,
["Auto-fail"] = true,
["Bless"] = true,
["Curse"] = true,
["Frost"] = true
}
local TokenChecker = {}
-- returns true if the passed object is a chaos token (by name)
TokenChecker.isChaosToken = function(obj)
if CHAOS_TOKEN_NAMES[obj.getName()] then
return true
else
return false
end
end
return TokenChecker
end

View File

@ -1,4 +1,5 @@
local tokenManager = require("core/token/TokenManager") local tokenManager = require("core/token/TokenManager")
local tokenChecker = require("core/token/TokenChecker")
-- set true to enable debug logging and show Physics.cast() -- set true to enable debug logging and show Physics.cast()
local DEBUG = false local DEBUG = false
@ -180,6 +181,10 @@ function makeDiscardHandlerFor(searchPosition, discardPosition)
obj.setPositionSmooth(discardPosition, false, true) obj.setPositionSmooth(discardPosition, false, true)
obj.setRotation({0, -90, 0}) obj.setRotation({0, -90, 0})
end end
-- put chaos tokens back into bag (e.g. Unrelenting)
elseif tokenChecker.isChaosToken(obj) then
local chaosBag = Global.call("findChaosBag")
chaosBag.putObject(obj)
-- don't touch the table or this playmat itself -- don't touch the table or this playmat itself
elseif obj.guid ~= "4ee1f2" and obj ~= self then elseif obj.guid ~= "4ee1f2" and obj ~= self then
TRASHCAN.putObject(obj) TRASHCAN.putObject(obj)
@ -602,7 +607,9 @@ function maybeUpdateActiveInvestigator(card)
["08016"] = 14 -- Bob Jenkins ["08016"] = 14 -- Bob Jenkins
} }
setObjectState(smallToken, SPECIAL_ACTIONS[activeInvestigatorId] or STATE_TABLE[class]) if smallToken ~= nil then
setObjectState(smallToken, SPECIAL_ACTIONS[activeInvestigatorId] or STATE_TABLE[class])
end
end end
function setObjectState(obj, stateId) function setObjectState(obj, stateId)
@ -635,7 +642,7 @@ function showDrawButton(visible)
self.createButton({ self.createButton({
label = "Draw 1", label = "Draw 1",
click_function = "doDrawOne", click_function = "doDrawOne",
function_owner = mat, function_owner = self,
position = { 1.84, 0.1, -0.36 }, position = { 1.84, 0.1, -0.36 },
scale = { 0.12, 0.12, 0.12 }, scale = { 0.12, 0.12, 0.12 },
width = 800, width = 800,

View File

@ -1,25 +1,5 @@
local zone = nil local zone = nil
local CHAOS_TOKEN_NAMES = { local tokenChecker = require("core/token/TokenChecker")
["Elder Sign"] = true,
["+1"] = true,
["0"] = true,
["-1"] = true,
["-2"] = true,
["-3"] = true,
["-4"] = true,
["-5"] = true,
["-6"] = true,
["-7"] = true,
["-8"] = true,
["Skull"] = true,
["Cultist"] = true,
["Tablet"] = true,
["Elder Thing"] = true,
["Auto-fail"] = true,
["Bless"] = true,
["Curse"] = true,
["Frost"] = true
}
-- general code -- general code
function onSave() function onSave()
@ -36,14 +16,12 @@ end
-- context menu functions -- context menu functions
function enable() function enable()
local scale = self.getScale() local scale = self.getScale()
zone = spawnObject({ zone = spawnObject({
type = "ScriptingTrigger", type = "ScriptingTrigger",
position = self.getPosition() + Vector(0, 2.5 + 0.11, 0), position = self.getPosition() + Vector(0, 2.5 + 0.11, 0),
rotation = self.getRotation(), rotation = self.getRotation(),
scale = { scale.x * 2, 5, scale.z * 2 } scale = { scale.x * 2, 5, scale.z * 2 }
}) })
setMenu(false) setMenu(false)
end end
@ -65,7 +43,7 @@ end
function onObjectEnterScriptingZone(entering, object) function onObjectEnterScriptingZone(entering, object)
if zone ~= entering then return end if zone ~= entering then return end
if object == self or object.type == "Deck" or object.type == "Card" then return end if object == self or object.type == "Deck" or object.type == "Card" then return end
if CHAOS_TOKEN_NAMES[object.getName()] then return end if tokenChecker.isChaosToken(object) then return end
object.destruct() object.destruct()
end end

File diff suppressed because one or more lines are too long

View File

@ -13,7 +13,7 @@
<!-- main window --> <!-- main window -->
<TableLayout class="window" <TableLayout class="window"
width="500" width="500"
height="700" height="800"
active="false" active="false"
color="#000000" color="#000000"
outlineSize="2 2" outlineSize="2 2"
@ -24,7 +24,7 @@
<!-- group headers --> <!-- group headers -->
<Row class="group-header" <Row class="group-header"
preferredHeight="60" /> preferredHeight="54" />
<Cell class="group-header" <Cell class="group-header"
columnSpan="2" columnSpan="2"
color="#222222" /> color="#222222" />
@ -89,12 +89,51 @@
<VerticalScrollView horizontalScrollbarVisibility="AutohideAndExpandViewport"> <VerticalScrollView horizontalScrollbarVisibility="AutohideAndExpandViewport">
<TableLayout columnWidths="0 75" <TableLayout columnWidths="0 75"
autoCalculateHeight="1" autoCalculateHeight="1"
cellPadding="10 0 8 8"> cellPadding="10 0 5 5">
<!-- Group: general settings -->
<Row class="group-header">
<Cell class="group-header">
<Panel class="group-header"
image="header_acolyte">
<Text class="group-header">GENERAL SETTINGS</Text>
</Panel>
</Cell>
</Row>
<!-- Option: play area snap tags -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Enable snap tags for play area</Text>
<Text class="description">Only cards with the tag "Location" will snap (official cards are supported by default). Disable this if you are having issues with custom content.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="playAreaSnapTags"
onValueChanged="onClick_toggleOption(playAreaSnapTags)"/>
</Cell>
</Row>
<!-- Option: splash scenario name on setup -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Show scenario title on setup</Text>
<Text class="description">Fade in the name of the scenario for 2 seconds when placing down a scenario.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showTitleSplash"
onValueChanged="onClick_toggleOption(showTitleSplash)"/>
</Cell>
</Row>
<!-- Group: playermat settings --> <!-- Group: playermat settings -->
<Row class="group-header"> <Row class="group-header">
<Cell class="group-header"> <Cell class="group-header">
<Panel class="group-header" <Panel class="group-header"
image="header_core"> image="header_cover">
<Text class="group-header">PLAYERMAT SETTINGS</Text> <Text class="group-header">PLAYERMAT SETTINGS</Text>
</Panel> </Panel>
</Cell> </Cell>
@ -142,20 +181,6 @@
</Cell> </Cell>
</Row> </Row>
<!-- Option: play area snap tags -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Enable snap tags for play area</Text>
<Text class="description">Only cards with the tag "Location" will snap (official cards are supported by default). Disable this if you are having issues with custom content.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="playAreaSnapTags"
onValueChanged="onClick_toggleOption(playAreaSnapTags)"/>
</Cell>
</Row>
<!-- Option: use clickable resource counters --> <!-- Option: use clickable resource counters -->
<Row class="option-text"> <Row class="option-text">
<Cell class="option-text"> <Cell class="option-text">
@ -170,25 +195,11 @@
</Cell> </Cell>
</Row> </Row>
<!-- Option: splash scenario name on setup -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Show Scenario Title on Setup</Text>
<Text class="description">Fade in the name of the scenario for 2 seconds when placing down a scenario.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showTitleSplash"
onValueChanged="onClick_toggleOption(showTitleSplash)"/>
</Cell>
</Row>
<!-- Group: fan-made accessories --> <!-- Group: fan-made accessories -->
<Row class="group-header"> <Row class="group-header">
<Cell class="group-header"> <Cell class="group-header">
<Panel class="group-header" <Panel class="group-header"
image="header_acolyte"> image="header_olive">
<Text class="group-header">FAN-MADE ACCESSORIES</Text> <Text class="group-header">FAN-MADE ACCESSORIES</Text>
</Panel> </Panel>
</Cell> </Cell>
@ -236,6 +247,20 @@
</Cell> </Cell>
</Row> </Row>
<!-- Option: show search assistant -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Search Assistant</Text>
<Text class="description">Quickly search 3, 6, 9 or the top X cards of your deck!</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showSearchAssistant"
onValueChanged="onClick_toggleOption(showSearchAssistant)"/>
</Cell>
</Row>
<!-- Option: show chaos bag manager --> <!-- Option: show chaos bag manager -->
<Row class="option-text"> <Row class="option-text">
<Cell class="option-text"> <Cell class="option-text">