Skip to content

Commit

Permalink
Finished Area8 and Endings
Browse files Browse the repository at this point in the history
  • Loading branch information
ToboterXP committed Jul 2, 2022
1 parent c1d5dcd commit f0161da
Show file tree
Hide file tree
Showing 22 changed files with 389 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,4 @@ MigrationBackup/
FodyWeavers.xsd

AnnouncementDraft.txt
Cutscenes/
39 changes: 39 additions & 0 deletions Endings/EndingA.cs
Original file line number Diff line number Diff line change
@@ -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<VideoPlayer>())
{
changed = true;
string dir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Cutscenes", Cutscene);
GetComponent<VideoPlayer>().Stop();
GetComponent<VideoPlayer>().url = dir;
GetComponent<VideoPlayer>().aspectRatio = VideoAspectRatio.FitInside;
GetComponent<VideoPlayer>().Play();
}
}
}
internal class EndingA : Room
{
public EndingA() : base("Cinematic_Ending_A") { }

public override void OnLoad()
{
GameObject.Find("Cinematic Player").AddComponent<CutsceneChanger>().Cutscene = "Ending1.mp4";
}
}
}
20 changes: 20 additions & 0 deletions Endings/EndingC.cs
Original file line number Diff line number Diff line change
@@ -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<CutsceneChanger>().Cutscene = "Ending2.mp4";

}
}
}
5 changes: 5 additions & 0 deletions GeneralChanges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public static void ChangeText()
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.<page>Not sure how many are left, though.<page>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.<page>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");
Expand Down
6 changes: 5 additions & 1 deletion HKSecondQuest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ public void InitializeWorld(On.UIManager.orig_StartNewGame orig, UIManager self,
/// </summary>
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())
{
Expand All @@ -170,6 +172,8 @@ public void CorrectGrubfather()

public void OnSaveLoad()
{
if (!saveSettings.glimmeringRealmEnabled) return;

if (saveSettings.revision < CurrentRevision)
{
RevisionManager.OnRevision(saveSettings.revision, CurrentRevision);
Expand Down Expand Up @@ -354,7 +358,7 @@ public void OnMainMenu(On.MenuStyleTitle.orig_SetTitle orig, global::MenuStyleTi
title.GetComponent<SpriteRenderer>().sprite = titleSprite;
//slightly blue, to make it stand apart from the background
title.GetComponent<SpriteRenderer>().color = new UnityEngine.Color(193 / 255f, 225 / 255f, 253 / 255f);
title.transform.SetScaleMatching(2.7f);
title.transform.SetScaleMatching(2.7f);
}
}
}
Expand Down
14 changes: 13 additions & 1 deletion HKSecondQuest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- Uncomment this to generate a documentation file to be included with the mod -->
<!--<DocumentationFile>$(OutputPath)/$(AssemblyTitle).xml</DocumentationFile>-->
</PropertyGroup>
<PropertyGroup>
<PropertyGroup>
<RootNamespace>HKSecondQuest</RootNamespace>
<AssemblyName>TheGlimmeringRealm</AssemblyName>
<TargetFramework>net472</TargetFramework>
Expand All @@ -24,13 +24,25 @@
<Target Name="CopyMod" AfterTargets="PostBuildEvent">
<RemoveDir Condition="Exists('$(ExportDir)/$(TargetName)/')" Directories="$(ExportDir)/$(TargetName)/" />
<MakeDir Directories="$(ExportDir)/$(TargetName)/" />

<MakeDir Directories="$(ExportDir)/$(TargetName)/zip/" />
<MakeDir Directories="$(ExportDir)/$(TargetName)/zip/Cutscenes/" />
<MakeDir Condition="!Exists('$(HollowKnightRefs)/Mods/$(TargetName)/')" Directories="$(HollowKnightRefs)/Mods/$(TargetName)/" />
<MakeDir Directories="$(HollowKnightRefs)/Mods/$(TargetName)/Cutscenes/" />


<Copy Condition="'$(DocumentationFile)' != ''" SourceFiles="$(TargetPath);$(TargetDir)/$(TargetName).pdb;$(TargetDir)/$(TargetName).xml" DestinationFolder="$(HollowKnightRefs)/Mods/$(TargetName)/" />
<Copy Condition="'$(DocumentationFile)' == ''" SourceFiles="$(TargetPath);$(TargetDir)/$(TargetName).pdb" DestinationFolder="$(HollowKnightRefs)/Mods/$(TargetName)/" />

<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(ExportDir)/$(TargetName)/" />

<!--Copy cutscenes into the ZIP file-->
<ItemGroup>
<CutsceneFiles Include="Resources/Cutscenes/*.*" />
</ItemGroup>

<Copy SourceFiles="@(CutsceneFiles)" DestinationFolder="$(ExportDir)/$(TargetName)/zip/Cutscenes/" />
<Copy SourceFiles="@(CutsceneFiles)" DestinationFolder="$(HollowKnightRefs)/Mods/$(TargetName)/Cutscenes/" />

<Copy Condition="'$(DocumentationFile)' != ''" SourceFiles="ReadMe.md;$(TargetPath);$(TargetDir)/$(TargetName).pdb;$(TargetDir)/$(TargetName).xml" DestinationFolder="$(ExportDir)/$(TargetName)/zip/" />
<Copy Condition="'$(DocumentationFile)' == ''" SourceFiles="ReadMe.md;$(TargetPath);$(TargetDir)/$(TargetName).pdb" DestinationFolder="$(ExportDir)/$(TargetName)/zip/" />
Expand Down
Binary file modified Maps/Layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Prefabs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ internal class Prefabs
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");
}
}
1 change: 1 addition & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ItemChanger\
MenuChanger

Made by Toboter
Cutscenes drawn by Gaia - the Dancer On The Sun

Available on Scarab

Expand Down
13 changes: 13 additions & 0 deletions Rooms/Area5/FinalBossCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@

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
{
Expand Down Expand Up @@ -72,6 +84,7 @@ public override void OnBeforeLoad()
public override void OnLoad()
{
GameObject.Find("Boss Control").AddComponent<DreamTransitionAdder>();
GameObject.Find("Boss Control").AddComponent<EndingTransitionController>();
}


Expand Down
17 changes: 17 additions & 0 deletions Rooms/Area7/Edge12.cs
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
37 changes: 37 additions & 0 deletions Rooms/Area8/Area8.cs
Original file line number Diff line number Diff line change
@@ -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.<page>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.<page>I want to thank Exempt-Medic, DwarfWoot, Rye and all the other playtesters for enduring a less than stellar version of this mod.<br>And I want to thank everyone in the Hollow Knight Modding Discord who offered guidance and technical help.<page>But the final person I want to thank...<page>Is the one who recommended you the mod.<page>They're the real hero of this story.<page>You want to be thanked for playing? I did that at the very start! Were you even listening?!<page>Okay...<page>fine...<page>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");
}
}
}
13 changes: 13 additions & 0 deletions Rooms/Area8/MenderHouse.cs
Original file line number Diff line number Diff line change
@@ -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; }
}
}
43 changes: 43 additions & 0 deletions Rooms/Area8/PureVessel.cs
Original file line number Diff line number Diff line change
@@ -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<HealthManager>().hp = 1000;
GameObject.Find("Boss Scene Controller").AddComponent<EndingController>();
}
}
}
29 changes: 29 additions & 0 deletions Rooms/Area8/WhitePalace11.cs
Original file line number Diff line number Diff line change
@@ -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");
}
}
}
17 changes: 17 additions & 0 deletions Rooms/Area8/WhitePalace13.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
Loading

0 comments on commit f0161da

Please sign in to comment.