#archived-modding-development

1 messages · Page 497 of 1

leaden hedge
mossy saddle
#

I’m trying to find the app data/local low/team cherry/Hollow Knight

vocal spire
#

that's not where

#

?saves

finite forumBOT
#

Saves


Windows File Paths: (Assumes Default Steam Install Path, Adjust accordingly for DRM Free or Non-Standard Steam Path)

Game Files: C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\```
** **
Mac File Paths:
```Save Files: ~/Library/Application Support/unity.Team Cherry.Hollow Knight/
Game Files: ~/Library/Application Support/Steam/steamapps/common/Hollow Knight/hollow_knight.app/```
** **
Linux File Paths:
```Save Files: ~/.config/unity3d/Team Cherry/Hollow Knight/
Game Files: ~/.local/share/Steam/steamapps/common/Hollow Knight/```
vocal spire
#

just copy the save files path and paste it in the address bar

mossy saddle
#

So the stuff from the team cherry file goes to the Hollow Knight common folder in steam?

vocal spire
#

?

#

the save files path has nothing to do with the steam folder

#

from the bot message
%APPDATA%..\LocalLow\Team Cherry\Hollow Knight
is the windows save path

mossy saddle
#

So I found the files

#

What next?

vocal spire
#

follow the rest of the readme

mossy saddle
#

It says press f3 in game after pressing f2 for a ‘string of animations from the scene’

vocal spire
#

¯_(ツ)_/¯

proven cipher
#

You need to follow the instructions it is giving you

mossy saddle
#

Usage

  1. Start the game and GODump.GlobalSettings.json file in "AppData\LocalLow\Team Cherry\Hollow Knight" will be generated(delete GODump.GlobalSettings.json before you start if you're updating from older version)
  2. Enter a game scene
  3. Press F2 and atlases will be generated in "AppData\LocalLow\Team Cherry\Hollow Knight\atlases".The naming of atlas is Animation1@Animation2@...@AnimationN#AtlasName.png
  4. Press F3 and GODump.GlobalSettings.json will be updated a new string of animations in your scene
  5. Delete the animations you don't want in that string and save it(Learn Animation name from 3.)
  6. Press F4 and all sprites in animations you choose will be dumped into "AppData\LocalLow\Team Cherry\Hollow Knight\sprites" folder in .png formation
proven cipher
#

Yes I am in fact aware of what it says

#

You have reached step 4, now do step 5

mossy saddle
#

Ok deleted the files

#

what now?

vocal spire
#

continue

mossy saddle
#

press f4 in file explorer? or in game?

vocal spire
#

in game

mossy saddle
#

so i pressed f4 amd nothing happened

vocal spire
#

are the sprites being dumped into the folder it listed

mossy saddle
#

yeah

vocal spire
#

wait a while

mossy saddle
#

theyre in the atlas.

potent dirge
#

Yes, and now they're being dumped into png files which you can actually edit easily, just like the readme tells you

copper nacelle
#

modding-help simulator

mossy saddle
#

this is the stuff it gave me

young walrus
#

oh look, chat spam

copper nacelle
#

why have you done this

#

no

#

stop

young walrus
#

imagine just screenshotting the file explorer

potent dirge
#

Bruh

copper nacelle
#

bro

young walrus
#

<@&283547423706447872>

potent dirge
#

@mossy saddle stop

mossy saddle
#

im sorry

potent dirge
#

Why do we need to know what you got?

#

We directed you on how to get it

mossy saddle
#

to know if i did it right?

potent dirge
vocal spire
#

what layer are the spell flukes on?

jolly oriole
#

Havent tried dying

jolly oriole
jolly oriole
fervent timber
#

elder hu evolves into pure vessel

ornate rivet
#

Do you think maybe it would be better if we just made our own statues?

jolly oriole
#

idk

ornate rivet
#

I wanted to write the TP part myself since TPing into a scene manually works perfectly fine but for some reason I cant edit the fsm

#

and by that I mean editing it doesn't change anything for some reason

jolly oriole
ornate rivet
#

does it actually log for you?

copper nacelle
#

bruh

#

have you heard of a loop

safe hamlet
#

so fucking true i am crying rn

jolly oriole
floral furnace
#

^

jolly oriole
#

now that i got it working, i can remove that region

#

normal warp into boss scene isn't even that difficult, i had more difficulties because i load a different scene in the meantime

ornate rivet
#

what was the problem

jolly oriole
#

for some reason, BossSceneController.HasTransitionedIn didn't want to be true

ornate rivet
#

and it works if you die to the boss and retry?

jolly oriole
#

havent tested

#

brb

#

yes, does work when dying multiple times

ornate rivet
#

epic

#

how/where did you do it?
I tried

Mirror.SetField(bscgo.GetComponent<BossSceneController>(), "HasTransitionedIn", true);

in my activeSceneChange but it says HasTransitionedIn doesn't exist

jolly oriole
#

it's a property

#
BossSceneController.Instance.GetType().GetProperty("HasTransitionedIn").SetValue(BossSceneController.Instance, true, null);

is my code for it

ornate rivet
#

ok thanks

#

oof it still happens to me

jolly oriole
#

1 sec, i can upload the code i use to github

ornate rivet
#

okie thank you

jolly jungle
jolly oriole
#

custom scenes with contents copied from other scenes

vocal spire
#

That’s exactly what happens with Cagney in pantheons

fair rampart
#

i need a debug mod ;-;

#

i cannot beat mantis lords

#

i SUC

young walrus
#

ty for sharing

potent dirge
pure nova
#

What's the best way to modify the nail's size? I've tried to figure it out myself, but ended up more confused than when I first started.

vocal spire
#

Just edit the scale of the transform on the NailSlash in the parameters. If you need, you can also set the animation, though if you are setting it to a new one, you have 3 options: 1. Replace the spritesheet for the original nail slash stuff(pretty sure it’s in the knight spritesheet) 2. Create new tk2d stuff at runtime(I have some code for this) 3. Assetbundle tk2d stuff from unity and add the animations from those to the nail slash at runtime

pure nova
#

So editing the scale of the transform scales all of its components (sprite size, hitbox, etc) too? That's good to know, thanks.

raven folio
#

where gun mod

languid goblet
#

where correct channel for help with modding

#

not here is the answer

fervent timber
#

pd.nailrange is a thing I think

frank minnow
#

How do I make Log() messages appear in hollow knight, I want to use it for testing my mod

#

or is there something I should be using instead?

copper nacelle
#

modding api global settings show debug log in game

#

you can also read modlog.txt

frank minnow
#

where do I change global settings?

#

is there a file to modify

#

also where is modlog.txt ?

#

ok nvm I think I got it

urban orchid
#

that's insane

potent dirge
#

room names as in the scene name debug mod tells you?

deep wave
fervent timber
#

how do you change charm notch costs

fast estuary
#

GetPlayerIntHook

vocal spire
#

Also can be done with save editing

floral furnace
#

if you want epitome of shitcode
PlayerData.instance.charm_#cost i think would do it

vocal spire
#

Yeah

fervent timber
#

ok

vocal spire
#

3 whole ways to do it

#

Wait 4

#

Forgot reflection zote

fervent timber
#

like this?```
private int CharmCostMod(string intName)
{
if ("target" == "charmCost_1") return 1;
return PlayerData.instance.GetIntInternal(intName);
}

vocal spire
#

That works

fast estuary
#

replace "target" with intName probably

fervent timber
#

yeah

#

why did mod docs have it as a string

leaden hedge
#

probably a typo

fervent timber
#

ok

vocal spire
#

lol

fervent timber
#

anyway, the mod makes all charms mark of pride

hexed violet
vocal spire
#

I don’t think “target” will ever equal “charmCost_1”

fervent timber
#

lol

#

if (intName.Contains("charmCost_")) return 1;

vocal spire
fervent timber
#

yes

vocal spire
#

Ooooo

hexed violet
#

id use

vocal spire
#

Should be quick to make

fervent timber
#

yep

vocal spire
#

I’d use reflection so I don’t have to manually add 38 charms

fervent timber
#

I'm wondering if I should keep normal charm behavior or make it just nail length

vocal spire
#

That seems like it would be hard

#

Removing every instance of the charms being referenced

leaden hedge
#

just say it isn't equipped

#

when stuff asks

fervent timber
#

ima keep normal behavior. It's easier and more interesting

vocal spire
#

So just make the equipped bools false when closing the charms menu and set them correctly when oping it?

fervent timber
#

yeah, that sounds complicated

leaden hedge
#

i don't think the bools are used for the charm menu right

fervent timber
#

it would be possible though

leaden hedge
#

isn't that equippedCharms list

#

as its ordered

fervent timber
#

I would keep an internal equipped charms list

vocal spire
#

Pretty sure they are used

#

Both are used

fervent timber
#

and override the normal ones, execpt for menu interactions

vocal spire
#

Equipped charms is used for the charms in the upper list, the bools are used for the ones in the list of all charms

fervent timber
#

and then then once the menu is over, copy the real charm list to the internal one

vocal spire
#

I know this because of a lot of testing adding charms with SFCore and getting it wrong because I was dumb zote

leaden hedge
#

then i'd probably just make it always return not equipped, but replace the fsm actions in the charm menu

#

definitely way easier than removing all references to it

#

but definitely easier to just make nail length based on charm notches used

fervent timber
#
private void CharmUpdate(PlayerData data, HeroController controller)
        {
            NailScale = 0.4f + data.equippedCharms.Count / 2;
        }

        private void NailSlash_StartSlash(On.NailSlash.orig_StartSlash orig, NailSlash self)
        {
            orig(self);

            self.transform.localScale *= NailScale;
        }

leaden hedge
#

you should put those into a var

vocal spire
#

But you should probably check for mop being equipped since it already increases the size

leaden hedge
#

you load from a settings

#

NailScale = baseSize + data.equippedCharms.Count*charmRatio;

fervent timber
#

yeah

leaden hedge
#

that way you could do cool stuff like, every charm you equip makes your nail less useful

vocal spire
#

Oh that makes sense now

#

No wait sorry meant to post that in zoom

fervent timber
#

speaking of shortnail, is there a repository of mods that are cool but didn't quite make it into the full modinstaller loadout?

#

I couldn't find it

vocal spire
#

?

#

Well it probably could have made it

#

I don’t think it was posted here or the author asked

leaden hedge
#

its not curated FeelsOkayMan

nocturne meteor
#

That feel when your websocket errors out because you don't know how to import a JSON correctly into C# and make it a dict. zote

jolly oriole
#

does NewtonSoft.JsonConvert.DeserializeObject<Dictionary<string, object>>("your json here") not work?

leaden hedge
#

you dont make it a dict, unless its generic

nocturne meteor
#

It did not, Anyone. And I'm not sure why. :'''[ Also, it's probably got something to do with me not knowing what "generic" means in C#.

#

Haha, I'm used to Python where you just dump crap into a file and tell python to do its best. More of a "yell-at-screen" person and less of a "coder".

leaden hedge
#

generally to load a json / xml or whatever into c# you make a class that the json gets loaded into

#

and the class is the correct format

copper nacelle
#

you can use a json object if you want indexer stuff

#

jobject.deserialize or something

nocturne meteor
#

I'd like, ideally, to take that dict out (which currently works!) and put it in some kind of external file to import and reference (which i've not found a solution for :''[ ).

#

I guess it's not a huge problem, I just like to separate my big static data from my code-stuff.

leaden hedge
#

you can probably just do that like

public class LocationJson{
[JsonProperty("locations")]
public Dictionary<string,string> locations;
}
nocturne meteor
#

(Also, pls do not laugh at my code, I have not gotten a reviewer yet and I'm real bad at C#, haha.)

leaden hedge
#

JsonConvert.DeserializeObject<LocationJson>("your json").locations;

nocturne meteor
#

Ah, okay, does that class simply need to exist, or do I need to add some kind of init to the class?

leaden hedge
#

just needs to exist

nocturne meteor
#

And what is the JsonProperty("locations") part of that?

copper nacelle
#

JsonConvert.DeserializeObject<Dictionary<string, string>> should work fine

#

If you declare it as a property you don't need the attribute fwiw

leaden hedge
#

the name of it like

"locations" : { 
  <dict here>
}
#

the indexer in normal json

nocturne meteor
#

Ahh, gotcha.

#

I did try the JsonConvert thing but, for whatever reason, it wasn't having it and I couldn't debug it on my mod. I'll try it out in a stand-alone file and see what I was doing wrong, and then I'll try these. Thanks for the help, y'all! :'']

leaden hedge
#

if it still doesn't work with any of those its probably your json file thats bad, with the way i had it you want it like

{ 
  "locations": {
    "a": "b",
    "c": "d"
  }
}

i think, not 100% sure on dict to json

copper nacelle
#

on an unrelated note do you know ins0mnia or is the name a coincidence

pure nova
#

What's the best way to get the data (I have no idea what's the actual term, (the "variables"?)) from a method?

leaden hedge
#

what are you trying to do

#

in layperson terms that you understand

nocturne meteor
#

Totally a coincidence, but it's a sweet name. Love that 0.

pure nova
# leaden hedge what are you trying to do

Get/use the "variables" from base.transform.localScale = new Vector3(this.scale.x * 1.4f, this.scale.y * 1.4f, this.scale.z); this.anim.Play(this.animName + " M"); in NailSlash.StartSlash.

leaden hedge
#

you want to change them so it does something different?

#

or you just want to read them elsewhere

pure nova
#

I want to be able use the same formula in order to increase the nail size to whatever I want.

leaden hedge
#

assuming you want to change them to do something else use a hook for that function like
On.NailSlash.StartSlash

pure nova
#

I've done something like that, but I have no idea on where to go from there.

leaden hedge
#

On.NailSlash.StartSlash +=
then press tab twice and it'll make a function for you with orig and self

#

in that function do

orig(self);
self.transform.localScale = new Vector3(self.scale.x * 1.4f, self.scale.y * 1.4f, self.scale.z);
pure nova
#

So that's it? I think I massively over-complicated things, sorry for having to ask for help.

leaden hedge
#

that should be it

nocturne meteor
#

Ahh, okay, I know exactly what happened: I tried to get "current directory" (as in, the directory my cs file is in) but it seems to just wanna give me the C:\. Whomp whomp.

pure nova
deep wave
#

is there any negative effect to making a mod work on a more recent version of the .net framework than 3.5?

leaden hedge
#

i wont be able to load the solution on my 2013 copy of vs

deep wave
#

cool, so i don't have to resort to implementing a cursed dictionary that does a linear search over my 300 lines of room names feelspkman

leaden hedge
#

any hashtable?

deep wave
#

i am basic baby who uses the dictionary collection

leaden hedge
#

why are you searching linearly through it

copper nacelle
#

the dictionary is a hashtable

deep wave
#

(dumb joke ignore)

#

i am aware

copper nacelle
#

if you use a framework version over .net 3.5 it isn't guaranteed to load

#

because the actual reference assemblies that are loaded are .net 3.5

#

using .net 4 shit just won't work

#

and tends to cause TypeLoadExceptions

deep wave
#

i did notice some of that, like if i go all the way to 4.8 everything breaks because tuples are defined twice 🥴

leaden hedge
#

wtf is a tuple

#

what cursed shit are you doing, that you have tuples and linearly searching through a dict

deep wave
#

the shit im doing shouldn't be dumb but because i didn't compile on the correct framework it is dumb basically

#

all my code is is a dictionary of (scenename, goodname) where goodname is a name i gave to each room

leaden hedge
#

so dict[scenename]?

deep wave
#

yh

leaden hedge
#

unless you don't have a dict and you have a list of tuples Kappa

#

well that should be a hashtable lookup

nocturne meteor
#

Okay, well. It seemed to work when I did it on a practice app, but I prob moved it around wrong or did something dumb.

If anyone has a sec, can you check my code?

  1. Import Json file: https://github.com/jsal13/KHRDreamCatcher/blob/main/DreamCatcherMod/DreamCatcher/DreamCatcher.cs#L20-L21
  2. Create the class to deserialize: https://github.com/jsal13/KHRDreamCatcher/blob/main/DreamCatcherMod/DreamCatcher/DreamCatcher.cs#L23-L27
  3. Attempt to use it. https://github.com/jsal13/KHRDreamCatcher/blob/main/DreamCatcherMod/DreamCatcher/DreamCatcher.cs#L62

(It's tricky for me to debug this since I'm not 100% sure how to log with this DLL and trying to put Log statements into either classes that reference the internals of the websocket class don't seem to show up on the mod file --- )

leaden hedge
#

AppDomain.CurrentDomain.BaseDirectory is null

#

for unity

#

Application.dataPath

#

is the similar thing

#

that goes to Hollow Knight/hollow_knight_Data for reference on where it is relatively

prime urchin
#

Semi-unrelated, but I'd recommend having just one class per file, with the file's name the same as the class name - it's much easier to keep neat and organized that way. (For a class like LocationJson it's probably fine to keep it as-is because it's so small and only used in that one place.)

nocturne meteor
#

Yeah, I'm going to split websocket + other guy up into two classes in the refactor stage. I just wanted to get it up and running for now. I also haven't linted this at all, or asked for best practice stuff. :'''[

#

But I will, don't worry! Just want to get a MVP out. :']

#

Also, thank you, Katie! Testing it out now.

leaden hedge
#

also to log you can do
HKDataDump.Instance.Log(string)

#

to dump from anywhere in your mod

nocturne meteor
#

is that part of modding?

#

Oh man.

leaden hedge
nocturne meteor
#

I'm dumb.

#

Yeah, haha, I just saw what I named that.

#

Okay, got it. Tryin' that noise out as well!

fervent timber
#

My resource loader is loading the resources.resx file as a resource instead of the actual resources

#

why

jolly jungle
#

Guess who's back for apprenticeship

#

Alright so we're back to the same question from earlier

#

How the hell do I spawn in a spike

ornate rivet
#
  1. Get the spike
  2. Instantiate it
jolly jungle
#

Done first

#

testing the second, which didn't work last time I tried

ornate rivet
#

did you set it active and set its position

fervent timber
#

was there an error or did it just no do anything

ornate rivet
#

have you looked at its fsm

#

the fsm is probably stuck

fervent timber
#

how do you replace charm images?

ornate rivet
#

find the charm and change the sprite

fervent timber
#

I can't get it right

ornate rivet
#

look at lightbringer code

fervent timber
#
 _asm = Assembly.GetExecutingAssembly();
            Sprites = new Dictionary<string, Sprite>();
            Log(_asm.GetManifestResourceNames().Length);
            foreach (string res in _asm.GetManifestResourceNames())
            {
                // if (!res.EndsWith(".png") && !res.EndsWith(".tex"))
                // {
                //     Log("Unknown resource: " + res);
                //     continue;
                // }

                using (Stream s = _asm.GetManifestResourceStream(res))
                {
                    if (s == null) continue;

                    byte[] buffer = new byte[s.Length]; 
                    s.Read(buffer, 0, buffer.Length);
                    s.Dispose();

                    //Create texture from bytes 
                    var tex = new Texture2D(2, 2);

                    tex.LoadImage(buffer, true);

                    // Create sprite from texture 
                    // Substring is to cut off the Lightbringer. and the .png 
                    Sprites.Add(res.Substring(26, res.Length - 30), Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0.5f, 0.5f)));

                    Log("Created sprite from embedded image: " + res);
                }
            }
        }
jolly jungle
#

I assumed the position will be some default thing I'll change later, I just wanted to see it, you know?

fervent timber
copper nacelle
#

why tf are you using resx

fervent timber
#

what am I supposed to use/

#

the resources weren't showing up

copper nacelle
#

you just <EmbeddedResource Include="yeah_i_kill_children.png"/> in an ItemGroup in the csproj

ornate rivet
jolly jungle
ornate rivet
#

hmm? Just do yourGO.SetActive(true)

fervent timber
#

it was already there?

<ItemGroup>
    <Folder Include="Resources\" />
  </ItemGroup>
copper nacelle
#

i gotta say that isn't an embedded resource include

jolly jungle
#

I'm new to this

ornate rivet
#

why would you trust unity to do what makes sense
first rule of modding, never trust anything

fervent timber
#

why is the whole project broken now

jolly jungle
fervent timber
#

okay fixed

jolly jungle
#

Benefit of doubt

#

or whatever its called

ornate rivet
#

maybe

jolly jungle
#

cool

#

good nuff for me

fervent timber
#

the image is loading, but the charm isn't replaced

jolly jungle
#

Alright, it's not working, but I don't think the problem is this chunk

#

When I instantiate the spike, does it just get created without any hierarchy involved above it?

#

Or is it created as a child of the gameobject that holds the script?

fervent timber
#

No idea what the problem is

#

no logs or anything

#

just doesn't work

jolly jungle
true solar
#

just found out this channel, is the modding done on c#

#

?

deep wave
#

yes, using .net framework 3.5

jolly oriole
jolly jungle
#

As in, why these numbers

vocal spire
#

The position of the object

jolly jungle
#

Where do these numbers end up mapping to, though?

potent dirge
#

It's coordinates, I believe floats

vocal spire
#

Yeah

jolly jungle
#

Yes, but where

#

Where in the scene are these coordinates

potent dirge
#

Boxcollider objects somewhere in something ttle scene for one

jolly jungle
#

?

#

Wdym

vocal spire
#

......

#

Those are the coordinates

jolly jungle
#

What do you meannnn

#

I can see the coordinates

#

I'm asking

vocal spire
#

Yes and that’s where it is

jolly jungle
#

Where is that on the screen

vocal spire
#

Your question doesn’t make sense

#

I don’t know

potent dirge
#

Go into the scene and find out

vocal spire
#

We don’t know where the camera is positioned

jolly jungle
#

Where is (69.8, 25.0)

potent dirge
#

It's literally impossible for us to say from just seeing that document

jolly jungle
#

Is it onscreen, or is it outside and then moved inside, is what I mean

vocal spire
#

How would we know

#

We don’t know which scene, where the camera is, ect

potent dirge
#

You have the scene name (we don't), you go in with debug mod or something, and you look for those coordinates

vocal spire
#

We don’t memorize everything

jolly jungle
#

I'd assumed you all here know how they usually do it

#

So

#

I asked

#

But nevermind

potent dirge
#

Yes, we do know, that's exactly why I detailed you one way to find it

vocal spire
#

You asked questions that didn’t make sense and gave you instructions to do it yourself and you insisted we knew somehow

jolly jungle
vocal spire
#

That’s why the question didn’t make sense

#

Where something is in a scene literally is the coordinates

#

So asking where coordinates are doesn’t make sense

#

Unless you are asking in comparison to something else, but again we didn’t know what scene

jolly jungle
#

Alright I have no idea what to do from here

#

I thought maybe I should make the spike a child of the boss or something

#

And then set it to (0,0) centered on the boss

#

does that make sense?

#

Or should I not bother trying

vocal spire
#

Make sure it’s local position that you are setting

jolly jungle
#

Yeah, of course

#

centered on the boss

#

isn't that local?

vocal spire
#

Yes

#

Just be warned I think the spike will damage the boss

jolly jungle
#

How do I set its parent?

#

Nah this is hive knight's honey spike

#

its harmless for the boss

vocal spire
#

Ah

#

spikeGO.transform.parent = boss transform

jolly jungle
#

Hm

#

Alright

#

That's what I thought

#

for a change

vocal spire
#

To make it have no parent set it to null

jolly jungle
#

To access the boss, can I use the fact that the script is on the boss right now?

vocal spire
#

Yes

jolly jungle
#

Cool

#

Thanks

#

I'll be back in like ten minutes if I can't make it work

#

IT WORKSSSSS

vocal spire
#

🔫 you said if you couldn’t make it work

jolly jungle
#

I never said I won't be back if it does work

#

Now I just need to make a few more, and set rotation

vocal spire
#

It will break when the attack with those is used tho

#

It sets their parent

jolly jungle
#

Wdym?

vocal spire
#

Unless you instantiated it

jolly jungle
#

Of course I did

vocal spire
#

The attack that uses the spike things

#

Oh

jolly jungle
#

Didn't touch the original

vocal spire
#

Then it’s fine

jolly jungle
#

I'm not that stupid

#

There is something odd that happens, though

#

After it goes off-screen, it sometimes seems to reenter from some seemingly random location - usually higher and more to the left from where it spawned, so it might be the same offset every time

#

Do you know what causes this?

#

Also, how can I make sure it deletes itself
For now I'll just hope the spike knows how to do it thanks to the original attack, but it might not have been the spike and idk

jolly jungle
#

They don't know how to fire themselves in their own directions

#

Perhaps because they were all copied off one spike?

#

And that spike went in a certain direction

#

hm

#

So how do I find this, and how do I change it?

jolly oriole
#

var hks = gameObject.GetComponent<HiveKnightStinger>();

jolly jungle
#

...makes sense

#

I can't do that rn, though

#

So I'll test it out tomorrow

#

see what type of thing that even is

jolly oriole
vocal spire
#

What is it

jolly jungle
#

Godhome, it seems

jolly jungle
#

Alright, suppose I want to replicate the HiveKnightStinger, but make it fly in the direction the spike is now pointing in instead of the original direction of the spike?

#

Or, if possible, make HiveKnightStinger take the stinger's new rotation into account

#

All original stingers have the same component, after all, so it kind-of-makes-sense that the component takes in the original rotation, and when I set for them a new rotation, HiveKnightStinger doesn't take it into account

leaden hedge
#

this.direction ?

#

unless you're asking for how to get the normal vector of the rotation

#

then its just setting
HiveKnightStinger.direction = HiveKnightStinger.transform.forward

jolly jungle
#

Can you explain?

#

Like, the meaning of what you wrote

#

What is the direction property?

leaden hedge
#

its the normal of the rotation

jolly jungle
#

Sorry for the late reply
but

#

I don't understand how to apply this

#

The spike has a script moving it in some direction

#

the original direction of the spike

#

What I want is to make the script acknowledge the change in direction

#

Wait I'm an idiot

#

That's what the code you sent is for, right?

#

Wait what even is that code from?

#

Aight so what I'm seeing here is this

#

in Update
finds x and y components of the velocity the thing should have
sets those in velocity
set the actual velocity to velocity
takes down the timer, once that runs out it disactivates itself

#

So should I stuff some code like this into a script, delete the first script on each spike, and then place this on each of them?

vocal spire
#

Why not use the original script

jolly jungle
#

I don't know how to make it know the current direction

#

That's my problem right now

#

Ugh I can't figure out how to use this

jolly jungle
vocal spire
#

Bruh they already gave you the code

#

StingerGO.GetComponent<HiveKnightStinger>().direction =

vocal spire
jolly oriole
vocal spire
#

Are you cloning the room at runtime, using a assetbundled clone, or just using the exact same scene?

jolly oriole
#

currently it's the same scene, just needed to be able to go in the (to be) additional room

vocal spire
#

Ah

#

Looks like it’s going to be really cool

nocturne meteor
#

:'] Early last night I got that rando area-item-spoiler tracker app thing I was working on to auto-track when the player gets an item in the game, and it was a great feeling. Thanks for the many and varied help, y'all. I'll share a bit more when I work out the kinks, etc.

jolly oriole
#

made the boss scene cloning better, you can watch me in vc try it and respawn at the wrong statue lol

charred crest
ornate rivet
#

nice

somber cliff
#

When I run this code - https://github.com/SalehAce1/HKRoom-Tutorial - the "NewRoom" scene just copies the scene settings from the previous scene... is On.SceneManager.Start += SceneManagerOnStart; correct or is there a different method to tweak the scene settings/themes ?

ornate rivet
digital stirrup
#

that is really cool who every made that

somber cliff
#

Unfortunately not, uses the town settings which is where i replaced the pos

ornate rivet
#

hmm maybe something needs to be changed, try logging to see whether the hook is running properly

somber cliff
#

Judging by the names im guessing im speaking with the creator - so thank you very much for the github code 🙂

ornate rivet
#

np lol

somber cliff
#

yeah so, also new to C# 🙂 - but I can do some logging, I suspect that SceneManagerOnStart only gets called when instantiated and the scene var is null. So that block never gets called.

#

but I can confirm.

#
            {
                Modding.Logger.Log("I bet 50 bucks this wont get logged " + scene);```
ornate rivet
#

maybe log scene before the if statement as well

somber cliff
#

hmm, it actually does get called. But the scene settings was still Town 🤔

#
[INFO]:NAME Town
[INFO]:[API] - Main menu loading
[INFO]:[API] - Saving Global Settings```
copper nacelle
#

yo hand over the 50 bucks

somber cliff
#

🙂

somber cliff
#

yeah the method seems to be invoked but just not taking affect

#
[INFO]:NAME Town
[INFO]:NAME NewRoom
[INFO]:NewRoom
[INFO]:Scene is NewRoom
[INFO]:I bet 50 bucks this wont get logged NewRoom
[INFO]:NAME Town
[INFO]:Scene is Town
[INFO]:[API] - Main menu loading
[INFO]:Scene is Town
[INFO]:[API] - Saving Global Settings
vocal spire
#

Could there be a error in it?

#

Bro gimme 50 bucks

somber cliff
#

insta regret

ornate rivet
#

weirdd

somber cliff
#

lemme try turn saturation up and make the colours weird

#

and see if that affects the town or both or none

ornate rivet
#

@jolly oriole what's your way to set scenemanager settings in your custom scenes?

vocal spire
#

Hold on the code for that worked for me too

somber cliff
#

where are you coming from?

#
            {
                CreateGateway("right test",
                    new Vector2(128f, 11.4f), new Vector2(1f, 4f),
                    "NewRoom", "left test",
                    true, false, GameManager.SceneLoadVisualizations.Default);
            }```
vocal spire
#

Was testing extremely large scenes a long time ago and pretty much copied everything but replaced the assetbundle

somber cliff
#

i set my gateway next to elderbug

vocal spire
#

What specifically isn’t working

somber cliff
#

map zones/scenetypes all that stuff is just Town

#

sec

vocal spire
#

Where do you set the map zone

somber cliff
vocal spire
#

Is it exactly that

somber cliff
#

yip

vocal spire
#

Nothing changed?

somber cliff
#

nothing, but wait for it

#

i changed the colour and saturation and when i came back into town

vocal spire
#

I think I see the problem

#

Just one more check

somber cliff
#

?

vocal spire
#

Nvm

#

I don’t see the problem with the code but I think for some reason you’re setting the scene name after editing the scenemanager

#

So the scene after the target scene is edited

somber cliff
#

yeah I can fiddle with it a bit, i mean i just git cloned it but something is up

vocal spire
#

K

somber cliff
#

thx

jolly oriole
#

so basically just a fancy way to instantiate a preloaded scenemanager

somber cliff
#

hmm, is that a private repo i assume>

jolly oriole
#

yes

vocal spire
#

when will you be finished I want to play the boss

ruby sand
vocal spire
#

Are you viewing it on mobile

ruby sand
#

Macbook.

vocal spire
#

¯_(ツ)_/¯

jolly oriole
#

likely copied it from the if, which then copied only the starting whitespace of the lines after that

whole delta
#

Are there any mods that give you all the achievements? I recently got this game on steam after getting all achievements on the Nintendo switch. So ya know.

copper nacelle
vocal spire
#

nice asking in all modding channels

midnight narwhal
#

when is ModHooks.SceneChanged() ran?

vocal spire
#

you should probably use UnityEngine.SceneManagement.SceneManager.ActiveSceneChanged instead.

#

people seem to have problems with the modhooks ones for that

midnight narwhal
#

oh

#

ok ty

wary whale
#

Just realised, I should probably be asking questions here, instead of the discussion thread.
Thanks @young walrus for the dll this morning, used that as a starting point to get music swapping working.

#

You didn't need to implement anything to get the greenpath music playing again btw, music just doesn't play in some areas.

#

Got it so that music is replaced by a .wav file, with a name matching the MusicEventName whenever a new music track is loaded. But it can still be a bit weird in areas, like for example crystal peak, where 1 room will have the music channel enabled, and the next will only have ambiance. Bit jarring to have this: https://www.youtube.com/watch?v=DRHhg2DD4rY
blaring in one room, then almost dead silence in the next.

Cover of Crystal Peak (and a little Dirthmouth) from Hollow Knight.
It was hard to choose a song, the whole soundtrack is fantastic.
Please subscribe if you like it.

Original Music by Christopher Larkin
Game by Team Cherry

▶ Play video
#

Planning on getting other sound sources swappable soon, maybe even by resource name if I can figure that out.

young walrus
#

That's because background music is split into 3 or 4 tracks per area

#

All playing at the same time. But volume of different parts is turned up or down depending on room triggers

somber cliff
wary whale
#

Would be sick if one of these youtuber musicians doing these covers could release the track with layers. Or get a live orchestra or remaster of the original.

somber cliff
jolly oriole
nocturne meteor
#

I'm a little stumped on this one, so if anyone has any ideas, pls! I get most of these event calls ("hasDreamNail", "hasLantern", etc.) but the dreamer ones seem to be the only ones I don't get.

These, for example, from iamwyza's tracker:
https://github.com/iamwyza/HollowKnightRandomizerTracker/blob/master/default.js#L732-L736

Is there something weird and special about these? Seems strange that they're the only ones that don't get sent to my mod.

naive rain
#

so MaskBrokenLurien (or the other Event Calls for Dreamers) just doesn't get sent to your mod? Weird

nocturne meteor
#

Yeah, it's bonkers. Idk, I'm skimming through it now, but it's weird that it's the ONLY ONE. And I feel like I wouldn't just exclude that for no reason.

naive rain
#

I'd help if I had experience with modding Hollow Knight

nocturne meteor
#

Just wanted to check there wasn't some like, "Oh, to get dreamers you need to XYZ" caveat.

copper nacelle
#

do you have any other mods on

naive rain
#

I unfortunately only have experience with modding Terraria and that's wildly different

naive rain
nocturne meteor
#

Oh, good call 56. Lemme try disabling everything.

#

I'm a bit new at mod making, I gott'a learn how to debug all over again. :''']

naive rain
#

Whenever I test mods for other games, sometimes other mods do screw over mine

#

So that's probably what is happening here

nocturne meteor
#

Alas, that doesn't seem to be it. Okay, if there's nothing special about the dreamer events, I've probably screwed something up in the code. Thx all, I'll come back if I can't figure anything out.

nocturne meteor
#

Style question for C#: say that you have a line that's kind of a functional chain of methods:

var spoilerArray = spoilerText.Split(new[] { "\n\n" }, StringSplitOptions.None).ToList().Where(x => !String.IsNullOrEmpty(x)).ToList();

Do you like this as one line, or do you like to break it up?

var spoilerArray = spoilerText
  .Split(new[] { "\n\n" }, StringSplitOptions.None)
  .ToList()
  .Where(x => !String.IsNullOrEmpty(x))
  .ToList();
copper nacelle
#

i do the latter

#

it's cs for the code blocks btw

nocturne meteor
#

(I looked up the style guide for C# but I couldn't find anything for this explicitly; C# seems to like to do one-line-one statement except LINQ, but I think this works better with the latter.)

vocal spire
#

depends on if I'm planning on uploading the source

copper nacelle
#

depends on how long it is too

vocal spire
#

personally I don't care how long

nocturne meteor
#

Yeah, I mean, one or two methods is prob fine for one line.

#

I guess I tend to try to do a lot of it functionally, so I get some longer chains of things.

copper nacelle
#

you shouldn't need the first ToList

#

fwiw

nocturne meteor
#

Oh, nice. Ezpz, took it out! Haha. At some point, I'll ask for some code critiques just so I can get better at this noise. :']

#

And should I care about using Dictionary vs. Hashmap? I've opted for dictionary most of the time.

copper nacelle
#

dictionary is backed by a hashmap anyways

nocturne meteor
#

Cool. Most of the stuff I'm doing in c# is googling, "c# how to do X like Python". :']

vocal spire
#

sounds fun

nocturne meteor
#

Haha, hey, at least I can put C# on a resume now. "Fluent in C#." zotewheeze

unborn flicker
nocturne meteor
#

Thank you! Unfortunately, it's still the same deal: I get every item/ability/spell except the dreamers --- though, if they're at a store, I do get an event from the RandoMod which is something like RandomizerMod.Dreamer.Monomon, but I can only parse this if they're at a store --- and I'm doing it v similarly to how the tracker does it.

If anyone has a few minutes and wants to just check me, the relevant lines are:

  1. https://github.com/jsal13/KHRDreamCatcher/blob/main/Mod/item_loc_data_dump.cs#L29-L31 (Initializing the WS, putting in the hooks).

  2. https://github.com/jsal13/KHRDreamCatcher/blob/main/Mod/websocket.cs#L30-L42 (The hooks themselves; note, to debug this, I have a simple "send" method with the string item at the top. Regardless of the bottom part, it still should send the item string.)

  3. https://github.com/jsal13/KHRDreamCatcher/blob/main/App/dc.js#L22 (How I parse the WS message; note that we start with a console.log(m) which parses every one of the strings and events that get passed.)

I'm stumped with this one, tbh.

#

The tracker gets this event, which makes all of this way more bonkers for me. I don't know where to go from here to debug. :'[

vocal spire
#

so the dreamers aren't being logged?

nocturne meteor
vocal spire
#

I'll take a loot

#

*look

jolly oriole
#

yep, the playerdata page doesn't show most fields, i wrote that lmao

vocal spire
#

lol

#

only bool I found for dreamers is ```csharp
dreamerScene1

#

well the only bool with dreamer in it's name

nocturne meteor
jolly oriole
#

bools lurienDefeated, hegemolDefeated, monomonDefeated and the int guardiansDefeated

vocal spire
#

those would be the bools

nocturne meteor
#

But I don't get the latter two events (for Area rando, since my thing is item rando only, or monomonDefeated). I should, I guess, be getting RandomizerMod.Monomon / RandomizerMod.Dreamer.

vocal spire
#

I'm slow

#

again

nocturne meteor
#

Okay, yeah, I do not get those bools. Do those get sent when the mask is picked up?

#

In item rando, let's say.

jolly oriole
#

should ig

nocturne meteor
#

There's also something like maskBroken or something as well.

jolly oriole
#

that's for the masks on the black egg entrance

nocturne meteor
#

Ah, got it. That makes more sense, haha.

#

Hm, yeah, I'm not sure. I'll try to delete my mod dlls, get new ones, and see how that works.

mossy saddle
#

So, I’m making a custom Knight, and I need tips for making the sprites

proven cipher
#

What do you need?

mossy saddle
#

I’m making the character delicate flower related

#

The problem is I don’t know which animation is a continuation of which since some are in different areas

deep wave
#

doesn't spritepacker group animations together?

#

memory serves correctly, you can dump the sprites like this then repack them into the full atlases (in pins)

potent dirge
#

this post was yesterday from nes, they might have something to help

nocturne meteor
#

Ugh, full re-install of everything + new dlls everywhere didn't give me any dreamer events. I'm def doing something wrong in the code, I have no idea what. Alas. If y'all have any ideas, I'm game. Otherwise I guess I gott'a just do something else with the dreamers. #archived-modding-development message

unborn flicker
#

Oh, this is just a limitation with the modding api hook. The hook is invoked when the PlayerData SetBool method is called, and the api replaces all field assignments in the original code with that method. But if a mod assigns a field directly rather than by SetBool, it won't trigger the hook.

dark wigeon
dark wigeon
nocturne meteor
#

Thank you, Homothety! That makes sense. I'm glad that I'm not going crazy. I'll try to emulate this as best I can. :']

blissful burrow
#

I stand by changing rando to use the proper methodology to be the better solution long term

#

But it also does not affect me at all anymore

nocturne meteor
#

I'm a bit confused on what to do here either way --- I'm also not sure how the tracker was able to find the dreamers without using that bingo UI thing.

#

(This prob has more to do with my lack of C# understanding than anything.)

whole delta
#

I was working on making a texture pack for my wife but the ghost comes up looking all 8 bit.

nocturne meteor
#

I couldn't figure out the overrides for the above, so I settled on a grosser solution. It works, but, you know. At what cost.

protected override void OnMessage(WebSocketSharp.MessageEventArgs e)
  { 
    ...
    else if (e.Data == "/dreamers")
    {
      if (PlayerData.instance.monomonDefeated && !messagedMonomon) { MessageBool("Monomon", true); messagedMonomon = true; }
      ...
    }
    ...
}

And I have the js ping it every ten seconds or so. So, worst case the user waits for the dreamer to track for about 10 seconds.

Not great, not efficient, but, hey, it works.

#

If I can figure out the above, I'll refactor, etc. But I'm trying not to get roadblocked too much by anything to get a beta out.

leaden hedge
#

just hook HeroController.FixedUpdate if you're going to poll the state, it only gets ran 50 times per second, and you're only going to get pickups whilst the knight exists
and 3 bool comparisons and 3 bool sets is functionally instant, so its no performance overhead

nocturne meteor
#

Woah, 50x per second, and here I thought that 1 time per 10 seconds was a lot. Haha.

#

Do you think HeroController.FixedUpdate would be overkill if I don't need the state to return in a super-prompt manner? Or is it just better practice to do that since that's the intended way to poll state?

potent dirge
#

You should probably just poll it each time for ease of implementation over finicky solutions that end up being slower and more complex tbh

#

1/50th of a second is a ton of time to the computer

#

The best solution is making your own protocol where the websockets listen for specific int identifiers to determine what branch to activate ax2uWide3

nocturne meteor
#

I felt bad about making the computer work so hard but maybe it's okay. :']

blissful burrow
#

Just hook rando

#

I'll try adding heavy comments to the bingoui file if this is going to become the standard

#

Essentially it's just

  • You get the type (navigating the namespace of rando to arrive to the class you want)

  • You check the type exists (this makes sure rando exists and is loaded)

  • You create a Hook object that has both the rando method you're hooking (Probably GiveItem, this is where you were confused I believe? It's not something you create, it's a randomizer method) and your own method that you want to override it with

  • You define the behaviour on said method. If you just want to fix rando to be compatible with dreamers, you just call orig(arguments) so that the rando method runs, then check if it was a dreamer and do SetBool(dreamer, true)

brazen gulch
#

hi

#

do u guys hve the google drive?

jolly jungle
#

Oh wait yeah you said so right above that

jolly jungle
brazen gulch
#

nvm

#

is it possible somebody could make me a custom sushi skin?

jolly jungle
#

why don't you make it yourself?

blissful burrow
nocturne meteor
#

I was about to reply to you, thanks for taking the time to explain that! Yes, that is exactly where I was confused, re: the hook object GiveItem.

#

Okay, just in case this becomes a standard, I'm gonna try to go through the exercise of creating one and see if everything is cool or if anything could be cleared up, etc.

blissful burrow
#

I didn't bother adding the comments for plando because it's mostly the same

#

I think I already had the differences commented from when I made it but I'm not too sure

unborn flicker
#

Plando is simpler because ItemChanger has a public hook.

nocturne meteor
#

Yeah, that's legit. I think a lot of this just is me not knowing C# well, but it is a bit confusing w/rt where all the hooks are coming from, so it's nice to have a standard.

blissful burrow
#

Did you move the hook yet Homothety?

#

To me the hook was slightly inconvenient because it runs at the start rather than after

#

So I had to delay by a frame

#

I think that was the difference

unborn flicker
#

Ok, I'll keep that in mind and add an after hook in the future.

nocturne meteor
#

Oh, wow, this is some extensive documentation. This is awesome, I'll try it out when I get outt'a work.

leaden hedge
#

the hooks are coming from monomod detours

#

you can hook any function, including property get/sets

#

nothing really to do with c#, its IL hacks, so basically a library that lets you rewrite code at a runtime

copper nacelle
#

I mean il is the bytecode for c# I wouldn't call them unrelated

nocturne meteor
#

What's IL?

copper nacelle
#

intermediate language

nocturne meteor
#

In-line?

leaden hedge
#

i mean its functionally like changing asm

copper nacelle
#

clr bytecode

nocturne meteor
#

Oh, haha, whomp whomp.

leaden hedge
#

its not a c# feature

copper nacelle
#

hooking isn't but dynamically emitting IL is part of the stdlib

#

i guess you could throw assembly into a vec and transmute it into a function pointer but that's not very portable

nocturne meteor
#

Ah, okay, got it. Yeah, I'm still getting used to the structure of the whole project. I know that a lot depends on the assembly-csharp thing --- which, I think, works as a map between the game itself and being able to do things from the c# side?

#

And then, aside from that, is the Modding library, which I guessed was an API to do nice things with the Assembly-Csharp thing. And then rando is rando-specific.

leaden hedge
#

assembly-csharp is just the code for the game

#

the modding api, mainly just applies monomod to assembly csharp

nocturne meteor
#

Okay, that makes sense --- I see a lot of game-stuff in the Assembly-CS thing, so that makes sense. What is Monomod?

#

Ah, okay, this is a moding framework.

#

I should def read through this then.

#

Okay, so the Seanpr96 mod is --- is that the monomod connection?

leaden hedge
#

the only part thats really relevant to an enduser, is the runtimedetour

copper nacelle
#

seanprcore is just a library for some shit

leaden hedge
#

the rest of monomod is just for adding the stuff in ModHooks.Instance

nocturne meteor
#

Haha, okay, it's on the Monomod github so I figured it was important.

copper nacelle
#

that's presumably a link to HollowKnight.Modding which is the modding api

nocturne meteor
#

Ahhh, okay, yes, you're correct.

#

Okay, dumb question: if all the events are exposed in Assembly-CS, what does Monomod add?

leaden hedge
#

those are added by monomod

#

and even then those are manually setup

nocturne meteor
#

Okay, so someone legit had to go in, inspect the assembly, then made the Monomod thing so that the Assembly-CS stuff would be hookable?

leaden hedge
#

Monomod also adds
On
and
Detours

copper nacelle
#

Monomod the prepatcher let's you inject code which is what all the modding classes are put in via

#

the on/hook/detour stuff is monomod's runtime detour component which let's you hook any arbitrary function

leaden hedge
#

basically we specifically hooked common stuff with bespoke hooks via monomod

#

and monomod also has hooks for everything

#

if you know how

nocturne meteor
#

Okay, so then the randomizer mod was made with the monomod hooks as well.

#

But, for some things (like the dreamers emitting some value maybe?) it might have overwritten some method so it never needed to call the hook from monomod. Something like this?

copper nacelle
#

randomizer has its own pickups which do whatever they want

#

and thus they can set stuff without going through PlayerData::SetBool via direct field access and so your hook doesn't get anything

nocturne meteor
#

Yeah, I believe this is what was noted to me before --- yeah, okay, so the hook still exists (somewhere) but the action isn't hooked in to it, so it never gets called directly --- okay, okay, okay. Cool.

#

Thanks y'all, this was v informative. I'm still new, but I'll try to keep track of things that I find hard to do, so I can write up a beginner guide at some point or something.

leaden hedge
#

in the case of rando it does this

                    switch (item)
                    {
                        case "Lurien":
                            if (PlayerData.instance.lurienDefeated) break;
                            PlayerData.instance.lurienDefeated = true;
                            PlayerData.instance.maskBrokenLurien = true;
                            break;
                        case "Monomon":
                            if (PlayerData.instance.monomonDefeated) break;
                            PlayerData.instance.monomonDefeated = true;
                            PlayerData.instance.maskBrokenMonomon = true;
                            break;
                        case "Herrah":
                            if (PlayerData.instance.hegemolDefeated) break;
                            PlayerData.instance.hegemolDefeated = true;
                            PlayerData.instance.maskBrokenHegemol = true;
                            break;
                    }

which doesn't trigger the hooks, why it works for PDT i dunno, i didn't write that part of it Kappa

#

it would be nice if there was a fixed place for everything to send relevant updates (not even specifically pickups), that any other mod could just read
instead of having to look through mods code and detour their methods to do that

jolly oriole
#

just send it through playerdata lol

blissful burrow
#

essentially
thing.field = something like rando does is invisible
thing.SetInt(something) will make anything that is hooked to SetInt fire

nocturne meteor
#

Okay, that makes sense. I've seen the code above, and with what Acrid notes here, it totally makes sense why I'd get pret much every event but the dreamers. Okay, coolio. Yeah, that would be nice [to have a standard event stream or something]. I know there's prob a reason for it, but wouldn't setting the bool in playerdata for this (maybe in addition to these things above?) be okay AND give us the event?

copper nacelle
#

yes

#

pring rando is about 8 times easier than hooking it

leaden hedge
#

also technically thing.field = something isn't always invisible, if its a property with a setter you can detour set_field FeelsOkayMan

#

and get_field for getters

blissful burrow
nocturne meteor
#

hahaha

jolly jungle
#

out of curiosity @nocturne meteor
what are you working on?

stark marten
#

is there a way to look at hollow knights code? like enemy behaviour?

#

im trying to make my own game and ive been struggling on some enemy behaviour so i want to look at the hk enemy code to figure it out, becuase i cant find an awnser to my probleme, plus itll be intresting

jolly jungle
#

fsmviewer

stark marten
#

thanks

jolly jungle
#

no problem

#

good luck

stark marten
#

thanks again

#

wait how do i use it

jolly jungle
#

you select scene

#

and then the fsm you want

stark marten
#

no where do i put the files

jolly jungle
#

This explains it

stark marten
#

oh

#

k

#

i still dont get it

#

where do the fsmviewer files should go

#

am i suppused to put it in the hk file or not

ornate rivet
#

fsmviewer doesnt make files

#

just open it like any other application

stark marten
#

the shit i downloaded i mean

#

theres no exe

ornate rivet
#

there is

stark marten
#

where

#

i cant find it

ornate rivet
stark marten
#

yeah

ornate rivet
#

well it's in there

stark marten
#

where

ornate rivet
#

you did not download fsmviewr2.zip

stark marten
#

wtf

ornate rivet
stark marten
#

hold up

#

oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooh

#

i downloaded straight from the home page

#

thanks

ornate rivet
#

np

stark marten
#

i see that in hkworld edit you can use fsm

#

or is it something else

vocal spire
#

Tmk hk world edit doesn’t support editing fsms(?)

#

If it does then shroompog

ornate rivet
#

it does not

jolly jungle
#

world edit?

ornate rivet
#

lets you edit the game in unity

jolly jungle
#

hm

#

I'll need to check it out later

#

way later

ornate rivet
#

iirc exporting it to HK doesnt work in the latest version

jolly jungle
#

Eh, the later version will work

#

eventually

dark wigeon
#

worldedit1 I think has a window for fsm viewing

#

but not anything past that

mossy saddle
#

Where do i get ahold of Mola? She designed the pale lurker statue

ornate rivet
#

She's KitsuneMedia

#

@KitsuneMedia#0272

nocturne meteor
#

(This has more items than I usually track, it was for a debug thing I was doing. Usually it's just dreamers + major spells / abilities.)

jolly jungle
#

interesting

#

is this the result of a randomiser, in the picture you gave?

nocturne meteor
#

Yeah, it prob wouldn't be as useful in Vanilla, haha.

jolly jungle
#

Ah, true, heh

misty ether
#

@copper nacelle Your most recent link in #resources is malformed. It is releases/tag/latest when it should be releases/latest. Sorry to bother you.

copper nacelle
#

ah mb

#

ty

misty ether
#

Np, now I know how to link to latest release on github

jolly jungle
#

damn

#

I wish I could find something like that

brazen mortar
#

why do i have a ghost ping here

copper nacelle
#

but I didn't see it

brazen mortar
#

kay ty

jolly oriole
ornate rivet
#

this has happened before

jolly oriole
ornate rivet
#

Cutting at the boss reveal eeeeeeeee

vocal spire
#

Was wondering the difference, then realized it’s s gameplay trailer

#

Why did discord just show I had a ping here

shrewd jackal
#

hello. what would be the easiest way to read out the metadata (hp, phases, properties) of certain enemies/bosses? I just want to extract them from the game files. I had a look at the Assembly already, but apparently it is not stored there? Anyone can point me in the right direction? thanks!

copper nacelle
#

fsmviewer

shrewd jackal
#

I just had a look at some of the files. But I could not find the HP for Pure Vessel for example. Would you mind sending me a screenshot on where to find it? Thanks!

vocal spire
shrewd jackal
#

I appreciate your response, however, I want to extract them. I know there is a debug mod, and there are also mods dedicated for just showing HP bars..

vocal spire
#

There is the hp bar mod

#

It doesn’t show exact values

#

But

copper nacelle
#

me when i don't answer the question

vocal spire
#

The scene dumps in the pins might work for you. If you use ctrl + f to find healthmanager, you will find all enemies

copper nacelle
#

it doesn't show hp

#

you can check the fsms for the phase calcs

vocal spire
#

Wait it doesn’t?

#

Oh wait I forgot lol

#

Been a while since I checked them

shrewd jackal
#

well there is no explicit final number on it.. it shows some HP. for each phase..

copper nacelle
vocal spire
#

Yes, I know I’m dumb

shrewd jackal
vocal spire
shrewd jackal
#

sure, coding is not a problem. but idk how to approach it. not modding in general, but where is the HP of each enemy stored? and when it is a mod, does the game have to be loaded (and scene) to work?

copper nacelle
#

on the HealthManager component, yes and yes

vocal spire
#

HealthManager component

shrewd jackal
#

ah nice

vocal spire
#

Just HealthManager instance.hp I think

copper nacelle
#

you can have the preloader load the scenes or load them manually if you just want to dump shit

shrewd jackal
#

is the healthmanager attached to the scene, or to the boss? then I could just spawn the boss, dump it, remove it

#

right?

copper nacelle
#

boss

shrewd jackal
#

alright nice, will take a look. thanks both of you!

vocal spire
#

Np

dark wigeon
#

Are you saying the scene dump isn't showing health manager values?

lusty haven
#

where did you guys learn to mod

#

idk anything at all

#

but I wanna make a mod of my own so if someone could help me with that I would be very happy

floral furnace
#

Get yourself ILSpy so you can inspect the game code, then get yourself an IDE that compiles C#

lusty haven
#

thanks :D

jolly jungle
nocturne meteor
#

Do y'all use ILSpy a bunch? I haven't heard about it before now.

floral furnace
#

i personally use it when i wanna know what variables to screw around with in the HeroController class, dunno about the others

#

good for inspecting monobehaviours too

nocturne meteor
#

Huh, neat. I'll haft'a learn how to use it. I kind of just hope that someone's had the same problem before and search discord. haha.

floral furnace
#

its pretty much just a decompiler

#

back then before the API people would use DNSpy to directly alter the code but thats messy since youre changing the assembly-csharp directly

nocturne meteor
#

Yeah, I was gonna ask what the diff would be between using this and looking at the obj explorer for assembly-csharp.

floral furnace
#

cant really tell anything about since ive never touched the obj explorer 🥴

nocturne meteor
#

haha, i think it does like the same kinda thing but idk! :'] i'll look at this tho. i am but a c# baby so i'm tryin' all the things out.

#

"wow you have to say what type of thing you are using? this language is CRAZY."

potent dirge
#

I use dnspy for now just to view the game logic, it's really nice for that. I did code some in it as well, but that experience is worse than huge oof 🥴

#

The obj explorer in visual studio is good n all, but just the readability in dnspy and ability to simply mouse click to find where something is defined etc is just super smooth, coupled with back and forward like in Internet history

#

If you know the obj viewer properly that's probably good as well, but I feel like I saw 56 say the decompiler there was subpar at some point apolThink

#

(don't quote me on that unless it's for the meme, pls. Tried searching but couldn't find it)

reef ravine
#

just noticed the MP pre release mod

#

who makin it

jolly jungle
#

What's the difference between DNSpy and ILSpy?

leaden hedge
#

dnspy is better

jolly jungle
#

Aight, good enough difference for me

#

Thanks

leaden hedge
#

its a fork of ilspy, but uses a few extra libraries

#

specifically dnlib instead of mono.cecil

#

apparently mono.cecil sucks and dnlib doesn't Kappa

jolly jungle
#

Good to know

#

I have no idea what that means though zote

copper nacelle
#

dnspy doesn't make your eyes bleed

#

but i think at this point ilspy has better output as far as actual decomp goes

#

it avoids extraneous locals too which is nice

#

no ```cs
bool flag;
if (flag) {
}

#

still not worth my eyes bleeding

leaden hedge
#

isnt that just because its reading it as is

#

and not trying to guess what it was

copper nacelle
#

i mean that's the point

#

otherwise it would be a large amount of goto

leaden hedge
#

I mean the IL is doing this

bool eval_stack[0];
if( eval_stack[0] ){
}

Kappa

#

i guess it should just look ahead to check that the eval isn't used again

nocturne meteor
#

Awesome, I'll try DNSpy out soon then and report back on how I either love/hate it. zotewheeze

glacial harbor
#

Can someone make a mod to change the death animation to make it shorter

#

Or skippable

gilded lotus
#

there are resources in the pins to help you get started making your mod

somber cliff
#

is there an example showing how to replace the built in camera with my own camera object?

jolly jungle
#

I just tried p3 again, still didn't beat it
And I legit forgot I had my hive knight mod enabled

#

It was... short and painful.

chilly ginkgo
#

how much work would it actually be to mod in updash with dashmaster?

leaden hedge
#

minimal

glacial harbor
leaden hedge
#

herocontroller.dashvelocitychange

#

or ondashpressed

#

or actually
On.HeroController.HeroDash

do orig(self) then this.dashingUp = (self.inputHandler.inputActions.up.IsPressed && self.playerData.GetBool("equippedCharm_31");

then in herocontroller.dashvelocitychange you do something like

  if ( this.dashingUp ){
    if (HeroController.Instance.playerData.equippedCharm_16 && HeroController.Instance.cState.shadowDashing)
      {
        return new Vector2(0,HeroController.Instance.DASH_SPEED_SHARP);
      } else {
        return new Vector2(0,HeroController.Instance.DASH_SPEED);
      }
  }
#

gradows blackmoth has some stuff for making it look correct

stuck dome
#

I'm wondering whether it's possible to create your own mods for HK, and if so, can I do it on my mac?

vocal spire
#

Also check the pins

stuck dome
#

ok thanks

young walrus
#

Nope. Impossible to create mods. They just randomly materialize out of the chaos of the universe from time to time

proven cipher
#

Watching somebody run Rando with the easy item hints mods and wanted to suggest settings for things like True Ending/any%/no ending etc.

That's the whole post.

river jetty
#

what would the settings do

proven cipher
#

Currently the tracker shows 3 dreamers, but if you choose no ending they don't show, true ending would show dreamers and fragments.

leaden hedge
#

if you mean my tracker

proven cipher
#

Anyway Mel was in chat on the stream so I didn't need to post it here

#

No the easy mode tracker

#

It shows you the address certain items are in

#

It's a really neat little addition and I think could make for a good compromise for spoiler dab

leaden hedge
#

do you mean making it so the required items by the rando settings are shown and nothing else

proven cipher
#

Err, making it so that you can refine what items it shows, is the long and short of it.

#

Apparently they're already working on it. 😊

nocturne meteor
#

Yep! Already working on it. thx for these suggestions, I like seeing what people dig.

deep wave
#

Am i correct in assuming the only way to see version num of a mod outside of the game is by loading the assembly using reflection?

leaden hedge
#

which version

deep wave
#

build number returned by GetVersion()

leaden hedge
#

right click propertiers details gives you the assembly version

#

if you want to see the GetVersion you have to load it in dnspy ig

deep wave
#

would i not be able to load the Mod type from the assembly and call GetVersion()?

leaden hedge
#

what if getversion uses something only in assembly-csharp

deep wave
#

oh, so i'd have to load EVERYTHING the game has first in order to do so?

leaden hedge
#

i think if something references a specific assembly, you need to include that too

#

so yeah you should need to load assembly-csharp too, to load a mod dll

#

you can load in reflectiononly mode

#

but thats examine only not execute

deep wave
#

so theoretically i could inspect the GetVersion() routine if it exists and find what value it returns? unless of course GetVersion() needs to do calculations, like in rando's case

leaden hedge
#

i think examine would just let you see what it is, like public/private return type args

deep wave
#

that is less helpful feelspkman

#

i suppose in my use case i could just load everything, i already have access to game and moddingapi files

copper nacelle
#

running anything with a unity ref outside unity goes poorly

graceful thunder
#

Hi, does anyone know how/where to get the Hollow Knight code as can be seen from this reddit post? The user doesn't seem so active on reddit so I figured I'd ask here for now.

lean vortex
#

That looks like code decompiled with something like dnSpy

graceful thunder
#

@lean vortex ahhh got it thanks

fervent crater
#

So like I did a room / item randomizer and the first three items I picked up were the three dreamers

jolly jungle
#

Aight, so
funny story
Modinstaller still works
Only mass disable button doesn't work

#

Anyways

#

I;m gonna continue solving my problems in creating a more powerful Hive Knight

jolly jungle
#

Why does my mod not appear?
even though, other than that, it does work as it should

potent dirge
#

I think this part brushes upon it

jolly jungle
#

Doesn't really answer my question, sadly

Assuming you’ve done everything correctly you should now be able to build your mod and install it by moving the compiled DLL into ~\Hollow Knight\hollow_knight_Data\Managed\Mods if the API is installed you should see your mods assembly name at the top left followed by what you made public override string GetVersion() return.

#

Anyways, thanks

potent dirge
#

i think the api just reads the names of the assemblies it reads, aka the ones in /mods

jolly jungle
#

On an entirely unrelated note, you said DNSpy is better than ILSpy, right?

jolly jungle
potent dirge
#

I think 56 said they were both good, DNSpy looks better, ILSpy occasionally decompiles a bit better in terms of not setting bools for one time use 🥴

jolly jungle
#

Hm

potent dirge
#

there's a releases tab to the right

copper nacelle
#

mod classes within loaded assemblies are the shown names

jolly jungle
leaden hedge
#

do you have : Component

#

after your class name

jolly oriole
#

or : MonoBehaviour

leaden hedge
#

what you even doing

#

didn't we already fix this without a component needed

jolly jungle
jolly oriole
#

nah, that's just one of the unity dlls missing as a reference

jolly jungle
#

Oh, which?

potent dirge
#

just take all of the ones from the game folder ax2uWide3

copper nacelle
#

physics

#

iirc

#

though you prob want an rb2d and physics2d

potent dirge
#

google is probably the best help

#
at System.Collections.Generic.Dictionary`2[System.String,UnityEngine.Texture2D].get_Item (System.String key) [0x00000] in <filename unknown>:0 
  at DebugMod.KeyBindPanel.BuildMenu (UnityEngine.GameObject canvas) [0x00000] in <filename unknown>:0 
  at DebugMod.GUIController.BuildMenus () [0x00000] in <filename unknown>:0 
  at DebugMod.DebugMod.Initialize () [0x00000] in <filename unknown>:0 
  at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText) [0x00000] in <filename unknown>:0 
  at Modding.ModLoader.LoadMods () [0x00000] in <filename 
unknown>:0 ```
im so happy this error message is so helpful ![ax2uHappy](https://cdn.discordapp.com/emojis/716028551589003325.webp?size=128 "ax2uHappy")
copper nacelle
#

what the FUCK

#

what's the line before that

#

this is incredibly useless w/out the exception type

potent dirge
#

[ERROR]:[API] - Error: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

copper nacelle
#

oh

#

i mean

leaden hedge
#

key not found

copper nacelle
#

can't blame it

#

it is pretty descriptive

potent dirge
#

It would be cool if it told me which key it was ax2uHappy

copper nacelle
#

yeah

leaden hedge
#

the key you tried

potent dirge
copper nacelle
#

but what if i make my ToString allocate 800mb of memory

#

java started actually doing it with nres

#

like you'd get the exact deref

leaden hedge
#

i mean if you really care

#

just print out each key before you try to access it

#

or put it in a try except

potent dirge
#

ngl, i cant even see which dictionary its complaining about

#

so a bit problematic that

leaden hedge
#

how many dictionaries do you have

#

do you have the pdb with it

#

it should tell you line numbers then, unless that still doesn't work

copper nacelle
#

images in guicontroller

#

that doesn't work

#

you need an mdb

#

you can conv

#

just an annoyance

#

idr if you still need a debug runner

#

you just have to take it out of unity 2017's files

#

mildly annoying

leaden hedge
#

also do you know if the multiplayer code is scuffed 56

copper nacelle
#

uhh

#

i only saw it in dnspy

#

i don't think it was terrible

leaden hedge
#

does it have timestamps and stuff

copper nacelle
#

who

#

it uses some unity lib

leaden hedge
#

yeah default networking

#

but its terrible it doesn't extrapolate

copper nacelle
#

yeah it was jank

leaden hedge
#

i was gonna make it sync correctly, so it'd be "jumpy"

#

but it'd atleast be in real time for all parties

#

but if its jank it'd probably be easier to just do it from scratch

jolly oriole
#

rollback netcode for hk multi pog

leaden hedge
#

i mean it'd only be "halfback"

#

i don't think its viable to reset the entire scene for every player everytime you get a network update and resim to current frame

#

it'd just have to be simulating each player from where they were to current frame

potent dirge
#

im assuming those debug thingies are for 1432?

copper nacelle
#

2017.4.10

#

idk what the other versions use

#

decently high chance of being the same

uncut rover
#

Is there an easy way to change text in the game? I want to change the text at the shops, some NPCs and after the Vanilla HK/Rad

vocal spire
#

Language hook

uncut rover
#

(Nice name)

vocal spire
#

ModHooks.instance.LanguageGetHook or something

uncut rover
#

Ah okay, thanks!

#

Is there any documentation? I remember seeing it before but I can't find it now

vocal spire
#

Just log what the keys and actual values are(return Language.Language.GetLanguageInternal(perameters)), then once you know what to change, return different strings depending on the key string perameter

uncut rover
#

Oh okay I think that makes sense

#

thanks for the help!

vocal spire
#

I believe it is also used for the big radiance and nkg titles