From 7853b090f241208e80c202469c9cfed347234d10 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 24 Jul 2024 22:52:36 +0200 Subject: [PATCH 01/22] added data for class and mode restriction --- objects/AllPlayerCards.15bb07/DarkPact.dd3d09.gmnotes | 1 + objects/AllPlayerCards.15bb07/Doomed.ba2ae1.gmnotes | 1 + objects/AllPlayerCards.15bb07/EctoplasmicHorror.379582.gmnotes | 1 + objects/AllPlayerCards.15bb07/LurkerintheDark.79cc11.gmnotes | 1 + .../AllPlayerCards.15bb07/OfferYouCannotRefuse.e27c93.gmnotes | 1 + objects/AllPlayerCards.15bb07/PayYourDue.5b6c9f.gmnotes | 1 + objects/AllPlayerCards.15bb07/QuantumParadox.0e4c07.gmnotes | 1 + objects/AllPlayerCards.15bb07/Underprepared.709a54.gmnotes | 1 + .../UnspeakableOathBloodthirst.a5be8b.gmnotes | 1 + .../UnspeakableOathCowardice.ea0fa1.gmnotes | 1 + .../UnspeakableOathCuriosity.f6aba5.gmnotes | 1 + 11 files changed, 11 insertions(+) diff --git a/objects/AllPlayerCards.15bb07/DarkPact.dd3d09.gmnotes b/objects/AllPlayerCards.15bb07/DarkPact.dd3d09.gmnotes index 7d08212b..1f19aa9d 100644 --- a/objects/AllPlayerCards.15bb07/DarkPact.dd3d09.gmnotes +++ b/objects/AllPlayerCards.15bb07/DarkPact.dd3d09.gmnotes @@ -6,5 +6,6 @@ "traits": "Pact.", "weakness": true, "basicWeaknessCount": 1, + "modeRestriction": "Campaign", "cycle": "The Forgotten Age" } diff --git a/objects/AllPlayerCards.15bb07/Doomed.ba2ae1.gmnotes b/objects/AllPlayerCards.15bb07/Doomed.ba2ae1.gmnotes index a4221436..5c63a8db 100644 --- a/objects/AllPlayerCards.15bb07/Doomed.ba2ae1.gmnotes +++ b/objects/AllPlayerCards.15bb07/Doomed.ba2ae1.gmnotes @@ -5,5 +5,6 @@ "traits": "Curse.", "weakness": true, "basicWeaknessCount": 1, + "modeRestriction": "Campaign", "cycle": "The Forgotten Age" } diff --git a/objects/AllPlayerCards.15bb07/EctoplasmicHorror.379582.gmnotes b/objects/AllPlayerCards.15bb07/EctoplasmicHorror.379582.gmnotes index fa174d5a..e667f703 100644 --- a/objects/AllPlayerCards.15bb07/EctoplasmicHorror.379582.gmnotes +++ b/objects/AllPlayerCards.15bb07/EctoplasmicHorror.379582.gmnotes @@ -5,5 +5,6 @@ "traits": "Monster. Geist.", "weakness": true, "basicWeaknessCount": 1, + "classRestriction": "Mystic", "cycle": "The Scarlet Keys" } diff --git a/objects/AllPlayerCards.15bb07/LurkerintheDark.79cc11.gmnotes b/objects/AllPlayerCards.15bb07/LurkerintheDark.79cc11.gmnotes index dfb64053..70a22544 100644 --- a/objects/AllPlayerCards.15bb07/LurkerintheDark.79cc11.gmnotes +++ b/objects/AllPlayerCards.15bb07/LurkerintheDark.79cc11.gmnotes @@ -5,5 +5,6 @@ "traits": "Monster. Shoggoth.", "weakness": true, "basicWeaknessCount": 1, + "classRestriction": "Guardian", "cycle": "The Scarlet Keys" } diff --git a/objects/AllPlayerCards.15bb07/OfferYouCannotRefuse.e27c93.gmnotes b/objects/AllPlayerCards.15bb07/OfferYouCannotRefuse.e27c93.gmnotes index a39c3eba..c2e6663c 100644 --- a/objects/AllPlayerCards.15bb07/OfferYouCannotRefuse.e27c93.gmnotes +++ b/objects/AllPlayerCards.15bb07/OfferYouCannotRefuse.e27c93.gmnotes @@ -5,5 +5,6 @@ "traits": "Pact.", "weakness": true, "basicWeaknessCount": 1, + "modeRestriction": "Campaign", "cycle": "Return to the Forgotten Age" } diff --git a/objects/AllPlayerCards.15bb07/PayYourDue.5b6c9f.gmnotes b/objects/AllPlayerCards.15bb07/PayYourDue.5b6c9f.gmnotes index f4d24a5f..ed4b4e28 100644 --- a/objects/AllPlayerCards.15bb07/PayYourDue.5b6c9f.gmnotes +++ b/objects/AllPlayerCards.15bb07/PayYourDue.5b6c9f.gmnotes @@ -6,5 +6,6 @@ "traits": "Pact.", "weakness": true, "basicWeaknessCount": 1, + "classRestriction": "Rogue", "cycle": "The Scarlet Keys" } diff --git a/objects/AllPlayerCards.15bb07/QuantumParadox.0e4c07.gmnotes b/objects/AllPlayerCards.15bb07/QuantumParadox.0e4c07.gmnotes index 64c172dc..e920fc72 100644 --- a/objects/AllPlayerCards.15bb07/QuantumParadox.0e4c07.gmnotes +++ b/objects/AllPlayerCards.15bb07/QuantumParadox.0e4c07.gmnotes @@ -6,5 +6,6 @@ "traits": "Paradox.", "weakness": true, "basicWeaknessCount": 1, + "classRestriction": "Seeker", "cycle": "The Scarlet Keys" } diff --git a/objects/AllPlayerCards.15bb07/Underprepared.709a54.gmnotes b/objects/AllPlayerCards.15bb07/Underprepared.709a54.gmnotes index 1b71a2c2..a7630283 100644 --- a/objects/AllPlayerCards.15bb07/Underprepared.709a54.gmnotes +++ b/objects/AllPlayerCards.15bb07/Underprepared.709a54.gmnotes @@ -6,5 +6,6 @@ "traits": "Blunder.", "weakness": true, "basicWeaknessCount": 1, + "classRestriction": "Survivor", "cycle": "The Scarlet Keys" } diff --git a/objects/AllPlayerCards.15bb07/UnspeakableOathBloodthirst.a5be8b.gmnotes b/objects/AllPlayerCards.15bb07/UnspeakableOathBloodthirst.a5be8b.gmnotes index 2c31b542..d72dd55a 100644 --- a/objects/AllPlayerCards.15bb07/UnspeakableOathBloodthirst.a5be8b.gmnotes +++ b/objects/AllPlayerCards.15bb07/UnspeakableOathBloodthirst.a5be8b.gmnotes @@ -5,6 +5,7 @@ "traits": "Madness. Pact.", "weakness": true, "basicWeaknessCount": 1, + "modeRestriction": "Campaign", "hidden": true, "cycle": "Return to the Path to Carcosa" } diff --git a/objects/AllPlayerCards.15bb07/UnspeakableOathCowardice.ea0fa1.gmnotes b/objects/AllPlayerCards.15bb07/UnspeakableOathCowardice.ea0fa1.gmnotes index eaca90a9..e70ab205 100644 --- a/objects/AllPlayerCards.15bb07/UnspeakableOathCowardice.ea0fa1.gmnotes +++ b/objects/AllPlayerCards.15bb07/UnspeakableOathCowardice.ea0fa1.gmnotes @@ -5,6 +5,7 @@ "traits": "Madness. Pact.", "weakness": true, "basicWeaknessCount": 1, + "modeRestriction": "Campaign", "hidden": true, "cycle": "Return to the Path to Carcosa" } diff --git a/objects/AllPlayerCards.15bb07/UnspeakableOathCuriosity.f6aba5.gmnotes b/objects/AllPlayerCards.15bb07/UnspeakableOathCuriosity.f6aba5.gmnotes index dae10b77..1c9fab51 100644 --- a/objects/AllPlayerCards.15bb07/UnspeakableOathCuriosity.f6aba5.gmnotes +++ b/objects/AllPlayerCards.15bb07/UnspeakableOathCuriosity.f6aba5.gmnotes @@ -5,6 +5,7 @@ "traits": "Madness. Pact.", "weakness": true, "basicWeaknessCount": 1, + "modeRestriction": "Campaign", "hidden": true, "cycle": "Return to the Path to Carcosa" } From 34de9c1d019f02ef1deca91a06a95aebc3c6d88c Mon Sep 17 00:00:00 2001 From: dscarpac Date: Tue, 30 Jul 2024 22:19:44 -0500 Subject: [PATCH 02/22] testing issues --- src/playercards/CardsThatSealTokens.ttslua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/playercards/CardsThatSealTokens.ttslua b/src/playercards/CardsThatSealTokens.ttslua index 0fb3a9fa..ec327c6a 100644 --- a/src/playercards/CardsThatSealTokens.ttslua +++ b/src/playercards/CardsThatSealTokens.ttslua @@ -184,6 +184,7 @@ function readBag() end function resetSealedTokens() + log("Resetting") sealedTokens = {} end @@ -244,6 +245,8 @@ function releaseOneToken(playerColor) else printToColor("Releasing token", playerColor) putTokenAway(table.remove(sealedTokens)) + log("Removed one") + log(#sealedTokens) end end @@ -275,6 +278,8 @@ function releaseAllTokens(playerColor) for _, guid in ipairs(sealedTokens) do putTokenAway(guid) end + log("Removed all") + log(#sealedTokens) sealedTokens = {} end end From d62456258a8352bffc6b8b259e29d55dabe3acb8 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 31 Jul 2024 06:38:20 -0500 Subject: [PATCH 03/22] added save state --- src/playercards/CardsThatSealTokens.ttslua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/playercards/CardsThatSealTokens.ttslua b/src/playercards/CardsThatSealTokens.ttslua index ec327c6a..2c87487a 100644 --- a/src/playercards/CardsThatSealTokens.ttslua +++ b/src/playercards/CardsThatSealTokens.ttslua @@ -183,9 +183,12 @@ function readBag() end end +-- save state when going into bags / decks +function onDestroy() self.script_state = onSave() end + function resetSealedTokens() - log("Resetting") sealedTokens = {} + self.script_state = onSave() end -- native event from TTS - used to update the context menu for cards like "Unrelenting" @@ -245,8 +248,6 @@ function releaseOneToken(playerColor) else printToColor("Releasing token", playerColor) putTokenAway(table.remove(sealedTokens)) - log("Removed one") - log(#sealedTokens) end end @@ -278,9 +279,8 @@ function releaseAllTokens(playerColor) for _, guid in ipairs(sealedTokens) do putTokenAway(guid) end - log("Removed all") - log(#sealedTokens) sealedTokens = {} + self.script_state = onSave() end end From 13935dc74411175e2722c4e91a42237db6725c87 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 31 Jul 2024 06:54:32 -0500 Subject: [PATCH 04/22] updated version --- config.json | 2 +- objects/PatchNotes.f47225.luascriptstate | 2 +- src/core/Global.ttslua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 09d117fe..b2f24649 100644 --- a/config.json +++ b/config.json @@ -229,7 +229,7 @@ 0, 0 ], - "SaveName": "Arkham SCE - 3.9.0", + "SaveName": "Arkham SCE - 3.9.1", "Sky": "Sky_Museum", "SkyURL": "https://i.imgur.com/GkQqaOF.jpg", "SnapPoints_path": "SnapPoints.json", diff --git a/objects/PatchNotes.f47225.luascriptstate b/objects/PatchNotes.f47225.luascriptstate index 89dfc59c..131294fc 100644 --- a/objects/PatchNotes.f47225.luascriptstate +++ b/objects/PatchNotes.f47225.luascriptstate @@ -1 +1 @@ -{"checks":[],"decals":[{"locked":false,"name":"Arkham SCE logo","pos":{"x":3.1,"y":2.2},"rotation":0,"scale":{"x":"2","y":"2"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2501268517218943111/803E57A7B3E9765DF342050EE6C71D69473A7388/"},{"locked":false,"name":"Bootlegger Finn","pos":{"x":3.5,"y":-1.89},"rotation":"25","scale":{"x":"1","y":"1"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2037357792052848566/5DA900C430E97D3DFF2C9B8A3DB1CB2271791FC7/"},{"locked":false,"name":"black bar","pos":{"x":0,"y":-2.7},"rotation":0,"scale":{"x":"8","y":"0.03"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2501268517219098388/0936FEE03B410319658B5E05DB5D486CEDDE98F5/"}],"fields":[{"align":3,"array":{"x":"1","y":"1"},"counter":"False","distance":{"x":"1","y":"1"},"fieldColor":{"a":0,"b":1,"g":1,"r":1},"font":"200","locked":false,"name":"Patch Notes","pos":{"x":"0","y":-2.9},"role":"Normal Field","size":{"x":"3750","y":"250"},"textColor":{"a":1,"b":0,"g":0,"r":0},"tooltip":"None","value":["Arkham Horror LCG SCE 3.9.0 - 07/08/2024"]},{"align":2,"array":{"x":"1","y":1},"distance":{"x":"1","y":"1"},"fieldColor":{"a":0,"b":1,"g":1,"r":1},"font":"89","locked":false,"name":"Details","pos":{"x":"0","y":0.4},"role":"Nothing","size":{"x":"3750","y":"2750"},"textColor":{"a":1,"b":0,"g":0,"r":0},"tooltip":"None","value":["Thanks for downloading! We're happy to present you a rather big update this time :-)\n\nNew things\n- updated note card for patch notes (bless Marum for his awesome tool!)\n- automated discarding for Patrice\n- confirmation dialog for discard hotkey (e.g. for locations)\n- helpers for cards that redraw tokens and Kohaku\n- displaying of token count for cards that seal tokens\r\n- new action / ability tokens (replacing the old ones)\r\n- option to enable all card helpers (e.g. Heavy Furs)\r\n- option to load class-colored playermat backgrounds\n- coloring for player names in broadcasts\n- right-click option for RBW button on Player Card Panel to specify trait(s)\n\nUpdates\r\n- performed a small clean up of the bottom corners of the table\n- \"Numpad 9\" to rearranges present tokens (on top of adding a resource)\n- Scroll of Secrets context menu helper now displays player names instead of colors\r\n- Player Card Panel can display fan-made cards with a new \"custom\" cycle button)\n- updated Family Inheritance helper to a proper UI\n- \"Discard object\" gamekey works for selected objects\r\n- updated a bunch of tools like Clean Up Helper, Drawing Tool,\nHand Helper, Token Arranger and Search Assistant\n\nFixes\r\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 and file size improvements (e.g. by adding download\nfunctions for CYOA campaign guides and Arkham Fantasy standees)"]}],"flip":"False","height":"0.1","locks":{"checks":false,"decals":false,"fields":false},"nudgeDistance":0.1,"scale":{"x":"0.3","y":"0.3"},"sheetLocked":true} +{"checks":[],"decals":[{"locked":false,"name":"Arkham SCE logo","pos":{"x":3.1,"y":2.2},"rotation":0,"scale":{"x":"2","y":"2"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2501268517218943111/803E57A7B3E9765DF342050EE6C71D69473A7388/"},{"locked":false,"name":"Bootlegger Finn","pos":{"x":3.5,"y":-1.89},"rotation":"25","scale":{"x":"1","y":"1"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2037357792052848566/5DA900C430E97D3DFF2C9B8A3DB1CB2271791FC7/"},{"locked":false,"name":"black bar","pos":{"x":0,"y":-2.7},"rotation":0,"scale":{"x":"8","y":"0.03"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2501268517219098388/0936FEE03B410319658B5E05DB5D486CEDDE98F5/"}],"fields":[{"align":3,"array":{"x":"1","y":"1"},"counter":"False","distance":{"x":"1","y":"1"},"fieldColor":{"a":0,"b":1,"g":1,"r":1},"font":"200","locked":false,"name":"Patch Notes","pos":{"x":"0","y":-2.9},"role":"Normal Field","size":{"x":"3750","y":"250"},"textColor":{"a":1,"b":0,"g":0,"r":0},"tooltip":"None","value":["Arkham Horror LCG SCE 3.9.1 - 08/01/2024"]},{"align":2,"array":{"x":"1","y":1},"distance":{"x":"1","y":"1"},"fieldColor":{"a":0,"b":1,"g":1,"r":1},"font":"89","locked":false,"name":"Details","pos":{"x":"0","y":0.4},"role":"Nothing","size":{"x":"3750","y":"2750"},"textColor":{"a":1,"b":0,"g":0,"r":0},"tooltip":"None","value":["Thanks for downloading! We're happy to present you a rather big update this time :-)\n\nNew things\n- updated note card for patch notes (bless Marum for his awesome tool!)\n- automated discarding for Patrice\n- confirmation dialog for discard hotkey (e.g. for locations)\n- helpers for cards that redraw tokens and Kohaku\n- displaying of token count for cards that seal tokens\r\n- new action / ability tokens (replacing the old ones)\r\n- option to enable all card helpers (e.g. Heavy Furs)\r\n- option to load class-colored playermat backgrounds\n- coloring for player names in broadcasts\n- right-click option for RBW button on Player Card Panel to specify trait(s)\n\nUpdates\r\n- performed a small clean up of the bottom corners of the table\n- \"Numpad 9\" to rearranges present tokens (on top of adding a resource)\n- Scroll of Secrets context menu helper now displays player names instead of colors\r\n- Player Card Panel can display fan-made cards with a new \"custom\" cycle button)\n- updated Family Inheritance helper to a proper UI\n- \"Discard object\" gamekey works for selected objects\r\n- updated a bunch of tools like Clean Up Helper, Drawing Tool,\nHand Helper, Token Arranger and Search Assistant\n\nFixes\r\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 and file size improvements (e.g. by adding download\nfunctions for CYOA campaign guides and Arkham Fantasy standees)"]}],"flip":"False","height":"0.1","locks":{"checks":false,"decals":false,"fields":false},"nudgeDistance":0.1,"scale":{"x":"0.3","y":"0.3"},"sheetLocked":true} diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index d4b93b76..f856dbad 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -40,7 +40,7 @@ local bagSearchers = {} local hideTitleSplashWaitFunctionId = nil -- online functionality related variables -local MOD_VERSION = "3.9.0" +local MOD_VERSION = "3.9.1" local SOURCE_REPO = 'https://raw.githubusercontent.com/chr1z93/loadable-objects/main' local library, requestObj, modMeta local acknowledgedUpgradeVersions = {} From ec315a2b3a0d97313c35ab8b8a97ae65c05ab510 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 31 Jul 2024 07:14:33 -0500 Subject: [PATCH 05/22] merged changes into updateSave function --- src/playercards/CardsThatSealTokens.ttslua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/playercards/CardsThatSealTokens.ttslua b/src/playercards/CardsThatSealTokens.ttslua index 2c87487a..74cc7746 100644 --- a/src/playercards/CardsThatSealTokens.ttslua +++ b/src/playercards/CardsThatSealTokens.ttslua @@ -104,7 +104,9 @@ local tokenColor = { [""] = "#77674DE6" } -function onSave() return JSON.encode(sealedTokens) end +function updateSave() + self.script_state = JSON.encode(sealedTokens) +end function onLoad(savedData) sealedTokens = JSON.decode(savedData) or {} @@ -184,11 +186,11 @@ function readBag() end -- save state when going into bags / decks -function onDestroy() self.script_state = onSave() end +function onDestroy() updateSave() end function resetSealedTokens() sealedTokens = {} - self.script_state = onSave() + updateSave() end -- native event from TTS - used to update the context menu for cards like "Unrelenting" @@ -280,7 +282,7 @@ function releaseAllTokens(playerColor) putTokenAway(guid) end sealedTokens = {} - self.script_state = onSave() + updateSave() end end @@ -340,6 +342,7 @@ function resolveSealed() end function updateStackSize() + updateSave() if MAX_SEALED == 1 then return end if #sealedTokens == 0 then return end -- get topmost sealed token From 6c8b362483ee65e5c23a4f606c72586cbeab5c99 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 31 Jul 2024 07:33:40 -0500 Subject: [PATCH 06/22] more updates --- src/playercards/CardsThatSealTokens.ttslua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/playercards/CardsThatSealTokens.ttslua b/src/playercards/CardsThatSealTokens.ttslua index 74cc7746..1dd95c98 100644 --- a/src/playercards/CardsThatSealTokens.ttslua +++ b/src/playercards/CardsThatSealTokens.ttslua @@ -185,9 +185,6 @@ function readBag() end end --- save state when going into bags / decks -function onDestroy() updateSave() end - function resetSealedTokens() sealedTokens = {} updateSave() @@ -234,6 +231,7 @@ function sealToken(name, playerColor) end end updateStackSize() + updateSave() end }) return @@ -250,6 +248,7 @@ function releaseOneToken(playerColor) else printToColor("Releasing token", playerColor) putTokenAway(table.remove(sealedTokens)) + updateSave() end end @@ -268,6 +267,7 @@ function releaseMultipleTokens(playerColor) for i = 1, numRemoved do putTokenAway(table.remove(sealedTokens)) end + updateSave() printToColor("Releasing " .. numRemoved .. " tokens", playerColor) end @@ -292,6 +292,7 @@ function returnMultipleTokens(playerColor) for i = 1, SHOW_MULTI_RETURN do returnToken(table.remove(sealedTokens)) end + updateSave() printToColor("Returning " .. SHOW_MULTI_RETURN .. " tokens", playerColor) else printToColor("Not enough tokens sealed.", playerColor) @@ -338,11 +339,11 @@ function resolveSealed() local resolvedToken = getObjectFromGUID(guidToBeResolved) resolvedToken.UI.setXml("") updateStackSize() + updateSave() chaosBagApi.drawChaosToken(mat, true, _, guidToBeResolved) end function updateStackSize() - updateSave() if MAX_SEALED == 1 then return end if #sealedTokens == 0 then return end -- get topmost sealed token From c35d0cd7c0de567594d334484def27ca8037a5cb Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 31 Jul 2024 14:48:06 -0500 Subject: [PATCH 07/22] added helper --- src/playercards/cards/NkosiMabati3.ttslua | 60 +++++++++++++++++------ 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/src/playercards/cards/NkosiMabati3.ttslua b/src/playercards/cards/NkosiMabati3.ttslua index 83d2e6b9..91208972 100644 --- a/src/playercards/cards/NkosiMabati3.ttslua +++ b/src/playercards/cards/NkosiMabati3.ttslua @@ -1,4 +1,9 @@ require("playercards/CardsWithHelper") + +-- intentionally global +hasXML = false +isHelperEnabled = false + local chaosBagApi = require("chaosbag/ChaosBagApi") -- XML background color for each token @@ -14,17 +19,22 @@ local tokenColor = { [""] = "#77674DE6" } -function onSave() - return JSON.encode(sigil) +function updateSave() + self.script_state = JSON.encode({ + isHelperEnabled = isHelperEnabled, + sigil = sigil + }) end function onLoad(savedData) - self.addContextMenuItem("Enable Helper", chooseSigil) - sigil = JSON.decode(savedData) - if sigil and sigil ~= nil then + syncDisplayWithOptionPanel() + if savedData and savedData ~= "" then + local loadedData = JSON.decode(savedData) + isHelperEnabled = loadedData.isHelperEnabled + sigil = loadedData.sigil makeXMLButton() self.clearContextMenu() - self.addContextMenuItem("Clear Helper", deleteButtons) + self.addContextMenuItem("Clear Helper", toggleHelper) end end @@ -59,11 +69,35 @@ function makeXMLButton() ) end +-- Create XML button to prompt choosing a sigil; acts as this card's helper +function initialize() + self.UI.setXmlTable({ + { + tag = "Button", + attributes = { + height = 450, + width = 1400, + rotation = "0 0 180", + scale = "0.1 0.1 1", + position = "0 -55 -22", + padding = "50 50 50 50", + font = "font_teutonic-arkham", + fontSize = 300, + onClick = "chooseSigil", + color = "#77674DE6", + textColor = "White" + }, + value = "Choose Sigil" + } + } + ) +end + -- Create dialog window to choose sigil and create sigil-drawing button -function chooseSigil(playerColor) - Player[playerColor].clearSelectedObjects() +function chooseSigil(player) + player.clearSelectedObjects() self.clearContextMenu() - self.addContextMenuItem("Clear Helper", deleteButtons) + self.addContextMenuItem("Clear Helper", toggleHelper) -- get list of readable names local readableNames = {} @@ -72,7 +106,7 @@ function chooseSigil(playerColor) end -- prompt player to choose sigil - Player[playerColor].showOptionsDialog("Choose Sigil", readableNames, 1, + player.showOptionsDialog("Choose Sigil", readableNames, 1, function(chosenToken) sigil = Global.call("getChaosTokenName", chosenToken) makeXMLButton() @@ -80,11 +114,7 @@ function chooseSigil(playerColor) ) end --- Delete button and remove sigil -function deleteButtons(playerColor) - Player[playerColor].clearSelectedObjects() - self.clearContextMenu() - self.addContextMenuItem("Enable Helper", chooseSigil) +function shutOff() self.UI.setXml("") sigil = nil end From f957ea25118c5e25baeef53515615210a0165a98 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 31 Jul 2024 15:36:43 -0500 Subject: [PATCH 08/22] more changes --- src/playercards/cards/NkosiMabati3.ttslua | 51 +++++++++++++---------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/src/playercards/cards/NkosiMabati3.ttslua b/src/playercards/cards/NkosiMabati3.ttslua index 91208972..e5cf8643 100644 --- a/src/playercards/cards/NkosiMabati3.ttslua +++ b/src/playercards/cards/NkosiMabati3.ttslua @@ -27,15 +27,17 @@ function updateSave() end function onLoad(savedData) - syncDisplayWithOptionPanel() if savedData and savedData ~= "" then local loadedData = JSON.decode(savedData) isHelperEnabled = loadedData.isHelperEnabled sigil = loadedData.sigil - makeXMLButton() + if sigil and sigil ~= nil then + makeXMLButton() + end self.clearContextMenu() self.addContextMenuItem("Clear Helper", toggleHelper) end + syncDisplayWithOptionPanel() end function makeXMLButton() @@ -67,30 +69,35 @@ function makeXMLButton() } } ) + updateSave() end -- Create XML button to prompt choosing a sigil; acts as this card's helper function initialize() - self.UI.setXmlTable({ - { - tag = "Button", - attributes = { - height = 450, - width = 1400, - rotation = "0 0 180", - scale = "0.1 0.1 1", - position = "0 -55 -22", - padding = "50 50 50 50", - font = "font_teutonic-arkham", - fontSize = 300, - onClick = "chooseSigil", - color = "#77674DE6", - textColor = "White" - }, - value = "Choose Sigil" + if sigil and sigil ~= nil then + makeXMLButton() + else + self.UI.setXmlTable({ + { + tag = "Button", + attributes = { + height = 450, + width = 1400, + rotation = "0 0 180", + scale = "0.1 0.1 1", + position = "0 -55 -22", + padding = "50 50 50 50", + font = "font_teutonic-arkham", + fontSize = 300, + onClick = "chooseSigil", + color = "#77674DE6", + textColor = "White" + }, + value = "Choose Sigil" + } } - } - ) + ) + end end -- Create dialog window to choose sigil and create sigil-drawing button @@ -112,11 +119,13 @@ function chooseSigil(player) makeXMLButton() end ) + updateSave() end function shutOff() self.UI.setXml("") sigil = nil + updateSave() end function resolveSigil() From ec64ca6f768202bdb909f214708304a5a27a181f Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 31 Jul 2024 23:58:06 +0200 Subject: [PATCH 09/22] Updated topcard handling --- src/accessories/SearchAssistant.ttslua | 14 ++++++++------ src/core/Global.ttslua | 2 +- src/playermat/Playermat.ttslua | 6 ++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/accessories/SearchAssistant.ttslua b/src/accessories/SearchAssistant.ttslua index 316dffbe..d3dd4e08 100644 --- a/src/accessories/SearchAssistant.ttslua +++ b/src/accessories/SearchAssistant.ttslua @@ -113,7 +113,7 @@ function startSearch(messageColor, number) -- get draw deck local deckAreaObjects = playermatApi.getDeckAreaObjects(matColor) - if deckAreaObjects.draw == nil then + if deckAreaObjects.draw == nil and deckAreaObjects.topCard == nil then printToColor(matColor .. " draw deck could not be found!", messageColor, "Red") return end @@ -158,16 +158,18 @@ function startSearch(messageColor, number) -- handling for Norman Withers if deckAreaObjects.topCard then - deckAreaObjects.topCard.setRotation(setAsideRotation) + deckAreaObjects.topCard.deal(1, handColor) + number = number - 1 topCardDetected = true end searchView() - Wait.time(function() - deckAreaObjects = playermatApi.getDeckAreaObjects(matColor) - deckAreaObjects.draw.deal(number, handColor) - end, 1) + if number > 0 then + Wait.time(function() + deckAreaObjects.draw.deal(number, handColor) + end, 0.1) + end end -- place handCards back into deck and optionally shuffle diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index f856dbad..7ec35688 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -258,7 +258,7 @@ function onObjectNumberTyped(hoveredObject, playerColor, number) end -- check whether the hovered object is part of a players draw objects - for _, color in ipairs(playermatApi.getUsedMatColors()) do + for color, _ in ipairs(guidReferenceApi.getObjectsByType("Playermat")) do local deckAreaObjects = playermatApi.getDeckAreaObjects(color) if deckAreaObjects.topCard == hoveredObject or deckAreaObjects.draw == hoveredObject then playermatApi.drawCardsWithReshuffle(color, number) diff --git a/src/playermat/Playermat.ttslua b/src/playermat/Playermat.ttslua index 9fc8ac46..e3ad7862 100644 --- a/src/playermat/Playermat.ttslua +++ b/src/playermat/Playermat.ttslua @@ -473,8 +473,7 @@ function drawCardsWithReshuffle(numCards) if deckSize >= numCards then drawCards(numCards) - -- flip top card again for Norman - if topCardDetected and string.match(activeInvestigatorId, "%d%d%d%d%d") == "08004" then + if topCardDetected then flipTopCardFromDeck() end else @@ -483,8 +482,7 @@ function drawCardsWithReshuffle(numCards) shuffleDiscardIntoDeck() Wait.time(function() drawCards(numCards - deckSize) - -- flip top card again for Norman - if topCardDetected and string.match(activeInvestigatorId, "%d%d%d%d%d") == "08004" then + if topCardDetected then flipTopCardFromDeck() end end, 1) From e67c4e0cb38e816d7d1b3ff5596ee77c1f0e2580 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Wed, 31 Jul 2024 23:59:52 +0200 Subject: [PATCH 10/22] updated function --- src/core/Global.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index 7ec35688..d273d4f0 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -258,7 +258,7 @@ function onObjectNumberTyped(hoveredObject, playerColor, number) end -- check whether the hovered object is part of a players draw objects - for color, _ in ipairs(guidReferenceApi.getObjectsByType("Playermat")) do + for color, _ in pairs(guidReferenceApi.getObjectsByType("Playermat")) do local deckAreaObjects = playermatApi.getDeckAreaObjects(color) if deckAreaObjects.topCard == hoveredObject or deckAreaObjects.draw == hoveredObject then playermatApi.drawCardsWithReshuffle(color, number) From 4594629d5e369f6267c5c85ef05b948cd913726a Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 16:43:05 +0200 Subject: [PATCH 11/22] removed delay --- src/accessories/SearchAssistant.ttslua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/accessories/SearchAssistant.ttslua b/src/accessories/SearchAssistant.ttslua index d3dd4e08..4830ba4b 100644 --- a/src/accessories/SearchAssistant.ttslua +++ b/src/accessories/SearchAssistant.ttslua @@ -166,9 +166,7 @@ function startSearch(messageColor, number) searchView() if number > 0 then - Wait.time(function() - deckAreaObjects.draw.deal(number, handColor) - end, 0.1) + deckAreaObjects.draw.deal(number, handColor) end end From c88fb4764763230887ad93bb59e7a85ad32527ea Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 19:41:29 +0200 Subject: [PATCH 12/22] harbinger handling --- src/accessories/SearchAssistant.ttslua | 19 +++++++++++++++++++ src/playermat/Playermat.ttslua | 15 +++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/accessories/SearchAssistant.ttslua b/src/accessories/SearchAssistant.ttslua index 4830ba4b..67bbdbf5 100644 --- a/src/accessories/SearchAssistant.ttslua +++ b/src/accessories/SearchAssistant.ttslua @@ -118,6 +118,20 @@ function startSearch(messageColor, number) return end + -- check for harbinger + local harbinger + if deckAreaObjects.topCard then + harbinger = isHarbinger(deckAreaObjects.topCard.getGMNotes()) + elseif deckAreaObjects.draw and not deckAreaObjects.draw.is_face_down then + local cards = deckAreaObjects.draw.getObjects() + harbinger = isHarbinger(cards[#cards].gm_notes) + end + + if harbinger then + printToColor("The Harbinger is on top of your deck, searching isn't allowed", messageColor) + return + end + -- get bounds to know the height of the deck local bounds = deckAreaObjects.draw.getBounds() drawDeckPosition = bounds.center + Vector(0, bounds.size.y / 2 + 0.2, 0) @@ -170,6 +184,11 @@ function startSearch(messageColor, number) end end +function isHarbinger(notes) + local md = JSON.decode(notes or "") or {} + return md.id == "08006" +end + -- place handCards back into deck and optionally shuffle function endSearch(_, _, isRightClick) local handCards = Player[handColor].getHandObjects() diff --git a/src/playermat/Playermat.ttslua b/src/playermat/Playermat.ttslua index e3ad7862..e65568b1 100644 --- a/src/playermat/Playermat.ttslua +++ b/src/playermat/Playermat.ttslua @@ -438,14 +438,12 @@ function drawCardsWithReshuffle(numCards) local deckAreaObjects = getDeckAreaObjects() -- Norman Withers handling - local harbinger = false - if deckAreaObjects.topCard and deckAreaObjects.topCard.getName() == "The Harbinger" then - harbinger = true + local harbinger + if deckAreaObjects.topCard then + harbinger = isHarbinger(deckAreaObjects.topCard.getGMNotes()) elseif deckAreaObjects.draw and not deckAreaObjects.draw.is_face_down then local cards = deckAreaObjects.draw.getObjects() - if cards[#cards].name == "The Harbinger" then - harbinger = true - end + harbinger = isHarbinger(cards[#cards].gm_notes) end if harbinger then @@ -491,6 +489,11 @@ function drawCardsWithReshuffle(numCards) end end +function isHarbinger(notes) + local md = JSON.decode(notes or "") or {} + return md.id == "08006" +end + -- get the draw deck and discard pile objects and returns the references ---@return table: string-indexed table with references to the found objects function getDeckAreaObjects() From 8a8293d1a2dd625dde2f348c3449e017c6813698 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 20:59:22 +0200 Subject: [PATCH 13/22] deck importer update --- config.json | 2 +- ...ArkhamDBDeckImporter.a28140.luascriptstate | 1 - ...r.a28140.json => DeckImporter.a28140.json} | 8 +- objects/DeckImporter.a28140.luascriptstate | 9 ++ src/arkhamdb/ArkhamDb.ttslua | 57 ++++---- src/arkhamdb/DeckImporter.ttslua | 128 +++++++++--------- src/playercards/AllCardsBag.ttslua | 54 ++++++-- src/playercards/AllCardsBagApi.ttslua | 17 ++- src/playercards/PlayerCardPanel.ttslua | 14 +- 9 files changed, 174 insertions(+), 116 deletions(-) delete mode 100644 objects/ArkhamDBDeckImporter.a28140.luascriptstate rename objects/{ArkhamDBDeckImporter.a28140.json => DeckImporter.a28140.json} (81%) create mode 100644 objects/DeckImporter.a28140.luascriptstate diff --git a/config.json b/config.json index 09d117fe..9569f41b 100644 --- a/config.json +++ b/config.json @@ -138,7 +138,7 @@ "Playermat3Green.383d8b", "Playermat4Red.0840d5", "LeadInvestigator.acaa93", - "ArkhamDBDeckImporter.a28140", + "DeckImporter.a28140", "Configuration.03804b", "DrawingTool.280086", "PlayAreaImageSwapper.b7b45b", diff --git a/objects/ArkhamDBDeckImporter.a28140.luascriptstate b/objects/ArkhamDBDeckImporter.a28140.luascriptstate deleted file mode 100644 index 6c7562c2..00000000 --- a/objects/ArkhamDBDeckImporter.a28140.luascriptstate +++ /dev/null @@ -1 +0,0 @@ -{"greenDeck":"","investigators":true,"loadNewest":true,"orangeDeck":"","privateDeck":true,"redDeck":"","whiteDeck":""} diff --git a/objects/ArkhamDBDeckImporter.a28140.json b/objects/DeckImporter.a28140.json similarity index 81% rename from objects/ArkhamDBDeckImporter.a28140.json rename to objects/DeckImporter.a28140.json index ef572d40..db6aa0bb 100644 --- a/objects/ArkhamDBDeckImporter.a28140.json +++ b/objects/DeckImporter.a28140.json @@ -19,7 +19,7 @@ }, "ImageScalar": 1, "ImageSecondaryURL": "", - "ImageURL": "https://i.imgur.com/wDp1Woo.jpg", + "ImageURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617690977900/DCFE14F204C4038FA382741683862B95DC892F8E/", "WidthScale": 0 }, "Description": "", @@ -34,10 +34,10 @@ "LayoutGroupSortIndex": 0, "Locked": true, "LuaScript": "require(\"arkhamdb/DeckImporter\")", - "LuaScriptState_path": "ArkhamDBDeckImporter.a28140.luascriptstate", + "LuaScriptState_path": "DeckImporter.a28140.luascriptstate", "MeasureMovement": false, "Name": "Custom_Tile", - "Nickname": "ArkhamDB Deck Importer", + "Nickname": "Deck Importer", "Snap": false, "Sticky": true, "Tooltip": false, @@ -54,4 +54,4 @@ }, "Value": 0, "XmlUI": "" -} +} \ No newline at end of file diff --git a/objects/DeckImporter.a28140.luascriptstate b/objects/DeckImporter.a28140.luascriptstate new file mode 100644 index 00000000..77353414 --- /dev/null +++ b/objects/DeckImporter.a28140.luascriptstate @@ -0,0 +1,9 @@ +{ + "greenDeck": "", + "loadNewest": true, + "orangeDeck": "", + "privateDeck": true, + "redDeck": "", + "standalone": false, + "whiteDeck": "" +} \ No newline at end of file diff --git a/src/arkhamdb/ArkhamDb.ttslua b/src/arkhamdb/ArkhamDb.ttslua index 3e80625a..691e9d65 100644 --- a/src/arkhamdb/ArkhamDb.ttslua +++ b/src/arkhamdb/ArkhamDb.ttslua @@ -34,19 +34,19 @@ do end) end - -- Start the deck build process for the given player color and deck ID. This + -- Start the deck build process for the given player color and deck ID. This -- will retrieve the deck from ArkhamDB, and pass to a callback for processing. ---@param playerColor string Color name of the player mat to place this deck on (e.g. "Red"). ---@param deckId string ArkhamDB deck id to be loaded ---@param isPrivate boolean Whether this deck is published or private on ArkhamDB ---@param loadNewest boolean Whether the newest version of this deck should be loaded - ---@param loadInvestigators boolean Whether investigator cards should be loaded as part of this deck + ---@param standalone boolean Whether 'Campaign only' weaknesses should be exluded ---@param callback function Callback which will be sent the results of this load --- Parameters to the callback will be: --- slots table A map of card ID to count in the deck - --- investigatorCode String. ID of the investigator in this deck + --- investigatorCode String. ID of the investigator in this deck --- customizations table The decoded table of customization upgrades in this deck - --- playerColor String. Color this deck is being loaded for + --- playerColor String. Color this deck is being loaded for ---@return boolean ---@return string ArkhamDb.getDecklist = function( @@ -54,7 +54,7 @@ do deckId, isPrivate, loadNewest, - loadInvestigators, + standalone, callback) -- Get a simple card to see if the bag indexes are complete. If not, abort -- the deck load. The called method will handle player notification. @@ -90,11 +90,11 @@ do return true, json end) - deck:with(internal.onDeckResult, playerColor, loadNewest, loadInvestigators, callback) + deck:with(internal.onDeckResult, playerColor, loadNewest, standalone, callback) end -- Logs that a card could not be loaded in the mod by printing it to the console in the given - -- color of the player owning the deck. Attempts to look up the name on ArkhamDB for clarity, + -- color of the player owning the deck. Attempts to look up the name on ArkhamDB for clarity, -- but prints the card ID if the name cannot be retrieved. ---@param cardId string ArkhamDB ID of the card that could not be found ---@param playerColor string Color of the player's deck that had the problem @@ -118,23 +118,23 @@ do end) end - -- Callback when the deck information is received from ArkhamDB. Parses the + -- Callback when the deck information is received from ArkhamDB. Parses the -- response then applies standard transformations to the deck such as adding - -- random weaknesses and checking for taboos. Once the deck is processed, + -- random weaknesses and checking for taboos. Once the deck is processed, -- passes to loadCards to actually spawn the defined deck. ---@param deck table ArkhamImportDeck ---@param playerColor string Color name of the player mat to place this deck on (e.g. "Red") ---@param loadNewest boolean Whether the newest version of this deck should be loaded - ---@param loadInvestigators boolean Whether investigator cards should be loaded as part of this deck + ---@param standalone boolean Whether 'Campaign only' weaknesses should be exluded ---@param callback function Callback which will be sent the results of this load. --- Parameters to the callback will be: --- slots table A map of card ID to count in the deck - --- investigatorCode String. ID of the investigator in this deck - --- bondedList A table of cardID keys to meaningless values. Card IDs in this list were + --- investigatorCode String. ID of the investigator in this deck + --- bondedList A table of cardID keys to meaningless values. Card IDs in this list were --- added from a parent bonded card. --- customizations table The decoded table of customization upgrades in this deck - --- playerColor String. Color this deck is being loaded for - internal.onDeckResult = function(deck, playerColor, loadNewest, loadInvestigators, callback) + --- playerColor String. Color this deck is being loaded for + internal.onDeckResult = function(deck, playerColor, loadNewest, standalone, callback) -- Load the next deck in the upgrade path if the option is enabled if (loadNewest and deck.next_deck ~= nil and deck.next_deck ~= "") then buildDeck(playerColor, deck.next_deck) @@ -143,17 +143,20 @@ do internal.maybePrint(table.concat({ "Found decklist: ", deck.name }), playerColor) - -- Initialize deck slot table and perform common transformations. The order of these should not - -- be changed, as later steps may act on cards added in each. For example, a random weakness or + -- Initialize deck slot table and perform common transformations. The order of these should not + -- be changed, as later steps may act on cards added in each. For example, a random weakness or -- investigator may have bonded cards or taboo entries, and should be present local slots = deck.slots - internal.maybeDrawRandomWeakness(slots, playerColor) + + -- get class for investigator to handle specific weaknesses + local class + local card = allCardsBagApi.getCardById(deck.investigator_code) + if card and card.metadata then class = card.metadata.class end + local restrictions = { class = class, standalone = standalone } + internal.maybeDrawRandomWeakness(slots, playerColor, restrictions) -- handles alternative investigators (parallel, promo or revised art) - local loadAltInvestigator = "normal" - if loadInvestigators then - loadAltInvestigator = internal.addInvestigatorCards(deck, slots) - end + local loadAltInvestigator = internal.addInvestigatorCards(deck, slots) internal.maybeModifyDeckFromDescription(slots, deck.description_md, playerColor) internal.maybeAddSummonedServitor(slots) @@ -179,13 +182,17 @@ do --- of those cards which will be spawned ---@param playerColor string Color of the player this deck is being loaded for. Used for broadcast --- if a weakness is added. - internal.maybeDrawRandomWeakness = function(slots, playerColor) + ---@param restrictions table Additional restrictions: + --- class string Class to restrict weakness to + --- standalone boolean Whether 'Campaign only' weaknesses should be exluded + --- traits? string Trait(s) to use as filter + internal.maybeDrawRandomWeakness = function(slots, playerColor, restrictions) local randomWeaknessAmount = slots[RANDOM_WEAKNESS_ID] or 0 slots[RANDOM_WEAKNESS_ID] = nil if randomWeaknessAmount > 0 then for i = 1, randomWeaknessAmount do - local weaknessId = allCardsBagApi.getRandomWeaknessId() + local weaknessId = allCardsBagApi.getRandomWeaknessId(restrictions) slots[weaknessId] = (slots[weaknessId] or 0) + 1 end internal.maybePrint("Added " .. randomWeaknessAmount .. " random basic weakness(es) to deck", playerColor) @@ -194,7 +201,7 @@ do -- Adds both the investigator (XXXXX) and minicard (XXXXX-m) slots with one copy each ---@param deck table The processed ArkhamDB deck response - ---@param slots table The slot list for cards in this deck. Table key is the cardId, value is the + ---@param slots table The slot list for cards in this deck. Table key is the cardId, value is the --- number of those cards which will be spawned ---@return string: Contains the name of the art that should be loaded ("normal", "promo" or "revised") internal.addInvestigatorCards = function(deck, slots) @@ -271,7 +278,7 @@ do end end - -- On the Mend should have 1-per-investigator copies set aside, but ArkhamDB always sends 1. Update + -- On the Mend should have 1-per-investigator copies set aside, but ArkhamDB always sends 1. Update -- the count based on the investigator count ---@param slots table The slot list for cards in this deck. Table key is the cardId, value is the number -- of those cards which will be spawned diff --git a/src/arkhamdb/DeckImporter.ttslua b/src/arkhamdb/DeckImporter.ttslua index 9f78d30d..33b2a20d 100644 --- a/src/arkhamdb/DeckImporter.ttslua +++ b/src/arkhamdb/DeckImporter.ttslua @@ -21,9 +21,9 @@ local UPGRADED_TOGGLE_LABELS = {} UPGRADED_TOGGLE_LABELS[true] = "Upgraded" UPGRADED_TOGGLE_LABELS[false] = "Specific" -local LOAD_INVESTIGATOR_TOGGLE_LABELS = {} -LOAD_INVESTIGATOR_TOGGLE_LABELS[true] = "Yes" -LOAD_INVESTIGATOR_TOGGLE_LABELS[false] = "No" +local STANDALONE_TOGGLE_LABELS = {} +STANDALONE_TOGGLE_LABELS[true] = "Yes" +STANDALONE_TOGGLE_LABELS[false] = "No" local redDeckId = "" local orangeDeckId = "" @@ -32,7 +32,7 @@ local greenDeckId = "" local privateDeck = true local loadNewestDeck = true -local loadInvestigators = false +local standalone = false function onLoad(script_state) initializeUi(JSON.decode(script_state)) @@ -53,7 +53,7 @@ function getUiState() greenDeck = greenDeckId, privateDeck = privateDeck, loadNewest = loadNewestDeck, - investigators = loadInvestigators + standalone = standalone } end @@ -74,7 +74,7 @@ function initializeUi(savedUiState) greenDeckId = savedUiState.greenDeck privateDeck = savedUiState.privateDeck loadNewestDeck = savedUiState.loadNewest - loadInvestigators = savedUiState.investigators + standalone = savedUiState.standalone end makeOptionToggles() @@ -84,72 +84,74 @@ end function makeOptionToggles() -- common parameters - local checkboxParameters = {} - checkboxParameters.function_owner = self - checkboxParameters.width = INPUT_FIELD_WIDTH - checkboxParameters.height = INPUT_FIELD_HEIGHT - checkboxParameters.scale = { 0.1, 0.1, 0.1 } - checkboxParameters.font_size = 240 - checkboxParameters.hover_color = { 0.4, 0.6, 0.8 } - checkboxParameters.color = FIELD_COLOR + local cParams = {} + cParams.function_owner = self + cParams.width = 1750 + cParams.height = INPUT_FIELD_HEIGHT + cParams.position = Vector( 0.22, 0.1, -0.102) + cParams.scale = { 0.1, 0.1, 0.1 } + cParams.font_size = 240 + cParams.hover_color = { 0.4, 0.6, 0.8 } + cParams.color = FIELD_COLOR -- public / private deck - checkboxParameters.click_function = "publicPrivateChanged" - checkboxParameters.position = { 0.25, 0.1, -0.102 } - checkboxParameters.tooltip = "Published or private deck?\n\nPLEASE USE A PRIVATE DECK IF JUST FOR TTS TO AVOID FLOODING ARKHAMDB PUBLISHED DECK LISTS!" - checkboxParameters.label = PRIVATE_TOGGLE_LABELS[privateDeck] - self.createButton(checkboxParameters) + cParams.click_function = "publishedPrivateChanged" + cParams.tooltip = "Published or private deck?\n\nPLEASE USE A PRIVATE DECK IF JUST FOR TTS TO AVOID FLOODING ARKHAMDB PUBLISHED DECK LISTS!\n\nMake sure to enable deck sharing in your account settings.\n\nKeep this on 'Private' for arkham.build." + cParams.label = PRIVATE_TOGGLE_LABELS[privateDeck] + self.createButton(cParams) -- load upgraded? - checkboxParameters.click_function = "loadUpgradedChanged" - checkboxParameters.position = { 0.25, 0.1, -0.01 } - checkboxParameters.tooltip = "Load newest upgrade or exact deck?" - checkboxParameters.label = UPGRADED_TOGGLE_LABELS[loadNewestDeck] - self.createButton(checkboxParameters) + cParams.click_function = "loadUpgradedChanged" + cParams.position.z = -0.01 + cParams.tooltip = "Load newest upgrade or exact deck?" + cParams.label = UPGRADED_TOGGLE_LABELS[loadNewestDeck] + self.createButton(cParams) - -- load investigators? - checkboxParameters.click_function = "loadInvestigatorsChanged" - checkboxParameters.position = { 0.25, 0.1, 0.081 } - checkboxParameters.tooltip = "Spawn investigator cards?" - checkboxParameters.label = LOAD_INVESTIGATOR_TOGGLE_LABELS[loadInvestigators] - self.createButton(checkboxParameters) + -- standalone mode? + cParams.click_function = "standaloneChanged" + cParams.position.z = 0.081 + cParams.tooltip = "Are you playing standalone mode? Enabling this will make all 'Campaign Only' weaknesses ineligible when determining the random basic weakness(es)." + cParams.label = STANDALONE_TOGGLE_LABELS[standalone] + self.createButton(cParams) end -- Create the four deck ID entry fields function makeDeckIdFields() - local inputParameters = {} - -- Parameters common to all entry fields - inputParameters.function_owner = self - inputParameters.scale = { 0.1, 0.1, 0.1 } - inputParameters.width = INPUT_FIELD_WIDTH - inputParameters.height = INPUT_FIELD_HEIGHT - inputParameters.font_size = 320 - inputParameters.tooltip = "Deck ID from ArkhamDB URL of the deck\nPublic URL: 'https://arkhamdb.com/decklist/view/101/knowledge-overwhelming-solo-deck-1.0' = '101'\nPrivate URL: 'https://arkhamdb.com/deck/view/102' = '102'\n\nAlso supports the deck ID from shared decks from arkham.build!" - inputParameters.alignment = 3 -- Center - inputParameters.color = FIELD_COLOR - inputParameters.font_color = { 0, 0, 0 } - inputParameters.validation = 4 -- alphanumeric (to support arkham.build IDs) + local iParams = {} + iParams.function_owner = self + iParams.scale = { 0.1, 0.1, 0.1 } + iParams.width = INPUT_FIELD_WIDTH + iParams.height = INPUT_FIELD_HEIGHT + iParams.font_size = 320 + iParams.tooltip = "Deck ID from ArkhamDB URL of the deck\nPublic URL: 'https://arkhamdb.com/decklist/view/101/knowledge-overwhelming-solo-deck-1.0' = '101'\nPrivate URL: 'https://arkhamdb.com/deck/view/102' = '102'\n\nAlso supports the deck ID from shared decks from arkham.build!" + iParams.alignment = 3 -- Center + iParams.color = FIELD_COLOR + iParams.font_color = { 0, 0, 0 } + iParams.validation = 4 -- alphanumeric (to support arkham.build IDs) -- Green - inputParameters.input_function = "greenDeckChanged" - inputParameters.position = { -0.166, 0.1, 0.385 } - inputParameters.value = greenDeckId - self.createInput(inputParameters) + iParams.input_function = "greenDeckChanged" + iParams.position = { -0.16, 0.1, 0.385 } + iParams.value = greenDeckId + self.createInput(iParams) + -- Red - inputParameters.input_function = "redDeckChanged" - inputParameters.position = { 0.171, 0.1, 0.385 } - inputParameters.value = redDeckId - self.createInput(inputParameters) + iParams.input_function = "redDeckChanged" + iParams.position = { 0.165, 0.1, 0.385 } + iParams.value = redDeckId + self.createInput(iParams) + -- White - inputParameters.input_function = "whiteDeckChanged" - inputParameters.position = { -0.166, 0.1, 0.474 } - inputParameters.value = whiteDeckId - self.createInput(inputParameters) + iParams.input_function = "whiteDeckChanged" + iParams.position = { -0.16, 0.1, 0.474 } + iParams.value = whiteDeckId + self.createInput(iParams) + -- Orange - inputParameters.input_function = "orangeDeckChanged" - inputParameters.position = { 0.171, 0.1, 0.474 } - inputParameters.value = orangeDeckId - self.createInput(inputParameters) + iParams.input_function = "orangeDeckChanged" + iParams.position = { 0.165, 0.1, 0.474 } + iParams.value = orangeDeckId + self.createInput(iParams) end -- Create the Build All button. This is a transparent button which covers the Build All portion of the background graphic @@ -172,7 +174,7 @@ function whiteDeckChanged(_, _, inputValue) whiteDeckId = inputValue end function greenDeckChanged(_, _, inputValue) greenDeckId = inputValue end -- Event handlers for toggle buttons -function publicPrivateChanged() +function publishedPrivateChanged() privateDeck = not privateDeck self.editButton({ index = 0, label = PRIVATE_TOGGLE_LABELS[privateDeck] }) end @@ -182,9 +184,9 @@ function loadUpgradedChanged() self.editButton({ index = 1, label = UPGRADED_TOGGLE_LABELS[loadNewestDeck] }) end -function loadInvestigatorsChanged() - loadInvestigators = not loadInvestigators - self.editButton({ index = 2, label = LOAD_INVESTIGATOR_TOGGLE_LABELS[loadInvestigators] }) +function standaloneChanged() + standalone = not standalone + self.editButton({ index = 2, label = STANDALONE_TOGGLE_LABELS[standalone] }) end function loadDecks() @@ -247,7 +249,7 @@ function buildDeck(playerColor, deckId) deckId, uiState.privateDeck, uiState.loadNewest, - uiState.investigators, + uiState.standalone, loadCards) end diff --git a/src/playercards/AllCardsBag.ttslua b/src/playercards/AllCardsBag.ttslua index 652d4f70..0f864339 100644 --- a/src/playercards/AllCardsBag.ttslua +++ b/src/playercards/AllCardsBag.ttslua @@ -370,19 +370,29 @@ end -- Gets a random basic weakness from the bag. Once a given ID has been returned it will be -- removed from the list and cannot be selected again until a reload occurs or the indexes -- are rebuilt, which will refresh the list to include all weaknesses. +---@param restrictions? table Additional restrictions: +--- class string Class to restrict weakness to +--- standalone boolean Whether 'Campaign only' weaknesses should be exluded +--- traits? string Trait(s) to use as filter ---@return string: ID of the selected weakness -function getRandomWeaknessId() - local availableWeaknesses = buildAvailableWeaknesses() +function getRandomWeaknessId(restrictions) + local availableWeaknesses = buildAvailableWeaknesses(restrictions) if #availableWeaknesses > 0 then return availableWeaknesses[math.random(#availableWeaknesses)] + else + broadcastToAll("No basic weakness available!", { 0.9, 0.2, 0.2 }) end end -- Constructs a list of available basic weaknesses by starting with the full pool of basic -- weaknesses then removing any which are currently in the play or deck construction areas ----@param traits? string Trait(s) to use as filter +---@param restrictions? table Additional restrictions: +--- class string Class to restrict weakness to +--- standalone boolean Whether 'Campaign only' weaknesses should be exluded +--- traits? string Trait(s) to use as filter ---@return table: Array of weakness IDs which are valid to choose from -function buildAvailableWeaknesses(traits) +function buildAvailableWeaknesses(restrictions) + restrictions = restrictions or {} local weaknessesInPlay = {} local allObjects = getAllObjects() for _, object in ipairs(allObjects) do @@ -400,10 +410,29 @@ function buildAvailableWeaknesses(traits) if (weaknessesInPlay[weaknessId] ~= nil and weaknessesInPlay[weaknessId] > 0) then weaknessesInPlay[weaknessId] = weaknessesInPlay[weaknessId] - 1 else - if traits then + local eligible = true + + -- disable 'Campaign only' weaknesses in standalone mode + if restrictions.standalone then + local card = cardIdIndex[weaknessId] + if card.metadata.modeRestriction == "Campaign" then + eligible = false + end + end + + -- disable class restricted weaknesses + if restrictions.class then + local card = cardIdIndex[weaknessId] + if card.metadata.classRestriction ~= restrictions.class then + eligible = false + end + end + + -- disable non-matching traits + if restrictions.traits then -- split the string into separate traits (separated by "|") local allowedTraits = {} - for str in traits:gmatch("([^|]+)") do + for str in restrictions.traits:gmatch("([^|]+)") do -- remove dots str = str:gsub("[%.]", "") @@ -415,15 +444,24 @@ function buildAvailableWeaknesses(traits) table.insert(allowedTraits, str) end + local match = false + -- make sure the trait is present on the weakness local card = cardIdIndex[weaknessId] for _, allowedTrait in ipairs(allowedTraits) do if string.contains(string.lower(card.metadata.traits), allowedTrait) then - table.insert(availableWeaknesses, weaknessId) + match = true break end end - else + + if not match then + eligible = false + end + end + + -- add weakness to list if eligible + if eligible then table.insert(availableWeaknesses, weaknessId) end end diff --git a/src/playercards/AllCardsBagApi.ttslua b/src/playercards/AllCardsBagApi.ttslua index 154aed39..b62b1592 100644 --- a/src/playercards/AllCardsBagApi.ttslua +++ b/src/playercards/AllCardsBagApi.ttslua @@ -28,9 +28,13 @@ do -- Gets a random basic weakness from the bag. Once a given ID has been returned it -- will be removed from the list and cannot be selected again until a reload occurs -- or the indexes are rebuilt, which will refresh the list to include all weaknesses. + ---@param restrictions table Additional restrictions: + --- class string Class to restrict weakness to + --- standalone boolean Whether 'Campaign only' weaknesses should be exluded + --- traits? string Trait(s) to use as filter ---@return string: ID of the selected weakness - AllCardsBagApi.getRandomWeaknessId = function() - return getAllCardsBag().call("getRandomWeaknessId") + AllCardsBagApi.getRandomWeaknessId = function(restrictions) + return getAllCardsBag().call("getRandomWeaknessId", restrictions) end AllCardsBagApi.isIndexReady = function() @@ -82,10 +86,13 @@ do -- Constructs a list of available basic weaknesses by starting with the full pool of basic -- weaknesses then removing any which are currently in the play or deck construction areas - ---@param traits? string Trait(s) to use as filter + ---@param restrictions table Additional restrictions: + --- class string Class to restrict weakness to + --- standalone boolean Whether 'Campaign only' weaknesses should be exluded + --- traits? string Trait(s) to use as filter ---@return table: Array of weakness IDs which are valid to choose from - AllCardsBagApi.buildAvailableWeaknesses = function(traits) - return returnCopyOfList(getAllCardsBag().call("buildAvailableWeaknesses", traits)) + AllCardsBagApi.buildAvailableWeaknesses = function(restrictions) + return returnCopyOfList(getAllCardsBag().call("buildAvailableWeaknesses", restrictions)) end AllCardsBagApi.getUniqueWeaknesses = function() diff --git a/src/playercards/PlayerCardPanel.ttslua b/src/playercards/PlayerCardPanel.ttslua index 09587e62..c2404696 100644 --- a/src/playercards/PlayerCardPanel.ttslua +++ b/src/playercards/PlayerCardPanel.ttslua @@ -783,20 +783,16 @@ function spawnRandomWeakness(_, playerColor, isRightClick) if not isRightClick then local weaknessId = allCardsBagApi.getRandomWeaknessId() - if weaknessId == nil then - broadcastToAll("All basic weaknesses are in play!", { 0.9, 0.2, 0.2 }) - else + if weaknessId then spawnSingleWeakness(weaknessId) end else Player[playerColor].showInputDialog("Specify a trait for the weakness (split multiple eligible traits with '|'):", lastWeaknessTrait, function(text) lastWeaknessTrait = text - local availableWeaknesses = allCardsBagApi.buildAvailableWeaknesses(text) - if #availableWeaknesses > 0 then - spawnSingleWeakness(availableWeaknesses[math.random(#availableWeaknesses)]) - else - broadcastToAll("No matching weakness available!", { 0.9, 0.2, 0.2 }) + local weaknessId = allCardsBagApi.getRandomWeaknessId({ traits = text }) + if weaknessId then + spawnSingleWeakness(weaknessId) end end) end @@ -808,6 +804,6 @@ function spawnSingleWeakness(weaknessId) name = "randomWeakness", cards = { weaknessId }, globalPos = self.positionToWorld(startPositions.randomWeakness), - rotation = FACE_UP_ROTATION, + rotation = FACE_UP_ROTATION }) end From 10df46854a08a862afdf6b7f21530778cb5f57f3 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 21:07:47 +0200 Subject: [PATCH 14/22] fixed class restriction logic --- src/playercards/AllCardsBag.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playercards/AllCardsBag.ttslua b/src/playercards/AllCardsBag.ttslua index 0f864339..b0aa65ab 100644 --- a/src/playercards/AllCardsBag.ttslua +++ b/src/playercards/AllCardsBag.ttslua @@ -423,7 +423,7 @@ function buildAvailableWeaknesses(restrictions) -- disable class restricted weaknesses if restrictions.class then local card = cardIdIndex[weaknessId] - if card.metadata.classRestriction ~= restrictions.class then + if card.metadata.classRestriction and card.metadata.classRestriction ~= restrictions.class then eligible = false end end From 893bd05801137b020dc385a00d85080fd8102c5b Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 22:15:35 +0200 Subject: [PATCH 15/22] updated deck importer --- src/arkhamdb/ArkhamDb.ttslua | 6 ++-- src/arkhamdb/DeckImporter.ttslua | 40 ++++++++++++++++---------- src/playercards/AllCardsBag.ttslua | 38 +++++++++++++++++------- src/playercards/AllCardsBagApi.ttslua | 7 +++-- src/playercards/PlayerCardPanel.ttslua | 12 ++++---- 5 files changed, 65 insertions(+), 38 deletions(-) diff --git a/src/arkhamdb/ArkhamDb.ttslua b/src/arkhamdb/ArkhamDb.ttslua index 691e9d65..1e9bfcbd 100644 --- a/src/arkhamdb/ArkhamDb.ttslua +++ b/src/arkhamdb/ArkhamDb.ttslua @@ -191,11 +191,11 @@ do slots[RANDOM_WEAKNESS_ID] = nil if randomWeaknessAmount > 0 then - for i = 1, randomWeaknessAmount do - local weaknessId = allCardsBagApi.getRandomWeaknessId(restrictions) + local weaknessIds = allCardsBagApi.getRandomWeaknessIds(randomWeaknessAmount, restrictions) + for _, weaknessId in ipairs(weaknessIds) do slots[weaknessId] = (slots[weaknessId] or 0) + 1 end - internal.maybePrint("Added " .. randomWeaknessAmount .. " random basic weakness(es) to deck", playerColor) + internal.maybePrint("Added " .. #weaknessIds .. " random basic weakness(es) to deck", playerColor) end end diff --git a/src/arkhamdb/DeckImporter.ttslua b/src/arkhamdb/DeckImporter.ttslua index 33b2a20d..5bcebb3a 100644 --- a/src/arkhamdb/DeckImporter.ttslua +++ b/src/arkhamdb/DeckImporter.ttslua @@ -25,10 +25,10 @@ local STANDALONE_TOGGLE_LABELS = {} STANDALONE_TOGGLE_LABELS[true] = "Yes" STANDALONE_TOGGLE_LABELS[false] = "No" -local redDeckId = "" -local orangeDeckId = "" -local whiteDeckId = "" -local greenDeckId = "" +redDeckId = "" +orangeDeckId = "" +whiteDeckId = "" +greenDeckId = "" local privateDeck = true local loadNewestDeck = true @@ -123,7 +123,7 @@ function makeDeckIdFields() iParams.width = INPUT_FIELD_WIDTH iParams.height = INPUT_FIELD_HEIGHT iParams.font_size = 320 - iParams.tooltip = "Deck ID from ArkhamDB URL of the deck\nPublic URL: 'https://arkhamdb.com/decklist/view/101/knowledge-overwhelming-solo-deck-1.0' = '101'\nPrivate URL: 'https://arkhamdb.com/deck/view/102' = '102'\n\nAlso supports the deck ID from shared decks from arkham.build!" + iParams.tooltip = "Deck ID from ArkhamDB URL of the deck\nPublished URL: 'https://arkhamdb.com/decklist/view/101/knowledge-overwhelming-solo-deck-1.0' = '101'\nPrivate URL: 'https://arkhamdb.com/deck/view/102' = '102'\n\nAlso supports the deck ID from shared decks from arkham.build!" iParams.alignment = 3 -- Center iParams.color = FIELD_COLOR iParams.font_color = { 0, 0, 0 } @@ -190,19 +190,28 @@ function standaloneChanged() end function loadDecks() + co = coroutine.create(loadDecksCoroutine) + resumeLoadDecks() +end + +function loadDecksCoroutine() if not allCardsBagApi.isIndexReady() then return end matsWithInvestigator = playermatApi.getUsedMatColors() - if redDeckId ~= nil and redDeckId ~= "" then - buildDeck("Red", redDeckId) + + for _, matColor in ipairs({"White", "Orange", "Green", "Red"}) do + local deckId = _G[string.lower(matColor) .. "DeckId"] + if deckId ~= nil and deckId ~= "" then + buildDeck(matColor, deckId) + coroutine.yield() + end end - if orangeDeckId ~= nil and orangeDeckId ~= "" then - buildDeck("Orange", orangeDeckId) - end - if whiteDeckId ~= nil and whiteDeckId ~= "" then - buildDeck("White", whiteDeckId) - end - if greenDeckId ~= nil and greenDeckId ~= "" then - buildDeck("Green", greenDeckId) +end + +function resumeLoadDecks() + log("resume") + if co and coroutine.status(co) ~= "dead" then + local status, err = coroutine.resume(co) + if not status then error(err) end end end @@ -345,6 +354,7 @@ function loadCards(slots, investigatorId, bondedList, customizations, playerColo if (not hadError) then printToAll("Deck loaded successfully!", playerColor) end + resumeLoadDecks() return 1 end diff --git a/src/playercards/AllCardsBag.ttslua b/src/playercards/AllCardsBag.ttslua index b0aa65ab..9e6d6f50 100644 --- a/src/playercards/AllCardsBag.ttslua +++ b/src/playercards/AllCardsBag.ttslua @@ -370,18 +370,34 @@ end -- Gets a random basic weakness from the bag. Once a given ID has been returned it will be -- removed from the list and cannot be selected again until a reload occurs or the indexes -- are rebuilt, which will refresh the list to include all weaknesses. ----@param restrictions? table Additional restrictions: ---- class string Class to restrict weakness to ---- standalone boolean Whether 'Campaign only' weaknesses should be exluded ---- traits? string Trait(s) to use as filter ----@return string: ID of the selected weakness -function getRandomWeaknessId(restrictions) - local availableWeaknesses = buildAvailableWeaknesses(restrictions) - if #availableWeaknesses > 0 then - return availableWeaknesses[math.random(#availableWeaknesses)] - else - broadcastToAll("No basic weakness available!", { 0.9, 0.2, 0.2 }) +---@param params table Bundled parameters: +--- count number Number of weaknesses +--- restrictions table Additional restrictions: +--- class string Class to restrict weakness to +--- standalone boolean Whether 'Campaign only' weaknesses should be exluded +--- traits? string Trait(s) to use as filter +---@return table: Table with IDs of the selected weaknesses +function getRandomWeaknessIds(params) + params.count = params.count or 1 + local availableWeaknesses = buildAvailableWeaknesses(params.restrictions) + + -- check if enough weaknesses are available + local missingWeaknesses = params.count - #availableWeaknesses + if missingWeaknesses > 0 then + broadcastToAll("Not enough basic weaknesses available! (" .. missingWeaknesses .. " missing)", { 0.9, 0.2, 0.2 }) end + + local drawnWeaknesses = {} + + -- Fisher-Yates shuffle algorithm + local n = #availableWeaknesses + for i = 1, math.min(params.count, n) do + local index = math.random(i, n) + table.insert(drawnWeaknesses, availableWeaknesses[index]) + availableWeaknesses[index], availableWeaknesses[i] = availableWeaknesses[i], availableWeaknesses[index] + end + + return drawnWeaknesses end -- Constructs a list of available basic weaknesses by starting with the full pool of basic diff --git a/src/playercards/AllCardsBagApi.ttslua b/src/playercards/AllCardsBagApi.ttslua index b62b1592..2a69145b 100644 --- a/src/playercards/AllCardsBagApi.ttslua +++ b/src/playercards/AllCardsBagApi.ttslua @@ -28,13 +28,14 @@ do -- Gets a random basic weakness from the bag. Once a given ID has been returned it -- will be removed from the list and cannot be selected again until a reload occurs -- or the indexes are rebuilt, which will refresh the list to include all weaknesses. + ---@param count number Number of weaknesses ---@param restrictions table Additional restrictions: --- class string Class to restrict weakness to --- standalone boolean Whether 'Campaign only' weaknesses should be exluded --- traits? string Trait(s) to use as filter - ---@return string: ID of the selected weakness - AllCardsBagApi.getRandomWeaknessId = function(restrictions) - return getAllCardsBag().call("getRandomWeaknessId", restrictions) + ---@return table: Table with IDs of the selected weaknesses + AllCardsBagApi.getRandomWeaknessIds = function(count, restrictions) + return returnCopyOfList(getAllCardsBag().call("getRandomWeaknessIds", {count = count, restrictions = restrictions})) end AllCardsBagApi.isIndexReady = function() diff --git a/src/playercards/PlayerCardPanel.ttslua b/src/playercards/PlayerCardPanel.ttslua index c2404696..51427e6a 100644 --- a/src/playercards/PlayerCardPanel.ttslua +++ b/src/playercards/PlayerCardPanel.ttslua @@ -782,17 +782,17 @@ function spawnRandomWeakness(_, playerColor, isRightClick) prepareToPlaceCards() if not isRightClick then - local weaknessId = allCardsBagApi.getRandomWeaknessId() - if weaknessId then - spawnSingleWeakness(weaknessId) + local weaknessIds = allCardsBagApi.getRandomWeaknessIds(1) + if weaknessIds[1] then + spawnSingleWeakness(weaknessIds[1]) end else Player[playerColor].showInputDialog("Specify a trait for the weakness (split multiple eligible traits with '|'):", lastWeaknessTrait, function(text) lastWeaknessTrait = text - local weaknessId = allCardsBagApi.getRandomWeaknessId({ traits = text }) - if weaknessId then - spawnSingleWeakness(weaknessId) + local weaknessIds = allCardsBagApi.getRandomWeaknessIds(1, { traits = text }) + if weaknessIds[1] then + spawnSingleWeakness(weaknessIds[1]) end end) end From 42cda036a0820b70fe8dc4ad700d045ac701b304 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 22:17:59 +0200 Subject: [PATCH 16/22] added comments --- src/arkhamdb/DeckImporter.ttslua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/arkhamdb/DeckImporter.ttslua b/src/arkhamdb/DeckImporter.ttslua index 5bcebb3a..4d878aa2 100644 --- a/src/arkhamdb/DeckImporter.ttslua +++ b/src/arkhamdb/DeckImporter.ttslua @@ -189,11 +189,14 @@ function standaloneChanged() self.editButton({ index = 2, label = STANDALONE_TOGGLE_LABELS[standalone] }) end +-- start the deck importing process function loadDecks() co = coroutine.create(loadDecksCoroutine) resumeLoadDecks() end +-- perform the deck importing (with a pause after each deck load) +-- this pause will for example allow weaknesses to be spawned so that the RBW drawing can detect them function loadDecksCoroutine() if not allCardsBagApi.isIndexReady() then return end matsWithInvestigator = playermatApi.getUsedMatColors() @@ -207,8 +210,8 @@ function loadDecksCoroutine() end end +-- resume the deck importing process function resumeLoadDecks() - log("resume") if co and coroutine.status(co) ~= "dead" then local status, err = coroutine.resume(co) if not status then error(err) end From 38d017084ec1217eeb14495dc101fe255a25d66d Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 22:27:50 +0200 Subject: [PATCH 17/22] updated image --- objects/DeckImporter.a28140.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/objects/DeckImporter.a28140.json b/objects/DeckImporter.a28140.json index db6aa0bb..2bc4cd7d 100644 --- a/objects/DeckImporter.a28140.json +++ b/objects/DeckImporter.a28140.json @@ -19,7 +19,7 @@ }, "ImageScalar": 1, "ImageSecondaryURL": "", - "ImageURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617690977900/DCFE14F204C4038FA382741683862B95DC892F8E/", + "ImageURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691603054/ABA4AB3A811107629323CDA2765871EB36626242/", "WidthScale": 0 }, "Description": "", From ea344664235df83738c2dd41e5b06db497e0bc35 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 23:25:30 +0200 Subject: [PATCH 18/22] Added Parallel Jenny --- objects/AllPlayerCards.15bb07.json | 5 ++ .../JennyBarnesParallel.9058d4.gmnotes | 12 ++++ .../JennyBarnesParallel.9058d4.json | 62 +++++++++++++++++++ .../JennyBarnesParallelBack.9058d5.gmnotes | 12 ++++ .../JennyBarnesParallelBack.9058d5.json | 62 +++++++++++++++++++ .../JennyBarnesParallelFront.9058d6.gmnotes | 12 ++++ .../JennyBarnesParallelFront.9058d6.json | 62 +++++++++++++++++++ .../JennysTwin45s.d87128.json | 2 +- .../JennysTwin45s.d87129.gmnotes | 10 +++ .../JennysTwin45s.d87129.json | 62 +++++++++++++++++++ .../SearchingforIzzie.426d29.gmnotes | 8 +++ .../SearchingforIzzie.426d29.json | 61 ++++++++++++++++++ src/playercards/PlayerCardPanelData.ttslua | 4 +- 13 files changed, 371 insertions(+), 3 deletions(-) create mode 100644 objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json create mode 100644 objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json create mode 100644 objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json create mode 100644 objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json create mode 100644 objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes create mode 100644 objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json diff --git a/objects/AllPlayerCards.15bb07.json b/objects/AllPlayerCards.15bb07.json index 17b4d7f9..9c8d941c 100644 --- a/objects/AllPlayerCards.15bb07.json +++ b/objects/AllPlayerCards.15bb07.json @@ -401,6 +401,7 @@ "WarningShot.ec38db", "TheHomeFront.b80459", "JennysTwin45s.d87128", + "JennysTwin45s.d87129", "TokenofFaith.2ea0d0", "MistsofRlyeh.5558f1", "Shortcut.d4fd4a", @@ -569,6 +570,7 @@ "TennesseeSourMash3.b5e5f1", "TheBellTolls.6cbc01", "SearchingforIzzie.426d28", + "SearchingforIzzie.426d29", "StunningBlow.58c435", "SharpVision1.4d9a97", "Letmehandlethis.36c0cb", @@ -1524,6 +1526,9 @@ "NormanWithers.a5d9bb", "NormanWithers.e0a155", "JennyBarnes.9058d3", + "JennyBarnesParallel.9058d4", + "JennyBarnesParallelBack.9058d5", + "JennyBarnesParallelFront.9058d6", "CarolynFern.b03b12", "DexterDrake.e015f8", "SilasMarsh.3f92cf", diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes new file mode 100644 index 00000000..82007b22 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes @@ -0,0 +1,12 @@ +{ + "id": "02003-p", + "type": "Investigator", + "class": "Rogue", + "traits": "Drifter. Socialite.", + "willpowerIcons": 3, + "intellectIcons": 3, + "combatIcons": 3, + "agilityIcons": 3, + "cycle": "Pistols and Pearls", + "extraToken": "FreeTrigger|Reaction" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json new file mode 100644 index 00000000..0463c791 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 15000, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "150": { + "BackIsHidden": true, + "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691803235/A5A41E0B1229028C82F0451ED9DA1A97D11030C6/", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691803373/86292022002FE355597BCB4D81D3692AEFA1207D/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Dilettante", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes", + "GUID": "9058d4", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Jenny Barnes (Parallel)", + "SidewaysCard": true, + "Snap": true, + "Sticky": true, + "Tags": [ + "Investigator", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 26.925, + "posY": 3.688, + "posZ": -2.775, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 1.15, + "scaleY": 1, + "scaleZ": 1.15 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes new file mode 100644 index 00000000..38f314bb --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes @@ -0,0 +1,12 @@ +{ + "id": "02003-pb", + "type": "Investigator", + "class": "Rogue", + "traits": "Drifter.", + "willpowerIcons": 3, + "intellectIcons": 3, + "combatIcons": 3, + "agilityIcons": 3, + "cycle": "Pistols and Pearls", + "extraToken": "None" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json new file mode 100644 index 00000000..44891ffb --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 15100, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "151": { + "BackIsHidden": true, + "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691803235/A5A41E0B1229028C82F0451ED9DA1A97D11030C6/", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691803104/B281F0E5830527F2B8C733BE48C7D9FB7465965E/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Dilettante", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes", + "GUID": "9058d5", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Jenny Barnes (Parallel Back)", + "SidewaysCard": true, + "Snap": true, + "Sticky": true, + "Tags": [ + "Investigator", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 26.925, + "posY": 3.688, + "posZ": -2.775, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 1.15, + "scaleY": 1, + "scaleZ": 1.15 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes new file mode 100644 index 00000000..5d5db698 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes @@ -0,0 +1,12 @@ +{ + "id": "02003-pf", + "type": "Investigator", + "class": "Rogue", + "traits": "Drifter. Socialite.", + "willpowerIcons": 3, + "intellectIcons": 3, + "combatIcons": 3, + "agilityIcons": 3, + "cycle": "Pistols and Pearls", + "extraToken": "FreeTrigger|Reaction" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json new file mode 100644 index 00000000..a4d4ea0f --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 15200, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "152": { + "BackIsHidden": true, + "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691802940/2292AE6457CB938D1656262EAAF92C780BE8741C/", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691803373/86292022002FE355597BCB4D81D3692AEFA1207D/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "The Dilettante", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes", + "GUID": "9058d6", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": false, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Jenny Barnes (Parallel Front)", + "SidewaysCard": true, + "Snap": true, + "Sticky": true, + "Tags": [ + "Investigator", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 26.925, + "posY": 3.688, + "posZ": -2.775, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 1.15, + "scaleY": 1, + "scaleZ": 1.15 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.json b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.json index 81a6f963..89749b5d 100644 --- a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.json +++ b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.json @@ -22,7 +22,7 @@ "UniqueBack": false } }, - "Description": "", + "Description": "A Perfect Fit", "DragSelectable": true, "GMNotes_path": "AllPlayerCards.15bb07/JennysTwin45s.d87128.gmnotes", "GUID": "d87128", diff --git a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes new file mode 100644 index 00000000..0db5c537 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes @@ -0,0 +1,10 @@ +{ + "id": "90085", + "type": "Asset", + "slot": "Hand x2", + "class": "Neutral", + "traits": "Item. Weapon. Firearm.", + "agilityIcons": 1, + "wildIcons": 2, + "cycle": "Pistols and Pearls" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json new file mode 100644 index 00000000..0310e96a --- /dev/null +++ b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json @@ -0,0 +1,62 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 15300, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "153": { + "BackIsHidden": true, + "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691803450/5C647BCF9EBE08572D746C439A543A18C4BE2DD9/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "A Perfect Fit (Advanced)", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes", + "GUID": "d87129", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": true, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Jenny's Twin .45s", + "SidewaysCard": false, + "Snap": true, + "Sticky": true, + "Tags": [ + "Asset", + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 9.005, + "posY": 3.859, + "posZ": -16.695, + "rotX": 1, + "rotY": 270, + "rotZ": 0, + "scaleX": 1, + "scaleY": 1, + "scaleZ": 1 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes new file mode 100644 index 00000000..36a62029 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes @@ -0,0 +1,8 @@ +{ + "id": "90086", + "type": "Treachery", + "class": "Neutral", + "traits": "Task.", + "weakness": true, + "cycle": "Pistols and Pearls" +} \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json new file mode 100644 index 00000000..e31ce005 --- /dev/null +++ b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json @@ -0,0 +1,61 @@ +{ + "AltLookAngle": { + "x": 0, + "y": 0, + "z": 0 + }, + "Autoraise": true, + "CardID": 15400, + "ColorDiffuse": { + "b": 0.71324, + "g": 0.71324, + "r": 0.71324 + }, + "CustomDeck": { + "154": { + "BackIsHidden": true, + "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2466368617691803586/22C0433DD0E36AF34DA9A08F93EC43A00F0E2EBE/", + "NumHeight": 1, + "NumWidth": 1, + "Type": 0, + "UniqueBack": false + } + }, + "Description": "Advanced", + "DragSelectable": true, + "GMNotes_path": "AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes", + "GUID": "426d29", + "Grid": true, + "GridProjection": false, + "Hands": true, + "HideWhenFaceDown": true, + "IgnoreFoW": false, + "LayoutGroupSortIndex": 0, + "Locked": false, + "LuaScript": "", + "LuaScriptState": "", + "MeasureMovement": false, + "Name": "CardCustom", + "Nickname": "Searching for Izzie", + "SidewaysCard": false, + "Snap": true, + "Sticky": true, + "Tags": [ + "PlayerCard" + ], + "Tooltip": true, + "Transform": { + "posX": 9.074, + "posY": 3.685, + "posZ": -16.71, + "rotX": 0, + "rotY": 270, + "rotZ": 0, + "scaleX": 1, + "scaleY": 1, + "scaleZ": 1 + }, + "Value": 0, + "XmlUI": "" +} \ No newline at end of file diff --git a/src/playercards/PlayerCardPanelData.ttslua b/src/playercards/PlayerCardPanelData.ttslua index 31b7fdc4..4beef798 100644 --- a/src/playercards/PlayerCardPanelData.ttslua +++ b/src/playercards/PlayerCardPanelData.ttslua @@ -261,9 +261,9 @@ INVESTIGATORS["Rex Murphy"] = { starterDeck = "2624958" } INVESTIGATORS["Jenny Barnes"] = { - cards = { "02003" }, + cards = { "02003", "02003-p", "02003-pf", "02003-pb" }, minicards = { "02003-m" }, - signatures = { "02010", "02011", "98002", "98003" }, + signatures = { "02010", "02011", "90085", "90086", "98002", "98003" }, starterDeck = "2624961" } INVESTIGATORS["Jim Culver"] = { From 94e8faca9eb8f0ae703a54feac898deeaf6bd3ac Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 23:30:23 +0200 Subject: [PATCH 19/22] removed freetrigger token --- .../AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes | 2 +- .../JennyBarnesParallelFront.9058d6.gmnotes | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes index 82007b22..5fa46fd3 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes @@ -8,5 +8,5 @@ "combatIcons": 3, "agilityIcons": 3, "cycle": "Pistols and Pearls", - "extraToken": "FreeTrigger|Reaction" + "extraToken": "Reaction" } \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes index 5d5db698..2246ecdf 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes @@ -8,5 +8,5 @@ "combatIcons": 3, "agilityIcons": 3, "cycle": "Pistols and Pearls", - "extraToken": "FreeTrigger|Reaction" + "extraToken": "Reaction" } \ No newline at end of file From 3c5d446e557702229d3bddf7519f21aefdbd7e36 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 23:41:59 +0200 Subject: [PATCH 20/22] added uses --- objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.gmnotes | 7 +++++++ objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.gmnotes b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.gmnotes index 892db4d5..1032ee0e 100644 --- a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87128.gmnotes @@ -6,5 +6,12 @@ "traits": "Item. Weapon. Firearm.", "agilityIcons": 2, "wildIcons": 1, + "uses": [ + { + "count": 0, + "type": "Ammo", + "token": "resource" + } + ], "cycle": "The Dunwich Legacy" } diff --git a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes index 0db5c537..9ee7e265 100644 --- a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes @@ -6,5 +6,12 @@ "traits": "Item. Weapon. Firearm.", "agilityIcons": 1, "wildIcons": 2, + "uses": [ + { + "count": 0, + "type": "Ammo", + "token": "resource" + } + ], "cycle": "Pistols and Pearls" } \ No newline at end of file From 538a5d4baad0832c20a275159cedb6ac4c843763 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Thu, 1 Aug 2024 23:52:37 +0200 Subject: [PATCH 21/22] Fixed starterdeck spawning --- src/playercards/PlayerCardPanel.ttslua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/playercards/PlayerCardPanel.ttslua b/src/playercards/PlayerCardPanel.ttslua index 51427e6a..c3ee6bc4 100644 --- a/src/playercards/PlayerCardPanel.ttslua +++ b/src/playercards/PlayerCardPanel.ttslua @@ -603,9 +603,14 @@ function spawnStarterDeck(investigatorName, investigatorData, position) local cardIdList = {} for id, count in pairs(slots) do for i = 1, count do - table.insert(cardIdList, id) + -- don't include mini-cards and investigators + local card = allCardsBagApi.getCardById(id) + if card and card.metadata and card.metadata.type ~= "Investigator" and card.metadata.type ~= "Minicard" then + table.insert(cardIdList, id) + end end end + spawnBag.spawn({ name = investigatorName .. "starter", cards = cardIdList, From 008decf288fb3b966a2988accc2c55d7974273ef Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Fri, 2 Aug 2024 00:04:25 +0200 Subject: [PATCH 22/22] Updated release notes and formatted Luascriptstates --- .../JennyBarnesParallel.9058d4.gmnotes | 2 +- .../JennyBarnesParallel.9058d4.json | 2 +- .../JennyBarnesParallelBack.9058d5.gmnotes | 2 +- .../JennyBarnesParallelBack.9058d5.json | 2 +- .../JennyBarnesParallelFront.9058d6.gmnotes | 2 +- .../JennyBarnesParallelFront.9058d6.json | 2 +- .../JennysTwin45s.d87129.gmnotes | 2 +- .../JennysTwin45s.d87129.json | 2 +- .../SearchingforIzzie.426d29.gmnotes | 2 +- .../SearchingforIzzie.426d29.json | 2 +- .../ChallengeScenarios.9f6801.luascriptstate | 96 +++++++++++- objects/DeckImporter.a28140.json | 2 +- objects/DeckImporter.a28140.luascriptstate | 2 +- .../FlexTableControl.bd69bd.luascriptstate | 21 ++- objects/LearntoPlay.4ff3b0.json | 2 +- objects/LuaScriptState.luascriptstate | 30 +++- ...gationOverlayHandler.797ede.luascriptstate | 69 ++++++++- objects/PatchNotes.f47225.luascriptstate | 145 +++++++++++++++++- objects/PlayArea.721ba2.luascriptstate | 11 +- objects/Playermat1White.8b081b.luascriptstate | 24 ++- .../Playermat2Orange.bd0ff4.luascriptstate | 24 ++- objects/Playermat3Green.383d8b.luascriptstate | 24 ++- objects/Playermat4Red.0840d5.luascriptstate | 24 ++- .../StandaloneScenarios.77a5f9.luascriptstate | 135 +++++++++++++++- objects/TokenArranger.022907.luascriptstate | 47 +++++- 25 files changed, 651 insertions(+), 25 deletions(-) diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes index 5fa46fd3..466a485a 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.gmnotes @@ -9,4 +9,4 @@ "agilityIcons": 3, "cycle": "Pistols and Pearls", "extraToken": "Reaction" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json index 0463c791..df7d28da 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallel.9058d4.json @@ -59,4 +59,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes index 38f314bb..fe53d018 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.gmnotes @@ -9,4 +9,4 @@ "agilityIcons": 3, "cycle": "Pistols and Pearls", "extraToken": "None" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json index 44891ffb..98b84c2f 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelBack.9058d5.json @@ -59,4 +59,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes index 2246ecdf..8d1d79f5 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.gmnotes @@ -9,4 +9,4 @@ "agilityIcons": 3, "cycle": "Pistols and Pearls", "extraToken": "Reaction" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json index a4d4ea0f..1f91e42a 100644 --- a/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json +++ b/objects/AllPlayerCards.15bb07/JennyBarnesParallelFront.9058d6.json @@ -59,4 +59,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes index 9ee7e265..daa6aa81 100644 --- a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes +++ b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.gmnotes @@ -14,4 +14,4 @@ } ], "cycle": "Pistols and Pearls" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json index 0310e96a..8803514b 100644 --- a/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json +++ b/objects/AllPlayerCards.15bb07/JennysTwin45s.d87129.json @@ -59,4 +59,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes index 36a62029..68592ce3 100644 --- a/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes +++ b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.gmnotes @@ -5,4 +5,4 @@ "traits": "Task.", "weakness": true, "cycle": "Pistols and Pearls" -} \ No newline at end of file +} diff --git a/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json index e31ce005..8b79b9ce 100644 --- a/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json +++ b/objects/AllPlayerCards.15bb07/SearchingforIzzie.426d29.json @@ -58,4 +58,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/ChallengeScenarios.9f6801.luascriptstate b/objects/ChallengeScenarios.9f6801.luascriptstate index f2d8ef3d..818b2563 100644 --- a/objects/ChallengeScenarios.9f6801.luascriptstate +++ b/objects/ChallengeScenarios.9f6801.luascriptstate @@ -1 +1,95 @@ -{"ml":{"0d6da1":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-28.014},"rot":{"x":0,"y":270.0014,"z":0}},"451eaa":{"lock":false,"pos":{"x":12.252,"y":1.4815,"z":11.986},"rot":{"x":0,"y":269.9999,"z":0}},"5302f2":{"lock":false,"pos":{"x":12.2505,"y":1.4815,"z":-20.0137},"rot":{"x":0,"y":270.0014,"z":0}},"72ab92":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":19.986},"rot":{"x":0,"y":269.9999,"z":0}},"9e73fa":{"lock":false,"pos":{"x":12.2501,"y":1.4815,"z":-12.0137},"rot":{"x":0,"y":269.9998,"z":0}},"cc7eb3":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":3.986},"rot":{"x":0,"y":269.9999,"z":0}},"e2dd57":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-4.014},"rot":{"x":0,"y":270,"z":0}}}} +{ + "ml": { + "0d6da1": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": -28.014 + }, + "rot": { + "x": 0, + "y": 270.0014, + "z": 0 + } + }, + "451eaa": { + "lock": false, + "pos": { + "x": 12.252, + "y": 1.4815, + "z": 11.986 + }, + "rot": { + "x": 0, + "y": 269.9999, + "z": 0 + } + }, + "5302f2": { + "lock": false, + "pos": { + "x": 12.2505, + "y": 1.4815, + "z": -20.0137 + }, + "rot": { + "x": 0, + "y": 270.0014, + "z": 0 + } + }, + "72ab92": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": 19.986 + }, + "rot": { + "x": 0, + "y": 269.9999, + "z": 0 + } + }, + "9e73fa": { + "lock": false, + "pos": { + "x": 12.2501, + "y": 1.4815, + "z": -12.0137 + }, + "rot": { + "x": 0, + "y": 269.9998, + "z": 0 + } + }, + "cc7eb3": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": 3.986 + }, + "rot": { + "x": 0, + "y": 269.9999, + "z": 0 + } + }, + "e2dd57": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": -4.014 + }, + "rot": { + "x": 0, + "y": 270, + "z": 0 + } + } + } +} diff --git a/objects/DeckImporter.a28140.json b/objects/DeckImporter.a28140.json index 2bc4cd7d..e1649fc2 100644 --- a/objects/DeckImporter.a28140.json +++ b/objects/DeckImporter.a28140.json @@ -54,4 +54,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/DeckImporter.a28140.luascriptstate b/objects/DeckImporter.a28140.luascriptstate index 77353414..d5ef0d7b 100644 --- a/objects/DeckImporter.a28140.luascriptstate +++ b/objects/DeckImporter.a28140.luascriptstate @@ -6,4 +6,4 @@ "redDeck": "", "standalone": false, "whiteDeck": "" -} \ No newline at end of file +} diff --git a/objects/FlexTableControl.bd69bd.luascriptstate b/objects/FlexTableControl.bd69bd.luascriptstate index 8c505fac..c6b87b5f 100644 --- a/objects/FlexTableControl.bd69bd.luascriptstate +++ b/objects/FlexTableControl.bd69bd.luascriptstate @@ -1 +1,20 @@ -{"cd":{"move":false,"scale":false},"tid":[{"name":"Felt - Grey","url":"https://i.imgur.com/N0O6aqj.jpg"},{"name":"Wood","url":"https://i.imgur.com/iOFFsGh.jpg"},{"name":"Wood 2","url":"https://i.imgur.com/SQ2t01d.jpg"}]} +{ + "cd": { + "move": false, + "scale": false + }, + "tid": [ + { + "name": "Felt - Grey", + "url": "https://i.imgur.com/N0O6aqj.jpg" + }, + { + "name": "Wood", + "url": "https://i.imgur.com/iOFFsGh.jpg" + }, + { + "name": "Wood 2", + "url": "https://i.imgur.com/SQ2t01d.jpg" + } + ] +} diff --git a/objects/LearntoPlay.4ff3b0.json b/objects/LearntoPlay.4ff3b0.json index a14bf08c..12a73b00 100644 --- a/objects/LearntoPlay.4ff3b0.json +++ b/objects/LearntoPlay.4ff3b0.json @@ -48,4 +48,4 @@ }, "Value": 0, "XmlUI": "" -} \ No newline at end of file +} diff --git a/objects/LuaScriptState.luascriptstate b/objects/LuaScriptState.luascriptstate index 62279893..44534c67 100644 --- a/objects/LuaScriptState.luascriptstate +++ b/objects/LuaScriptState.luascriptstate @@ -1 +1,29 @@ -{"acknowledgedUpgradeVersions":[],"chaosTokensGUID":[],"optionPanel":{"cardLanguage":"en","changePlayAreaImage":false,"enableCardHelpers":true,"playAreaConnectionColor":{"a":1,"b":0.4,"g":0.4,"r":0.4},"playAreaConnections":true,"playAreaSnapTags":true,"showAttachmentHelper":false,"showCleanUpHelper":false,"showCYOA":false,"showDisplacementTool":false,"showDrawButton":false,"showHandHelper":false,"showSearchAssistant":false,"showTitleSplash":true,"useClassTexture":true,"useClueClickers":false,"useResourceCounters":"disabled","useSnapTags":true}} +{ + "acknowledgedUpgradeVersions": [], + "chaosTokensGUID": [], + "optionPanel": { + "cardLanguage": "en", + "changePlayAreaImage": false, + "enableCardHelpers": true, + "playAreaConnectionColor": { + "a": 1, + "b": 0.4, + "g": 0.4, + "r": 0.4 + }, + "playAreaConnections": true, + "playAreaSnapTags": true, + "showAttachmentHelper": false, + "showCYOA": false, + "showCleanUpHelper": false, + "showDisplacementTool": false, + "showDrawButton": false, + "showHandHelper": false, + "showSearchAssistant": false, + "showTitleSplash": true, + "useClassTexture": true, + "useClueClickers": false, + "useResourceCounters": "disabled", + "useSnapTags": true + } +} diff --git a/objects/NavigationOverlayHandler.797ede.luascriptstate b/objects/NavigationOverlayHandler.797ede.luascriptstate index 1bee11ea..a6b5d308 100644 --- a/objects/NavigationOverlayHandler.797ede.luascriptstate +++ b/objects/NavigationOverlayHandler.797ede.luascriptstate @@ -1 +1,68 @@ -{"claims":{"Black":[],"Blue":[],"Brown":[],"Green":[],"Grey":[],"Orange":[],"Pink":[],"Purple":[],"Red":[],"Teal":[],"White":[],"Yellow":[]},"distance":[],"pitch":[],"visibility":{"Black":{"full":false,"play":false},"Blue":{"full":false,"play":false},"Brown":{"full":false,"play":false},"Green":{"full":false,"play":false},"Grey":{"full":false,"play":false},"Orange":{"full":false,"play":false},"Pink":{"full":false,"play":false},"Purple":{"full":false,"play":false},"Red":{"full":false,"play":false},"Teal":{"full":false,"play":false},"White":{"full":false,"play":false},"Yellow":{"full":false,"play":false}}} +{ + "claims": { + "Black": [], + "Blue": [], + "Brown": [], + "Green": [], + "Grey": [], + "Orange": [], + "Pink": [], + "Purple": [], + "Red": [], + "Teal": [], + "White": [], + "Yellow": [] + }, + "distance": [], + "pitch": [], + "visibility": { + "Black": { + "full": false, + "play": false + }, + "Blue": { + "full": false, + "play": false + }, + "Brown": { + "full": false, + "play": false + }, + "Green": { + "full": false, + "play": false + }, + "Grey": { + "full": false, + "play": false + }, + "Orange": { + "full": false, + "play": false + }, + "Pink": { + "full": false, + "play": false + }, + "Purple": { + "full": false, + "play": false + }, + "Red": { + "full": false, + "play": false + }, + "Teal": { + "full": false, + "play": false + }, + "White": { + "full": false, + "play": false + }, + "Yellow": { + "full": false, + "play": false + } + } +} diff --git a/objects/PatchNotes.f47225.luascriptstate b/objects/PatchNotes.f47225.luascriptstate index 131294fc..4e8546e5 100644 --- a/objects/PatchNotes.f47225.luascriptstate +++ b/objects/PatchNotes.f47225.luascriptstate @@ -1 +1,144 @@ -{"checks":[],"decals":[{"locked":false,"name":"Arkham SCE logo","pos":{"x":3.1,"y":2.2},"rotation":0,"scale":{"x":"2","y":"2"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2501268517218943111/803E57A7B3E9765DF342050EE6C71D69473A7388/"},{"locked":false,"name":"Bootlegger Finn","pos":{"x":3.5,"y":-1.89},"rotation":"25","scale":{"x":"1","y":"1"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2037357792052848566/5DA900C430E97D3DFF2C9B8A3DB1CB2271791FC7/"},{"locked":false,"name":"black bar","pos":{"x":0,"y":-2.7},"rotation":0,"scale":{"x":"8","y":"0.03"},"tooltip":"None","url":"https://steamusercontent-a.akamaihd.net/ugc/2501268517219098388/0936FEE03B410319658B5E05DB5D486CEDDE98F5/"}],"fields":[{"align":3,"array":{"x":"1","y":"1"},"counter":"False","distance":{"x":"1","y":"1"},"fieldColor":{"a":0,"b":1,"g":1,"r":1},"font":"200","locked":false,"name":"Patch Notes","pos":{"x":"0","y":-2.9},"role":"Normal Field","size":{"x":"3750","y":"250"},"textColor":{"a":1,"b":0,"g":0,"r":0},"tooltip":"None","value":["Arkham Horror LCG SCE 3.9.1 - 08/01/2024"]},{"align":2,"array":{"x":"1","y":1},"distance":{"x":"1","y":"1"},"fieldColor":{"a":0,"b":1,"g":1,"r":1},"font":"89","locked":false,"name":"Details","pos":{"x":"0","y":0.4},"role":"Nothing","size":{"x":"3750","y":"2750"},"textColor":{"a":1,"b":0,"g":0,"r":0},"tooltip":"None","value":["Thanks for downloading! We're happy to present you a rather big update this time :-)\n\nNew things\n- updated note card for patch notes (bless Marum for his awesome tool!)\n- automated discarding for Patrice\n- confirmation dialog for discard hotkey (e.g. for locations)\n- helpers for cards that redraw tokens and Kohaku\n- displaying of token count for cards that seal tokens\r\n- new action / ability tokens (replacing the old ones)\r\n- option to enable all card helpers (e.g. Heavy Furs)\r\n- option to load class-colored playermat backgrounds\n- coloring for player names in broadcasts\n- right-click option for RBW button on Player Card Panel to specify trait(s)\n\nUpdates\r\n- performed a small clean up of the bottom corners of the table\n- \"Numpad 9\" to rearranges present tokens (on top of adding a resource)\n- Scroll of Secrets context menu helper now displays player names instead of colors\r\n- Player Card Panel can display fan-made cards with a new \"custom\" cycle button)\n- updated Family Inheritance helper to a proper UI\n- \"Discard object\" gamekey works for selected objects\r\n- updated a bunch of tools like Clean Up Helper, Drawing Tool,\nHand Helper, Token Arranger and Search Assistant\n\nFixes\r\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 and file size improvements (e.g. by adding download\nfunctions for CYOA campaign guides and Arkham Fantasy standees)"]}],"flip":"False","height":"0.1","locks":{"checks":false,"decals":false,"fields":false},"nudgeDistance":0.1,"scale":{"x":"0.3","y":"0.3"},"sheetLocked":true} +{ + "checks": [], + "decals": [ + { + "locked": false, + "name": "Arkham SCE logo", + "pos": { + "x": 3.1, + "y": 2.2 + }, + "rotation": 0, + "scale": { + "x": "2", + "y": "2" + }, + "tooltip": "None", + "url": "https://steamusercontent-a.akamaihd.net/ugc/2501268517218943111/803E57A7B3E9765DF342050EE6C71D69473A7388/" + }, + { + "locked": false, + "name": "Bootlegger Finn", + "pos": { + "x": 3.5, + "y": -1.89 + }, + "rotation": "25", + "scale": { + "x": "1", + "y": "1" + }, + "tooltip": "None", + "url": "https://steamusercontent-a.akamaihd.net/ugc/2037357792052848566/5DA900C430E97D3DFF2C9B8A3DB1CB2271791FC7/" + }, + { + "locked": false, + "name": "black bar", + "pos": { + "x": 0, + "y": -2.7 + }, + "rotation": 0, + "scale": { + "x": "8", + "y": "0.03" + }, + "tooltip": "None", + "url": "https://steamusercontent-a.akamaihd.net/ugc/2501268517219098388/0936FEE03B410319658B5E05DB5D486CEDDE98F5/" + } + ], + "fields": [ + { + "align": 3, + "array": { + "x": "1", + "y": "1" + }, + "counter": "False", + "distance": { + "x": "1", + "y": "1" + }, + "fieldColor": { + "a": 0, + "b": 1, + "g": 1, + "r": 1 + }, + "font": "200", + "locked": false, + "name": "Patch Notes", + "pos": { + "x": "0", + "y": -2.9 + }, + "role": "Normal Field", + "size": { + "x": "3750", + "y": "250" + }, + "textColor": { + "a": 1, + "b": 0, + "g": 0, + "r": 0 + }, + "tooltip": "None", + "value": [ + "Arkham Horror LCG SCE 3.9.1 - 08/01/2024" + ] + }, + { + "align": 2, + "array": { + "x": "1", + "y": 1 + }, + "distance": { + "x": "1", + "y": "1" + }, + "fieldColor": { + "a": 0, + "b": 1, + "g": 1, + "r": 1 + }, + "font": "75", + "locked": false, + "name": "Details", + "pos": { + "x": "0", + "y": 0.4 + }, + "role": "Nothing", + "size": { + "x": "3750", + "y": "2750" + }, + "textColor": { + "a": 1, + "b": 0, + "g": 0, + "r": 0 + }, + "tooltip": "None", + "value": [ + "Minor release notes (3.9.1)\n- Added Parallel Jenny!\r\n- Re-Added Learn to Play PDF to table\n- Fixed bug with \"Remove one Use\" gamekey\n- Updated clue replenishing to locations via hotkey (Numpad 8)\r\r\n- Updated Deck Importer (arkham.build support and better RBW drawing)\n- Updated Search Assistant to properly handle a revealed top card (looking at Norman)\n\nNew things\n- updated note card for patch notes (bless Marum for his awesome tool!)\n- automated discarding for Patrice\n- confirmation dialog for discard hotkey (e.g. for locations)\n- helpers for cards that redraw tokens and Kohaku\n- displaying of token count for cards that seal tokens\r\n- new action / ability tokens (replacing the old ones)\r\n- option to enable all card helpers (e.g. Heavy Furs)\r\n- option to load class-colored playermat backgrounds\n- coloring for player names in broadcasts\n- right-click option for RBW button on Player Card Panel to specify trait(s)\n\nUpdates\r\n- performed a small clean up of the bottom corners of the table\n- \"Numpad 9\" to rearranges present tokens (on top of adding a resource)\n- Scroll of Secrets context menu helper now displays player names instead of colors\r\n- Player Card Panel can display fan-made cards with a new \"custom\" cycle button)\n- updated Family Inheritance helper to a proper UI\n- \"Discard object\" gamekey works for selected objects\r\n- updated a bunch of tools like Clean Up Helper, Drawing Tool,\nHand Helper, Token Arranger and Search Assistant\n\nFixes\r\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 and file size improvements (e.g. by adding download\nfunctions for CYOA campaign guides and Arkham Fantasy standees)" + ] + } + ], + "flip": "False", + "height": "0.1", + "locks": { + "checks": false, + "decals": false, + "fields": false + }, + "nudgeDistance": "0.1", + "scale": { + "x": "0.3", + "y": "0.3" + }, + "sheetLocked": true +} diff --git a/objects/PlayArea.721ba2.luascriptstate b/objects/PlayArea.721ba2.luascriptstate index b5fdd049..759b57ea 100644 --- a/objects/PlayArea.721ba2.luascriptstate +++ b/objects/PlayArea.721ba2.luascriptstate @@ -1 +1,10 @@ -{"connectionColor":{"a":1,"b":0.4,"g":0.4,"r":0.4},"connectionsEnabled":true,"trackedLocations":[]} +{ + "connectionColor": { + "a": 1, + "b": 0.4, + "g": 0.4, + "r": 0.4 + }, + "connectionsEnabled": true, + "trackedLocations": [] +} diff --git a/objects/Playermat1White.8b081b.luascriptstate b/objects/Playermat1White.8b081b.luascriptstate index 37f3fb4a..de27bf72 100644 --- a/objects/Playermat1White.8b081b.luascriptstate +++ b/objects/Playermat1White.8b081b.luascriptstate @@ -1 +1,23 @@ -{"activeInvestigatorClass":"Neutral","activeInvestigatorId":"00000","isClassTextureEnabled":true,"isDrawButtonVisible":false,"playerColor":"White","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]} +{ + "activeInvestigatorClass": "Neutral", + "activeInvestigatorId": "00000", + "isClassTextureEnabled": true, + "isDrawButtonVisible": false, + "playerColor": "White", + "slotData": [ + "any", + "any", + "any", + "Tarot", + "Hand (left)", + "Hand (right)", + "Ally", + "any", + "any", + "any", + "Accessory", + "Arcane", + "Arcane", + "Body" + ] +} diff --git a/objects/Playermat2Orange.bd0ff4.luascriptstate b/objects/Playermat2Orange.bd0ff4.luascriptstate index 82227cf3..c9eb13f1 100644 --- a/objects/Playermat2Orange.bd0ff4.luascriptstate +++ b/objects/Playermat2Orange.bd0ff4.luascriptstate @@ -1 +1,23 @@ -{"activeInvestigatorClass":"Neutral","activeInvestigatorId":"00000","isClassTextureEnabled":true,"isDrawButtonVisible":false,"playerColor":"Orange","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]} +{ + "activeInvestigatorClass": "Neutral", + "activeInvestigatorId": "00000", + "isClassTextureEnabled": true, + "isDrawButtonVisible": false, + "playerColor": "Orange", + "slotData": [ + "any", + "any", + "any", + "Tarot", + "Hand (left)", + "Hand (right)", + "Ally", + "any", + "any", + "any", + "Accessory", + "Arcane", + "Arcane", + "Body" + ] +} diff --git a/objects/Playermat3Green.383d8b.luascriptstate b/objects/Playermat3Green.383d8b.luascriptstate index 3f44af1d..23975d1c 100644 --- a/objects/Playermat3Green.383d8b.luascriptstate +++ b/objects/Playermat3Green.383d8b.luascriptstate @@ -1 +1,23 @@ -{"activeInvestigatorClass":"Neutral","activeInvestigatorId":"00000","isClassTextureEnabled":true,"isDrawButtonVisible":false,"playerColor":"Green","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]} +{ + "activeInvestigatorClass": "Neutral", + "activeInvestigatorId": "00000", + "isClassTextureEnabled": true, + "isDrawButtonVisible": false, + "playerColor": "Green", + "slotData": [ + "any", + "any", + "any", + "Tarot", + "Hand (left)", + "Hand (right)", + "Ally", + "any", + "any", + "any", + "Accessory", + "Arcane", + "Arcane", + "Body" + ] +} diff --git a/objects/Playermat4Red.0840d5.luascriptstate b/objects/Playermat4Red.0840d5.luascriptstate index 74f4e1f9..41fe4e2c 100644 --- a/objects/Playermat4Red.0840d5.luascriptstate +++ b/objects/Playermat4Red.0840d5.luascriptstate @@ -1 +1,23 @@ -{"activeInvestigatorClass":"Neutral","activeInvestigatorId":"00000","isClassTextureEnabled":true,"isDrawButtonVisible":false,"playerColor":"Red","slotData":["any","any","any","Tarot","Hand (left)","Hand (right)","Ally","any","any","any","Accessory","Arcane","Arcane","Body"]} +{ + "activeInvestigatorClass": "Neutral", + "activeInvestigatorId": "00000", + "isClassTextureEnabled": true, + "isDrawButtonVisible": false, + "playerColor": "Red", + "slotData": [ + "any", + "any", + "any", + "Tarot", + "Hand (left)", + "Hand (right)", + "Ally", + "any", + "any", + "any", + "Accessory", + "Arcane", + "Arcane", + "Body" + ] +} diff --git a/objects/StandaloneScenarios.77a5f9.luascriptstate b/objects/StandaloneScenarios.77a5f9.luascriptstate index 38c47577..cb9ff48f 100644 --- a/objects/StandaloneScenarios.77a5f9.luascriptstate +++ b/objects/StandaloneScenarios.77a5f9.luascriptstate @@ -1 +1,134 @@ -{"ml":{"01d780":{"lock":false,"pos":{"x":12.252,"y":1.4815,"z":11.986},"rot":{"x":0,"y":270.0001,"z":0}},"0dce91":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-28.014},"rot":{"x":0,"y":269.9792,"z":0}},"23dd51":{"lock":false,"pos":{"x":12.249,"y":1.4815,"z":35.986},"rot":{"x":0,"y":270,"z":0}},"3c4f3c":{"lock":false,"pos":{"x":12.251,"y":1.4815,"z":-20.014},"rot":{"x":0,"y":269.9867,"z":0}},"4c173f":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":3.986},"rot":{"x":0,"y":269.9998,"z":0}},"4dee5a":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-4.014},"rot":{"x":0,"y":269.9999,"z":0}},"d02940":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":-36.014},"rot":{"x":0,"y":270.0045,"z":0}},"db7039":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":27.986},"rot":{"x":0,"y":270.0001,"z":0}},"ee987d":{"lock":false,"pos":{"x":12.25,"y":1.4815,"z":19.986},"rot":{"x":0,"y":270.0001,"z":0}},"fc7674":{"lock":false,"pos":{"x":12.247,"y":1.4815,"z":-12.016},"rot":{"x":0,"y":270.0001,"z":0}}}} +{ + "ml": { + "01d780": { + "lock": false, + "pos": { + "x": 12.252, + "y": 1.4815, + "z": 11.986 + }, + "rot": { + "x": 0, + "y": 270.0001, + "z": 0 + } + }, + "0dce91": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": -28.014 + }, + "rot": { + "x": 0, + "y": 269.9792, + "z": 0 + } + }, + "23dd51": { + "lock": false, + "pos": { + "x": 12.249, + "y": 1.4815, + "z": 35.986 + }, + "rot": { + "x": 0, + "y": 270, + "z": 0 + } + }, + "3c4f3c": { + "lock": false, + "pos": { + "x": 12.251, + "y": 1.4815, + "z": -20.014 + }, + "rot": { + "x": 0, + "y": 269.9867, + "z": 0 + } + }, + "4c173f": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": 3.986 + }, + "rot": { + "x": 0, + "y": 269.9998, + "z": 0 + } + }, + "4dee5a": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": -4.014 + }, + "rot": { + "x": 0, + "y": 269.9999, + "z": 0 + } + }, + "d02940": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": -36.014 + }, + "rot": { + "x": 0, + "y": 270.0045, + "z": 0 + } + }, + "db7039": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": 27.986 + }, + "rot": { + "x": 0, + "y": 270.0001, + "z": 0 + } + }, + "ee987d": { + "lock": false, + "pos": { + "x": 12.25, + "y": 1.4815, + "z": 19.986 + }, + "rot": { + "x": 0, + "y": 270.0001, + "z": 0 + } + }, + "fc7674": { + "lock": false, + "pos": { + "x": 12.247, + "y": 1.4815, + "z": -12.016 + }, + "rot": { + "x": 0, + "y": 270.0001, + "z": 0 + } + } + } +} diff --git a/objects/TokenArranger.022907.luascriptstate b/objects/TokenArranger.022907.luascriptstate index 0c189c64..86f2ec90 100644 --- a/objects/TokenArranger.022907.luascriptstate +++ b/objects/TokenArranger.022907.luascriptstate @@ -1 +1,46 @@ -{"includeDrawnTokens":true,"percentage":false,"tokenPrecedence":{"":[0,11],"Auto-fail":[-100,7],"Bless":[110,8],"Cultist":[-2,4],"Curse":[-110,9],"Elder Sign":[100,2],"Elder Thing":[-4,6],"Frost":[-105,10],"Skull":[-1,3],"Tablet":[-3,5]}} +{ + "includeDrawnTokens": true, + "percentage": false, + "tokenPrecedence": { + "": [ + 0, + 11 + ], + "Auto-fail": [ + -100, + 7 + ], + "Bless": [ + 110, + 8 + ], + "Cultist": [ + -2, + 4 + ], + "Curse": [ + -110, + 9 + ], + "Elder Sign": [ + 100, + 2 + ], + "Elder Thing": [ + -4, + 6 + ], + "Frost": [ + -105, + 10 + ], + "Skull": [ + -1, + 3 + ], + "Tablet": [ + -3, + 5 + ] + } +}