#archived-modding-development
1 messages · Page 515 of 1
got it. The video is like 15 mins and nice for seeing the barebones of how the class should be formed and how to find things using dnspy etc. but if you prefer the text guide that's good too.
Yea I'll probably check it out later but for now I'm probably just going to explore the code a little and see what's happening
alrighty
What are you doing?
I just chose a hook that looked interesting, in this case SoulGain, and doubled the amount, but Hollow Knight crashed before getting to the main menu
Might be unrelated
Try without your mod
I will in a sec, things are loading
Ay didn't crash this time, with the mod still on
Oh wait it failed to load
What did you set your target framework to? Also did you have a controller plugged in when it crashed
I need to check that. I don't own a controller. It said to look for ModLogs.txt but idk where that is
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/```
It’s in your save files path
Ok
70% of the time I’ve found the problem without modlog though
k
imagine not needing output_log for your problems 🥴
Target framework is .NET core 3.1, is that good?
it should be .net framework 3.5
Ok
unless you want to make a mod for the 1.5 beta, in which case it should be 4.7.2 i think
I need to install that then, cause it's not listed lol
are you using rider or visual studio?
visual studio
well, shouldn't matter, i think both have a completely seperate project template for .net framework DLLs instead of .net core ones
huh
if this piece of garbage would stop lagging, i could make a screenshot
On the microsoft download page theres only 3.5 SP1, is that fine? It also is only available for runtime, not developer apparently
screenshot is in german though
you could also edit the .csproj file, but creating a new project is probably easier
Yeah, especially given I have like 10 lines of code lol
The frameworks only go down to 4 in the drop down
Probably that since Class Library .Net framework is what I'm supposed to be using, right?
Yeah
Do you know where I can install 3.5?
Can’t link atm
What should I google then?
You can just do it from add/remove windows features iirc
k
or download from microsoft.com
should be sufficient (in the visual studio installer)
k
Can I @ u
no
Oh ok
Wouldn’t it be a shame if I accidentally edited a reply message
discord doesn't make @ out of those anymore
but i still have a way to do so
Well I must say just from reading the docs hooks look very nice to use.
Imma go annoy someone now bye
Have fun
Still doesn't pop up in the list =/
hm
I googled and it said to check the turn windows features on and off, which I'm trying now
Wait you're annoying yourself? I'm confused
I might be able to help you, can you hop in general and screen share?
what does pop up in the list?
Everything after framework 4
And then "enable .net framework 3.5" is the first item on the windows features list so I figured I'd give that a shot
hmm
I'm waiting for that to download right now
i figured it was probably what SFGrenade was saying but if you already checked that idk what it is
I think it was because in the visual studio installer there was targetting packs for all the 4+ frameworks, but the thing for 3.5 was dev tools, not a targetting pack
That could be it
how would I go about making my own mod?
?pins
Check the pinned messages for more information - https://cdn.discordapp.com/attachments/187137504393035776/823796522751623168/unknown.png
Thanks
You have a problem with that?
Well I restarted my computer after changing that thing in windows features, and I think I'm just gonna give framework 4 a shot, does that have anychance of working?
Wait nevermind it finally showed up!
Finally lol
nice
Yes but you’ll get a nasty failed to load every time you use it
Well I got visual studio to be able to use 3.5 now so i think it's all good
Nice
And it works! hooray
Why does directly setting the fields in PlayerData cause potential conflict as opposed to using something like SetInt or a varient?
if stuff is hooked to setint then it wont be called when you change playerdata directly
k
using the OnEnemyEnabled hook, duplicate enemies have numbers after their names. Is there a property that shows the base name, or a way to convert the enemy object to a string so I can see all the properties?
if not I can just use a substring, but that's gross
I don’t think so for your question Staxis, but maybe you could think of a property that that enemy has? E.g. if your enemy is the only one in the game with a FSM with a particular name, you could check if the enemy has that FSM?
That said just looking for the start of the enemy name (or maybe just strip off numbers and (clone)) is probably the most sensible
alright, thanks
also, what's the best way to wait a bit in a hook function?
yield return new WaitWhatever doesn't work
Uhh
I think you can only do that in a coroutine
You can see an example here I guess https://github.com/flibber-hk/HollowKnight.RandomizerMod/blob/main/RandomizerMod3.0/SceneChanges/RandomizerChanges.cs#L269
I just need to delay a little for fps to stabilize
maybe there's a more useful hook, I'll look later
can a value in an fsm be replaced with a function?
ChaseObject in the vengefly (Buzzer) fsm has speedMax and acceleration, both of which I want to multiply by (200 / Time.DeltaTime)
Is Tme,DeltaTime constant?
no, is time between each frame, and since that isn't consistent, time.deltatime isn't consistent
or constant
Otherwise you can just set those fields at the start of the state
i haven't looked at it:
the only thing probably fps dependent is the acceleration, with the speed probably being applied to a rigidbody, which moves fps independent
You could add a hook to the ChaseObject.OnFixedUpdate to set its acceleration whenever it's called - I don't know what that'd do for performance though
Hmm
You can add functions into fsms, so maybe I could create a new fsm variable, update it with the custom function and set the acceleration to that?
Yeah, something like that was my original suggestion
I’d expect it to be faster than adding hooks but idrk
I don’t think execution time should be a problem here anyway
And even if it is, the mod will compensate for it 
If you don't do it every update then it won't work if they change FPS, that's the only issue
Yeah it def needs to be every frame or every few frames
Even a second after loading in my FPS isn’t stable
I mean tbh my FPS is never totally stable
(That's why I suggested OnFixedUpdate)
What is OnFixedUpdate?
I think it's the code in the ChaseObject action that runs every frame?
Actually probably you have to look into the ChaseObject action a bit more (in DNSPY)
idk if it has it, but FixedUpdate runs every physics tick, exactly 50 times a second in the case of hk
Ah ok
just read that ms is apparently changing parts of their store, so modding the ms store version of hk should be easier at some point in time
can someone look at modding help pls
modding help exists for a reason
how do I make a hook to ChaseObject.OnFixedUpdate()? The docs don't seem to say anything about using other hooks
in dnSpy I see what I think is the hook being added and then removed? I'm not totally sure how it's all set up
In general write the full path of the thing, but add On to the start
So it'd be On.HutongGames.PlayMaker.Actions.ChaseObject.OnFixedUpdate
do you mean like ModHooks.Instance.On.HutongGames.PlayMaker.Actions.ChaseObject.OnFixedUpdate?
No
oh remove the modhooks.instance
AFAIK ModHooks.Instance.... hooks were placed manually by 56/whoever, and On.... hooks were placed automatically by the monomod
ok wtf is this signature
private void FixedUpdate(On.HutongGames.PlayMaker.Actions.ChaseObject.orig_OnFixedUpdate orig, ChaseObject self)
what on earth is that input type
Something created by monomod 
(You also have to remember to put orig(self) somewhere so the original function runs)
I'm not sure I fully understand how hooks work
the idea is that instead of the normal function running, my function will be run instead, right?
ok
I think this is accurate in this case but I'm not sure
I just mimic examples from other people's code 
ok well now I'm way more confused
it seems like the acceleration is being done in the onFixedUpdate
so idek why it's fps dependant
do you happen to know the internal name of soul sanctum?
get debug mod and go to that room
yeah didn't have hk open
@runic wind #archived-modding-development message
alright I'll try to figure out the fps dependency tomorrow
thanks for all your help Flib 
Good luck with that 😛
does anyone know where the attack sprites for boss attacks like pure vessel are
is there a way to obtain that
like this one
but transparent
(pls ping me i'll be offline)
i think there are also seperate sprites just for that focus effect
i'll look
but i'd need this too
this one
if you search with file names, i think those were called something with "out of bounds"
i'm at work, so i can't look for them
not stuff like "atlas0_xxx"?
no, that animation is also split in like 13 different singular image files
grimm is also amazing, made of 2 spritesheets and the godseeker bow is also a row of like 13 images
i can only find 7
Where is this from?
Oh I see
Click the spritesheet, do "open original", and then download
Or get it from #art-discussion
what's this? 
^
possible actually 7, just thought of a random number to say
oh wait lemme ping @fair rampart
Next to PV, or?
thanks
pv's focus attack big orb
but anyway i resolved the issue
thanks for the sprites ruttie
new soulorb
pv skin
how bad of an idea would it be to make a custom knight
as someone with absolutely 0 knowledge on how to do it btw
pv skin with original young thk cloak and unsquished horns
gonna make the sprite smaller
everyone uses knight's cloak shape (even the private skin) which is sad
but understandable
it looks like i have to draw in some things myself
Ohoho
It's a shame we can't really do the actual PV horn size
Isn't there gonna be a hitbox problem with that?
Or seomthing
Not sure
What I meant was that the Knight has hitbox only up to top of head
this'll have hitbox on the horns too a bit
wait, the horns aren’t counted in the hitbox? neat!
nah, it doesn't affect
the hitbox is just part of the body by default and it'll be a bit of the head when i make it smaller
wait no
sorry memory bad
anyway, i had to edit it a bit but it's some good work i have here
not very neat because contrast increase but yeah
i'm probably gonna put this over the smaller orbs
Be patient and wait for me to finish other mods so I can finish the CustomKnight+ editor so you can do this
Wait I thought you said customknight+ wont be able to do anything about that
that's... marvelous
Well
#modding-discussion
But also do you have the base files?
My bad
I knew something seemed off in that name but couldn't figure out what
Thanks
...tell me what you know about CustomKnight+
Really not looking forward to explaining this again
Nah
just gonna wait for you to release it in a year and a half and then I'll see what it does
So for some odd reason using the SetPlayerIntHook broke the game
private void OnSetPlayerIntHook(string intName, int value)
{
//Ensures the player can only have a maximum of 3 slots even when aquiring a charm notch
PlayerData.instance.SetIntInternal(nameof(PlayerData.charmSlots), 3);
}*/
This segment gave me unlimited soul, dunno how that works
bro
Bro
Bro
you are ignoring every int set
you're supposed to like check the intName and call SetIntInternal/set it directly with a different value when it would set something that you want to change
and if it's not what you want to change you just call SetIntInternal with the stuff you get
this delegate really should be like trygetvalue imo
but i also don't want to break every mod in existence
tbh i thought that it'd set the player int like normal while also running the line of code i added
i guess i just misunderstood the way the hook worked
https://radiance.host/apidocs/Hooks.html#getplayerbool the example can be applied to your effect as well, just need to swap bool to int and get to set
does getting a charm notch change a bool in PlayerData
then let it be PlayerGetIntHook, if the target string is the same as charmSlots, return 3, otherwise getintinternal
👍
Random unrelated tip thingy, you can edit your build settings in visual studio to copy your built .dll to your mods folder by going from Project > Properties > Build Events, and then in the Post-Build textbox you can put copy [Your built .dll path here] [Your mods folder here] so then you don't have to move your updated build file every time you change something. I thought this might be useful for some people, maybe not idk.
that is a nice tip, thanks
ill just have to remember to change it if i ever do anything non-hollowknight related
or is it just per project
Per project
Unless visual studio does something really weird lol
to your deleted messages: yes
i tried using the Reflection to call private functions but its causing a System.NullReferenceException error when i use the mod.
My code is:```cs
private bool CanDash()
{
BindingFlags private_instance_flags = BindingFlags.NonPublic | BindingFlags.Instance;
MethodInfo m;
HeroController instance = new HeroController();
m = typeof(HeroController).GetMethod("CanDash", private_instance_flags);
bool CanIDash = (bool) m.Invoke(instance, new object[] { });
return CanIDash;
}```
I'm trying to call this function from HeroController
Uhh
This doesn't answer your question, but why can't you just use the reflectionhelper?
additionally, instead of new object[] { } i personally do either null or new object[0]
do null
i just copied it from the API docs
bool CanIDash = (bool) m.Invoke(instance, null);?
yes
does that allow calling functions?
HeroController.instance
should be caching the method info
you can get a fast reflection delegate using the monomod extension too
private bool CanDash()
{
return (bool) typeof(HeroController).GetMethod("CanDash", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(HeroController.instance, null);
}
how i'd do it
it works thanks
if it works, don't change it
I deleted it because i felt bad for @ing you for something i couldve just tested lol, thanks for your help
where can i find my hollow knight save files if they're not in my appdata folder
Press win + r and then paste this
%AppData%\..\LocalLow\Team Cherry\Hollow Knight
ok cool
and hollow knight
deleted messages
huh?
when there is literally a lib for fast reflection and no one uses it
true
is the vasi reflection helper different from the one directly in the mapi?
a bit
there's some stuff i changed because i don't have the restrictions on not breaking old things
break old things in the 1.5 mapi :v
true
I need some help understanding how fsms work
I'm looking at the vengefly fsm, and two relevant states have the action "ChaseObject"
the important part of ChaseObject is doBuzz(), which is being called through OnFixedUpdate() as well as OnEnter()
What is the fsm really doing with ChaseObject? I don't understand how it can be a class instead of a method
And is OnFixedUpdate() even being used? ChaseObject is being called once per graphics frame as far as I can tell
oh, and I'm assuming OnEnter() is called automatically- when does that happen?
All actions in an FSM state are classes that inherit from FsmStateAction. When the action "executes", it really calls "OnEnter" and does the thing there. If it has an OnFixedUpdate or OnUpdate method, then those happen when they happen.
You're right that OnFixedUpdate should be called every physics frame, except if the FSM leaves the state that the ChaseObject action is in then it won't be called any more... that might be why it's not behaving as you'd expect
Wow, at this point instead of the intended quick fix it looks like I should just fix tcs broken code
Uhh, wasn't that the whole point of this project?
:tcarrivewithspaghetti:
Hi,
I just want to share a small theory that I have: I think the dream nail is an hallucination we collectively had, there has never been a dream nail in Hollow Knight:
I didn't find any hook related to it (unlike dash for example), I didn't find anything related to dreamnail usage in HeroController.instance.cState (unlike C-dash for example), I didn't tind any FSM related to it in HeroController.instance (unlike spells for example), and I didn't find anything related to it by listening to every single {Get/Set}Player{Int/Bool} (unlike bench state for example)
Only reasonable conclusion is that dream nail doesn't exist
Where ? 😮
You can use the FSM Viewer to look at it
Hmmm I'll try that thanks, I thought I could find everything by looking at the code
I wish
Code for dream nail must be in the dream dimension, it all makes sense
My original plan was to just slap *= 200 / fps onto the relevant numbers, honestly just creating more broken code
(Obviously) you were right, I think I found it, thanks a lot. Now I just need to figure how to interact with it in my code, but it seems that radiance.host has some tips regarding that
Edit: I figured it out, thank you again for your help 56 🙂
can you create and remove entire states in FSMs? It's not required for what I want, I just think it would be cleaner
Yeah
how? the docs only mention adding/removing actions within states and changing the current state
You just remove it from the array and update transitions to not point to it
ok, but how do I make a new one
new FsmState()?
ok, thanks
Do you need to even bother removing it from the array? I mean if there're no transitions pointing to it then it doesn't matter if it's there right?
Unless you want to remove the init state 
I mean you don't have to
I don't know why you wouldn't though
Leaving garbage lying around 
IDK I learned to code by reading TC code
mrmmm, remade howling wraiths i have
remake abyssshrek i must
what's the parameter? Debugger doesn't like FsmState chase = new FsmState(fsm);
it suggests FsmState(Fsm.StepFsm) but idk what Fsm.StepFsm is
not cutting the head smh
you should remove the background and it will be perfect
nah, the "abyss" is in the background as well
i don't care what you think, remove it
toxic
ok this is perhaps the dumbest possible problem to have
as far as I can tell, fsms have BoolAllTrue, BoolAnyTrue, and BoolNoneTrue
but I need BoolAnyFalse (or something) and can't find that one
and I'd rather not use a bunch of BoolFlipEveryFrames if possible
Is there not a not
should i remake the big orb it doesn't have a good colour and contrast
how do I get an fsm event as an FsmEvent type?
https://github.com/seresharp/HollowKnight.SereCore/blob/master/PlaymakerExtensions.cs#L63
I'm not sure it changes in the 1.5 mapi tho
Yeah probably
ok what the fuck
how do I even see if an fsmBool is true or false
it can't go in if statements and such
Depends, what skin are you trying to make?
whoa that looks cool
pure vessel but better
is there a way to insert a method into an fsm that runs every frame?
i think i improved it but the colour is still off 
i shall proceed to ignore that
nice
@runic wind If you want to make it run every frame you'll probably want to make your own FsmStateAction with an OnUpdate or OnFixedUpdate method. This is what rando does for a method that just runs once https://github.com/homothetyhk/HollowKnight.RandomizerMod/blob/master/RandomizerMod3.0/FsmStateActions/RandomizerExecuteLambda.cs, you can just also override OnUpdate or OnFixedUpdate as well to make it run every frame.
maybe decrease the brightness of the orb itself before slapping the focus thingy on it? like the smaller orbs r darker with the thingies being bright. it looks very nice, though!
that looks amazing
What is the etiquette on how good/useful/polished a mod has to be before it can go on modinstaller?
I have the best mod idea, break everything!
i mean, even with breaking everything it still gets on the modinstaller and the fix doesn't get merged
i love how 91 gets merged but the rest gets skipped
91 is an issue
learned smth new: issues and pr's share that id thingie
what i found! jngo comming back?
maybe ¯_(ツ)_/¯

I really wish they would, my pr to custom knight lies in wait
i can't get this to work
Is there a space in your file path?
i might just be formatting it incorectly
Spaces in folder names mess some stuff up, but you should be able to fix it my putting quotes around the path in your command
🙂
i think it was the space in Program Files (x86)
That would do it
is "FINISHED" the only fsm event that will automatically trigger if the state reaches the end?
it seems to be happening with other events, when I don't want it to
if it's supposed to happen with all events, how do I keep the fsm in one state until some conditions are met?
FINISHED is just the event that happens when the state reaches the end, the others have to happen manually (i.e. the fsm receives that event somehow). If there's no transition on FINISHED then nothing will happen when the state reaches the end, I think
hmm, I probably fucked up indexes then
Maybe
when an event is sent it will immediately stop executing the state instructions, right?
e.g. nothing after the send instruction is done
I believe that nothing will happen unless the state has a transition for that event
but if it does
AFAIK when it receives the event it stops everything in the current state, moves to the new state and starts doing the actions in the new state
cool, that's the behavior I want
but I'm using log debugging and it's reaching the end of one state and then immediately the start of the next state and I have no idea why
there's two events, one is completely unused and the other is not "FINISHED"
Are you sure there's no FINISHED transition? That's all I can think of
I thought of something else that's actually probably happening
the insertMethods I'm using to debug are only being run the first time
yep got it
forgot to set something to run every frame and my debug logs were also running only once so I didn't see it
it's actually working now!
and 50 fps vengeflys are hilarious
Guess who's gonna create brand new attacks (with animations) for a boss for the first time?
Wish me luck
gl ig
My luck acquisition techniques are brilliant 
Wait how do I create new states 
Regarding states there's only "change state" and "current state" in the docs
Can I just add in a random name into "state2" and it'll go to a new state called that?
some fsmutil versions have a pfsm.copyState method to copy a state, its actions and transitions to a new state with a name you provide
Will transitions to the state also be copied?
They shouldn't, but...
no
Aight, good
So I can copy it over, and then change all the actions and transitions as I please
Cool
Thanks 
i think in the fsmutil of dev versions of sfcore i have a method to create empty states
I mean if it's short and doesn't need anything else I guess I can copy it over? But I don't see why bother, least not right now
Thanks though
What happens if I remove a transition but I don't change the action that leads to it?
it just continues with the current state
i'm looking to commission someone to make a little mod that lets me kill grubs. dm me for more info if you're capable/interested
That is the most upsetting commission request I've ever seen 
weird way to spell 'blessed'
TRUE
Don’t we already have it to where you can kill grubs? But they are mimics
but those aren't grubs
But then what are they?
mimics
But that is the closest thing we have to killing grubs, how much more evil can we get?
but doesn't that make us worse than The Radiance?
you mean more based
No I mean worse
nah you don't
We'll be the true villains
why not?
Idk tbh
thanks 
anyway what's the fastest way i can test birthplace cutscene for a customknight multiple times (this is just some intermediate testing, it's incomplete)
how to get savestate
wait actually i can just save edit
i have a throwaway save with not a lot of abilities
bruh the sprite position
i'm not done with the knight, in this customknight you basically play as the hollow knight
so like new storyline (inspired by lazycat's mod), hollow knight realised what it needed to do to destroy the radiance and save hallownest, and it was given another chance
the birthplace cutscene is basically its regret
so like there weren't 2 young hks present in the scene, it's just thk reliving its regret of what went wrong
but the sprite position be like 
this is already my 3rd attempt
you know there's like a thing which like cuts it into individual images yeah?
#modding-discussion pins iirc
thanks
thanks
to preload flukmarm, would i want it to be ("Waterways_12", "Fluke Mother") or ("Waterways_12_boss", "Fluke Mother")
(its gameobject dump was in Waterways_12_boss.txt)
((it was "Waterways_12_boss"))
heh
heh
trolled
Aw this is beatiful
heh
how would i make both of them "FALSE"
Maybe something like myAction.trueEvent.Value = myAction.falseEvent.Value ?
Or just make the transition for TRUE be the same as the transition for FALSE, if that doesn't mess with the rest of the state
Or replace the action with your own action that just goes to the target of the FALSE transition
Probably at least one of those will work, not sure what the best stylistically is though
true event doesnt have a value
You might just be able to yeet the .Values so it's just .trueEvent = .falseEvent
Just remove the transition from TRUE
It should work (based on this #archived-modding-development message)
As I understand it Mulhima wants it to move to the false transition on true, rather than staying on the current state (I could be wrong tho)
I guess you could do that and then add a transition on FINISHED instead of TRUE if you prefer
So change transition, I guess 
i basically dont want the "TRUE" transision to happen
But will it do the FALSE transition or do nothing?
Or is there only TRUE and FALSE 
In which case you should just rewire TRUE to do the same as FALSE
so i would use fsm.ChangeTransition?
Is that an extension method? It might depend on if you're using an FSM extension library or not
also, how do i preload
the scene was GG_Hollow_Knight so i did ("GG_Hollow_Knight", "Dream Entry")
but then my mod failed to load
where would i find the full name for "Dream Entry"
Maybe in here? #archived-modding-development message
Thank you
what're you trying to do btw, mulhima? just from a glance I want to guess skip the dream entry standing up animation?
but honestly Ive barely a clue what I'm even doing myself 🥴
Input
[{
"name": "mod2",
"deps": []
},
{
"name": "mod3",
"deps": [ "mod2" ]
},
{
"name": "mod1",
"deps": [ "mod2", "mod3" ]
}]
Output
{
"mod2": 0,
"mod3": 1,
"mod1": 2
}
now to just make this in c# for the mapi and there is no need anymore for the library/mod check
would this theoretically eliminate the need to dictate load order?
current load order is dictated by a library/mod check, then with the getloadorder int (+ aplhabetical order)
this would replace the library/mod check, in the groups (0, 1, 2 in the example), i'd continue to use the getloadorder int
Yes that is what I wanted to do. It caused a wierd interaction where the player was in the dream entry animation but the hitbox could move
Is there a good way to undo my changes to an FSM? I'm thinking for the unload method of an IToggleableMod
either the fsm has a template, in which case i think you can call pfsm.Init or something to reset the fsm,
or you save the orig fsm in your mod and restore that state in unload
or you make your mod not toggleable
The third option seems better than the second for sure, I'll see if the init one works tho
the first thing i'd say first check if the fsm has a template though, there's like 5 total that have a template
i know of like 2 or 3
Oh how do I check that?
BTW Option 3 won
👍
Are we allowed to post an idea of a mod for someone else to make
That's a large part of what
#modding-discussion is for.
Although if you have a good idea, it might be a good place to start learning how to make them yourself :)
ok
.x is probably an fsmfloat then
uh huh
Oh I see what you meant now
the Value = thing directly edited the value of the fsmfloat (also the one in variables, as that is the same fsmfloat)
yes
you could .x = 5, though idk if that also just changes the value itself
you can just directly assign a float, but idk if it's shorthand to just adjust the value
no it's an implicit new
it's static it can't affect an instance in the first place
nice
i mean it technically could if you had a shit global but that'd be awful
assinging a float creates a new FsmFloat instead of changing the value of the existing fsmfloat
any way to open .assets file without unity?
🤔
So, someone is making a OneShot skin pack, and wants make the soul yellow. But when they looked at the sprites, they couldn't find any way to make the soul gauge yellow. they're talking about making the soul inside of the gauge yellow, not just the full meter
afaik there’s no known way to do this? i certainly haven’t seen any other customknight do it
okay I'll pass the info along. thank you 
is there an sheet or png that shows the order of the knight sprites in knight.png?
Use godump
https://paste.mod.gg/ajalecabam.cs anyone know why this just randomly crashes the game without warning and no errors appear in modlog.txt?
so should i stop the coroutine before starting it again?
idk why you're not just looping
wdym
it crashes after a bit
the coroutine runs for a bit and everything is fine
then it freezes after a bit
if you don't run the coroutine I assume it never crashes?
yeah
the coroutine also seems to drop my frames
i think
although that may just be because of the 6 marmus at once
To test that out you could try with only 1/2 marmus
i can confirm it gradually drops my frames from around 260 to about 150 after all 6 marmus are spawned
and then crashes
it incrementally drops after frame spikes
What's your code with the loop?
did you check output log
(fps drop example)
The times where I had a coroutine freeze the game is usually because it never runs a yield statement
no i should probably
what should i be looking for
I mean if the game crashes there's gonna be something at the end of it
the only mention of the marmus is
FSM not Preprocessed: MiniMarmu : Control
(Filename: C:\buildslave\unity\build\artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
(that occurs 6 times right at the end
)
yeah i think
I think 
ill crash it again
do me a favor and add a log with the count before the if
ok
(btw i changed the counting thing to var objects = Resources.FindObjectsOfTypeAll<GameObject>().Where(obj => obj.name == "MiniMarmu");)
should i change it back
Just tag it and find objects with tag
marmu.tag = "tag"?
but just doing that gives me the error
[ERROR]:[UNITY] - UnityException: Tag: FlukemarmuSpawn is not defined.
[ERROR]:[UNITY] - Flukemarmu.FlukemarmuControl+<SpawnMiniMarmus>d__11.MoveNext ()
[ERROR]:[UNITY] - UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress)
[ERROR]:[UNITY] -
how are you searching for the tag?
GameObject[] marmus = GameObject.FindGameObjectsWithTag("FlukemarmuSpawn");
What's your code?
Did you do StartCouroutine( SpawnMiniMarmus()) or
Gamemanager.instance.StartCouroutine( SpawnMiniMarmus())
If you do the first, the wait seconds will make the whole game wait
what
I tried it out
that didnt happen to me
(also it still crashes with the gamemanger StartCoroutine)
Nice job, I hate it
I like it, time to make it for every npc
NONOONONONOONONONOONONONONONONOO
is it ok if i post it in #hk-discussion
ima do it
it's beautiful
GUB NO
How would I go about setting the knight’s default speed to the same speed as dashmaster?
you mean sprintmaster? iirc dashmaster doesn’t increase regular run speed
Yes
i’m not that much of a coder but my best guess is finding something named or tagged with speed, and mess with the value
probably something like varBaseSpeed for the well, base speed, and check wherever the charm stuff is stored on the speed value sprintmaster uses
Just ctrl+f for "equippedCharm_37" in the HeroController file in DnSpy to see what you need to hook
Herocontroller.RUN_SPEED = Herocontroller.RUN_SPEED_CH_COMBO for dashmaster + sprint master. if only sprint master then only RUN_SPEED_CH
Where? Because I can imagine that the gam also changes the speed
idk heroupdatehook?
Ok
nvm, this is what the game doescs this.rb2d.velocity = new Vector2(move_direction * this.RUN_SPEED, this.rb2d.velocity.y);
so it doesnt need to be in a update hook
looks like spaghetti to me but it functions
But I mean: they do change the variable right?
no
Is there no case where that variable is changed?
Not necessarily in that function
Ah. Like that.
Ok. Thanks.
What is the difference between runspeed and walkspeed?
walk speed is like dirthmouth. run speed is normal speed
Ok.
Any reason why ExtraDamageable works w spore cloud but not w crest's passive?
I think crest has a different extra damage type
Might change something
Been a while since I checked
I'd look at how crystal guardian gets damaged
it's weird cause OnTriggerEnter2D isn't registering a trigger w a Knight Dung Trail go
probably layer shenenigans then
my extradamageable is on 11
would Fungus2_15_boss: Mantis Lord be a good candidate for a fast preload for uninfected stuff?
ideally I would have no preloads but I'm not about to recreate 8 prefabs from scratch
initially i'd say yes because it's only a boss, but seeing this maybe there's a better one, but for now i'd still go with it
(these are dependencies of the scene)
Italy why 
lol
Hahahaha no. Don't steal my plans.
Anyways beautiful work Italy
gonna leave this here: https://github.com/HollowKnight-Modding/HollowKnight.Modding/pull/43
i will look at when i do not have 4 projects and 2 ap exams
valid
ChaseObjectV2 and Wait are effectively commented out, right?
at this point it feels like TC actively tried to make their code nonsensical
really now
how does this ^ work? ChaseObject and ChaseObjectV2 both have onFixedUpdates that set the rb2d's velocity. Which one is overwriting the other?
If you haven’t figured it out yet, you could try adding an extra action that logs the object’s speed every frame and see what happens?
I realized I actually don't need to figure out how it works to fix it
Also is it known how they (follies) move while you're paused?
if not I'll try to figure it out
Wait there's actually a thing called "chase object"?
What fsm is this?
Tbh i think that the lower part is from.an older version and this is how tc made it not be executed
Anyone has any news on the pale court mod?
it's pulling a silksong
At least we got SOME news since its trailer came out
For now i found NOTHING except the trailer of the mod
yea, sounds about right
Hey, I've an issue regarding TASing tool for HK
I would like to trace calls to UnityEngine.Random.Range() from the game, but I'm not sure what is the best method
I want to know the returned values
You would probably need to patch UnityEngine.dll(I think this is right) and from there log the values and maybe have some way of logging what called it too
It might be UnityEngine.CoreModule.dll
UnityEngine.dll only shows the interface for the critical methods (Range(), but also InitState()), I don't know if I can insert code there
(using dnspy, I forgot)
Ah, I don’t know then
there may be a possibility with 'interesting' Reflection, though idk if it really works
Harmony patch it
could probably do a patch-time thing where you dllimport and then call the dllimport'd function
There's also the option of NativeDetour
I believe Katie had some code which just overwrote the asm for a native function too
Well. It is a function in UnityEngine.CoreModule.dll. Wierdly, it calls another function named RandomRangeInt, but it doesn't have a declaration. This is wierd since it has [MethodImpl(MethodImplOptions.InternalCall)] right above it which means that it should be declared inside this library
InternalCall is for the jit/clr to handle
Wdym?
it's implemented in c++
meme
pfsm moment
yo sick
Awesome!
did you make the pfsm in unity? (i can't get playmaker to work so i'd do it pepega-style in code lol)
That looks so coool
the idle movements should be slowed down a little but other than that I love it!
yeah, unity 2018.4.19f
I’ll try making a pfsm for hk in unity at some point, it seems really fun, plus I already have playmaker
may be why i didn't get it to work 🥴 2017.4.10f1 isn't apparently quite the right version
I thought I tried that one, and it worked, but idk, prob remembering wrong
there's stuff I don't remember I had to do to fix compiler errors, maybe I could create a sort of "template project"
*_*
What framework version was 1.5 using again
472
is RecordJournalEntry in FrogCore causing hollow knight to die a known issue
That looks amazing!
If these are replacing the shrumal warriors, are they still going to waa? 
you can also already start working at it bc iirc thers already a api for the beta?
Interesting, thanks
I don't think it's what I need but I'll take a look at it
I should look at Mistakes too, actually, they're more similar
Looks wonderful!
Who made the graphics and can you help me get them to help me
Also I'd love to look at how you made this
I made them
Ah, nice
How long did it take
Also how does the process of making a new enemy actually work
Took me a day to draw 39 sprites and about a day and a half to implement them in unity/mod them into the game
I used the same tools that tc used, playmaker and tk2d, to create most of the behaviors and visuals, then I assetbundled them and loaded that into a mod to apply game specific attributes like HealthManager, EnenyDeathEffects, etc.
I'm working on a totally legal template Unity project with pfsm and tk2d integrated already; not sure if it'll work on other systems
Last I checked the mod installer version was very outdated and that had some problems. I’ll see if I can update it soon, working on a large update
Once I update it I’ll probably take uuwuu down from the installer since it has problems with the frogcore update, the update I’m making for uuwuu is far from done though
Nice
I already bought playmaker
bruh, can't replace the unityengine.random.range methods
let's see if this works
Can anybody update a mod on modinstaller by raising a PR ? Or does it need to be the mod author ?
people can do this for others
But I assume it's verified before being merged ?
Like for the scenario where a dll is added and it "claims" to be a dll of a certain mod, but is not submitted by its author, or like it's an update to an existing mod
what
if someone has made a legit update and the orig author is ok with it i'll update it
Right, so if the original author is not really super active but they give their go ahead anyone can put out a legit update. Makes sense.
yea
C sharp question - is there a good reason why structs shouldn't have methods in them?
Because they are structs?
i mean, i don't really care if you have methods in your struct, it's just that IMO structs only represent structures (duh) and therefore don't have methods, but that is basically just C-level. in c# it is nearly irrelevant if you use structs or classes
structs are structs 
Not really any reason not to, but you'll probably want the methods to be idempotent and the structs to be immutable just for sanity's sake.
As an example, it would be something like
struct Point
{
public int x;
public int y;
public int squareDistance => x^2 + y^2;
}
That's fine
As long as you get the semantics of the type, it doesn't matter much. Like 56 said, classes are reference types and structs are value types. That's why I suggested you keep your structs immutable if possible. (Your example isn't, but I figured it's just an example.)
When you say keep the struct immutable, does that just mean to replace
public int x;
with something like
private readonly int _x;
public int x => _x;
or something like that?
(Or could you just say public readonly int x;?)
Just put readonly in on the public fields.
oh my goodness, first thing to do is clean up the layout
🤔
true
Yeah, it was either that or using a whole bunch of /n characters to properly format it in the settings menu
don't have the json online, but this is how i work around the \n while still having it look nice: https://github.com/SFGrenade/TestOfTeamwork/blob/master/Consts/LanguageStrings.cs#L61
@copper nacelle Would you be able to put the new mods on the Installer? This google drive folder should have all the relevant mods and READMEs
https://drive.google.com/drive/folders/1vXD7R-eTj4s9phM2s_JdT5Z7XHpkNcso?usp=sharing
yeah, I can link you those too
the gh links are nicer because gdrive doesn't send content sizes so the progress is indeterminate
not the zip, only the direct dll is on github
ikg appears to have had an update
All three mods have updates to them
is there any chance you have a zip
modinstaller1 just kinda hates raw dlls
I can put the dlls up but the old installer will have a fit
questionable
I can do that, just give me a moment
Does the zip need to contain the dll and README?
yes
Pretty sure for a quick summary it can be "Corrupted Kin : Turns Lost Kin into a two phase boss fight and makes it harder. Requires WeaverCore"
alright
Alright, this should be it, each zip contains the mod dll and the README for the mod
https://drive.google.com/drive/folders/1Fx95VFLtrsHZKjM6Jgco3zCcHHUixUzU?usp=sharing
i think it would be great to also have them part of the github releases (yes, you can just edit the zips in), is not prone to be suddenly deleted (unless github deletes the entire repo for whatever reason)
It seems like attempting to install WeaverCore is crashing the installer. The other two mods don't seem to have this problem, I could install them just fine
should I just modify the release page for WeaverCore and put it there?
yeah
WeaverCore.zip is in the releases page:
https://github.com/nickc01/WeaverCore/releases/tag/v0.3.0.0-beta
should work now
The installer did crash when starting it up, but after removing IKG and Corrupted Kin manually, it looks like it working now
how to change prologue text
the elegy for hallownest one
(pls ping me I'll be away)
(I know nothing about the intro cutscenes but) are they even stored as text? there's some chance it's just a video file
since poorly translated mod changes it it should be editable
it's likely doable through a language get hook, just check the key for the text and replace that key
I'd guess a language key like "PROLOGUE_TEXT"
If you wanna do it for yourself this would be an easier way
https://github.com/TheMulhima/HollowKnight-ChangeIngameTextMod/blob/main/README.md
PROLOGUE_EXCERPT_01 to PROLOGUE_EXCERPT_04 and PROLOGUE_EXCERPT_AUTHOR
why not use language support
oh nvm then you need to give the users a zip and a new dependecy
thanks, how can i make a mod with a few text changes?
Do you already know how to make a mod
not really that's why i'm asking
imma just send this to be safe: https://radiance.host/apidocs
Extremely big difference 
what?
thanks 
You should probably decide, code a mod, or edit a text file for Mulhima’s mod
if i wanna make it public is coding a mod worth it for changing the prologue alone
Idk
as an add-on to my customknight (upcoming) project
if you make it public, code
Your choice
i shall look into the code
Why not just provide the text file and say you need to get this mod
it isn't easy to tell people they need to download and place there and there...
hmm maybe it doesnt matter much as the skin works without the text
yeah it's a free additional thing, i'll probably tell them to get it if they want but it's not necessary for the skin alone
btw can cutscenes be changed
i know, which type of mod can do that
Wdym which type of mod
so i can quickly get into figuring out how to make it
It’s documents on how modding works and a guide to getting a basic mod format down
But you’ll need some prior knowledge of c# for that
then what do i need? do i need unity knowledge
A bit
You need c# knowledge, some unity knowledge, and then you need to remember that stack overflow is key to success and go there every 5 minutes
lmao i do some coding but not c#
If you want an example of how to do it, redwing does it
A mod
thanks
I'm using a particle system in one of my scenes. It should be effected from the slash but it seems like the collision does not work.
AttackLayer(17)
Has anyone experienced something similar?
i have no clue what you're trying to achieve, but if you want things to collide, the pins have a layer collision matrix, maybe that can help
oh, you probably want the particles to be flung around by the slash?
that won't work as the slash hitbox
- is a trigger
- doesn't move (just gets activated and deactivated)
so you'd need to make the 'particles' have scripts that react to nailswings and fly accordingly
possibly, haven't tested such a thing yet
oh you say the slash does not collide it just triggers oncollision
yes
sadly things like this aren't easily possible with just a particle system 😔
Is there a modding api for 1424?
Yes, check the mod drive
though idk why one would need it
i have my reasons
So I built the beta api on windows and it worked fine but on Linux I get float whenever I use a nail art
🤔 
https://github.com/HollowKnight-Modding/HollowKnight.Modding/commit/26d8e1bc30c2795f6442240481d914129523c08d i thought this PR wasn't merged
this is weird
slow fall with great slash?
yep
that's what happens when the fsm gets interrupted
very easy to do with like map but it's fucked that it's happening by itself
and considering everything nailart is handled by FSMs idk what the mapi does to kill the fsm
is there an exception in modlog or player.log?
custom 'particle' system
this is not pale court zaliant smh
This is not strictly a mod development discussion but, I've been thinking of possible ways to give players some control over their skins and while something like a vessel maker for actual in game sprites would be amazing, it's a herculean task to undertake (especially with limited art skills ). But even with just some masking and blending we can allow players some level of customisation to remix cloak colors & try different effects / knight combinations, linked is the POC of that concept.
https://prashantmohta.github.io/HollowKnight.SkinRemixer/
perhaps with more detailed masks for horns/eyes for example, we could reach closer to the goal of anybody being able to customise their own skins.
would like any thoughts/ suggestions on the concept.
Yes, this would require existing skins and blend them together
Like horns from skin 1 but cloak from skin 2 and eyes from skin 3 & attack effects from skin 4
That's the concept anyways
At the very least it makes recoloring default sprite super easy
For example I could recolour this on my phone
Hi ! Sorry, noob question : I'm trying to compile the api (https://github.com/HollowKnight-Modding/HollowKnight.Modding), I followed the instructions up to step 4, but there's an error in the compile step : warning MSB3245: Could not resolve this reference. Could not locate the assembly "UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null".
with Visual Studio 2019.
I have also tried using Rider which (after updating the C# version) gives me a different, more specific error in ModLoader.cs, ligne 305 on the "in":
ModLoader.cs(305, 66): [CS1061] 'KeyValuePair<string, List<string>>' does not contain a definition for 'Deconstruct' and no accessible extension method 'Deconstruct' accepting a first argument of type 'KeyValuePair<string, List<string>>' could be found (are you missing a using directive or an assembly reference?).
Do you have leads on either of these ?
(I can confirm I copied the Managed dir contents into a Vanilla directory from the last, up-to-date version)
I ran into the latter issue and solved it by changing the deconstructed params to KeyValuePairs and then getting the params using .Key and .Value
oh so this is a code issue ? I should probably open an issue on Github then
Are you compiling against the beta
Add a reference to that assembly in the hollow knight installation also why are you trying to compile it, finally where did you get the code
oh I have a lead : according to this https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.keyvaluepair-2.deconstruct?view=netcore-2.0, the Deconstruct method is implemented in .Net 5.0
If you got the code from 56’s repo then you have the code for the hk beta
It needs to be compiled with the beta
The opposite is also true
the main repo is literally ahead of my fork
- I followed the links in the sticky posts from this channel
- I cloned it
- I followed the README instructions
Don't I have to compile it ?



