From dc3ce69801729400c3831173d3dbbfe71978a40d Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 16 Jan 2024 23:48:49 +0100 Subject: [PATCH 1/6] formatting --- modsettings/CameraStates.json | 2 +- src/core/tour/TourCard.ttslua | 20 ++++++++++---------- src/core/tour/TourManager.ttslua | 32 ++++++++++++++------------------ src/core/tour/TourScript.ttslua | 2 +- 4 files changed, 26 insertions(+), 30 deletions(-) diff --git a/modsettings/CameraStates.json b/modsettings/CameraStates.json index 499dc4c0..01c14516 100644 --- a/modsettings/CameraStates.json +++ b/modsettings/CameraStates.json @@ -13,7 +13,7 @@ }, "Rotation": { "x": 64.34, - "y": 90.33, + "y": 90, "z": 0 }, "Zoomed": false diff --git a/src/core/tour/TourCard.ttslua b/src/core/tour/TourCard.ttslua index 3a77f414..0c3a0d0a 100644 --- a/src/core/tour/TourCard.ttslua +++ b/src/core/tour/TourCard.ttslua @@ -12,16 +12,16 @@ tourCardTemplate = { position = "0 300 30", showAnimation = "FadeIn", hideAnimation = "FadeOut", - active=false, + active = false, }, children = { { tag = "Image", attributes = { id = "tourNarratorImageLeft", - height=120, - width=80, - rectAlignment="UpperLeft", + height = 120, + width = 80, + rectAlignment = "UpperLeft", offsetXY = "-80 0", -- Image will be set when the card is updated } @@ -31,9 +31,9 @@ tourCardTemplate = { attributes = { id = "tourNarratorImageRight", active = false, - height=125, - width=80, - rectAlignment="UpperRight", + height = 125, + width = 80, + rectAlignment = "UpperRight", offsetXY = "80 0" -- Image will be set when the card is updated } @@ -47,7 +47,7 @@ tourCardTemplate = { width = 330, rectAlignment = "MiddleCenter", image = "SpeechBubble", - }, + } }, { tag = "Text", @@ -76,7 +76,7 @@ tourCardTemplate = { rectAlignment = "LowerRight", offsetXY = "-5 -45", image = "NextArrow" - }, + } }, { tag = "Image", @@ -88,6 +88,6 @@ tourCardTemplate = { offsetXY = "35 -45", image = "Exit" } - }, + } } } diff --git a/src/core/tour/TourManager.ttslua b/src/core/tour/TourManager.ttslua index c27939ee..65f2854d 100644 --- a/src/core/tour/TourManager.ttslua +++ b/src/core/tour/TourManager.ttslua @@ -25,10 +25,11 @@ do -- Default (0) position for the camera, as defined in the mod. If we don't recreate this position -- EXACTLY when exiting the tour then camera controls get weird local DEFAULT_CAMERA_POS = { - position = { x = -22.265, y = -2.5, z = 5.2575}, - pitch=64.343, - yaw=90.333, - distance=104.7} + position = { x = -22.26, y = -2.5, z = 5.26 }, + pitch = 64.34, + yaw = 90, + distance = 104 + } -- Global XML coordinates where we can present a card local SCREEN_POSITIONS = { @@ -37,11 +38,13 @@ do east = "600 0 0", west = "-600 0 0", south = "0 -300 0", + -- Northwest is only used by the Mandy card, move it a little right than standard so it's -- closer to the importer northwest = "-500 300 0", northeast = "600 300 0", southwest = "-600 -300 0", + -- Used by the Diana and Wini cards referencing the bottom-right global controls, moved a little -- closer to them southeast = "730 -365 0" @@ -49,7 +52,7 @@ do -- Tracks the current state of the tours. Keyed by player color to keep each player's tour -- separate, will hold the camera hook and current card. - local tourState = { } + local tourState = {} -- Kicks off the tour by initializing the card and camera hook. A callback on the hook creation -- will then show the first card. @@ -63,6 +66,7 @@ do -- the movement is done, but the delay seems to handle it Player[playerColor].setCameraMode("ThirdPerson") Player[playerColor].lookAt(DEFAULT_CAMERA_POS) + -- Initial camera rotation is painfully slow. White and Orange players are likely oriented -- correctly, but need a longer start delay for Green and Red local delay = 0.5 @@ -72,16 +76,8 @@ do end Wait.time(function() internal.createTourCard(playerColor) - -- XML update to add the new card takes a few frames to load, wait for it to finish then - -- create the hook - Wait.condition( - function() - internal.createCameraHook(playerColor) - end, - function() - return not Global.UI.loading - end - ) + -- XML update to add the new card takes a few frames to load, wait for it to finish then create the hook + Wait.condition(function() internal.createCameraHook(playerColor) end, function() return not Global.UI.loading end) end, delay) end @@ -208,7 +204,7 @@ do posY = HOOK_CAMERA_HOME.y, posZ = HOOK_CAMERA_HOME.z, rotX = 0, - rotY = 270.0, + rotY = 270, rotZ = 0, scaleX = 0.1, scaleY = 0.1, @@ -254,9 +250,9 @@ do tourCardTemplate.children[3].attributes.id = internal.getUiId(BUBBLE_ID, playerColor) tourCardTemplate.children[4].attributes.id = internal.getUiId(TEXT_ID, playerColor) tourCardTemplate.children[5].attributes.id = internal.getUiId(NEXT_BUTTON_ID, playerColor) - tourCardTemplate.children[5].attributes.onClick = self.getGUID().."/nextCard" + tourCardTemplate.children[5].attributes.onClick = self.getGUID() .. "/nextCard" tourCardTemplate.children[6].attributes.id = internal.getUiId(STOP_BUTTON_ID, playerColor) - tourCardTemplate.children[6].attributes.onClick = self.getGUID().."/stopTour" + tourCardTemplate.children[6].attributes.onClick = self.getGUID() .. "/stopTour" internal.setDeepVisibility(tourCardTemplate, playerColor) local globalXml = Global.UI.getXmlTable() diff --git a/src/core/tour/TourScript.ttslua b/src/core/tour/TourScript.ttslua index 6caf67e7..230afb83 100644 --- a/src/core/tour/TourScript.ttslua +++ b/src/core/tour/TourScript.ttslua @@ -87,5 +87,5 @@ TOUR_SCRIPT = { text = "That's the end of the tour, but there's much more to discover if you look in the right places. Some cards have helpers on the right-click menu, and every new version adds new content and functions.\n\nDon't be afraid to explore, and best of luck out there! We'll all need it...", position = "center", speakerSide = "right" - }, + } } From 1ffc6710467f4076fd11f17b64d616f1d8e7f61a Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 21 Jan 2024 13:36:29 +0100 Subject: [PATCH 2/6] more formatting --- src/core/tour/TourCard.ttslua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/tour/TourCard.ttslua b/src/core/tour/TourCard.ttslua index 0c3a0d0a..00cc0f23 100644 --- a/src/core/tour/TourCard.ttslua +++ b/src/core/tour/TourCard.ttslua @@ -12,7 +12,7 @@ tourCardTemplate = { position = "0 300 30", showAnimation = "FadeIn", hideAnimation = "FadeOut", - active = false, + active = false }, children = { { @@ -22,7 +22,7 @@ tourCardTemplate = { height = 120, width = 80, rectAlignment = "UpperLeft", - offsetXY = "-80 0", + offsetXY = "-80 0" -- Image will be set when the card is updated } }, @@ -46,7 +46,7 @@ tourCardTemplate = { height = 215, width = 330, rectAlignment = "MiddleCenter", - image = "SpeechBubble", + image = "SpeechBubble" } }, { @@ -64,7 +64,7 @@ tourCardTemplate = { resizeTextMaxSize = 32, color = "#050505", alignment = "UpperLeft", - horizontalOverflow = "wrap", + horizontalOverflow = "wrap" } }, { From 7f6d2fd3624257fe10f5fbc3a70da63ac38e7de5 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 21 Jan 2024 20:26:57 +0100 Subject: [PATCH 3/6] added kohaku for blurse manager card --- modsettings/CustomUIAssets.json | 5 +++++ src/core/tour/TourManager.ttslua | 5 ++--- src/core/tour/TourScript.ttslua | 18 ++++++++++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/modsettings/CustomUIAssets.json b/modsettings/CustomUIAssets.json index aaaf125b..3f31c3b3 100644 --- a/modsettings/CustomUIAssets.json +++ b/modsettings/CustomUIAssets.json @@ -209,6 +209,11 @@ "Type": 0, "URL": "https://i.imgur.com/AFuB9II.png" }, + { + "Name": "Inv-Kohaku", + "Type": 0, + "URL": "http://cloud-3.steamusercontent.com/ugc/2279451480492739312/E59E79D4CFCFE60190BFD69B7FFBF1601DA3FAA5/" + }, { "Name": "TitleGradient", "Type": 0, diff --git a/src/core/tour/TourManager.ttslua b/src/core/tour/TourManager.ttslua index 65f2854d..f2150e4d 100644 --- a/src/core/tour/TourManager.ttslua +++ b/src/core/tour/TourManager.ttslua @@ -241,9 +241,8 @@ do ---@param playerColor String Player color to create the card for internal.createTourCard = function(playerColor) -- Make sure the card doesn't exist before we create a new one - if Global.UI.getAttributes(internal.getUiId(CARD_ID, playerColor)) ~= nil then - return - end + if Global.UI.getAttributes(internal.getUiId(CARD_ID, playerColor)) ~= nil then return end + tourCardTemplate.attributes.id = internal.getUiId(CARD_ID, playerColor) tourCardTemplate.children[1].attributes.id = internal.getUiId(LEFT_NARRATOR_ID, playerColor) tourCardTemplate.children[2].attributes.id = internal.getUiId(RIGHT_NARRATOR_ID, playerColor) diff --git a/src/core/tour/TourScript.ttslua b/src/core/tour/TourScript.ttslua index 230afb83..c3a539b8 100644 --- a/src/core/tour/TourScript.ttslua +++ b/src/core/tour/TourScript.ttslua @@ -10,7 +10,7 @@ TOUR_SCRIPT = { narrator = "Darrell", text = "Cameras can be tricky things. Best you leave handling it to the professionals during the tour. Don't try to move the camera until the tour is complete.\n\nOnce we're done, remember you can use the 'p' key to switch back to third-person mode, and the spacebar to reset the position.", position = "center", - speakerSide = "right", + speakerSide = "right" }, { narrator = "Daisy", @@ -26,7 +26,7 @@ TOUR_SCRIPT = { objReferenceData = { owner = "Mythos", type = "DeckImporter" }, distanceFromObj = -5, position = "northwest", - skipCentering = true, + skipCentering = true }, { narrator = "Daniela", @@ -42,16 +42,17 @@ TOUR_SCRIPT = { objReferenceData = { owner = "Mythos", type = "CampaignThePathToCarcosa" }, distanceFromObj = 20, position = "northwest", + skipCentering = true }, { narrator = "Diana", text = "These symbols on the bottom right are a repository of arcane knowledge, containing all the official content to download plus some deviously creative works from fans. One should beware those who seem too fond of the darkness, but you cannot deny the quality of their efforts.\n\nDon't see anything here? Only promoted players can access these.", - position = "southeast", + position = "southeast" }, { narrator = "Winifred", text = "No good aviator would fly a plane she didn't know and hadn't tweaked a bit herself. The gear icon contains settings to customize your play experience, from alternate ways to track your clues to a variety of helpers to streamline the game.\n\nEverything here is optional, but who doesn't want to go as fast as they can? Just remember that all settings affect all players, so strap in and trust your pilot!", - position = "southeast", + position = "southeast" }, { narrator = "Amina", @@ -65,6 +66,7 @@ TOUR_SCRIPT = { text = "The evils that lurk in this world are out there, creeping ever closer. When they find you, this will easily draw a card from the encounter deck. The deck will even reshuffle itself when needed, for the enemies we face are unending.", showPos = { x = -35, y = -20, z = 28 }, position = "west", + skipCentering = true }, { narrator = "Jacqueline", @@ -74,6 +76,14 @@ TOUR_SCRIPT = { skipCentering = true, speakerSide = "right" }, + { + narrator = "Kohaku", + text = "Folklorists, immersed in the rich narratives of blessings and curses, explore the essence of human beliefs. Blessings, radiant with positive energy, symbolize societal aspirations for well-being and prosperity. On the flip side, curses cast ominous shadows, serving as cautionary tales against moral transgressions. Use this tool to control the amount of bless and curse tokens", + objReferenceData = { owner = "Mythos", type = "BlessCurseManager" }, + position = "center", + skipCentering = true, + speakerSide = "left" + }, { narrator = "Preston", text = "I can afford to buy what I need, but for those less well-off we've provided an endless pool of tokens to track your game. Simply drag one out of the pools here.\n\nResources are my favorite of course, but damage and horror are as inevitable as taxes. I leave those to my bookkeeper though. Those tokens can work like counters, use the number keys to change the value.", From bbda3442748fb0c34c1ea541517cc32c1daa5167 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 21 Jan 2024 20:28:43 +0100 Subject: [PATCH 4/6] typo --- src/core/tour/TourScript.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tour/TourScript.ttslua b/src/core/tour/TourScript.ttslua index c3a539b8..dfd85ee5 100644 --- a/src/core/tour/TourScript.ttslua +++ b/src/core/tour/TourScript.ttslua @@ -78,7 +78,7 @@ TOUR_SCRIPT = { }, { narrator = "Kohaku", - text = "Folklorists, immersed in the rich narratives of blessings and curses, explore the essence of human beliefs. Blessings, radiant with positive energy, symbolize societal aspirations for well-being and prosperity. On the flip side, curses cast ominous shadows, serving as cautionary tales against moral transgressions. Use this tool to control the amount of bless and curse tokens", + text = "Folklorists, immersed in the rich narratives of blessings and curses, explore the essence of human beliefs. Blessings, radiant with positive energy, symbolize societal aspirations for well-being and prosperity. On the flip side, curses cast ominous shadows, serving as cautionary tales against moral transgressions. Use this tool to control the amount of bless and curse tokens.", objReferenceData = { owner = "Mythos", type = "BlessCurseManager" }, position = "center", skipCentering = true, From c6833f7fcf8f5e93e4fd81a88de5705564645cc6 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 21 Jan 2024 21:25:55 +0100 Subject: [PATCH 5/6] updated text --- src/core/tour/TourScript.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tour/TourScript.ttslua b/src/core/tour/TourScript.ttslua index dfd85ee5..14c2ef3e 100644 --- a/src/core/tour/TourScript.ttslua +++ b/src/core/tour/TourScript.ttslua @@ -78,7 +78,7 @@ TOUR_SCRIPT = { }, { narrator = "Kohaku", - text = "Folklorists, immersed in the rich narratives of blessings and curses, explore the essence of human beliefs. Blessings, radiant with positive energy, symbolize societal aspirations for well-being and prosperity. On the flip side, curses cast ominous shadows, serving as cautionary tales against moral transgressions. Use this tool to control the amount of bless and curse tokens.", + text = "Folklorists, immersed in the rich narratives of blessings and curses, explore the essence of human beliefs. You can ese this tool to control the amount of bless and curse tokens. It will also display the amount in the bag (+ sealed on cards) for you. Remember to remove bless / curse tokens with this after resolving them.", objReferenceData = { owner = "Mythos", type = "BlessCurseManager" }, position = "center", skipCentering = true, From 59e14e091e91dc4c8c6a3a03542d3056d65a73ce Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 21 Jan 2024 21:27:36 +0100 Subject: [PATCH 6/6] typo --- src/core/tour/TourScript.ttslua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/tour/TourScript.ttslua b/src/core/tour/TourScript.ttslua index 14c2ef3e..d40964fd 100644 --- a/src/core/tour/TourScript.ttslua +++ b/src/core/tour/TourScript.ttslua @@ -78,7 +78,7 @@ TOUR_SCRIPT = { }, { narrator = "Kohaku", - text = "Folklorists, immersed in the rich narratives of blessings and curses, explore the essence of human beliefs. You can ese this tool to control the amount of bless and curse tokens. It will also display the amount in the bag (+ sealed on cards) for you. Remember to remove bless / curse tokens with this after resolving them.", + text = "Folklorists, immersed in the rich narratives of blessings and curses, explore the essence of human beliefs. You can use this tool to control the amount of bless and curse tokens in the chaos bag. It will also display the amount in the bag (+ sealed on cards) for you. Remember to remove bless / curse tokens with this after resolving them.", objReferenceData = { owner = "Mythos", type = "BlessCurseManager" }, position = "center", skipCentering = true,