#archived-modding-development
1 messages ยท Page 51 of 1
because it's just removing hooks usually
what's the White Key?
NG+ is now a safe way to get to menderbug's house
w/out killing him
why tf is there so much stuff
I didn't realize there was so much stuff you get
you could always run the setup new player data function
and just save what you want
that's what I'm doing
I run the reset function
and then rewrite all the stuff I want
Guys what does player stat tracker do?
Ok
iirc it's for OBS streams
where do i find the stats now/
for like overlays to see what you have
lol, yeah, mods shouldn't be in that menu
or
at the very least, the on/off toggle shouldn't work, i suppose leaving the menu there could be nice in the future if mods wanted to enable options
// WTF Map
PlayerData.instance.hasMap = true;
PlayerData.instance.hasPin = true;
PlayerData.instance.hasPinBench = true;
PlayerData.instance.hasPinBlackEgg = true;
PlayerData.instance.hasPinCocoon = true;
PlayerData.instance.hasPinDreamPlant = true;
PlayerData.instance.hasPinGhost = true;
PlayerData.instance.hasPinGrub = true;
PlayerData.instance.hasPinGuardian = true;
PlayerData.instance.hasPinShop = true;
PlayerData.instance.hasPinSpa = true;
PlayerData.instance.hasPinTram = true;
PlayerData.instance.hasPinStag = true;
why does map have so many annoying pins
tfw there was more
hasUpSlash is true by default
right

actually might be great slash
It just replaces the current 1.2.2.1?
ยฏ_(ใ)_/ยฏ
tfw
NullReferenceException: Object reference not set to an instance of an object
at NewGamePlus.NewGamePlus.OnSceneLoad (Scene dst, LoadSceneMode lsm) [0x00000] in <filename unknown>:0

VS didn't complain
tfw
it was the boss reset stuff
VS not complaining is pretty normal, Just because it compiles, doesn't mean it will work
NRE's are also a pain to track down
PlayMakerFSM[] components = GameObject.Find(bossData[item.Key].Value).GetComponents<PlayMakerFSM>();
if (components != null)
{
foreach (PlayMakerFSM playMakerFSM in components)
{
if (playMakerFSM.FsmVariables.GetFsmBool("Activated") != null)
does any of this look like it could give a NRE
GameObject.Find could return nothing, which would cause GetComponents to fail
and playMakerFSM.FsmVariables could be null
item.Key could be null i suppose
layman's way of figuring it out: try catch the whole thing
nope
when i've run into it
i've done
Log.Debug(1);
and then just scattered those with different numbers trhough the method
until i find the # that happens just before the NRE
we have a pro here
I started doing that
except then I realized that my Log didn't have a semicolon
and I left out part of the code
so I wanted to try just pasting that part in
I tried to figure out how to let it load pdb files for mods so that you could get the line numbers in them
but that ultimately just broke stuff
Help, I installed the latest API, now it doesn't say I have any mods in HK
which version did you install? 1.2.2.1?
check the ModLog.txt
^
does the game even launch at all?
meirl
what tf is that error
debug mod i think
bad reflection?
which is weird
but it's weird, cause the mod loading is supposed to be contained
to prevent one broken mod from breaking another
I updated the API before the mods, might be the reason?
could be, still, it definitely is a bug
it should have said that it failed to load just the 1 mod
it should not have broken all of them
unless he's only loading 1 mod?
Nop i have other mods
Kek
if anything's breaking, I'm pretty sure it's my fault
I've had MoreSaves break all the other mods kinda
it would remove the text in the top-left
but mods would still work
@fair rampart try going in game
mods might still work
earlier compilations of Bonfire would also break the text, because of how IMGui works
I opened the game after disabling all of them, it says api in the corner, now ima put them back except moresaves and blackmoth
inb4 it's my fault
@fair rampart G O I N G A M E
imo
like in a save
also moresaves breaks things iirc
Oh ok
@fair rampart try this moresaves
I compiled it earlier today when my moresaves wasn't working post-api update
does blackmoth even use reflection...?
I literally haven't touched the code in like three months
foreach (Type type in Assembly.LoadFile(text2).GetExportedTypes())
so one of the mods is at fault
yeah, still weird that it breaks it though ๐ฆ
yeah... For it to break the whole initialization flow
cause that entire foreach is wrapped in a try/catch
I always get the weird glitches, kek
as for health bars I could probably implement this for every boss in the game in a hour at most
ok so, i put back all the mods, but instead of the old moresaves im using the one 56 gave me, now it has all the mods top left corner
we have a culprit, your honor
oo
nice!
dunno if you'd want actual numbers on the health bar though
hm... Maybe? Shouldn't be that useful tho
i would say for now, no
^heh
fail early
0 comes before 1
oh
this line breaks
your code is fucked then
for (int i = bossData.Count - 1; i >= 0; i--)
hah
fuck
is bossData initialized ๐ค
no
pro
how should multi part bosses be handled
last hit or all of them
i.e. mantis lords
hm... How about a separate bar for each one?
mantis and WK
stacked on top of eachother
5 would be too much
WK should be the 2 active ones
I'd just split the one tbh
same with mantis
where do we have 5 active bosses?
you don't
oh
but WK has 6 in total
ok then
yeah
so, really, you never need more than 2
I was trying to remember if Shadows of Yharnam is separate hp bars or not
but O&S is


lol
WD is the only boss I can fight anyway
didnt' feel like making a new save to get other bosses 
I prefer the smaller bars with possibly a little spice between them
and probably need to pick some darker/moodier colors 
the bright red/orange is certainly eyecatching, but probably not quite HK style
dank could work too ๐
darker red?
suppose it doesn't have to be gradient
#521012 might work as the color to use on the low hp side of the gradient
this is
#600005 and #5A0F2B
i like the colors
where white dots would be start/end/phase
hmm
its pretty low effort to make it load 4 images and use them as the sprites for the bar
one for bg,
one for fg,
one for outline,
one for phase markers
k, i think, maybe, i know why the mod text thing broke. added another try catch in another place, hopefully will prevent that from happening
Modding API 1.2.2.1-31 - (Beta) - Adds catching to hopefully prevent a failure in the version check for a mod from causing the text in the upper left hand corner from not showing for other mods.
btw the upper left text is unreadable at low resolutions
I'm at 768x480
Maybe there's nothing that can be done at that point
Same over here, but i just resize back to big to read text then go back to small
768x480, I didn't know that was even possible
It's called, WiNdOwEd
to each their own i suppose
that's too small for me to see
i wouldn't be able to see where i was at ๐
When i play normally i usually play on higher res, but when im doing stuff like rando and speedrunning its really low res
I changed my resolution and the game felt so much more fun
This is after watcher knights with 18 fps
That was a sad time
what
Don't really want a desktop
:O
I don't know if there is a way to scale the text or not
30FPS over here too, and i have 3GB and intel 2 duo
HOW
was trying to get my sister to play
25ish in areas with not much
then 30fps happened
Fungal wastes, more like, lag
I feel bad a little now, 200+fps in game
me too ^
;-;
Watcher knights, more like 30 tries because those infected flies are so hard to render
oof
And now my resolution is 768x480 and the game is fun
It was fun before but now it's better
Can you mod in some more fps at higher resolutions? Thanks
could you mod it so it doesn't render a load of stuff
like the infected flies and such
Can I just not render anything but enemies
Back to black squares
The reason I switched was I was fighting ngk and I realized that the game has been unplayable for as long as I played it
oof
you can scale the text
Didn't get past first stagger
it looks like shit though
As long as it's readable
why does it look like shit
not really
changing font size isn't the same as scaling it
trajan pro looks like a blob at 5pt
and everyone who has seen it has said wtf how do you read that
looks good
CharmNotchMod: 1.1
RandomizerMod: 1.5.1 (XML Version 1.3.1)
not even hard to read
well that was way faster to get rendering in game than I expected
Guys help, rando says update available, I downloaded rando from drive, still says need to update
Some day
ooh is text fixed
uhm, i didn't do anything to the text, how'd you fix it?
https://gfycat.com/EthicalImmediateErin works somewhat
needs to work on none nail sources and actually go to 0 
sweet
nice
i'll be glad to test it out via boss rush
ooh that's really nice
level editor when?
@leaden hedge i think that there can be 2 ways for making this more informative: 1st is make HPbar for full boss HP. 2nd - make phase marker same as in Furi
There's a problem with that
FK doesn't have all its hp at once
Every time you stagger it it gets a new hp bar
It's not like it has x hp and every time it takes x/3 damage it staggers
It only has x/3 hp
Also, it happens as often as you want it to, nor only 3 times
If you have a high enough damage output you can keep staggering it forever
So I really think it's fine as it is
Actually, more than fine, it's awesome
it looks awesome
How about making it infection colored?
How about making it infection colored?
or SOUL colored
because that's what leaks when you hit enemies
api mods are supposed to work together right?
yes
they dont
I tried using more saves ontop of randomizer
boss rush takes priority
but it doesnt seem to be working
weird
@buoyant wasp whenever you get spare time, can you make OnGetEventSender return the FSM it was called from
i think it also is missing the "IsCurrent()" method
hmm Hollow Knight has some quality coding
every single attack is a different gameobject ๐ค
should work for every boss in boss rush except THK
(only updates when you hit them with a nail)
if / when OnGetEventSender sends the source FSM with it, i'll make it update with all damage sources
yeah, i should be able to add that tonight after work hopefully
so you want it to be the value from Fsm.EventData.SentByFsm?
should just be this.fsm
so it'll send the health_manager_enemy
https://github.com/seanpr96/HollowKnight.Modding/blob/master/Assembly-CSharp/Patches/DRM/GetEventSender.cs this is what calls the hook now and how it's getting the GameObject
so I can modify it to pass along the Fsm value too
if (flag2)
{
ModHooks.Instance.OnGetEventSender(this.sentByGameObject.Value, this.fsm.FsmComponent);
}
is what I think it should be
wish i knew if any mods were using that hook
cause really i'd rather just update the hook, but if i do that, mods that use the old version will break until they change their method signature to expect the 2nd parameter
eh, bonfire is broken anyway
mostly just need to check randomizer and bossrush
k, seems easy enough. i'll try to do it tonight
Randomizer doesn't use that
Well, last time I checked, bonfire didn't either
Unless you added it to fix spell damage, Wyza
lmao
@fair rampart search from:56#1363 has: file
compiled the newest version from KDT's GitHub and it works
Aight will do in a min
@fair rampart
Just in case, just tell me what the other parameter type is and I'll change it in bonfire as soon as I get home
it'll be PlayMakerFSM
how do you do mods
install the API for all mods that aren't lightbringer or glass soul
then put the mod in the mods folder
there's a video in pinned for boss rush except
you can replace boss rush w/ anything else
I have the debug mod in my mod folder but it doesnt work
the installed mods should show up top left of the title screen if they're running
if they don't show up, then they're not installed right
so I put the api in the hollow_knight_Data files?
the files are set up the way they need to be
just drag and drop
the folders will nest the files in their proper location
what version you running?
MAC? PC?
what game version?
you download the proper version?
and you copied the "hollow_knight_data" from the API download?
and pasted it in the same place that "hollow_knight_data" is in the game files?
it should ask if you want to merge and overwrite the files
for me the api files are named outputfinal
open that
you doing steam version?
just verify game files
will take less time
there's also a video in the pinned messages
shows exactly what to do
ok thank you 
Modding API 1.2.2.1-32 (Alpha)
-Changes OnGetEventSenderHook to now have a signature of OnGetEventSenderHook(GameObject, PlayMaker.FSM).
@leaden hedge - Try this, might work, might explode.
wtf
help
I "have" mantis claw
and can get onto the wall
but then I can't climb it
assuming you've already looked at the debug mod's code for this?
uhhh
checked now
it's the same as mine
and giving myself claw with debug mod didn't do anything
still weird
So is -27 the most recent, stable version of the API
it just randomizes everything
there is a button "log randomization"
it means you save your seed for later
if you want to use it again
and with that seed
all the items are in a specific place
with others they are in different places
The log randomization generates a txt log for that specific seed
So if you wanted to see where things were placed, you can
In your saves folder
Where the game saves stuffs
Each randomizer seed you start is tied to that specific save file too, so you could theoretically start 4 new files and the randomization seed would stay in each file
If you wanted to bounce between them for some odd reason
Modlog.txt
%appdata%...locallow/teamcherry/hollow Knight
it's not in %appdata% for me, it's just in appdata
If you put the % in there, it ignores previous file paths or something
I can't remember exactly
Sure. That
e.g: %localappdata%
and before going into the trial and error
i saw there are some little changes
example with the location of vengeful spirit
the mob won't curl to avoid softlocking the run
are tehre any other changes like that?
Yes
Benches are taken away, some platforms are added
Just little things to prevent you from softlocking
The rooms will be normal if you have the intended abilities for the areas tho
So really, you probably won't notice a difference
ok thank you, i want to learn something before try the race saturday
not like i'm trying to win but at least i want to partecipate with consciousness
The guides page on SRC has the randomizer help tool too
Really helpful for telling you what items are possible with your current items
do you mean https://rainingchain.com/hollowknight/randomizer?
That's the one
yep thank you so much
gonna dive in that run
the idea after i have enough items is to any% the game
right?
enough items to reach the dreamers i mean
Pinned messages
Failed to reset boss with key: Ruins2_11 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Fungus3_23 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Mines_32 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Mines_18 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Deepnest_32 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Crossroads_10 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Crossroads_04 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Crossroads_09 and value: [True, Battle Scene]
[INFO]:[NewGamePlus] - Failed to reset boss with key: Ruins2_03 and value: [True, Battle Control]
fail_irl
lost kin and broken vessel got reset tho ๐
all the battle ones fail
is bonfire still broken?
sigh
look, I'll be on vacation next week and then I'll have alllll the time in the world to fix whatever it is that's wrong with bonfire
just don't quote me on that
thank you everyone for your time, expecially @young walrus you helped me a lot, everything works fine, gonna go to sleep, it's really late in europe
some fun
or rather, may require
not entirely offtopic, but also not entirely ontopic
what are the chances of us seeing a rando race on a future GDQ?
Pretty close to none, I would imagine
would be pretty nice
It's possible. The precedent is there now.
Can someone make a mod that changes the player model to grimm or changes the base model's mask black with glowing white eyes like it is when you use shade cloak
you can
No you don't get it
He clearly requested someone else to do it
Because he's a lazy piece of shit

i dont know how to make mods man
i just thought it would be cool because i really like grimm's design
i dont know how to do that im really new to all of this kind of stuff plus i dont really have time i only have about 30 minutes to do stuff every day because of work and semester finals
how do I begin using the hk randomizer
modding dll?
its in the drive
@buoyant wasp doesn't seem to work
/// <summary>
/// Called whenever game sends GetEventSender.
/// </summary>
/// <remarks>HutongGames.PlayMaker.Actions.GetEventSender</remarks>
[HookInfo("Called whenever game sends GetEventSender. ", "HutongGames.PlayMaker.Actions.GetEventSender")]
public event GameObjectFsmHandler OnGetEventSenderHook
{
add
{
Logger.LogDebug($"[{value.Method.DeclaringType?.Name}] - Adding OnGetEventSenderHook");
_OnGetEventSenderHook += value;
}
remove
{
Logger.LogDebug($"[{value.Method.DeclaringType?.Name}] - Removing OnGetEventSenderHook");
_OnGetEventSenderHook -= value;
}
}
private event GameObjectFsmHandler _OnGetEventSenderHook;
/// <summary>
/// Called whenever the FSM OnGetEvent is ran (only done during attacks/spells right now).
/// </summary>
internal GameObject OnGetEventSender(GameObject go, HutongGames.PlayMaker.Fsm fsm)
{
Logger.LogFine("[API] - OnGetEventSendr Invoked");
if (_OnGetEventSenderHook == null) return go;
Delegate[] invocationList = _OnGetEventSenderHook.GetInvocationList();
foreach (Delegate toInvoke in invocationList)
{
try
{
go = (GameObject)toInvoke.DynamicInvoke(go, fsm);
}
catch (Exception ex)
{
Logger.LogError("[API] - " + ex);
}
}
return go;
}
and GameObjectFsmHandler is this
public delegate GameObject GameObjectFsmHandler(GameObject go, Fsm fsm);
i've seen VS cache things like this before, sometimes have to do a build clean
looking at in dnspy its correct
so its just your IDE that doesn't like it?
seems like it
close/reopen the IDE?
nuke it from orbit?
apparently sometimes closing VS, deleting the .suo file (not the .sln file), and reopening it fixes it
done that still doesn't want to work, went and installed another IDE
that didn't work either
@buoyant wasp
hmmm
but why...
the event isn't using that handler
it's using an entirely different handler
nice
works now
unrelated is there a way to disable stack traces on the ingame log
other than fixing my code 
lol
you mean the one that shows up on screen?
no, it's just intercepting the write calls to ModLog
yeah, honestly, just best to do a try catch around it and eat NREs. you could always then just spit out a single line in the log saying there was an NRE
though with oncollider, that itself might be spammy
seems to work on most damage sources
false knight head is broken, and failed champion values are wrong
You should probably add a special case for Radiance if you haven't
Since he's got 3k but dies around 1.3k for no reason
Does it even go down during that?
I could probably just do maxHP = 1700, and then do if( radiance ) hp = bossFSM.fsmvariables.getfsmint("HP") - 1300
to make it look correct
Did rando get updated?
Does debug mode show hitboxes enemies and switches?
I'm not sure but there was an option to disable hitboxes
I'll have to check it then. =)
Would be nice if it was possible to get visual "position boxes" for when enemies appear to learn dodge patterns. i.e. Soul Twisters and smililar
agreed
I think that KDT had once looked at the hitboxes thing, but it ended up causing really weird behaviors
i think there was something odd with it causing the stuff to be shifted on collision or something weird
Yeah, search for "from:KDT#7539 in:#archived-modding-development hitboxes" and look for results in October
@rain cedar randomizer permuted isma's tear to isma's tear, but picking it up didn't give the item (acid immunity effect didn't work, didn't appear in inventory) until save+quit
Isma's tear doesn't work in the room you pick it up in
In randomizer
Small enough bug to not matter too much
with the debug mod can you give yourself all the soul vessel things?
don't think so, but don't think you need to either with infinite soul
ah
and if I wanna be able to use 8 fireballs per section
without looking like I'm cheating that hard
I wanna have all the vessels
you could just go grab the save file for 106%
good point
wait
is that possible?
I mean, skipping the dash sections in PoP using fireball
I thought those were not wide enough to do that?
so i 100% hollow knight and now i wanna try this lightbringer mod everyone is going insane about but i dont see it anywhere on the steam workshop. Can someone link it to me?
it's in pinned messages here
it's in the pins of this channel
HK doesn't have Steam Workshop support
probably never will
play lightbringer
oh neat
just don't complain about muzznik please
I want to go into playing modded, but I gotta get the rest of my achievements first
oh, speaking of which
I was thinking about dismantling Bonfire
in an attempt to make more "modular" mods
that you can just combine to make a "full" mod
hmm
what parts of bonfire could you break out that would work well by themselves?
I would remove everything that's not directly related to the levelling system and its functionality
oh speaking of hp bars I meant to upload source
like, boss rewards
but my pc blue screened and I went to sleep
That would be great
for regular enemies, debug mod does it
sounds like a mostly fully functional prototype
Not for first playthroughs, but for later ones where you just wanna push through
every boss except the last one, lol
cause this game's code sucks
^
failed champion uses a different health manager and it broke my code to get max hp values
and they can't use the same methods for everything like a sensible person would
Well, it was made by like two people
two non-programmers
it's a fun game, no doubt, i wouldn't be modding/playing it if it wasn't
doesn't make the code suck less ๐
like the actual name of the game object changes for every move
which I don't even understand
also, does the mod now track damage sources other than the nail?
yes it tracks everything
This game wasn't really intended for modding, I think
nice
That's why the code is a mess
very very nice
no, the code is just bad, modding or otherwise
the code is a mess b/c they're not programmers
^
they just wrote something that kinda worked
its extremely hacked together
They aren't programmers, but they programmed a great game
it's why they have to rewrite it all to optimize for Switch
yup
like literally bringing in outside help to optimize it
Give em a break
^
i'm not being mean about it
and that's why I was really excited about the switch port
it's a great game
Their first game was a flash game rated 1 star
it's terrible code ๐
like we said, it's a great game. just messy code
but they're not programmers, which is why it's a mess
So any code is an improvement
No you guys you don't understand
and it's also why Switch porting is taking so long
It's a good game so you can't critique it
lol
lol
Jerk
This game wasnt intended for modding
So for you idiots to come in and whine about the code?
That's low
Dude it's bad code regardless of mods
the game is full of bugs
that's entirely not the point
because its badly designed from a code point
^
almost every bug + glitch in this game is due to their bad code
so its not just modders it affects
Lmao this guy
ask graig
lol
What a fucking fanboy
he'll even tell you the code sucks massive dick
yeah, even graig said it's a mess
this company is the best, don't critique it BabyRage
Graig knows of our pains
shrugs sometimes people don't like hearing facts
I've spent the entire day being attacked for something out of my control, so I'm in a bad mood
I'm sorry I lost my temper here
But you guys need to cool it with the disrespect
lol. we're not disrespecting anything
think of it like this
well i mean, you did call them idiots, so i feel like they're allowed to disrespect
what do you want us to say about the state of the code
if none of us liked this game, why would we even go to the lenghts we go to mod it?
literally from TC, like, i don't know how much more explicit about them understanding the state of things
I didn't say the code was good
Sean, Wyza and KDT have done some truly herculean stuff to make mods work
not sure where the misunderstanding here is then. cuz all we've said is the code is messy
I was trying to say it was very impressive that two non programmers made this game
^
I played 37 hours casually
it's impressive. and great. but still messy.
Didn't notice a single bug my first run
I've probably put in 300-400 hours into the game in the last 6 months
to show how bad this game is coded
this basically subtracts 2 numbers, plays an animation and sound, and spawns geo and a corpse
those things aren't mutually exclusive
its about 30 lines of code to create in pure csharp
as a product and playing it casually, its amazing for a game made by 3-4 people
this is basically the same feedback Joseph Anderson got with his critique of the game - he loved the game as a game, but had to admit it was lacking as a narrative
and people just got MAD
It has a great narrative, tbh
but its bad coding wise when you get into modding or even playing the game for a lot of hours
the bugs just show themselves
yeah. when you've played and messed with the game for 600+ hours... you see stuff
prior to 1.1.1.4 it took a second to load the main menu
even though thats just making something visible
should take a frame at most
so yes, we're gonna whine about it sometimes
And they're fixing their code too
they are
alright when they've done that
many bugs are now gone
like 
we gotta blow off the steam somehow when we spend 3,4,5 hours doing something that should have taken 15 minutes
That's your choice entirely
And blowing off steam by screaming at me is not the way
you can't complain about anything then
๐คฆ
because everything is your choice
lol
but we are doing ๐ค
We'd only be so lucky
I've only ever encountered one glitch/bug in hollow knight and that was when i was wall jumping and i somehow kept sliding on air
i owe so many hours of enjoyable experiences to this modding community
like holy shit
you guys work your asses off
also i have a question
I can say, with 100% certainty that since September, the modders have spent easily 750 hours of time coding
so, yeah, we're doing
if i wanted to change off of lightbringer mod for a bit how would i do that
I love you guys for your mods
verify game files
I apologise for my previous actions
swap the assembly-csharp back or verify
neato
@west wave - go to steam, right click/properties, verify integrity
Hey, I got a dump of all the sprites in the game... does anyone know off hand what the vengeful spirit sprites are named? I'm digging through them now
back up your save tho
^
im new to modding stuff so thanks for the help
fireball is vengeful's "internal" name in most places, so start for looking there
though fair warning
the spritemaps change from release to release
i'm pretty sure they are generated at build time
Ahh good to know. Fireball has the ones for collecting it but not the actual shot as far as I can tell
well, fireball is also like....4? sets of sprites
4 sets?
there is the ball, there are little wisps that come out the top and bottom, and there is something else i think
it's not just 1 sprite
i'm scared of this next update and how much will change b/c of the code rewrite
it'll break all the things ๐
That's gonna suck
probably wyza
you can try this
not that the old life is bad
press f10 whilst fireball is on screen
i mean.... it literally could completely change the routes
and entirely new glitches
and it'll dump every loaded texture named after the parent object
Woah, that is useful
i.e knight sprites will be under Knight
Just drop that in mods?
we really need to come up with a common keybinding system
yeah
cause debug mod, the api, this dumper, all doing keybinds
foreach (tk2dSpriteDefinition spriteDef in tk2d.Collection.spriteDefinitions)
{
Modding.Logger.Log(String.Format("{0}", spriteDef.name));
Vector2 offset = new Vector2(1,1);
Vector2 size = new Vector2(0, 0);
foreach(Vector2 uv in spriteDef.uvs){
if (uv.x < offset.x || uv.y < offset.y)
offset = uv;
if (uv.x > size.x || uv.y > size.y)
size = uv;
}
int x = Mathf.RoundToInt(tex.width * offset.x);
int y = Mathf.RoundToInt(tex.height * offset.y);
int w = Mathf.RoundToInt(tex.width * (size.x - offset.x));
int h = Mathf.RoundToInt(tex.height * (size.y - offset.y));
//Modding.Logger.Log(String.Format("Texture : {0}, {1}", tex.width, tex.height));
//Modding.Logger.Log(String.Format("Vectors : {0}, {1}, {2}, {3}", offset.x, offset.y, size.x, size.y));
//Modding.Logger.Log(String.Format("Size : {0}, {1}, {2}, {3}", x, y, w, h));
//Texture2D tex2 = new Texture2D(w,h,TextureFormat.RGBA32, false);
//tex2.SetPixels(readableTex.GetPixels(x, y, w, h);
path = Application.persistentDataPath + "/sprites/" + tk2d.gameObject.name + "/" + spriteDef.name + ".png";
SaveTextureToFile(SubTexture(readableTex,x,(readableTex.height-y)+h,w,h), path);
}
i've been trying to get this to work so it'll spit out every indivual sprite not just the sheets
but spitting out the entire spritesheet is easy enough 
At least for my purposes that's probably better, since I assume fireball has stuff that pops in/out or changes as it moves
oh and it'll go to
%appdata%/../locallow/team cherry/hollow knight/sprites/
would be sick if those individual sprites could be changed and then recompiled back into the sheets
probably would just change them on game load dynamically. putting them back into the sheets would mean changing the asset files (i think?)
but yeah, on demand sprite changes would be nice
too
I dont know how tk2d serializes and deserializes
i know it's way different, but some MC custom sprites for like.... randomizer a la ALTTP would be sweet
let me know if that actually works btw @quartz trout I didn't even test this compile I just commented out some code I know didn't work well and assumed the old code would work fine 
Doesn't seem like it is sadly :< I'm relaunching with randomizer disabled just in case
Gotcha, will try that as well
And you can check ModLog.txt in your saves folder
or output.log in the folder above Managed/
Okay, still doesn't seem to work with the sprites folder made and it being the only mod active. ModLog.txt just says it is initialized, the output.log is, uh, giant, but the bottom half is a bunch of messages that look like this, for a bunch of sprites that I figure would be on screen at the time:
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
FSM not Preprocessed: Fireball Top(Clone) : Fireball Cast
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)
AddEventHandlerComponent: PlayMakerFixedUpdate
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 42)```
(sry i'm bad at discord, don't know how to put it in those cool code-blocks)
its `
`Oh
put 3 of them before and after
its not dumping anything at all?
Yeah, nothing.
I just tried it and its working
Hold up, my API might need an update again
in output_log.txt do you get "dump sprites" and "found sprite"
ctrl+f doesn't show anything like that, no
Hrm, yeah, still not getting it to dump anything, still no errors in ModLog, just all that stuff in output.log
This is near the top of output.log
Fallback handler could not load library E:/SteamLibrary/steamapps/common/Hollow Knight/hollow_knight_Data/Mono/lib/System/Library/Frameworks/Security.framework/Security```
Like, 8 of those
are you on windows?
Then the 3 messages I posted before for basically everything that would be on screen
Yes I am
Windows 10
Man there are a lot of parts to the fireball. @_@ What I'm hoping to accomplish btw is to reassemble a gif of the knight shooting a fireball on an alpha background... I'm wondering now if there's some way to get myself on a single color background of some type and just record a video and chroma-key it, heh.
pretty sure the security thing is "normal"
just post your entire output.log
like drag the entire file here
@leaden hedge Also, not sure if it'd matter, but my Saves folder and my data folder are on different drives?
And ah, bummer
path = Application.persistentDataPath + "/sprites/" + tk2d.gameObject.name + "/base.png";
this is the way it gets the path
but if it isn't saying dump sprite
its not even detecting F10 press
does your keyboard have a function lock where the F keys do something different by default?
and it has to be switched to actually be F keys?
Naw, no function key. Lemme test my F key, I'll load up fraps and rebind the record key to that
F10 key works... what do you mean? How do I bind it?
I mean if your f10 isn't being sent as f10
then fraps would still respond to it, if you bound it to your f10 key
Ha, gotcha, good point. Well, it's saying f10. And this keyboard doesn't have a function key, the f-keys are just that
weird
Yes it does.
in this channel
yesterday
I posted an API version -32
try installing that
dont' know it's going to fix this issue, but it might
Yeah I'm on -27 so I'll give it a shot
I updated it slightly to use coroutines so it won't crash after dumping 20 sprites
but won't fix whatever this problem is 
well i'm seeing this:
NullReferenceException: Object reference not set to an instance of an object
at UIManager.get_instance () [0x00000] in <filename unknown>:0
at Modding.ModVersionDraw.OnGUI () [0x00000] in <filename unknown>:0
in his log
so i'm thinking there might be something weird there
and -28, and -30 both made an attempt to catch more of this stuff
namespace SpriteDump
{
public class SpriteDump : Mod
{
private static string version = "0.0.1";
public override string GetVersion()
{
return version;
}
public override bool IsCurrent()
{
return true;
}
public override void Initialize()
{
Log("Initializing SpriteDump");
GameObject go = new GameObject();
go.AddComponent<SpriteDumper>();
Log("Initialized SpriteDump");
}
}
}
shouldn't be anything weird
No change with -32 :(
None with active .dlls, I'm not sure if there's other parts to randomizer/boss rush/debug that I'd need to disable, the .dlls are in a disabled folder
that's all you really need
there's also this: (I don't remember seeing this normally in the logs, but that doesn't mean anything either)
NullReferenceException: Object reference not set to an instance of an object
at GameManager.get_instance () [0x00000] in <filename unknown>:0
at GradeOverride.Deactivate () [0x00000] in <filename unknown>:0
at GradeOverride.OnDisable () [0x00000] in <filename unknown>:0
well heres fireball 1 anyway

