#archived-modding-development
1 messages · Page 467 of 1
weird flex but ok
(I basically stole your code sean, no shame)
noice
Im back
who
async
makes sense
6
5
no
you don't really see sean here anymore, do you
is that supported now
yes
sick
since 18h ago
i assume it's similar to how customknight works
should be easier
it creates the default files the first time it launches
and puts them in a folder, similar to customknight
so you can replace them etc.
and if any of the files is missing, it just replaces them with the defaults
so it always works
this is cool 
make new skins
you could make a void-y hpbar
gradow
i require assistance with the custom bar
why does this not work
like it does work
but it looks weird
did you change the image sizes
no
maybe aseprite exported weird
ffs
but why tho
how
oh i'm stupid
it's because i just exported from ol
so it had the size of ol

he pressed export
Very good ching
can't be assed to do boss bars rn tho
ew pixels
I can make it higher res
give it the tc curls
@jolly oriole
what are neighbor scenes and how do I change them?
I found out that the additive loading isn't the problem, at least not entirely.
When I additively load the Isma scene, the active scene changes to the Isma scene on the next scene transition instead of GG_Workshop. So then, when the transition after that transition happens, the active scene becomes GG_Workshop, so the active scene is always one step below the true scene.
Not sure how to fix this 
is there something in particular that makes pausing, dreamnailing, cdashing, and other stuff stop working?
is it not RelinquishControl?
relinquish control removes all control, no?
the knight can still move and jump and attack
pepega moment
it always happens when I mess up scene transitions
56
gradow
can I resize a Sprite?
Idk if you can do it in place
But you could resize the image at runtime and just create a new sprite
bruh google
n/a
It's in xml docs above the functions
The .xml with the api should have it as like actual docs kinda
ok
who changed the sprite thingy on EnemyHPBars smh
why am I being maggotprimed
because you are shaking your head
at customizable sprites
with the default being unchanged
how do I turn the left side into the right side
the game thinks it is still transitioning
that's why some input doesn't work
kek
feelsclownman
yall are supposed to know everything
It used to work perfectly fine, I don't understand why this happens now.
To clarify, this happens when player dies after entering a gg boss scene from a cloned statue
I've done this more than 3 other times before (fennel, propeller knight, pale champion, etc) and this never happened
I just remember something like this happening when I kill myself in the HoG
I respawn at the DD statue and can't do anything but move and slash
I spawn at the right spot
ok I partially figured it out
doing DontDestroyOnLoad on the statue does this
no idea why but oh well
cant believe I spent 3 days on this bs
Remember when modlog was usable? 
usable if i disable benchwarp and debug 😤
it'd actually be neat if i added suppressing errors which are repeated more than like 30 times with the same text into like qol
I uploaded async preloading for the api to the drive fwiw
so if you have mods w/ preloads that should be an okay amount faster
ching
hpbars updated
should support high res textures now
but they should still fit roughly into the aspect ratio of the default ones
nice
for the boss thingies, it's roughly 100:3
I'm now irrationally angry it's not 33:1
I'm going find a way to make glue out of human corpses and you are my first subject
glue me papers
hot
In scared
Out scared
You know the person doesn't have to be dead for you to make glue out of their parts.

Offhand would anyone know if the input controls/code are available to look at?
I want to make a knight in an independent project, give it different/extra abilities but the fundamentals of movement/jumping I want to keep the same
Or will I have to eyeball it
Think I got it
Part of me was expecting hours to do find something, thanks for the apidocs page 😄
I think I can learn what I need from it
start all tracks at the same time some with 0 volume then ramp the volume when certain criteria are met
shush
how do you do that btw
what
like different shape healthbars
it's all part of the mod
nah i gotta read like 100 pages now
bruh i don't wanna fail this quiz
Gradow. Wanna help me debug
I'll try tomorrow. And he can look at mine tomorrow. And figure out how to destroy the loaded song
So it no leave room
do you have a github
I do. But it's not on there
sad
I'm in bed and gotta be up early. But tomorrow. ;)
Wow
gradow

Snapshots are just mixer settings
So yeah. All tracks are playing at start. And at new stages, some volumes are increased from 0
Do they have different names?
A full library would be helpful. Cuz that may solve my boss music issue too
And knowing what each mixer channel is would be great too
Cuz I'm putting music in like 3 channels. One of which may be the BG music channel that I'm overwriting unnecessarily
Sealed Vessel phase 3+4 - S59-55 Final Stage (1-5)
should be the names
yeah i thought that was what you were needing my bad 😔
Lol
It's probably like 4. Normal, quiet, excitement (or something similar), and boss
is this the side effect of eating too much gummy vitamins within an hour
perhaps
Gleamlight’s lookin good Saleh.
I have been discovered
where can I find the ak47 mod
I checked them but don't know which ones of them it is
hollow point
thank you
enjoy
I have tried to compile the code of Randomizer 3 in GitHub to a dll file and when I tried to use this I found everytime I walked through RestingGrounds_04,I will be trapped by the Binding Shield.I want to ask if anyone could tell me what happened and how to solve it.I will be very grateful.
Why not just use the already compiled one
Actually I'm trying to modify the language file to make it easier to understand for other players in my country,so I need to compile a new file.
Then you should make a fork of the randomizer and merge commits as they're added to the main branch
I would like to do it if I can solve the bug
hello, where can i find the tutorial in how to put mods in HK?
So how do i add references
A few arn't present
Then choose the modding API csharp assembly
they have the little yellow warning icon
Yes
in bin/Debug/whatever
re add them
You have to tell it what the modding API is
should dropping the file there directly work?
And where to find it
ok wait slow down, right click, add referances, then do what?
Browse to the modding api
Which will be an assembly_csharp.dll
Named the same as the original
And in your game files
where?
in steam
steam/common/downloads/hollow knight
iirc
or something like that
(was there a command that showed the path?)
steam/steamapps/common/Hollow Knight
Ok, well that cut the number of errors in half
there was one more I think

what code did you put in the program?
also there should be a Using [stuff] at the top
which might help
This is what i'm looking at, disreguard the error on Modcommon. And i didn't add any code, i commented out one line
Need to add unity reference files
how? i do i have to install that unity workload in the installer?
No
Add reference
And it's in the same location as the assembly csharp file you added
oh
ok i oh'd a little too soon, there are many many files similar to what i'm looking for, but UnityEngine.SceneManagement.DLL and UnityEngine.Object.DLL are missing
and who knows how much else
theres a large list
You could literally just add everything to be sure
Yes I know
I just don't remember them
Damnet, I
So screenshot them
Theres a list of references he used
So I can see
I just literally need to add the ones he used
Yes
there, now i'm at 72, still getting an error for using Object = UnityEngine.Object;, specifically the error is only under the second Object, it can't find that even with all references in place
And you have unity engine and unity engine.ui?
yep, they're there
What do the errors say
The type name 'Object' could not be found in the namespace 'UnityEngine'. This type has been forwarded to assembly 'UnityEngine.CoreModule
oh wait
ok that got me from 72 errors down to 4
Probably related to what you changed?
i didn't read the proper error report till i had to copy it xD
No, the code i commented out edited the number stored in a variable (the code that actualy does the increasing of the enemy health), now it just stays the same, but is still treated the same
ok it wanted a couple extra references
down to one error
Source file 'C:\Users\ComputerName\Downloads\BonfireMod-master\Properties\AssemblyInfo.cs' could not be found.
there isn't even a properties folder
how to i get/generate this file?
or is this something special the dev added?
I think i finally did it,
Yep, it's working, but now theres a wierd glitch @solemn rivet Whenever i sit at a bench it's unlocking every achivement i would unlock in my characters current state (Having at least one charm, having one extra mask, ect) sound familiar? any idea why that may be happening?
Its like whenever i sit at a bench all my achivements are removed (and then the game immediatly updates and gives me back everything i achived in that save file)
oh my nail damage is lower then it should be too,
I have the channelled nail but i have the damage of the sharpened nail
What was that about a debug thing? I can just set my base damage back up to 13
unless it resets every time i sit at a bench
i'm looking at public int NailDamage(int totalStr) => (int)Math.Round((double)(5 + 2 * PlayerData.instance.nailSmithUpgrades) * Math.Pow(1.25, Math.Log((double)totalStr, 2.0)));, could this be incorrectly applying the wrong damage number based on the amount of nail upgrades?
bonfire still
I only commented out one line so this is the default behavior of the mod
yeah it's kinda outdated
surprised it doesn't break completely in the first place
anyways pretty sure Bonfire overwrites the usual nail damage so you'd need to update with debug quite often for it to work
like, might be a check run on benches
wait is the damage set on HitInstance >.>
if achievements get reset when sitting on a bench check these 2 parts
So i updated my damage by 4 with the debug mod and now it seems to be doing the correct amount of damage, just displaying it wrong, but i mean until i can get my hands on the modern code i'm perfectly happy with this
Yeah i solved the nail damage problem. part of line i posted earlyer public int NailDamage(int totalStr) => (int)Math.Round((double)(5 + 2 * PlayerData.instance.nailSmithUpgrades) * Math.Pow(1.25, Math.Log((double)totalStr, 2.0)));, it's doing 2 * nail upgrades, when every nail upgrade gives you 4 points of damage, not 2, that was the problem and now it's correct!
?mods
Mods
Google Drive with Mods - https://drive.google.com/drive/folders/0B_b9PFqx_PR9Um9MeFZMV21oWGs
Installer - https://radiance.host/mods/ModInstaller.exe
Mod Summaries - https://docs.google.com/document/d/1cz5tcggpGofrBcM90XyTkMWjMelDHzugvQM6HpB13Ew
I downloaded the installer, and when I try to open it it says ''windows has protected the computer'' translated from swedish which is why it might be wrong in english lol
So tell it it's fine
so...what do I have to delete to retry and install the modinstaller
or is there a manual way to install the mods?
https://github.com/homothetyhk/HollowKnight.BossTracker/blob/master/BossTracker/BossTracker/BossTracker.cs
If anyone has ideas for the missing bosses, feel free to pitch in
is there any information available what exactly the unofficial hollow knight patch does?
is there a way to hide the list of mods in the title menu?
I'm guessing that's why no one's made a blank title screen mod yet
or that I haven't seen
could probably destroy the go i mean
there's just no option you can toggle or anything
bruh

don't do it
dunno if this is the appropriate chat but is there a tutorial about how to create your own custom knight?
it is just like photoshop/gimp
@proven flume should be a whole guide in the pins. But you just swap an edited sprite sheet for the old one.
okie, thanks
https://drive.google.com/drive/folders/1QeWhNkbMjj9MVzYaxob55H1v2k8sFQVL
Little Hornet (Custom Knight)
Thank you!
looks great i will use the geo with the grimm boy
add 2nd layer of keys later too
damn
688889246
@unborn flicker https://clips.twitch.tv/VivaciousSparklingMageDxCat Picked up Lurker key (shade soul per spoiler log) and got Shade Soul. Had no fireball previously
Version 3.03c
Seed number 688889246
Easy mode, Super Junk Pit
Not open mode, no starting items
@jolly oriole organs have multiple layers of keys
usually 2 or 3
or multiple keyboards?
I dunno what range it covers so I didn't want to call it a straight up keyboard
hmm
Hey @solemn rivet I've been toying around with that source you gave me a bit and, a friend and I can't figure out what the "Extra Masks" stat is suppose to do, looking at the code it seems pretty straight forward, it's suppose to give you blue masks that are applied whenever you sit at a bench. like Lifeblood Core, but in my compiled version and your updated version from ModInstaller, no such masks are applied when sitting at a bench or applying a levelup. I just stopped mid sentance to try applying a levelup with your updated version of the mod and i didn't get the extra masks, but the two masks from Lifeblood Core DID refresh so i can see thats SUPPOSE to be happening,
Really if anyone can tell me why BlueHealthHook isn't working that would be super helpful. I tried flat out giving it a raw number for debug purposes and it just won't apply blue masks, I followed the example at radiance.host directly except I just gave it a raw 10 with no ifs to see if it would apply and it won't
By all means as far as i can tell it should be working
Ok my conclusion is that BlueHealthHook does NOT work as stated at https://radiance.host/apidocs/Hooks.html#, (which is how it's implimented in bonfire by default) i just straight up copy pasted their example code and it does not work at all. So either something changed with the references that broke this functionality or someone at radiance.host didn't do their research
Yup
The game broke it at some point
That's one of the reasons why I don't care about bonfire
So much shit broke as the game kept getting updated that I just stopped caring
Bonfire first came around before the Grimm Troupe patch
Same thing for blackmoth
The difference being that blackmoth is actually fun to play, as opposed to bonfire
Oh so giving a custom amount of lifeblood masks is just impossible now
And nobody has fixed it? Even though the game hasn't been updated in around a year or so now?
Makes sense.
I mean
I was wondering why radiance.host was so incomplete
If you think about it, this game is 3yo
I mean i probably would have been a new modder if this wasn't the case
And most of us have been here for most of that time
that kinda sucks, i hope the story is different for Silksong
Nah
It'll happen even faster
Because we're already tired of the game at this point
Silksong might change that a bit, but not by much
Unless it's a complete and utter revolution, which it might be
But I doubt
Graig has told us early on that fsms are staying
So I doubt things will be much different
But, that said, don't let that stop you from modding the game
Just pretend the documentation in radiance.host doesn't exist
It's not really that useful anyway
Mick here is just started modding the game, and I doubt he spent too much time reading the docs at radiance.host
How was the code discovered in the first place?
wdym
Well, someone had to figure out how it worked to begin with
someone had to figure out the code.
So how was it done?
We just dnspy it
It decompiles the assembly
That's all there is to it
The first mods would just do that
Decompile and edit the assembly directly
753's lightbringer, KZ's debug and bossrush, my blackmoth and bonfire...
But the issue with that was that mods weren't compatible
You'd need to code a mod combining two mods if you wanted to play them together
That, and a few other issues led to the creation of the api
And now we have the api, which is a modified assembly of the game, which loads the mods directly
So we don't need to directly alter the game's code anymore
thats true, but it looks like some mods, including yours, is using outdated code. How would one get access to the new code?
Well
Just use dnspy to look into the game's code really
We now have On. hooks, which are great
And the fsm viewer made by nes also really helps when modding fsms
hmmmm
If you're trying to do something, just ask here basically
People in here are generally very helpful
ok
im not good when it comes to coding, but there the code has been changed from what i am seeing
this is the old code documented online
public int BlueHPRestored(){
int retValue = 0;
if(PlayerData.instance.GetBool("equippedCharm_8")) retValue += 2;
if(PlayerData.instance.GetBool("equippedCharm_9")) retValue += 4;
return retValue;
}```
And this is the new code im looking at
// (add) Token: 0x060044AF RID: 17583 RVA: 0x00188FBC File Offset: 0x001871BC
// (remove) Token: 0x060044B0 RID: 17584 RVA: 0x00188FF4 File Offset: 0x001871F4
[HookInfo("Called whenever blue health is updated", "PlayerData.UpdateBlueHealth")]
public event BlueHealthHandler BlueHealthHook
{
add
{
string str = "[";
Type declaringType = value.Method.DeclaringType;
Logger.LogDebug(str + ((declaringType != null) ? declaringType.Name : null) + "] - Adding BlueHealthHook");
this._BlueHealthHook += value;
}
remove
{
string str = "[";
Type declaringType = value.Method.DeclaringType;
Logger.LogDebug(str + ((declaringType != null) ? declaringType.Name : null) + "] - Removing BlueHealthHook");
this._BlueHealthHook -= value;
}
}```
why is the new code ugly
because
it's caching calls
so you can have multiple mods use the same method
and they don't destroy each other
not really
to me, its a lot
if you'll notice, those are all hooks
so they're not actually methods of the game
they're hooks we use to get the game's method
hmmm
i am looking at the assembly dll file. i assumed thats the game file....i guess im wrong
so how would i find the games own code?
just verify your game files on steam first, to get the vanilla assembly back
gog, not steam
same difference
then make a copy of it before running the modinstaller again, because it replaces that file
Manage install -> Verify/repair
ok, im looking at the vanilla assembly file
for blue health in player data
it looks like this
public void UpdateBlueHealth()
{
this.healthBlue = 0;
if (this.equippedCharm_8)
{
this.healthBlue += 2;
}
if (this.equippedCharm_9)
{
this.healthBlue += 4;
}
}```
it is indeed different to what is documented online
public int BlueHPRestored(){
int retValue = 0;
if(PlayerData.instance.GetBool("equippedCharm_8")) retValue += 2;
if(PlayerData.instance.GetBool("equippedCharm_9")) retValue += 4;
return retValue;
}```
yeah
but you do realize they're different methods right
one is UpdateBlueHealth() and the other is BlueHPRestored()
That makes all the difference.
From what i see, they changed it so it is blue health rather than blue hp, why?........i dont know
but now anything that referes to blue masks, is defined in game by Blue health, not by Blue HP.
no, that's not the issue
well, i did my best.
So, whats the issue then?
well
BlueHPRestored doesn't exist
that's just an example mod
it's not something that's actually in the api
huh.
if you search for it in the modded assembly, it doesn't find anything
so the api needs a update then?
no
why would it?
so, on bonfire here's how bluehealth is set:
so let's take a look at bluehealthhook
// Modding.ModHooks
// Token: 0x0600453A RID: 17722 RVA: 0x0018BF64 File Offset: 0x0018A164
internal int OnBlueHealth()
{
Logger.LogFine("[API] - OnBlueHealth Invoked");
int num = 0;
bool flag = this._BlueHealthHook == null;
int result;
if (flag)
{
result = num;
}
else
{
Delegate[] invocationList = this._BlueHealthHook.GetInvocationList();
foreach (BlueHealthHandler blueHealthHandler in invocationList)
{
try
{
num = blueHealthHandler();
}
catch (Exception ex)
{
string str = "[API] - ";
Exception ex2 = ex;
Logger.LogError(str + ((ex2 != null) ? ex2.ToString() : null));
}
}
result = num;
}
return result;
}```
what updated vanilla assembly?
and here's where the hook is called:
// Token: 0x060030F2 RID: 12530 RVA: 0x00103E80 File Offset: 0x00102080
public void UpdateBlueHealth()
{
this.healthBlue = ModHooks.Instance.OnBlueHealth();
this.orig_UpdateBlueHealth();
}```
so it sets the player's bluehealth to whatever the hook tells it should be, and then it runs the default behaviour
ok
// Token: 0x0600311D RID: 12573 RVA: 0x0010BD64 File Offset: 0x00109F64
public void orig_UpdateBlueHealth()
{
this.SetIntSwappedArgs(0, "healthBlue");
if (this.GetBool("equippedCharm_8"))
{
this.SetIntSwappedArgs(this.GetInt("healthBlue") + 2, "healthBlue");
}
if (this.GetBool("equippedCharm_9"))
{
this.SetIntSwappedArgs(this.GetInt("healthBlue") + 4, "healthBlue");
}
}```
this is the default behaviour
and there is the issue
the first thing the default behaviour does is set "healthBlue" to 0
so it pretty much ignores the hooks that came before it
thats what i was thinking
i told jacob that i think the game was over riding the hook. seems like i was right
this is a very easy fix using On. hooks
oh?
just hook On.PlayerData.UpdateBlueHealth, tell it to run orig and then do whatever it is you need to do
that way, you're adding the masks after the default behaviour
so it shouldn't reset it to 0
cool.............if only i knew how to do that
I'll brb
if you still need help by then, I can try to help you
but first, if you're on windows, you gotta have some way to compile a dll
so visual studio 2017 with .net workload
I think so
and now i wait for it to install.....
what is it exactly that you want to do?
you said i needed a way to compile dll files, and you suggested visual studio....and i dont have it, so im getting it now
i simply want to fix the bonfire mod, as i really think its cool. it opens up doors to challenges, like luck only run, or a magic only run, and etc.
ok
and done.
So, what is it i need to do to fix the blue health issue?
first you're going to need to clone the github repo
if you don't know how to do that, there's a nifty button on the right
ok done
ok, now you'll need to open the project using vs
or just double click the .sln file
Yeah this is getting to be too much for my little brain
I didn't even notice the conversation was still going
it's not really that hard
I'd recommend you learn it as well if you guys are gonna try and balance it
i dont see a sln file
.csproj
oh, sorry
yeah, use the csproj
ok
but
it seems you already opened it in vs
so that's good
so now you'll want to edit the BonfireMod.cs file
ive done a little coding before, but it was a LONG time ago, and it was in terraria
you should get plenty red squiggly lines telling you there's something wrong
no, no red squiggly lines
..?
can you show me your screen?
what happens if you try to build it?
yeah
because right now you're missing the references
ok.... so just build the cs file?
just go under build and hit build :p
on the top where file edit view are
C:\Users\Administrator\Source\Repos\BonfireMod\CSC : error CS2001: Source file 'C:\Users\Administrator\Source\Repos\BonfireMod\Properties\AssemblyInfo.cs' could not be found.
It generated a solution file when i built it
can you walk us through the steps you took
me?
jacob
So basically you wanna go to the little References bar on the right where all the files are listed right click and add a reference and browse, go into the Managed and add all the DLLs that the errors are complaining about, then when all the references are added it should compile, I believe it was when i compiled for me that it automatically generated a solution file
as you can see, mine is red all over
yup
what was bothering me is that I cannot see a 'references' tab on their screenshot
maybe I'm just too used to rider and forgot how vs works
but it is complaining about the assemblyinfo, which i also had to deal with
I had to go into the directory for the project, manually create a properties folder, go to the properties tab on the right where all the files are, click Assembly Information..., just give it a name and hit okay, that will generate that file
what
It needs that assemblyinfo.cs file, that needs to be generated
the vanilla or modded one?
I'm not sure what that means, its for the project itself
so that Visual Studio can compile it
or "assemble" it
You generate it in visual studio with said project open
make sure you've made a properties folder in the project's directory, and then go to the project's properties, Assembly Information, just give it a name and hit ok, that should generate that file and put it where it belongs
ive created the properties folder....now i dont know what to do
There should be a Project tab at the top in visual studio, and at the bottom of that list theres a BonfireMod Properties
There should be a button in properties labled "Assembly Information...", click that, there will be a lot of text fields, just fill out the top name, and hit okay, and that should be it
no other options, even grayed out?
none
Is the Bonfire project open in that specific window?
Its not showing properties or references on his right hand either
wait is someone gonna try to fix the Bonfire mod?
He's pretty determined,
kekw
im very stubborn
good luck it's one of my favorites combined with the Enemy Randomizer
which is also broken af lul
Maybe we can work together since your vs is acting wierd and mine is all set up but i'm just having problems understanding the new code i have to use
That sounds good to me
try this R-Blitz
just unzip this and run the sln file
if it works, then just add the relevant references
(I referenced every single dll in the Managed folder cause I'm lazy af)
- ModCommon
//fair enough
what
great
expand the explorer on the right to see the .cs files
now add the references and hit build
if it builds properly, then we're ready to go
so right click on references, and hit add references?
yup
now Browse and select the dlls in the managed folder
Yep! then browse, then you wanna add all the DLLs in Hollowknight data > Managed that it's asking for
Grad you said earlyer "just hook On.PlayerData.UpdateBlueHealth, tell it to run orig and then do whatever it is you need to do
that way, you're adding the masks after the default behaviour
so it shouldn't reset it to 0" did you explain how to do that?
in the vanilla managed or modded managed?
that should be the explanation
there's no modded/vanilla managed
it's only a single folder blitz
but, Jacob
go to Initialize
I hardly know what your even talking about here, what do you mean "tell it to run orig"
type On.PlayerData.UpdateBlueHealth += and then hit tab
it'll create a placeholder method for you
thats the answer i wanted. thank you
Alright grad
ok, i added the references
yeah i typed that and hit tab, it created the placeholder, what do i do with that?
you know what hooks are Jacob?
I have a basic understanding of them
try building it now Blitz
ok, so
these are special hooks
the On. hooks are hooks created for every single method in the game
they run whenever that method would be called
alright, still with ya
you'll see that this specific one has orig and self parameters
build solution or mod?
so if you want to just run the game without anything, just type orig(self); inside that method it just created for you
build solution
It doesn't know where those are you wanna add those referances
also building the solution is building the mod, its compiling it into a dll
^
Someone Can help me to use this mod instaler?
so then i wanted the modded one.
@heady plank the modded what?
Ok
i have 2 versions of hollow knight, the modded one, and a unmodded one
from what i can tell, the assembly dll are different for each of them
so ive been asking
should i use the vanilla one, or the modded one?
modded one
Thank you
but you see
we didn't have that information
that you had two installs
so there was no way to know what you were talking about
fair enough
now, Jacob
if you'll recall from the screenshots I posted earlier
bluehealth is just a field in PlayerData
so we need to set it after running orig
did it compile?
so if i type orig(self); in that method it will execute what it would normally want to do unmodded, and then any code i put in after that would be executed after
yupyup
it compiled
nice
Now you have it working too
now you can start coding Blitz!
ok, now what do i do
private void PlayerDataOnUpdateBlueHealth(On.PlayerData.orig_UpdateBlueHealth orig, PlayerData self)
{
orig(self);
self.SetInt("healthBlue",ls.ExtraMasks(Settings.ResilienceStat));
}```
this is what I did
now you do whatever you want to do, Blitz
what do you want to do?
Jacob, be sure to remove the older hook
Seeing as im using your most uptodate version
ModHooks.Instance.BlueHealthHook += BlueHealth;
fix the problem with the extra masks not working properly
and make so that bugs dont get stronger the higher your level is
that part's easy
just comment out
if (hm.hp <= 5)
{
hm.hp = 1;
}
else
{
LogDebug($@"Vanilla HP for {enemy.name} = {hm.hp}");
hm.hp *= (int)((1.25 + (double)Dreamers / 3) * (2.5 / (1.0 + Math.Exp(-0.05 * Settings.CurrentLv))));
LogDebug($@"Bonfire HP for {enemy.name} = {hm.hp}");
don't comment out the first part tho
it makes no sense to have enemies with less than 5 hp
No do do that, otherwise it messes with the enemyHPbar mod
It makes it so that the hp bar lingers there forever after the enemy is killed
how do i comment it out, and how doo i fix the extra masks issue?
and how do i implement the extra masks fix?
is it //
yup
many thanks
Oksolike, the debug mod is now breaking the entire game
as it should
hahahahah
yeah but it destroyed my save file so i need to start a new one and get to dirtwater to test this now so brb
so grad, do i copy and paste the fix you posted earlier?
Blitz did you hook that method?
as soon as i got in front of the bench and the HUD showed up, i can no longer control the ghost
I can pause but he is now a statue
hook?
i simply copy and pasted
also, jacob
try opening map
that should unfreeze you
that's not the issue
what map? in this save file i didn't even enter the forgotten crossroads
also you needed to create a hook first, when you autofill that with tab it automatically creates the method for you
ok, so how do i hook it?
Spawned under the bench when i reloaded, this is the problem i thought Debug was causing
no, it's not debug
I think it's because we're doing stuff after orig
try removing that line and see if it still breaks
@heady plank under the Initialize method, remove the existing bluehealth line and replace it with On.PlayerData.UpdateBlueHealth += and then hit tab
I'm still spawning under the bench
private void HeroControllerOnMaxHealthKeepBlue(On.HeroController.orig_MaxHealthKeepBlue orig, HeroController self)
{
self.playerData.SetInt("healthBlue", ls.ExtraMasks(Settings.ResilienceStat));
orig(self);
}```
try hooking On.HeroController.MaxHealthKeepBlue
and doing what I just did above
Blitz, a hook is like subscribing to a method
so if you add a hook to a method, your hook will be called whenever that method is called
what jacob said
i dont get it. this is all new to me
On.PlayerData.UpdateBlueHealth +=
that is a hook
that runs whenever the game updates blue health of the player
i dont know where the initialize method is. i assume it the SetInt thing
ok
i see that
ok Grad that fixed the problem with the benches but its not changing the number of blue masks
wait let me try one thign
notice the public override void Initialize()
i see it
got it
you can put your hook in there
yeah no, the OnMaxHealthKeepBlue thing didn't work
I guess so
we might have to go into fsm territory
cause it's not used by anything
means it's only called in fsms
I tried putting orig second in the original updatebluehealth method and test that, fixed the bench thing but didn't add the masks
ok, im still a bit confused on the hooks thing.
you suggested hooking it to On.HeroController.MaxHealthKeepBlue
i know that doesn't work, but im using it as an example.
when i try adding that hook, i get this
R-Blitz you wanna add += and then hit tab
grad you want me to add that in the updatebluehealth method?
this should be read as "the method HeroControllerOnMaxHealthKeepBlue is subscribed to the hook On.HeroController.MaxHealthKeepBlue"
yeah, jacob, just add that whenever you try to fix the mod
so it shows us what's happening
that's it blitz
see how it created a new method
that's the method that's going to get called whenever the hook runs
ok
"an object reference is required for the nonstatic field"

not sure wut do ¯_(ツ)_/¯
show
use self instead of PlayerData
also
go to your saves folder and edit your moddingapi config file
"keys": [
"ShowDebugLogInGame"
],
"values": [
true
]
},```
add this bool value
it should show you your modlog file on screen
this helps a lot with debugging
something i wanted to ask.
i would see mods, in this case, redwing, say you can configure the mod to your liking, and the same for other mods..how do i do that?
how do you configure them?
Where is the save folder?
?saves
Saves
Windows File Paths: (Assumes Default Steam Install Path, Adjust accordingly for DRM Free or Non-Standard Steam Path)
Game Files: C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\``` ** ** Mac File Paths: ```Save Files: ~/Library/Application Support/unity.Team Cherry.Hollow Knight/ Game Files: ~/Library/Application Support/Steam/steamapps/common/Hollow Knight/hollow_knight.app/``` ** ** Linux File Paths: ```Save Files: ~/.config/unity3d/Team Cherry/Hollow Knight/ Game Files: ~/.local/share/Steam/steamapps/common/Hollow Knight/```
or how do you create the file to configure?
locallow? who saves to locallow
tc does
thats the thing. i dont know
you don't know whether you're trying to make a file, or use one?
if you're playing the mod, you're trying to use the config
if you're making a mod, you're trying to create a config
the 2nd to last line
"Values fully configurable"
how do i do it then?
ok, good to know
Grad i made that change but no log is showing up ingame, do i have to do something?
is your game modded?
yes
did you restart the game?
I did it while the game was closed
idk why it's resetting the file
did you save the change
oh NOW it's gone
"BoolValues": {
"_keys": [
"ShowDebugLogInGame"
],
"_values": [
true
]
},
paste this instead
already made the change and i'm restartin
oh ok
yeah there it is
ok, so now see what it logs when you sit at a bench
It triggered 3 times in a row on startup, before and after were 2, (i have lifeblood core equipped)
the code isn't changing the health
when are you hooking it
all the hooks
just in the init
I mean
but i did discover something, despite you already knowing probably
which method are you hooking into
hmm
I put a log between self.SetInt("healthBlue", ls.ExtraMasks(Settings.ResilienceStat)); and orig(self) and it gave me a 6, so it's 2 to start, then that line makes it 6, then orig makes it 2 again
as it should
why does setting orig first glitch the hell out of the benches?
probably some fsm
what does fsm stand for?
finite state machine
fart shit moan
it's how 99% of this game is actually coded
it's what dnspy doesn't show of the code
so, we know the code is working
this
these are FSMs
my friends
is the The Hollow Knight (the boss) fsm
fucking shitty method (of coding)
Yeah i saw that earlyer and it looked like the ai for a boss
it looks like a flying spaghetti monster
so, we know the code is working
its just that the game is somehow, even with changes, over riding our hooks....
SO we just gotta find a way to override the game itself
basically, blitz
Question is: How.
How about we head down to Team Cherry HQ with megaphones and we don't stop screaming day and night until they add native mod support
as if
they'd have to recode the entire game
to remove fsms
which would be a massive undertaking
uhh guys?
like, they literally removed a few fsms for the Lifeblood patch
and it took them a few months
but it also made the game 200% faster so there's that
I flipped orig and the bluehealth code around again and its working,

what
good code™️
show us
welcome to hk modding
it must have been conflicting with another mod before
where nothing matters
yay
streaming
inb4 silksong has fsms
it will
hes in live
graig has confirmed it
so many blues
really
why would they not use what works for them
ALL THE BLUES
oh btw
jacob and blitz
can you confirm that the levels on each stat are saving properly
saving like saving and quitting?
that it does
ok
alright, i didn't know getint existed either :p
so something like self.SetInt("healthBlue", self.GetInt("healthBlue") + whatever the fuck you wanna add);
Well thats the way i already did it
oh ok
Bippity Bam
You can thank @solemn rivet (the original creator of bonfire) for doing literally all the work through me
press f10 to hide the debug log ingame if you don't want to change the config file to false
so it's fixed now?
yes
what were the bugs besides Resistance not giving masks
pinned
that was the only bug really
the other thing we changed, is that enemies got stronger, the higher the level you were
Thz
that was changed
so no longer will you dump points into your strength, only for your foes to get stronger, and thus makin what you just did pointless
honestly a combination of leveling up everything made up for enemies getting higher HP tbh
right, but we didn't like that....so we got rid of it
there were also another couple of bugs I remember
oh?
Nail Arts aren't affected by Strength and getting Resistence over 46 makes the chance to negate damage go down from 37% to 36%
Interesting.
if you grab the i believe the unofficial patch fixes the 1st bug, as that a issue with the game itslef
there's also that getting Focus cost reduced to 0 makes you unable to Focus anymore
though that requires several hundred levels so it's kind of impossible to get without infinite Geo lol
fair enough
as for those last 2 bugs you mentioned, we will look into them later. right now though, the main bug itself, the extra masks, has been fixed
yeah that's nice
Everything i did is still mildly above my head
though without enemies getting more HP it's all so overpowered lol
charms that enhance strength/spell damage don't work too
I have a general understanding but if i had to do more with no help i wou;dn't be able to
also even without removing the enemies scaling think



