Merge branch 'main' into importer-exporter
This commit is contained in:
commit
06faafeab1
@ -177,7 +177,7 @@
|
|||||||
"Decoration-Ammo.d35ee9",
|
"Decoration-Ammo.d35ee9",
|
||||||
"VictoryDisplay.6ccd6d",
|
"VictoryDisplay.6ccd6d",
|
||||||
"BuyersGuide.b5ecc1",
|
"BuyersGuide.b5ecc1",
|
||||||
"OptionPanelSource.830bd0",
|
"ObjectSourceBag.830bd0",
|
||||||
"SoundCube.3c988f",
|
"SoundCube.3c988f",
|
||||||
"TokenSpawningReference.f8b3a7",
|
"TokenSpawningReference.f8b3a7",
|
||||||
"3DText.d628cc",
|
"3DText.d628cc",
|
||||||
|
@ -20,8 +20,7 @@
|
|||||||
"SecretObjectivesUltimatums.b2077d",
|
"SecretObjectivesUltimatums.b2077d",
|
||||||
"UnderworldMarketHelper.3650ea",
|
"UnderworldMarketHelper.3650ea",
|
||||||
"Auto-failCounter.a9a321",
|
"Auto-failCounter.a9a321",
|
||||||
"ElderSignCounter.e62cb5",
|
"ElderSignCounter.e62cb5"
|
||||||
"AdditionalVictoryPoints.958bc0"
|
|
||||||
],
|
],
|
||||||
"ContainedObjects_path": "Fan-MadeAccessories.aa8b38",
|
"ContainedObjects_path": "Fan-MadeAccessories.aa8b38",
|
||||||
"CustomMesh": {
|
"CustomMesh": {
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
},
|
},
|
||||||
"Autoraise": true,
|
"Autoraise": true,
|
||||||
"ColorDiffuse": {
|
"ColorDiffuse": {
|
||||||
"b": 1,
|
"b": 0,
|
||||||
"g": 1,
|
"g": 0,
|
||||||
"r": 1
|
"r": 0
|
||||||
},
|
},
|
||||||
"CustomImage": {
|
"CustomImage": {
|
||||||
"CustomTile": {
|
"CustomTile": {
|
||||||
@ -49,9 +49,9 @@
|
|||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
||||||
"scaleX": 0.81,
|
"scaleX": 1.5,
|
||||||
"scaleY": 1,
|
"scaleY": 1,
|
||||||
"scaleZ": 0.81
|
"scaleZ": 1.5
|
||||||
},
|
},
|
||||||
"Value": 0,
|
"Value": 0,
|
||||||
"XmlUI": ""
|
"XmlUI": ""
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
},
|
},
|
||||||
"Autoraise": true,
|
"Autoraise": true,
|
||||||
"ColorDiffuse": {
|
"ColorDiffuse": {
|
||||||
"b": 1,
|
"b": 0,
|
||||||
"g": 1,
|
"g": 0,
|
||||||
"r": 1
|
"r": 0
|
||||||
},
|
},
|
||||||
"CustomImage": {
|
"CustomImage": {
|
||||||
"CustomTile": {
|
"CustomTile": {
|
||||||
@ -49,9 +49,9 @@
|
|||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
||||||
"scaleX": 0.81,
|
"scaleX": 1.5,
|
||||||
"scaleY": 1,
|
"scaleY": 1,
|
||||||
"scaleZ": 0.81
|
"scaleZ": 1.5
|
||||||
},
|
},
|
||||||
"Value": 0,
|
"Value": 0,
|
||||||
"XmlUI": ""
|
"XmlUI": ""
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"r": 0.70588
|
"r": 0.70588
|
||||||
},
|
},
|
||||||
"ContainedObjects_order": [
|
"ContainedObjects_order": [
|
||||||
|
"AdditionalVictoryPoints.958bc0",
|
||||||
"CYOACampaignGuides.e87ea2",
|
"CYOACampaignGuides.e87ea2",
|
||||||
"AttachmentHelper.7f4976",
|
"AttachmentHelper.7f4976",
|
||||||
"SearchAssistant.17aed0",
|
"SearchAssistant.17aed0",
|
||||||
@ -22,8 +23,8 @@
|
|||||||
"DisplacementTool.0f1374",
|
"DisplacementTool.0f1374",
|
||||||
"CleanUpHelper.26cf4b"
|
"CleanUpHelper.26cf4b"
|
||||||
],
|
],
|
||||||
"ContainedObjects_path": "OptionPanelSource.830bd0",
|
"ContainedObjects_path": "ObjectSourceBag.830bd0",
|
||||||
"Description": "Contains the objects that are spawnable via option panel",
|
"Description": "Contains objects that are spawnable via scripting like the option panel",
|
||||||
"DragSelectable": true,
|
"DragSelectable": true,
|
||||||
"GMNotes": "",
|
"GMNotes": "",
|
||||||
"GUID": "830bd0",
|
"GUID": "830bd0",
|
||||||
@ -40,7 +41,7 @@
|
|||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"MeshIndex": -1,
|
"MeshIndex": -1,
|
||||||
"Name": "Bag",
|
"Name": "Bag",
|
||||||
"Nickname": "OptionPanel Source",
|
"Nickname": "Object Source Bag",
|
||||||
"Snap": true,
|
"Snap": true,
|
||||||
"Sticky": true,
|
"Sticky": true,
|
||||||
"Tooltip": true,
|
"Tooltip": true,
|
@ -33,8 +33,8 @@
|
|||||||
"IgnoreFoW": false,
|
"IgnoreFoW": false,
|
||||||
"LayoutGroupSortIndex": 0,
|
"LayoutGroupSortIndex": 0,
|
||||||
"Locked": false,
|
"Locked": false,
|
||||||
|
"LuaScript": "require(\"accessories/AdditionalVictoryPointsCard\")",
|
||||||
"LuaScriptState": "{\"notes\":\"Click to type\",\"vp\":1}",
|
"LuaScriptState": "{\"notes\":\"Click to type\",\"vp\":1}",
|
||||||
"LuaScript_path": "Fan-MadeAccessories.aa8b38/AdditionalVictoryPoints.958bc0.ttslua",
|
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Name": "CardCustom",
|
"Name": "CardCustom",
|
||||||
"Nickname": "Additional Victory Points",
|
"Nickname": "Additional Victory Points",
|
||||||
@ -46,9 +46,9 @@
|
|||||||
],
|
],
|
||||||
"Tooltip": true,
|
"Tooltip": true,
|
||||||
"Transform": {
|
"Transform": {
|
||||||
"posX": -61.591,
|
"posX": -4,
|
||||||
"posY": 4.834,
|
"posY": 2.5,
|
||||||
"posZ": -74.678,
|
"posZ": 41,
|
||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
@ -33,7 +33,7 @@
|
|||||||
"IgnoreFoW": false,
|
"IgnoreFoW": false,
|
||||||
"LayoutGroupSortIndex": 0,
|
"LayoutGroupSortIndex": 0,
|
||||||
"Locked": true,
|
"Locked": true,
|
||||||
"LuaScript": "require(\"playercards/CardSearch\")",
|
"LuaScript": "require(\"playercards/Search-A-Card\")",
|
||||||
"LuaScriptState": "[true,false,\"\"]",
|
"LuaScriptState": "[true,false,\"\"]",
|
||||||
"MeasureMovement": false,
|
"MeasureMovement": false,
|
||||||
"Name": "Custom_Tile",
|
"Name": "Custom_Tile",
|
||||||
@ -48,9 +48,9 @@
|
|||||||
"rotX": 0,
|
"rotX": 0,
|
||||||
"rotY": 270,
|
"rotY": 270,
|
||||||
"rotZ": 0,
|
"rotZ": 0,
|
||||||
"scaleX": 4,
|
"scaleX": 4.5,
|
||||||
"scaleY": 1,
|
"scaleY": 1,
|
||||||
"scaleZ": 4
|
"scaleZ": 4.5
|
||||||
},
|
},
|
||||||
"Value": 0,
|
"Value": 0,
|
||||||
"XmlUI": ""
|
"XmlUI": ""
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
-- Additional Victory Point Card
|
|
||||||
local victoryDisplayApi = require("core/VictoryDisplayApi")
|
local victoryDisplayApi = require("core/VictoryDisplayApi")
|
||||||
|
|
||||||
local MIN_VALUE = -10
|
local MIN_VALUE = -10
|
@ -90,6 +90,7 @@ function broadcastDoom(val)
|
|||||||
local doomInPlayCounter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DoomInPlayCounter")
|
local doomInPlayCounter = guidReferenceApi.getObjectByOwnerAndType("Mythos", "DoomInPlayCounter")
|
||||||
if doomInPlayCounter and md.subtractDoomInPlay then
|
if doomInPlayCounter and md.subtractDoomInPlay then
|
||||||
doomInPlayCounter.call("toggleSubtractDoom", true)
|
doomInPlayCounter.call("toggleSubtractDoom", true)
|
||||||
|
printToAll("Right-click the small 'Doom in Play' counter and select 'Toggle Doom Mode' to change this.")
|
||||||
end
|
end
|
||||||
local doomInPlay = doomInPlayCounter and doomInPlayCounter.call("getDoomCount") or 0
|
local doomInPlay = doomInPlayCounter and doomInPlayCounter.call("getDoomCount") or 0
|
||||||
local totalDoom = val + doomInPlay
|
local totalDoom = val + doomInPlay
|
||||||
|
@ -75,7 +75,7 @@ local GuidReferences = {
|
|||||||
MasterClueCounter = "4a3aa4",
|
MasterClueCounter = "4a3aa4",
|
||||||
MythosArea = "9f334f",
|
MythosArea = "9f334f",
|
||||||
NavigationOverlayHandler = "797ede",
|
NavigationOverlayHandler = "797ede",
|
||||||
OptionPanelSource = "830bd0",
|
ObjectSourceBag = "830bd0",
|
||||||
PlaceholderBoxDummy = "a93466",
|
PlaceholderBoxDummy = "a93466",
|
||||||
PlayArea = "721ba2",
|
PlayArea = "721ba2",
|
||||||
PlayAreaImageSelector = "b7b45b",
|
PlayAreaImageSelector = "b7b45b",
|
||||||
|
@ -16,10 +16,10 @@ function onLoad(savedData)
|
|||||||
-- set position of label depending on object
|
-- set position of label depending on object
|
||||||
if tokenType == "damage" then
|
if tokenType == "damage" then
|
||||||
position = { 0.1, -0.07, 0.1 }
|
position = { 0.1, -0.07, 0.1 }
|
||||||
rotation = { 180, 180, 0}
|
rotation = { 180, 180, 0 }
|
||||||
elseif tokenType == "horror" then
|
elseif tokenType == "horror" then
|
||||||
position = { -0.025, -0.07, 0.025 }
|
position = { -0.025, -0.07, 0.025 }
|
||||||
rotation = { 180, 180, 0}
|
rotation = { 180, 180, 0 }
|
||||||
elseif tokenType == "resource" or tokenType == "resourceCounter" then
|
elseif tokenType == "resource" or tokenType == "resourceCounter" then
|
||||||
position = { 0, 0.06, 0.1 }
|
position = { 0, 0.06, 0.1 }
|
||||||
elseif tokenType == "ElderSignCounter" or tokenType == "AutofailCounter" then
|
elseif tokenType == "ElderSignCounter" or tokenType == "AutofailCounter" then
|
||||||
|
@ -1722,7 +1722,7 @@ end
|
|||||||
---@param position tts__Vector Desired position of the object
|
---@param position tts__Vector Desired position of the object
|
||||||
---@param rotation? tts__Vector Desired rotation of the object (defaults to object's rotation)
|
---@param rotation? tts__Vector Desired rotation of the object (defaults to object's rotation)
|
||||||
function spawnHelperObject(name, position, rotation)
|
function spawnHelperObject(name, position, rotation)
|
||||||
local sourceBag = guidReferenceApi.getObjectByOwnerAndType("Mythos", "OptionPanelSource")
|
local sourceBag = guidReferenceApi.getObjectByOwnerAndType("Mythos", "ObjectSourceBag")
|
||||||
|
|
||||||
-- error handling for missing sourceBag
|
-- error handling for missing sourceBag
|
||||||
if not sourceBag then
|
if not sourceBag then
|
||||||
|
@ -54,6 +54,14 @@ function onLoad()
|
|||||||
buttonParameters.position.x = 1.5
|
buttonParameters.position.x = 1.5
|
||||||
self.createButton(buttonParameters)
|
self.createButton(buttonParameters)
|
||||||
|
|
||||||
|
-- index 5: spawn additional VP card button
|
||||||
|
buttonParameters.label = "+"
|
||||||
|
buttonParameters.click_function = "spawnAdditionalVP"
|
||||||
|
buttonParameters.tooltip = "Spawn a card to track additional earned VP"
|
||||||
|
buttonParameters.color = { 86 / 255, 90 / 255, 233 / 255 }
|
||||||
|
buttonParameters.position.x = -1.82
|
||||||
|
self.createButton(buttonParameters)
|
||||||
|
|
||||||
-- update the display label once
|
-- update the display label once
|
||||||
Wait.time(updateCount, 1)
|
Wait.time(updateCount, 1)
|
||||||
end
|
end
|
||||||
@ -200,7 +208,8 @@ end
|
|||||||
function highlightMissingData()
|
function highlightMissingData()
|
||||||
self.editButton({
|
self.editButton({
|
||||||
index = 3,
|
index = 3,
|
||||||
tooltip = (highlightMissing and "Enable" or "Disable") .. " highlighting of cards without metadata (VP on these is not counted)." })
|
tooltip = (highlightMissing and "En" or "Dis") .. "able highlighting of cards without metadata (VP on these is not counted)."
|
||||||
|
})
|
||||||
for _, obj in pairs(missingData) do
|
for _, obj in pairs(missingData) do
|
||||||
if obj ~= nil then
|
if obj ~= nil then
|
||||||
if highlightMissing then
|
if highlightMissing then
|
||||||
@ -233,6 +242,16 @@ function highlightCountedVP()
|
|||||||
highlightCounted = not highlightCounted
|
highlightCounted = not highlightCounted
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function spawnAdditionalVP()
|
||||||
|
local sourceBag = guidReferenceApi.getObjectByOwnerAndType("Mythos", "ObjectSourceBag")
|
||||||
|
for _, objData in ipairs(sourceBag.getData().ContainedObjects) do
|
||||||
|
if objData["Nickname"] == "Additional Victory Points" then
|
||||||
|
placeCard(spawnObjectData({ data = objData }))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- places the provided card in the first empty spot
|
-- places the provided card in the first empty spot
|
||||||
function placeCard(card)
|
function placeCard(card)
|
||||||
local name = card.getName() or "Unnamed card"
|
local name = card.getName() or "Unnamed card"
|
||||||
|
@ -11,15 +11,15 @@ BUTTON_LABELS["search"][true] = "Name equals search term"
|
|||||||
BUTTON_LABELS["search"][false] = "Name contains search term"
|
BUTTON_LABELS["search"][false] = "Name contains search term"
|
||||||
|
|
||||||
local inputParameters = {}
|
local inputParameters = {}
|
||||||
inputParameters.label = "Click to enter card name"
|
inputParameters.label = "Enter name / ID"
|
||||||
inputParameters.input_function = "input_func"
|
inputParameters.input_function = "input_func"
|
||||||
inputParameters.function_owner = self
|
inputParameters.function_owner = self
|
||||||
inputParameters.alignment = 2
|
inputParameters.alignment = 2
|
||||||
inputParameters.position = { x = 0, y = 0.1, z = -0.62 }
|
inputParameters.position = { x = 0, y = 0.1, z = -0.6 }
|
||||||
inputParameters.width = 3750
|
inputParameters.width = 3500
|
||||||
inputParameters.height = 380
|
inputParameters.height = 450
|
||||||
inputParameters.font_size = 350
|
inputParameters.font_size = 400
|
||||||
inputParameters.scale = { 0.1, 1, 0.1 }
|
inputParameters.scale = { 0.12, 1, 0.12 }
|
||||||
inputParameters.color = { 0.9, 0.7, 0.5 }
|
inputParameters.color = { 0.9, 0.7, 0.5 }
|
||||||
inputParameters.font_color = { 0, 0, 0 }
|
inputParameters.font_color = { 0, 0, 0 }
|
||||||
|
|
||||||
@ -103,12 +103,14 @@ function startSearch()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if the search string is a number, assume it's an ID and spawn the card directly
|
-- if the search string doesn't contain whitespace, attempt to treat it as ID
|
||||||
if tonumber(inputParameters.value) then
|
if not string.find(inputParameters.value, "%s") then
|
||||||
local singleCard = allCardsBagApi.getCardById(inputParameters.value)
|
local singleCard = allCardsBagApi.getCardById(inputParameters.value)
|
||||||
|
if singleCard ~= nil then
|
||||||
spawnCardList({ singleCard })
|
spawnCardList({ singleCard })
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- search all objects in bag
|
-- search all objects in bag
|
||||||
local cardList = allCardsBagApi.getCardsByName(inputParameters.value, searchExact)
|
local cardList = allCardsBagApi.getCardsByName(inputParameters.value, searchExact)
|
@ -1373,7 +1373,7 @@ function newInvestigatorCallback(newId)
|
|||||||
elseif newId == "89001" then -- Subject 5U-21
|
elseif newId == "89001" then -- Subject 5U-21
|
||||||
local pos = zones.getZonePosition(playerColor, "BelowSetAside")
|
local pos = zones.getZonePosition(playerColor, "BelowSetAside")
|
||||||
local rot = self.getRotation()
|
local rot = self.getRotation()
|
||||||
local sourceBag = guidReferenceApi.getObjectByOwnerAndType("Mythos", "OptionPanelSource")
|
local sourceBag = guidReferenceApi.getObjectByOwnerAndType("Mythos", "ObjectSourceBag")
|
||||||
for _, objData in ipairs(sourceBag.getData().ContainedObjects) do
|
for _, objData in ipairs(sourceBag.getData().ContainedObjects) do
|
||||||
if objData["Nickname"] == "Subject 5U-21 Helper" then
|
if objData["Nickname"] == "Subject 5U-21 Helper" then
|
||||||
local spawnedObj = spawnObjectData({ data = objData, position = pos, rotation = rot })
|
local spawnedObj = spawnObjectData({ data = objData, position = pos, rotation = rot })
|
||||||
@ -1447,6 +1447,7 @@ function updateTexture(overrideName)
|
|||||||
Wait.frames(function()
|
Wait.frames(function()
|
||||||
for _, obj in ipairs(objectsToUnlock) do
|
for _, obj in ipairs(objectsToUnlock) do
|
||||||
obj.setLock(false)
|
obj.setLock(false)
|
||||||
|
obj.resting = true
|
||||||
end
|
end
|
||||||
end, 5)
|
end, 5)
|
||||||
end, function() return reloadedMat.loading_custom == false end)
|
end, function() return reloadedMat.loading_custom == false end)
|
||||||
|
@ -353,12 +353,12 @@
|
|||||||
</Cell>
|
</Cell>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<!-- Group: fan-made accessories -->
|
<!-- Group: accessories -->
|
||||||
<Row class="group-header">
|
<Row class="group-header">
|
||||||
<Cell class="group-header">
|
<Cell class="group-header">
|
||||||
<Panel class="group-header"
|
<Panel class="group-header"
|
||||||
image="header_olive">
|
image="header_olive">
|
||||||
<Text class="group-header">FAN-MADE ACCESSORIES</Text>
|
<Text class="group-header">ACCESSORIES</Text>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Cell>
|
</Cell>
|
||||||
</Row>
|
</Row>
|
||||||
|
Loading…
Reference in New Issue
Block a user