#archived-modding-development
1 messages · Page 534 of 1
why should it crash? mapi doesn't care about pdb files
so pdb files wouldn't work at all...?
damn
there goes my dreams of seeing the file and line number in modlog error crashes
because it literally doesn't care if they exist, it just loads the dll files
i put it next to my mod dll then
also the first time i had modding api crash is when i put discord game sdk dlls inside the mods folder 💀
prob crashed because those were pure native dlls
i like this one better
i feel like skins should be in #modding-discussion
i feel like that has already been said
when is modding api for hollow knight beta coming out
hollow knight beta? you mean 1.4?
0.74b
oh that beta
actually i wonder if anyone even attempted to datamine it
i recall someone saying that it exists
It doesn’t show line numbers for me when I put it next to Fyremoth
Just do Camera.main.gameObject.transform.position.z ????
why didn't vs reccomend that to me wtf
thank you, exact values are easier to work with
You could have just logged the z
well the Z was probably wrong cus i did that Z - 0.1f and it absolutely failed to place something infront of the cam
Have you tried doing +?
38 failed too 
Also, it might be behind the first clipping plain
At such a small distance
Not sure though
i'll see what happens to 30
it fails 
is there a better way to make the screen black?
Just put a black screen on the screen, like this https://github.com/hk-modding/api/blob/master/Assembly-CSharp/ModLoader.cs#L294
IT WORKED! tysm
I need someone to make VR hollow knight
#modding-discussion
and no one is going to
Go make it yourself
Ok you teach me gaw to make VR games and I'll try
Camera has a near clipping plane of 10, meaning the nearest object is at z -28.1 or so
I love how the embed is the tiniest unity i've ever seen
no for me either when i put it next to my mod
i don't have a crash ready with line numbers showing
oh only on crashes?
exceptions
cus i'm getting alot of NRE's and i don't see any line numbers
basically the same
Same tho
i can try to force one, 1 sec
[ERROR]:[API] - System.ArgumentException: Requested value 'StatueGO' was not found.
[ERROR]:[API] - at System.Enum+EnumResult.SetFailure (System.Enum+ParseFailureKind failure, System.String failureMessageID, System.Object failureMessageFormatArgument) [0x00023] in <9577ac7a62ef43179789031239ba8798>:0
[ERROR]:[API] - at System.Enum.TryParseEnum (System.Type enumType, System.String value, System.Boolean ignoreCase, System.Enum+EnumResult& parseResult) [0x0017a] in <9577ac7a62ef43179789031239ba8798>:0
[ERROR]:[API] - at System.Enum.Parse (System.Type enumType, System.String value, System.Boolean ignoreCase) [0x00010] in <9577ac7a62ef43179789031239ba8798>:0
[ERROR]:[API] - at System.Enum.Parse (System.Type enumType, System.String value) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
[ERROR]:[API] - at BossModCore.BossModCore+PlayerDataCommand.Parse (System.String pdValue) [0x0004b] in E:\Github_Projects\HollowKnightMods\BossModCore\BossModCore.cs:211
[ERROR]:[API] - at BossModCore.BossModCore.OnSetPlayerVariableHook (System.Type type, System.String target, System.Object orig) [0x00086] in E:\Github_Projects\HollowKnightMods\BossModCore\BossModCore.cs:417
[ERROR]:[API] - at Modding.ModHooks.SetPlayerVariable[T] (System.String target, T orig) [0x000e1] in <c2a48dab016a4177be1ebaa8c1a99f48>:0
this shows line numbers
[ERROR]:[UNITY] - NullReferenceException: Object reference not set to an instance of an object
[ERROR]:[UNITY] - ObjectPool.orig_Spawn (UnityEngine.GameObject prefab, UnityEngine.Transform parent, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at <c2a48dab016a4177be1ebaa8c1a99f48>:0)
[ERROR]:[UNITY] - ObjectPool.Spawn (UnityEngine.GameObject prefab, UnityEngine.Transform parent, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at <c2a48dab016a4177be1ebaa8c1a99f48>:0)
[ERROR]:[UNITY] - ObjectPoolExtensions.Spawn (UnityEngine.GameObject prefab, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at <c2a48dab016a4177be1ebaa8c1a99f48>:0)
[ERROR]:[UNITY] - (wrapper dynamic-method) HealthManager.DMD<HealthManager::TakeDamage>(HealthManager,HitInstance)
[ERROR]:[UNITY] - (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<HealthManager::TakeDamage>?361619456(HealthManager,HitInstance)
[ERROR]:[UNITY] - Mymod.Mymod.HealthManagerOnTakeDamage (On.HealthManager+orig_TakeDamage orig, HealthManager self, HitInstance hitinstance) (at <557827695b1a46f78536500fb9268704>:0)
[ERROR]:[UNITY] - (wrapper dynamic-method) ```
am i blind?
or is it because unity?
should work, would be the second to last line
well i don't see anything and the pdb file is there
maybe a different type of pdb? idk, i use the new csproj version and it just works with that
vs defaults to old csproj version
_ _
but you can use https://github.com/hvanbakel/CsprojToVs2017 to update csproj version
Oooh
it likely needs manual fixing afterwards (it did for me)
Time to use that when I’m behind my pc
I saw this once but I figured that since I have never used vs2017 it would use the newest version
then the postbuild even can be done like https://github.com/SFGrenade/TestOfTeamwork/blob/master/TestOfTeamwork.csproj#L18-L32 to basically automate making zips for mods to upload (and a sha.txt for the sha256)
Nice
I just realised that this thing could have saved me an hour of debugging the wrong place. I got a key doesn’t exist in dictionary in a function with 2 dictionary get calls. I was debugging the first one for an hour only to find out it was the second one
Does anyone know if there is proper documentation for making custom UIs? I'm having trouble finding any on radiance.host
https://hk-modding.github.io/api/ could help
idk i can't really find my way around there
can you also tell vs to generate updated csproj's?
Nope 🌠
dotnet tool install --global Project2015To2017.Migrate2019.Tool
'tool' is not recognized as an internal or external command,
operable program or batch file.
i downloaded both versions 
Try it without tool
it can be:
- you don't have dotnet (anything above or equal 2.1) installed
- some system variable problem
Open the visual studio developer console
where
does dotnet tool itself also throw an error?
Required command was not provided other than that no
then ig try the isntall line again, at least tool appears to be there
Tool 'project2015to2017.migrate2019.tool' is already installed. wth
it appears it works (?)
Hmmm
i'll take it
lets see vs scream at me
hmm
vs does not 
i'll take that as good
i'd still manually fix the csproj, because it likely has unecessary contents (and for general reorganization)
And test if you now have line numbers
yeye i'll test
nothing
is there any way to differentiate the old from the new CSProj?
now thats one big CSProj
i see that <?xml version="1.0" encoding="utf-8"?> is red
thus it has been removed
but my csproj still has that
oh wait i can just push to my rep and see the differences 
idk why that's gone, kinda necessary to have that tbh
but i also said yes to basically every option that updater gave me
me2
but if it says <Project Sdk="Microsoft.NET.Sdk"> and not <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> you should be good
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
shat
wait what
HUH
when i pushed to my rep
it says <Project Sdk="Microsoft.NET.Sdk">
but when i check my local CSProj
it still says the old thing
am i looking wrong?
oh god
i hate vs
ok it did get changed
then why do i not see line numbers? 
<DebugType>pdbonly</DebugType> is in the CSProj, is that relevant?
i don't have that, try deleting that line
Maybe set it to full?
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
oop
yea, i can just say that i edited the csproj by a large amount (as can be seen in basically any of my mod repos) to make it smaller and more readable
and it just works
somehow
kaan't gaming
Apparently if you run discord client in admin mode, the rpc doesn't even work
Extremely weird so i put that into the readme
um, my hk mod loader is not working, it just opens a new window for like quarter of a second and then it closes. someone help?
#archived-modding-help (and 1st pin there)
thx
yes
1.4 whens
1.4 outdated
Visual Studio Project Template
to install: move this zip to {documents folder}\Visual Studio 2019\Templates\ProjectTemplates and then restart visual studio
Why did you make it
. It shoulve been 🍝
what about this one
what stuff does it include?
like, does it have the new CSProj template or smth?
new csproj, readme, gitignore, resource folder, main mod class, references
Hey guys when is apidocs getting finished
no
k
you do need to edit the csproj slightly after creating the project though, to indicate where your modded install is
And also to remove the references you don't need
it's only all unity references, can stay
But looks bad
for you maybe
i did forget to mention auto export with zipping and making a txt with the sha of the zip
it appear smol
how do i get code to trigger upon herodeath?
when the hero is dead, is it's go null?
?
Grenade, I used that tool to update the project (and after that did some manual refactoring) and now instead of building to bin/debug it builds to bin/debug/net472. I tried re-adding the conditional that seems to set the build path but it doesn't work
does it matter it builds to that?
for me it does
I have pins to folders (to both release and debug) and now if I would move them they are both called net472
^^
work
fair
lol, just look at the small postbuild the template has
do all dreamnail dialogues have a _1 at the end of them ?
if u add them manually?
wait
the _1 is the convo amount ?
yeah
so if you make that higher the game will automagically cycle them
there are multiple dnail dialogues from enemy
gotcha that makes so much sense lol

ignore the random wind noises
rip

do you use obs for recording
is there obs for mac?
there is?
yes
ok then probs obs
OBS (Open Broadcaster Software) is free and open source software for video recording and live streaming. Stream to Twitch, YouTube and many other providers or record your own videos with high quality H264 / AAC encoding.
you can just disable microphone in mixer below
i dont use obs i probs should, but the inbuilt thing is a shortcut away. i usually have mic off but had to turn mic on for something last time and forgot to turn it back off :/
i forgot mac has a built-in recorder
Hey, so I'm trying to figure out how to make a custom menu and I'm not able to access anything inside of Modding.Menu. I'm not sure if this is me being dumb or if I don't have the right things installed?
It says it doesn't exist
Are you developing for 1.5? If so, you don't need to "using" either Modding.Menu or Modding.Menu.Config
There's actually a pin in this channel with some examples of implementing the custom menu
I should be developing for 1.4
If you're developing for 1.4, you can't do the custom menu thing
I checked those and I can't get the ICustomMenuMod and stuff
yea
To fix this just add this to your csproj file <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
well, no custom settings menu in mods tab in 1.4
Or like custom UI
Well, you can make menus the same way that other mods like debug or benchwarp do
You can using the unity API
yea
Right
hold on i need to look at benchwarp source code to understand how the fuck do i do custom ui
everytime i tried to add text it just appeared blurry
extremely blurry
Sounds like a lot of fun then
Which docs or videos can I look at for help with UI creation then?
Cracking, what source code?
Do I need to actually install and do stuff on Unity or can I do it all from Visual Studio?
visual studio
Sliiick
you can also use canvas utils that a lot of mods do
Yea I saw that was empty but it's filled out here right? https://hk-modding.github.io/api/api/Modding.CanvasUtil.html
Or is that 1.5 stuff?
yes to both
Ah heck
majority should still work for 1.4 though
Oooh
lfg
should be a good example to start off i think https://github.com/jngo102/HollowKnight.Multiplayer/blob/master/MultiplayerClient/MultiplayerClient/Canvas/ConnectionPanel.cs
AssetRippers decision to replace broken shaders with dummy non-functional shaders is a bit questionable
At least before, it was easy to tell which shaders are broken, now it's not
Change it?
in this week of mods that nobody asked for
does it have sound effects ?
no
why do unity docs say i gotta StartCoroutine("WaitAndPrint"); instead of StartCoroutine(WaitAndPrint()); ?
what am i missing here
alright ty
what layer is AlertRange supposed to be on? 13 ?
i refuse to believe it wasn't asked for
you asked for it
I swear if this tiny fucking mod has bugs in it
Does it display on levers
Nice
so how did you do it?
I made a loop that adds a few masks and positioned them according to the value in which position they are, can post code in a bit, just woke up
this specific thing works like:
// in Initialize():
DoAddMasks(GameCameras.instance);
// outside of it, but the same class:
private void DoAddMasks(GameCameras self)
{
GameObject health1Go = self.transform.GetChild(0).GetChild(0).GetChild(1).GetChild(3).gameObject;
// this determines how many masks are added, yes, statically
int totalMaskAmount = 28 * 13;
for (int i = 12; i < totalMaskAmount + 1; i++)
{
// normal masks
var healthGo = GameObject.Instantiate(health1Go, health1Go.transform.parent);
SetHealthPositionAndFsm(healthGo, i);
}
// jonis masks, thought it maybe sets the position of where lifeblood starts to appear
SetHealthPosition(self.transform.GetChild(0).GetChild(0).GetChild(1).GetChild(4).gameObject, totalMaskAmount + 1);
}
private void SetHealthPositionAndFsm(GameObject ob, int num)
{
ob.name = $"Health {num}";
var healthFsm = ob.LocateMyFSM("health_display");
var healthFsmVars = healthFsm.FsmVariables;
healthFsmVars.GetFsmInt("Health Number").Value = num;
SetHealthPosition(ob, num);
}
private void SetHealthPosition(GameObject ob, int num)
{
int tmp = num;
int row = 0;
while (tmp > 28)
{
row++;
tmp -= 28;
}
float xPos = -10.32f + (0.94f * (tmp - 1)) + ((row % 2 == 0) ? 0 : (0.94f / 2f));
float yPos = 7.7f - (0.8f * row);
ob.transform.localPosition = new Vector3(xPos, yPos, -2);
}
Italy, i went with your idea of making IEnums for states and letting idle decide the next state , but added a main loop to actually run the next state.
currently the "follow" and "attack" states do the same thing but in principle this works well i think.
that's dope, thank you!
1 day is nothing
you seen multi patch support?
Referenced Vasi, this happened. Ideas?
Do I need to go one by one and add something to the start or is there a faster way?
unreference modcommon
hm, ok
or at least remove using ModCommon.Util from the top
What do I do if it has things I'll still need?
what I said or remake what you need or work around that
this is also an option, but otherwise you'd have to hover over it and choose one of the option your ide gives you
These don't work without modcommon, any alternative for it?
Ah, wait
vasi has stuff
I think
lemme look over it a bit
AddAction() seems to exist in Vasi, but for some reason it doesn't recognise it for me
GetState first
i'm never checking these
Also visual studio does not want to close so I guess it’s just gonna be there
this is going to be a nightmare
i'll try to minimize some windows and see if it makes any better
any suggestions on how to improve this enemy ?
#modding-discussion better
has anyone checked out or seen tauri
it's like electron but better, written in rust too
what?
not really this is about the development of Dendy's mod, this is exactly where they should ask
Can you make the movement smoother or more telegraphed?
like maybe have them back up a little in the opposite direction before charging
also do you plan on adding particles? that would make them look really good imo
add sprite flash
true
they do go a bit in the opposite direction, i can try to increase it
i do plan to add some particles / trail to it
you mean flash when they get hit ?
ye
oh that makes sense
also i wanna extend primal aspid's trigger hitbox, can anyone help me with that
isn't that part of the fsm?
oh, is that part of the fsm?
then uh
can i make it so the primal aspid is triggered via code?
fsmviewer doesn't work for me so
yep, regular unity stuff
unalert range?
I think so?
i thought primal aspids always follow you to the end
It might be the range where it unalerts
no, no, there's a limit
aggro the aspid at top of the long fall room in ke and jump to bottom and you'll see
i never knew that
can i play a audioclip that is already in the game via code?
i want to play barrel_death_1 but idk how
Depends if you know the name of the audioclip
yes
how
You can’t. For that to work it has to have been in a special folder in the games source
Damn
so i can't?
You’ll have to preload it
how
Find an object with a script referencing that audio, use getcomponent and get the audio
Or just rip it from the game
but its in an FSM
Those have variables
i mean, it gets played by an FSM
Then the fsm probably has a variable for it
ye but how do i preload a part of an FSM?
And then get the fsm component
i have never worked with FSMs so idk how
object.getComponent<PlayMakerFSM(?)>()
i can't find anything, what should i put after that?
there is stuff for bools and stuff but no audio
i'm very bad at this sorry if i'm being stupid
then i have the clip, how do i play it 
i don't know what after that sadly
Add an audio source to a game object, set the clip variable and call the play function
.AddComponent<SpawnableAudioSource>();?
o nvm
i need to ref something else for AudioSource
Error CS1503 Argument 1: cannot convert from 'HutongGames.PlayMaker.FsmObject' to 'UnityEngine.AudioClip'
```fck
i'll just make my dll file bigger
UnityEngine.audio
yeye did that
.value
i can read vs explanations
What do you mean?
Extract the audio from game and use as embedded resource
assetripper
i ripped the game files already a long time ago
and i doubt anything major changed
So use that
I was told to mention this here. On the modding guide there is a segment that's duplicated.
why wouldn't I
yep
i see it too
Also is that BeforeAddHealthHook code example missing a parentheses? It looks like there is one more open than there are closed.
i see the right amount
epilepsy warning: || https://youtu.be/PBq35nTnIPs ||
any reason why this is happening though?
i'd say it works excelent
wait i just read in initialize
You're supposed to paste DoAddMasks(GameCameras.instance); into Initialize()
yep
There’s a bunch of messages I want to reply to here but since there’s multiple I won’t 
Is that focus cost set to 1 soul or something?
oh god
I am so confused
yes
calling SpriteFlash.flashFocusHeal(); does this 😦
Turns out that happens when you don't do orig(self) in the On.HeroController.Die hook.
i had added the material on the sprite renderer in mod code, do i have to re-add it every time spriteFlash does something ?
Well a glitch can indeed be exiting sometimes 🙂
you should always do orig(self); at the end of ANY On.thing.thing hook
but if you don't, some haha funny stuff happens
Some haha funny stuff happened
this makes the flash work but the end result is still pink 😦
Why not just make your own spriteflash stuff? Really simple
it is?
Oh nvm I’m thinking of fading alpha values
what shader did you put on the sprite
first Sprites/Default but then saw your message and used Sprites/Default-ColorFlash
initially no flash pink sprite , now flash but also pink sprite
We aren’t making our own sprite flash stuff either
?
We are using the Grimm flash
Sprites/Default-ColorFlash might only work with tk2d
Oh yeah, but that’s with something that already flashes
True
i am going to try something real quick i might have done something wrong
@floral blade maybe take a look at the source code
in unity my SR is setup like this and i change the material on awake in my monob.
is this right ?
i did look in ILspy , it seems to be setting a material property block on renderer (which i assume is base class of sprite renderer)
changing the pink to white did this
time to refer to historical texts of mods past
how can i asset bundle a shader ?
i created a material and attached it to the shader and copied it on my sr
and then did the asset bundle
I think you just drag the shader into an assetbundle
you probably want a separate assetbundle for shaders since you need a different version for each platform
oh. i gotta build the bundle for mac then atleast while i test this
yep
does the file name here matter ?
not sure
I would assume the right name would be for Shader.Find but the left name would be for when you get the shader using the assetbundle
do i need to explicitly load it from the assetbundle ?
I've only ever gotten it from the assetbundle so not sure if Shader.Find will actually work in this case
how does one load it from the assetbundle? Resources.FindObjectsOfTypeAll<Shader>() ?
ab.LoadAsset<Shader>("ShaderName")?
okay i shall try it
its been 2 days since i submitted the mod update pr
alternative: ping
You like that too don't you 
yea, i'll just block people
Here I’ll do it for you-
Just wait and someone will do it for you 
@copper nacelle
why have you done this
bruh isn't it just merging
can you maybe use lerp to make the movement smoother?
does no one else have perms
me gradow ??
i thought a lot of people had it
I do but I dont want to merge a virus
discord rich presence
🗿
🗿
the C in RPC stands for ce
gnu's not unix
remote procedure call
i only add velocity in hopes that it will move it smoothly, do i still need to lerp it?
granted i remove velocity once i enter idle state , which gives the move-stop ,move-stop effect.
is there a way to make the boss title text not capitalise?
change font
how can i do that?
what do you guys think?
I think @floral blade is already making something similar
does anyone know where are the sprite sheets are?
of?
the knight
do you have customknight?
no
?i
Reminder: The mod installer (https://radiance.host/mods/ModInstaller.exe) and other modding resources can be found from the pinned messages. 
get it
sadly th mod installer no work
let's continue this in #archived-modding-help
okay sure
how do you use the mod installer exactly
I am new to mods
- Download mod installer
- Make sure you are on 1.4.3.2
- Install mods
0.5. go to #archived-modding-help
- Fixed pantheons getting stuck at end screen when not using a controller
what
i never had that and i don't use controller
where did you get the patchnotes from
steam
wow, that's not even in the news section smh
are you sure that is the right one
because it isn't in the list for the latest patch
Because it's a "public beta" (opt-in) rather than an actual update (opt-out)
Glad I missed this for school
I’m scared of the possibilities of what they did to the aspid fsms
are regular aspids and jar aspids not different enemies?
why have different fsms for basically the exact same code?
oh wait, infinite soul totems
hm
well i was the one who asked simo if he can bring it up to them since it's been a known issue for a while, so you can definitely blame me if anything happened
Please send a link
No doubt this will have some people flying into fits of rage for me saying this but this is NOT an Ori, Metroid or Turrican type game like people are claiming so if that's what you are expecting then you probably won't like it, sure it''s a nice looking side scrolling platform and that's where the similarity ends. Save your money in that case.
around here
This is correct right? The api was 1.5 while it was in bèta right? I kinda figured the api would be developed against the latest version of HK to always be up to date
the public beta is opt-in only
the officially supported version should be the default that people download
i don't know wether the first 1.5 update was on none or public beta channel
steamdb lists both under one list of manifests
68 was on beta channel, 72 and then rapidly 75 were on public channel
wait no 68 is public too
there were a few
of all recent updates, only 68, 72, and 75 were released to the main channel iirc
at least those are the only ones we list on src so 
can steamdb not display things from beta channels?
because the first it can display is the one from june 3rd
but the mapi was updated to 1.5 feb 23
which is 1.5.75
wait nvm
steamdb ui bad
does anyone know why I'm not able to add any references to a class library? It says the reference is invalid or unsupported, and I'm trying to add it to one of the example mods, and I'm trying to reference Assembly-CSharp.dll, UnityEngine.dll, and UnityEngine.UI.dll
What does skull left and skull right do on customknight skins?
Is it possible to copy the charm broken message to show that some other event occurred? I've been looking through dnSpy and I can't seem to find anything about it
Slog away for hours to get Nail Upgrades? Screw you we'll just make the enemies tougher to compensate.
Slog away for even more hours to find Life Bar Masks? Screw you we'll just increase the damage taken.
I think someone doesn't understand how upgrades work
Mod menu question: is there a way, using the ICustomMenuMod, to add a text/number input field?
yeah, you probably need to make a canvas and put it into a static pane
I was hoping there was an easy way to do it
(like how you can do .AddHorizontalOption)
it's a hard problem to solve ( to keep vanilla like ux ) without rewriting everything since nothing like that exists in vanilla.
Yeah, I suppose so
I was thinking something like the seed entry field that rando uses
but yeah would be nice if it at-least existed for now
idk if yuri got time to look further into it they had some code relating to it iirc
can someone send me the sprite for this wave animation please? i couldn't find it myself, it's not part of zote's or false knight's animation sprites
thx
i sadly cannot find it
my best guesses are atlas0_5 or SpriteAtlasTexture-Mega_Mantis_Slash-1024x1024-fmt12
@dusty sky for visiblity^
thx, i'll check these two
I tried to make one in MoreSaves if your interested https://github.com/TheMulhima/MoreSaves/blob/16e1a4ce056284c4e39916927f42780beaa26dfe/MoreSaves/ModMenu.cs#L211-L310
Do you have a build with the text input in the menu?
Not with newest api
You could just downlaod code and build tbh
Looks something like this
i like that barely visible write name here
not 9 slicing 
i slice pizzas generally in 4 tiles
tiles 😮
What kind of project did you make and what .net framework version
it was the example mod from radiance.host
let me see what framework
1.4, steam beta
Yeah I did that at first but I definitely messed up cause I was doing it under dependencies, not references
Then the project is on the wrong .net framework ver
Probably not even .net framework iirc
Just create a new c# .net framework class library project
you can straight up edit the .csproj file of the project to match the one of hellmod
or create a new c# .net framework class library project
yeah I created a new project and it worked fine thankfully
a bit wonky but I'll figure it out
whats the dash hook
Either On.HeroController.something or you need to mess with fsms
(probably the first one)
Also remember when using On hooks call orig (one of the parameters) and give it the rest of the parameters it needs (all included in the parameters of your method again)
what happens if you are a rebel and do not call orig but copy everything from dnspy that orig does ?
Then I kill you ask you out to talk about it at some restaurant, then form an elaborate blackmail scheme forcing you to call orig
Ofc it’s fine if you just needed to change something in the middle of the method
no i mean in the sense that
i have always worked with the assumption that if my mod is highest in the priority order
and i do not call orig
later mods will not get that hook
Yeah
but i have no confirmation that that is how it work
And now you know how hooks work
ye
once i called the orig in the hook
by doing self.<orig's real name>
segmentation fault city

You are on another level of evil
Well gtg, cya
Why does that cause a segmentation fault?
you are calling a function on an instance. How can that thrown an acces violation?
tbh i am not sure, it should have probably been a max call stack thingy
because the function i called called the hook and the hook the function and so on
unless delegates work differently
no. That should be correct I think....
Mod idea: call orig twice 
Mod idea: get a bunch of On hooks, but instead of calling orig perform the actions of other functions in your list
I love how I got here right as somebody started typing
Nvm they are no longer typing 
lol
I was looking for something
Would anyone here know how to alter an existing mod to change some numbers around? Specifically the Bonfire mod. Specifically I'd like to tweak the Resilience stat so that damage resistance is no longer so strong(down to about half its current strength).
I've narrowed down the sections I need to alter to around/after line 185 in BonfireMod.cs and/or line 399 in LevelingSystem.cs
Once I've done that, though, I don't know how to compile the code. After that I think I just replace the .dll file in hollow_knight_dataManaged/Mods?
THis is just me taking wild guesses
Would be unsurprised if what I need to do to make this change is a lot more involved
Do you have something like rider or Microsoft visual studio installed
k, this isn't exactly urgent, thanks
But yeah those are the steps to doing it
So even before I compile(MVS downloaded, but I don't know which modules I need), I still to figure out how to mess with the numbers, and afaict Gradow(?) didn't include much of anything in terms of notation. The numbers are kinda meaningless to me without context, and I can't even find the function that's giving the base % or the increased % by level.
Would it be rude of me to ping Gradow for their assistance with this?
@strong cosmos what values do you want to change?
Specifically I'd like to halve the resistance chance
1/5 as a base value feels like it's happening every other hit
Maybe also lower the crit chance base/increase per level, but that's less important to me
Because with the sheer number of attacks you make during a fight, it comes out a lot faster than you'd see in D&D
Hmmm. I have never looked at the source of bonfire before. I’ll see what I can do when I’m behind my pc
thank you
I put my suspected areas of interest above
But I don't know what I'm actually looking at/what it means
Well, you should look at variable names. They often give a good clue about what they are for
The chance to resist damage
but isn't the goal of the mod to upgrade those values?
Most of the other variables are fairly straightforward, but Gradow seems to have to have done some gymnastics to pull off it off the way he did
Chance to resist damage isn't a thing in the base game
carefree melody
I guess, but that's late game
And yes, the goal is to raise the values, but by its nature the mod alters difficulty to be easier. In my opinion the resist chance to way too high
11 feb 2020 👀
I'd rather it stay-what?
(Also I never get Carefree Melody I always go for fully upgraded Grimmchild)
wdym
that the mod is pretty ded lol
Okay. Doesn't mean I can't play around with the values, and mandar1n already said they'd assist
well that doesn't mean i can't look around
Oh, thank you
ResilienceStat HitsSinceShielded
those seem to be the most interesting values
396 in levellingsystem
long github links
look at that at a while and try to understand it
then the other dutch boi can help
public float IFramesChance(int totalRes, int hitsTaken)
{
if (hitsTaken > 7)
{
hitsTaken = 7;
}
switch (hitsTaken)
{
case 1:
return 0.1f * IFrames(totalRes);
case 2:
return (1f - 0.1f * IFrames(totalRes)) * 0.2f * IFrames(totalRes);
case 3:
return (1f - 0.1f * IFrames(totalRes)) * (1f - 0.2f * IFrames(totalRes)) * 0.3f * IFrames(totalRes);
case 4:
return (1f - 0.1f * IFrames(totalRes)) * (1f - 0.2f * IFrames(totalRes)) * (1f - 0.3f * IFrames(totalRes)) * 0.5f * IFrames(totalRes);
case 5:
return (1f - 0.1f * IFrames(totalRes)) * (1f - 0.2f * IFrames(totalRes)) * (1f - 0.3f * IFrames(totalRes)) * (1f - 0.5f * IFrames(totalRes)) * 0.7f * IFrames(totalRes);
case 6:
return (1f - 0.1f * IFrames(totalRes)) * (1f - 0.2f * IFrames(totalRes)) * (1f - 0.3f * IFrames(totalRes)) * (1f - 0.5f * IFrames(totalRes)) * (1f - 0.7f * IFrames(totalRes)) * 0.8f * IFrames(totalRes);
case 7:
return (1f - 0.1f * IFrames(totalRes)) * (1f - 0.2f * IFrames(totalRes)) * (1f - 0.3f * IFrames(totalRes)) * (1f - 0.5f * IFrames(totalRes)) * (1f - 0.7f * IFrames(totalRes)) * (1f - 0.8f * IFrames(totalRes)) * 0.9f * IFrames(totalRes);
default:
return 0f;
}
}```
I'd already expected this bit, but I don't what the heck is going on
{
if (Settings.ResilienceStat > 1 && hazardType == 1)
{
if (HitsSinceShielded > 7)
{
HitsSinceShielded = 7;
}
float num = UnityEngine.Random.Range(1, 100);
float iframes = ls.IFrames(Settings.ResilienceStat);
float multiplier = 0f;
switch (this.HitsSinceShielded)
{
case 1:
multiplier = 10f;
break;
case 2:
multiplier = 20f;
break;
case 3:
multiplier = 30f;
break;
case 4:
multiplier = 50f;
break;
case 5:
multiplier = 70f;
break;
case 6:
multiplier = 80f;
break;
case 7:
multiplier = 90f;
break;
}
LogDebug($"{num} <= {multiplier} * {iframes}");
if (multiplier > 0 && num <= multiplier * iframes)
{
this.HitsSinceShielded = 0;
hc.carefreeShield.SetActive(true);
damage = 0;
}
else
{
this.HitsSinceShielded++;
}
}
return damage;
}```
This is the bit from BonfireMod.cs line 185
ok it gets the value hitstaken
if 1, do case 1
if 2, do case 2
etc
0.1f * IFrames(totalRes);
0.1 x the amount of Iframes
i'll try to make the IFrames more understandable one sec
public float IFrames(int totalRes)
{
(float)(3.25 / (1.0 + 2.4 * Math.Exp(-0.07 * (totalRes - 1))));
}
smth like that idk i'm not a great coder
IFrames is just the incrementing value as you get hit more often, yeah? And the chance of negating a hit increases with each hit?
THat woulda been my guess from BonfireMod.cs code
yup
Part of the issue for me is that the LevelingSystem.cs code is...ah...
It's doing some funky stuff that makes it look like (to my barely educated monkey brain) an exponentially reducing chance of getting to....wait
line number?
The 399 mess
mandarijn help i'm not a fyremoth dev 

and howwowknyight wasn't that complicated either 🥴
?
It's a wild guess
I don't know what that means :V
nothing important
What do you need?
to help this poor person
I can’t
sadness
sad
I just got my second vaccination. I have to sit here 15 minutes to see if I faint
oh shit
the waiting game
Yeah, I wish you luck that you're one of the asymptomatic
I got hit like a train, but a friend of mine was completely unaffected
And another friend of mine thinks it makes your legs stop working
I have already had COVID-19 so I think that helps
IIRC there's literally no known causal effect
And no clear ...word..."implied cause and effect"
0.0009% chance at blood clothing?
For phayzer
Anyway the vaccine doesn't even work on standard vaccination principles
Maybe not have this conversation here
||vaccine is like modding humans tho||
||I'd think that'd be more cyborg stuff, but you're not wrong. Maybe it's more like a malware update tho?||
||unofficial patch||
Lmao
Speaking the facts
Actually tmk it doesn’t, your immune system will recognize COVID-19 and you’ll get symptoms quicker (I think this is what I heard) but this is also good since it means your immune system recognizes it
modding
The people already created all the mods or i don't have creativity
can i do a mod that show the fps?
if you're on steam, you can show fps in settings
lol i didn't either until i searched if there was a way
lol
SFCore part on the api docs
thx
what's the reference for sfcore
in the solution explorer right click dependencies/references and click add new reference and select SFCore.dll
Where
in the solution explorer
who dat what have you done to the grenade 
no wheres the sfcore.dll
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/```
game files > data > managed > mods
i need to install, where
did you install sfcore on the installer
oh
where's subdivide
salehs tutorial has that somewhere
any edit mode
How do I enable the cursor in a menu
Anyone have any idea what plays the background audio when dreamnailing an npc
an audiosource probably
<@&283547423706447872>, edit: thanks mods
My nitro noooo
Cursor.visible = true; should work
yum moment
lmao
the actual image of it is straight stolen from the emote, vs displays it funny
i should really update my mods, so scarab can be put in modding-help and have more than 6 mods
That does work but some other code is constantly making it invisible. I believe it is ModHooks.OnCursor
That was the problem, I got it working by doing GameManager.instance.isPaused = true but now I can't close the menu 
the funni modloader emote
Suppose I wanna remove a finish event an action has
_control.GetState("Block Low").GetAction<Wait>(1).finishEvent = null;```
is this alright?
or is there some more correct way to?
looks about right
thanks
PlayMakerFSM dreamnail = HeroController.instance.gameObject.LocateMyFSM("Knight-Dream Nail");
dreamnail.FsmVariables.FindFsmBool("Can Dream Nail") = false;
What did I make wrong here?
i think that value is calculated on the fly
but also the FSM is called Dream Nail
fsmviewer displays it like GameObject Name - Fsm Name
idk, can't look at things rn
Any idea why this causes the enemy to freeze?
_control.GetState("Block Low").GetAction<Wait>(1).finishEvent = null;
_control.GetState("Block Low").AddAction(new Tk2dPlayAnimationWithEvents()
{
clipName = "Attack 3 L2",
animationCompleteEvent = HutongGames.PlayMaker.FsmEvent.GetFsmEvent("FINSIHED")
});```
I added another action thats supposed to send the finished event once its done
I also had this line cs _control.ChangeTransition("Block Low", "FINISHED", "Reset");
So I know "FINISHED" is supposed to work
however, this just freezes the enemy
doesn't event do the animation I want
Wait lemme check I spelled it right
I might've tried using the wrong one
there wasn t supposed to be a space between attack and 3 
if that's the reason it didn't work...
HutongGames.PlayMaker.FsmEvent.Finished
And the typo wasnt the main problem 
I'll try, thanks
didn't you say last time this didnt work for you?
Welp, still doesn't work
the problem may be something else, I guess
How am I supposed to mimic this through code?
A gameObject variable?
new OwnerDefault() {
ownerOption = something with self i think was it called
}
hm
Welp this looks way too confusing
Doesn't FINISHED get called automatically anyways?
after all actions finished yes
unless you remove the transition of FINISHED and make it a custom event that gets called by the Tk2dPlayAnimationWithEvents
yeah I decided to just use playanimation instead of withevents
I did this and now it doesn't freeze, but it also doesn't play the animation for some reason?
_control.GetState("Block Low").GetAction<Wait>(1).finishEvent = null;
_control.GetState("Block Low").AddAction(new Tk2dPlayAnimation()
{
clipName = "Attack3 L2"
});```
How did all of you get animations to play?
Is there anyone who has some code I can look at that does anything of this sort?
Is the enemy going to the next state and having a different animation set
That might be, but I can't see how it moves on to the next state without finishing the animation
isnt it meant to finish all actions and only then move to the next state?
I'll try to add a wait and see how it does
Adding a wait doesnt seem to do anything 
I’d think it starts the animation and the action is done
Well you already have a wait that does nothing
wdym
First line?
oh yeah its there for waiting reasons
Also you can make your code slightly faster by storing the state in a variable and using the variable instead of GetState multiple times
I meant a wait that comes after the animation begins
makes sense, thanks
Aight I added a long wait at the end
to see what happens
it waits the full wait before changing states, but it still doesn't run the animation
I'm probably not calling the animation correctly
I probably need to write what the gameObject is but I have no idea how to do it
this is the closest I have but I can't figure it out 
why does it even need an OwnerDefault?
welp
I give up
itll need to just continue using the idle animation while using this attack I guess
I'll get back to it sometime in the futute
Heard of InsertMethod?
InsertMethod(statename, () => tk2danimation.Play(animName));
I have a coroutine that starts running when you enter this state where I also tried to add in _anim.Play(animName);
the rest of the coroutine works perfectly though, only this didn't work
wait isnt it tk2dspriteanimator?
snk signing is only good with <NoWarn>8002</NoWarn> in the csproj i just realized
i broke my achievements again
but now i know that my modded installation refers to some assemblies in the actual gog installation which get corrupted for some reason, trying to find out which are affected
Can I access HK dialogue using dnSpy? If not, how can I access dialogue from the code?
i hate things i can't reproduce
at least this works
hmmm
forgot to reply to this with the image
Which image did you want?
did u create the asset for this ?
quick question: how do I change stuff like what an NPC says?
languagegethook
?
just return what you want it to change too
I don't know what languagegethook is
this thing
ModHooks.LanguageGetHook or ModHooks.Instance.LanguageGetHook for 1.4
pong
There are mods for 1.5?
why?
yes but no installer
oh, ok
there are some but you're better off on 1.4
and this
pong
I will be back later when I have more questions
gl
can you read? it's on the right side
oop
i maybe was pointlessly blunt
the real question was did they draw it or like make it from ingame things
they drew it
nah its okie it was mb for not paying attention dwai
yeah it's too well made
<@&283547423706447872> thanks mods

nice, sfcore still not working correctly
i hate this garbage
how hard is it to add a new panel like journal or inventory
check sfcore itemhelper
does exactly that
the version online should even be coded that it can be used indefinetly many times
... without breaking
Have you updated the mods for version 1.5 ???
no, we're currently making a modding api for silksong
hollow knight 1.4.3.2
( meme song mod )
https://drive.google.com/file/d/1aC4SFLWtd1JEXaZEHJ6lsARoJ_1G3SIN/view
did any one ask for this ? no. did we make it anyway? yes.

( @cedar hemlock and i )
someone know if have any mod client that have suport for cracked versions?
yes for mod client, and no for cracked?
yes, i know that
no, no support
How can you make a modding api for a game that hasn't been released yet???
What about a modding api for version 1.5? When is it going to be ready?
Every time someone asks about the modding api for version 1.5 in this channel it gets delayed by 1 week
Yo flib, when is 1.5 mapi comming
Mod apis 1.5 plzs I needs for prted version
i forgot i downloaded this last night so i was so so so confused when i heard YAHOO when i killed a mantis
lol
lmao
thats the best way to experience it !
true
too bad i listen to music while playing so i dont hear too much of it
Nooo. I already have one
Sh*t. Sorry
tf it actually do
For now? Add mod support to an empty test project
shout out
the man, the myth, the legend
Wooooo
That isn’t the 56th commit right?
it seems like that
56th pr?
i believe it is 56th commit on that branch
Ah
just askin daily if any1 knows this skin, just in case someone finds it
I haven't played for a long time because of work.
I hope everyone can live a happy life
Hi, I'm having trouble installing the packages I need to compile the assembly. I get this message saying "Not available in this source".
I'm using Visual Studio.
from the icons i'd say that they are installed, just that you don't have the source code of them
No matter where I click my mouse, Unity says that the world point of my click is (136.3, 15.0, -38.1). Any idea why this is happening?
asset ripper works on mac and linux too now!
imagine supporting boomer patch
for the person that deleted their message: https://github.com/hk-modding/api/blob/master/Assembly-CSharp/ModLoader.cs#L36




