#archived-modding-development
1 messages · Page 491 of 1
better test it
Well can’t rn.
I should have probably uploaded the code here so it could be tested
If it does work, when I finish working on it, I’ll make my npc code more user friendly and make the first release of FrogCore or some other name for a core mod
Here is a screenshot of it. Art by Andy070609#1547
does ModHooks.Instance.SlashHitHook or ModHooks.Instance.GetPlayerIntHook happen first
specifically, getting the int nailDamage
you know what? i'll try to make something similar (but better ofc :^) ) SFCore, while on vacation lol
A journal helper?
yes
Ok
but i should finish additionalmaps first
does ModHooks.Instance.SlashHitHook or ModHooks.Instance.GetPlayerIntHook happen first
so, anyone know?
Why not do some logging to figure it out
oh
right
how do i enable like the little console in game that mods can print to?
i thought it was modconsole but that didn't do anything
You have read the api docs, right?
oh i should fix that
kinda wrong
"LoggingLevel": 2,
"ShowDebugLogInGame": true,
in the modding api global settings
wait there's a logging section i'm so stupid
sorry i should really take a closer look at these things before asking
@jolly oriole it turns out my code did work with multiple entries being added
gonna go refine my npc code now
k done that going to add the fsm part of my JournalHelper now
yayyyy fsm stuff is pretty much done
turns out the last fsm modification isn't even a fsm modification
IT IS COMPLETE

download since it isn't on the installer yet
@vocal spire how does the void spirit... work
@vocal spire instead of
Modding.Logger.Log(string.Format("[{0}]: ", Assembly.GetExecutingAssembly().GetName().Name) + " DialogueNPC: " + o);
you can also do
using Logger = Modding.Logger; // Not neccessary, but why not
Logger.Log($"[{GetType().FullName.Replace(".", "]:[")}] - {o}");
and you also don't want to use GetIntInternal or SetIntInternal, as with that modhooks won't work on that field
but while checking the method out, i found out that for some reason, crawlers count twice in the journal
Ok
Yeah I found that strange too
Idk why I did the strange logging for DialogueNPC. I don’t remember when I added that
Awww now I’m making myself go fix it.....
Time to add a journal entry to uuwuu!
gonna leave lifeblood master alone because I have bigger plans for them
Nvm journal helper slightly broken. I know how to fix one issue but need more time on the other
explain pls
First issue(the one I can fix) was me accidentally using the wrong list, causing Custom types of entries to display wrong when there are entries that haven’t been gathered yet. 2nd is journal entries not showing up despite me calling the correct methods
By not showing up, I mean I added them(not unlocked) then unlocked them
And they didn’t show up
hm
To fix the first problem I just need to get the right list with reflection and get from that instead
I think I could have fixed the 2nd one because I may have used the wrong string somewhere, but I had to do stuff, and now I can’t for a while
K I can work on it again now
k fixed both
the 2nd problem was just me typing an incorrect string
IT'S COMPLETE
I vaguely remember saying those exact words before.......
anyway, I went with this amalgamation of color because uuwuu turns normal, yellow, blue, and green colors during the fight
can confirm it now works with multiple mods adding custom types of entries, and entries being unlocked works
Journal Entry Update. New dependency: FrogCore. You can get it from
https://github.com/RedFrog6002/FrogCore/releases if it's not on the installer
*it’s very likely no one used it
Oh FrogCore depends on Vasi and Modcommon
vasi and modcommon
isn't vasi there to kinda replace modcommon?
I think I used something from modcommon somewhere
Got errors when removing using ModCommon;
Forgot what they were
probably gameobject stuff, like FindGameObjectinChildren or something
I wish I could view hk’s code on my phone, would make modding a lot faster
hey someone, you're the only one that talks here?
Nah
i'm pretty confused tbh
Where?
What phone do you have, someone
iPhone 7
Rip
I was gonna say if you have Android you can just get depotdownloader, ilspy and vscode
Oof
@floral furnace https://github.com/TTacco/Hollow-Point/blob/master/HollowPoint/Stats.cs#L209 you have 3 different types of accessing playerData in this one function
PlayerData pd_instance // member variable of the class
PlayerData data // from the function header
PlayerData.instance // on line 323
yeah i know im not consistent
granted i think i did alter the soul cost for healing
ngl reading my source again, i wanna shoot my past self for writing this
like goddamn is it messy af
i dont blame you
like the amount of inconsistency, how some classes are singletons while the others are not
this is what i get for repeatedly going "oh wait wait nvm, this idea IS BETTER" for at least like 20 times over the course of it developement
oh, you don't want to look at the source code for TestOfTeamwork
ngl you i dont expect you to write worst code than i do lmao
last time i told someone "wow holy shit your source code is clean" they said "what? no this is shittily written"
yeah ok, my code is somewhat clean, but with >1700 lines in one class that can also be shitty
hm, i couldn't do that, as i have custom monobehaviours lol
i mean, you can take a look https://github.com/SFGrenade/TestOfTeamwork/blob/master/TestOfTeamwork/SceneChanger.cs
yeah, was kinda cluttered before i did that
oh this was NOT seperated like this before?
moved them into subfolders on august 4
oh yeah, that's the SceneChanger, where i put everything changing scenes in one file
very cool modding development question
unless you mean the source which grenade linked a few messages ago
my friend is just drunk forget about him
Nice
feasibility of adding Revek to constantly attack you throughout P5?
of course, you can see HKTwitch source code
Can someone explain the second pinned message? Sawyer's table
Is that a mapping of which unity layers can detect collision with each other?
pretty much
Great
Honestly it means nothing to me right now I just wanted to make sure I understand it
I have good mod idea. I make mod idea reality now
hey can you make a mod for me that restores hallown--
and you play as the plae knig adnd there's leik 100 new NPCs and yuo meet the 5 grate nkights
5 great knights 🥴
and you play as the plae knig adnd there's leik 100 new NPCs and yuo meet the 5 grate nkights
is that a pale court leak?
Yeah, they're currently at NPC 73
no recreation of battle of the blackwyrm i riot
what do you MEAN the modders aren't creating an entirely new game with new assets, rooms, characters, lore, custsc--
new assets: done
new rooms: done
new characters: ig also done
new lore: maybe
new cutscenes: no
what if the cutscene is just a screen recording of moving around images in google slides
I’m thinking of another mod idea. Involves the radiance and dreamers. Lot of cutscene stuff
is somebody talking about pale court
oh
new lore: maybe
_ _
_ _
_ _
What about mod, that allows to skip animation in Hall of Gods for quicker practice
how do the watcher knights trigger their waking up thing
/can you force wake up all of them at once
Afaik that was tried, but the bosscontroller is coded so that only 2 are awake at a time i think
That’s easy to do
I made only one wake up before
Editing the fsm to make all of them wake up should be extremely easy
whoever tried that before said that the hard part was that the bosscontroller thought the fight was over, when only the 5th (6th?) watcher knight was killed
Probably something with the chandelier
I’ll finally make the watcher hoard mod soon then
how do I make a still sprite sway like the grass in queen's garden, but from the ceiling instead of the floor?
Probably just copy and paste
Also pale court spoilers?
Upside down mode?
Defy gravity?
If pale court doesn’t defy gravity then I will
lol
I want to figure out the script itself
because I have very thight room to work with utiny ripper
and therefore would like to avoid using it
also, I just want to make the same effect but in a different element, not copy the element
Ok
already tried copying the script alone, but no good results
I think I heard it was a shader
What was the script?
Probably a null reference somewhere
the only difference between the swaying grass and a still sprite was the script
yes
I could be wrong though, I'm not an expert; this is just but what I think I've figured out
Ok
Can you send the code here?
I can’t do it on pc rn because I have region band soon
hold on, looking for it
for reference, it's the object simple_grass_nocut
in level 220
fungus 3_40
(queen's garden stag statiom)
swaying grass is made using a shader
oh
let me try if it works upside down
so if I want make an object sway like that but upside down (ceiling) how must I put the shader?
for upside down, use the shader in the same way the original does, just rotate the sprite gameobject by 180° Z
But will pale court go upside down
I must know this before I devote my existence to doing it
it does also work with no rotation, but then you have to adjust the Height Offset option of the shader to something negative (with the original sprite it would be like -2 to -3 or something)
Actually it doesn’t sound that hard to make the hero upside down
Just change the gravity to - of what it was, then change the hero’s size
just change the Y scale to -1
oh, don't know if that works with the movement options
should just work with just the scale changed
Ok
can't test it rn tho, playing among us
Well expect a new mod as soon as I finish playing my music for region
so I need to rotate the sprite as well so it doesnt look upsdown right?
and no, no upside down mode will be added to pale court, this is for an specific aestheitc
uh, depends on the sprite you have, but possibly yea
ok, I'll make some experiments later
I feel like region went well!
Anyway prepare for the new mod call mod upside down mod
cool
I feel like the gravity knight mod should have something extra....
What do y’all think of having a focus like thing for the quick cast key(yes I know I’m contradicting the point of that key) but it changes gravity
sometimes you have to think with portals wait, wrong thing
Takes 66 soul
?
Why are we bringing portal into this
I wouldn’t mind portal in hk but why
Oh lol
wait, no that i think about it, VVVVVVV fits more lol
?
the game where you flip gravity
@vocal spire, what do you think of cyber knight so far?
Cool
already have my fsm edits planned
will people be mad if I make the vengeful spirit on quick cast one fsm state late?
definetly /s
k well they will just be mad
bc I dont want it to be togglable with a charm because that will make everything another state later
I mean I COULD just change the fsm transition but... actually that sounds easy
k thanks
can confirm you also need to set the gravity
and the jumping works like it should?
1 sec
k
I probably also need to set the velocity stuff too
also gonna make it cost soul now
I should probably add a check for that
but looks nice already
ok
thanks
I'm not gonna make it cost soul yet because I should probably make sure gravity works first
hk clearly was not made with - gravity in mind
idk if it's possible, but you could try to get some late update hook and just set the y velocity to -y nvm
It’s really weird because - gravity doesn’t seem to work well
Still pretty cool to mess with though
don't feel like staying up to upload source again. Charm explains most of the mod in it's description, the rest I can explain, but is easier to see and experience
whatever you did, i'm invisible and fall right through the floor
I don't think I made the knight invisible.......
what
what happened
what did I do
I didn't do anything
what
ok I think I know what happened
my guess is something in the herocontroller start hook died
nah
charm update apparantly comes before hc start
just needed to add an if to setting the size in charm update
what's this?
so turns out the grass swaying shader is a custom hollow knight shader
which is to say, not a default unity one
i mean, you could rip the shader from the game files (probably with UABE or utinyripper), but that would require one assetbundle for each platform (so windows, linux, mac) with the compiled shader, or one does it in code, which would require a codebase that allows for that
which is to say, too complicated, right
can't you just copy the shader from somewhere else in code?
yeah, but idk how the pale court code looks like, as in, how difficult it is to do something like that (and making the shader from scratch is better as it doesn't need a preload scene slot, i've been told that the modding api can only preload a certain number of scenes)
but not too complicated
wait what
oh no we are going to die now
the modding api is limited help I am in pain
also help I am in pain copying a SpawnObjectFromGlobalPoolOverTime from grimm to watcher knights isn't working
do I gotta download the mod to understand what it does
sad
or look at me and grenade's conversations before it
I will when I gethome
ok internet back
yay
we can just not get complicated with that, it was just for a fancy little detail anyways
Okay so I'm tryna make a mod to give Nosk a nose
I've edited the spritesheet but have no idea where to go now
Program a mod to replace the spritesheet
Rrright, yeah...
you can try looking at the source code for the Transtrans mod using https://radiance.host/apidocs/DnSpy.html and borrowing the code
Oh, how delightful
borrowing more like replacing the spritesheet and a single string....
im at the stage "Loading assetbundle into Hollow Knight" of adding my textures, ive done the compile and build stuff inside unity, however im sure what to do now
im basically doing something similar of what akino is doing
if i open my .csproj file of the project, it appears blank.
hmmm
what are you changing
well i open it in visual studio and theres nothing
i might of not done something specific in a previous segment perhaps
thats probably it
show
ah
ty
hmm
again its empty
but in unity, my actual scene is empty too, and the only thing ive changed is assets. so that might make sense
im tired for now, and ive made enough progress to call it a day. ill come back to it tommorow. thanks for the help 🙂
this is for a mod yeah?
You don't open the unity solution
Or at least most people don't use the same solution
You just use unity as a budget asset bundle creator
I think Nickc01 actually does stuff in unity fwiw
So I’m using a custom scene for a boss mod. I use the statue, and it stays white for a while, then I go back to the statue as if I had lost. My logging says that the objects in the scene have loaded properly, so what’s wrong? I think that the scene might be loading but the white doesn’t fade away. Does anyone know how to fix this?
send blanker down
is people figuring out how to change backgrounds? NICE
@jolly oriole did you figured out how to implement our thing, looking how you're messing with the title screen background?
i'm still trying to get this shit darker
and
cameraCurves.redChannel = new AnimationCurve();
cameraCurves.redChannel.AddKey(new Keyframe(0f, 0f));
cameraCurves.redChannel.AddKey(new Keyframe(1f, 0.5f));
also doesn't work
was thinking, can a shadow be added behind the letters?
or at least behind the one being selected?
you technically can completely replace the logo
oh wait, you mean the option thingies
idk
yes
for some reason i can't get the camera to use the provided curves
I've noticed while using the LanguageGetHook that the game seems to cache some lookups for the sheet "Map Zones" - for example, if you open the map multiple times, the first time it calls the hook for every area name, but later times do not. Anyone know why this happens or how to fix/work around it?
when Initialize() happens too late
update: that obv didn't work, but the color correction stuff also has no impact
||watch me make a requirement of ending 4 or 5||
i could upload it rn, but i also could add something else
Adding something else seems to be the thing you will most likely do
especially when it involves that logo sprite, which can be changed dynamically
optional, but
var cameraCurves = new MenuStyles.MenuStyle.CameraCurves();
cameraCurves.saturation = 1.25f;
cameraCurves.redChannel = new AnimationCurve();
cameraCurves.redChannel.AddKey(new Keyframe(0f, 0f));
cameraCurves.redChannel.AddKey(new Keyframe(1f, 1f));
cameraCurves.greenChannel = new AnimationCurve();
cameraCurves.greenChannel.AddKey(new Keyframe(0f, 0f));
cameraCurves.greenChannel.AddKey(new Keyframe(1f, 1f));
cameraCurves.blueChannel = new AnimationCurve();
cameraCurves.blueChannel.AddKey(new Keyframe(0f, 0f));
cameraCurves.blueChannel.AddKey(new Keyframe(1f, 1f));
Can I ask what AddKey does?
yea
K
basically it's just
Input Color: (R: 0.0 - 1.0, G: 0.0 - 1.0, B: 0.0 - 1.0)
Color Correction Curve: Normal (so from [0, 0] to [1, 1], per color) or something different
Output Color: Color Correction Curve Value at Input Color point
Ok I think I sort of get it
and once i implement the thing for the logo, i could display this instead of the normal one
if you need to run before initialize just use the constructor bro
nah, too ez

in the end it worked with the code in the initialize method
change the logo to hollow knight silksong to prank people
that's rad, do you happen to have a somewhat HQ version of a logo?
i think i know why the modding api can only preload from a certain number of different scenes
https://github.com/seanpr96/HollowKnight.Modding/blob/master/Assembly-CSharp/ModLoader.cs#L330, the loaded scene never gets unloaded
can pr once i'm home
yay
Now we won’t have nightmares
HELP MY JACKET DOESNT PROTECT MY HANDS AND ITS COLD
it does get unloaded though
loading a non-additive scene forces an unload of every other scene
dramatic sound effects
I thought similarly on the number of scenes thing but doing an explicit unload didn't actually change anything
yeet
which happens at 447
So what puts the limit on scenes then?
but (at https://github.com/seanpr96/HollowKnight.Modding/blob/master/Assembly-CSharp/ModLoader.cs#L330, where the scenes containing the preloads get loaded)
AsyncOperation load = USceneManager.LoadSceneAsync(s, LoadSceneMode.Additive);
only gets unloaded once everything's done https://github.com/seanpr96/HollowKnight.Modding/blob/master/Assembly-CSharp/ModLoader.cs#L447
or where would the single be?
oh, probably when without the second param
oh ig
it didn't really make a difference when i tried it though
but it's probably a good idea to have
that's rad, do you happen to have a somewhat HQ version of a logo?
@jolly oriole
from google lol
Thx
just for testing purposes
it crashed, nice
apparently it wasn't difficult for unity to load those 494 scenes, but apparently it broke down when fetching the gameobjects
was wrong, it was because of loading the scenes
I’m so confused rn
<#archived-modding-development message> happened because unity tried to load every scene and didn't have enough vram left
So there is no way to fix it?
changed the loading a bit so it fetches the gameobjects per scene, with only one scene loaded at a time, maybe increases loading time but decreases vram usage
it went from 1.5 GB (starting the game) to ~600 MB (at some point during preloading) to idk how much vram usage (menu screen)
Well that’s a lot
What do y’all think of a save fixing mod? Since so many mods change saves and sometimes break them, instead of save editing the save, imagine a mod returning all the boss statues to normal. Fixing grimmchild. Fixing less journal entries than the one previously selected
but i may or may not tried loading 494 scenes (or at least the _SceneManager GOs in them, if present), out of which 473 actually had one of those
but it's so much slower
it used to be serial
at that point doing an unload explicitly is going to keep the vram benefits with less of a speed impact
then take this one https://github.com/fifty-six/HollowKnight.Modding/pull/5
although you may want to move the unload after the progress++;, as the progressbar isn't full when the game goes to the menu screen
what i should've tried before, but simultaneously loading the scenemanagers from a bit less than 150 scenes is slower than serialized loading them from those nearly 500
i mean i'll merge it but updating the actual dll is so much effort
just the unload is also probably better, as i now see that some things are broken when doing the serial version
namely: stuff that works when preloads are present
btw, while i look at this i wondered why you guys use the OnScreenDebugInfo class to load mods, instead of the StartManager, which would allow mods to hook into GameManager.Awake
oh, would also circumvent GameManager from existing until the main menu is loaded
Anyone want to do a big holloween collab to make a trick or treat hunt mod?
A bunch of rooms have candy in them, and the knight needs to get all the candy to get some king of spell upgrade(or something) from a rogue member of the Grimm troupe. In each room with candy, there will be a challenge(ex: ghosts fighting you, the floor is lava after collecting the candy, anything). There were just my ideas. If we do end up doing it, they probably will be changed
GameObject.Find then change the sprite with another one(assuming it’s a SpriteRenderer)
Or wait a bit for me to implement that in sfcore
you know what would be amazing?
possibly breaking every mod by changing when a mod is being initialized
oh boy, that is an output log
so i got batch preloading working
if you want to look at this tiny modlog with debug information for the batch loading
im trying to make a mod where the character can fly, but im encountering a problem trying to make it so that the character can focus while in midair, does anyone have any ideas?
man do i love this channel
i used dnSpy to find a canFocus method in herocontroller, but I cant find where it is called
probably called in some playmaker fsm
There's a Spell Control fsm in Knight Pickup that is responsible for focus.
Oh I made a mod for going upside down
Oh I made a mod for going upside down
@vocal spire australia mode
the loading bar for preloads dissapeared, trying to fix
@copper nacelle idk if you know that, but is some camera needed to display the preload progress bar? (as in, would the modinstaller really need to load Menu_Title just to display the loading bar?)
workaround aquired
Yay
Don’t you just hate it when you log a bunch of stuff to fix one error, fix the error, delete the logging, and it still logs?
this ain't it
then just copy the newer mod to the mods folder or don't compile while the game is running
I did that and I still can’t find where I have the Logging
any grep
Also I found out the most likely reason my custom boss scene wasn’t working. Forgot to preload a scenemanager and boss scene controller and put them in my scene
btw, was <#archived-modding-development message> an answer to <#archived-modding-development message>?
I want to know this too
yeah
oh god oh fuck
private (string, GameObject, int, string, string[], MenuStyles.MenuStyle.CameraCurves, AudioMixerSnapshot) AddMenuStyleCallback(MenuStyles self)
{}
have you heard of naming your outputs
in the sense of a struct or what
done
instantiated AudioMixerSnapshots don't want to work, so have a somewhat silent title screen
Awesome
yeah, done that with <#archived-modding-development message>
ah
never used those things before
now i only need to figure out how to make my own AudioMixerSnapshots, or if that's even possible
Assetbundle them?
but how to create them?
already did, a snapshot has a normal mixer behind it, with possibly some float exposed, but you can't look those up, and UABE doesn't want to show how a snapshot is structured, so i basically have to brute force the float names
fuck this
F
What pc specs would y’all recommend for modding?
My current pc is pretty bad, so I have been using a family member’s for modding, but I want to get a better pc for myself that I can always use.
wait till december for possibly all amd ryzen 5000 cpu + radeon 6000 gpu would be my recommendation
Ok
wait, idk when ryzen 5000 is being released
How much would that cost?
moving it to dms
K
not exactly modding related, but does somebody know why malwarebytes could possibly be detecting an app I made in visual studio only when it has a custom icon?
I'm a bit late again but snapshot values are stored in the audiomixer for built games, and uabe does show the format
Snapshot name buffer will have a null term list I think
couldn't find the audiomixer with uabe
and my uabe says "unrecognized asset format" or something for the snapshots
uh, which file would the mixer be in?
resources.assets?
wait, i can just open file with dependencies
Could be in individual shared assets as well
Yeah you can
Make sure you don't load in scene path mode
ok
hi, so im trying to reset the size of enemy bullets by just setting the localscale of the transform. This works fine for most things, you can get hit by them and stuff. However, the bullets arent destroyed on collision, so should i destroy them on the code and if so how?
@dark wigeon do you mind telling me how you modded uabe?
🤔
Quick patches?
Although it would be really hard to implement unity 2020 support that way so I'm just waiting
Also the mono type tree exporter is modded too but that one's on c#
hm
I'm about to go look, but does anyone know a way for me to create some of the modding api's globlasettings files in a different program? I know how to create a program that writes text files, but how do I write them in the same json format?
any json editor should be enough
ok
ok, it's official, the issue was never the audiomixersnapshots, although now i know how i get whatever one i need, but the issue was a missing audio source in the radiant style...
every single audiomixersnapshot for the main menu tested (21 total)
snapshot 14 ("Normal - Gramaphone") is my favourite
help my ears have been snapped by audio shots
even works on startup, so you don't have to select it every time
scam, xbox one and ps4 get exclusive title screen logo
is there a hook for when the player uses a spell?
No, that's handled by the Spell Control fsm.
that's a feature, for the poeple how already forgot he update hook existed
@languid goblet
lmao
Ah, what a great mod name with such an illegal title. Get hollow point and it’s legal again
Testing Stuff
Tbh I can’t think of a better one tho
FORTNITE
How does one use the PlaymakerFSM Viewer?
start it, click top left load scene, select whatever scene you want to look at, select the gameobject with the fsm you want to look at, done
Where am supposed to put it though?
the fsmviewer is a standalone application, put it anywhere you remember
And all I need to download is the actual Viewer right? No need for the source code
the fsmviewer is a standalone application, put it anywhere you remember
thanks
ye
Is there any problem placing files within the Hollow Knight folder
?
(under steamapps>common)
you probably shouldn't do that
Oh ok
I did "open file", and, well, it closed and nothing happened
open scene list does the same
hm, maybe @dark wigeon can help
That's the creator, right?
yea
Welp seems like I'll need to wait a while, I'll check later for an answer I suppose
In the meantime
Anyway to see what's in a mod?
any open source
Yeah I see that now
Thanks @jolly oriole
Alright so um
this is kind of a stupid question
but
Ok
what does that mean?
Also
I'm reading the first one in the list
"SetPlayerBool"
desc.
This code can be used to check when certain events happen in game such as obtaining a charm by checking if
target == "gotCharm_X"where X is the id of the charm
now, above it is a line public void PlayerBoolSet( string target, bool val )
and the whole section starts with ModHooks.Instance.SetPlayerBoolHook += PlayerBoolSet
So
if I understood correctly
and the whole section starts with
ModHooks.Instance.SetPlayerBoolHook += PlayerBoolSet
this
makes theSetPlayerBooltrackPlayerBoolSet
yes or no?
Yes
It will make your code in PlayerBoolSet occur before any code in the rest of the hook
Anything hooked after your hook will come before your hook, and so on
alright the only thing I understood is "yes"
can you explain it a bit more in detail?
like, any new hook will have order priority, I understood
but where are hooks created?
First, the original code runs on target and produces val. Then the first added hook runs on the original target and val to produce a new val which is passed to second added hook along with target, and so on.
woah um
In the case of GetPlayerBool, the final hook determines which value is retrieved.
I must've missed something earlier on
In the case of SetPlayerBool, the final hook determines which value is set.
Never
that is your method, right?
ModHooks.Instance.SetPlayerBoolHook += PlayerBoolSet in initialize will do the hook
Without hooks or on, you can’t really do much
playerboolset is basically the "MyCodeThatRunsWhenPlayerDataBoolsAreSet" that's in the page's beginning
Yes
So what triggers the hook?
When SetBool is called in Playerdata I think
The hook is inserted into the original code by the Modding API.
Wdym
It'll be easier giving examples
Ca you give an example of a hook, a method called by it, a place to use the hook, etc.?
Bruh
please?
Like, take this example
This code can be used to check when certain events happen in game such as obtaining a charm by checking if
target == "gotCharm_X"where X is the id of the charm
Yeah?
Can you take this example and detail it?
Alright so
look at 56´s video tutorial, he has some hook examples that really helped me
Fsmviewer broke?
public void PlayerBoolSet( string target, bool val )
would simply be the method called, correct? this wont have to do with triggering it and all, inside this I just write what will happen
Yes
Fsmviewer broke?
I'm not sure, but I think so
Os?
Yes
yes to what?
That was autocorrect
Os?
windows?
Ok and it instantly crashes on file open?
yes to what?
@jolly jungle the first question in the message above that message
yup
simply closes
the first question in the message above that message
@vocal spire alright that's a good start for me
Did you extract the zip
The only thing that happens before the open file dialog is the cldb read code
ModHooks.Instance.SetPlayerBoolHook += PlayerBoolSet at its most basic form of explanation calls your code when the hook is called
So this
ModHooks.Instance.SetPlayerBoolHook += PlayerBoolSet
is setting the hook. Now, where would one place this?
I already told you
Did you extract the zip
I'm pretty sure I ran it from in the zip
should I not do that?
Bruh
no
whoops
Not how files work...
Yeah as I figured
thanks
lol
aw damnit i need to go now
I'll need to continue being educated some other time
look at 56´s video tutorial its really helpful
Anyway, I’m making CustomKnight+ more user friendly to compensate for the needless extensions on the release of it
I could have released it weeks ago
Not user friendly at all in it’s current state
I was gonna ask you to try adding a journal entry
And I was gonna ask how to do that
eventually
look at 56´s video tutorial its really helpful
Heh, I tried, it's too fast for me
In advance, get frogcore
where and how
Look in the releases
Use manually install mods in the mod installer
Also don’t download the source
I'm supposing its a kind of central thing for certain things that can be made easilyer with it?
Use manually install mods in the mod installer
is that option for mods that arent on the installer's list?
Basically another modcommon, seanprcore, Vasi, and SFCore
why dont you all just make one single core?
Bruh
We all have different ways of doing stuff
Also bruh to me for defending that
Modcommon has a bunch of stuff no one uses
but like, wouldn't one single thing be better?
I mean at this point it might not be a good idea
one has an idea to make things easier, implements in their own thing to not clutter other things and things went on from there
and how do you make sure they dont do conflicting things?
yes
also can a mod use multiple?
yes
Yes
oh good
You just add them as references
anyways I'll be going now
Goodbye
for example: SFCore needs ModCommon to function
I'll continue my demonstration of my vast ignorance some other day
FrogCore needs modcommon and Vasi to function
I wonder when I’ll make a shop npc monobehavior
To go with my dialogue npc one
Should I make one?
ye
Ok
Will work on it after I finish my CustomKnightPlusCreator application and port it to Mac and Linux
Gonna require a lot, but it’ll be worth it in the end
the encouragement for each mod I make
not neccessarily requires a lot, just instantiate some GameObjects, maybe change some fsm variables, change some monobehaviour stuff, and done
yea
So I can just use reflection on that to get the private stuff I need(from my memory) then just bend that to my will
would i need fsmviewer and stuff to actually learn more about the game's code
probably
Are you wanting fsms or code
because i can use ilspy to figure out variable names but idk what values do what
Fsms are a good portion of the game’s code
fsm is glorified code
one more reason to get a windows as soon as i can
catalina dropped support for 32 bit
so i can't use mono/wine
or even play portal 2 apparently
so looking at hellmod´s source there is an unload method, why is that necessary?
In game toggling
some mods support that
ahh ok like in the menu
Yeah

The class needs to diver from ITogglableMod
Fsmview won't work with mono only wine
Avalonia port was lost somewhere
Probably on my old hdd
what fsm can i use to detect when the player uses vengful spirit?
found it thank you
is there a better way to call a method when the fsm is in a specific state than just checking if its in that state every frame in a hero update hook?
yeah but idk what they do
They each have a version of Fsm utility
Look in the apidocs fsm section for how to use modcommon’s
You can insert/add your method into the state
Modcommon has the methods directly in the fsm, while Vasi requires using getstate then you can use all the normal stuff
fsm.insertmethod or fsm.addmethod
Addmethod doesn’t require a action index
Just adds it to the end
can i do addmethod in initialize?
Bruh
Do
You
Think the knight exists then
On.HeroController.Start is a good hook for that
Just make sure to do orig(self); at the end of your code in the hook
It will also give you a HeroController so you don’t have to do HeroController.instance.GameObject, just self.GameObject
cool
If you don’t do orig tho, HeroController will actually just die
bruh
so im using herocontroller.start hook and everything works fine until i put fsm.InsertMethod("Fireball 2",0,() => Log("used fire")); then the entire method just stopped working, am i misusing InsertMethod? Also sorry for the many questions 
shouldnt insertmethod's index be the 3rd parameter input
oh my bad im thinking insertaction nvm
try adding a try/catch to it and log that
ok
i think you have to specify that its a new action object?
Recently some of my fsm code had a null reference exception randomly out of nowhere
I had to rewrite some code for it
Anyway, I’m making CustomKnight+ more user friendly to compensate for the needless extensions on the release of it
@vocal spire ayy dope af. yes I'm still lurking here. I love anyone's Radiance background btw
hello sorry for the late response, but i tried logging the try catch but it didnt log anything at all for the try catch or the method
I dont know much about insert method but if you just wanna call a method maybe you can do something like this?
fsm.InsertAction("My FSM State", new CallMethod
{
behaviour = mymonobehaviourinstance,
methodName = "MyMethod",
parameters = new FsmVar[0],
everyFrame = false
},
0);
void MyMethod(){
Log("Test");
}
alright ill try that and tell how it goes
i think it will be easier if i send the method i call on the hero start hook and you can check if im doing something wrong
how do i add that code box like you did in your message?
i think InsertMethod should work
maybe you build a wrong project like not choose .Net Framework
{
Log("Player init");
PlayMakerFSM fsm = self.gameObject.LocateMyFSM("Spell Control");
try
{
fsm.InsertMethod("Fireball 2", 0, () => Log("cast"));
}
catch (Exception e)
{
Log(e);
}
orig(self);
}```
what specifically is the error
nothing logs
hmmm
so there is no error and there is no logging?
yes
hm
did you hook the method though
lol
yes
show the initialize code
if i remove the insert method everything works
{
Log("Initializing");
ModHooks.Instance.RecordKillForJournalHook += OnKill;
On.HeroController.Start += InitializePlayer;
On.HeroController.CanDash += CanDash;
Log("Finished");
}```
hmm
any output log
?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/```
only from initialize
show the logs
so nothing logs from your method?
nope
then something else is wrong
since you have logging before insertmethod
are you sure you built and copied the dll to the mods folder while the game was off?
ok just show the modlog then
send txt
you're building the wrong library type
lol
what
it's supposed to be .net 3.5 not net standard 2.0
I think you need a new one
project settings
when I made a 2.0 one, it wouldn't let me select anything higher than 3
<TargetFramework>.net 3.5</TargetFramework>
</PropertyGroup>
``` like this?
no
oh
i have mention this before lol
lol
development on the customknight+ creator is going pretty well

in a minute, I'll be able to perfectly recreate a customknight+ globalsettings file
except in a different program
yay I did it
@floral furnace step your game up
ooooooooooooooooooooooooooooooooooooooooooooooo
god i fucking wish
custom start text for hollow point? 🥴
custom menu theme for it too?
nah
yeah just play fortunate son in the bg with vietnam footage
i fucking wish i could upload it to the gdrive, but google doesn't let me log in since i was on vacation
F
Lol
lol
So
Suppose I make a boss
Based off an existing boss
Say, for example, Crystal Guardian
yeah?
type it all out you can do it
I'll need to actually make animations, right? I won't be able to use the ripped spritesheet directly like in CustomKnight
look at how mods like lifeblood master, lost lord, or any other boss with texture changes
you can get the sheet from #art-discussion
no I already have it
I made the lifeblood master one by using the fill tool
And already working on the retexturing
extracting the frames isn't necessary
Ah
you need the full spritesheet for the easiest way of changing the textures
So I will be able to use it like when passing a full customknight sheet to the mod? It'll do the separation itself?
?
no
you are replacing the sheet it gets the textures from
well I guess that's a way to think of it
ok
cool thanks
yeah it's just the sheet
I just needed to know ahead of time
For the FSM Viewer (which I had, displaying my brilliance, forgot to take out of the zip file before I ran it), do I need to take out only the zip or also the three other files?
All files
hm ok
thanks
should I make a small folder for them?
fro organisation
Or should I put them somewhere else
what do I do someone help please I don't want to mess up my files
@jolly jungle anywhere as long as they are in the same folder smh
hm thanks
When I do "open file" am I supposed to choose the game?
in the fsm viewer
wait
"open scene list" is all scenes in the game?
Yes
Alright so I'm looking at the menderbug fsm, for example
?
Just making sure I understand. It goes over and checks if its dead. If yes, ends the machine. If no, continues to check if the sign is broken. If no, ends, if yes, checks whether the spawn chance happened.
Now, I'm not sure what the next part means, "Idle- Hero enter".
And after that, comes, "Direction: Left/Right". Why does left link to right and right to left?
Idk
Or is that the way it enters from
The thing with idle is waiting until the knight appears
So, entry from left, so fly to right
Probably
Or entry from right, so fly to left
Then happens the startle, and then it skedadles away
Now, how does the "Killed" section work?
Hm
That happens in a different section entirely as it has nothing to do with Menderbug's routine, correct?
No it is just an easier way to have all states have the same transition
So imagine all states having ZERO HP as a transition and they all lead to the Killed state
Ah
So it's unmarked on them because its for all?
and thats why its differently colored
ok cool
Also
Crystal guardian is apparently "Mega Zombie Beam Miner"
Alright a question
How does one manage a bossfight such as Hive Knight
It seems to have multiple fsms controlling different aspects of the fight
how does one link between them all?
hive knight actually only has one for the fight
other is for stunning
it's just the same as other fsms though
you modify multiple this time though
but what about the bees and the spikballs
try looking at how those are summoned
like, are they automatically applied when the gameobjects are created or however it works?
look at how they are created
where do I do that?
have you opened hive knight's fsm?
Yup
well
I see the bee roar for example
yeah?
let me look
gameobject:"Mouth Swarm"
pretty sure that's just the animation
It's one of the purple ones, right?