Merge pull request #223 from argonui/separate-bag-optionpanel

Moving spawnable tools into a separate (hidden) bag
This commit is contained in:
Chr1Z 2023-03-04 18:28:48 +01:00 committed by GitHub
commit c8ac5290d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
79 changed files with 171 additions and 116 deletions

View File

@ -188,7 +188,8 @@
"Decoration-Ammo.b43845", "Decoration-Ammo.b43845",
"Decoration-Ammo.d35ee9", "Decoration-Ammo.d35ee9",
"ArkhamSCE300-1272023-Page1.f873a8", "ArkhamSCE300-1272023-Page1.f873a8",
"VictoryDisplay.6ccd6d" "VictoryDisplay.6ccd6d",
"OptionPanelSource.830bd0"
], ],
"PlayArea": 1, "PlayArea": 1,
"PlayerCounts": [ "PlayerCounts": [

View File

@ -14,22 +14,12 @@
"r": 1 "r": 1
}, },
"ContainedObjects_order": [ "ContainedObjects_order": [
"ChaosBagManager.023240",
"TokenArranger.022907",
"CYOACampaignGuides.e87ea2",
"AttachmentHelper.7f4976",
"ArkhamFantasy-PixelArtMini-Cards.e17c9e", "ArkhamFantasy-PixelArtMini-Cards.e17c9e",
"jaqenZannsNavigationOverlay.a8affa",
"DrawTokenButtonTooltipRenamer.cc77a8", "DrawTokenButtonTooltipRenamer.cc77a8",
"WhimsicalsGenericDifficultySelector.05efb4", "WhimsicalsGenericDifficultySelector.05efb4",
"SearchAssistant.17aed0",
"HandHelper.450688",
"DisplacementTool.0f1374",
"LuckyPenny.2ab443", "LuckyPenny.2ab443",
"Double-SidedResource.bc81cb", "Double-SidedResource.bc81cb",
"DescriptivePhaseTracker.b171c8", "DescriptivePhaseTracker.b171c8",
"CleanUpHelper.26cf4b",
"CustomPlaymatImages.004fe7",
"CustomDataHelper.2547b3" "CustomDataHelper.2547b3"
], ],
"ContainedObjects_path": "Fan-MadeAccessories.aa8b38", "ContainedObjects_path": "Fan-MadeAccessories.aa8b38",
@ -53,7 +43,7 @@
"NormalURL": "http://i.imgur.com/0qUEr3W.jpg", "NormalURL": "http://i.imgur.com/0qUEr3W.jpg",
"TypeIndex": 6 "TypeIndex": 6
}, },
"Description": "", "Description": "This barrel contains some miscelleaneous accessories.\n\nAlso take a look at the option panel (gear icon at the bottom right) for more tools.",
"DragSelectable": true, "DragSelectable": true,
"GMNotes": "", "GMNotes": "",
"GUID": "aa8b38", "GUID": "aa8b38",

View File

@ -60,7 +60,7 @@
"LayoutGroupSortIndex": 0, "LayoutGroupSortIndex": 0,
"Locked": true, "Locked": true,
"LuaScript": "require(\"core/MythosArea\")", "LuaScript": "require(\"core/MythosArea\")",
"LuaScriptState": "[]", "LuaScriptState": "{\"currentScenario\":\"\",\"tokenData\":[],\"useFrontData\":true}",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Tile", "Name": "Custom_Tile",
"Nickname": "Mythos Area", "Nickname": "Mythos Area",

View File

@ -0,0 +1,64 @@
{
"AltLookAngle": {
"x": 0,
"y": 0,
"z": 0
},
"Autoraise": true,
"Bag": {
"Order": 0
},
"ColorDiffuse": {
"b": 0,
"g": 0.36652,
"r": 0.70588
},
"ContainedObjects_order": [
"ChaosBagManager.023240",
"TokenArranger.022907",
"CYOACampaignGuides.e87ea2",
"AttachmentHelper.7f4976",
"jaqenZannsNavigationOverlay.a8affa",
"SearchAssistant.17aed0",
"HandHelper.450688",
"DisplacementTool.0f1374",
"CleanUpHelper.26cf4b",
"CustomPlaymatImages.004fe7"
],
"ContainedObjects_path": "OptionPanelSource.830bd0",
"Description": "Contains the objects that are spawnable via option panel",
"DragSelectable": true,
"GMNotes": "",
"GUID": "830bd0",
"Grid": true,
"GridProjection": false,
"Hands": false,
"HideWhenFaceDown": false,
"IgnoreFoW": false,
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScript": "",
"LuaScriptState": "",
"MaterialIndex": -1,
"MeasureMovement": false,
"MeshIndex": -1,
"Name": "Bag",
"Nickname": "OptionPanel Source",
"Number": 0,
"Snap": true,
"Sticky": true,
"Tooltip": true,
"Transform": {
"posX": 78,
"posY": 1.006,
"posZ": -4.596,
"rotX": 0,
"rotY": 0,
"rotZ": 0,
"scaleX": 0.75,
"scaleY": 0.75,
"scaleZ": 0.75
},
"Value": 0,
"XmlUI": ""
}

View File

@ -63,8 +63,8 @@
"IgnoreFoW": false, "IgnoreFoW": false,
"LayoutGroupSortIndex": 0, "LayoutGroupSortIndex": 0,
"Locked": false, "Locked": false,
"LuaScriptState_path": "Fan-MadeAccessories.aa8b38/CYOACampaignGuides.e87ea2.luascriptstate", "LuaScriptState_path": "OptionPanelSource.830bd0/CYOACampaignGuides.e87ea2.luascriptstate",
"LuaScript_path": "Fan-MadeAccessories.aa8b38/CYOACampaignGuides.e87ea2.ttslua", "LuaScript_path": "OptionPanelSource.830bd0/CYOACampaignGuides.e87ea2.ttslua",
"MaterialIndex": -1, "MaterialIndex": -1,
"MeasureMovement": false, "MeasureMovement": false,
"MeshIndex": -1, "MeshIndex": -1,

View File

@ -73,5 +73,5 @@
"scaleZ": 1.5 "scaleZ": 1.5
}, },
"Value": 0, "Value": 0,
"XmlUI_path": "Fan-MadeAccessories.aa8b38/CleanUpHelper.26cf4b.xml" "XmlUI_path": "OptionPanelSource.830bd0/CleanUpHelper.26cf4b.xml"
} }

View File

@ -34,7 +34,7 @@
"LayoutGroupSortIndex": 0, "LayoutGroupSortIndex": 0,
"Locked": false, "Locked": false,
"LuaScript": "require(\"accessories/CustomPlaymatImages\")", "LuaScript": "require(\"accessories/CustomPlaymatImages\")",
"LuaScriptState_path": "Fan-MadeAccessories.aa8b38/CustomPlaymatImages.004fe7.luascriptstate", "LuaScriptState_path": "OptionPanelSource.830bd0/CustomPlaymatImages.004fe7.luascriptstate",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Token", "Name": "Custom_Token",
"Nickname": "Custom Playmat Images", "Nickname": "Custom Playmat Images",

View File

@ -29,7 +29,7 @@
"LayoutGroupSortIndex": 0, "LayoutGroupSortIndex": 0,
"Locked": false, "Locked": false,
"LuaScriptState": "{\"distance\":15,\"pitch\":75}", "LuaScriptState": "{\"distance\":15,\"pitch\":75}",
"LuaScript_path": "Fan-MadeAccessories.aa8b38/jaqenZannsNavigationOverlay.a8affa/Custom_Assetbundle.cecc3e.ttslua", "LuaScript_path": "OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/Custom_Assetbundle.cecc3e.ttslua",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Assetbundle", "Name": "Custom_Assetbundle",
"Nickname": "", "Nickname": "",

View File

@ -33,8 +33,8 @@
"IgnoreFoW": false, "IgnoreFoW": false,
"LayoutGroupSortIndex": 0, "LayoutGroupSortIndex": 0,
"Locked": false, "Locked": false,
"LuaScriptState_path": "Fan-MadeAccessories.aa8b38/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.0ffbc5.luascriptstate", "LuaScriptState_path": "OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.0ffbc5.luascriptstate",
"LuaScript_path": "Fan-MadeAccessories.aa8b38/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.0ffbc5.ttslua", "LuaScript_path": "OptionPanelSource.830bd0/jaqenZannsNavigationOverlay.a8affa/jaqenZannsNavigationOverlayTile.0ffbc5.ttslua",
"MeasureMovement": false, "MeasureMovement": false,
"Name": "Custom_Tile", "Name": "Custom_Tile",
"Nickname": "jaqenZann's Navigation Overlay Tile", "Nickname": "jaqenZann's Navigation Overlay Tile",

View File

@ -162,10 +162,10 @@
"Nickname": "Victory Display", "Nickname": "Victory Display",
"Snap": false, "Snap": false,
"Sticky": true, "Sticky": true,
"Tooltip": true,
"Tags": [ "Tags": [
"CleanUpHelper_ignore" "CleanUpHelper_ignore"
], ],
"Tooltip": true,
"Transform": { "Transform": {
"posX": -1.5, "posX": -1.5,
"posY": 1.531, "posY": 1.531,

View File

@ -11,9 +11,6 @@ optionPanel = {}
-- GUID of data helper -- GUID of data helper
DATA_HELPER_GUID = "708279" DATA_HELPER_GUID = "708279"
-- GUID of fan-made accessories bag (also just called "barrel")
BARREL_GUID = "aa8b38"
-- GUIDs that will not be interactable (e.g. parts of the table) -- GUIDs that will not be interactable (e.g. parts of the table)
local NOT_INTERACTABLE = { local NOT_INTERACTABLE = {
"6161b4", -- Decoration-Map "6161b4", -- Decoration-Map
@ -906,15 +903,16 @@ function spawnOrRemoveHelper(state, name, position, rotation)
end end
end end
-- copies the specified tool (by name) from the barrel -- copies the specified tool (by name) from the option panel source bag
---@param name String Name of the object that should be copied ---@param name String Name of the object that should be copied
---@param position Table Desired position of the object ---@param position Table Desired position of the object
function spawnHelperObject(name, position, rotation) function spawnHelperObject(name, position, rotation)
local barrel = getObjectFromGUID(BARREL_GUID)
-- error handling for missing barrel local sourceBag = getObjectFromGUID("830bd0")
if not barrel then
broadcastToAll("'Barrel' with fan-made accessories could not be found!", "Red") -- error handling for missing sourceBag
if not sourceBag then
broadcastToAll("Option panel source bag could not be found!", "Red")
return return
end end
@ -925,7 +923,7 @@ function spawnHelperObject(name, position, rotation)
spawnTable.rotation = rotation spawnTable.rotation = rotation
end end
for _, obj in ipairs(barrel.getData().ContainedObjects) do for _, obj in ipairs(sourceBag.getData().ContainedObjects) do
if obj["Nickname"] == name then if obj["Nickname"] == name then
spawnTable.data = obj spawnTable.data = obj
return spawnObjectData(spawnTable) return spawnObjectData(spawnTable)

View File

@ -205,59 +205,17 @@
</Cell> </Cell>
</Row> </Row>
<!-- Option: show token arranger --> <!-- Option: show attachment helper -->
<Row class="option-text"> <Row class="option-text">
<Cell class="option-text"> <Cell class="option-text">
<VerticalLayout class="text-column"> <VerticalLayout class="text-column">
<Text class="option-header">Token Arranger</Text> <Text class="option-header">Attachment Helper</Text>
<Text class="description">See the contents of the chaos bag at a glance! This tool displays a sorted table of the tokens to allow easier guessing of your odds.</Text> <Text class="description">Provides a card-sized bag for cards that are attached to other cards (e.g. Backpack).</Text>
</VerticalLayout> </VerticalLayout>
</Cell> </Cell>
<Cell class="option-button"> <Cell class="option-button">
<Toggle id="showTokenArranger" <Toggle id="showAttachmentHelper"
onValueChanged="onClick_toggleOption(showTokenArranger)"/> onValueChanged="onClick_toggleOption(showAttachmentHelper)"/>
</Cell>
</Row>
<!-- Option: show clean up helper -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Clean Up Helper</Text>
<Text class="description">Useful for campaign-play: It resets play areas to allow continuous gameplay in the same savegame.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showCleanUpHelper"
onValueChanged="onClick_toggleOption(showCleanUpHelper)"/>
</Cell>
</Row>
<!-- Option: show hand helper -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Hand Helper</Text>
<Text class="description">Never count your hand cards again! This tool does that for you and additionally enables easy discarding of random cards.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showHandHelper"
onValueChanged="onClick_toggleOption(showHandHelper)"/>
</Cell>
</Row>
<!-- Option: show search assistant -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Search Assistant</Text>
<Text class="description">Quickly search 3, 6, 9 or the top X cards of your deck!</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showSearchAssistant"
onValueChanged="onClick_toggleOption(showSearchAssistant)"/>
</Cell> </Cell>
</Row> </Row>
@ -275,45 +233,17 @@
</Cell> </Cell>
</Row> </Row>
<!-- Option: show attachment helper --> <!-- Option: show clean up helper -->
<Row class="option-text"> <Row class="option-text">
<Cell class="option-text"> <Cell class="option-text">
<VerticalLayout class="text-column"> <VerticalLayout class="text-column">
<Text class="option-header">Attachment Helper</Text> <Text class="option-header">Clean Up Helper</Text>
<Text class="description">Provides a card-sized bag for cards that are attached to other cards (e.g. Backpack).</Text> <Text class="description">Useful for campaign-play: It resets play areas to allow continuous gameplay in the same savegame.</Text>
</VerticalLayout> </VerticalLayout>
</Cell> </Cell>
<Cell class="option-button"> <Cell class="option-button">
<Toggle id="showAttachmentHelper" <Toggle id="showCleanUpHelper"
onValueChanged="onClick_toggleOption(showAttachmentHelper)"/> onValueChanged="onClick_toggleOption(showCleanUpHelper)"/>
</Cell>
</Row>
<!-- Option: show navigation overlay -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Navigation Overlay</Text>
<Text class="description">This enables an overlay for quickly moving the camera to various points on the table.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showNavigationOverlay"
onValueChanged="onClick_toggleOption(showNavigationOverlay)"/>
</Cell>
</Row>
<!-- Option: show CYOA campaign guides -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">CYOA Campaign Guides</Text>
<Text class="description">Displays in a "Choose Your Own Adventure" style redesigned campaign guides.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showCYOA"
onValueChanged="onClick_toggleOption(showCYOA)"/>
</Cell> </Cell>
</Row> </Row>
@ -331,6 +261,20 @@
</Cell> </Cell>
</Row> </Row>
<!-- Option: show CYOA campaign guides -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">CYOA Campaign Guides</Text>
<Text class="description">Displays in a "Choose Your Own Adventure" style redesigned campaign guides.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showCYOA"
onValueChanged="onClick_toggleOption(showCYOA)"/>
</Cell>
</Row>
<!-- Option: show displacement tool --> <!-- Option: show displacement tool -->
<Row class="option-text"> <Row class="option-text">
<Cell class="option-text"> <Cell class="option-text">
@ -344,6 +288,64 @@
onValueChanged="onClick_toggleOption(showDisplacementTool)"/> onValueChanged="onClick_toggleOption(showDisplacementTool)"/>
</Cell> </Cell>
</Row> </Row>
<!-- Option: show hand helper -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Hand Helper</Text>
<Text class="description">Never count your hand cards again! This tool does that for you and additionally enables easy discarding of random cards.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showHandHelper"
onValueChanged="onClick_toggleOption(showHandHelper)"/>
</Cell>
</Row>
<!-- Option: show navigation overlay -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Navigation Overlay</Text>
<Text class="description">This enables an overlay for quickly moving the camera to various points on the table.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showNavigationOverlay"
onValueChanged="onClick_toggleOption(showNavigationOverlay)"/>
</Cell>
</Row>
<!-- Option: show search assistant -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Search Assistant</Text>
<Text class="description">Quickly search 3, 6, 9 or the top X cards of your deck!</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showSearchAssistant"
onValueChanged="onClick_toggleOption(showSearchAssistant)"/>
</Cell>
</Row>
<!-- Option: show token arranger -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Token Arranger</Text>
<Text class="description">See the contents of the chaos bag at a glance! This tool displays a sorted table of the tokens to allow easier guessing of your odds.</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showTokenArranger"
onValueChanged="onClick_toggleOption(showTokenArranger)"/>
</Cell>
</Row>
</TableLayout> </TableLayout>
</VerticalScrollView> </VerticalScrollView>
</Cell> </Cell>