Merge branch 'main' into playermats

This commit is contained in:
Chr1Z93 2024-06-27 00:51:45 +02:00
commit 7871924bcc
17 changed files with 114 additions and 88 deletions

View File

@ -186,7 +186,7 @@
"TokenArranger.022907", "TokenArranger.022907",
"ChaosBagManager.023240", "ChaosBagManager.023240",
"PlaceholderBoxDummy.a93466", "PlaceholderBoxDummy.a93466",
"TheMatterofBritain.194cc5", "Lovecrafter3077.b08d20",
"Tokencache_1.a15273", "Tokencache_1.a15273",
"Tokencache_0.0a8592", "Tokencache_0.0a8592",
"Tokencache_-1.b644d2", "Tokencache_-1.b644d2",
@ -207,7 +207,7 @@
"Tokencache_Curse.16a9a7", "Tokencache_Curse.16a9a7",
"Tokencache_Frost.b2b7be", "Tokencache_Frost.b2b7be",
"PhysicsDetector.b300d8", "PhysicsDetector.b300d8",
"ArkhamSCE380-5122024-Page1.bd6b3e", "ArkhamSCE390-06302024-Page1.bd6b3e",
"Neutral.834ad5", "Neutral.834ad5",
"Neutral.a84ae4", "Neutral.a84ae4",
"Neutral.762df8", "Neutral.762df8",
@ -230,7 +230,7 @@
0, 0,
0 0
], ],
"SaveName": "Arkham SCE - 3.8.0", "SaveName": "Arkham SCE - 3.9.0",
"Sky": "Sky_Museum", "Sky": "Sky_Museum",
"SkyURL": "https://i.imgur.com/GkQqaOF.jpg", "SkyURL": "https://i.imgur.com/GkQqaOF.jpg",
"SnapPoints_path": "SnapPoints.json", "SnapPoints_path": "SnapPoints.json",

View File

@ -314,5 +314,40 @@
"y": 1.481, "y": 1.481,
"z": -87 "z": -87
} }
},
{
"Position": {
"x": 60,
"y": 1.481,
"z": 48
}
},
{
"Position": {
"x": -42,
"y": 1.481,
"z": 89
}
},
{
"Position": {
"x": -42,
"y": 1.481,
"z": 71
}
},
{
"Position": {
"x": -62,
"y": 1.481,
"z": 71
}
},
{
"Position": {
"x": -62,
"y": 1.481,
"z": 89
}
} }
] ]

View File

@ -10,7 +10,7 @@
"g": 1, "g": 1,
"r": 1 "r": 1
}, },
"Description": "Thanks for downloading Arkham SCE 3.8.0!\n\nAdded Parallel Rex Murphy to the deck importer!\r\nPlaymat slots are now editable via a new button!\nThe options panel has been updated with a new look.\r\nEdge of the Earth weaknesses now spawn with a single Damage or Horror token as a reminder of how they can be removed.\r", "Description": "Thanks for downloading Arkham SCE 3.9.0!\n\n- Added confirmation dialog for discard hotkey (e.g. for locations)\r\n- Added new action / ability tokens\r\n- Added automated discarding for Patrice\r\n- Added new option to enable all card helpers\r\n- Added new option to load class-specific playermats\r",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",
"GUID": "bd6b3e", "GUID": "bd6b3e",
@ -25,7 +25,7 @@
"LuaScriptState": "", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Notecard", "Name": "Notecard",
"Nickname": "Arkham SCE 3.8.0 - 5/12/2024 - Page 1", "Nickname": "Arkham SCE 3.9.0 - 06/30/2024 - Page 1",
"Snap": true, "Snap": true,
"States": { "States": {
"2": { "2": {
@ -40,10 +40,10 @@
"g": 1, "g": 1,
"r": 1 "r": 1
}, },
"Description": "Draw Encounter button now draws to the draw area on left-click, and to the rightmost empty threat area slot on right-click.\nCard states can now be changed with number keys.\r\nCleanup Helper now resets activation tokens.\r\nThe deck importer now can import Hemlock Vale story assets.\r\nHotkey Reference card has been updated.", "Description": "\n- Performed a small clean up of the bottom corners of the table\r\n- Updated 'Additional Cards Bag' / 'Player Card Panel' with better handling for fan-made cards\r\n- Updated Clean Up Helper, Drawing Tool, Hand Helper and Search Assistant\r\n- Updated Token Arranger",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",
"GUID": "4a2b72", "GUID": "522604",
"Grid": true, "Grid": true,
"GridProjection": false, "GridProjection": false,
"Hands": false, "Hands": false,
@ -55,17 +55,17 @@
"LuaScriptState": "", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Notecard", "Name": "Notecard",
"Nickname": "Arkham SCE 3.8.0 - 5/12/2024 - Page 2", "Nickname": "Arkham SCE 3.9.0 - 06/30/2024 - Page 2",
"Snap": true, "Snap": true,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": -27, "posX": -27,
"posY": 1.55149889, "posY": 1.551,
"posZ": -56.165, "posZ": -56.165,
"rotX": 4.07705976e-8, "rotX": 0,
"rotY": 90.00001, "rotY": 90,
"rotZ": 4.08891943e-9, "rotZ": 0,
"scaleX": 3, "scaleX": 3,
"scaleY": 1, "scaleY": 1,
"scaleZ": 3 "scaleZ": 3
@ -85,10 +85,10 @@
"g": 1, "g": 1,
"r": 1 "r": 1
}, },
"Description": "Nkosi Mabati helper updated with custom token compatability.\nNew right-click option has been added Nepthys.\nRite of Sanctification no longer has to be right-clicked for each token sealed.\nFixed Ancient Covenant and Blasphemous Covenant having low-quality images.\nMyriad other under-the-hood code optimizations and bugfixes.", "Description": "\n- Implemented menu to redraw tokens for specific cards like Heavy Furs and Wendy Adams\r\n- Bugfix for attempting to draw an encounter card while there is no deck\r\n- Bugfix for Navigation Overlay: now checks if playmat is occupied\r\n- Bugfix for Phase Tracker broadcasting\r\n- Performance improvements",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",
"GUID": "b27cd3", "GUID": "522877",
"Grid": true, "Grid": true,
"GridProjection": false, "GridProjection": false,
"Hands": false, "Hands": false,
@ -100,17 +100,17 @@
"LuaScriptState": "", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Notecard", "Name": "Notecard",
"Nickname": "Arkham SCE 3.8.0 - 5/12/2024 - Page 3", "Nickname": "Arkham SCE 3.9.0 - 06/30/2024 - Page 3",
"Snap": true, "Snap": true,
"Sticky": true, "Sticky": true,
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": -27, "posX": -27,
"posY": 1.55149889, "posY": 1.551,
"posZ": -56.165, "posZ": -56.165,
"rotX": 5.014709e-8, "rotX": 0,
"rotY": 90.00001, "rotY": 90,
"rotZ": 3.128093e-8, "rotZ": 0,
"scaleX": 3, "scaleX": 3,
"scaleY": 1, "scaleY": 1,
"scaleZ": 3 "scaleZ": 3

View File

@ -55,7 +55,7 @@
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": 20.6, "posX": 20.6,
"posY": 1.486, "posY": 1.481,
"posZ": -65, "posZ": -65,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,

View File

@ -6,7 +6,7 @@
}, },
"Autoraise": true, "Autoraise": true,
"ColorDiffuse": { "ColorDiffuse": {
"a": 0.25, "a": 0.75,
"b": 0.168, "b": 0.168,
"g": 0.701, "g": 0.701,
"r": 0.192 "r": 0.192

View File

@ -6,7 +6,7 @@
}, },
"Autoraise": true, "Autoraise": true,
"ColorDiffuse": { "ColorDiffuse": {
"a": 0.25, "a": 0.75,
"b": 0.25, "b": 0.25,
"g": 0.25, "g": 0.25,
"r": 0.25 "r": 0.25

View File

@ -15,16 +15,16 @@
"CastShadows": true, "CastShadows": true,
"ColliderURL": "", "ColliderURL": "",
"Convex": true, "Convex": true,
"DiffuseURL": "https://i.ibb.co/1GLSncs/title.jpg", "DiffuseURL": "http://cloud-3.steamusercontent.com/ugc/2466364192777858421/669B09277F042A9A1328F1D62D79D9221D4B4D53/",
"MaterialIndex": 3, "MaterialIndex": 3,
"MeshURL": "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/core_h_MSH.obj", "MeshURL": "https://raw.githubusercontent.com/RobMayer/TTSLibrary/master/advboxes/core_h_MSH.obj",
"NormalURL": "", "NormalURL": "",
"TypeIndex": 0 "TypeIndex": 0
}, },
"Description": "by Frying Tonight", "Description": "by RudeRugg",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "fancreations/campaign_the_matter_of_britain.json", "GMNotes": "fancreations/campaign_lovecrafter_3077.json",
"GUID": "194cc5", "GUID": "b08d20",
"Grid": true, "Grid": true,
"GridProjection": false, "GridProjection": false,
"Hands": false, "Hands": false,
@ -36,11 +36,10 @@
"LuaScriptState": "", "LuaScriptState": "",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Model", "Name": "Custom_Model",
"Nickname": " The Matter of Britain", "Nickname": " Lovecrafter 3077",
"Snap": true, "Snap": true,
"Sticky": true, "Sticky": true,
"Tags": [ "Tags": [
"CampaignBox",
"LargeBox" "LargeBox"
], ],
"Tooltip": true, "Tooltip": true,

View File

@ -55,7 +55,7 @@
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": 35.4, "posX": 35.4,
"posY": 1.486, "posY": 1.481,
"posZ": -52, "posZ": -52,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,

View File

@ -55,7 +55,7 @@
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": 35.4, "posX": 35.4,
"posY": 1.486, "posY": 1.481,
"posZ": -78, "posZ": -78,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,

View File

@ -55,7 +55,7 @@
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": 20.6, "posX": 20.6,
"posY": 1.486, "posY": 1.481,
"posZ": -91, "posZ": -91,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,

View File

@ -55,7 +55,7 @@
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": 50.2, "posX": 50.2,
"posY": 1.486, "posY": 1.481,
"posZ": -78, "posZ": -78,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,

View File

@ -55,7 +55,7 @@
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": 20.6, "posX": 20.6,
"posY": 1.486, "posY": 1.481,
"posZ": -52, "posZ": -52,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,

View File

@ -55,7 +55,7 @@
"Tooltip": true, "Tooltip": true,
"Transform": { "Transform": {
"posX": 20.6, "posX": 20.6,
"posY": 1.486, "posY": 1.481,
"posZ": -78, "posZ": -78,
"rotX": 0, "rotX": 0,
"rotY": 270, "rotY": 270,

View File

@ -40,7 +40,7 @@ local bagSearchers = {}
local hideTitleSplashWaitFunctionId = nil local hideTitleSplashWaitFunctionId = nil
-- online functionality related variables -- online functionality related variables
local MOD_VERSION = "3.8.0" local MOD_VERSION = "3.9.0"
local SOURCE_REPO = 'https://raw.githubusercontent.com/chr1z93/loadable-objects/main' local SOURCE_REPO = 'https://raw.githubusercontent.com/chr1z93/loadable-objects/main'
local library, requestObj, modMeta local library, requestObj, modMeta
local acknowledgedUpgradeVersions = {} local acknowledgedUpgradeVersions = {}
@ -189,15 +189,26 @@ function tryObjectEnterContainer(container, object)
end end
-- TTS event for objects that enter zones -- TTS event for objects that enter zones
-- used to detect the "token discard zones" beneath the hand zones function onObjectEnterZone(zone, object)
function onObjectEnterZone(zone, enteringObj) -- detect the "token discard zones" beneath the hand zones
if zone.getName() ~= "TokenDiscardZone" then return end if zone.getName() == "TokenDiscardZone" and
if tokenChecker.isChaosToken(enteringObj) then return end not tokenChecker.isChaosToken(object) and
object.type == "Tile" and
if enteringObj.type == "Tile" and enteringObj.getMemo() and enteringObj.getLock() == false then object.getMemo() and
local matcolor = playermatApi.getMatColorByPosition(enteringObj.getPosition()) not object.getLock() then
local matcolor = playermatApi.getMatColorByPosition(object.getPosition())
local trash = guidReferenceApi.getObjectByOwnerAndType(matcolor, "Trash") local trash = guidReferenceApi.getObjectByOwnerAndType(matcolor, "Trash")
trash.putObject(enteringObj) trash.putObject(object)
elseif zone.type == "Hand" and object.hasTag("CardWithHelper") then
object.clearContextMenu()
object.call("shutOff")
end
end
-- TTS event for objects that leave zones
function onObjectLeaveZone(zone, object)
if zone.type == "Hand" and object.hasTag("CardWithHelper") then
object.call("updateDisplay")
end end
end end
@ -1335,8 +1346,7 @@ function contentDownloadCallback(request, params)
if pos then if pos then
spawnTable.position = pos spawnTable.position = pos
else else
broadcastToAll( broadcastToAll("Please make space in the area below the tentacle stand in the upper middle of the table and try again.", "Red")
"Please make space in the area below the tentacle stand in the upper middle of the table and try again.", "Red")
return return
end end
end end

View File

@ -4,13 +4,9 @@ local guidReferenceApi = require("core/GUIDReferenceApi")
local playermatApi = require("playermat/PlayermatApi") local playermatApi = require("playermat/PlayermatApi")
local isHelperEnabled = false local isHelperEnabled = false
local loopId
function updateSave() function updateSave()
self.script_state = JSON.encode({ self.script_state = JSON.encode({ isHelperEnabled = isHelperEnabled })
isHelperEnabled = isHelperEnabled,
loopId = loopId
})
end end
function onLoad(savedData) function onLoad(savedData)
@ -18,7 +14,6 @@ function onLoad(savedData)
if savedData and savedData ~= "" then if savedData and savedData ~= "" then
local loadedData = JSON.decode(savedData) local loadedData = JSON.decode(savedData)
isHelperEnabled = loadedData.isHelperEnabled isHelperEnabled = loadedData.isHelperEnabled
loopId = loadedData.loopId
end end
checkOptionPanel() checkOptionPanel()
updateDisplay() updateDisplay()
@ -27,15 +22,15 @@ end
-- hide buttons and stop monitoring -- hide buttons and stop monitoring
function shutOff() function shutOff()
self.UI.hide("Helper") self.UI.hide("Helper")
if loopId then Wait.stop(loopId) end Wait.stopAll()
loopId = nil
updateSave() updateSave()
end end
-- show buttons and begin monitoring chaos bag for curse and bless tokens -- show buttons and begin monitoring chaos bag for curse and bless tokens
function initialize() function initialize()
self.UI.show("Helper") self.UI.show("Helper")
loopId = Wait.time(maybeUpdateButtonState, 1, -1) maybeUpdateButtonState()
Wait.time(maybeUpdateButtonState, 1, -1)
updateSave() updateSave()
end end
@ -72,10 +67,8 @@ function getBlessCurseInBag()
local chaosBag = chaosBagApi.findChaosBag() local chaosBag = chaosBagApi.findChaosBag()
for _, v in ipairs(chaosBag.getObjects()) do for _, v in ipairs(chaosBag.getObjects()) do
if v.name == "Bless" then if v.name == "Bless" or v.name == "Curse" then
numInBag.Bless = numInBag.Bless + 1 numInBag[v.name] = numInBag[v.name] + 1
elseif v.name == "Curse" then
numInBag.Curse = numInBag.Curse + 1
end end
end end
@ -83,22 +76,14 @@ function getBlessCurseInBag()
end end
function setUiState(params) function setUiState(params)
-- set bless state for _, tokenName in ipairs({ "Bless", "Curse" }) do
if params.Bless then if params[tokenName] then
self.UI.show("Bless") self.UI.show(tokenName)
self.UI.hide("inactiveBless") self.UI.hide("inactive" .. tokenName)
else else
self.UI.show("inactiveBless") self.UI.show("inactive" .. tokenName)
self.UI.hide("Bless") self.UI.hide(tokenName)
end end
-- set curse state
if params.Curse then
self.UI.show("Curse")
self.UI.hide("inactiveCurse")
else
self.UI.show("inactiveCurse")
self.UI.hide("Curse")
end end
end end

View File

@ -59,9 +59,6 @@ end
function shutOff() function shutOff()
self.clearButtons() self.clearButtons()
-- reset the z position
buttonParameters.position.z = initialButtonPosition
end end
-- marks a button as active -- marks a button as active
@ -80,6 +77,8 @@ end
-- Create buttons based on the button parameters -- Create buttons based on the button parameters
function createButtons() function createButtons()
self.clearButtons()
-- reset the list in case of addition of checkboxes or Refine -- reset the list in case of addition of checkboxes or Refine
hypothesisList = { 'Succeed by 3 or more', 'Fail by 2 or more' } hypothesisList = { 'Succeed by 3 or more', 'Fail by 2 or more' }
@ -96,6 +95,10 @@ function createButtons()
end end
end end
-- reset the z position
buttonParameters.position.z = initialButtonPosition
-- actual button creation
for i, label in ipairs(hypothesisList) do for i, label in ipairs(hypothesisList) do
buttonParameters.label = label buttonParameters.label = label
buttonParameters.click_function = "selectButton" .. i buttonParameters.click_function = "selectButton" .. i

View File

@ -10,13 +10,10 @@ local buttonParameters = {
height = 175 height = 175
} }
local modValue, loopId local modValue
function updateSave() function updateSave()
self.script_state = JSON.encode({ self.script_state = JSON.encode({ isHelperEnabled = isHelperEnabled })
isHelperEnabled = isHelperEnabled,
loopId = loopId
})
end end
function onLoad(savedData) function onLoad(savedData)
@ -31,24 +28,21 @@ function onLoad(savedData)
if savedData and savedData ~= "" then if savedData and savedData ~= "" then
local loadedData = JSON.decode(savedData) local loadedData = JSON.decode(savedData)
isHelperEnabled = loadedData.isHelperEnabled isHelperEnabled = loadedData.isHelperEnabled
loopId = loadedData.loopId
end end
checkOptionPanel() checkOptionPanel()
updateDisplay() updateDisplay()
end end
function initialize() function initialize()
self.clearButtons()
self.createButton(buttonParameters) self.createButton(buttonParameters)
updateButton() updateButton()
loopId = Wait.time(updateButton, 2, -1) Wait.time(updateButton, 2, -1)
end end
function shutOff() function shutOff()
if loopId then
Wait.stop(loopId)
loopId = nil
end
self.clearButtons() self.clearButtons()
Wait.stopAll()
end end
function updateButton() function updateButton()