diff --git a/.gitignore b/.gitignore index ba1538e..a5669d8 100644 --- a/.gitignore +++ b/.gitignore @@ -362,3 +362,4 @@ MigrationBackup/ FodyWeavers.xsd AnnouncementDraft.txt +Cutscenes/ diff --git a/CarefreeMelodyItem.cs b/CarefreeMelodyItem.cs new file mode 100644 index 0000000..121da5e --- /dev/null +++ b/CarefreeMelodyItem.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ItemChanger; +using ItemChanger.Items; +using UnityEngine; + +namespace HKSecondQuest +{ + internal class CarefreeMelodyItem : ItemChanger.Items.CharmItem + { + public class Sprite : ISprite + { + public UnityEngine.Sprite Value + { + get { return CharmIconList.Instance.nymmCharm; } + } + + public ISprite Clone() + { + return new Sprite(); + } + } + public CarefreeMelodyItem() + { + charmNum = 40; + } + + public override void GiveImmediate(GiveInfo info) + { + base.GiveImmediate(info); + PlayerData.instance.charmCost_40 = 3; + PlayerData.instance.grimmChildLevel = 5; + GameObject.Find("Queen").LocateMyFSM("Conversation Control").SendEvent("GET ITEM MSG END"); //to make queen fsm advance + } + } +} diff --git a/Endings/EndingA.cs b/Endings/EndingA.cs new file mode 100644 index 0000000..f6d250c --- /dev/null +++ b/Endings/EndingA.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; +using UnityEngine.Video; + +namespace HKSecondQuest.Endings +{ + internal class CutsceneChanger : MonoBehaviour + { + bool changed = false; + public string Cutscene; + void Update() + { + if (!changed && GetComponent()) + { + changed = true; + string dir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Cutscenes", Cutscene); + GetComponent().Stop(); + GetComponent().url = dir; + GetComponent().aspectRatio = VideoAspectRatio.FitInside; + GetComponent().Play(); + } + } + } + internal class EndingA : Room + { + public EndingA() : base("Cinematic_Ending_A") { } + + public override void OnLoad() + { + GameObject.Find("Cinematic Player").AddComponent().Cutscene = "Ending1.mp4"; + } + } +} diff --git a/Endings/EndingC.cs b/Endings/EndingC.cs new file mode 100644 index 0000000..27eb266 --- /dev/null +++ b/Endings/EndingC.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Endings +{ + internal class EndingC : Room + { + public EndingC() : base("Cinematic_Ending_C") { } + + public override void OnLoad() + { + GameObject.Find("Cinematic Player").AddComponent().Cutscene = "Ending2.mp4"; + + } + } +} diff --git a/GameCompletion.cs b/GameCompletion.cs index bdaa197..8d9d0bf 100644 --- a/GameCompletion.cs +++ b/GameCompletion.cs @@ -27,7 +27,7 @@ public static void CalculateCompletion(On.PlayerData.orig_CountGameCompletion or if (!Enabled) return; - int charmCount = self.GetInt("charmsOwned"); //max 17 + int charmCount = self.GetInt("charmsOwned"); //max 19 int nailUpgrades = self.GetInt("nailSmithUpgrades"); // max 3 @@ -38,7 +38,7 @@ public static void CalculateCompletion(On.PlayerData.orig_CountGameCompletion or if (self.GetInt("screamLevel") > 0) spells++; if (self.GetInt("quakeLevel") > 0) spells++; - int mainUpgrades = 0; //max 7 + int mainUpgrades = 0; //max 8 if (self.GetBool("hasDoubleJump")) mainUpgrades++; if (self.GetBool("hasSuperDash")) mainUpgrades++; if (self.GetBool("hasTramPass")) mainUpgrades++; @@ -46,16 +46,17 @@ public static void CalculateCompletion(On.PlayerData.orig_CountGameCompletion or if (self.GetBool("hasLantern")) mainUpgrades++; if (self.GetBool("hasDreamNail")) mainUpgrades++; if (self.GetBool("hasDreamGate")) mainUpgrades++; + if (self.GetBool("dreamNailUpgraded")) mainUpgrades++; int dreamers = 0; //max 3 if (self.GetBool("monomonDefeated")) dreamers++; if (self.GetBool("hegemolDefeated")) dreamers++; if (self.GetBool("lurienDefeated")) dreamers++; - int masks = self.GetInt("maxHealth") - 5; //max 1 + int masks = self.GetInt("maxHealth") - 5; //max 2 int vessels = self.GetInt("MPReserveMax") / 33; //max 1 - float percentage = 3 * charmCount + 2 * nailUpgrades + 3 * charmNotches + 2 * spells + 2 * mainUpgrades + 3 * dreamers + 3 * masks + 2 * vessels; + float percentage = 3 * charmCount + 1 * nailUpgrades + 2 * charmNotches + 2 * spells + 2 * mainUpgrades + 2 * dreamers + 2 * masks + 2 * vessels; if (percentage > 100) percentage = 100; diff --git a/GeneralChanges.cs b/GeneralChanges.cs index fe62d6c..f8c1743 100644 --- a/GeneralChanges.cs +++ b/GeneralChanges.cs @@ -30,6 +30,12 @@ public static void ChangeText() ReplaceText("STAG_RUINS2", "Welcome traveler, to the Glimmering City! It seems to be a little worse for wear at the moment, though.No wonder the stag network is so dilapitated, with all this water running in."); ReplaceText("STAG_CROSSROADS", "Ah, the old village on the road to the Glimmering City! Travelers often stayed here for the night, in one of the Inns.Not sure how many are left, though.I heard there's a little cleptomaniac bug that lives deep within the plantations. Maybe you should pay him a visit. You also seem to like collecting things."); ReplaceText("STAG_NEST", "This is where we stags live. Please don't wake anyone up, being a stag is hard work!", "Stag"); + ReplaceText("STAG_HIDDEN", "Ah, the old station at the King's Palace. It does seem to be in quite bad shape, a wonder that it still works.Though I doubt it will see much travel in the future."); + ReplaceText("STAG_DREAM", "I wonder how my brethren are doing? I really can handle all trafic on my own these days..."); + ReplaceText("STAG_TRAM", "Oh, you carry a tram pass! They are beautiful machines, aren't they? Though I always said they should leave out the windows. Travel just isn't the same without the fresh breeze in your mane."); + ReplaceText("STAG_HOPE_1", "The stag nest. Be careful, it's quite crammed. Once dozens of stags were necessary to run the stag network. Now I can easily handle everyone. I'm the youngest, you see? So the burden fell on me."); + ReplaceText("STAG_HOPE_2", "There have been now new stags as well for quite some time. It just isn't necessary these days. So everyone just gets older and older."); + ReplaceText("STAG_REMEMBER_1", "Ah, Cornifer has been busy, hasn't he? At least some of the network is up and running again. I'm sure business will be right back to normal soon."); //inventory text ReplaceText("INV_DESC_WHITEKEY", "A very fancy, glimmering key"); @@ -65,6 +71,8 @@ public static void ChangeText() ReplaceText("CHARM_DESC_30", "A strange medal given to you by Mothman. It might contain drugs."); ReplaceText("CHARM_DESC_3", "A present from an old catapillar. Probably won't change your size though."); ReplaceText("CHARM_DESC_31", "A very pretty medal. Could probably be sold for a good prize to a collector. If you had a mouth to barter with, that is."); + ReplaceText("CHARM_DESC_40_N", "A finely crafted medal, eternally giving off a faint lullaby.
Crafted by a mother mourning her family."); + ReplaceText("CHARM_DESC_38", "A little medal with an emblem shaped like a flower. Used by gardeners across the world to repell snail invasions."); //Replace Elegy to Hallownest ReplaceText("PROLOGUE_EXCERPT_01", "A note to all who it may concern:"); @@ -81,6 +89,13 @@ public static void ChangeText() /// public static void OnSceneLoad() { + + //fix bug when diving into direction changing transition + string entryGate = GameManager.instance.entryGateName; + if (entryGate.StartsWith("left") || entryGate.StartsWith("right")) HeroController.instance.exitedQuake = false; + if (entryGate.StartsWith("top") || entryGate.StartsWith("bot")) HeroController.instance.exitedSuperDashing = false; + + //fix playerdata bools if (HeroController.instance != null) { SetBool("crossroadsInfected", false); //uninfect crossroads @@ -99,6 +114,9 @@ public static void OnSceneLoad() SetBool("corn_abyssLeft", false); SetBool("corniferAtHome", false); SetBool("city2_sewerDoor", true); //open Emilitia entrance + SetBool("bathHouseWall", true); //break wall in right city elevator + SetBool("gladeDoorOpened", false); //lock glade door permanently + SetBool("whitePalaceMidWarp", false); //so the TFK dream warp works //SetBool("quirrelLeftEggTemple", true); //despawn quirrel in TBE } } diff --git a/HKSecondQuest.cs b/HKSecondQuest.cs index f5d0b3d..d347362 100644 --- a/HKSecondQuest.cs +++ b/HKSecondQuest.cs @@ -31,6 +31,7 @@ namespace HKSecondQuest public class SaveSettings { public bool glimmeringRealmEnabled = false; + public int revision = 1; } /// @@ -54,6 +55,8 @@ public class HKSecondQuest : Mod, ILocalSettings /// public Room ActiveRoom = null; + public Room PreviousRoom = null; + public RoomMirrorer RoomMirrorer = new RoomMirrorer(); /// @@ -65,10 +68,12 @@ public class HKSecondQuest : Mod, ILocalSettings public void OnLoadLocal(SaveSettings s) => saveSettings = s; public SaveSettings OnSaveLocal() => saveSettings; + public const int CurrentRevision = 2; + public HKSecondQuest() : base("The Glimmering Realm") { - Instance = this; + Instance = this; //Make sure the main menu text is changed, but disable all other functionalitly SetEnabled(false); @@ -87,7 +92,7 @@ public HKSecondQuest() : base("The Glimmering Realm") public override string GetVersion() { - return "v1.0.4.1"; + return "v1.1.0.0"; } public void SetEnabled(bool enabled) @@ -128,6 +133,7 @@ public void InitializeWorld(On.UIManager.orig_StartNewGame orig, UIManager self, //save that this is a glimmeringRealm save file saveSettings.glimmeringRealmEnabled = true; + saveSettings.revision = CurrentRevision; //Call OnWorldInit for all Room subclasses foreach (Room room in rooms) @@ -146,6 +152,8 @@ public void InitializeWorld(On.UIManager.orig_StartNewGame orig, UIManager self, /// public void CorrectGrubfather() { + if (!saveSettings.glimmeringRealmEnabled) return; + Settings set = (Settings)typeof(ItemChangerMod).GetField("SET", BindingFlags.NonPublic | BindingFlags.Static).GetValue(null); foreach(var placement in set.GetPlacements()) { @@ -162,6 +170,26 @@ public void CorrectGrubfather() } } + public void OnSaveLoad() + { + if (!saveSettings.glimmeringRealmEnabled) return; + + if (saveSettings.revision < CurrentRevision) + { + RevisionManager.OnRevision(saveSettings.revision, CurrentRevision); + + //apply changes from new revisions if old revisions are loaded + foreach(Room room in rooms) + { + if (room.Revision > saveSettings.revision) + { + room.OnWorldInit(); + } + } + } + saveSettings.revision = CurrentRevision; + } + /// /// Called when the mod is loaded @@ -185,6 +213,7 @@ public override void Initialize(Dictionary().sprite = titleSprite; //slightly blue, to make it stand apart from the background title.GetComponent().color = new UnityEngine.Color(193 / 255f, 225 / 255f, 253 / 255f); - title.transform.SetScaleMatching(2.7f); + title.transform.SetScaleMatching(2.7f); } } } @@ -344,5 +375,6 @@ public void OnUpdate(On.HeroController.orig_Update orig, global::HeroController GeneralChanges.OnUpdate(); } + } } \ No newline at end of file diff --git a/HKSecondQuest.csproj b/HKSecondQuest.csproj index ccf7d64..fab0ffc 100644 --- a/HKSecondQuest.csproj +++ b/HKSecondQuest.csproj @@ -6,7 +6,7 @@ - + HKSecondQuest TheGlimmeringRealm net472 @@ -24,13 +24,25 @@ + + + + + + + + + + + + diff --git a/Maps/Layout.png b/Maps/Layout.png index 155c3f4..710868e 100644 Binary files a/Maps/Layout.png and b/Maps/Layout.png differ diff --git a/Maps/PlacedCharms.txt b/Maps/PlacedCharms.txt index df6824c..5149654 100644 --- a/Maps/PlacedCharms.txt +++ b/Maps/PlacedCharms.txt @@ -14,4 +14,8 @@ Shaman Stone 19 Quick Slash 32 Dream Wielder 30 Grubsong 3 -Dashmaster 31 \ No newline at end of file +Dashmaster 31 +Carefree Melody 40N +Dreamshield + +Don't include Flukenest without adding Flukehermit dialog \ No newline at end of file diff --git a/Maps/Used Rooms.png b/Maps/Used Rooms.png index a68fa07..44aae15 100644 Binary files a/Maps/Used Rooms.png and b/Maps/Used Rooms.png differ diff --git a/Prefabs.cs b/Prefabs.cs index b46a50e..fe1abe5 100644 --- a/Prefabs.cs +++ b/Prefabs.cs @@ -36,5 +36,10 @@ internal class Prefabs public static Prefab LARGE_PLATFORM = new Prefab("Crossroads_01", "_Scenery/plat_float_07"); public static Prefab GARDENS_PLATFORM = new Prefab("Fungus3_08", "Royal Gardens Plat S"); public static Prefab BOUNCE_MUSHROOM = new Prefab("Fungus2_20", "Bounce Shroom B"); + public static Prefab DUSK_KNIGHT = new Prefab("Abyss_05", "Dusk Knight"); + public static Prefab WHITE_PALACE_ENTRANCE = new Prefab("White_Palace_11", "door1"); + public static Prefab DREAM_ENTRY = new Prefab("White_Palace_11", "Dream Entry"); + public static Prefab WHITE_PALACE_LEVER = new Prefab("White_Palace_14", "White Palace Orb Lever"); + public static Prefab PURE_VESSEL_STATUE = new Prefab("GG_Workshop", "GG_Statue_HollowKnight"); } } diff --git a/ReadMe.md b/ReadMe.md index d13c104..742bdfc 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -14,6 +14,7 @@ ItemChanger\ MenuChanger Made by Toboter +Cutscenes drawn by Gaia - the Dancer On The Sun Available on Scarab diff --git a/RevisionManager.cs b/RevisionManager.cs new file mode 100644 index 0000000..455c3c1 --- /dev/null +++ b/RevisionManager.cs @@ -0,0 +1,38 @@ +using ItemChanger; +using ItemChanger.Internal; +using ItemChanger.Tags; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest +{ + internal class RevisionManager + { + + public static void OnRevision(int oldRev, int newRev) + { + //Change Vengeful Spirit placement to Shade Soul + if (oldRev < 2 && newRev >= 2) + { + AbstractPlacement vsPlacement; + Ref.Settings.Placements.TryGetValue(LocationNames.City_Crest, out vsPlacement); + if (vsPlacement.CheckVisitedAny(VisitState.ObtainedAnyItem)) + { + //if VS has been collected, upgrade it to Shade Soul + PlayerData.instance.fireballLevel = 2; + } else + { + //otherwise change the placement + AbstractPlacement placement = Finder.GetLocation(LocationNames.City_Crest).Wrap(); + AbstractItem aitem = Finder.GetItem(ItemNames.Shade_Soul); + aitem.RemoveTags(); + placement.Add(aitem); + ItemChangerMod.AddPlacements(new AbstractPlacement[] { placement }, PlacementConflictResolution.Replace); + } + } + } + } +} diff --git a/Room.cs b/Room.cs index 9a1d17d..b01d1f0 100644 --- a/Room.cs +++ b/Room.cs @@ -30,6 +30,8 @@ public abstract class Room /// public int MinDamage = 0; + public int Revision = 1; //World init gets called if save from older Revision is loaded + /// The scene name of this room (or a placeholder if there is none) protected Room(string roomName) @@ -67,12 +69,17 @@ public virtual void OnLoad() {} /// Alternate name to be displayed in shops /// Alternate description to be displayed in shops /// Should the normal rewards of Seer be removed? (only applicable at that location) - public void SetItem(string location, string item, bool merge = false, int geoCost = 0, int essenceCost = 0, int grubCost = 0, string alternateName=null, string alternateDesc=null, bool destroySeerRewards=false) + public void SetItem(string location, string item, bool merge = false, int geoCost = 0, int essenceCost = 0, int grubCost = 0, string alternateName=null, string alternateDesc=null, bool destroySeerRewards=false, bool nonIncremental=false) { //find item and location AbstractPlacement placement = Finder.GetLocation(location).Wrap(); AbstractItem aitem = Finder.GetItem(item); + if (nonIncremental) + { + aitem.RemoveTags(); + } + //set cost tags if necessary if (geoCost > 0) { @@ -102,7 +109,7 @@ public void SetItem(string location, string item, bool merge = false, int geoCos } //choose conflict reolution methos - PlacementConflictResolution resolution = merge ? PlacementConflictResolution.MergeKeepingNew : PlacementConflictResolution.Throw; + PlacementConflictResolution resolution = merge ? PlacementConflictResolution.MergeKeepingNew : PlacementConflictResolution.Replace; //add placement ItemChangerMod.AddPlacements(new AbstractPlacement[] { placement }, resolution); diff --git a/Rooms/Area1/Area1.cs b/Rooms/Area1/Area1.cs index 1a8a73a..c93cc6b 100644 --- a/Rooms/Area1/Area1.cs +++ b/Rooms/Area1/Area1.cs @@ -28,13 +28,13 @@ public override void OnInit() ReplaceText("CLIFFS_GREET", "Good morning, quite a place to be meeting someone, isn't it?Since you're out here all alone, might I interest you in a ticket for the local stag station?"); ReplaceText("CORNIFER_REFUSE", "Not interested? A pitty, the stags are a real marvel. If you're nice, they'll even let you pet them."); ReplaceText("CLIFFS_BOUGHT", "If you're looking for respite, there's a small hut further up. Friendly guy. Used to be a cook."); - ReplaceText("CORNIFER_AGAIN", "Oh, back again? Might I interest you in a ticket after all?"); + ReplaceText("CORNIFER_AGAIN", "Oh, back again? Might I interest you after all?"); ReplaceText("CORNIFER_NOT_ENOUGH", "Not enough money? I thought so, that's probably the reason why no one is using it anymore. Too expensive, you see? But maintenance is costly."); ReplaceText("CORNIFER_INTRO_1", "Oh dear, I haven't even introduced myself, have I? The name's Cornifer. I'm an engineer for the stag network.
The only one left by now, probably. I'm currently on a journey to repair the stations out here, they are in quite a state, you know?"); ReplaceText("CORNIFER_INTRO_2", "Orders from the head stag masters are really getting sparse these days. No idea why, they used to be so hectic all the time. Couldn't happen to me if I tried."); ReplaceText("DREAM", "Being an engineer really is the best profession, isn't it?
Although I always wanted to be a cartographer. We'll see."); ReplaceText("CORNIFER_SUB", "The Engineer"); - ReplaceText("CORNIFER_MEET", "Quite a place to be meeting someone, isn't it?Since you're out here all alone, might I interest you in a ticket for Dirtmouth station?"); + ReplaceText("CORNIFER_MEET", "Quite a place to be meeting someone, isn't it?Since you're out here all alone, might I interest you in a ticket for the local stag station?"); ReplaceText("MATO_REFUSE", "Fair enough, come back later if you're interested."); ReplaceText("MATO_REPEAT", "Charms are really rewarding to make! It's a shame it's a dying art."); diff --git a/Rooms/Area2/Area2.cs b/Rooms/Area2/Area2.cs index bce14d4..6bfe4bc 100644 --- a/Rooms/Area2/Area2.cs +++ b/Rooms/Area2/Area2.cs @@ -20,7 +20,7 @@ public override void OnInit() ReplaceText("GREEN_TABLET_03", "Looking for gardener
Must be of reputable standing, and experienced with murdering shrubbery.

Pay 30 geo per hour"); ReplaceText("GREEN_TABLET_05", "Visit Unn's flower shop, now!
Discounts on all flesh eating plants!
Take two, get two for free!"); ReplaceText("GREEN_TABLET_07", "Keep off the pasture. It's full of durandoo dung."); - ReplaceText("GREEN_TABLET_02", "Elderly mossnight seeks VengeflyBush trimming experience requiredPaid in exposure"); + ReplaceText("GREEN_TABLET_02", "Elderly mossknight seeks VengeflyBush trimming experience requiredPaid in exposure"); ReplaceText("GREENPATH_MAIN", "Overgrown"); diff --git a/Rooms/Area3/Fungal19.cs b/Rooms/Area3/Fungal19.cs new file mode 100644 index 0000000..0404250 --- /dev/null +++ b/Rooms/Area3/Fungal19.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area3 +{ + internal class Fungal19 : Room + { + public Fungal19() : base("Fungus2_19") { } + public override void OnLoad() + { + PlaceGO(Prefabs.SMALL_PLATFORM.Object, 5, 14); + } + } +} diff --git a/Rooms/Area4/SlugShrine.cs b/Rooms/Area4/SlugShrine.cs new file mode 100644 index 0000000..69af7c0 --- /dev/null +++ b/Rooms/Area4/SlugShrine.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area4 +{ + internal class SlugShrine : Room + { + public SlugShrine() : base("Room_Slug_Shrine") {} + + public override void OnBeforeLoad() + { + GameObject.Find("Quirrel Slug Shrine").LocateMyFSM("deactivate").enabled = false; + } + } +} diff --git a/Rooms/Area5/FinalBossCore.cs b/Rooms/Area5/FinalBossCore.cs index 8d1cff7..5c4754f 100644 --- a/Rooms/Area5/FinalBossCore.cs +++ b/Rooms/Area5/FinalBossCore.cs @@ -3,16 +3,91 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using UnityEngine; namespace HKSecondQuest.Rooms.Area5 { + internal class EndingTransitionController : MonoBehaviour + { + bool started = false; + void Update() + { + if (!started && GameObject.Find("Boss Corpse") && GameObject.Find("Boss Corpse").LocateMyFSM("Corpse").ActiveStateName == "Idle") + { + started = true; + GameManager.instance.ChangeToScene("Cinematic_Ending_A", "door1", 0); + } + } + } + //Activates the Dream Transition to the Palace Gardens in the last phase + internal class DreamTransitionController : MonoBehaviour + { + GameObject dreamEntry; + void Start() + { + dreamEntry = Instantiate(Prefabs.DUSK_KNIGHT.Object, transform ); + dreamEntry.transform.localPosition = Vector3.zero; + string newEntryScene = "Deepnest_East_13"; + + dreamEntry.GetComponent().enabled = false; + dreamEntry.transform.GetChild(0).gameObject.SetActive(false);//disable tendrils + dreamEntry.transform.GetChild(2).gameObject.SetActive(false); + dreamEntry.transform.GetChild(1).gameObject.SetActive(false);//disable inspect region + + PlayMakerFSM entryControl = dreamEntry.transform.GetChild(3).gameObject.LocateMyFSM("Control"); + entryControl.FsmVariables.FindFsmString("To Scene").Value = newEntryScene; + + dreamEntry.SetActive(false); + } + + + + void Update() + { + if (gameObject.LocateMyFSM("Control").FsmVariables.FindFsmInt("Phase").Value == 4) + { + dreamEntry.SetActive(true); + } + } + } + + //because Hollow Knight Boss doesn't exist on load + internal class DreamTransitionAdder : MonoBehaviour + { + bool done = false; + void Update() + { + if (!done) + { + for (int i = 0; i < transform.childCount; i++) + { + GameObject go = transform.GetChild(i).gameObject; + if (go.name == "Hollow Knight Boss") + { + done = true; + go.AddComponent(); + } + } + } + } + } + internal class FinalBossCore : Room { - public FinalBossCore() : base("Room_Final_Boss_Core") { MinDamage = 2; } + public FinalBossCore() : base("Room_Final_Boss_Core") { } public override void OnBeforeLoad() { SetDarkness(true); } + + public override void OnLoad() + { + GameObject.Find("Boss Control").AddComponent(); + GameObject.Find("Boss Control").AddComponent(); + } + + + } } diff --git a/Rooms/Area6/Abyss21.cs b/Rooms/Area6/Abyss21.cs new file mode 100644 index 0000000..7f11b84 --- /dev/null +++ b/Rooms/Area6/Abyss21.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class Abyss21 : Room + { + public Abyss21() : base("Abyss_21") { IsFlipped = true; } + } +} diff --git a/Rooms/Area6/Abyss4.cs b/Rooms/Area6/Abyss4.cs new file mode 100644 index 0000000..2408956 --- /dev/null +++ b/Rooms/Area6/Abyss4.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class Abyss4 : Room + { + public Abyss4() : base("Abyss_04") { } + public override void OnLoad() + { + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 55, 9.5f, Quaternion.Euler(0, 0, 90)); + } + } +} diff --git a/Rooms/Area6/Abyss5.cs b/Rooms/Area6/Abyss5.cs new file mode 100644 index 0000000..61a46c2 --- /dev/null +++ b/Rooms/Area6/Abyss5.cs @@ -0,0 +1,19 @@ +using HutongGames.PlayMaker.Actions; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class Abyss5 : Room + { + public Abyss5() : base("Abyss_05") { } + public override void OnLoad() + { + DestroyGO("Dusk Knight"); + } + } +} diff --git a/Rooms/Area6/Area6.cs b/Rooms/Area6/Area6.cs new file mode 100644 index 0000000..862de1b --- /dev/null +++ b/Rooms/Area6/Area6.cs @@ -0,0 +1,79 @@ +using ItemChanger; +using ItemChanger.Internal; +using ItemChanger.UIDefs; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class Area6 : Room + { + public Area6() : base("Area 6") { Revision = 2; } + + public override void OnWorldInit() + { + SetTransition("Ruins2_10b", "left1", "Abyss_18", "left1"); + SetTransition("Abyss_18", "right1", "Abyss_04", "left1"); + SetTransition("Abyss_04", "bot1", "RestingGrounds_02", "top1"); + SetTransition("RestingGrounds_02", "left1", "RestingGrounds_05", "left1"); + SetTransition("RestingGrounds_05", "bot1", "RestingGrounds_17", "right1"); + SetTransition("RestingGrounds_05", "right2", "Abyss_22", "left1"); + SetTransition("RestingGrounds_05", "left2", "Room_Queen", "left1"); + SetTransition("RestingGrounds_05", "left3", "RestingGrounds_04", "right1"); + SetTransition("RestingGrounds_04", "left1", "Abyss_04", "right1"); + SetTransition("Abyss_04", "top1", "Abyss_02", "bot1"); + SetTransition("Abyss_02", "right1", "Abyss_05", "left1"); + SetTransition("Abyss_05", "right1", "Abyss_21", "right1"); + + SetItem(LocationNames.Dreamshield, ItemNames.Mask_Shard); + SetItem(LocationNames.Hidden_Station_Stag, ItemNames.Kings_Idol); + + SetItem(LocationNames.Ancient_Basin_Map, ItemNames.Hidden_Station_Stag); + SetItem(LocationNames.Vessel_Fragment_Basin, ItemNames.Mask_Shard); + + //place Carefree Melody + AbstractPlacement placement = Finder.GetLocation(LocationNames.Queen_Fragment).Wrap(); + AbstractItem aitem = new CarefreeMelodyItem(); + aitem.UIDef = new MsgUIDef() { + name = new BoxedString("Carefree Melody"), + shopDesc = new BoxedString(""), + sprite = new CarefreeMelodyItem.Sprite() + //sprite=new BoxedSprite(SpriteManager.Instance.GetSprite("ItemChanger.Resources.Charms.40.png")) + }; + placement.Add(aitem); + ItemChangerMod.AddPlacements(new AbstractPlacement[] { placement }, PlacementConflictResolution.Replace); + + SetItem(LocationNames.Wanderers_Journal_Ancient_Basin, ItemNames.Rancid_Egg); + SetItem(LocationNames.Monarch_Wings, ItemNames.Awoken_Dream_Nail); + } + + public override void OnInit() + { + ReplaceText("HIDDEN_STATION", "Palace Gardens", "StagMenu"); + ReplaceText("HIDDEN_STATION_SUPER", "The King's"); + ReplaceText("RESTING_GROUNDS_SUPER", "Old Palace"); + ReplaceText("RESTING_GROUNDS_MAIN", "Graveyard"); + ReplaceText("ABYSS_MAIN", "Gardens"); + ReplaceText("ABYSS_SUPER", "Scorched"); + ReplaceText("PALACE_GROUNDS_MAIN", "Ruins"); + ReplaceText("ABYSS", "Scorched Gardens", "MapZones"); + ReplaceText("PALACE_GROUNDS", "Palace Ruins", "MapZones"); + ReplaceText("RESTING_GROUNDS", "Old Graveyard", "MapZones"); + + ReplaceText("QUEEN_SUPER", "The Glimmering"); + ReplaceText("QUEEN_DUNG_02", "When I was young we used to try and sneak them into peoples back pockets, for a laugh."); + ReplaceText("QUEEN_DUNG", "You poor thing! Did someone sell you one of those old prank charms?"); + ReplaceText("QUEEN_DREAM", "Will I ever leave here alive? These gardens used to bloom so beautifully. How I loathe that usurper!"); + ReplaceText("QUEEN_MEET", "Aah, someone's there! Are you one of his men!? Please! Don't tell him! I'll give you anything I've got!"); + ReplaceText("QUEEN_TALK_01", "So... you aren't a member of the masked army? What a relief! Thank you for finding me. I've been hiding here for an eternity. Keep the charm, maybe you can help me. If you want."); + ReplaceText("QUEEN_TALK_02", "My husband has been locked deep below, battered and beaten, to suffer for all eternity.I want you to break the seal placed on him, to end his pain forever."); + ReplaceText("QUEEN_TALK_EXTRA", "Killing him won't be enough... a more powerful strike will be needed to break his seal.I know there are tools to enter minds. I know such a tool is hidden on these Grounds, but whether it's enough I cannot say.You may need to find a way to strengthen it."); + ReplaceText("QUEEN_MEET_REPEAT", "Please... I beg you... Release him from his suffering."); + + ReplaceText("ABYSS_GREET", "Ah, the little wanderer shows himself again! I have just finished fixing up the old station at the palace.Not much of a palace anymore. Filled with fortifications, burned down and smashed to bits. But the stag network has a duty to fullfill.Be careful, the station is still full of cable reels from my repairs."); + } + } +} diff --git a/Rooms/Area6/Queen.cs b/Rooms/Area6/Queen.cs new file mode 100644 index 0000000..b1e21b6 --- /dev/null +++ b/Rooms/Area6/Queen.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class Queen : Room + { + public Queen() : base("Room_Queen") { + IsFlipped = true; + } + + public override void OnLoad() + { + GameObject.Find("Queen Item").transform.SetScaleX(-1); + } + } +} diff --git a/Rooms/Area6/RestingGrounds17.cs b/Rooms/Area6/RestingGrounds17.cs new file mode 100644 index 0000000..91f006e --- /dev/null +++ b/Rooms/Area6/RestingGrounds17.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class RestingGrounds17 : Room + { + public RestingGrounds17() : base("RestingGrounds_17") { IsFlipped = true; } + + public override void OnBeforeLoad() + { + + } + } +} diff --git a/Rooms/Area6/RestingGrounds2.cs b/Rooms/Area6/RestingGrounds2.cs new file mode 100644 index 0000000..fb33a7d --- /dev/null +++ b/Rooms/Area6/RestingGrounds2.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class RestingGrounds2 : Room + { + public RestingGrounds2() : base("RestingGrounds_02") { IsFlipped = true; } + public override void OnLoad() + { + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 127, 6, Quaternion.Euler(0, 0, 90)); + } + } +} diff --git a/Rooms/Area6/RestingGrounds4.cs b/Rooms/Area6/RestingGrounds4.cs new file mode 100644 index 0000000..cc51c0e --- /dev/null +++ b/Rooms/Area6/RestingGrounds4.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area6 +{ + internal class RestingGrounds4 : Room + { + public RestingGrounds4() : base("RestingGrounds_04") { } + public override void OnLoad() + { + DestroyGO("Binding Shield Activate"); + DestroyGO("Dreamer Plaque Inspect"); + } + } +} diff --git a/Rooms/Area7/Area7.cs b/Rooms/Area7/Area7.cs new file mode 100644 index 0000000..a34b3a7 --- /dev/null +++ b/Rooms/Area7/Area7.cs @@ -0,0 +1,55 @@ +using ItemChanger; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area7 +{ + internal class Area7 : Room + { + public Area7() : base("Area 7") { Revision = 2; } + + public override void OnWorldInit() + { + SetTransition("Deepnest_East_13", "bot1", "Deepnest_East_06", "top1"); + SetTransition("Deepnest_East_06", "left1", "Deepnest_East_04", "right1"); + SetTransition("Deepnest_East_06", "door1", "Deepnest_East_17", "left1"); + SetTransition("Deepnest_East_06", "right1", "Deepnest_East_14b", "right1"); + SetTransition("Deepnest_East_14b", "top1", "Deepnest_East_12", "right1"); + SetTransition("Deepnest_East_12", "left1", "Deepnest_East_08", "right1"); + SetTransition("Deepnest_East_08", "top1", "Deepnest_East_03", "right2"); + SetTransition("Deepnest_East_03", "left2", "Deepnest_East_04", "right2"); + SetTransition("Deepnest_East_04", "left2", "Deepnest_East_15", "left1"); + + SetItem(LocationNames.Wanderers_Journal_Kingdoms_Edge_Camp, ItemNames.Soul_Totem_B); + SetItem(LocationNames.Quick_Slash, ItemNames.Mask_Shard); + SetItem(LocationNames.Wanderers_Journal_Kingdoms_Edge_Entrance, ItemNames.Hallownest_Seal); + SetItem(LocationNames.Kingdoms_Edge_Map, ItemNames.Mask_Shard); + SetItem(LocationNames.Wanderers_Journal_Kingdoms_Edge_Requires_Dive, ItemNames.Dreamshield); + } + + public override void OnInit() + { + //Bardoon Text + ReplaceText("BIG_CATERPILLAR_SUPER", "Dream Worm"); + ReplaceText("BIGCAT_INTRO", "Huu, another one who wanders dreams. Sit with me and chat a little, will you?"); + ReplaceText("BIGCAT_KING_BRAND", "You see, I am a Dream Worm. Like a book worm wanders through the pages of the books in a library, I wander through the dreams of the world."); + ReplaceText("BIGCAT_TALK_01", "I see you carry an instrument to enter dreams yourself. But how crudely made."); + ReplaceText("BIGCAT_TALK_02", "When our kind roamed the material plane, we used to be hunted for our bones. They carved them into powerful weapons like the one you wield. Now we rarely leave the safety of dreams."); + ReplaceText("BIGCAT_TALK_03", "I wonder whose dream this is? How powerful they must be, to dream such grand a place, and how tortured, that all these hideous beasts invaded these gardens."); + ReplaceText("BIGCAT_REPEAT", "Have you seen the thick patches of white flowers growing everywhere? True beauty..."); + ReplaceText("BIGCAT_TAIL_HIT", "You hit my tail? Oh, my tail that is not. Another must have passed by, burrowing somewhere else now."); + ReplaceText("BIGCAT_DREAM", "Your little toothpick is no match for me. Leave it."); + + //Cornifer + ReplaceText("OUTSKIRTS_GREET", "Oh dear, the Mask Makers mob is coming ever closer. They baricaded the gate, but I hear there's a lot of fighting.I hope I'll be safe here. If not I'll flee deeper into the waterways. Those bastards already cut the signaling wires to the palace. They'll take ages to replace!Oh, by the way, on my way through these pipes I found this. Would you be interested?"); + + //Area text + ReplaceText("OUTSKIRTS", "Palace Gardens"); + ReplaceText("OUTSKIRTS_SUPER", "Blooming"); + ReplaceText("OUTSKIRTS_MAIN", "Palace Gardens"); + } + } +} diff --git a/Rooms/Area7/Edge12.cs b/Rooms/Area7/Edge12.cs new file mode 100644 index 0000000..78f69b1 --- /dev/null +++ b/Rooms/Area7/Edge12.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area7 +{ + internal class Edge12 : Room + { + public Edge12() : base("Deepnest_East_12") { } + public override void OnLoad() + { + DestroyGO("Hornet Encounter Outskirts"); + } + } +} diff --git a/Rooms/Area7/Edge13.cs b/Rooms/Area7/Edge13.cs new file mode 100644 index 0000000..ed7d6fe --- /dev/null +++ b/Rooms/Area7/Edge13.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area7 +{ + internal class Edge13 : Room + { + public Edge13() : base("Deepnest_East_13") { } + public override void OnBeforeLoad() + { + GameObject dreamEntrance = PlaceGO(Prefabs.WHITE_PALACE_ENTRANCE.Object, 27, 10); + dreamEntrance.GetComponent().name = "door1"; + dreamEntrance.SetActive(true); + + PlaceGO(Prefabs.DREAM_ENTRY.Object, 30, 10).name = "Dream Entrance"; + } + + public override void OnLoad() + { + DestroyGO("RestBench"); + DestroyGO("outskirts__0005_camp (1)"); + DestroyGO("outskirts__0002_camp"); + GameObject.Find("Soul Totem-Wanderer's_Journal-Kingdom's_Edge_Camp").transform.SetPositionZ(0.1f); + } + } +} diff --git a/Rooms/Area7/Edge14b.cs b/Rooms/Area7/Edge14b.cs new file mode 100644 index 0000000..67f941f --- /dev/null +++ b/Rooms/Area7/Edge14b.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area7 +{ + internal class Edge14b : Room + { + public Edge14b() : base("Deepnest_East_14b") { IsFlipped = true; } + } +} diff --git a/Rooms/Area7/Edge15.cs b/Rooms/Area7/Edge15.cs new file mode 100644 index 0000000..39dd29f --- /dev/null +++ b/Rooms/Area7/Edge15.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area7 +{ + internal class Edge15 : Room + { + public Edge15() : base("Deepnest_East_15") { IsFlipped = true; } + } +} diff --git a/Rooms/Area7/Edge3.cs b/Rooms/Area7/Edge3.cs new file mode 100644 index 0000000..378fc03 --- /dev/null +++ b/Rooms/Area7/Edge3.cs @@ -0,0 +1,22 @@ +using HutongGames.PlayMaker; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area7 +{ + internal class Edge3 : Room + { + + public Edge3() : base("Deepnest_East_03") { } + + public override void OnLoad() + { + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 4, 101, Quaternion.Euler(0, 0, 90)); + + } + } +} diff --git a/Rooms/Area7/Edge4.cs b/Rooms/Area7/Edge4.cs new file mode 100644 index 0000000..4e49d46 --- /dev/null +++ b/Rooms/Area7/Edge4.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area7 +{ + internal class Edge4 : Room + { + public Edge4() : base("Deepnest_East_04") { } + public override void OnLoad() + { + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 14, 3, Quaternion.Euler(0, 0, 90)); + } + } +} diff --git a/Rooms/Area8/Area8.cs b/Rooms/Area8/Area8.cs new file mode 100644 index 0000000..5184f31 --- /dev/null +++ b/Rooms/Area8/Area8.cs @@ -0,0 +1,37 @@ +using ItemChanger; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class Area8 : Room + { + public Area8() : base("Area 8") { Revision = 2; } + + public override void OnWorldInit() + { + SetTransition("Deepnest_East_03", "right1", "White_Palace_11", "left1"); + SetTransition("White_Palace_11", "door2", "White_Palace_05", "right1"); + SetTransition("White_Palace_05", "left1", "White_Palace_03_hub", "bot1"); + SetTransition("White_Palace_03_hub", "left2", "White_Palace_13", "left2"); + SetTransition("White_Palace_03_hub", "left1", "White_Palace_13", "left1"); + SetTransition("White_Palace_13", "right1", "Room_Mender_House", "left1"); + SetTransition("Room_Mender_House", "left1", "White_Palace_03_hub", "left1", oneWay: true); + SetTransition("White_Palace_03_hub", "right1", "White_Palace_15", "left1"); + SetTransition("White_Palace_15", "right2", "White_Palace_04", "right2"); + SetTransition("White_Palace_04", "top1", "White_Palace_15", "right1"); + //SetTransition("White_Palace_03_hub", "top1", "GG_Hollow_Knight", "door1"); + } + + public override void OnInit() + { + ReplaceText("MENDER_DIARY", "Hi, my name is Toboter. We've probably never talked, but it seems you are enjoying my mod. And I just wanted to thank you with all my heart for playing it.Many people have contributed to this. I couldn't have changed the game's world like I did without the ItemChanger Mod by homothety and Flibber. And Gaia - the Dancer On The Sun did wonderful work on the cutscenes, which truely elevate the story. homothety also made the MenuChanger mod that made it possible for me to make this a seperate game mode.I want to thank Exempt-Medic, DwarfWoot, Rye and all the other playtesters for enduring a less than stellar version of this mod.
And I want to thank everyone in the Hollow Knight Modding Discord who offered guidance and technical help.But the final person I want to thank...Is the one who recommended you the mod.They're the real hero of this story.You want to be thanked for playing? I did that at the very start! Were you even listening?!Okay...fine...Thank you so much for playing. If you want to chat, there's a channel in the Modding Discord. I hope I could temporarily ease some of the burdens on your current path in life. So... Good luck with the rest of the mod, I guess!"); + ReplaceText("WHITE_PALACE", "The Glimmering Palace"); + ReplaceText("WHITE_PALACE_SUPER", "The Glimmering"); + ReplaceText("HK_PRIME_MAIN", "The Glimmering King"); + } + } +} diff --git a/Rooms/Area8/MenderHouse.cs b/Rooms/Area8/MenderHouse.cs new file mode 100644 index 0000000..2b64268 --- /dev/null +++ b/Rooms/Area8/MenderHouse.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class MenderHouse : Room + { + public MenderHouse() : base("Room_Mender_House") { IsFlipped = true; } + } +} diff --git a/Rooms/Area8/PureVessel.cs b/Rooms/Area8/PureVessel.cs new file mode 100644 index 0000000..a766363 --- /dev/null +++ b/Rooms/Area8/PureVessel.cs @@ -0,0 +1,43 @@ +using HutongGames.PlayMaker; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class EndingController : MonoBehaviour + { + bool started = false; + void Update() + { + GameObject pvCorpse = GameObject.Find("Corpse HK Prime(Clone)"); + if (pvCorpse != null) + { + Fsm control = pvCorpse.LocateMyFSM("corpse").Fsm; + if (!started && control.ActiveStateName == "End Scene") + { + started = true; + GameManager.instance.ChangeToScene("Cinematic_Ending_C", "door1", 0); + } + } + } + } + internal class PureVessel : Room + { + public PureVessel() : base("GG_Hollow_Knight") { } + public override void OnBeforeLoad() + { + + } + public override void OnLoad() + { + DestroyGO("Godseeker Crowd"); + GameObject.Find("HK Prime").GetComponent().hp = 1000; + GameObject.Find("Boss Scene Controller").AddComponent(); + } + } +} diff --git a/Rooms/Area8/WhitePalace11.cs b/Rooms/Area8/WhitePalace11.cs new file mode 100644 index 0000000..b463426 --- /dev/null +++ b/Rooms/Area8/WhitePalace11.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class WhitePalace11 : Room + { + public WhitePalace11() : base("White_Palace_11") { } + + public override void OnBeforeLoad() + { + GameObject left1 = PlaceGO(Prefabs.LEFT_TRANSITION.Object, 11, 18, Quaternion.identity); + left1.SetActive(true); + left1.name = "left1"; + left1.transform.GetChild(2).gameObject.SetActive(false); + } + + public override void OnLoad() + { + DestroyGO("dream_nail_base"); + DestroyGO("dream_beam_animation"); + DestroyGO("doorWarp"); + } + } +} diff --git a/Rooms/Area8/WhitePalace13.cs b/Rooms/Area8/WhitePalace13.cs new file mode 100644 index 0000000..63a10fc --- /dev/null +++ b/Rooms/Area8/WhitePalace13.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class WhitePalace13 : Room + { + public WhitePalace13() : base("White_Palace_13") { IsFlipped = true; } + public override void OnLoad() + { + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 105, 212); + } + } +} diff --git a/Rooms/Area8/WhitePalace3Hub.cs b/Rooms/Area8/WhitePalace3Hub.cs new file mode 100644 index 0000000..3b7bfda --- /dev/null +++ b/Rooms/Area8/WhitePalace3Hub.cs @@ -0,0 +1,64 @@ +using GlobalEnums; +using HutongGames.PlayMaker; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class PVGate : MonoBehaviour + { + bool startedTransition = false; + public static GameObject pvStatue; + + + private void OnTriggerEnter2D(Collider2D movingObj) + { + if (!startedTransition && movingObj.gameObject.layer == 9 && GameManager.instance.gameState == GameState.PLAYING) + { + startedTransition = true; + Fsm statueControl = pvStatue.transform.GetChild(0).gameObject.LocateMyFSM("GG Boss UI").Fsm; + + statueControl.GetState("Take Control").Transitions[0].ToFsmState = statueControl.GetState("Impact"); + statueControl.Variables.FindFsmString("Return Scene").Value = "White_Palace_03_hub"; + statueControl.Variables.FindFsmString("To Scene").Value = "GG_Hollow_Knight"; + statueControl.SetState("Take Control"); + + + } + } + } + + internal class WhitePalace3Hub : Room + { + GameObject pvStatue; + public WhitePalace3Hub() : base("White_Palace_03_hub") { } + + public override void OnBeforeLoad() + { + pvStatue = PlaceGO(Prefabs.PURE_VESSEL_STATUE.Object, 56, 46); + pvStatue.transform.GetChild(7).gameObject.name = "door_dreamReturn"; + PlayerData.instance.statueStateHollowKnight = new BossStatue.Completion { isUnlocked = true, hasBeenSeen = true }; + + PVGate.pvStatue = pvStatue; + + } + public override void OnLoad() + { + PlaceGO(Prefabs.WHITE_PALACE_LEVER.Object, 7.9f, 97.4f); + pvStatue.transform.GetChild(0).gameObject.LocateMyFSM("npc_control").enabled = false; + pvStatue.transform.GetChild(0).gameObject.SetActive(true); + pvStatue.transform.GetChild(1).gameObject.LocateMyFSM("inspect_region").enabled = false; + + GameObject gate = GameObject.Find("top1"); + GameObject.Destroy(gate.GetComponent()); + GameObject.Destroy(gate.GetComponent()); + gate.AddComponent(); + + GameObject.Find("top1").transform.position = new Vector3(53, 104, 0); + } + } +} diff --git a/Rooms/Area8/WhitePalace4.cs b/Rooms/Area8/WhitePalace4.cs new file mode 100644 index 0000000..496849d --- /dev/null +++ b/Rooms/Area8/WhitePalace4.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class WhitePalace4 : Room + { + public WhitePalace4() : base("White_Palace_04") { IsFlipped = true; } + + public override void OnLoad() + { + GameObject.Find("wp_saw_side_to_side1").GetComponent().speed = 0.95f; + GameObject.Find("saw_still (2)").transform.SetPositionY(44); + } + } +} diff --git a/Rooms/Area8/WhitePalace5.cs b/Rooms/Area8/WhitePalace5.cs new file mode 100644 index 0000000..54b0f2f --- /dev/null +++ b/Rooms/Area8/WhitePalace5.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.Area8 +{ + internal class WhitePalace5 : Room + { + public WhitePalace5() : base("White_Palace_05") { IsFlipped = true; } + } +} diff --git a/Rooms/City/BathhouseElevator.cs b/Rooms/City/BathhouseElevator.cs index 1726b16..a99c4df 100644 --- a/Rooms/City/BathhouseElevator.cs +++ b/Rooms/City/BathhouseElevator.cs @@ -13,7 +13,7 @@ public BathhouseElevator() : base("Ruins_Elevator") { } public override void OnLoad() { - PlaceGO(Prefabs.LARGE_PLATFORM.Object, 66, 98, Quaternion.Euler(0, 0, 90)); + //PlaceGO(Prefabs.LARGE_PLATFORM.Object, 66, 98, Quaternion.Euler(0, 0, 90)); } } } diff --git a/Rooms/City/City.cs b/Rooms/City/City.cs index 7038156..705febb 100644 --- a/Rooms/City/City.cs +++ b/Rooms/City/City.cs @@ -30,11 +30,14 @@ public override void OnWorldInit() SetTransition("Ruins_Bathhouse", "right1", "Room_Mansion", "left1"); + SetTransition("Ruins1_31", "bot1", "Room_GG_Shortcut", "top1"); + SetTransition("Room_GG_Shortcut", "left1", "Ruins2_10b", "right1"); + SetItem(LocationNames.Flukenest, ItemNames.Desolate_Dive); SetItem(LocationNames.Wanderers_Journal_Pleasure_House, ItemNames.Dream_Nail); SetItem(LocationNames.Kings_Station_Stag, ItemNames.Geo_Rock_Default); SetItem(LocationNames.Hallownest_Seal_Kings_Station, ItemNames.Wanderers_Journal); - SetItem(LocationNames.City_Crest, ItemNames.Vengeful_Spirit); + SetItem(LocationNames.City_Crest, ItemNames.Shade_Soul); SetItem(LocationNames.City_of_Tears_Map, ItemNames.Kings_Station_Stag); SetItem(LocationNames.World_Sense, ItemNames.Kings_Brand); SetItem(LocationNames.Grub_City_of_Tears_Guarded, ItemNames.Grub); @@ -46,7 +49,7 @@ public override void OnInit() { ReplaceText("RUINS_MAIN", "The Gray City"); ReplaceText("MAP_NAME_CITY", "The Gray City"); - ReplaceText("CITY", "The Gray City"); + ReplaceText("CITY", "The City"); ReplaceText("KINGS_STATION", "The Gray City"); ReplaceText("EGGTEMPLE_SUPER", "Mask Maker's"); ReplaceText("EGGTEMPLE_MAIN", "Vault"); @@ -65,7 +68,7 @@ public override void OnInit() ReplaceText("RELICDEALER_JOURNAL_2", "These aren't actually written by wanderers. Their stories just aren't captivating enough."); ReplaceText("RELICDEALER_JOURNAL_3", "You know, these were quite the rage for a while in Hallownest. No idea what happened with all those journals there."); ReplaceText("RELICDEALER_JOURNAL_4", "Oh, I really liked this one! It's about a slug warrior who carries his son with him in his house. Fantastic lore!"); - ReplaceText("RELICDEALER_JOURNAL_5", "Ah, another journal. Thanks!"); + ReplaceText("RELICDEALER_JOURNAL_5", "Hmm, this is a curious story. It seems to be written by a bug called Elena, about the depths of a derelict kingdom. Strange, I can't remember ever writing this."); ReplaceText("RELICDEALER_JOURNAL_6", "Ah, another journal. Thanks!"); ReplaceText("RELICDEALER_JOURNAL_7", "Ah, another journal. Thanks!"); ReplaceText("RELICDEALER_JOURNAL_8", "Ah, another journal. Thanks!"); @@ -73,19 +76,19 @@ public override void OnInit() ReplaceText("RELICDEALER_SEAL_2", "These little trinkets are in the shape of the Glimmering King's coat of arms. It's even got the little fork at the top!"); ReplaceText("RELICDEALER_SEAL_3", "You may think these look quite similar to the Seal of Hallownest, but you'd be wrong. They are actually a different shade of purple."); ReplaceText("RELICDEALER_SEAL_4", "You know, I heard of a land far away, called the land of storms. Its inhabitants are supposed to have mysterious and arcane powers. Perhaps some will come and visit one day?"); - ReplaceText("RELICDEALER_SEAL_5", "Ah, another seal! Thanks for that!"); + ReplaceText("RELICDEALER_SEAL_5", "These seals are supposedly a charm against evil spirits entering your dreams. That said, they are little more than a small slab of fungiwood, so probably not."); ReplaceText("RELICDEALER_SEAL_6", "Ah, another seal! Thanks for that!"); ReplaceText("RELICDEALER_SEAL_7", "Ah, another seal! Thanks for that!"); ReplaceText("RELICDEALER_IDOL_1", "A king's idol. These are a small effigy of the Glimmering King. The old man sadly isn't around anymore these days, but he was quite the figure. Children loved these. Always kept chewing the heads off."); ReplaceText("RELICDEALER_IDOL_2", "Did you know, with the prongs on the end, these can be used as forks in a pinch!Although that's probably treason."); ReplaceText("RELICDEALER_IDOL_3", "After the coup, the king fled deep into the mountain. No idea what happened to him there. Kingdom has never been the same, though."); - ReplaceText("RELICDEALER_IDOL_4", "Ah, another idol! Thanks for that!"); + ReplaceText("RELICDEALER_IDOL_4", "There was a great battle at the gates of the palace, you know? But in the end, the Mask Maker's forces prevailed, and burned the palace to the ground.A shame really. It was a beautiful piece of architecture."); ReplaceText("RELICDEALER_IDOL_5", "Ah, another idol! Thanks for that!"); ReplaceText("RELICDEALER_IDOL_6", "Ah, another idol! Thanks for that!"); ReplaceText("RELICDEALER_IDOL_7", "Ah, another idol! Thanks for that!"); ReplaceText("RELICDEALER_EGG_1", "Oh, an Arcane Egg! These were very much an upper class thing. I used to talk for hours about the perils of the hunters that collected them.All rubbish, of course. They're made just down the road."); ReplaceText("RELICDEALER_EGG_2", "The guy who made these eggs sadly doesn't work in the business anymore. He's kinda busy being a king these days. I guess it's proof you can still move up in the world."); - ReplaceText("RELICDEALER_EGG_3", "Ah, another egg! Thanks!"); + ReplaceText("RELICDEALER_EGG_3", "I once had a request from a local restaurant that wanted to license these for their arcane omelettes. I sadly had to decline the offer. Professionals have standards!"); ReplaceText("RELICDEALER_EGG_4", "Ah, another egg! Thanks!"); ReplaceText("RELICDEALER_NO_RELICS", "Hmm, looks like you don't have any souvenirs for me? Would you like to buy some? Although you don't really seem the commemorative type."); ReplaceText("RELICDEALER_NAILSMITH", "Oooh, you've got a really wrecked looking sword there! That would sell for a fortune with a good story!The Nailsmith just down the road might be much more interested, though."); @@ -138,6 +141,47 @@ public override void OnInit() ReplaceText("QUIRREL_TEMPLE_4", "Strange, the masks that line the door remind me of something. But I'm not sure what.I guess the art of mask making just has its common patterns. A real headscratcher."); ReplaceText("QUIRREL_TEMPLE_5", "There's a strange old chap in the west of the city. Says he runs a souvenir shop.As we got talking, he talked about how one of his favorite fountains nearby got demolished recently.Apparently the king took umbrage at the statue.I wonder why?"); ReplaceText("QUIRREL_TEMPLE_6", "They really are quite strange fellows here. Or maybe everyone but them has just left?"); + + //Fluke Hermit + ReplaceText("FLUKE_HERMIT_DREAM", "Must ... improve ... maggot crop!"); + /*ReplaceText("FLUKE_HERMIT_PRAY" + ReplaceText("FLUKE_HERMIT_PRAY_REPEAT", ""); Only accesible with Flukenest*/ + ReplaceText("FLUKE_HERMIT_MAIN", "Farmer"); + ReplaceText("FLUKE_HERMIT_IDLE_1", "Careful! They must grow! Meat is precious!"); + ReplaceText("FLUKE_HERMIT_IDLE_2", "They grow fast! So many hunger!"); + ReplaceText("FLUKE_HERMIT_IDLE_3", "Riches will be mine! I will be a Hero!"); + ReplaceText("FLUKE_HERMIT_IDLE_4", "They grow fast in theses tunnels. It will take weeks till the fungi sprout again!"); + ReplaceText("FLUKE_HERMIT_IDLE_5", "Till then, I'm the only one..."); + ReplaceText("FLUKE_HERMIT_PEERING", ""); + ReplaceText("FLUKE_HERMIT_PEERING_DREAM", "So much money! I'll finally buy that little house in Ditrmouth! Far away from this!"); + + //Zemeer + ReplaceText("XUN_MEET", "Bonjour! May I offer you a beautiful flower? No? Then perhaps you might aid in the delivery of one?Be careful, it is extremely fragile, one of a kind, and ordered by the king himself!I even have a little token of gratitude if you complete the delivery."); + ReplaceText("XUN_ACCEPT", "Fantastic! It needs to be delivered to a grave in the Crystal Depths. Remember, it's extremely fragile and one of a kind!"); + ReplaceText("XUN_REFUSE", "No? Fair enough. I'll ask the next guy who passes through."); + ReplaceText("XUN_REOFFER", "Wanna take a shot at the delivery anyways?"); + ReplaceText("XUN_SUCCESS1", "You did it! Fantastic! I knew I could count on you! Now... what did we agree to again?What? Money? No, you must be mistaken! Here have a random medal!"); + ReplaceText("XUN_FAILED", "Oh, you broke it? No problem. Just between us: I've got dozens of the things. Just don't tell the king, or he'll want a lower price."); + ReplaceText("XUN_REOFFER2", "Would you try the delivery again?"); + ReplaceText("XUN_ACCEPT2", "Fantastic! It needs to be delivered to a grave in the Crystal Depths. Good luck!"); + ReplaceText("XUN_FAILED2", "That one broke as well? No worried, I can use the sticks as supports for my roses."); + ReplaceText("XUN_SUCCESS2", "You did it! Fantastic! I knew I could count on you! Now... what did we agree to again?What? Money? No, you must be mistaken! Here have a random medal!"); + ReplaceText("XUN_HAVE_FLOWER", "Just... take the first turn right... then left ...Something like that. You can't miss it, it's green."); + ReplaceText("XUN_HAVE_FLOWER2", "Just... take the first turn right... then left ...Something like that. You can't miss it, it's green."); + ReplaceText("XUN_GRAVE_INSPECT", "Here rests the masked child"); + ReplaceText("XUN_GRAVE_INSPECT2", "Here rests the masked child"); + ReplaceText("XUN_DREAM", "Flower vendor is such a wonderful and fullfilling job! Now I even get to boss around heavily armed children!"); + ReplaceText("XUN_KING_BRAND", "Oh, you stole the Mask Maker's key? What a delightful story! You'll have to tell me all about your heist at some point!"); + ReplaceText("XUN_GRAVE_FLOWER", "A flower has been placed"); + ReplaceText("XUN_MAIN", "Vendor"); + + ReplaceText("POGGY_TALK", "Ah, welcome to my butcher's shop! I might be a little see through, but I guarantee you, my meat is not!Except the aspic.Can I interest you in a lovely slice of crawling ham?"); + ReplaceText("POGGY_REPEAT", "I can guarantee you, it's fresher than it looks! And you won't get it cheaper anywhere else!"); + + ReplaceText("RUINS_MARISSA_POSTER", "And now on stage, the delightful Sylas and Delilah!
The best hits from last year and the year before that!"); + ReplaceText("MARISSA_TALK", "Oh dear, an audience! Sadly, my dear friend Sylas has departed, so it won't be the same. But an aria should still be possible!"); + ReplaceText("MARISSA_REPEAT", "He truely was a dear friend... Maybe I should follow? ... One day maybe."); + ReplaceText("BATHHOUSE_CORPSE", "...Sylas!...Delilah!..."); } } } diff --git a/Rooms/City/City1_31.cs b/Rooms/City/City1_31.cs index fa2b2b7..cda23e9 100644 --- a/Rooms/City/City1_31.cs +++ b/Rooms/City/City1_31.cs @@ -12,7 +12,7 @@ public City1_31() : base("Ruins1_31") { } public override void OnLoad() { - PlaceGO(Prefabs.LARGE_PLATFORM.Object, 7, 2); + //PlaceGO(Prefabs.LARGE_PLATFORM.Object, 7, 2); PlaceGO(Prefabs.LARGE_PLATFORM.Object, 57, 53); DestroyGO("Breakable Wall Ruin Lift"); } diff --git a/Rooms/City/City2_10b.cs b/Rooms/City/City2_10b.cs index 44dbde0..5473ff7 100644 --- a/Rooms/City/City2_10b.cs +++ b/Rooms/City/City2_10b.cs @@ -13,8 +13,12 @@ internal class City2_10b : Room public override void OnLoad() { - PlaceGO(Prefabs.LARGE_PLATFORM.Object, 28, 138, Quaternion.Euler(0, 0, 90)); - PlaceGO(Prefabs.LARGE_PLATFORM.Object, 28, 140, Quaternion.Euler(0, 0, 90)); + /*PlaceGO(Prefabs.LARGE_PLATFORM.Object, 28, 138, Quaternion.Euler(0, 0, 90)); + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 28, 140, Quaternion.Euler(0, 0, 90));*/ + + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 5, 91); + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 15, 93); + PlaceGO(Prefabs.LARGE_PLATFORM.Object, 25, 91); } } } diff --git a/Rooms/City/GGShortcut.cs b/Rooms/City/GGShortcut.cs new file mode 100644 index 0000000..9e86755 --- /dev/null +++ b/Rooms/City/GGShortcut.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKSecondQuest.Rooms.City +{ + internal class GGShortcut : Room + { + public GGShortcut() : base("Room_GG_Shortcut") { IsFlipped = true; } + } +} diff --git a/Rooms/Village1/Village1.cs b/Rooms/Village1/Village1.cs index 83735f3..d352b33 100644 --- a/Rooms/Village1/Village1.cs +++ b/Rooms/Village1/Village1.cs @@ -109,6 +109,10 @@ public override void OnInit() ReplaceText("WITCH_DREAM_FALL", "Dreams... such power..."); ReplaceText("WITCH_DREAM", "Have no dreams... must collect..."); ReplaceText("WITCH_TALK", "Have you met... the old bug? He is not as shiny as you... but smells nice...Have you met... the old caterpillar? He lacks... children..."); + + ReplaceText("GH_GRAVEDIGGER_NC_MAIN", "Gravedigger"); + ReplaceText("GRAVEDIGGER_TALK", "Ah, another warrior! Fantastic, those are always great for business!"); + ReplaceText("GRAVEDIGGER_REPEAT", "Could maybe commit a few murders on your way out? Or at least some light pillaging?"); } public override void OnBeforeLoad() @@ -164,6 +168,8 @@ public override void OnWorldInit() SetItem(LocationNames.Seer, ItemNames.Dream_Wielder, true, essenceCost: 300, destroySeerRewards: true); SetItem(LocationNames.Seer, ItemNames.Kings_Idol, true, essenceCost: 500, destroySeerRewards: true); SetItem(LocationNames.Seer, ItemNames.Dream_Gate, true, essenceCost: 600, destroySeerRewards: true); + SetItem(LocationNames.Seer, ItemNames.Arcane_Egg, true, essenceCost: 700, destroySeerRewards: true); + } } }