#archived-modding-development
1 messages Β· Page 460 of 1
I misread the initial thing
Does the ModLoader throw anything to output_log?
There's a ton of safety checks already so I'm curious how this could break
Ah, if the GetPreloadNames method throws this would break
That is almost certainly what happened
How is that throwing? You should only be returning a list
I tried to make it dynamic with settings/data from initialization, so it wouldn't load every bench if the user had changed a global setting
Still an API issue either way
GenerateBenchData() makes the list of benches
So definitely a mistake on my part, but that should only affect my mod ideally
does hk have its own gravity or do they use rb gravity ,
rb iirc
oh
so do they stop the gravity to increase after some time?
if so ho can i do that
oh ok thanks
@floral furnace the gun cant damage bosses
doesnt work on the hollow knight boss at least
oh shit is the gun mod out
not out
the creator sent a file of it somewhere here
here lol
it's ultra buggy tho
@solar jacinth
wtf
@fair rampart yeah this mod is unfinished
the main reason i uploaded it in the first place is because i wanted to test out if it still had problems working with other users + performance
but yeah im aware about PV not being hit, im gonna check the colliders for that no idea why that happens
still not "releasing it completely" until i overhaul all the charms and it actually functions without you know... breaking
but yeah id appreciate if you tell me all the bugs youve encountered
not really much
the gun works with all other enemies
not bosses tho
i think it does work with ||the radiance|| for some reason
@floral furnace my laptop is shit and it works really good at me
so no performance issues
thanks
not sure
Not the response I expected
Probably means no
In which case you need either Visual Studio, Rider, or some other .net compiler
Personal preference
can you send me link with no chronium
No what?
chronium is a malware
Assuming you mean chromium
No, chromium is not malware
It's a web browser
It's what google chrome uses
As well as several others, notably opera
In any case though, take your pick
https://visualstudio.microsoft.com/
https://www.jetbrains.com/rider/
If you use Visual Studio, I highly recommend also using the ReSharper extension
actually you know what i have an idea
how about you send me pure vessels sprite sheet and i can replace each frame of him with this
and you mod the fight
Your smart idea is for me to make your mod for you?
or someone
Fuck off
Bruh
look I do want to make my own kirb game with unity but i haven't figured it out yet
ok so first of all, why would you replace pv's sprites, that's not how it works
i can draw over each sprite
check #art-discussion pins for the sprites
Good luck with your mod
If you just want to retexture pv, I can do that once you have all the sprites replaced
Wow you're a lot nicer than you should be
This guy didn't ask, he just came in here and fucking assumed I would do it for him
That's so incredibly rude
fair
but I mean, it should take very little time right?
I still feel betrayed by that one guy who asked me to replace abs rad sprites with their sans retexture
they never responded when I pmed the mod to them
very sad
tragic
don't worry i'll do my best
make sure you maintain the size

I will pay any of you in *#@$% spingles
hmm
is this supposed to be an insult
no

found the paint bucket
This topic seems better suited for the art channels.
Who knew components could be so annoying
I think I got component id'ing working in the editor now
So you can edit any component and add any new component you want
when I clone the Tiso boss go w debug, hitting the clone produces a flash and the associated hit noise, but not when I hit the original go
intredasting
maybe the original lacks the components?
idk, does the debug duplicate add any extra components to the cloned enemy?
Debug duplicate literally just calls Instantiate on it
@dark wigeon so i can literally mod hk as its a unity project?
@solar jacinth the assets aren't converted to pngs or anything like that, but yes you can open any of the scenes
i can edit components too?
yes, that's what I added today
previously it was only hardcoded transforms
it's added, but I want to add the mod support before I push
it's not too useful if you can edit but can't load into the mod
some time
I will push my changes so you can see what I've worked onb
@solar jacinth have fun (pushed to github now)
https://github.com/nesrak1/HKWorldEdit2
wow your worldedit tool is super cool
Turn the light thing off on the top left of the scene window, makes it a lot easier to see
thanks , will try now since i cam back from school now
new ver dosent support actually using the scenes ingame tho as far as i can see so i tried your old one and whenver i enter a new room everything except gui goes black forever
o well
Yes that's a bug
Oh it seemed to work in your vid tho
I'm knocking out all component editing at once so I don't have to come back and change how the code worked when I wanted to add that... It just takes a little longer to implement
As for the video, it works sometimes and other times it doesn't, but I remember it being pretty hard to fix because of lack of information
oh ok and yea all this stuff seems to be basically uncharted territory so lack of information makes sense
Lack of information from the bundle, not like knowledge information
But yes that too is another thing
Really all that's left is to just run the differ on the components now that I can id them, then create the diff file (same format as for hkwe1) and it should just work
awesome I can't wait
Oooh what's this?
The World Editing Mod came out?
it's been out-ish for a bit now, I think?
technically it came out on new years this year
I didn't know about these cool tricks I'm using now until a few months ago
Can you show me where the βworld editing modβ is?
Hey Gys
Hey
Sup
Hey
Hey
Hello fellow speedrunners
you're a snail 56
bet I can type π faster than you
π
there I win
Ok buddy
I bet I can find the space before the pale lurker state breaking your mod before you do
gottem
Hey you can't blame me for trusting Wilbo more than I should.
Speaking of that,
isn't it kind of weird how if 56 hadn't found that space pale champion would have never been made
a pretty incredible thought
yeah it's practically 56's mod now
pretty much
I wish Fennel had running animation
so she could walk into people like hornet
so my method of having a go that can be damaged is to clone the original go, set the clone exactly at the same spot as the original go, then destroying the original go 
maybe it's because the original go isn't active or has some components that are not active
instantiating automatically activates some stuff iirc

wait that actually fixed it jngo?
well I also mixed in the flash shader that you showed me to make Tiso flash when hit
okie
so worldloader does actually work
ignore this
worldloader only worked with the original hkwe editor, and it only worked for certain things, I don't remember what caused it not to work
yea but i spent a long time with no success until i realized i needed to copy cldb.dat out of the unity project
o well it worked in the end :D
that's good though
so the old world edit can only reposition existing objects right? the point of the new one is to add new stuff?
some things will make it black screen/endless load screen regardless of cldb.dat or not
o :(
it can move existing objects and add completely new objects
the transforms were hardcoded from editor fields
pretty bad method but way easier to implement
ah
hey, Nes
was the problem I was having in worldedit or in Worldloader?
(and has it been fixed)
something about copying elements from in a room
mhm
make sure to ping me when a stable working version with the fix has been released
But I just realized I will have to change to mod a bit to get it to work with the new changes
so I get to do what I've always dreamed of doing
Yes I'll notify you all when I have something to show, I'll probably put it on my youtube channel
Most of the work I was doing earlier was stuff to get all components working which is why it's been taking a while
I don't quite understand programming stuff, but I'm sure you're trying hard and it's just slow 
A lot of thonking and not a lot of programming surprisingly
There's so many ways to do it, so I think of a bunch of options and try to find the best one
mhm
in hkworldedit2, why do you ignore monobehaviors?
//not already visited and not a gameobject or monobehaviour
if (references.ContainsKey(aid) || ext.info.curFileType == 0x01 || ext.info.curFileType == 0x72)
continue;
it crashed unity when i tried to enable them but i dont know why
oh damn that tiso mod is epic
the hierarchy printer thing doesn't print PlayMakerFSMFixedUpdate stuff?
and the fsm viewer doesn't either?
maybe that's what's setting PV's position to be within the arena range?
@fickle bolt
You can't asset bundle code
that's why it ignores monobehaviors
oh
but the scene file includes them
otherwise they wouldnt need to be ignored it seems ?
what scene file?
all the level files in hollowknight_data
those are not asset bundles
then they don't need to ignore monobeheviors π
what, ok this is clearly beyond me, just wait for nes to answer
nes 
yea nes probably has a good reason to skip them
Well no it is possible to add monobehaviours, I just haven't done it yet
It's just a little more complicated than the other components
It also takes a bit of time converting the dll classes to typetree, although I guess I could preload them
Also what about PlayMakerFSMFixedUpdate?
hype
It doesn't print out what the fsm does like it does with PlayMakerFSM components
Still not following
does anyone know how long enemy iframes are?
you mean their iframes right, not YOUR iframes if you get hit?
yeah
if you mean the limit of how fast you can damage them, HM.Hit() actually handles that
unless you want the ACTUAL value tho?
yes I want to know how long to make them flash for when hit
did SpriteFlash not work for you?
oh so basically youre doing it your way
im looking at the spriteFlash component, seems like it has a timeUp and timeDown attributes that they manually set up depending on which method is being called
spriteFlashQuick seems to be literally at
this.timeUp = 0.001f;
this.stayTime = 0.05f;
this.timeDown = 0.001f;
ok, so hopefully .052f
sorry i cant tell much, imo just experiment at least
or until someone actually competent gives you the actual values
π¬
That's not -Vector3.left
how could one check if a go is on the ground during a midair attack?
go?
raycaat down
you could also have a const you compare to the transform y pos
that seems hacky though
FeelsRaycastMan
the game uses ray casting for the knight
ur a ray casting
Anybody know off the tops of their heads if HK is x86 or x86_64 ?
Probably 64 bit, why
external library compatibility
Native external libraries?
no something I'd put in the mods folder if I ever do what I want to do
If it's not native, it probably doesn't matter what architecture? (well, at least 64->32)
Literally never paid attention to this in Task Manager before
Yeah I was going to suggest that except I remembered I ran 64bit .net mods just fine but I guess it doesn't matter
Thanks for your help π
I disabled all of PV's fsm components and it still teleports to the arena range. This is very 
foreach (PlayMakerFSM i in pv.GetComponentsInChildren<PlayMakerFSM>(true))
{
i.enabled = false;
}
saleh i tried to add a new scene based on your code but when I try to load it everything just goes black.. however the debug mod shows that my scene has actually loaded.. do you know why this might be?
the BeginSceneTransition part of my code is wrong, I was trying to figure out how to get scenetransitions working properly but I forgot about it and stopped
I think
use SceneManager.LoadScene(scenePath[0]); or something like this
@fickle bolt
ah ok i'll give that a try thanks
why do you loop through all the gameobjects and assign the Sprites/Default shader btw?
oh alright
I should probably say that in the assetbundle guide 

well ok then... the camera dosent follow him and he cant jump because apparently airborne despite standing on a box but better than black screen
whoops
camera is a thing that needs figuring out
spoohw
I haven't worked with it yet
i know how to do the camera
oh im just dumb it turns out once the guy gets the the center it starts following him
you just need to make the camera follow the knight using some epic code
epic code yes
i personally like to use html
is this what you mean by layer 8 because well it didnt change anything 
i have over 16 years of programming experience with html
thank you sid very cool
insert sean mad at sugar copy pasta
no raphy
you offer nothing useful
oh the other type of layer i c
there is also an enum for it, no?
yea
unless hk big dumb dumb
i wanna learn how to mod hk, is it difficult?
Yes 004, very difficult
Also do you guys just want the asset for tagmanager
thank you ness very very cool
That way you just copy a file instead of manually copying from a screenshot
apparently not

wdym nes
dive onto it
you canβt argue with hk modding enthusiast π€
99% sure I do it in the yt video too
i actually have no idea why i am shitposting here
because it's funny
i'm like 99% sure i set layer 8 and it was fucked
This image https://cdn.discordapp.com/attachments/327461802311155714/570391097226952734/unknown.png
You can just copy tagmanager.assets instead of manually typing it
o
ah i set the tag and not layer 8 and it half worked
buddy I posted that a minute ago
it's actually nes's originally
Yes I did that so you guys know what I'm talking about
I got it from the buildsettings what are you talking about
Imagine actually typing that out by hand lols
i would just ocr it epic gamer style

o yea do you guys know that vsauce finally uploaded a video after ten thousand years
and itβs not even good
https://github.com/nesrak1/HKWorldEdit/tree/master/ProjectSettings look, I generated it into the text files in this folder
thatβs crazy
have you been working on the editor lately?
or is it done?
idek since i am not up to fate with hl modding stuff
hm so hkworldedit has all the layers but dosent seem to actually use them ?
because modding is dying?
Because there's hkwe2 
Hkwe2 layers aren't set up because I'm lazy and they don't matter as much as getting saving working
yea fair enough
I'll add it tomorrow probably
Meanwhile you can steal the tagmanager from hkwe1's repo (see above link)
it dosent actually apply the layers tho it seems
It should
It may be because unity doesn't see any and it just doesn't try
But it definitely has layer/tag support
hm cuz the screenshot above is of hkedit#1 and the ground collider has no tag
rip it has the list of tags if you click the dropdown at least
Well are you sure you didn't click on a child that actually has the right layer or something?
Maybe confirm its wrong in assetsview?
oh so the ui and particles have a layer but not the terrain
Oh wait chunks don't have terrain
mayb it applies terrain tag in code
Those are literally only to add black squares
The sprites behind it have collision iirc
oh really lol
Either that or it's some tk2d collision thing but I think it's the former
Oh actually
Now that I think about it, the chunks are custom created, I may not have set their layer
the level i picked just didnt have any terrain 
i opened tutorial level and it has plenty
Yeah it doesn't set the layers for terrain only
but only platforms and doors
So it could have terrain layer idk
All I'm sayin is, when hkwe2 is done, you shouldn't need to use hkwe1
yea of course
do u plan to add monobehevior support cuz that will be good day if/when you do btw
It's technically in
ππ how
Without dll, saving is broken
With fake dll it would work, I haven't generated that dll yet
I'll be back in 30 min or so
π
oh ok adding layers in hkedit2 was super easy like u said
and now the chunks are in terrain layer so hooray i guess
Tutorial01?
yea the same level only had the platforms marked as terrain in version 1
also lol i cant load the hollow knight dll into then unity project because the name (assembly-csharp) conflicts with unity's library code
oh why ?
why what
empty dll
these probably cause a bunch of errors but these are the generated cs files, I'll have to get the program working later
it's just fields, no code
so for whatever reason, the way assembly-csharp is built won't load in unity, so I just generate a dll with only the valid, serializable type fields
perhaps the decompiled code works
or i can turn that back into a dll that dosent have issues iwth unity
decompiled code almost always needs some tweaking before it compiles and just having only fields usually works better
yea probably
what are you using to decomp?
dotpeak
I have dotpeak, I think there were definitely some decomp issues with it
dnspy is worse in some places though
ilspy is a little better than dnspy in some places but worse in others
I just don't try to decompile the code, as there's no reason to have it in the first place
i liked dnspy more than dotpeek
because of like
that
actually sane coroutine decompilation FeelsOkayMan
yeah coroutines are way better
I remember before dnspy was really a thing, coroutines were just "well, guess I gotta look at the il"
also remember before dnspy, just use reflexil to edit all the il by hand
i got all the hk code to load in unity by renaming the dll with mono.ceil π
var input = "../../Assembly-CSharp.dll";
var output = "../../HKCode.dll";
var name = "HKCode";
AssemblyDefinition assemblyDefinition = Mono.Cecil.AssemblyDefinition.ReadAssembly(input);
assemblyDefinition.Name.Name = name;
assemblyDefinition.MainModule.Name = name;
assemblyDefinition.Write(output);
just do this
bruuuh
dnspy I think uses the same decompiler but they changed a bunch of things
think of like cryengine and lumberyard
also if that works lol
did you drag the script or did it just work
yes it uses same decompiler
but dnlib instead of cecil for other stuff
but I've compared the output from dnspy and ilspy and a lot of things look different
yeah
like dnspy doesn't support local methods without looking at the compiler generated class but ilspy handles them fine
ah
what if I streamed myself coding again
imagine streaming coding tho
"today, I'm going to change this number from 4 to 5"
I'd probably watch until I go to sleep
"today, i'm going to just write letters and number and stuff happens"
i am trying to work on my mod
it's so boring
i don't get how people do it
go watch a movie then come back
The trick is giving up
me irl
it is now
why are all of your comments block comments
cause I'm fucking retarded
i love how unity crashes every time i try to enable monobehaviours in worldedit 
how did u know
because you are a behavior that is mono
good observe
you know monobehaviours are bad, but have you seen particlesystems
particlesystems are great
they change every minor version of unity
every single one
you have to manually rip it from the type tree to get it to work right
cldb.dat is almost never the exact minor version you want though
so the monobehaviour thing didn't work
you could load the dll, but trying to remove the filter crashes?
filter?
oh
yea
when i remove ur filter it crasho
dll loads fine and i can manually put scripts on stuff tho
you need to generate a type tree, probably this bit of code https://github.com/nesrak1/HKWorldEdit2/blob/473adb33690360e2240c834d01b1bdd07cfb6afe/Assets/Editor/Bundler/Loader.cs#L117
its a bit complicated but the code is there to do it
if you can load the dll, all you have to do is change the assembly name and it should figure it out
ok looks spooky but i will give it a try
monoclass is really slow though, so don't be surprised if it takes 20 seconds to generate a fixed typetree
its about half a second for each type, but there can be tons of types
also you have to worry about mono indexes as well
https://imgur.com/a/4sWQ8Rc particles r cool btw
yeah, I don't think I've ever run it in play mode before
yea i just thought id see what happened but is the acid usually that fast cuz it looks sped up
idk, could be a script set to slow it down or something?
haven't looked into it but did notice it was sped up
as you probably know, you can change the speed in the material/shader settings
if i tweak the distortion and speed for the lake it looks much more normal so maybe it imported wrong or it needs a script
create a mod or something to check the material's speed value and then you'll know if it gets set dynamically or if its something weird in the editor
hm might try that after i have a go at importing scripts
and now we have diffing, although I'm not sure why a lot of these values are different
I could just hand these values over to the mod, or I could ...
speak of the devil, they're all particlesystems
so maybe the conversion didn't work lol
nice lol
have you seen a particle system expanded
nop but i can imagine it would be pretty bad given how many properties they have
// in ReferenceCrawler#FixAssets
if (inf.curFileType == 0x72) { // monobehavior
AssetTypeValueField m_Script = field.Get("m_Script");
var className = m_Script.get("m_ClassName").GetValue();
if (className == null ) {
Debug.Log("this happens");
}
}
sadness tho
thousands of lines of this
jeez what the heck
I have no idea what is being detected as different in the two particlesystems, there's way too many things it could be
yea lol
as for the code, get shouldn't be lower case lol, you can also call GetDummy() to check if a field is null, even if it has no value
oh its not lowercase i just typed it wrong into discord
also to follow a pptr use am.GetExt
if you haven't figured it out already, pptr is just an asset pointer
so use GetExt to get the instance of the class at that pointer
o h ok cuz the audioclips and texture2d's didnt use getext so i assumed i shouldnt either
In referencecrawler?
yea
lol 56 I'll stream tomorrow
nah speedcoding
haha yes
anyway the reason why those don't have getextasset is because there's already a list of references
which surprise, comes from getextasset
I wish i could code at 3x speed
I wish i could code at βx speed
now with gettexasset unity is crashing again
I mean the trick is to keep writing different code until unity stops crashing
most of the time it would sound like I'm joking, but I'm serious this time
there's kind of an editor crash log, but most of the time the error isn't helpful
it's only helped me out once
yea its just like
Read from location a0306d60 caused an access violation.
Context:
RDI: 0x587bcb60 RSI: 0x000025ad RAX: 0x5ff02d20
RBX: 0x76ce7fa0 RCX: 0x40404040 RDX: 0x76d138e0
RIP: 0x40ab5ba4 RBP: 0x534afa89 SegCs: 0x00000033```
yeah that one
yeah I can't really figure out the problem with only register values
nor with memory dump
I think you could probably do something with the pdbs, I'm just not smart enough for that
mhnm neither am i 
blob club? 



even with getext every monobehavior has null classname :(
AssetTypeValueField m_Script = field.Get("m_Script");
AssetTypeValueField scriptBaseField = am.GetExtAsset(inst, m_Script).instance.GetBaseField();
var className = scriptBaseField.Get("m_ClassName");
if (className.GetValue() == null) {
Debug.LogWarning("blob sad life");
}
so normally when you try to get an ext asset, it reads the data from the cldb.dat file
instead, you want to read from the cldb.dat and the assembly-csharp.dll
you'll need to get it using am.GetMonoBaseFieldCached(inst, inf, "path-to-managed-folder-here")
blame unity for all the complexity
wait a second
I'm dumb
well the above is for monobehaviours
monoscripts should work fine
but the behaviour is the component and the script is the file, right ? so isnt the thing im trying to get a behavior
in fixassets for assets with id 0x72
it never gets past getting the classname because its always null
but scriptBaseField isn't null?
nope
that's pretty wack
let me try π
what other changes did you make besides that one
and removing ext.info.curFileType == 0x72
thats all ive done apart from renaming the dll
ok but I don't think I have to worry about the dll part as I'll block the scene from loading
yea the problem happens way before loading the scene anyway
ooh
I got it to work with a bad hack
orly
I'm watching tv right now but if you want to try
sure what did you do
add this
if (typeName == "PPtr<MonoScript>")
continue;
under
if (typeName.StartsWith("PPtr<") && typeName.EndsWith(">") && child.childrenCount == 2)
around 135
like I said, pretty bad, but works for now
lol yea not the best but if it works at all then its an improvement lol
normally you'd just reverse the pptr but I tried that and it didn't work
isnt that just skipping every monoscript tho
I probably did something dumb
it's skipping the replacement of every monoscript so that you can read it from the correct pointer
o h ok
essentially, it lets you read from the perspective of levelxxx in hollow_knight_Data rather than from the newly created scene asset in memory, "editorscene"
I'll add monobs later but for now I need to get the rest done

AssetTypeInstance scriptBaseInst = am.GetExtAsset(inst, field.Get("m_Script")).instance;
is null now if i use ur fix
mayb i am just bad because you said it worked for u
else if (inf.curFileType == 0x72)
{
AssetTypeValueField m_Script = field.Get("m_Script");
//convert scene pptrs to game ones
AssetTypeValueField scriptBaseField = am.GetExtAsset(inst, m_Script).instance.GetBaseField();
UnityEngine.Debug.Log("child count: " + scriptBaseField.pChildren.Length);
foreach (AssetTypeValueField v in scriptBaseField.pChildren)
{
UnityEngine.Debug.Log("child: " + v.templateField.type + " " + v.templateField.name);
}
var className = scriptBaseField.Get("m_ClassName");
if (className.GetValue() == null)
{
throw new Exception("blob sad life");
}
}
is my code and it doesn't print blob sad life
I tried the reverse thing but it didnt work so ignore the comment
i like how you kept my great error message lol
that looks the same as what im doing but ill try
when i use your exact code i get null reference at
AssetTypeValueField scriptBaseField = am.GetExtAsset(inst, m_Script).instance.GetBaseField();
``` because instance is null 
you use AssetID.FromPPtr onj line 147 which dosent even exist for me 
o wow
just put this in the AssetID class
public static AssetID FromPPtr(AssetsFileInstance inst, int fileId, long pathId)
{
string fileName;
if (fileId == 0)
fileName = inst.path;
else
fileName = inst.dependencies[fileId - 1].path;
return new AssetID(fileName, pathId);
}
hooray
MonoScript [ Class: PlayMakerCollisionStay2D, Namespace: , Assembly: PlayMaker.dll ]
MonoScript [ Class: DamageHero, Namespace: , Assembly: Assembly-CSharp.dll ]
... many more
alas this happens for every monobehaviour when you try to open the scene
Assertion failed: Assertion failed on expression: 'i != m_Object.end()'
0x00000001412F77B6 (Unity) StackWalker::GetCurrentCallstack
0x00000001412F832F (Unity) StackWalker::ShowCallstack
0x00000001411B5970 (Unity) GetStacktrace
0x00000001406DC583 (Unity) DebugStringToFile
0x00000001406DCD61 (Unity) DebugStringToFile
0x0000000140AB5B95 (Unity) SerializedFile::GetType
0x0000000140AA29D9 (Unity) PersistentManager::GetAllFileIDsAndTypesFromPath
0x0000000140800B09 (Unity) GetFileIDsForLoadingScene
0x000000014080167E (Unity) LoadSceneOperation::Perform
0x0000000140801E83 (Unity) PreloadManager::ProcessSingleOperation
0x0000000140801FDB (Unity) PreloadManager::Run
0x000000014080236E (Unity) PreloadManager::Run
0x00000001408B9328 (Unity) Thread::RunThreadWrapper
0x00007FFE36F87BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFE37BCCEE1 (ntdll) RtlUserThreadStart
I'm not really surprised
lol
omg progress at last π π i can see where each script is supposed to go

I tried destroying all of PV's children and it still teleports back to the arena range
very confused rn
Well if the computer says so then it's right
foreach (Transform child in gameObject.transform)
{
Destroy(child.gameObject);
}
foreach (PlayMakerFSM i in gameObject.GetComponentsInChildren<PlayMakerFSM>(true))
{
i.enabled = false;
}
foreach (PlayMakerFixedUpdate i in gameObject.GetComponentsInChildren<PlayMakerFixedUpdate>(true))
{
i.enabled = false;
}
foreach (PlayMakerUnity2DProxy i in gameObject.GetComponentsInChildren<PlayMakerUnity2DProxy>(true))
{
i.enabled = false;
}
I have a button that teleports pv to the knight
the moment it gets teleported, it goes back to (61, 124.6)
I beg for help
lmao
Intercept the transform set for that gameobject name, print the trace, ez
Monomod can do that
Just hook the property's get method
Check the name of it's gameobject so it doesn't spam the console
It was supposed to be a joke but I guess it is a valid way of solving the problem to see who sets the transform
hmm ok I'll try it. It's not like I have many other options
watch it get inlined
Is this not how the hook is done?
.... awake method
IDetour hookTestMethodA = new Hook(
typeof(Transform).GetMethod("GetPositionX", BindingFlags.Instance | BindingFlags.Public),
typeof(PVFixer).GetMethod("Hook_GetPositionX", BindingFlags.Instance | BindingFlags.Public)
);
}
public float Hook_GetPositionX(Transform self)
{
Log("name " + self.name);
return self.position.x;
}
it breaks the mod
pls tell me the bigbrain mistake I'm making
It's set_localPosition not "GetPositionX" but it's in the localPosition property
@ornate rivet
this?
private void Awake()
{
_control = gameObject.LocateMyFSM("Control");
IDetour hookTestMethodA = new Hook(
typeof(Transform).GetMethod("set_localPosition", BindingFlags.Instance | BindingFlags.Public),
typeof(PVFixer).GetMethod("set_localPosition_hook", BindingFlags.Instance | BindingFlags.Public)
);
}
public void set_localPosition_hook(Transform self, Vector3 to)
{
Log("name " + self.name);
self.localPosition = to;
}
This ain't it
You're treating it like a detour but it's a hook you're using
Specifying bindingflags for something that's public is useless
but the params are the actual broken part here
The difference between a hook and a detour is a hook is what you get with on, you can call orig and have to take that as a param
A detour is overwriting what the original method does
Also you need to get the method of the localPosition property, not the transform itself. Look in dnspy if you're confused
Also you call the method you're detouring in your detour
@ornate rivet
@copper nacelle

so what you're saying is that I should get INTERNAL_set_localPosition(ref Vector3 value)
I don't think you can because its a pinvoke
but all the property does is call INTERNAL_set_localPosition
you should use hook
and actually use it properly
Hook takes the original method as an arg
So you'd have ```cs
public void LocalPosition (Func<Transform, Vector3> orig, Transform self, Vector3 to)
{
}
Also another note is that the hook constructor won't take an instance method without you specifying the instance
So
according to stack overflow, your original method is typeof(Transform).GetProperty("localPosition").PropertyType.GetMethod("set_localPosition", BindingFlags.Instance | BindingFlags.Public)
so when you want the get/set method of a property you find it with get/set_propertyName?
private void Awake()
{
_control = gameObject.LocateMyFSM("Control");
new Hook
(
typeof(Transform).GetProperty(nameof(Transform.localPosition).GetSetMethod(false), typeof(PVFixer).GetMethod(nameof(LocalPosition),
this
);
}
oh
Sorry for the formatting I'm on mobile
And then like nes said you want to print the stack trace only if the go is HK prime
c# 4 is 3.5 .net I guess
You can use all the newer C# features in whatever .net version
^
I'm just saying whatever vs says on the standard unity 2017 project
Upgrading the language version is fine
if I set it to .net 4, it allows it, and back to .net 3.5 and it has this error again
Just set the language version
I use C# 7 + .net 3.5 all the time
Yeah
ok
how come the orig function only wants transform for its parameter and not the vector as well?
what
I think the issue is the csproj's are generated by the editor, so it would just overwrite it later?
shouldn't be an issue for mods though
set your csproj to be readonly π€
lol good 1
I don't understand, isn't the <Transform, Vector3> telling it that it takes 2 arguments?
func has return values
ok
The func would take a vec3 and return a transform
the opposite
yes 56 wrong
last
Unfortunate
unfortunate
Anyways, thanks guys, I think I understand this stuff now
sigh
it doesn't get anything related to hk prime (it gets the player's running dust particles being set and stuff)
quick question for mods: is VS needed?
No, although I would argue VS is probably the easiest way to develop .net libraries
I ask that because I use a text editor to make mods on another game
so I just wanted to know if it was possible here too
I'm a bit allergic to VS
Sure, you're going to have to find a way to compile your code into the DLL, and pairing that fact with VS' intellisense stuff......
you could find a way to make your text editor compile C# but the right choice is suffering through VS
ugh
all that fancy stuff messes with my brain
I'll try to get a deeper look tomorrow then...
All for the sake of making a fun mod anyone can use
Notepad and manual msbuild is the big brain IDE
use butterflies to code c#
on a different modding server, there was one person who said they weren't allowed to install anything made by microsoft ...
what do you normally use
notepad
Notepad++ or msnotepad?
Learning a more comprehensive IDE is most likely preferable when it comes to .net
Yeah there's a lot to learn, but you'll thank yourself later imo
I'm not sure I get what you mean
I installed visual studio 2019, is this suitable?
Yep that's what I use
Honestly, I'd use VS for a week by itself and then look into Resharper
There's enough to learn with just VS, and getting confused between what's VS and what's Resharper might make it that much tougher
But definitely do check out Resharper at some point
That's my two cents tho, I'm no real authority
i'll dl it in advance
resharper slowed down vs for me to the point where every letter I typed took 5 seconds to display
Download more cpu
hmm
weird, my desktop with a gtx 1080 and 32 GB ram isnt having any slowdown problems
If the lag is too annoying but you want the code analysis stuff, you can switch to Rider
Lag is why 56 switched
who is this guy
who
the cartoon character
its from Hilda
ah a netflix show
it is a netflix show
you using fsm states for this
If I had PlayMaker I would try to at least, just to see if it's easier
oh yeah that shits paid i forgot
just spend a week implementing your own in code
her 3 part attack works like Sly's
that sounds like agony to be frankly honest
like, going behind her makes her change direction
Rn I have a class that has each attack in a method
In another class, I run through different strategies/checks in a "main" method that gets called every time a list of attacks gets finished.
So if it wants to do a combo, the main method adds moves.backflip(), moves.attack(), and moves.airattack() then loops through and plays them out. Then it restarts the process.
idk if that's the best way to do it though
just rand(1,2) all of them
I do rand occasionally, like when choosing between lightning and jumpSlam
oh yeah that shits paid i forgot
https://www.youtube.com/watch?v=MYWEmI9QvuQ
PlayMaker by Hutong Games is a popular long running Unity addon enabling you to program visually using finite state machines. It's also currently available u...
how many attacks does she has
moves or attacks?
say both
and i say that just in time i say that theres literally a giveaway, nice
yeah both
no wait attacks
AirAttack
Regular Slash
Lightning
Air Slam
you do player transforms check i presume?
real hitbox hours
that boss seems very frustrating to fight
it just needs adjustments honestly
the hit box is fine though 
does she actually has a backward hit in momodora
unfortunatis
major change it needs currently imo is better delay between attacks
maybe a bit "facing" state?
I see you also weren't able to get a good fade upon returning to the HoG
yea, weird...
All I do is set the scene's fsm to go back
var endCtrl = GameObject.Find("Boss Scene Controller").LocateMyFSM("Dream Return");
endCtrl.SendEvent("DREAM RETURN");
send it on an earlier state before dream return, /shrug
it might be because of the eternal ordeal tbh
ttacco wdym by "maybe a bit "facing" state"
like an inbetween "face the player with a very small delay" first before executing any of her attacks
oh, she doesnt?
no
oh
toxic
i know but in the word of active
theyre here, just not "here" here
this
ah yes, totally makes sense
I managed to compile and load the example mod
I still have troubles with VS, but having managed something basic, makes me happy
step by step
no idea
example mod 3 is supposed to have settings, but I'm not sure where you see them in game

that's not what it means
oh
or maybe it is, I dont remember tbh
that's the commentary, so I dunno
//How many hits in between crits? Defaults to 4 if never set before.
seems like a config to me
none of them work anyways
rip
yea you right, it gets them from a global settings file
someone should update the example mods 
ok, so, from this point, what's the best way to go? Should I read the existing mods and see how some things are done?
Though that might be confusing
Do you understand how to use hooks?
A bit, I 've made some basic mods in C# for another game
SO I mostly need to know the correct ones
though I mean basic, so I don't have big knowledge either
If you know how to do the stuff in the docs, the best thing would be to look at other people's mods
mmmh
I found the randomizer 3 git for info
that should have some interesting stuff
this is going to be a real path of pain, but I hope it'll be worth it
no, it will!
The example mods have the structure right, they just don't do what they're supposed to beyond that
So copying them is fine, just don't try to change nail damage that way
Yeah, the mod isn't supposed to touch many things
it'll mostly be a lock out of the hollow knight boss room, and an UI
bit like another black egg door to unlock
well, that's where the meat of the mod will be
It'll be a fancier integrated bingo board
for funnier randomized runs
but it'll work with normal saves as well
As an example
with a set of each difficulty objectives, and some challenge ones that can be failed
the challenges are particular because it can't be done in a normal bingo
There were some challenge objectives but they ended up not being very fun
Stuff like no stags, no benches
they'll be tougher objectives, and if you fail them, they'll get replaced by a normal objective
Yeah, I'll have them be smaller challenges
like, beat a boss without dying
or obtain an item before the other
I don't having specifics written down yet
that'll come when I manage to get an UI working
hopefully it'll be able to spice up runs, without actually changing the game directly
Probably gonna be hard to get a ui design that isn't intrusive
What do you mean by that?
a hotkey to show and hide it
Gotcha
You could also look into something like the item tracker
though I could add some fancier stuff afterwards that shows when you complete an objective
Don't have to worry so much about ui space if it's a separate window
It's not even really a mod
There's a playerdata tracker mod that notifies of pd changes over a web socket
And someone made an item tracker website based off of that
mmh
nice, thanks
bookmarking all that info down
Obviously, considering my current skill, I know it's a long way from here, but I will do my best to make it a reality
what good mods do you guys have
what's orig_TakeDamage in On.HealthManager.TakeDamage?
the orginal method
since On overrides the default behavior, you would need to call orig if you want to preserve the original behavior too
how is it done so both grimms die at the same time in NGG?
is there an event sent or something to trigger the death?
no
Just uses SetState
And hp is checked every frame
Might want to ask Sid what he does
For double vessel
@safe hamlet 
@safe hamlet 
ah
let me enlighten you
https://dying.might-be-super.fun/9VzcbgM.png idk why the bracketing is inconsistent and ugly, i am sorry for your eyes
that essentially override the default method
then i just custom handle the ending in update
where i just call BossEndScene from the bossscenecontroller
if the two hps are below a certain value
https://dying.might-be-super.fun/6wrrgwP.png EndScene waits 10 seconds and calls bossendscene
thanks
chad
pink :(
correct

what is the preload table for in a scene?
also what the heck, I generate scene with 4kb file size and then when Unity does its asset refresh it decides to convert the scene to YAML and make it take up 16kb and also not work
wtf
oh ok but why was this turned on to begin with :(
omG the stupid yaml converter was causing my pink textures
glad you found the problem
yea its a hooray
ok seriously what now... the deactivate buttons have literally vanished
delete it 
i mean yea that works for now but the button should be there lol
it seems like one of the hollow knight scripts replaces inspector with that lol..
aand gdi dont u love it when u think it all good then new error greet u
[Error Edit] Recursive Serialization is not supported. You can't dereference a PPtr while loading. (Constructors of C# classes may not load objects either. See stacktrace.)-
yeah
Preloadtable is basically a list of monoscripts unity needs to load before it starts or the engine crashes
It's pretty dumb
although idk how to get a knight




