├── .gitignore ├── DebugMod.sln ├── README.md └── Source ├── BindableFunctions.cs ├── BindableMethod.cs ├── BossHandler.cs ├── CanvasButton.cs ├── CanvasImage.cs ├── CanvasPanel.cs ├── CanvasText.cs ├── Console.cs ├── DebugMod.cs ├── DebugMod.csproj ├── DreamGate.cs ├── EnemiesPanel.cs ├── EnemyData.cs ├── GUIController.cs ├── Images ├── AddEntry.png ├── BlueGlow.png ├── ButtonDel.png ├── ButtonInf.png ├── ButtonPlus.png ├── ButtonRect.png ├── ButtonRectEmpty.png ├── ButtonsMenuBG.png ├── CityKey.png ├── ConsoleBg.png ├── CrystalHeart.png ├── DreamGate.png ├── DreamGateDropdownBG.png ├── DreamNail1.png ├── DreamNail2.png ├── DropdownBG.png ├── ElegantKey.png ├── EnemiesBg.png ├── EnemiesPBg.png ├── Essence.png ├── Essence2.png ├── Flower.png ├── Geo.png ├── HelpBG.png ├── IsmasTear.png ├── Kingsbrand.png ├── Lantern.png ├── LoveKey.png ├── MantisClaw.png ├── MapQuill.png ├── MonarchWings.png ├── MothwingCloak.png ├── NailArt_CycloneSlash.png ├── NailArt_DashSlash.png ├── NailArt_GreatSlash.png ├── PaleOre.png ├── RancidEgg.png ├── ScrollBarArrowDown.png ├── ScrollBarArrowUp.png ├── Scrollbar_point.png ├── ShadeCloak.png ├── SimpleKey.png ├── SlyKey.png ├── StatusPanelBG.png ├── TramPass.png └── scrollbar_mid.png ├── InfoPanel.cs ├── KeyBindPanel.cs ├── Pair.cs ├── PlayerDeathWatcher.cs ├── Properties ├── Resources.Designer.cs └── Resources.resx ├── Settings.cs └── TopMenu.cs /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # .NET Core 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | **/Properties/launchSettings.json 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | 76 | # Chutzpah Test files 77 | _Chutzpah* 78 | 79 | # Visual C++ cache files 80 | ipch/ 81 | *.aps 82 | *.ncb 83 | *.opendb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | *.VC.db 88 | *.VC.VC.opendb 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | *.sap 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding add-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # Visual Studio code coverage results 117 | *.coverage 118 | *.coveragexml 119 | 120 | # NCrunch 121 | _NCrunch_* 122 | .*crunch*.local.xml 123 | nCrunchTemp_* 124 | 125 | # MightyMoose 126 | *.mm.* 127 | AutoTest.Net/ 128 | 129 | # Web workbench (sass) 130 | .sass-cache/ 131 | 132 | # Installshield output folder 133 | [Ee]xpress/ 134 | 135 | # DocProject is a documentation generator add-in 136 | DocProject/buildhelp/ 137 | DocProject/Help/*.HxT 138 | DocProject/Help/*.HxC 139 | DocProject/Help/*.hhc 140 | DocProject/Help/*.hhk 141 | DocProject/Help/*.hhp 142 | DocProject/Help/Html2 143 | DocProject/Help/html 144 | 145 | # Click-Once directory 146 | publish/ 147 | 148 | # Publish Web Output 149 | *.[Pp]ublish.xml 150 | *.azurePubxml 151 | # TODO: Comment the next line if you want to checkin your web deploy settings 152 | # but database connection strings (with potential passwords) will be unencrypted 153 | *.pubxml 154 | *.publishproj 155 | 156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 157 | # checkin your Azure Web App publish settings, but sensitive information contained 158 | # in these scripts will be unencrypted 159 | PublishScripts/ 160 | 161 | # NuGet Packages 162 | *.nupkg 163 | # The packages folder can be ignored because of Package Restore 164 | **/packages/* 165 | # except build/, which is used as an MSBuild target. 166 | !**/packages/build/ 167 | # Uncomment if necessary however generally it will be regenerated when needed 168 | #!**/packages/repositories.config 169 | # NuGet v3's project.json files produces more ignorable files 170 | *.nuget.props 171 | *.nuget.targets 172 | 173 | # Microsoft Azure Build Output 174 | csx/ 175 | *.build.csdef 176 | 177 | # Microsoft Azure Emulator 178 | ecf/ 179 | rcf/ 180 | 181 | # Windows Store app package directories and files 182 | AppPackages/ 183 | BundleArtifacts/ 184 | Package.StoreAssociation.xml 185 | _pkginfo.txt 186 | 187 | # Visual Studio cache files 188 | # files ending in .cache can be ignored 189 | *.[Cc]ache 190 | # but keep track of directories ending in .cache 191 | !*.[Cc]ache/ 192 | 193 | # Others 194 | ClientBin/ 195 | ~$* 196 | *~ 197 | *.dbmdl 198 | *.dbproj.schemaview 199 | *.jfm 200 | *.pfx 201 | *.publishsettings 202 | orleans.codegen.cs 203 | 204 | # Since there are multiple workflows, uncomment next line to ignore bower_components 205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 206 | #bower_components/ 207 | 208 | # RIA/Silverlight projects 209 | Generated_Code/ 210 | 211 | # Backup & report files from converting an old project file 212 | # to a newer Visual Studio version. Backup files are not needed, 213 | # because we have git ;-) 214 | _UpgradeReport_Files/ 215 | Backup*/ 216 | UpgradeLog*.XML 217 | UpgradeLog*.htm 218 | 219 | # SQL Server files 220 | *.mdf 221 | *.ldf 222 | *.ndf 223 | 224 | # Business Intelligence projects 225 | *.rdl.data 226 | *.bim.layout 227 | *.bim_*.settings 228 | 229 | # Microsoft Fakes 230 | FakesAssemblies/ 231 | 232 | # GhostDoc plugin setting file 233 | *.GhostDoc.xml 234 | 235 | # Node.js Tools for Visual Studio 236 | .ntvs_analysis.dat 237 | node_modules/ 238 | 239 | # Typescript v1 declaration files 240 | typings/ 241 | 242 | # Visual Studio 6 build log 243 | *.plg 244 | 245 | # Visual Studio 6 workspace options file 246 | *.opt 247 | 248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 249 | *.vbw 250 | 251 | # Visual Studio LightSwitch build output 252 | **/*.HTMLClient/GeneratedArtifacts 253 | **/*.DesktopClient/GeneratedArtifacts 254 | **/*.DesktopClient/ModelManifest.xml 255 | **/*.Server/GeneratedArtifacts 256 | **/*.Server/ModelManifest.xml 257 | _Pvt_Extensions 258 | 259 | # Paket dependency manager 260 | .paket/paket.exe 261 | paket-files/ 262 | 263 | # FAKE - F# Make 264 | .fake/ 265 | 266 | # JetBrains Rider 267 | .idea/ 268 | *.sln.iml 269 | 270 | # CodeRush 271 | .cr/ 272 | 273 | # Python Tools for Visual Studio (PTVS) 274 | __pycache__/ 275 | *.pyc 276 | 277 | # Cake - Uncomment if you are using it 278 | # tools/** 279 | # !tools/packages.config 280 | 281 | # Telerik's JustMock configuration file 282 | *.jmconfig 283 | 284 | # BizTalk build output 285 | *.btp.cs 286 | *.btm.cs 287 | *.odx.cs 288 | *.xsd.cs 289 | -------------------------------------------------------------------------------- /DebugMod.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Express 2013 for Windows Desktop 3 | VisualStudioVersion = 12.0.21005.1 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DebugMod", "Source\DebugMod.csproj", "{E3E4D0B7-656C-6C50-7567-696E2E57696E}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Release|Any CPU = Release|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {E3E4D0B7-656C-6C50-7567-696E2E57696E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {E3E4D0B7-656C-6C50-7567-696E2E57696E}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {E3E4D0B7-656C-6C50-7567-696E2E57696E}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {E3E4D0B7-656C-6C50-7567-696E2E57696E}.Release|Any CPU.Build.0 = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(SolutionProperties) = preSolution 19 | HideSolutionNode = FALSE 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------------------------------- 2 | FEATURES 3 | ---------------------------------------------------------------------------------------- 4 | * A completely new toggleable UI in game that provides the following functions: 5 | * Cheats such as invincibility and noclip 6 | * The ability to unlock all charms or repair broken ones 7 | * Change which skills the player has 8 | * Change which items the player has 9 | * Give the player more of consumable resources such as geo and essence 10 | * Respawn bosses 11 | * Hold multiple dream gate positions 12 | * Change the player's respawn point to anywhere in the current scene 13 | * Recall to the set respawn point 14 | * Kill all enemies 15 | * Add HP bars to enemies 16 | * Draw collision boxes for enemies 17 | * Clone or delete any enemy 18 | * Set an enemy's health to 9999 19 | * Change the player's nail damage 20 | * Damage the player 21 | * Change the camera zoom level 22 | * Disable the in game HUD 23 | * Make the player invisible 24 | * Disable the lighting around the player 25 | * Disable the vignette drawn around the player 26 | * Change the time scale of the game 27 | ---------------------------------------------------------------------------------------- 28 | INSTALLATION (STEAM, WINDOWS) 29 | ---------------------------------------------------------------------------------------- 30 | 1) Download the modding API from here: https://drive.google.com/open?id=0B_b9PFqx_PR9X1ZrWGFxUGdydTg 31 | 2) Right click Hollow Knight in Steam -> Properties -> Local Files -> Browse Local Files 32 | 3) Create a backup of the game files located here 33 | 4) Copy the contents of the modding API zip into this folder (Overwrite files when asked) 34 | 5) Copy the contents of this zip into the folder (Overwrite files when asked) 35 | 6) This mod should not affect saves negatively, but it is a good idea to back them up anyway. 36 | Saves are located at %AppData%\..\LocalLow\Team Cherry\Hollow Knight\ 37 | ---------------------------------------------------------------------------------------- 38 | CREDITS 39 | ---------------------------------------------------------------------------------------- 40 | Coding - Seanpr 41 | UI design and graphics - The Embraced One 42 | Assistance with canvas - KDT 43 | -------------------------------------------------------------------------------- /Source/BindableMethod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace DebugMod 4 | { 5 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] 6 | public class BindableMethod : Attribute 7 | { 8 | public string name; 9 | public string category; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Source/BossHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Drawing.Text; 5 | using System.Linq; 6 | using System.Reflection; 7 | using UnityEngine; 8 | using UnityEngine.SceneManagement; 9 | 10 | namespace DebugMod 11 | { 12 | public static class BossHandler 13 | { 14 | public static bool bossSub; 15 | 16 | public static Dictionary> bossData; 17 | public static Dictionary ghostData; 18 | public static bool bossFound; 19 | public static bool ghostFound; 20 | 21 | public static void LookForBoss(string sceneName) 22 | { 23 | bossFound = false; 24 | ghostFound = false; 25 | if (bossData != null && bossData.ContainsKey(sceneName)) 26 | { 27 | Console.AddLine("Found stored Boss in this scene, respawn available"); 28 | bossFound = true; 29 | } 30 | 31 | if (ghostData != null && ghostData.ContainsKey(sceneName)) 32 | { 33 | Console.AddLine("Found stored Ghost Boss in this scene, respawn available"); 34 | ghostFound = true; 35 | } 36 | } 37 | 38 | public static void PopulateBossLists() 39 | { 40 | if (bossData == null) 41 | { 42 | bossData = new Dictionary>(16); 43 | } 44 | 45 | if (ghostData == null) 46 | { 47 | ghostData = new Dictionary(7); 48 | } 49 | 50 | bossData.Clear(); 51 | ghostData.Clear(); 52 | bossData.Add("Ruins2_03", new KeyValuePair(true, "Battle Control")); 53 | bossData.Add("Crossroads_09", new KeyValuePair(true, "Battle Scene")); 54 | bossData.Add("Crossroads_04", new KeyValuePair(true, "Battle Scene")); 55 | bossData.Add("Fungus1_04", new KeyValuePair(false, "hornet1Defeated")); 56 | bossData.Add("Crossroads_10", new KeyValuePair(true, "Battle Scene")); 57 | bossData.Add("Fungus3_archive_02", new KeyValuePair(false, "defeatedMegaJelly")); 58 | bossData.Add("Fungus2_15", new KeyValuePair(false, "defeatedMantisLords")); 59 | bossData.Add("Waterways_12", new KeyValuePair(false, "flukeMotherDefeated")); 60 | bossData.Add("Waterways_05", new KeyValuePair(false, "defeatedDungDefender")); 61 | bossData.Add("Ruins1_24", new KeyValuePair(false, "mageLordDefeated")); 62 | bossData.Add("Deepnest_32", new KeyValuePair(true, "Battle Scene")); 63 | bossData.Add("Mines_18", new KeyValuePair(true, "Battle Scene")); 64 | bossData.Add("Mines_32", new KeyValuePair(true, "Battle Scene")); 65 | bossData.Add("Fungus3_23", new KeyValuePair(true, "Battle Scene")); 66 | bossData.Add("Ruins2_11", new KeyValuePair(true, "Battle Scene")); 67 | bossData.Add("Deepnest_East_Hornet", new KeyValuePair(false, "hornetOutskirtsDefeated")); 68 | bossData.Add("Grimm_Main_Tent", new KeyValuePair(false, "killedGrimm")); 69 | ghostData.Add("RestingGrounds_02", "xeroDefeated"); 70 | ghostData.Add("Fungus1_35", "noEyesDefeated"); 71 | ghostData.Add("Fungus2_32", "elderHuDefeated"); 72 | ghostData.Add("Deepnest_East_10", "markothDefeated"); 73 | ghostData.Add("Deepnest_40", "galienDefeated"); 74 | ghostData.Add("Fungus3_40", "mumCaterpillarDefeated"); 75 | ghostData.Add("Cliffs_02", "aladarSlugDefeated"); 76 | } 77 | 78 | public static void RespawnBoss() 79 | { 80 | if (bossFound) 81 | { 82 | if (bossData[DebugMod.GetSceneName()].Key) 83 | { 84 | SceneAdditiveLoadConditional bossLoader = 85 | GameObject.Find("BossLoader")?.GetComponent(); 86 | 87 | if (bossLoader != null) 88 | { 89 | Console.AddLine(bossLoader.ToString()); 90 | Console.AddLine(bossLoader.sceneNameToLoad); 91 | } 92 | 93 | IEnumerator ResetBoss(string scene) 94 | { 95 | if (bossLoader != null && scene != null) 96 | { 97 | yield return null; 98 | yield return UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(scene, 99 | LoadSceneMode.Additive); 100 | 101 | FieldInfo fi = typeof(SceneAdditiveLoadConditional).GetField("sceneLoaded", 102 | BindingFlags.Instance | BindingFlags.NonPublic); 103 | 104 | fi.SetValue(bossLoader, true); 105 | yield return null; 106 | GameManager.instance.LoadedBoss(); 107 | } 108 | 109 | PlayMakerFSM[] components = GameObject.Find(bossData[DebugMod.GetSceneName()].Value) 110 | .GetComponents(); 111 | 112 | if (components != null) 113 | { 114 | foreach (PlayMakerFSM playMakerFSM in components) 115 | { 116 | if (playMakerFSM.FsmVariables.GetFsmBool("Activated") != null) 117 | { 118 | Modding.Logger.Log(playMakerFSM.Fsm.GetFsmBool("Activated").Value); 119 | playMakerFSM.FsmVariables.GetFsmBool("Activated").Value = false; 120 | Modding.Logger.Log(playMakerFSM.Fsm.GetFsmBool("Activated").Value); 121 | Console.AddLine("Boss control for this scene was reset, re-enter scene or warp"); 122 | } 123 | } 124 | } 125 | else 126 | { 127 | Console.AddLine("GO does not exist or no FSM on it"); 128 | } 129 | } 130 | 131 | GameManager.instance.StartCoroutine(ResetBoss(bossLoader != null ? bossLoader.sceneNameToLoad : null)); 132 | } 133 | else 134 | { 135 | if (bossData[DebugMod.GetSceneName()].Value == "killedGrimm") 136 | { 137 | PlayerData.instance.SetIntInternal("grimmChildLevel", 2); 138 | PlayerData.instance.SetIntInternal("flamesCollected", 3); 139 | PlayerData.instance.SetBoolInternal("grimmChildAwoken", false); 140 | PlayerData.instance.SetBoolInternal("foughtGrimm", false); 141 | PlayerData.instance.SetBoolInternal("killedGrimm", false); 142 | } 143 | else 144 | { 145 | PlayerData.instance.GetType().GetField(bossData[DebugMod.GetSceneName()].Value) 146 | .SetValue(PlayerData.instance, false); 147 | } 148 | 149 | Console.AddLine("Boss control for this scene was reset, re-enter scene or warp"); 150 | } 151 | } 152 | else 153 | { 154 | Console.AddLine("No boss in this scene to respawn"); 155 | } 156 | } 157 | 158 | public static void RespawnGhost() 159 | { 160 | if (ghostFound) 161 | { 162 | PlayerData.instance.GetType().GetField(ghostData[DebugMod.GetSceneName()]) 163 | .SetValue(PlayerData.instance, 0); 164 | Console.AddLine("Ghost Boss for this scene was reset, re-enter scene or warp"); 165 | } 166 | else 167 | { 168 | Console.AddLine("No ghost in this scene to respawn"); 169 | } 170 | } 171 | } 172 | } -------------------------------------------------------------------------------- /Source/CanvasButton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using UnityEngine.Events; 4 | 5 | namespace DebugMod 6 | { 7 | public class CanvasButton 8 | { 9 | private GameObject buttonObj; 10 | private GameObject textObj; 11 | private Button button; 12 | private UnityAction clicked; 13 | private string buttonName; 14 | 15 | public bool active; 16 | 17 | public CanvasButton(GameObject parent, string name, Texture2D tex, Vector2 pos, Vector2 size, Rect bgSubSection, Font font = null, string text = null, int fontSize = 13) 18 | { 19 | if (size.x == 0 || size.y == 0) 20 | { 21 | size = new Vector2(bgSubSection.width, bgSubSection.height); 22 | } 23 | 24 | buttonName = name; 25 | 26 | buttonObj = new GameObject(); 27 | buttonObj.AddComponent(); 28 | RectTransform buttonTransform = buttonObj.AddComponent(); 29 | buttonTransform.sizeDelta = new Vector2(bgSubSection.width, bgSubSection.height); 30 | buttonObj.AddComponent().sprite = Sprite.Create(tex, new Rect(bgSubSection.x, tex.height - bgSubSection.height, bgSubSection.width, bgSubSection.height), Vector2.zero); 31 | button = buttonObj.AddComponent