#archived-modding-development
1 messages ยท Page 461 of 1
how so
It's a monobehaviour that creates a sprite but when we build the scene I don't get the sprite sheet
oh so you arent suposed to do anything and the knight just hops in with the script?
So we could either create a sprite renderer for all the tk2d monobs, or we could wait until the scene has been created and manually decode from resS
Sorry, enemies are tk2d
oh yea i noticed that but they are invis
The knight is too but as you said, it gets created by script
ah
If you could commit your code, I want to see if I can get it working
Idk where you set up the monobehaviour at so I might be able to parse it early
well i sorta just went off on my own tangent https://github.com/raphydaphy/HKEdit
because i didnt understand how the whole loading process worked so i wrote it myself to figure it out
is there a github for the debug mod?
what is the point of the monoSceneReplacers cuz they caused issues for me and removing them didnt cause any harm
What file
https://github.com/5FiftySix6/HollowKnight.DebugMod for 1432 which is forked from
https://github.com/seanpr96/DebugMod
what file what
thanks
Monoscenereplacers
I've got no idea how to do anything, so examples is how it goes
Not important, it's when I was testing loading with you
ohh
well if you get rid of those it basically makes monobehaviours work lol
uh and also 0x72 is behaviour 0x73 is script u mixed them up in some places
Anything that says list of replacer is a list of new assets being added to an assets file
Where did I do that
yep but mono and scene were just added together
I think it was about ordering actually
it might have just been the comment that you used the wrong name for and the functionality could have been ok actually
I made two lists so monobehaviours came second
oh
I ran into an issue like this earlier where unity would crash if the monobehaviour came before a gameobject
It's possible that it just always works out here
it might not be tho ive had a number of different crashes
its so fun cuz you cant even get help from unity people if there was an issue since its an ancient version
Also no error messages or debugging
well
C# debugging ish
i can get the log in Rider from before it crashed
I can't get the c# debugger to even work
I have rider but I'm using vs right now and it refuses to debug
So just debug.log all the way
faster than ?
I built a release build in hopes of it going faster but it wasn't too much faster so I just replaced it with the code again
yea lol
It's all in HKEdit.cs lol
Yeah one file now
well theres a few in the util package but the important stuff is all in one cuz didnt really see a need for more
mine isnt for worldedit tho so obviously a bunch of your stuff is missing
like editdiffer
I feel like a lot of this stuff could be a lot easier if the API was smarter, ie adding a new pptr field into an array or creating a new typetree entry
But pathid management is awful
Even with assets manager
yea editing the asset file structure in memory is big pain
Yeah esp in memory because there's no filename
and this is kinda an issue which has happened ever since i imported hk code to unity but i didnt really try to fix it yet
just some random classes dont load
If it could not load type, maybe there's another type it depends on?
hm i will look at the files that it cant load and see if they need something
gamecameras always fails and i didnt get to checking which others ones repeat
Ok you do that, I'll work on the saving part if I have time but next week I'll be gone
Saving is worse and better at the same time
Just have to configure a different unity to accept the changes
Lol big brain
well this is a sad day, i have to replace all the references to aseembly-csharp-firstpass with hkcode-firstpass and thats not easy it seems
Ah yes, now you know what I deal with
Except now it's script dependencies not assets dependencies

Should Fennel's slash be parriable?
im not really a fan of
Recursive Serialization is not supported. You can't dereference a PPtr while loading. (Constructors of C# classes may not load objects either. See stacktrace.) and gameobject has multiple entries of the same component annnd componet could not be loaded when loading game object o god
@ornate rivet yes pls
@fickle bolt welcome to the club
โฃ
rEwIrIng asSet PoINTers (2 /. 3) except its not
Wdym it's definitely replacing the pptrs with the correct ones
Is buildsettings m_Version not the same as typetree.unityversion ?
m_Version is the same as application.version but i never checked version on the typetree
Yeah idk why it's on typetree
I'm thinking of moving things around and renaming fields, even if it's different from the original
Hash fields are still called unknown
what the heck it seems that unity dosent allow
GameObject
- PPtr<MonoBehaviour>
- PPtr<Animator>
this is anger
cuz thats how its generated
? Wdym
nested pointers for monobehaviours where you drag in an asset
but it makes unity angry
Recursive serialization not supported. You can't dereference a PPtr while loading so idk how to open it then
Wait does your asset have multiple base fields?
well no its just a monobehaviour but every one of these fields is a pointer
O wait I'm dumb
no im dumb ive spent three hours on this one thing
Those are component indexes
So you create a gameobject with this component and that's the error message?
References to assets in monobehaviours should work fine
if you have any nested pointer it does this i think
maybe i have to dereference them before loading or perhaps have the monobehaviour in the same file as the referenced thing ? idk
O I think I know
๐ ๐
Recursive serialization I think is when you have a pptr to a serializable class
So instead of writing out the pptr it just writes out the data
oH ~~ is that why they have a $ in PPtr<$type>~~
Kind of like struct vs class in c#
So it should stop after the 8th depth
I think $ means from .net and not a unity c++ type
oh lol
but uh
probelm is this is at the 8th depth
i must go deeper but how is a mystery
None of those fields reference back to startmanager right
they shouldnt
ignore the decompilation errors becuase im not actually using the decompiled source
but you can see the public vars at the top
also this isnt specific to startmanager, it happens with any monobehaviour that has public variables which arent a simple value
What about just unity types but no .net types
Im not sure what would happen then cuz I can't easily test it
Is there any plans to improve the documentation and examples?
I'll reckon it's a bit hard to understand much like that
uh y.. everything is good until the generated scene is saved
turns out it dosent matter if the monobehaviour variables are .net classes or unity types or just primative types, none of the monobehaviour data makes it to the exported scene file 
You want it to be like the right but it makes the left?
yea
But left bottom is also correct and that's what I get when I check the children during conversion
and right is the original scene from the game dir
do you know if I need to do anything other than adding the result of getmonobasefieldcached as a reference to save the additional monobehaviour properties?
Templatefieldtotype0dconverter
oh great, thanks I'll try that
Make sure to add that to the type tree list before you create the new assets file
you mean before i save it to disk ?
Before create blank assets is called
ah yea ok
sorry for dumb but where on earth do you find that method ? its not in type0d, typetree or assetmanager, monoclass or anywhere i would expect
infact i dont seem to have it at all
TemplateFieldToType0D.TemplateToTypeField
Not converter, sorry
You may have deleted it, but it's still in my repo
Yeah, sorry
Also it probably doesn't matter but monoclass doesn't add $ to class names fyi
oh ok
well i think i failed to generate my tree properly... I made an array of every template field for every monobehaviour and called TemplateToTypeField(monoTemplates.ToArray()) on it and then tried to shove it into the MonoBehaviour type tree
var type0d = C2T5.Cldb2TypeTree(am.classFile, assetName);
type0d.classId = (int)info.curFileType;
if (assetName.Equals("MonoBehaviour")) {
type0d.pTypeFieldsEx = fieldTypes;
}
and there werent any errors but nothing new happened either 
monoTemplates is the output of monoclass?
oh uh i just did
baseField = am.GetMonoBaseFieldCached(asset.file, asset.info, managedDir);
monoTemplates.Add(baseField.templateField);
``` on every monobehaviour  was that wrong
your typefield generator method takes an array tho so i assumed i needed every field not just one
Yeah I see
also theres a stringtable that i left empty in your method and idk if its important ๐
Just pass a one item array of the base field I guess
It's been so long since I did this .-.
Just try things until it works I guess
lol alright
MonoClass mc = new MonoClass(); mc.Read(m_ClassName, Path.Combine(Path.Combine(Path.GetDirectoryName(inst.path), "Managed"), m_AssemblyName), afInst.file.header.format); Type_0D type0d = C2T5.Cldb2TypeTree(am.classFile, clName); TemplateFieldToType0D typeConverter = new TemplateFieldToType0D(); TypeField_0D[] monoFields = typeConverter.TemplateToTypeField(mc.children, type0d); type0d.pStringTable = typeConverter.stringTable; type0d.stringTableLen = (uint)type0d.pStringTable.Length; type0d.scriptIndex = nextMonoId; type0d.pTypeFieldsEx = type0d.pTypeFieldsEx.Concat(monoFields).ToArray(); type0d.typeFieldsExCount = (uint)type0d.pTypeFieldsEx.Length; types.Add(type0d); sidToMid.Add(sid, nextMonoId); nextMonoId++;
From first commit
oh that makes it so much easier thanks!!!
i assume you do that once for every monoscript right? not sure what clName should be tho, is it just MonoBehaviour?
yeah MonoBehaviour should be fine
just make sure each script gets a unique scriptIndex
ok great
uhhh sorry for being so bad at this but your sidToMid map is confusing me, cuz i'm not sure where you get the sid that you add to it or what i should be using the map for after its filled out (during replaceassets maybe??) i tried to just ignore it but that didnt work either 
i looked through your hkworldedit code to try and see how you did this but i couldnt actually find the snippet you posted (closest i found was https://github.com/nesrak1/HKWorldEdit2/blob/master/Assets/Editor/Bundler/MonoClassFixes.cs#L29-L50)
ok it seems that asset.file.file.typeTree.pTypes_Unity5[asset.info.curFileTypeOrIndex].scriptIndex; gets the sid but there are clashes between files from different namespaces (eg playmakerfsm and RecycleAfter2dtkAnimation are both 53... )
scriptIdToMonoId, it just keeps track of script ids
its more like scriptIdToScriptIndex where scriptId is like the class name and namespace and stuff
so it gets that script info, checks if it already has a scriptIndex, and then either gets a new one or grabs the existing one
oh so sidToMid.Add(new ScriptID(m_ClassName, m_Namespace, m_AssemblyName), curMonoId); not the numberical id
the key here is the scriptId and the value is the scriptIndex or monoid
yeah unity's naming is a bit confusing
probably a little of uabe's fault too
ah ok so its only used to prevent generating a typetree for the same script twice?
yes, but I think unity will crash if you use the same scripts across multiple scriptIndexes
fair enough
you did find the original code right
nope
oh, sorry
ohhh dunno how i missed that, sorry
it was in the first commit, not the master
yea i looked through the first commit cuz thats what you said earlier but i guess i failed
well hooray every monobehaviour except playmakerfsm gets the correct fields now!!

Playmakerfsm won't open in uabe iirc
oh
well unity crashes when i open the scene but everything looks good in uabe now 
i wish i could see why it crashes lol
Good ol unity
i mean that works too
Lol
awesome
yea those are all from the last two days tho :(
i will try attaching visual studio debugger to unity so i can get more crash info
Maybe even thousands, I've been doing this for a few years
gosh
Not the hkeditor but modding in general
i mean same but not hollow knight
Just imagine if uabe was open source
ikr why is it even closed source ? its not like the dev makes money off it
To hide the malware of course
So much beautiful software, closed source without reason ;-;
0mg how r u supposed to debug scEne opening without unity just crasHiNG ( also pptr recusion still unknown )
attaching vs debugger pauses it before it crashes but all the code is in assembly
Have you ever heard of gdb or r2? 
Oh for one scene, whenever I got an eror I didn't understand, I loaded only a range of gameobjects in the editor and slowly closed the range until the error was one away
oh yea I dunno why I didn't think of just using an actual debugger (probably cuz it's not my code idk), and only exporting a select few object is smart, thanks
I think his reasoning of keeping closed source is the same as paint .net
yeah whats it
don't want people making money off of it and redistributing it off as their own
G P L
I'd fork the fuck outta Paint.net and let you do arithmetic in value fields
how am I supposed to know what 1/4 of 1920 pixels is, I should be able to type 1920/4 and have it evaluated
Same, but I always have speed crunch open
I think gimp does that tho, right?
@copper nacelle he (paint .net author) said people were doing it regardless of the license and said he couldn't put up with it and stopped providing code
that's a huge bummer
you're missing a ton of references, so no
playmaker at least
probably assembly and the rest too
yeah, you need to replace all of those with the right paths
Some may not be necessary, but it probably isn't worth the effort to check
what are you building
just updating Lightbringer after all this time
really should've done it sooner tbh
Rewrite from scratch tbh
Honestly looking back at this I really should
It really does but if it ain't broke
If it ain't broke fix it anyway
I have other projects I should be working on ;-;
Impossible
and I need to find a job
Same
accidentally died while killing muzznik and now I need a pre-Muzznik save >:(
thank god it backs it up with a previous version
I don't think the BlueHealth hook works properly
Is there a dump of 1221 gameobjects? Asking because I was thinking of making lever skips a qol option for randomizer, so it would be nice to have a reference for what the hitboxes used to be
A bit too lazy to actually pull out the 1221 api and dump it myself though 
Unfortunate. I assume it would just be changing a BoxCollider2D component, right?
Idk
ah, like this thing
You can still hit the lever hotboxes at the same spot with the gate not open so like fsm or component
so it might be that the problem is the attackType in this state?
yeah, yeah, the damager has a ton of layer checks. That's probably it
Do you happen to have an fsm dump of Damager-damages_enemy from 1221 resources.assets, 56?
true
although, lever skips really aren't as influential as it might seem
since shade soul lever skip is hard removed, they're really just shortcuts
Not sure if I'll actually follow through at this point. Mostly just curious as to what kind of work is actually required
There's probably an fsm bool check for if you're in the attack range
If you remove the action I imagine that's enough
Yeah, I can try changing that. I just wasn't sure how much of the patch was altering range boxes vs hit detection through walls
Levers don't check for walls or anything
There's just a trigger you have to be inside for the hit to work
I think you are right.
Levers don't check that, but they do check for attack type which comes from the damager which does check against layer (and also is responsible for canceling 0 nail damage hits and so on). I don't think that gets altered from "nail" when an attack is canceled though
Thanks. Yeah, doesn't look like any changes in the relevant state
now SpriteFlash isn't working all of a sudden 
cast
If you're using the non-deprecated one
I think I had something like this happen
I was trying to refactor lightbringer
Some of this code is actually terrifying
I scrapped recoil

that definitely should not be on SpawnBeam
it's in the attack method once again
Alright I think it's done
Behold, 4 hours of work
with potentially more bugs than I started with
oops
I really should strip these and slap them on GitHub but for now gitignore is enough
strip what
the dlls
just make a folder called References in the same folder as Lightbringer and put them all there and my csproj should work as-is
wait
yeah but you shouldn't upload game dlls to github
one folder behind the same folder as lightbringer
yeah
idk why you have them there at all is what I'm saying
yeah I already moved them to a new folder named libs like in my Risk of Rain 2 project
yeah me neither
yeet them
I assumed clicking and dragging .dlls in would reference them, not add a copy into my project
very nice
I'm keeping them just in case

but what I do for RoR2 is upload stripped dlls
like just headers?
so anyone can build the project with just what's on GitHub
method names and such
so you can reference anything properly
that sounds nice
I hate .bats so I'm not gonna read through it but I think the ones I'm using were stripped with https://github.com/mistername/RoR2Libs/blob/master/strip.bat
Is there any version file I have to update for this?
ah, GetVersion()
1.03 to 1.20 sounds fair right
sure
I'd swap it to the csproj meme though
you do like one of these https://github.com/5FiftySix6/HollowKnight.QoL/blob/master/QoL/QoL.csproj#L6

ok how do I add the updated Lightbringer to the mod installer again?
Update the file on Drive?
Yeah
And there's a shasum in the modinstaller
@solemn rivet add 753
you'd update this line https://github.com/Ayugradow/ModInstaller/blob/master/modlinks.xml#L213
Make sure not to replace the file on drive but to just add a new version
wait
wat
x753
995E1E6AF1942D3E0CC1812E3F30B59180D3BEBA
thanks Gradow
wait I think I did an oops
I was supposed to put more than just the .dll on Drive right?
I need a readme
I lost the old zip :)
drive won't let me download old versions for some reason, just fails to load
idk why Drive won't let me download files
I'm not authorized to view that page, apparently
I can download the folder it's inside of though, weird
thanks Google
why's it suddenly missing the .dll at the end
you saw nothing
yes

Only 2 pulls to go to potentially win a t-shirt
Oh good I found a bug in my mod already
time to get another pull request :)
idk if same project twice counts

time to make dev branches so i can merge my own stuff
seems legit
might be that timescale changes nullify knockback
since knockback and timescaling both happen when taking damage
ah
BUT WAIT
i remember the first time i used that charm , i was hella confused
Only weak knockback is affected
Time Fracture makes you immune to weak knockback...
STEADY BLOW
THAT'S WHY
Time Fracture overwrites Steady Blow
now that makes sense

bruh don't gimme that, this is the perfect solution
nah I doubt sending multiple to the same repo works
fair
if I was really going for it I'd have prepared day 1
it'd be nice to get such a cool shirt though
yeah


Enjoy being 50,001
Quick who needs a professional to take a look at their repo and make changes
i mean ultrad is full of embarrassingly awful code, so if you wanna fix something be my guest https://github.com/AllisonFleischer/hollowknight-ultimatumradiance
Honestly your code is pretty clean, since you're not using Unity animations for attacks that's about as good as you can do when it comes to positioning and timing attacks
I mean, this can be improved a bit 
so after like 2 days of trial and error I have learned ....
... that if you give the asset replacer for a MonoBehaviour a monoScriptID, it will crash unity ๐
even if that monoscript id points to a typetree which is identical to the regular monobehaviour typetree aside from having the different monoscriptid 
@dark wigeon in AssetTools.NET/TypeField_0D, you make fatal flaw
public string GetNameString(string stringTable)
{
StringBuilder stringBuilder = new StringBuilder();
if (this.nameStringOffset > 2147483648U)
{
this.nameStringOffset -= 2147483648U;
stringTable = Type_0D.strTable;
}
char ch;
for (int nameStringOffset = (int) this.nameStringOffset; (ch = stringTable[nameStringOffset]) > char.MinValue; ++nameStringOffset)
stringBuilder.Append(ch);
return stringBuilder.ToString();
}
nameStringOffset is permenantly changed so if you do getnamestring more than once it will crash
oh yeah that got fixed a lready
I think I just haven't pushed yet
ah
ok check now
wowie big commit
wait but two commits before that, you did changes for 2019 (breaking), but im using unity 2017 for hk soo isnt that bad news ?
no, it means added support for 2019
ah ok so it still works with old ver
for example, what was originally thought a boolean was really a byte
aha
so now it becomes a byte, but that's it
same for the bufferedpath stuff
byte vs string
Were you able to figure scripts out
Make sure are you setting the preload, pretty sure scripts crash without it
How does the start button actually start the game? I see the GameManager method, but is that called through an event or something?
Canvas delegate I think
Hmmm. I'm trying to override that so that the mod sets the scene to load into on newgame
You could probably just override BeginSceneTransition and just check that the last scene is menu
Might be overkill though
That actually sounds easier almost
@unborn flicker Am I being dumb or is textObj just always going to be non-null?
it's DontDestroyOnLoad(ed)
but then each method has a null check anyways
Is this for benchwarp?
yes
Is the gameobject null or hidden when the pause menu isn't up?
idr
same for menu title
I'm updating Benchwarp once I'm done with rando tonight
So let me know if there's anything I need to add. I am going to look into the null ref logs again
I also need to find out why instantiating a bench refills hp 
it is quite mysterious
oh, are you working on Rando 3?
I don't know if you have fixed it already, but if you let the nailmaster live and he goes to see sheo, the item located there is unavailable
@unborn flicker
Yes, I will fix that
sweet 
I'm slowly progressing towards my goal of making the objectives mod, I opened the github today
but there isn't any actual code


Make sure are you setting the preload, pretty sure scripts crash without it
oh.....................
Is there a way to make on hooks that go immediately after a method is called?
nvm, found a different way
it actually works
๐
I was having trouble loading into an arbitrary scene out of start game, probably because of not loading knight pickup or something
fortunately, there is a start new game option which simply puts you at a respawn point
in godhome, and with a lot of other stuff, but that's not really an issue
@unborn flicker hello i got you a present https://github.com/homothetyhk/HollowKnight.BenchwarpMod/pull/5
It looks very nice and humanly generated. I will merge it without a second thought 
๐ค
well, hold on
Can you make sure the save settings work on your branch?
Like, don't carry over across saves and disappear randomly and stuff like that?
That is why I never updated it to the current API settings
or I could do it later
I haven't swapped it to current API settings but sure
besides like the class name
On even on the old settings I had them not clear
like not those ones specifically but like in general
It is set up to clear on the menu
yeah, I did it one by one instead of replacing the settings
changing to the new api settings for this is going to be semi-painful
you have to change the field get cause it returns a ModSettings
and SaveGlobalSettings is private
Step 1, finally
https://streamable.com/qdyqy
he flash
makes sense 
meanwhile I'll continue on my crusade for my own mod
It will happen one day!
gl and have fun 
It probably sounds silly, but by opening github you have made much more progress than 90% of people who say they're going to make a mod


well, I said I had no code, but it's not 100% true
I managed to rename the empty example mod

it compiled properly, which is a success in my book
now that I got the bases covered, I need to figure out how UI works, and add the meat of the mod
the mod that changes pure vessels sprites is on hold for now

does anyone know what version of PlayMaker is used in hollow knight? The DLL version is 1.6 but it turns out that every playmaker DLL is version 1.6
Button colors don't work on your pr 56 :/
wtf
Also, text is too large

Surprisingly, the style menu worked for some reason?
nothing else worked
or, at least, visibly worked
I didn't actually try to see if the buttons still set the bench
all of the bench buttons did not turn yellow
and setting buttons
the warp ones worked for me but not the setting meme
yeah the panels opened but the buttons did not react
huh
ah
I had all white buttons
I am the fool
These are not fields
FeelsOkayMan
@unborn flicker could you try this
Looks good
This is still weird though
Thanks
The sub-menu ones are too big right
Yeah
I had it at 12pt originally
even changing it a little makes it look way too big/small unfortunately
Actually, while you're looking at the mod, if you have any ideas as to why deploying benches refills hp, that would be great
I'm rooting through the fsm trying to find the problem right now
box size?
oh yeah
Originally they all had different names for some reason
but I fixed most of the benches last time
bad decision making left over from 1.0 tbqh
Would changing WarpOnly to like Warp Only in both spots break anything
I don't think the names should matter at all
They're only referenced in top menu anyways
perfect
56 out here tryna get those 5 prs done
yeet
ok, it seems the fsm change I made to remove the range check is causing the bench to instantly restore hp
i am also getting infinite mp
yeah, I'm removing that
I thought it would be a good fix to just always fill mp instead of trying and failing to drain the soul meter
but it ended up being op
Yeah, I've tried that too for a version, but there were still cases where the soul meter didn't update even after setting it to 1 after the warp
No idea what causes it to break
cursed
because it isn't consistent at all
Yeah I remember trying to get it to update for something else and it was fucked
I can't believe I didn't see this galaxy brain fsm edit earlier 

I tried to remove the hp refill at rest burst, and later I decided to remove the range check at Idle
Ok, is the latest commit on the pr good?
Yeah it should be

well this has got to be one of the strangest ways to recieve an error
i cant even move it the only way to get rid of the panel is to force quit unity
Use an alt drag ahk script to move the window or use autoit's window tool to copy uncopyable text
I forgot to say but the preload list should have pointers to monoscripts not monobehaviours
i think i figured out the preload table by looking at the preload table of the hk scenes but thanks
although they dont include some scripts like FsmTemplate and they have duplicates of others like PlayMakerFSM which is weird
and autoit worked to grab the error message ty
oh right @unborn flicker again, I don't know if you fixed it, but this time, for benchwarp, there's a pretty nasty issue if you were to teleport to a bench while on a conveyor belt. the knight will be stuck in a sliding motion until leaving the save
Ok, but if you're just trying to glitch with Benchwarp, that really is beyond my control
I don't know much about conveyor storage, but I would imagine that is what is occuring
Oh, I did misunderstand the original message. I thought you meant placing a bench on a conveyor
I think the point still stands though.
ah, my goal wasn't to glitch it, I just warped after hitting a dead end
just something that happened so I thought I'd report it
Nah, thanks. I will look into it next time I update Benchwarp
But that will not be soon because Benchwarp was updated on the installer last night
no problem yeah
it's mostly a corner case anyway
and isn't permanently damaging either
What's the process for getting a mod onto the installer?
I recall there was a github for the links? probably to do a pull request with a proper mod
๐ Ayugradow/ModInstaller
๐

Do I have to get a DLL onto the drive?
yes
that's what you link in the modlink
well the id part of the shared link at least
Should I just like
post the zip here and have someone with permissions put it on there?
local man unable to use gdrive app
if you dm me your email or whatever I'll add you
added from mobile btw ๐ค

@dark wigeon How do you know the exact location that the editdiffer script will be at ? https://github.com/nesrak1/HKWorldEdit2/blob/master/Assets/Editor/Bundler/Loader.cs#L124 ? My thing seems to be crashing when it tries to convert the m_Scripts in the scene into project references (fileID 0 -> fileID 2) GameObject references runtime script in scene file. Fixing! so I could fix that by just fileID 2 to begin with but im not sure how you calculated the pathID since yours is hardcoded
It's just the order I added the dependencies
Nope I'm dumb
Id 1 is the asset assets file and id 2 is the edit differ assets file
right, but how did you get the path ID (11500000)
because I want to get the path id's for all the scripts in the hk dll
oh really lol
Grep the metadata folder and search for different things, they probably are
You could probably write a tool to search each assets file for their scripts and make monometa hashes like in constants.cs
Idk if you'd have to for that but ๐คท
oh the paths are saved in metadata? thats great yea i guess ill make some sort of tool
they arent all 11500000 btw, the first one i checked was 1938007157
Check edit differ and see if it's 11500000
All I know is I put a few different monobehaviours into a bundle and opened with uabe and I think they were all 11500000
But that was a long time ago, I may be wrong about that
were they scripts you made in the editor or were they part of a dll?
In the editor
yea mine are dll so maybe thats why
thanks ๐
uh since when could path ids be negative... or is this just because ubae uses long instead of ulong ?
It uses a qword in the headers which I think is unsigned
Idk if they are unsigned or signed in real unity or not
oh well hm i guess it dosent matter if the path ids correctly resolve
What's the issue?
oh nothing it turns out sry
uh i think there might be something wrong with assettools.net because I can read the metadata files in uabe just fine but if i try with AssetTools.NET either with AssetsView or by doing it in code, i get https://gist.github.com/raphydaphy/42f86cfccd0e5d483634fef1ef13af57 crash
in assetsview it happens when i try to view the asset and otherwise it crashes when i do getATI
foreach (var info in table.pAssetFileInfo) {
var type = info.curFileType;
// crash:
var ati = this.am.GetATI(this._assetFile.file, info);
}
My guess is you need to enable typetree
I realize it was stupid not to enable it by default if it existed so I'll change that in the next commit
uh sadly it crashes with the same error when fromTypeTree is enabled
It's probably not your fault, but I'll have to wait until I can debug it to help you out
yea since it works in ubae and not in assetsview i am pretty sure its not a problem with my code
nvm i'm extra stupid today, fromTreeType does fix it sorry
Yeah I really need to fix that
I'm hoping to rewrite a few bits, especially fix the unsigned values to signed
sooo uh your GUID128 Write method is kinda messed up 
i had to flip my guid string before splitting it into least and most significant bits and then switch the bits to make it work
for example 419b7acb43d23667b0e5b717c6a309a2 in AssetsView actually means 76632d34bca7b9142a903a6c717b5e0b
this is what i did to overcome it
var guid = "76632d34bca7b9142a903a6c717b5e0b";
var guidCharArray = guid.ToCharArray();
Array.Reverse( guidCharArray );
var guidReverse = new string(guidCharArray);
this.GuidLeastSignificant = Convert.ToInt64(guidReverse.Substring(0, 16), 16);
this.GuidMostSignificant = Convert.ToInt64(guidReverse.Substring(16, 16), 16);
It's not broken, it's just that unity always flips to two hex chars of the bytes in a guid
oh...
I guess an "actualId()" would be helpful
Yeah that too
a string->guid128 method like my code above would help alot because i was super confused until i realised what was going on
aaaand now unity is crashing and not even giving a report.. and attaching a debugger does nothing either now
how fun
Like I said, the api is a bit too confusing. It favors control over user friendliness and makes things that could be easy complicated
lol isnt it your api ?
o how did you even get the source
I didn't
wut
I just compared outputs until it matched
It didn't take that long
I didn't add the whole library right away
To be fair, most of the library is just reading and writing fields which were already in the c++ api
yea i guess
have you had unity crash without a log before? im not sure how to debug this
Yeah I always get crash logs
oh no
I just close them because idk how to read them
Not like I have the unity source code or anything
i literally dont have a log its very odd
when i attach a debugger it just silkently stops debugging when it crashes and dosent catch anything
Huh idk
im only exporting a single gameobject so i guess it wont be that hard to narrow it down
Does this happen all the time though? Could it just be a one time bug?
every time with the Town-TileMap gameobject in thie Tutorial 01 scene
its the same object that caused the immovable window crash earlier, its very cursed
ok damm it's literally any monobehaviour which links to another monobehaviour
I feel like I'm just going in circles lmao
You see why I didn't try this earlier
Did you check the Knight's rigidbody?
Either debug log the rigidbody on the knight gameobject in a mod, or use an assets viewing tool to look at the rigidbody data. I assume it's unity physics and not script physics so the rigidbody should have things like gravity on it
oh shit
@fickle bolt can you view knight's rigidbody?
ah
its added at playtime
waht
Knight_Pickup
i could try loading the knight pickup scene
that would be good
@solar jacinth is this what u want?
np
bruh what kind of gravity scale is that
a 0.79 one

knight has like 500 scripts tho so one of them (herocontroller?) probably changes jump curve
ah
afaik every movement/player physics is on HeroController
so gravity chnages?
No wait im mistaken player movement, unless they control the player's downward velocity from there
Yeet mbs working
not all of them tho
tk2d stuff crashes for instance
i made a blacklist and whitelist system for scripts so i can weed out the ones that work and figture out why
this is unfortunate
seems that vectors inside monobehaviours get turned into arrays when converting the scene and this breaks any monobehaviour which has a list
whats more AssetsView just straight up dosent show any gameobjects which include monobehaviours that have vectors (if i try opening the origional hk scene in assetsview)
@fickle bolt hey, I've been trying to keep up, but ended up unable to, what are you doing?
i'd think it's a level editor?
i'm just trying to load hollow knight levels into unity with all the components intact - nes's level editor already supports every component except monobehaviours but it turns out that they didn't include monobehaviour importing for a reason ...
btw nes do you have any idea why vectors are being read as arrays in MonoBehaviour base fields? i've spent a while trying to figure it out (and in the process i discovered that assetsview, uabe and uabe.net all have different behaviour for vectors....
) but tbh i have no idea especially since gameobjects have a vector which loads correctly 
I didn't think unity actually cared about it but it might...
Anyway the reason some have vector is because that type is not a c# array but a c# list
I just put only array for both in the mono deserializer but that's probably wrong
Works fine for reading but but for writing
Don't worry about assetsview though, I know about those issues
Anyway... The problem is in monoclass, I can just generate another type tree template specifically for lists later today and we can see how well that works
well the type in the c# class for the monobehaviour is a normal array but unity seems to store it as a vector and when it's not a vector it dosent read the data at all
oh, smart, I'll give that a try
right, yea
they are both vectors ๐
my script was just
public class SerializeTest : MonoBehaviour {
public List<string> stringList;
public string[] stringArray;
}
Build the project now and see if it's the same
harry potter
uh it's like 2am for me so I should probably sleep now although I'm pretty sure it'd be the same because SpatterOrange in scene 80 has an array which is a vector in uabe
knightly hollows
Go to sleep @fickle bolt
Literally took negative effort to make
compared to the existential agony of #archived-modding-help

ah, checked to make sure, and the hook passes the value from getintinternal in dnspy
for increments and decrements, I mean
So I guess I can take out the set hook in any case
Ok, I replaced InfiniteNotches on the installer, so hopefully there will be no more issues
Here's the repository. I put a little example mod formatting so that this can be a reference (that actually works)
https://github.com/homothetyhk/HollowKnight.InfiniteNotches/blob/master/InfiniteNotches/InfiniteNotches.cs

10 hrs later but yes string[] and List<String> are both vectors in the scene file in all three formats
- In the .unity scene file
- In an assetbundle exported using AssetBundleExporter
- In the exported scene when the project is built
Ok guess I need to fix that
hm yea i tried to figure out how you determine what type of field something is but i couldnt figure that out
Like what value type? Wdym
like just where in assetstools you actually determine if its an array or a vector or whatever it is
In assetstools it's .valueType
Depends on what it is though, for some things, I think you can only determine by the time name although I can't remember which that is
oh but valuetype seems to be just numerical types
public static EnumValueTypes GetValueTypeByTypeName(string type)
{
type = type.ToLower();
string str = type;
if (str != null)
{
switch (str)
{
case "bool":
return EnumValueTypes.ValueType_Bool;
case "byte":
case "char":
case "uint8":
return EnumValueTypes.ValueType_UInt8;
case "double":
return EnumValueTypes.ValueType_Double;
- many more different sized ints
ooh
Are you decompiling this?
In the source, the arrays from that method are commented out to match uabe's assets tools
Idk why though
oh yea i was looking at decompiled source, now i switched to the actual assetstools project and its a lot clearer
yay i fixed it (it was actually an easy af fix once i realised what was wrong, i just changed SetArray in MonoDeserializer to make a vector instead lol )
see https://github.com/raphydaphy/AssetsTools.NET/commit/bad426220d1c546d4c9f1c52248c9717c09cd640 just ignore my debug changes to assetsview
well I can consistently export any monobehaviours now but this has only revealed countless new issues... For example I now need to export all the scriptable objects from the globalgsmemanagers file in order to fix textmeshpro scripts which rely on several scriptable objects at specific file locations
You know at one point I was even thinking about manual deserialization
Idk about these scriptable objects though
why can't I set one playmakerfsm to another
what
It's a monobehaviour
You can't create/destroy/move/whatever those other than with unity methods
You could destroy it then set it to the other one by serializing and unserializing
Sounds dumb
yes
Do it in F#
I could improve my EventManager
I'm sure you can get delegate type from an event and create an instance dynamically
Then I wouldn't have to have the new whateverhandler shit
sigh, this is unfortunate
Why do you even want to copy an fsm?
It's probably easier to make your own parry component than try to copy the fsm
yep doing that now
Did someone say f#
no
someone did not say f#, Sean did
Is there any way to get unity to serialize stuff which isn't fields like a: b
_key: [], _values: [] sucks
Probably not
Probably not much better
We could make our own serializer
you could probably make a utility to edit it
probably easier than getting unity to be useful 
The real big brain play is making the editor a unity game so you can use JsonUtility
ifhy
@copper nacelle go in game settings man
Hide current menu
Show submenu
Copy the mods menu I guess
Also fix it being giant in game please
Very nice
Does anyone know what version of playmaker is used in HK?
PlayMaker, Version=1.6.0.0, Culture=neutral, PublicKeyToken=null
no sadly every playmaker version is labelled as 1.6 in the dll
The real 1.6 came out in 2013
Ez plays, download every possible version and diff until the bytes match
the problem is there is no download archive and the only way to get old versions is to ask houtong games personally for a specific version
I would literally do that otherwise
wOw that sucks
yep
not that I could see
The version number seems to only be in the editor files not the runtime dll ;(
Well you could always take the big brain idea and ask the hk devs lol
But yeah if they never update the dll then idk
I guess I'll just push my luck and ask hutong for an archive of past version's
Ok gl
lol thx
oh you were suggesting asking TC not hutong
that is a very big brain method indeed
Yes tc
I did something similar for uwe and they answered me
But tc is a different group of people
uwe?
Subnautica
ohh
Wouldn't Wait get ignored everytime?
as far as I know, a frame is shorter than 0.1 seconds 
According to my calculator a frame is 0.016 repeating seconds
same
Hmmm, I tried moving all gameobjects in a rectangle around this platform, but the collider didn't move
Oh well, now my building is burning down, so I think I'll just scrap that idea
Anyways,
I was wondering @copper nacelle if it would be possible to change the API so that it can access mod settings before fetching preload names
That way Benchwarp won't have to always have 10+ second preloads
That should already be the case
Activator.CreateInstance calls the constructor, which calls LoadGlobalSettings
You'd just adjust your FetchPreload to check settings
Oh, hmmm. Maybe I messed something up when I tried last time then
With the old Mod<T1, T2>, you can also force a load with LoadGlobalSettings because it's still public there
Ok, I'll try that next time
When I tried it before, the settings call from Benchwarp never went through, so Benchwarp didn't preload and every mod after Benchwarp in the load order also failed to preload

isn't the player's nail supposed to be tagged with "Nail Attack"???
I remember it being like that in Pale Champion
when I try to use that now to detect if the collision is from the player's nail, the nail isn't tagged with "Nail Attack" anymore
figured out the problem
nvm I did not figure it out
nvm nvm I think I figured it out
Nvm nvm nvm I think I didn't figure it out
actually I did this time
but now I have a new problem
the flash doesn't work
ok I think I got it to work

it works
except it's even more annoying than the game
I will count that as extra credit

make the window to get it shorter and decrease the freeze frames
ok
GetMonoBaseField dosent seem to do anything when i use it on monobehaviours found in globalgamemanagers
this is sad day
pixel art boss
next "new" boss won't be pixel art




