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.d35ee9",
"ArkhamSCE300-1272023-Page1.f873a8",
"VictoryDisplay.6ccd6d"
"VictoryDisplay.6ccd6d",
"OptionPanelSource.830bd0"
],
"PlayArea": 1,
"PlayerCounts": [

View File

@ -14,22 +14,12 @@
"r": 1
},
"ContainedObjects_order": [
"ChaosBagManager.023240",
"TokenArranger.022907",
"CYOACampaignGuides.e87ea2",
"AttachmentHelper.7f4976",
"ArkhamFantasy-PixelArtMini-Cards.e17c9e",
"jaqenZannsNavigationOverlay.a8affa",
"DrawTokenButtonTooltipRenamer.cc77a8",
"WhimsicalsGenericDifficultySelector.05efb4",
"SearchAssistant.17aed0",
"HandHelper.450688",
"DisplacementTool.0f1374",
"LuckyPenny.2ab443",
"Double-SidedResource.bc81cb",
"DescriptivePhaseTracker.b171c8",
"CleanUpHelper.26cf4b",
"CustomPlaymatImages.004fe7",
"CustomDataHelper.2547b3"
],
"ContainedObjects_path": "Fan-MadeAccessories.aa8b38",
@ -53,7 +43,7 @@
"NormalURL": "http://i.imgur.com/0qUEr3W.jpg",
"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,
"GMNotes": "",
"GUID": "aa8b38",

View File

@ -60,7 +60,7 @@
"LayoutGroupSortIndex": 0,
"Locked": true,
"LuaScript": "require(\"core/MythosArea\")",
"LuaScriptState": "[]",
"LuaScriptState": "{\"currentScenario\":\"\",\"tokenData\":[],\"useFrontData\":true}",
"MeasureMovement": false,
"Name": "Custom_Tile",
"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,
"LayoutGroupSortIndex": 0,
"Locked": false,
"LuaScriptState_path": "Fan-MadeAccessories.aa8b38/CYOACampaignGuides.e87ea2.luascriptstate",
"LuaScript_path": "Fan-MadeAccessories.aa8b38/CYOACampaignGuides.e87ea2.ttslua",
"LuaScriptState_path": "OptionPanelSource.830bd0/CYOACampaignGuides.e87ea2.luascriptstate",
"LuaScript_path": "OptionPanelSource.830bd0/CYOACampaignGuides.e87ea2.ttslua",
"MaterialIndex": -1,
"MeasureMovement": false,
"MeshIndex": -1,
@ -86,4 +86,4 @@
},
"Value": 0,
"XmlUI": ""
}
}

View File

@ -73,5 +73,5 @@
"scaleZ": 1.5
},
"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,
"Locked": false,
"LuaScript": "require(\"accessories/CustomPlaymatImages\")",
"LuaScriptState_path": "Fan-MadeAccessories.aa8b38/CustomPlaymatImages.004fe7.luascriptstate",
"LuaScriptState_path": "OptionPanelSource.830bd0/CustomPlaymatImages.004fe7.luascriptstate",
"MeasureMovement": false,
"Name": "Custom_Token",
"Nickname": "Custom Playmat Images",
@ -54,4 +54,4 @@
},
"Value": 0,
"XmlUI": ""
}
}

View File

@ -29,7 +29,7 @@
"LayoutGroupSortIndex": 0,
"Locked": false,
"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,
"Name": "Custom_Assetbundle",
"Nickname": "",
@ -49,4 +49,4 @@
},
"Value": 0,
"XmlUI": ""
}
}

View File

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

View File

@ -42,4 +42,4 @@
},
"Value": 0,
"XmlUI": ""
}
}

View File

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

View File

@ -11,9 +11,6 @@ optionPanel = {}
-- GUID of data helper
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)
local NOT_INTERACTABLE = {
"6161b4", -- Decoration-Map
@ -906,15 +903,16 @@ function spawnOrRemoveHelper(state, name, position, rotation)
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 position Table Desired position of the object
function spawnHelperObject(name, position, rotation)
local barrel = getObjectFromGUID(BARREL_GUID)
-- error handling for missing barrel
if not barrel then
broadcastToAll("'Barrel' with fan-made accessories could not be found!", "Red")
local sourceBag = getObjectFromGUID("830bd0")
-- error handling for missing sourceBag
if not sourceBag then
broadcastToAll("Option panel source bag could not be found!", "Red")
return
end
@ -925,7 +923,7 @@ function spawnHelperObject(name, position, rotation)
spawnTable.rotation = rotation
end
for _, obj in ipairs(barrel.getData().ContainedObjects) do
for _, obj in ipairs(sourceBag.getData().ContainedObjects) do
if obj["Nickname"] == name then
spawnTable.data = obj
return spawnObjectData(spawnTable)

View File

@ -205,59 +205,17 @@
</Cell>
</Row>
<!-- Option: show token arranger -->
<!-- Option: show attachment helper -->
<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>
<Text class="option-header">Attachment Helper</Text>
<Text class="description">Provides a card-sized bag for cards that are attached to other cards (e.g. Backpack).</Text>
</VerticalLayout>
</Cell>
<Cell class="option-button">
<Toggle id="showTokenArranger"
onValueChanged="onClick_toggleOption(showTokenArranger)"/>
</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)"/>
<Toggle id="showAttachmentHelper"
onValueChanged="onClick_toggleOption(showAttachmentHelper)"/>
</Cell>
</Row>
@ -275,45 +233,17 @@
</Cell>
</Row>
<!-- Option: show attachment helper -->
<!-- Option: show clean up helper -->
<Row class="option-text">
<Cell class="option-text">
<VerticalLayout class="text-column">
<Text class="option-header">Attachment Helper</Text>
<Text class="description">Provides a card-sized bag for cards that are attached to other cards (e.g. Backpack).</Text>
<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="showAttachmentHelper"
onValueChanged="onClick_toggleOption(showAttachmentHelper)"/>
</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)"/>
<Toggle id="showCleanUpHelper"
onValueChanged="onClick_toggleOption(showCleanUpHelper)"/>
</Cell>
</Row>
@ -331,6 +261,20 @@
</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>
</Row>
<!-- Option: show displacement tool -->
<Row class="option-text">
<Cell class="option-text">
@ -344,6 +288,64 @@
onValueChanged="onClick_toggleOption(showDisplacementTool)"/>
</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 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>
</VerticalScrollView>
</Cell>