#archived-modding-development
1 messages · Page 513 of 1
👀
is there a way to explore a prefab ? or one of those objects that are assigned as public properties on another scripts ?
can anyone think of a reason why it would render like this ?
when the original sprite is this ?
reverse the colour of the sprite
but it doesn't seem like invert, white parts would become black then right ? instead of red ?
hmm yeah right
red still red
is it only rendering the red channel ?
so everything red is red , white is red , every other pure color is black ?
wierd tho
right ,but when customKnight loads a sprite it just makes a new texture
texture.tex = new Texture2D(2, 2);
texture.tex.LoadImage(texBytes, true);
would this still apply ?
Hmm - yeah, not sure, I have admittedly little experience working with the graphical side of things
may be difference of texture replacing vs sprite replacing
I guess it could also be some sort of shader?
i tried setting the shader to Sprites/Default
i mean it's a ParticleSystemRenderer's material's texture that i am updating here would that have a sprite to replace ?
then idk
so updating the shared material did this , the other particles that spawn when the shade hits the player got the correct texture 😐
in fact i think i might have replaced most if not all black orbs
but the ones i wanted to replace are still red 😐
setting shader to "Standard" got me this.
seems like alpha channel is gone now and the image seems dull like its at reduced brightness? sorry if this is a super noob question 😅 but what shader are we normally supposed to use when trying to render a png with transparency?
textures got dark for me2 when using vs
new Material(Shader.Find(“Sprites/Default”))?
^ doing this seemed to have broken it , i'll try it again and report back
amazing
the shade's particles apparently uses the Sprites/Default shader
var psr = x.GetComponent<ParticleSystemRenderer>();
var xM = new Material(Shader.Find("Sprites/Default"));//psr.material;
xM.mainTexture = CustomKnight.Textures["Orb"].tex;
psr.material = xM;
this makes it still go back to the red only thingy 😦
which aligns with this i think
x.GetComponent<ParticleSystemRenderer>().material.mainTexture = CustomKnight.Textures["Orb"].tex;
does this work?
i'm so sorry , i just found the issue and feel like an absolute idiot
what was the issue
in my quest to figure out how to set the particle's color assuming they were colored not textured i had set particleSystem.main.startColor = Color.red , when that didn't work it got burried under a lot of commented code
but was still getting applied 😦
it happens
i'm so sorry for wasting everyone's time , and thanks for helping me anyways!
dudeeee its not depleting my soul when I heal in lightbringer
Zaliant, I dont even know
I attract bugs
and not in the good way
I don't think I fully understand the tips you gave, 56, about FSM stuff for 1.5. Take a look at: https://github.com/CallumMoseley/HollowKnight.RandomizerMod/blob/master/RandomizerMod3.0/Actions/ChangeShinyIntoItem.cs
I haven't made any significant changes to this file. The FSM is still working improperly. All the states already exist and all transition differences are just those pointing to different states in the same FSM. Is there something obvious to you that I'm missing? This uses SereCore's PlayMakerExtensions; maybe I misunderstood but is there anything there in particular that needed changing? I feel a little dumb for asking about the same issue repeatedly but hopefully I can progress past it soon. 
Hey i want to get into modding bosses. Were should i get started?
howdy howdy. trying to make a skin. i have spritepacker working fine. how im currently doing it is opening all the pngs in a folder for a certain animation(?) (eg. opening all pngs in Knight -> Idle) and adding what i want in clip studio paint
ive noticed there are a lot of overlap (specifically the head) for a lot of sprites, but they cant be check->replace in spritepacker because the cloak’s different/theyre offset by a few pixels. is there a good way to locate these so you can make sure your skin is consistent where it should be? entirely understandable if there isnt and i should keep checking/rotating old sprites and copying the relevant bits ive made onto new sprites or deal with the fact that some of the heads which were identical in the original wont be in my skin. just want to make sure im not taking an unnecessarily tedious route to spriting!
I'm all for generating sprites , but someone would need to manually tag these spots in terms of their coordinates and that sounds like a lot of effort.
Depending on the level of tagging, It could allow to generate skins in a similar way to vessel maker.

sounds like there isnt anything that would identify similarities/generate all sprites sharing the similarity. dang :^( ty 4 the response! :^)
Yeah atleast not easily I think
really makes me appreciate the work spriters do! they deserve more recognition (^: the main file is ginormous, and theres no easy way/shortcut to reskinning
The AddTransition/ClearTransitions extensions in SereCore are probably wrong if you didn't change those
https://github.com/fifty-six/HollowKnight.Vasi/commit/f955419e20e80de92bc53c59a04c3d63e757c86e if you look at the diff for FsmUtil that's basically what you need to change
It uses ToFsmState instead of ToState now
btw, another change, probably worse to find out: some fsm events got renamed
Uhh... is there a list of which ones? Or do we just have to find out?
find out, i know that TALK_FINISH was changed to CONVO_FINISH
Isn't it CONVO_FINISH in 1432?
afaik it was one of those and was changed to the other
found it
hmmm, maybe tc waits for even more fps in hk: https://www.youtube.com/watch?v=nY20fDmlW7M
public static bool OnEnemyEnable(GameObject enemy, bool isAlreadyDead)
{
string normalName;
if (enemy.name.Contains("(Clone)"))
{
normalName = enemy.name.Remove(enemy.name.Length - 7, 7);
}
else if (enemy.name.Contains("("))
{
normalName = enemy.name.Remove(enemy.name.Length - 4, 4);
}
else
{
normalName = enemy.name;
}
if(!patched.Contains(normalName))
{
if (Dictionaries.EnemyTextures.ContainsKey(normalName))
{
enemy.transform.gameObject.GetComponent<tk2dSprite>().GetCurrentSpriteDef().material.mainTexture = Dictionaries.EnemyTextures[normalName];
}
patched.Add(normalName);
}
Modding.Logger.Log($"normal name: {normalName}");
return isAlreadyDead;
}
private static List<string> patched = new List<string>();```
Something in this code apparently causes infinite loading screens. It uses the hook ```ModHooks.Instance.OnEnableEnemyHook += SpritePatcher.OnEnemyEnable;``` The EnemyTextures dictionary is a dictionary with a string as key and a texture as data. When this piece of code is disabled everything works fine
you forgot a `
where?
ofter enable to make it like this xD
please ping me with an answer
Only some general things, might not be the cause, but debugging it shouldn't be an issue as errors clearly state where it crashes
"".Replace(" (Clone)", "")>if (enemy.name.Contains("(Clone)"))and the entire inside"".Substring(0, "".LastIndexOf("("))>else if (enemy.name.Contains("("))and the entire inside
That isn’t the problem. The normal name itself works. It is something in the part after that. Thanks for the improvements though
It does fix some wacky things with unused strings in the compiled assembly
What appears in the modlog? Nothing?
I assume the first time you get the infinite load is the same as the first time you enter a scene with an enemy to be retextured?
then i'll assume there is a ton of things in output_log if it isn't in modlog
Nope. Just any scene
I’ll take a look
I mean later today. I don’t have my fast laptop near my rn
If it breaks on any scene, then the problem shouldn't be with the bottom code that doesn't execute, right?
IDK. As far as I know it happends on any scene.
Side issue - I wonder if cutting of the brackets is actually what you want to be doing; like, it seems the enemy name is something like Fly 1 rather than Fly (1) - at least according to debug mod
That is unity. If you have placed several instances of the same object in a scene it adds (NUMBER) to the end
Definitely with the brackets, in the enemy.name field?
Is this scentence correct?
I don't understand it
What I meant is, I believe that enemy.name will not have brackets (if I write code that says
public static bool OnEnemyEnable(GameObject enemy, bool isDead)
{
Log(enemy.name);
return isDead;
}
there are no parentheses in the entries printed to the log).
Some do, some don't
indeed
IDK I don't know unity
you can get
Spitter
Spitter (1)
Spitter (Clone)
Spitter (clone) (Clone)
Spitter (1) (clone)
and yes, i think both versions of clone exist
Is this TC 🍝 or Unity 🍝?
unity
that makes a change 
tc, as unity calls them (1), (2)...
or only one version of clone (idk if capitalized or not though), when instantiating from code
in the docs it says in the SceneChanged part that:
It’s recommended to use the internal SceneLoaded hook instead of the the api’s by using UnityEngine.SceneManagement.SceneManager.sceneLoaded However you’ll probably want to delay this by a frame by using a coroutine.
i dont get how to start a coroutine before the hook is called.
Do StartCoroutine(yourThing()); inside the hook
honestly the frame delay isn't necessary a lot of times so I would test it without the delay first
i mean, also an alternative is the activescenechanged hook, and it works for all of my use cases
with all my use cases being setting the map width and height
oh yea ^
to wait a frame i say yield return null;?
oh whoops
Time to crush frames!
i mean, pressgtodab reduced my main menu fps from 800-900 to just 300
though it was a
while (HeroController.instance != null) yield return null;
any unsafeInstance
i didn't write that code, i just changed to hook herocontroller.awake i think, made it work with save+exit
HeroController.awake is clearly superior to frame murder
pretty sure it won't eat your frames if you don't use instance
findobjectoftype every frame is not the tech
yea, i don't use yield return null at all in my code, except for a single instance
Is there a difference between yield return null and yield return new WaitForEndOfFrame()?
Woah that chart looks 
So I actually proxied the extension functions so I could use FSMUtil's AddTransition but still use SereCore's ClearTransitions. Check this out:
public static class FsmStateExtensionsProxy
{
public static void RemoveActionsOfType<T>(this FsmState fsm) where T: FsmStateAction
{
PlayMakerExtensions.RemoveActionsOfType<T>(fsm);
}
public static FsmState GetState(this PlayMakerFSM fsm, string stateName)
{
return FsmUtil.GetState(fsm, stateName);
}
public static void ClearTransitions(this FsmState fsm)
{
PlayMakerExtensions.ClearTransitions(fsm);
}
public static void AddTransition(this FsmState fsm, string state, string transitionTo)
{
FsmUtil.AddTransition(fsm, state, transitionTo);
}
public static void AddAction(this FsmState fsm, FsmStateAction action)
{
FsmUtil.AddAction(fsm, action);
}
public static T[] GetActionsOfType<T>(this FsmState fsm) where T: FsmStateAction
{
return PlayMakerExtensions.GetActionsOfType<T>(fsm);
}
public static void AddFirstAction(this FsmState fsm, FsmStateAction action)
{
PlayMakerExtensions.AddFirstAction(fsm, action);
}
}
The thing is, SereCore's ClearTransitions looks "fine" in how it works. Here is its source:
public static void ClearTransitions(this FsmState self)
{
self.Transitions = new FsmTransition[0];
}
It seems like it's fine since it seems like assigning directly onto FsmState.Transitions is done elsewhere, and in Vasi, seemingly without issue.
It seems to me that the problem is elsewhere but I'm unsure what it could be. I'm trying to open the FSM in FSMViewer2 but I literally can't find the FSM/which file to open for that scene.
how do you do the colours?
Code block is three backticks, you just put the language on the first line.
```cs
Of course you close the code block with three backticks but that's hard to demo without making a block
yeah ik how to do the code block but the colours is smth new to me
I did build from source and it isn't modcommon, just checked.
Add csharp to the end of the first set of things
does your source have the 1.5 update
Yup, I checked history and pulled latest.
amazing
Not in modlog... But I forgot to check the unity logs. There might be something there.
Nope, nothing
you know which fsm is dying yeah?
Yeah, Shiny Control in scene Tutorial_01
FsmViewer calls it Shiny Item (1)- Shiny Control
I had a print to say when a state is entered and it always got stuck at Charm?. I'll add more of the debug statements now
[DEBUG]:[RandomizerMod] - End: Pause
[DEBUG]:[RandomizerMod] - Transitioning to: Init
[DEBUG]:[RandomizerMod] - Start: Init
[DEBUG]:[RandomizerMod] - End: Init
[DEBUG]:[RandomizerMod] - Transitioning to: PD Bool?
[DEBUG]:[RandomizerMod] - Start: PD Bool?
[DEBUG]:[RandomizerMod] - End: PD Bool?
[DEBUG]:[RandomizerMod] - Transitioning to: Fling?
[DEBUG]:[RandomizerMod] - Start: Fling?
[DEBUG]:[RandomizerMod] - Start: Fling R
[DEBUG]:[RandomizerMod] - End: Fling R
[DEBUG]:[RandomizerMod] - Transitioning to: In Air
[DEBUG]:[RandomizerMod] - Start: In Air
[DEBUG]:[RandomizerMod] - End: In Air
[DEBUG]:[RandomizerMod] - Transitioning to: null
[DEBUG]:[RandomizerMod] - Start: Land
[DEBUG]:[RandomizerMod] - End: Land
[DEBUG]:[RandomizerMod] - Transitioning to: Idle
[DEBUG]:[RandomizerMod] - Start: Idle
[DEBUG]:[RandomizerMod] - End: Idle
[DEBUG]:[RandomizerMod] - Transitioning to: null
[DEBUG]:[RandomizerMod] - Start: Hero Down
[DEBUG]:[RandomizerMod] - End: Hero Down
[DEBUG]:[RandomizerMod] - Transitioning to: Charm?
[DEBUG]:[RandomizerMod] - Start: Charm?
[DEBUG]:[RandomizerMod] - End: Charm?
[DEBUG]:[RandomizerMod] - Transitioning to: null```
Yeah, looks like transitions are broken.
Log the ToState and see if it's set instead
Because if something's not updated it'll be using ToState instead of ToFsmState
[DEBUG]:[RandomizerMod] - Test ToState: Charm?
[DEBUG]:[RandomizerMod] - Transitioning to: Charm?
[DEBUG]:[RandomizerMod] - Start: Charm?
[DEBUG]:[RandomizerMod] - End: Charm?
[DEBUG]:[RandomizerMod] - Test ToState:
[DEBUG]:[RandomizerMod] - Transitioning to: null```
No ToState and null ToFsmState... Weird.
I fixed it by not using (serecore's) ClearTransitions and using Vasi's ChangeTransition on each event that needed changing.
Of course now it gets stuck on the next state since that one uses ClearTransitions
Why would clearing transitions that way cause it to break? Hmmm....
How are you adding back transitions?
Vasi's method:
public static void AddTransition(this FsmState state, FsmEvent @event, string toState)
{
state.Transitions = state.Transitions.Append
(
new FsmTransition
{
FsmEvent = @event,
ToFsmState = state.Fsm.GetState(toState)
}
)
.ToArray();
}
[PublicAPI]
public static void AddTransition(this FsmState state, string eventName, string toState)
{
state.AddTransition(new FsmEvent(eventName), toState);
}
I'll change that and recompile Vasi to give it a shot
That doesn't fix the issue
New function:
[PublicAPI]
public static void AddTransition(this FsmState state, string eventName, string toState)
{
state.AddTransition(FsmEvent.GetFsmEvent(eventName), toState);
}
Hold on, I may have been an idiot and not updated the vasi in my mods folder
Yes, that is the fix. Thanks SF, Someone.
56, I'll PR this into your repo for you, unless you plan to do it right now.
yes
interesting
findfsmevent doesn't
Oh is this adding a transition from finished?
That what my code is doing, at least. PR here: https://github.com/fifty-six/HollowKnight.Vasi/pull/1
mrw 3 commits
I can merge but fwiw I'd recommend using FsmEvent.Finished instead of the string
and 2 of those just spaces
I KNOW, OK?
I hate whitespace diffs
It bugs me
Anyway, thanks for the tip. I'll use the member rather than a string literal
yeah I just commented because you can squash
I'm just lazy... unless stupid whitespace is involved. Then I get 
Sorry for cluttering your history. 🙂
Is there a way to take control away from the player?
RelinquishControl
Thank youu
so i know an object's name but not it's prefab's can i still somehow instantiate it?
the GO is "Arrow Prompt New" and it's prefab to the best of my understanding is available in an FSMStateAction "ShowPromptMarker"
Fsm page of apidocs
i dont see a open scene list in FSMavalonia
rip
Open resources.assets
selecting the resources.assets file brings me here
IIRC there's an Arrow Prompt object in there
i don't see how this has to do with instantiating it
you just get the fsm action and take the gameObject off that
this is what i want to know how to do. i saw the fsm action using ilspy and i dont know how to access it
var x = Object.FindObjectsOfType<PromptMarker>();
Logger.Info(this,x[0].gameObject.name);
i did this hack to get the name of the go in hopes that would help 😐
I mean if that finds it you could instantiate it with that
it only finds if it is active like if i am right infront of the bench or elderbug the prompt comes up and i can find it
though Resources.FindObjectsOfTypeAll<Promptmarker>() is probably better
Yeah ok then get the fsm which spawns it
i would like to do this yes
do you know what fsm it is
i only know the stateAction thanks to ilspy
also i feel like i am missing some fsms in fsmviewer avalonia because i dont see the "spitter-spitter" from the apidocs
RestBench - Bench Control - In Range - ShowPromptMarker
this would load even if the go is not active?
yes, reads that in unity's docs
how did you acquire this info ?
and do i just go.LocateMyFsm this string ?
the windows one?
okay i'll try this and report back
You pinged NoPingNeeded twice 🤔
wait. i dont know which go to call this LocateMyFsm on, because i'm trying to find the go
is "RestBench" the go name in this context?
the restbench is the one from Town btw
and to figure out which scene the object is from you need the FSM Viewer?
Usually you know the scene before the object but yes
need is a strong word
Good point
could i probably figure out scene name using ilspy ?
i'd been figuring out object names by logging the collider's go's name on slashHit
No
could i log it on scene enter ?
Also grenade told you the scene name
Yes
You can also look in the pins for multiple sources of scene names
yes for this one i'm going to try that one, i'm trying to figure out what would be my workflow for the next time i want to access some random object
does anyone know why the hollow point mod does not work? I can see the gun but not equip it?
'
Town - RestBench - Bench Control - In Range - ShowPromptMarker
so this is Scene - go- FSM - State - StateAction ?
is there an problem with
https://github.com/ricardosouzag/ModInstaller/pull/85
and
https://github.com/ricardosouzag/ModInstaller/pull/83
?
yes
i now have a garden of popups with no text , the textMeshPro component seems to be null, but this is progress!
Nice
What are you trying to make?
Gardening simulator mod?
as an exercise in getting a better understanding of how it all works, i'm trying to get HK's internal UI systems to popup with custom text / behaviour etc.
but if it fails then gardening simulator is always there
the garden is really coming along well 😛
beautiful
it Finally worked
apparently there's a "SetTextMeshProGameText" Monobehavior on the GO, which would replace the text, nuking it solved my SetTexts not working
Can also set it to use a different key to input into the language stuff
can we add new items into the language thingy ?
someone should try and make a boss with the shield guy, it would be cool if someone did do it
does anyone here know where I can find the background assets for Nosk den? I can't find them anywhere in the google folder of sprites & assets (checked npcs, bosses, area backgrounds, etc)
Already done by someone else
You could try using hkedit(link in the pins)
which pin?
?pins
Check the pinned messages for more information - https://cdn.discordapp.com/attachments/187137504393035776/823796522751623168/unknown.png
My apologies, but does debugger show what sounds are currently playing, or perhaps another mod? Trying to find certain sound effects
afaik no such mod exists currently
and that broke everything
yeah i think
amazing
my memory is not that clear on that one though i might try it again
AND i was using 0.88 of SharpZipLib
JUST BECAUSE it was the only version that supported .NET Framework 3.5 projects
hm
or just edit the code and compile it for yourself
yeah i would do the latter
i wouldn't want to go to the trouble of making a pr, waiting a few hours then testing the modinstaller to see it works, fail, make another pr...
while i was looking at the source code of modinstaller i found a variable that leads to the modlinks.xml
oh and i reccomend de-grading the thing in modlinks to version 1.1.0
i can redirect it to my own modlinks.xml
or any other version that works
i'll work on a fix on my mod today i guess
so wait
modinstaller1 doesn't install stuff from subfolders or nah?
so the name becomes x86_64/discord_game_sdk.bundle
hm...
1 is identical to 2 but 2 is made in an different software or smth
ik
so.
what happens if i run a shell command inside my mod
powershell works
but that makes it windows-only
which i don't absolutely want
HOLD ON.
If I remember correctly, there's an entire library that's built-in inside C# .NET
Which is of course, PowerShell related
I might be able to execute PS commands from there
hm
idk
actually i have planned to buy an usb stick and install linux ubuntu or fedora there
you can also try to execute it via modinstaller which is 4.5 or 4 i dont rly know
sooo
but thats a strech
yeah
that's some sort of a strecth
apparently
it is located inside...
System.Management.Automation;
WAIT.....
wow
I DON'T KNOW WHY MODDING API USES IT
its not the api
its tc
WHY TEAM CHERRY
lol
_ _
ehm
thats what gonna happen
they are already fixing it
ohhh pog
there is already 1.5 api that works half iirc
hmmmm
but mods that dont get fixed will break
i hope the api fixes the issue when it sees a non-.net library
i can just change the targeted framework to... that version?
in visual studio
meh
it only creates one gameobject
which has 2 standard functions that seem universal in every unity version
start() & update()
unity do be working on backwards compability
so not much needs to be changed
half
When will 1.5 release?
whenever TC feels like it 
hopefully never
hopefully soon enough, 32bit is ass
I prefer never since I wouldn’t need to update mods which requires effort
I agree. This would make memory management easier. 64 bit would have never caused issue for Fyremoth
C sharp question - is there a stylistic way to get a value from a dictionary, with a default if the key's not present? Something like D.get(key, default) in python
Idk if there’s already a method like that, but you could make an extension that does something like
if (D.ContainsKey(key))
return D[key];
return default;
containskey 
TryGetValue
I'm currently using TryGetValue but IDK it seems a bit redundant
if (dict.TryGetValue(key, out var val))
{
//do stuff with val
}
else
{
//key doesnt exist
}
.net 4 has an extension for a default value
TryGetValue is the least redundant since it affects the least number of lookups, I believe.
🙂
ReSharper used to yell at me for doing anything else, back when I used that
You could also just create your own extension method. Very valid way to go about it.
yeah
I think you pinged the one person named "No Ping Needed"
Oops
I found some skin of silksong.
crazy
https://github.com/ricardosouzag/ModInstaller/pull/87 help the DRPC is breaking the moddingapi
How do I make FSMView work? I put the repo on github desktop and downloaded+extracted the zip, but neither one seems to work. Is there something else I should do to get it working?
why
code ≠ executable
unless you built it in which case the cldb needs to be in the same folder
I'm sorry, I have zero experience with this stuff whatsoever, so does this mean I need to download it as an exe then run it?
I'm an absolute caveman rn
idk what this means
yea download the cube
okay, I got it to run
now what? It's just all a blank screen
well like I see all the bits of it, but I don't see any playmaker scripts
is it because I didn't buy playmaker or something?
How do you switch out the sprite atlas for the beastiary?
How do you edit dialogue text? As in change what a character says?
Use language hook https://radiance.host/apidocs/Hooks.html#languagegethook
How do you switch out the sprite atlas for the beastiary?
You don’t. You replace every spriterenderer’s sprite that uses it
ok
does anybody know how to make a boss do 1 damage? part 2
Take health hook. Return damage/2
we tried that before
and...
well if it worked i wouldn't be here
#archived-modding-development message
Iirc this is what you did last time
Ig
ig = i guess. probably
i guess ig
it worked thx
(why didn't we (you guys(i did nothing)) come up with this earlier lol)
will it break overcharmed?
lets find out
yes
Why would it?
Yeah. You could have just forgotten it. In what way does it break it?
But you wanted to halve the damage right?
Just wanted 1 instead of 2 by specific bosses
Dont start about selecting 1 boss as i already know that
Check the scene name? Create a list with all the scenes with bosses that you want to halve and check if that list contains the current scene
B r u h
i mean for everything i know, changing the DamageHero components of a boss results in only that much damage taken, so ¯_(ツ)_/¯
Id go with this route too.
Overriding the damage this way makes even radiant bosses deal 1 damage
I was making a dark souls themed skin and when I was testing some of the sprites I noticed that the sprites were messing up a lot idk how to fix it because at first I thought that I colored a part that was supposed to be transparent but that wasn’t the case
hey, quick question, is it possible to make a script without FSMViewer to mod the game?
yeah
I want to add some extra events that trigger when number keys are pressed, how would I do that?
Would I add an extra script?
Least effort is just have a mod which uses HeroUpdateHook and uses Input.GetKey
No
what does it do?
It's invoked when HeroController's Update is invoked
so when a key is pressed?
ok
so it just registers things
sorry i have never made a mod previously so I have no clue what im doing
Is there any noticable difference between hercontroller update and the normal public void update function
so the if statement would be on each heroupdatehook and then check if the key was pressed, then run the if statement?
Not really, the only real difference is that it's setup for you, only runs in game, and doesn't require your own MonoBehaviour as you're just adding onto another
so the heroupdatehook is similar to the public void thing that triggers once per frame?
basically
Ok thank you
Ahahah lil lurien mask pops up when your soul comes out I’m so happy that I’m actually seeing progress in game now
Little mask pop
👍tysm
How do I use HeroUpdateHook?
In public overide void initialize add this line
ModHooks.Instance.HeroUpdateHook += function name
Then let the IDE create the function for your
Then do if (Input.GetKey(Keycode.{key you want})) and then put what you want to do when button is pressed
ok
is there a way to change the amount of damage of only 1 damage type?
for example only explosion damage?
there is always a way, but i'd need to check if there is an ez one
looking at it, you'd need to manually add things, as the damage type is basically this enum:
public enum HazardType
{
NON_HAZARD = 0,
NORMAL,
SPIKES,
ACID,
LAVA,
PIT
}
but no explosion 
explosion is the normal type
but if i change the damage of normal then all normal damage will change and not only explosion
is there a way to only change explosion or not?
whats it called?
"Gas Explosion Uumuu"
and how do i make it 0?
On.DamageHero.Start += yourmethod;
...
private void yourmethod(orig, self)
{
orig(self);
if (self.transform.parent != null && self.transform.parent.gameObject.name != "Gas Explosion Uumuu") return;
self.damageDealt = 0;
}
whats orig(self)
the on hook stuff
didn't want to write the types
just wrote that directly in discord
where do i place On.DamageHero.Start +=
constructor or initialize of your mod probably
doesn't work in initialize
why not
Error CS0117 'DamageHero' does not contain a definition for 'Start'
Error CS0029 Cannot implicitly convert type 'void' to 'On.DamageHero.hook_OnEnable'
i mean, just write On.DamageHero.Start += yourmethod and let your ide auto complete it
did you write yourmethod() or something
Explosion gameobject names
Gas Explosion Uumuu (DH-component is on a child gameobject)
Gas Explosion Recycle L (DH-component directly on gameobject)
Gas Explosion Recycle M (DH-component directly on gameobject)
hm :/
and aparently your code is stronger then the code from yesterday that made all damage 1
i took damage from a hidden mosswalker
What’s your code in the hook
^
except it's OnEnable
private void explodamage(On.DamageHero.orig_OnEnable orig, DamageHero self)
{
orig(self);
if (self.transform.parent != null && self.transform.parent.gameObject.name != "Gas Explosion Uumuu") return;
self.damageDealt = 0;
}
i prob did smth wrong?
Looks right
then why it broke lol
Maybe log the damage and the parent name(log null if parent is null) to make sure everything is right?
what do i log?
...
self.damageDealt?
ehm
[INFO]:[ModManager] - Initializing
[INFO]:[ModManager] - Initialized
[INFO]:[API] - Loading ModdingApi Global Settings.
is all
are you sure your game is working?
What’s in the mods folder
#archived-modding-help time I don’t believe you
Fun
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
[INFO]:[TransMod] - 0
seems like 0
i got hit 2 times
That’s bc it’s only logging the ones being set to 0
You need to rewrite the if statement
Fine I’ll rewrite it
private void explodamage(On.DamageHero.orig_OnEnable orig, DamageHero self)
{
orig(self);
if (self.transform.parent != null && self.transform.parent.gameObject.name == "Gas Explosion Uumuu") self.damageDealt = 0;
Log(damageDealt + self.transform.parent ? self.transform.parent.name : null);
}
Disclaimer: all code I write on discord in the next like 7 hours is written on mobile
Error CS0103 The name 'damageDealt' does not exist in the current context
Error CS0019 Operator '+' cannot be applied to operands of type 'Transform' and 'Transform'
``` is what i get when i ask the lightbulb
What did you change to fix error 1?
Can you send the new code
private void explodamage(On.DamageHero.orig_OnEnable orig, DamageHero self)
{
orig(self);
if (self.transform.parent != null && self.transform.parent.gameObject.name == "Gas Explosion Uumuu") self.damageDealt = 0;
Log(message: damageDealt + self.transform.parent ? self.transform.parent.name : null);
}
```is the last option
Have you tried solving it without the lightbulb
I still see the first problem
Fine I’ll do it
Log($"Damage: {self.damageDealth}, Parent: '{self.transform.parent}'");
First problem was damageDealt was supposed to be self.damageDealt
i tried that
This doesn’t show that
Then why did you change it back
Error CS0019 Operator '+' cannot be applied to operands of type 'int' and 'Transform'
because that
Log(self.damageDealt + self.transform.parent ? self.transform.parent.name : null);
But that would result in the first error
Just use what grenade sent, don’t want to write more code
ok the 2 damage contact damage was caused by me
but with the new code still 2 damage
[INFO]:[TransMod] - Damage: 2, Parent:
The parent is null then
I think?
Try logging the name of the object instead of the parent
just put it as self.gameObject, also logs name
yes, maybe
'
around both parent and name {}, so it's easier to know if there are extra spaces at the front or back
[INFO]:[TransMod] - Damage: 2, Parent: , name: Gas Explosion Recycle L(Clone) (UnityEngine.GameObject)
oh, one of these
ok lemme try
i mean, at that point one could change the if to if (self.gameObject.name.Contains("Explosion") || (self.transform.parent != null && self.transform.parent.gameObject.name.Contains("Explosion"))) self.damageDealt = 0;
Logging?
Still says 2 instead of 0?
[INFO]:[TransMod] - Damage: 0, Parent: , name: -Gas Explosion Recycle L(Clone) (UnityEngine.GameObject)-
i added the -
It says 0 damage
it says 0 but i still get hit 2
modlog says only that
Show your code
wait-
huh?
[INFO]:[TransMod] - Damage: 2, Parent: , name: -Lil Jellyfish(Clone) (UnityEngine.GameObject)-
[INFO]:Creating hpbar for Lil Jellyfish(Clone)
[INFO]:[EnemyHPBar] - Added hp bar to Lil Jellyfish(Clone)
[INFO]:[TransMod] - Damage: 0, Parent: , name: -Gas Explosion Recycle L(Clone) (UnityEngine.GameObject)-
[INFO]:[EnemyHPBar] - Enemy Jellyfish Baby (6) ded
[INFO]:Creating hpbar for New Game Object
[INFO]:[EnemyHPBar] - Enemy Jellyfish Baby (5) ded
[INFO]:Creating hpbar for New Game Object
it says damage 2 for -Lil Jellyfish(Clone) (UnityEngine.GameObject)-
So?
i add Lil Jellyfish also?
That’s just a normal enemy
hm, afaik lil jellyfish should just spawn the other explosion thing, but adding it might work
Tc spaghetti code
if (self.gameObject.name.Contains("Explosion") || (self.transform.parent != null && self.transform.parent.gameObject.name.Contains("Explosion")) || self.gameObject.name.Contains("Lil Jellyfish") || (self.transform.parent != null && self.transform.parent.gameObject.name.Contains("Lil Jellyfish"))) self.damageDealt = 0;
```?
looks horrible but good
Yep
nice
I’ll rewrite it more nicely
while you do it i try if it works
it works
yep
the flying fucks already have 2 damage
the explosion doesn't even damage you because of iframes
if (self.name.Contains(“Explosion”) || self.name.Contains(“Lil Jellyfish) || (self.transform.parent != null && (self.transform.parent.name.Contains(“Explosion”) || self.transform.parent.name.Contains(“Lil Jellyfish”))))
lol
if (self.name.Contains("Explosion") || self.name.Contains("Lil Jellyfish") || (self.transform.parent != null && (self.transform.parent.name.Contains("Explosion") || self.transform.parent.name.Contains("Lil Jellyfish"))))
slightly
ok got it into a charm thx for the help
is there a way to detect when uumuu is defeated?
I believe there's a boolean for it, yea
if you check in debugmod there's an example of it being used in the bosshandler/respawn boss in this scene func
i cant find anything
PlayerData.Instance.GetBool(nameof(PlayerData.killedMegaJellyfish))
thx
(or something like that)
how do I mod hollow knight ? I just want to change text
you want to change text for a mod or just want to change text only for you?
changing every single soul into soup
lmao
on the base game
like, the charm would be call Soup Catcher
Pretty sure you can check for strings you get, then parse them for Soul and replace
but i have no idea how to change text via a mod
Pretty sure you can check for strings you get, then parse them for Soul and replace
Use the language hook
where are strings ?
Language hook gives you every string as it's displayed
There may be a more efficient way
But right now I'd just use that, get every string, and look for "soul" in them and replace with "soup"
so I should go on the games files ?$
What
No
Here
This here explains all you need to start making a mod, in general
tysm
there is, I guess, a way to convert those into a .dll file
if not ?
Open the sln file, add the references and compile
with what do I open it ?
an IDE
wait a sec
I'm waiting

Just Google IDE for mac
im very smort
lmao ruttie 
im trying to get when uumuu dies
Wdym?
As in, when during the animation?
just if uumuu is dead
Mod
giving the player a charm
Ah, cool
Woo, nice 

oh god
you killed an explosive jellyfish
need to close the game quick
is there a way to do the opposite of that ?
what you have there is the opposite of an .dll
Dnspy
ohno
if (uuwuugone != 0)
{
ModHooks.Instance.HeroUpdateHook += uumuu;
}
what do i do wrong
I want to turn a .dll mod into a folder, a .sln etc.
dnspy or ilspy
if you already have project files, you can compile those into a .dll
if you need to look at a dll (mainly assembly-csharp.dll) to understand how the game works, dnspy is pretty good
search for howwow on github
didn't work
it not on github 
sad
why is it spamming my modlog!?
if (uuwuugone == false)
{
ModHooks.Instance.HeroUpdateHook += uumuu;
}
...
private void uumuu()
{
if (PlayerData.instance.GetBool(nameof(PlayerData.killedMegaJellyfish)) == true)
{
uuwuugone = true;
Log("uumuugone?");
Log(uuwuugone);
}
}
what did i do wrong
Where is this 
the if?
You could just do a normal hero update Hook and in the hook check for uuwuu
in initialize
Not other way around
look at the api docs, every frame
ok so i have at the start just bool uuwuugone = false;, then if it is still false then i do ModHooks.Instance.HeroUpdateHook += uumuu; but when i make it true in private void uumuu it just keeps doing ModHooks.Instance.HeroUpdateHook += uumuu;
I think
but when uumuu dies it still spams
wait there's a thing in playerdata called killedmegajellyfish?
but while doing Log(uuwuugone); it says its true
Oh I know
ou don't remove the hook
No?
Unless that's not what you asked
Anyways gtg, brb
i want that when uumuu dies the ModHooks.Instance.HeroUpdateHook += uumuu; stops
but why does it not stop
when uuwuugone is true
you have to unhook it i think
ModHooks.Instance.HeroUpdateHook -= uumuu
ah
Good luck ruttie 
it did nothing
Check if the charm is gotten and then make uuwuugone false
Show your new code
i just did it differently
i just did
if (PlayerData.instance.GetBool(nameof(PlayerData.killedMegaJellyfish)) == true && uuwuugone == false)
{
So this worked?
never tried that since ^this^ solution worked
how does a mod "fail to load"
like, what are the criteria
because HKMP does not work without modcommon, but does not fail to load
crash during initialize
ok
modcommon 
it will be changed to vasi later (or all dependancies will be removed)
fsmutil 6.0, or are there then 7?
how could I revive a boss?
Depends on the boss
Debug has a feature you could take a look at for most bosses
Generally it falls into one of two categories
You set a bool or you change a SceneData element
okay, looks good! Thanks!
so line 52 is for False Knight? Each subsequent line is the next boss?
Am I seeing that right>
ok, I think
so if it was false, false knight would be dead, if not, he would drop down and fight the player?
Sorry if I'm a bit slow
The download of the ISE finally finished !
Nice!
What IDE should I use for modding?
Is there a specific one?
I've been using Notepad++
Visual Studio Community or Rider is what I'd recommend
VS Code also works though it's more lightweight
alright
I'll use VSC for now
Is there any starting lines I need before I start the script?
Just the three unity usually gives, right?
idk what unity gives ngl
ok
how do I change the players position, like move them to a different room or reposition them within the room they're in?
HeroController.instance.transform.position
ok
which pinned message? Also, how do I change the player's soul meter?
And also, how would I change the bossData for False Knight?
To make it so it will be true and revive him if he's been defeated previously
A'ight my thing got lost in the other chat,, so hopefully this is a better place to ask..
I'm making a custom knight, and would like some help on how to keep an edit to the outline consistent- like how to not make something jitter between frames
Gonna make him some little wings or somethin, still deciding on how exactly to make them, but..
Really just need help gettin started
you probably want SpritePacker
An example of a workflow for creating Hollow Knight custom knight skins using Krita and SpritePacker by Magegihk.
Download Krita: https://krita.org/en/download/krita-desktop/
Download Spritepacker: https://github.com/magegihk/HollowKnight.SpritePacker/releases
Music: In a Sentimental Mood, Duke Ellington & John Coltrane
Gonna check that out real quick
I'll have to download that stuff, then. How do they get all the frames to be like that?
All I have is the whole sheet, and there's no way they cropped every single frame

Unless they did but god I hope not
Or do you select one of those animations and just
Hmm
@lost bear i downloaded sprites from this video. animations are grouped in folders https://www.youtube.com/watch?v=B3bV9SFryfg&feature=youtu.be
ENG
You asked me a lot of times how I do skins so I decided to make a video about it.
I used Google Translate because the english is not my language.
SpritePacker: https://drive.google.com/open?id=1L0MNDMQE6s40zVF132zjwYjc-bSaBYDv
Sprite folder: https://drive.google.com/drive/folde...
thank you!
eg. this is the dash folder
that'll help a lot
which folders should I download for a reskin of just the knight? there's a lot of folders here wow
not doing any of the magics right now or any of that
some of them don't say knight, then have the knight hiding in there
i think? most people focus on the Knight folder first
wonder what I should change on the boyye
wings are one idea..
another was like, tiny fluffy wings and a halo, or..
so many possibilities agh
well, I appreciate your help! I'll prolly pop by again once I get the hang of this stuff and figure out what I'm gonna do.
ok.. once again need a little help, agh
it wanted sprites in there, so I did that
it's all the "knight" folder sprites
renamed "knight" --> "sprites" because the spritepacker was looking for a "sprites" location
but now spritepacker just isn't opening for me
confused
Should I have downloaded the entire, bigger sprite folder, with every folder of sprites?
the people in modding-discussion prob know better ngl
skin dev is usually over there
I'll see if they can glance here then, and ask there in the future
thanks
thank you too ;w;
which pinned message has the names of the rooms in the game?
Also, how do I change the player's soul meter?
And also also, how would I change the bossData bool for False Knight?
To make it so it will be true should revive him if he's been defeated previously, right?
ok.
Hercontroller.instance.AddMPCharge
I'm an absolute moron for not seeing that scenes thing lmao
what app is good for viewing rar on windows?
Google?
7zip
hero
Let’s goo I found out which sprite that kept showing up as unedited . So with that one sprite edited the standing still animation has come to a complete 
hell yea!
We have officially reached progress 
omg that's too cute
https://github.com/ricardosouzag/ModInstaller/pull/89 this one being reviewed would be nice
it fixes the "sequence contains no matching element" error (if this fix works ofc)
debugmod has an respawn boss function
i think so
why did he ask it again then xD
then im just giving irrelevant info :elderC:
isn't that a java ide?
it works for C# as well
is there a way to find the non dll file for this mod ? (folder+readme+license+sln file)
you could ask gradow for the source
they might also have it on their github
otherwise you can decompile
how ?
and no, Gradow's github doesn't have any public repositories
use
```cs
_ _
```
where ?
when putting in code
way better
🇳🇱
no deutch
i dont get why you put flags everywhere but if you do do the right flag
now it looks like im talking to air 
you are
Remove the display this text
oh shit ye
what
oh I sent the wrong one
{
public class SoupMod : Mod
{
public SoupMod() : base("SoupMod") { }
public string LanguageGet( string key, string sheet )
{
if( key == "Soul" )
return "Soup";
return Language.GetInternal(key, sheet);
}
public string LanguageGet( string key, string sheet )
{
return "Soul" + key + "Soup" + Language.GetInternal(key, sheet);
}
}
}
}```
so 'LanguageGet' is supposed to find on the game's text if there are "Soul" written and replace it by "Soup" ? or I'm totally wrong
considering gradow owns the modinstaller repo i find that hard to believe 
I didn't found the good Gradow I guess
https://github.com/ricardosouzag/translationmod would you look at that 
nobody knows ?
I don't know how languageget works, but ngl that looks very not right in slightest 
Eyoooo that's cute af, also next time post it in #modding-discussion
Hm, This seems off
key is the name of the string, you use that to get the string itself with Language.GetInternal(key, sheet)
What you need to do is call getinternal and stuff the string in a variable (for convenience), then you start parsing the string for "soul" and replace those with "soup", then return the final string
If this is confusing I'll try to explain again
Also I might be using the word parse wrong
with google 
and then you ask more if you can't figure out suggested solutions that already exist, for any reason (it makes no sense, it's outdated, it isn't compatible with the hk .net version, etc, anything)
(sorry if this came across as rude, but trust me, it will help a ton for individual understanding and problem solving to learn how to Google problems properly)
also there was one } too much
I see in the code there's a bool for FK in the debug mod. If I change it to true, would he respawn?
public List<bool> gotCharms = new List<bool>() { true, true, true, true };
how do i change only 1 of these
i only want the 2nd one to be true or false without touching the other ones
i cant just do
bool lala = true
...
public List<bool> gotCharms = new List<bool>() { true, lala, true, true };
gotCharms[1]
can't do gotCharms[1] = blah?
It sounds like you're capable of editing the list initializer, so why not just put false there? Am I missing something maybe?
if i were to just change it to false all the other ones will also be forced the one i have in the new one
That didn't make sense to me, but if you just change the second to false it will not affect the others after list initialization.
new List<bool>() { true, false, true, true };
Does not affect the other list items.
No, it's a new list being initialized. That code is functionally (and literally, once compiled) the same as
gotCharms = new List<bool>();
gotCharms.Add(true);
gotCharms.Add(false);
gotCharms.Add(true);
gotCharms.Add(true);
