diff --git a/README.md b/README.md index 46ebbb7..7fa185f 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,13 @@ This mod also includes some laser sail parts that require custom code to work. Y ## Changelog +- **1.0.2** + - Story Mode + - Added a pop-out window on new saves to indicate what to do to start the story + - Added other pop-outs + - Rephrased a clue due to imprecision + - Fixes + - Lower the terrain quality of C4-2 to avoid some clipping. - **1.0.1** - Fixes - Made parallax configuration for C2-1 less laggy diff --git a/gamedata/OtherWorldsReboot/Bundles/Credits.txt b/gamedata/OtherWorldsReboot/Bundles/Credits.txt index 033ecfc..a223f2b 100644 --- a/gamedata/OtherWorldsReboot/Bundles/Credits.txt +++ b/gamedata/OtherWorldsReboot/Bundles/Credits.txt @@ -1 +1,2 @@ -ISLAND_CLR.dds and ISLAND_NRM.dds from https://polyhaven.com/a/rocks_ground_06, licensed under CC0 \ No newline at end of file +ISLAND_CLR.dds and ISLAND_NRM.dds from https://polyhaven.com/a/rocks_ground_06, licensed under CC0 +Bundled fonts obtained from Google Fonts \ No newline at end of file diff --git a/gamedata/OtherWorldsReboot/Bundles/otherworlds_linux b/gamedata/OtherWorldsReboot/Bundles/otherworlds_linux index 6ddbb37..d23d581 100644 Binary files a/gamedata/OtherWorldsReboot/Bundles/otherworlds_linux and b/gamedata/OtherWorldsReboot/Bundles/otherworlds_linux differ diff --git a/gamedata/OtherWorldsReboot/Bundles/otherworlds_mac b/gamedata/OtherWorldsReboot/Bundles/otherworlds_mac index c99191c..6cc040c 100644 Binary files a/gamedata/OtherWorldsReboot/Bundles/otherworlds_mac and b/gamedata/OtherWorldsReboot/Bundles/otherworlds_mac differ diff --git a/gamedata/OtherWorldsReboot/Bundles/otherworlds_win b/gamedata/OtherWorldsReboot/Bundles/otherworlds_win index 60e3ab6..1064525 100644 Binary files a/gamedata/OtherWorldsReboot/Bundles/otherworlds_win and b/gamedata/OtherWorldsReboot/Bundles/otherworlds_win differ diff --git a/gamedata/OtherWorldsReboot/CercaniSystem/Kopernicus/C4-2.cfg b/gamedata/OtherWorldsReboot/CercaniSystem/Kopernicus/C4-2.cfg index bfeae07..d0fa29d 100644 --- a/gamedata/OtherWorldsReboot/CercaniSystem/Kopernicus/C4-2.cfg +++ b/gamedata/OtherWorldsReboot/CercaniSystem/Kopernicus/C4-2.cfg @@ -160,7 +160,7 @@ PQS { minLevel = 2 - maxLevel = 11 + maxLevel = 9 mapMaxHeight = 60000 minDetailDistance = 6 maxQuadLengthsPerFrame = 0.03 diff --git a/gamedata/OtherWorldsReboot/Plugins/OtherWorldsProgram.dll b/gamedata/OtherWorldsReboot/Plugins/OtherWorldsProgram.dll index 0d3e801..bff9da0 100644 Binary files a/gamedata/OtherWorldsReboot/Plugins/OtherWorldsProgram.dll and b/gamedata/OtherWorldsReboot/Plugins/OtherWorldsProgram.dll differ diff --git a/gamedata/OtherWorldsReboot/README.md b/gamedata/OtherWorldsReboot/README.md index 2fee650..f9a0347 100644 --- a/gamedata/OtherWorldsReboot/README.md +++ b/gamedata/OtherWorldsReboot/README.md @@ -12,6 +12,13 @@ As optional mods, you can use *Enviromental Visual Enhancments*, *Scatterer* and ## Changelog +- **1.0.2** + - Story Mode + - Added a pop-out window on new saves to indicate what to do to start the story + - Added other pop-outs + - Rephrased a clue due to imprecision + - Fixes + - Lower the terrain quality of C4-2 to avoid some clipping. - **1.0.1** - Fixes - Made parallax configuration for C2-1 less laggy diff --git a/src/OtherWorldsProgram/LOC/OWP_LOC.cs b/src/OtherWorldsProgram/LOC/OWP_LOC.cs index 4ead25a..cbab2aa 100644 --- a/src/OtherWorldsProgram/LOC/OWP_LOC.cs +++ b/src/OtherWorldsProgram/LOC/OWP_LOC.cs @@ -433,11 +433,21 @@ public static void LoadData(string lang) { //TODO: Different languages if(lang.Equals("en_en")) { + //Popouts + data.Add("Popout_First_Header", "Kerbal Space Agency\nDepartment of Interstellar Studies &\nSprite II Mission Team"); + data.Add("Popout_First_Body", "\n\n\nTo the chief of the the Kerbal Space Agency:\n\n\nThe Team for the Sprite II Mission would like to recommend the agency to highly prioritize the exploration of the Cercani exoplanetary system. Our team members have gone through every process or event that could explain the PRP-2611 signal, with the only coherent answer being an artificial origin [1].\n\nTo help future missions, we also calculated the location for the smaller signal PRP-2611B, assuming a tidally locked Vassa, at 15.58 latitude and -174.58 longitude [2]. We added these coordinates to the tracking station's system.\n\nWe know that the efforts by the Department of Interstellar Studies to communicate with this hypothetical alien species have yielded no results, but we believe this doesn't rule out an artificial origin, and in fact, it's to be expected.\n\nBest regards, Mare Kerman, head of the Sprite II Mission Team."); + data.Add("Popout_First_Refs", "[1] Origins of PRP-2611, an artificial source?; DIS; Sprite II Team\n[2] Orbital analysis & PRP-2611: DIS: Sprite II Team"); + data.Add("Popout_Second_Body", "\n\n\nTo the chief of the the Kerbal Space Agency:\n\n\nThe finding of the artifact at Vassa has been such monumental news. All the team is extremely happy, and in fact, wants to keep helping with the agencies other missions using their knowledge they gained from the Sprite II Mission.\n\nWe have taken the liberty to reverse engineer the artifact itself by using the descriptions and measurements the kerbals took while on the exoplanet, and we have made, in collaboration with Intervision, a replica. This way, we can have a backup in case the original one is lost.\n\nIntervision wanted to take all the praise though, so we made them stick some Sprite II stickers on the recreation. You will find a stock of these on the VAB's Cargo Section.\n\nBest regards, Mare Kerman, head of the Sprite II Mission Team."); + data.Add("Popout_Third_Body", "\n\n\nTo the chief of the the Kerbal Space Agency:\n\n\nWe write to inform we have colaborated once again with Intervision to make a new recreation of another alien artifact, the one that was found on Pequar.\n\nThe weak signal, that the original item produced, was picked up as very noisy data in the readouts that were published on the scientific journal 'Skies of stars', but we were able to filter it to find out the patterns that it emmitted. Like the last recreation, this one's objective is to serve as a back up if the original one is lost... or blows up. Like last time, we added a stock of them to the Vehicle Assembly Building's Cargo Section.\n\nThis time, we haven't been able to convince Intervision to add the stickers to the recreation.\n\nBest regards, Mare Kerman, head of the Sprite II Mission Team."); + data.Add("Popout_SecondThird_Body", "\n\n\nTo the chief of the the Kerbal Space Agency:\n\n\nChief, I'm going to ignore formal language in this letter. We can't believe all the findings that have happened on the Cercani system. To know that our mission kickstarted the discovery of intelligent alien life is an honour we will cherish for all of our lives.\n\nWe've been so hyped by the discoveries that we started working with some friends we know from Intervision, the guys that make the laser sails. Between them, us, and the measurements of the original artifacts found on Cercani, we've been able to reverse engineer both of them, and produce replicas that will serve as backups in case the originals are lost.\n\nWe sneaked into the Cargo section of the VAB to leave some of them there.\n\nBest regards, Mare Kerman, head of the Sprite II Mission Team."); + data.Add("Empty", ""); + + //Story data.Add("Intro_Waypoint_Vassa", "Radio Signal PRP-2611 B"); data.Add("Intro_Waypoint_C2-1", "Radio Signal PRP-2611"); data.Add("Signal_Troni_1_Name","SOS CD301Y2"); - data.Add("Signal_Troni_1_Dial","#(switchanim=1,showui=true,timenext=2.0) New Journal, Day 1031. I'm the first one to ever land on this planet,#(timenext=0.75) and the results are fascinating.#(timenext=2.5) #(clear=1)The ground on the night side of this world looks just#(cameraui=false) like that of an icy moon orbiting a distant gas giant. If I had suddenly woken up here one day, I would think I was in one of those moons, really.#(timenext=3.0) #(clear=1)This place is really nice though, A permanent clear sky perfect for gazing upon the stars, no annoying atmosphere, and enough gravity where you could see yourself making a nice place where to live,#(timenext=1.5) of course if you ignore everything else about the planet that wants to kill you.#(timenext=3.0) #(clear=1,switchanim=2)I don't want to be here for much longer. Going here takes a lot of fuel, so I have to go back to the gas giant to refuel, then I will make a place where to live, at least for some time, at the moon that orbits backwards, specifically around 24 degrees north and 20 degrees west from where the gas giant stands in the middle of the sky.#(timenext=4.0) #(close=short)"); + data.Add("Signal_Troni_1_Dial","#(switchanim=1,showui=true,timenext=2.0) New Journal, Day 1031. I'm the first one to ever land on this planet,#(timenext=0.75) and the results are fascinating.#(timenext=2.5) #(clear=1)The ground on the night side of this world looks just#(cameraui=false) like that of an icy moon orbiting a distant gas giant. If I had suddenly woken up here one day, I would think I was in one of those moons, really.#(timenext=3.0) #(clear=1)This place is really nice though, A permanent clear sky perfect for gazing upon the stars, no annoying atmosphere, and enough gravity where you could see yourself making a nice place where to live,#(timenext=1.5) of course if you ignore everything else about the planet that wants to kill you.#(timenext=3.0) #(clear=1,switchanim=2)I don't want to be here for much longer. Going here takes a lot of fuel, so I have to go back to the gas giant to refuel, then I will make a place where to live, at least for some time, at the moon that orbits backwards, specifically in the second biggest plateau, and 24 degrees north.#(timenext=0.5) I want to do some sky photography.#(timenext=4.0) #(close=short)"); data.Add("Signal_Vassa_1_Name","SOS CD8Y0"); data.Add("Signal_Vassa_1_Dial","#(timenext=1.0) Last Travels Log, I'm lost#(timenext=4.0) #(switchanim=1,showui=true,clear=1) I've been a week stuck in this planet and I'm pretty sure this is Sunset Bay...#(switchanim=2,cameraui=false,timenext=2.0) but as if nothing was ever here.#(timenext=2.0) #(switchanim=3,clear=1)The spacecraft #(switchanim=0)is severely damaged, with multiple leaks that I have to fix.#(timenext=2.0) #(clear=1)Following the Program's policy, in case of being stranded in any star system, I have to setup emergency signals across the system.#(timenext=2.0) #(clear=1)One of them has to be powerful enough for its signal to reach other stars, while also being on a fast-rotating body.#(timenext=4.0) #(switchanim=4,clear=1)I know a perfect place for that.#(timenext=4.0) #(close=short)"); diff --git a/src/OtherWorldsProgram/OWP.cs b/src/OtherWorldsProgram/OWP.cs index e55203b..8130955 100644 --- a/src/OtherWorldsProgram/OWP.cs +++ b/src/OtherWorldsProgram/OWP.cs @@ -28,6 +28,8 @@ Progress Data public static bool artifact1Spawned = false; public static bool artifact2Spawned = false; + public static bool popout1shown = false, popout1shownNow = false; + public static bool popout2shown = false, popout2shownNow = false; /* Object-tracking data @@ -217,7 +219,8 @@ public void OnDisable() { private void _OnNewSaveFile() { Debug.Log("[Other Worlds] Running new savefile routine..."); - OWP_PlanetManager.SpawnCustomWaypoints(); + OWP_PlanetManager.SpawnCustomWaypoints(); + OWP_Popout.OnFirstKSC(); } /* @@ -229,6 +232,8 @@ public override void OnSave(ConfigNode node) { node.AddValue("owProgress", progress); node.AddValue("a1s", artifact1Spawned); node.AddValue("a2s", artifact2Spawned); + node.AddValue("popout1shown", popout1shown); + node.AddValue("popout2shown", popout2shown); node.AddValue("newSaveChecksDone", !runNewSavefileRoutine); } @@ -245,6 +250,11 @@ public override void OnLoad(ConfigNode node) { if(node.HasValue("a2s")) artifact2Spawned = Boolean.Parse(node.GetValue("a2s")); + if(node.HasValue("popout1shown")) + popout1shown = Boolean.Parse(node.GetValue("popout1shown")); + if(node.HasValue("popout2shown")) + popout2shown = Boolean.Parse(node.GetValue("popout2shown")); + if(node.HasValue("newSaveChecksDone")) runNewSavefileRoutine = !Boolean.Parse(node.GetValue("newSaveChecksDone")); else diff --git a/src/OtherWorldsProgram/OWP_EventsManager.cs b/src/OtherWorldsProgram/OWP_EventsManager.cs index 5d94900..91c0dd4 100644 --- a/src/OtherWorldsProgram/OWP_EventsManager.cs +++ b/src/OtherWorldsProgram/OWP_EventsManager.cs @@ -70,6 +70,7 @@ private void OnGameSceneSwitchRequested(GameEvents.FromToAction", date), + OWP_LOC.Get("Popout_First_Refs") + ); + } + + public static void OnEnterEditor() { + bool show1 = !OWP.popout1shown && OWP.GetProgressBit(28) && !OWP.popout1shownNow; + bool show2 = !OWP.popout2shown && OWP.GetProgressBit(29) && !OWP.popout2shownNow; + + if(show1) { OWP.popout1shown = true; OWP.popout1shownNow = true; } + if(show2) { OWP.popout2shown = true; OWP.popout2shownNow = true; } + + string loc = ""; + if(show1 && show2) { + loc = "SecondThird"; + } else if(show1) { + loc = "Second"; + } else if(show2) { + loc = "Third"; + } else { + return; + } + + string date = KSPUtil.PrintDate(Planetarium.GetUniversalTime(), false) + "."; + + SpawnPopout( + OWP_LOC.Get("Popout_First_Header"), + OWP_LOC.Get($"Popout_{loc}_Body").Replace("", date), + OWP_LOC.Get("Empty") + ); + } + + public static void SpawnPopout(string header, string body, string references) { + if(instance != null) { + instance.DeletePopout(); + instance = null; + } + + GameObject ui = OWP.LoadAsset(PREFAB_PATH); + ui.transform.SetParent(MainCanvasUtil.MainCanvas.transform); + ui.AddComponent(); //Add Drag MonoBehaivour to LaserUI + ui.SetActive(true); + + if(ui == null) { + Debug.LogError($"[Other Worlds] Couldn't instantiate '{PREFAB_PATH}'. Check Asset Bundle. Popout spawn cancelled."); + return; + } + + instance = ui.AddComponent(); + + ui.transform.Find("Header").GetComponent().text = header; + ui.transform.Find("Body").GetComponent().text = body; + ui.transform.Find("References").GetComponent().text = references; + + instance.buttonClose = ui.transform.Find("ButtonClose").GetComponent