#archived-modding-development
1 messages · Page 516 of 1
so the release here ? https://github.com/HollowKnight-Modding/HollowKnight.Modding/releases/tag/1.2.2.1-37
wait no, sorry
there is no exe here
Why not get it from the installer
Also the api isn’t the installer
The installer is in the pins and channel description of #archived-modding-help
It’s also here
?i
Reminder: The mod installer (https://radiance.host/mods/ModInstaller.exe) and other modding resources can be found from the pinned messages. 
I have no idea of which installer you are talking about, this is my first time modding HK and I followed the sticky links from this channel in order x)
I should probably have tried playing with existing mods first, I'll do that. Thanks !
Yeah you should do that
be a chad and play the beta w mods
Or do that
You need to recompile any mod you want to play though and need to change any code that uses fsms
ok nice, I installed the api, played a bit with the debug mod, it seems to work fine 🙂
now let's not be a chad yet, and let's say I want to create a new mod with the non-beta version. Where should I start ?
Create a .net framework 3.5 class library project in your c# ide(ex: visual studio, rider)
Reference Assembly-Csharp.dll from the managed folder in your hk installation
Create a class that inherits from the Modding.Mod class
Done
Simple mod up
ah yes, my building of the API was in fact from the first line of the "getting started" page
It seems well documented
thank you very much
I'll be right back with whatever stupid idea I managed to implement
For the beta it’s 4.7.5 I think
Oh also you probably want to reference UnityEngine.dll and UnityEngine.CoreModule.dll
472
haha yes
I made a stupid mod that makes you die in one hit
very fun to play with the hooks, thanks for the tips 🙂
How much is your workflow automated ? now to test my files I :
- click on build in Rider
- manually copy the .dll from the bin directory to the game mods directory
- launch the game
- launch my save
Is there a way to automate the file copy, and/or to directly drop in a scene on launch ?
(I could probably override a menu hook to do this, but if it already exists... 😁)
That's exactly what I do
After a few days it becomes a really smooth, second nature motion
It didnt even cross my mind there might be somehting better
btw italy, where can I get the grub killing mod
you monster 😢
I wanna look at the code
You can modify the .csproj to copy the dll to your mods folder
Or if you're a c# ape like me you use a shell script to copy the dll
okay, it was a bit weird cause the AfterBuild task override does not work in rider
but it works with a bit of fiddling :
<ItemGroup>
<ModDLL Include="bin/Debug/net35/StupidMod.dll"/>
</ItemGroup>
<Target Name="CustomAfterBuild" AfterTargets="AfterBuild">
<Message Importance="high" Text="Copying files"/>
<Copy SourceFiles="@(ModDLL)" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\hollow_knight_Data\Managed\Mods\"/>
</Target>
I could probably add a Run clause to run HK automatically 🤔
@copper nacelle trying to build the HollowKnight.Modding repository I get lots of errors like The type 'Vector2Converter' in 'F:\HollowKnight.Modding\Assembly-CSharp\Converters\Vector2Converter.cs' conflicts with the imported type 'Vector2Converter' in 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'F:\HollowKnight.Modding\Assembly-CSharp\Converters\Vector2Converter.cs'.
and The type 'TypeNameHandling' exists in both 'Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null
the Assembly-CSharp.dll in your Vanilla folder is the modded one
you need the vanilla one for it to work correctly
ah. That explains it
thanks
@fickle sparrow do you also know a fix for this error? '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?)
I assume this is on the master branch of the modding api?
make sure you have the latest beta version (1.5.66 currently) and are are using .NET Framework 4.7.2
sounds exactly like <#archived-modding-development message>
ok, had a lot of fun fooling around with random features 🙂 next step : a custom enemy !
again, thanks for the documentation, it's really cool 🙂
Quick question : how do I instantiate a specific existing enemy ?
You preload it
Unless the only places you instantiate it is in scenes where it already exists
nah, I wanna load whatever the room, whenever you take damage (I know about the hook already)
?
ok so I know how to preload a custom enemy thanks to the docs
(with AssetBundle and everything)
yeah sorry about my english, I'm French and I realize I talk weird sometimes ^^
Ah ok
oh okay
Assetbundles are used to load something made in the unity editor, preloading is used to load stuff from scenes without having to visit them while playing
okay so I override GetPreloadNames in my mod class (like in the scene setup), with something like
new ValueTuple<string, string>("zone_with_an_aspid", "spitterthingy")
I should have an aspid preloaded
Yes
cool, and now to Instantiate it, what do I use ? I can't use UnityEngine.Object.Instantiate() cause I don't know which variable I can give to it
okay, then my question is : how do I retrieve the aspid Gameobject once it's preloaded ?
Look further in the docs for preloading
There’s another Initialize override that you use instead
I searched "preload" in the docs and did not find another example :c
oh
wait
sorry
I can't read
yeah I saw it after I sent you the link, sorry 😅😅😅😅
almost 10 years of programming and I still can't read sometimes
Great, I spawned a primal aspid every time the knights swing his sword, that's perfectly balanced
thank you for the help Someone 🙂
Just noticed this now
Hello people, I need to mirror the sprite of the knight on runtime but I don't have much experience on the tk2d.
Do you just want it like backwards?
Should be a relatively easy shader to write if you want to do it at runtime on a gpu
reflection on the water
Unfortunately I dont have any shader experience but if you have any with a good resource I can handle it 😄
nothing to see here
hi everyone, I'm practicing any% and I was wondering if this is a good kp time
- that's a good beginner time (I think, I'm not suuuper involved)
This gives me joy
- downpatch to inventory drop
- this is modding development, why did you put this here?
Did you watch the video
Great time! There's a few areas you can work in, but that Dirtmouth split is an optimal route never before discovered. Any runner serious in speedrunning should start using your strategy. Thank you for your discovery.
thx
i don't like this at all
fire: oh thanks italy for letting me kill grubs here's y-
italy: i'm not done.
you can thank tsira for this one
ofc 
tsira?
tsira.
tsira.
Hey. Since SFGrenade doesn't want to be pinged, I am using SFCore to add custom items. That adds a new inventory tab named Equipment. The mod I'm working on has support for multiple languages. How would I be able to change the name? I found the internal ID to be PANE_EQUIPMENT, but when I try to change it it keeps saying Equipment. My guess is because SFCore also edits that piece of text
holdup....grenade made sfcore why did that take me so long to connect
IDK
@jolly oriole SFCore question
@light zodiac His name literally says don't @ me
i can make it support multiple languages if you want me to, though the howwoknight mod somehow manages to owo-fy this custom text as well, idk how exactly it does that though
Ok. I’ll take a look at that source.
is there a reason you are using TEXT?
if not, i recommend you use `text` for a few words like this
or use ```text``` for long text like:
text here
ok
ok
well, I'm not reading that shit ever again
lol
Lmao

please add support? I'm not touching howwoknight ever again
I’ll look into why it isn’t working, it should just be adding a hook either before or after SFCore
what's the first one you did
What's the difference between that and double `
there is a difference on desktop?
triple backticks give code blocks
single backticks give inline code statements
on mobile i believe both display as inline code statements for cursed reasons
It was about single and double
i'm pretty sure i got softlocked in a hk rando & was looking at the way the logic works in the rando mod. is that something relevant to this channel's interests?
I’d say that’s more relevant to #randomizer
i figured that was just for speedrunning, but ok thanks
lol, whichever version i have on my phone displays the double ones as normal text, not inline code
otherwise i wouldn't have seen that it is `` instead of `
Grenade, I made a pull request adding support for all HK-supported languages
alright, will look at it once i'm home
Ok
from a first glance i may close it though and make it similar in working as tot and other of my mods that have text (and so i don't have to change the references lol)
yes, will then be a json with the translations inside, easier to adjust in the future
👍
why does vs want to save 'utf-8' things as 'utf-8 with BOM', which Encoding.UTF8 can't read (at lest netf35 doesn't have a thing for 'utf-8 with BOM' afaik, but i haven't checked)
Thanks sfgrenade. When will the next release be?
ig i could do that rn, though i think i up the version before lol
and the strongname stuff is just because i know somebody who has problems with their AV deleting mods, and apparently having a strongname prevents that lol
you think you up the version before? What do you mean? For Fyremoth it doesn't really have priority since it won't release for some time
F*ck. Sorry for the ping
that the assembly version is 1.4.3.3 -> 1.4.3.4
ah
https://github.com/ricardosouzag/ModInstaller/pull/95
now's the waiting game
The waiting game is already over
it was quick, it was silent, it was 56 
lol
I have some free time, why not
but are you a trusted contributor?
yeah are you

Idk man if being a dev of pale court doesn’t make me a trusted contributor idk what will
56
pale court isnt real 😤
I don’t see why we’d need to revert it back to that comment, a lot has been done since then(changing enable all installed mods to enable modding api, tot, SFCore, drpc, corrupted kin, more, all have either been added or had multiple updates)
(I skimmed through the comments since then)
"audit", not "revert"
Ah, (I’m bad at GitHub)
I don't see the point at all. The commit they reported isn't even suspicious.
Yeah
If the shas were wrong someone would have noticed cuz it would cause infinite updates
I assume 56 just posted wyza or someone else's latest PDT version when the last gdrive was taken down, and since all 3 forks of PDT are effectively abandoned, no one has fixed it since.
dw i'm also shit in github
Ruttie seems to have seen that in the 2nd comment mentioned
i don't even know what audit stands for
i would trust ruttie fixing my sha1 mistakes
I personally trust Ruttie
same 
its not a github term, but it basically means to check all changes and if they were correct i think
Ah ok
audit?
I can’t check if they’re right
I’m on mobile
Plus if something was wrong it prob was already changed
ye
ok
And it’s easy to check and fix wrong things by just using mod installer
does my mod's readme still appear in modinstaller2 i wonder
since. it's a TXT file
not a MD one
Readmes aren’t in mod installer 2 iirc
that sucks 
no, modinstaller 2 has the small descriptions from the modlinks.xml
ah well
well most people seem to use modinstaller 1, but yeah this has an impact on some mods that need their README
mOdInStAlLeR 3 WiLl FiX tHaT
hollow point moment
there's still the readme collection pinned in modding-help

Who actually made this tho
Just change all text on title screen to pls read readme
Don’t remember the name from anywhere
Y E S
can you define "this"?
some person that thought it would be funny to move the old gdrive into their trash
Also does anyone have a suggestion for becoming not bad at GitHub
Cool
idk, potentially ask questions probably
Ok
i barely use github 
yea, thanks to github my mod versions didn't have to be changed in modlinks
I could change mine to that therefore fixing frogcore(I think)
i still publish a different release and then change the link in modlinks
But that’s effort
if anyone finds a problem they don't have to ask me or anyone else for the old dll, it's literally in the releases list
anyone know where the mouse cursor is located in the scene hierarchy
i don't think it is located anywhere
at least not in any scene
do you aim to change the cursor image?
no, trying to reuse it to pick objects on screen
looks like we're creating it from scratch
line 262 is apparently a version with the ingame cursor
@copper nacelle You reverted back from .netstandard2.1 to netfx472, why not just match HK's .netstandard2.0? I'm not particularly invested, just wondering if there was a reason behind it other than "bleh it's not working right now, fuck it revert" (For modding api)
.
Both 2.1 and 2.0? 'cause 2.1 isn't Unity-compatible iirc
2.1 built but isn't compatible as you said so you get a missing method exception on int parse if your build tools are up-to-date
2.0 just made everything die including system types so I didn't try particularly hard to get it to build
If I have a reference to a GameObject enemy, is it possible to get its FSM object without knowing the enemy's fsm name?
Use case: I want to log an enemy's current action when I attack it.
more specifically, and forgive my naive approach:
- I have a list of every alive enemy on the scene.
- When I perform a parry, I want to determine which of these enemies are in a parry-able state.
One thing you could do is enemy.GetComponent<PlayMakerFSM>(), but that assumes that the enemy has an FSM associated with it (I think most do, but some such as TikTiks don't)
Perfect, that looks like exactly what I want
You could do
PlayMakerFSM[] enemyFsms = enemy.GetComponents<PlayMakerFSM>();
Some kind of loop like for or foreach
{
Cool code that does stuff
}
Or
PlayMakerFSM enemyFsm = enemy.GetComponent<PlayMakerFSM>;
if (!enemyFsm)
return;
Cool code that does stuff
To avoid that problem
backticks please I beg you
I’m on mobile and can’t find them
long press '
yes, those are the normal ', not `
Thanks
Is there a reason Debug mod doesn't show Heavy Fools in the enemy list?
Welp I can't find the name of Heavy Fools anywhere
Because they only get spawned in
Rather than are part of the scene'
If anyone can get me their name it'll be appreciated
the language key is "NAME_COL_WORM"
maybe it's somewhat similar
probably part of the scene dump in the pins
I'll look through it I guess
Another question
Why does changing the skin of one enemy changes it for everything using the same spritesheet/atlas?
because those use the same spritesheet/atlas

You know what I mean
Why does it affect them?
I thought it's just changing only that enemy's skin
But nope, apparently its all instances of that enemy, and every enemy using that sheet
i'm not that knowledgeable about unity stuff, but ig unity makes it consume less video memory to have the texture once, but the sprites are one for each object
Any idea how to make two things using the same sheet to use, well, separate sheets?
give it a sprite that uses another texture
Wdym?
I want to have a certain colosseum enemy look different while keeping all the others that use the same sheet looking normal
hm
if just assigning a texture won't work i'm not sure what will
oh yea
try giving the spritedefinition of the tk2d element of the enemy a new material (with similar settings to the original one), but supply your own texture as the main texture
Hm
Nice idea
Is there a way to see the settings the materials have now?
Or can we assume they're default?
you could, but i would advise against that, and you can look at the material settings with either hkwe2, UABE, assetsview and maybe a few others as well
hkwe2?
thx
@copper nacelle just wondering, will the mod installer be able to support a 120mb+ mod?
yeah
don't worry, pale court may also be somewhat larger than normal mods
hi I am starting to learn modding
somewhat larger
I have downloaded the hell mod project but I cannot make reference to Assembly-CSharp.dll because it's not supported
in visual studio
What makes you say that? What error(s) are you seeing? Please screenshot if you cannot otherwise describe.
Least complex solution: delete all the references which aren't working and reference them from your game files.
Make sure modding api is installed first.
yes I have instelled it before
did you add the references or did you only open the csproj?
Mod makers pls ship your mods (source) with the folder you expect references to be in, not a ../../../../../../References hint path*. 😦
but ../^28 is fun 
I keep my references on a remote drive for extra complication 
../../References
I already have 40 copies from it copying during building I don't need 40 more
ok it seem that removing references and adding by myself is fixing the problem
I get that, 56, the small issue I take with it is that there's no mention of that setup and HellMod is linked to as the example mod. It basically presents everyone who clones the repo with the same issue of having to fix references or put a folder in a particular place.
ok thanks now I have no errors in the project
how can I crop part of a tightly packed texture atlas down to a single sprite given that sprite?
should I use render textures?
sprite.rect gives you pixels of where the sprite is on the atlas
https://docs.unity3d.com/2017.4/Documentation/ScriptReference/Sprite-rect.html
but that is actually more difficult than i thought
as other sprites can have pixels in the rect
sadly even https://docs.unity3d.com/2017.4/Documentation/ScriptReference/Sprite-textureRect.html confirms this isn't easy, as it specifically exceptions when tightly packed
time to write an edge detection shader
if you want a general sprite extractor, that maybe won't work
very close is already edge detection with alpha=0
difficult to detect that way will be these adjacent alpha!=0 edges
maybe uvs array? hkworldedit cropped unity sprites, but assets files have extra data on the crop shape
this uv thing?
Hollow Knight Editor (discontinued, see https://github.com/nesrak1/HKWorldEdit2 instead) - nesrak1/HKWorldEdit
a lot of stuff under m_RD
I figure that uvs and vertices from unity api have the same information as in m_rd but I'm not sure
tldr, convert uvs from 0-1 to 0-width/height, scale by texel size, then flip on y-axis
but then there still is the problem of other sprites having their pixels in the bounding box of the one we want
it sure did sound like a bounding box where the sprite is
I'm not on a PC but you might check that uvs is more than 4 points
what
bad rounding in print?
they are probably going to be really small since they only go from 0-1
picked a random one and let vector2 do the fancy output thing
no rounding this time
looks good?
vec2, but same thing
i just picked the first sprite unity gave me
how'd you get that precision grenade?
i printed item.x, item.y
so it could be that sprites just rect packed
apparently tostring has a format specifier
so you could just use that
nah, i printed just both values independently
but you could
which is also why it's missing the ()
looks better
what's the texture's size?
var testSprite = GameObject.FindObjectOfType<SpriteRenderer>().sprite;
List<Vector2Int> texUVs = new List<Vector2Int>();
foreach (var item in testSprite.uv)
{
texUVs.Add(new Vector2Int(Mathf.RoundToInt(item.x * testSprite.texture.width), Mathf.RoundToInt(item.y * testSprite.texture.height)));
}
Log($"UVs:");
foreach (var item in texUVs)
{
Log($"({item.x}, {item.y})");
}
resulted in
UVs:
(82, 97)
(179, 0)
(179, 97)
(82, 0)
you multiply by texture width and height not the sprite width and height
resulted in
UVs:
(82, 97)
(179, 0)
(179, 97)
(82, 0)
you also need to flip on the y axis texHeight - finalPointY
since y=0 is bottom not top
alright, now the question is how to enclose the sprite using these points
not an easy AABB
Like creating a new sprite of only that part?
Oh well idk much about cutting tex2ds
should be like this for the first point
There’s the read pixel stuff
frick don't flip x axis
I shouldn't have withdrawn from my computer graphics course
there's an algorithm i once implemented in python that does lines between points
but yeah should be
(x*texWidth, texHeight-(y*texHeight)
Do you suggest taking that course
https://en.wikipedia.org/wiki/Bresenham's_line_algorithm#Method have pseudocode
.
you still need the indices to build the triangles
then you can throw it into system.drawing and it will crop from given triangles
I'm basically trying to convert a sprite to a byte array so I can send it over tcp
- convert uvs to texture cords with
(x*texWidth, texHeight-(y*texHeight)) - use triangles array and connect every 3 vertex indices together
- crop from triangles
byte array sounds pretty generic
what format is in the byte array
i think there is no triangles array easily accesible in code
whatever EncodeToPNG() does
why didn't it show up before
looking at spriterenderer or smth?
maybe just because 1 am
since you're on unity you probably can't get system.drawing so gl with the actual graphical part of that
I had pain with both using system.drawing in unity and finding an alternative that worked in .net 3.5
triangles has probably a multiple of 3 contents, right?
yes
i saw that true 
sprite.triangles has no relation to sprite.uv?
it can look like this
Triangles:
(82, 512), (82, 415), (179, 512)
(179, 415), (179, 512), (82, 415)
I thought they were all related no?
for (int i = 0; i < testSprite.triangles.Length; i += 3)
{
triangles.Add((texUVs[testSprite.triangles[i]], texUVs[testSprite.triangles[i+1]], texUVs[testSprite.triangles[i+2]]));
}
you have to have the same amount of verts as uvs
idk I just thought that cause there were 8x3 triangle groups and 10 uv coordinates
certainly possible
yes
now just somehow get the pixels out of the texture one way or another
my recommendation is to getpixels on the bounds and then set the other pixels to alpha
This will give the edge clipped size in pixels for each edge (x=left, y=bottom, z=right, w=top).
Not what we want then
well except for the last thing I just said
@wraith bear hey fireball, I played your enemizer mod but had to abort the seed since I got locked out of quite a few checks, i.e the entire Soul Sanctum, Nosk Check, Enraged Guardian Check, White Lady. I know you can use the clip thing but I wanted to let you know that it seems that arenas are like a 50/50 if you can progress or not
should I use like SAT to check whether a pixel is enclosed by the mesh
you could probably go with bresenham's line algo that grenade posted earlier
then fill the inside by rows since triangles are always convex
that's a nice image i drew
how do you use bresenham to get pixels within a mesh
just getting the rasterized outline of a vector triangle
Oh
so I guess try this:
- crop image to rectangle bounds with getpixel
- use the algo to get "pixels" from the three edges of each triangle
- loop over each row of the image and set all pixels of image from step1 to transparent that are outside the shape of the image from step 2
Error: System.StackOverflowException nice
Fun
recursive flood fill is trash
yo italy, which sprite did you inspect with the dozen UVs?
just use a queue bro
if you mean me, yes, i changed it to a queue
i think this is a good start, stun_impact_effect0000
with a few logs in there (i did take the 'ascii art' out)
:/
i think i got it working
mainly, the coordinates are not vertically inverted
and the test also suggests it working
:frogchamp:

thanks for the help man
np
hmm didn't know unity unflipped it when loading ingame 
how would I make a (specific) shiny impossible to interact with? Is there a relevant hook I'm missing?

Question - are GG_Lurker and GG_Pipeway missing from the pinned scene dumps?

Well, then ig they arent
there is no HealthManager in 1221, how should I get the HP of the enemy
health_manager/health_manager_enemy fsm
thanks, it works
FSMUtility.LocateFSM(gameObject, "health_manager_enemy").FsmVariables.GetFsmInt("HP").Value
Sorry, I can get them soon for ya if you need
Oh that would be
if you can!
I've got a situation where I run TakeReserveMP and TakeMP on their own, and I'm running into an issue where the soul vessels ('s ui) won't respond and either won't drain into the soul orb or won't drain at all. What do I need to send to the FSM to get them to work; "MP DRAIN" doesn't seem to be working?
Search for takeMp in hero controller and see what event it sends
hey, has anyone here used firealpaca or medibang paint to draw a customknight skin? i'm finding krita rather frustrating
...this is also somewhat a sprite packer question, as my main problem with working with firealpaca last time was that i was doing it on the atlas sheet and a lot of it didn't line up right in the end when animated
but i can't figure out how spritepacker works even after watching tutorials
pretty sure firealpaca can be used
I don't actually know what it is beyond an art software, but I heard its name mentioned here and then
there
yes, i've used it to create a skin before, but because the sprites are all spread out across the sheet mostly independent of what animation they belong to, unless you can somehow manually figure out which sprite on which part of the sheet matches which frame in which animation, manually line them all up and check them... paste each sprite individually into a separate sheet to see if it's smooth, etc...
the animation ends up looking very choppy
the worst part about godump/spritepacker is the fact that it all works in your saves folder, which clogs up your cloud save space
oh, i don't... really care that much about that
i just can't figure out how to get it to work
Should I finish CustomKnight + for this? (Allows you to use your own spritesheet with your own defined texture sizes and positions)
...i would fucking love that actually
i wanted to make a sherma skin but the hat is too wide
well I know what I’m doing after school today
Sleep?
Yes and
I should probably figure out how to render stuff in the CustomKnight + editor first
Are you saying you can finish customknight+
soon?
Fyremoth beastiary sprites?
Uhh I think I’ll take Mulhima’s answer as mine
lol
Since @vocal spire isn't going to do it, how would I go about changing the bestiary sprites?
Changing every sprite from the journal list
(Instance)JournalList.list
You can look through this https://github.com/RedFrog6002/FrogCore/blob/master/FrogCore/JournalHelper.cs
ok
Is there a mod that allows someone to record their run and then play it back in engine like a "ghost" ? That someone else could race against ?
I mean I was thinking that technically multiplayer mods do the same thing but just real time right? So this might be feasible to do too, just confirming in case there's already such a mod
- record how long it took you to beat the game
- replay the game
- if it took you longer, you lose
Yes but in engine you could do something like rewind and re run against a speed runner as a practice tool.
Fair, and thanks.
I don't think it's as useful as you'd suggest unless you're purely ever running a singular route without variation. If you get too far behind your ghost, you'll lose it entirely and defeat the purpose. (Same for ahead) If you have to route differently, the same deal happens.
Maybe I'm just ignorant, I don't SR
for speedrunning you know where you lose time intuitively, and if you don't you have splits that tell you what areas you lost time
I mean ideally you'd be practicing a certain route , and doing it in engine with segments marked would mean you could pause /resume ghost from a certain section too right ?
i like the idea, but it's just honestly not very useful with how reactive this game is to rng and general responsiveness
I suppose this would end up being useful only for the truely beginners then
if you're truly a beginner then you'll either be so far ahead or so far behind of a given comparison that you wouldn't be able to see the ghost
there livesplit is just so much more helpful imo
ghost's ghost would probably just be annoying for people running more consistent, as there is then just more moving stuff on the screen
also; when you're starting out you don't want to reinforce bad habits or try to perfectly imitate godlike movement, you need to get that sense of intuitively knowing what you're doing without following something as a guide, unless you really dedicate yourself to optimising single segments as you start out. sr is not just "do these actions in a given order", you also have to react to being ahead/behind, making mistakes, etc
follow the pest ghost easy 33
Are you talking about making a kind of phantom speedrunner to follow
Or did I entirely misunderstand
no, it's about adding ponys to the game
I am now thinking it might not be such a brilliant idea after all.
My intention was to illustrate skips / routes with ability to slow replay what the other person does and then time against them individual section level.
If you had like a per room option you could avoid the desync
Oh I see, thanks
pings bad, redesign bad, upvotes to the left <-
Here I am wondering what pings have to do with dungeons and dragons until I understood
true
the way we currently do this is literally just:
watch person do room
do similar thing
repeat a couple times to get a feel for it in your own style
That makes sense, do people also record themselves to try to see why a certain skip didn't work ?
for example I had to realise by failing a million times that I kept fireballing way too early, for the skip to work
Or is that intuitive ?
either way I guess this mod wouldn't be much use based on earlier info you provided.
Ofc people will record themselves and review to help themselves improve. This is getting into #speedrunning territory though
Entirely unrelated question
is it at all possible to know which enemy has just damaged the player ?
^ I know that there's a hook to know which collider player just slashed, but what about the other way around ? Total noob question ig.
On.HeroController.TakeDamage
I see this in the api docs "public int TakeDamage( int damage )"
Is there an overload that would give me the collider / Go ?
Okay I'll check this once
If you do, please serialise recordings into files for sharing? 
ngl it would be pretty useless if it didn't
they call me it
Wouldn't that be the whole point lol
no, it's just so you can reflect on the dumb shit you did
A fun idea with this could be , you can pogo on your ghost.
So you do one pass of a level, play the recording and use the ghost to pogo and finish the level.
Might require making puzzle levels with this mechanic in mind but could be cool.
Maybe even timed levers that need to be hit by your ghost at the right time to let you pass through
( I don't think this is an original idea I think an indie game did something similar but I don't recall the name)
So yes, you could reflect on the dumb shit you did lol
You could even pogo on it ;)
italy, my algo isn't perfect
i hate unity
flood filling the left triangles resulted in the right filled 'circle'
i flood fill every triangle on its own
and the triangles look like they are ig?
possibly one flooded outside of it?
oh wait no
it fills everything outside if i slect an edge as the middle
changed that and still same result
sadge
oh
this triangle can't get correctly filled and just fills everything apparently
wait, let me zoom a bit
the 'middle', highlighted in red
close
gaming
what are you doing
drawing circles
i couldn't tell
continuation of this
oh i see
tldr: extract sprites out of a texture using UVs
and the black/white thing i made is a boolmap to indicate which pixels are important to the sprite
oh i was doing this at some point, tho i just ended up just cutting out rectangles and didn't do it properly
nice
should be everything needed, potentially also works faster than the old version
gonna @worn eagle as you use this
of course i get an NRE now
brb gonna block myself
who knew excessevily logging could lag the game
it's only 4.8 million lines
yea, don't even ask what i did
i wouldn't tell you anyway
Log()
yea, i logged to both apilogger and debug log basically after every instruction to then realise it was because i missed to delete some +minX and +minY
this should really be it
anyone know what might be going wrong here?
its super oversaturated
for context, sprite looks like this
My guess is post-processing is adding saturation
which is only apparent now because you're using such vibrant colors
Yes
is that an
axolotl
I think it is
Testing post processing with a completely red square yea whatever skin:
- dirtmouth makes it slightly less saturated (95%)
- same for the mantis bench you showed
example
What's the color you originally put?
Wooo red.
is there an existing tool based on js / html that renders sprite animations using the knight.png ?
need something of the sort for skin remixer
yeah 😦
i'll just have to write the bit myself ig , will look at spritepacker for the basics tho
last 3 rows left 
What are you doing? They look really wierd
i'm tagging all the eyes on knight.png
with quads, then the plan is to render a single eye.png into all the quads
Ok
so knight.png has 941 eyes (not including void ones)
hi I have a question for boss modding
I have downloaded the Inferno King Grimm project but I don't know where the code for Inferno King Grimm replaces NKG boss fight
fro example I know that this is replacing a boss but how can I say he is replacing NightmareKing Grimm?
figured out, was brightness settings to 115%
wait , I'll start with Ultimatum radiance, the code is a lot easier
Ikg might not be the best example mod, it was made very differently from other boss mods
they look pretty weird in game, because they're not animated perfectly so they move around (which kind of works for spiral eyes) but a bit of cleanup of the eye's coordinates should fix this.
To do that i'd need to implement an animation viewer in JS. with the ability to adjust the quad's vertices or add the function in sprite packer to render the quads and move them around, is sprite packer even going to launch on mac? i think it uses forms 😐
but overall the effect is pretty convincing. vessel skin maker might yet happen 
-
This looks amazing! Even if you aren't able to get a "perfect" version down, if end up releasing a program that automates the basics, and saves the results in editable layers still, then it'll make skin-making drastically more accessable.
-
In the spiral eyes image here, the two nights directly above the black circle ahead to not have their right eye marked.
-
At one point, I thought I saw someone mention that copies of the atlas files exist that indicate what each sprite is used for; you might be able to use that to now easily fix the misaligned ones, as you can just see what animation look weird the game.
yeah i need to go back and recheck once if all the eyes are covered might have missed more of them.
i was hoping if i was able to get the animation thing working then i could mark left eye , right eye separately at that point and deal with any misses.
this should now really be it, works on all tested ones (like 900 sprites)
where can I find the code dealing with picking items up off the ground? eg charms, some abilities
that is handled by playmaker fsms
so every pickup has an fsm?
ok, thanks
follow up, how would I get that fsm object? Not sure how to get the scene object for .locateMyFsm
(i'm using a scenechanged hook)
I'd probably loop over FSMs on scene change and just check the name
Can't think of a more efficient way to generalize w/out having a list of scenes w/ shinies
I might just be stupid though
2 options:
- hook
UnityEngine.SceneManagement.SceneManager.activeSceneChangedorUnityEngine.SceneManagement.SceneManager.sceneLoaded(i useactiveSceneChanged) then find your gameobject using eitherGameObject.Find(or with SFCore as a dependencyscene.Findalso works). Then you have your GO to.LocateMyFsmon - hook
On.PlayMakerFsm.AwakeorOn.PlayMakerFsm.Start, and if the name of the gameobject (or some fsm variables) is your wanted one, then execute more code
oh I actually only care about a few specific scenes, so I can just get the relevant fsms when the game is first loading
that's not going to keep your changes applied
unless the only thing you wanted was to read them
I only need to change them in a few situations, which I'll still use a sceneloaded hook for
getting changes applied is a challenge in itself with some specific fsms 🥴
is there a general rule for which ones are problematic?
Soul tyrant too I believe
you said loop over fsms, is there a list of all the fsms or something?
UnityEngine.Object.FindObjectsOfType<PlayMakerFSM>()
will that be only active FSMs?
yes
great, thank you both
Help
I need someone to help me with setting up my Virtual Studio
I don't know what is going wrong with my steps
What's the problemm
I follow the guide on https://radiance.host
Embrace the light. If you’re seeking empowerment through the light and love of the Radiance, you have come to the right place. If you are simply interested in our faith then we hope this will serve as a useful resource.
I add the reference of the project 'Hell Mod' just like what it says
Though I don't know if I'm doing it correctly or not
I click on Dependencies node and then add UnityEngine.dll and Assembly-CSharp.dll
If you've downloaded the example mod, delete all the references it currently has and re-add them
What build errors
Nvm I solved them
Does anyone knows what PlayerData.instance.MPReserveMax means?
The max amount of soul you can currently have?
the max amount of soul you can store in the extra soul vessels (33 if you have 1, 66 if 2 and 99 if you have all 3 extra soul vessels)
ok
hi
I have an error in the Pale Prince project
probably there is something wrong with MonoMod.Utils.dll or is something else?
_blackShot is GameObject class
Is .Child a function?
it is in Vasi
Ok. Are you missing the reference to Vado?
@fair rampart download the latest version from the mod installer
sometimes you just gotto retype the line and it works somehow
blackShot.transform.Find("Beam").GetComponent<tk2dSprite>().color
transform.Find can only find active gameobjects
I have tried
if this can help
Did you ever get the chance to do this?
checkout an older commit
refactored a bit of the code, trying out a couple of skins other than default one. skins with solid color faces are really good to erase eyes out lol
i may have screwed up a bit
but i do get to make cute cross eye pure vessel ?
smolnet needs a bit more cleanup to remove all the eyes from the base sprite before we can just add our own
As far as I can tell, the SceneChanged hook isn't working for me. I tested EnemyEnabled as a control and it works fine (using Log debugging). Anyone know why this is happening?
WOAH THIS LOOKS REALLY GOOD!!!
for some reason i can't get godump to dump knight.png even though i got sprint.png
Knight.png is pinned in #modding-discussion , fwiw
i was trying to make go dump work because i need the spriteInfo.json that would tell me how to animate the png
i got knight.png now, but no sign of the json file
I can send it to you if you want
Well, when I get home, in like 40 minutes
You use the Krita version, right?
Thanks, I'm going to try to make it work till then!
I'm not sure what versions exist tbh
There should be only one json right ?
Or did you mean knight.png ?
Afaik, the json is generated by the modified Krita version
The other version doesn't generate it
The GitHub readme said it would generate one
the krita version only generates additional AnimInfo.jsons in each animation folder
Would the original json have the information required to animate the sprites ?
Or is it just positional information to recreate the Atlas ?
what does it mean when a sprite has sflipped = true ?
i think sflipped = true are the ones i'm not able to make a bounding box for
seems to work now, but what is sxr & syr ?
is it like padding when trying to align images for animation ?
omg yass
How might i be able to re-enable hitting enemies if I have 0 nail damage? I want collision feedback to exist
With 0 nail damage you can still hit enemies and get feedback afaik
what's the best way to completely stop/disable an fsm? should I just delete all events from a state and make finished loop to itself?
woww
Is the recolor automated too?
Aw hell this is beautiful
Yes the recolor is automated
It is, a bit behind local but it is on GitHub and GitHub pages
Where? You got a link?
pages seems to be down, but here's the repo https://github.com/PrashantMohta/HollowKnight.SkinRemixer
you'll need to serve the files over an http server for it to work, locally as well.
Thanks
is it normal for "026.Hit Crack Appear" to include crystal shards ?
for some reason i have these
dont think so
i mean, the knight zip in discussion also includes those
yeah but they are only used for Cdash
even the godump i'd run on my laptop had those
here
It’s a unused animation iirc, was talked about in #modding-discussion before
that makes sense i guess
i still don't really understand how to use sxr & syr from spriteInfo.json , and most of my animations where the sprite size changes are still wonky. i think they're related.
godump readme says this very suspicious line : v1.3 Add setting SpriteSizeFix.Cutted empty space of a sprite in an atlas by tk2d tool is now added back.No More Worry About Where The Fun is The Anchor!
what's suspicious about it
yes yes, fixed it
that i might need to do something about that space too if i want to extract and play animations from atlas
for some reason, aligning each sprite to bottom right corner fixes things 
dandy what is this
i just spent like 15 hours making a video how how to make a knight using spritepacker and stuff

i mean, what dandy makes looks more like picrew for skins, the base parts still have to be made manually
and it's quite a long ways off at the moment
I’ve come to the realization that I need to finish CustomKnight + soon or I will get too many ideas
turns out certain sprites are still not playing nice with the animation 
I don't even know if the animations are actually fixed or am i seeing things.
In case someone is willing to give a second opinion , please see the animation previews under advanced tools.
can someone make a mod where grubfather doesnt eat the grubs? i wanna get all of them but i also wanna keep my free serotonin when i walk into the room (yes i know its a metamorphosis and they dont die but i like walking into the room and seeing them)
does anyone know why spritepacker might be doing this
this is the idle animation, it was working fine previously. haven't touched it. all of the other animations are fine.
but its doing this weird thing where it's cutting off the edge of my sprites and duplicating it on the left
it looks fine in the spritepacker preview
what part of it? like the position of the frames? any specific animation that looks wrong?
Is that supposed to be a custom Knight maker?
I don't have a save file with all grubs freed, so I can't properly test this, but I think this will work
:D
just tested it and it works!
I like this skin.
0 nail damage doesn't hit levers, destroyable objects and background, or give soul from enemies. one of the main things i want to re-enable are collisions with shields. Hitting the shield of Great Shield Zombie should cause it to counter attack, but with 0 nail damage, this doesn't happen. I want the interactions of 1 nail damage to exist for 0 nail damage, and it's strange this is a "feature" in the first place.
i guess a question i can ask is what happens when nail damage is -1?
i may end up setting nail damage to 1 and then giving the enemies 1 hp back after the hit. Functionally, it may allow me to do a few other things I was hoping to do :)
Yes the position of the frames, last I was checking 002,081 , 101 & 145 were not aligned properly ideally the knight should remain more or less in the same position if I understand correctly
A simpler tool to let people customize their skins, not really a full blown maker but something that should make it easier to prototype new skin ideas and also to make skins for people with limited art skills
is that an axolotl skin
Maybe this is might fix your problem
pyramid
ok
hi
If I want to get a gameObject (for example "Radiant Spike") where can I find all object names? For example the nail of hornet
its on the installer
This is modding-development
hollow point
oh yeah
I have a question about DamegeHero on different gameObjects
this will double every damage (exept the needle when is thrown by hornet).
But for the nail needle this is not working(commented code). I think that this is not the correct way to change damageDealt of the nail
You might need to get a reference of it from hornet’s fsm
Thanks I'll try later
the strange thing is that if i decomment the code , hornet does always 1 damage , even contact damage
it's probably throwing
contact is never assigned to and thus null
and the needle has a decent change of being null as i wouldn't expect it to be a root object
I noticed that _contact_dmg is working only if it is alone in the code, the foreach looks works fine, but if I try to activate also the needle the foreach loop doesn't work any more
while _needle_dmg never works
That’s probably because of what 56 said
ah so being root it replaces the previous one
my linux mind: WHAT?
the ones you listed here look mostly right
you can tell on the ones that the knight is mostly still that the frames are moving around a little bit, but it's pretty close
but things like loop points and framerates seem to be missing
What're loop points ?
And yeah I've not incorporated framerate yet
This comparison really helps ! I think it's like a pixel or so of movement, I remember seeing a -1 in spritepacker somewhere I'll try seeing if a certain case needs that shift
loop point is when it doesn't loop back to the first frame like in this animation (170.Collect Acid)
Is this in the individual animation's json ?
I don't know, I'm not using godump
I'll check once brb
seems to be called loopStart or something
Yep it's there
{"animInfo":{"numFrames":17,"fps":12.0,"loopStart":8,"collectionName":"Knight"}}
Question:
In Visual Studio, I'm getting an error whenever I try to open a form from Mod Installer that says that I'm missing system.windows.forms.form.centertoparent. As far as I can tell though, that's part of .NET 5.0, which I do have already, according to the installer.
Is there a way to either update that, or somehow get the missing component?
The winforms in .NET 5 is not the same as the winforms for .NET framework, which I believe MI is based on.
I'm about 60% sure since I haven't attempted to do anything with MI from source. Make sure you have the appropriate .net framework version installed as well.
designer brokey for 3.5 framework i believe, just press f7 to go direct to code
For future reference, what do I need to look for in order to know what "the appropriate" version is? Or do I just have to have it's documented someone?
the .csproj contains the version of .net
Check the project's .net ver...
Yes. 🙂
(Right click project in VS -> properties, fwiw)
I fixed the position thingy, added loopStart and fps , but now the animations seem too fast to me lol they look similar to this though.
( fps is target fps it might run slower depending on the hardware and browser)
if it's all possible could you check once if it looks about right ?
looks fine to me
depending on the hardware and browser
speaking of browsers, I don't think the editing/generating part works in firefox
ReferenceError: OffscreenCanvas is not defined 21 offscreenworker.js:32:20
generateSkin https://prashantmohta.github.io/HollowKnight.SkinRemixer/js/offscreenworker.js:32
onmessage https://prashantmohta.github.io/HollowKnight.SkinRemixer/js/offscreenworker.js:19
it'd require changing a flag in firefox i guess.
From version 44: this feature is behind thegfx.offscreencanvas.enabled preferences. To change preferences in Firefox, visit about:config.
https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas
ok it's an experimental feature and not enable by default
i mean it should be easy to check for it and if not available do everything on main thread
yeah, i think i'm going to go ahead and add support for doing things on main thread
I don't know if I nedd to get reference to hornet needle when is thrown if I have to use needleObj=GameObject.Find("Someting"); or another method
Hornet’s fsm probably has a createObject or something in one of her states, should give you a bit of info
I'm looking in GG_Hornet_2.txt and for example in StateName: Throw I find ActivateGameObject (GameObject) = Needle
@dark wigeon it should work on firefox (as well as any browser that supports canvas but not offscreenCanvas) as well now.
yes it's working now in ff
I can't believe Firefox for Android only lets you pick from like 8 colors what a joke
it must have an option to bring up a slider ?
not on android it doesn’t 💔
Even chrome by default gives only 8 but allows one to add any color
i could add a box for entering the hex-code for such a case, but how likely is someone to use this on a phone ? considering that to add any assets of your own you'd need the files on your phone already?
doesn't discord delete the images from deleted messages?
but on the topic, firefox windows pc lets you choose any rgb color
Certainly not instantly
https://cdn.discordapp.com/attachments/327461802311155714/843965272082612265/unknown.png
So, it's just slow to do it
If anyone saw it it doesn't really matter
It's in the cache
You can straight up take it out with like very little effort
ctrl+f5 didn't work, but other topic
idk why this ugly ass looking thing was never updated (ofc refering to the windows colour picker)
i think ff just always uses native picker
ff on mac also has an ugly but different picker
i was going to use emojis as the play pause icons then i remembered windows didn't support nice looking emojis last time i was using it. is that still the same ?
it supports emoji but they do look like this unless you add twimoji ig
i guess that's still better than using angle braces
This is specifically what those ones look like:
i'll use emojis for now then, if it becomes an issue i'll swap them out for images
press the font awesome button
consistent across devices and very easy to use generally
true, would also impact load speed. which i anyway need to improve.
loading multiple knight.pngs at page load is not good for me , i will probably end up requiring that a base sprite be provided by the user even if they intend to use default knight.
and give them a "part erase" option that allows them to create a blank version of their base sprite
https://blog.mozilla.org/ux/files/2013/12/mob_cpicker.png they teased the advanced button in 2013, 2021 and still no button .-. https://blog.mozilla.org/ux/2013/12/a-new-colour-picker-on-firefox-for-android/
don't worry about implementing something to manually pick, I'm just ranting
is there a guide of any kind on UI stuff? or should I just copy paste code from rando recent items or something and try to make it work
Pls keep ideas to #modding-discussion
Is there a way to check if another mod is loaded?
i'd on instinct say "see how serecore does it" but iirc that just checks whether the dll is in the folder
Type.GetType
you can check in :(Hollow Knight Folder)\hollow_knight_Data\Managed\Mods if there is some .dll file of a mod
doesn't work with some twp packs
Also doesn’t work for Mac iirc
Could you not make a conditional statement to check if the Mac equivalent folder is present first?
why would you check for files when you can check loaded assemblies or types
it's literally more effort
that's because people don't know what loaded assemblies are
I think the type stuff is better
how do I store/retrieve information in the currently loaded save file?
I need to display stuff on screen, should I just steal code from rando mod or something? docs are still todo it seems
What exactly do you need to display
ideally two smallish images
could make do with text, at least for now
(two at once from a list of 20 or so)
soo.... are there resources or even simple example/commented code or am I on my own?
Code from rando is there to be stolen 💪
code from rando does way more than I need it to and has like a million classes that all reference each other 
(and also uses serecore which I'd like to avoid)
yeah you don’t need them all, just find whatever you need
i am sure you know how to read code
(It says it uses RandomizerMod.Randomization but it doesn't for the bit you care about)
ok I think the main thing I don't know is how to get a sprite object with an image
rando uses serecore stuff
You could look at what serecore does if you want?
For some you might just be able to get them from where the inventory gets them from (instead of embedded resource in the dll) but IDK
I'm super out of my depth with serecore
whatever, I'll make it work
lmfao why is this here
Because sometimes the rando mod needs to show you a geo icon
in shops you mean
Why does debug mod throw a invalid scene error when opening the enemy up menu during the radiance fight?
using the On.JournalList.BuildEnemyList and csharp public static void PacthJournalSprites(On.JournalList.orig_BuildEnemyList orig, JournalList self) { for(int i = 0; i < self.list.Length; i++) { Fyremoth.Instance.Log(self.list[i].GetComponent<JournalEntryStats>().convoName); if(Dictionaries.JournalNumbers.ContainsKey(self.list[i].GetComponent<JournalEntryStats>().convoName)) { self.list[i].GetComponent<JournalEntryStats>().sprite = journalBundle.LoadAsset<Sprite>(Dictionaries.JournalNumbers[self.list[i].GetComponent<JournalEntryStats>().convoName]); } } orig(self); } I'm trying to replace journal sprites, but they don't show up
well, it's getting wierder and wierder. When logging all the assets in the bundle it says the sprites are in it, but when checking if it contains the sprites it returns false
anyone?
you have the sprites in the bundle as numbers? 
no
they are all spliced from a texture
public static void PacthJournalSprites(On.JournalList.orig_BuildEnemyList orig, JournalList self)
{
for(int i = 0; i < self.list.Length; i++)
{
Fyremoth.Instance.Log(self.list[i].GetComponent<JournalEntryStats>().convoName);
if(Dictionaries.JournalEntries.ContainsKey(self.list[i].GetComponent<JournalEntryStats>().convoName))
{
Fyremoth.Instance.Log(journalBundle.Contains(Dictionaries.JournalEntries[self.list[i].GetComponent<JournalEntryStats>().convoName]));
self.list[i].GetComponent<JournalEntryStats>().sprite = journalBundle.LoadAsset<Sprite>(Dictionaries.JournalEntries[self.list[i].GetComponent<JournalEntryStats>().convoName]);
}
}
orig(self);
}```
this is it now
You should specify exactly the name that was in AssetBundleBuild object, that is the object's relative path with the file extension.
https://docs.unity3d.com/2017.4/Documentation/ScriptReference/AssetBundle.LoadAsset.html
idk if you did that, otherwise i have no idea
how would I do that for a sprite? Since there are a lot of sprites in the texture
idk, never worked with multiple sprites per texture
ok
I got it. I just use a SpriteAtlas object now. I didn't know that those existed
public static List<Vector3> PlayerPos;
public void Update()
{
Vector3 position = HeroController.instance.transform.position;
PlayerPos.Add(position);
}
i dont know why but when it tries to add to the list it gives a NullReferenceException
because you didn't initialize the list

public static List<Vector3> PlayerPos = new List<Vector3>();
@light zodiac
i feel stupid now
your mom didn't forget
That gives a compile time error. Not a runtime error
That too
?
I think so
huh
before that it didn't really do much
also do mods work in public beta i wonder
88% sure it won't
ok
it doesn't




