#archived-modding-development

1 messages · Page 508 of 1

vocal spire
#

Yes

cedar hemlock
#
public class CHESaveSettings : ModSettings
    {
        ///public bool charm1new = true;
        // Better charms, insert default values here
        public List<bool> gotCharms = new List<bool>() { true, true, true, true };
        public List<bool> newCharms = new List<bool>() { false, false, false, false };
        public List<bool> equippedCharms = new List<bool>() { false, false, false, false };
        public List<int> charmCosts = new List<int>() { 1, 1, 1, 1 };
    }
vocal spire
#

The CHESaveSettings class(assuming it’s copied from the charm helper example)

#

Ok

#

Hmm

#

Everything looks right

cedar hemlock
#

then why is it broken grubthink

#

lemme see modlog

vocal spire
#

Are there any errors in the modlog

cedar hemlock
#
[ERROR]:[API] - Error: System.NullReferenceException: Object reference not set to an instance of an object
[ERROR]:[API] -   at TransHK.TransMod.Initialize () [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.Mod.Initialize (System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.ModLoader.LoadMod (IMod mod, Boolean updateModText, Boolean changeSettings, System.Collections.Generic.Dictionary`2 preloadedObjects) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.ModLoader+<LoadMods>d__9.MoveNext () [0x00000] in <filename unknown>:0 
#
[ERROR]:[UNITY] - NullReferenceException: Object reference not set to an instance of an object
[ERROR]:[UNITY] - ActionButtonIconBase.GetButtonIcon (HeroActionButton actionButton)
[ERROR]:[UNITY] - ActionButtonIconBase.RefreshButtonIcon ()
[ERROR]:[UNITY] - ActionButtonIconBase.OnEnable ()
[ERROR]:[UNITY] - ActionButtonIcon.OnEnable ()
[ERROR]:[UNITY] - UnityEngine.GameObject:SetActive(Boolean)
[ERROR]:[UNITY] - GameCameras:StartScene()
[ERROR]:[UNITY] - GameCameras:SceneInit()
[ERROR]:[UNITY] - GameManager:BeginScene()
[ERROR]:[UNITY] - <BeginSceneTransitionRoutine>c__AnonStorey13:<>m__3()
[ERROR]:[UNITY] - <BeginRoutine>c__Iterator0:MoveNext()
[ERROR]:[UNITY] - UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[ERROR]:[UNITY] - 
#

thats all thats relevant

vocal spire
#

Can you show the entire initialize method

cedar hemlock
#
public override void Initialize()
        {
            Log("Initializing");
            Instance = this;
            charmHelper = new CharmHelper();
            charmHelper.customCharms = 4;
            charmHelper.customSprites = new Sprite[] { ts.Get(TextureStrings.Charm1), new Sprite(), new Sprite(), new Sprite() };


            /*/
            charmHelper = new CharmHelper();
            charmHelper.customCharms = 4;
            charmHelper.customSprites = new Sprite[] { ts.Get(TextureStrings.Charm1), ts.Get(TextureStrings.QuickestFocusKey), ts.Get(TextureStrings.DeeperFocusKey), ts.Get(TextureStrings.DeepestFocusKey) };
            **/
            initCallbacks();

            Log("Initialized");
        }
``` (sorry for the mess)
vocal spire
#

What is ts

cedar hemlock
#
public void MoreHealing()
        {
            ts = new TextureStrings();
        }
vocal spire
#

Are you sure that ts isn’t null when calling it’s Get method?

#

It doesn’t look like it’s set anywhere in initialize

cedar hemlock
#
public class CharmHelperExample : Mod<CHESaveSettings, CHEGlobalSettings>
    {
        //public string Charmname1 = "Lifeblood Crystal";
        internal static CharmHelperExample Instance;
        private string[] charmNames = { "Lifeblood Crystal", "CHARM_2 lol", "CHARM_3", "CHARM_4" };
        private string[] charmDescs = { "A charm full of potent lifeblood crystals, gathered in the peaks.", "CHARM_2 desc lol", "CHARM_3 desc lol", "CHARM_4 desc lol" };

        public CharmHelper charmHelper { get; private set; }

        public TextureStrings ts { get; private set; }
        ///public CharmHelper ch { get; private set; }

        public void MoreHealing()
        {
            ts = new TextureStrings();
        }

        public override void Initialize()
        {
            Log("Initializing");
            Instance = this;
            charmHelper = new CharmHelper();
            charmHelper.customCharms = 4;
            charmHelper.customSprites = new Sprite[] { ts.Get(TextureStrings.Charm1), new Sprite(), new Sprite(), new Sprite() };


            /*/
            charmHelper = new CharmHelper();
            charmHelper.customCharms = 4;
            charmHelper.customSprites = new Sprite[] { ts.Get(TextureStrings.Charm1), ts.Get(TextureStrings.QuickestFocusKey), ts.Get(TextureStrings.DeeperFocusKey), ts.Get(TextureStrings.DeepestFocusKey) };
            **/
            initCallbacks();

            Log("Initialized");
        }
#

oh it needs to be in initialize?

vocal spire
#

When are you calling the MoreHealing method

cedar hemlock
#

ehm

#

shat

#

nowhere

vocal spire
cedar hemlock
#

i will look at the thing i copied

vocal spire
#

Also I don’t see why you can’t just initialize it where you define it

#

Which would solve the issue

cedar hemlock
#

yeah

#

ok that fixed it, but its at lightlevel 0

#

why is it so dull

#

i only made it blue

#

and its dark

#

futher it seems to work

nimble lake
#

Where can I find the variable to change carefree melody's chances?

jolly oriole
#

those are hardcoded

nimble lake
#

ah damn.

jolly oriole
#

afaik in HeroController.TakeDamage

cedar hemlock
#

ok so how do i make my charms pickup-abble

cedar hemlock
#

you talked about the dictionary thing you gave me

#

but that only contains the name

#

huh

deep wave
#

not even live palehmm

cedar hemlock
#

rip

#

see if i can do magic again

#

@ mods

#

will they come?

#

it hapened last time

deep wave
#

<@&283547423706447872> posting to several channels w/ offline twitch channel ig

floral furnace
#

fucks sake

deep wave
cedar hemlock
#

lol

#

its in discussion too

#

nvm

deep wave
#

thanks orang 02Love

cedar hemlock
#

what does GetCurrentSpriteDef do?

vocal spire
#

Huh

vocal spire
cedar hemlock
#

so how do i say it i want do load a image

#

that i selected

vocal spire
cedar hemlock
#

is 1 better?

#

if yes how do i do it

vocal spire
#

I think so

#

Define a
public Dictionary<string, Texture> EnemyTextures = new Dictionary<string, Texture>();
somewhere

cedar hemlock
#

ok what do i fill in?

vocal spire
#

?

cedar hemlock
#

i just place it there and then

vocal spire
#

Oh

#

Give me the code where you set the texture

cedar hemlock
#
private IEnumerator SetSprite(Scene arg1)
        {
            Log("Setting sprites");
            var boss = arg1.Find(Bossscene[arg1.name]);
            boss.GetComponent<tk2dSprite>().GetCurrentSpriteDef().material.mainTexture = _tex;
            //.GetComponent<tk2dSprite>().GetCurrentSpriteDef().material.mainTexture = this._tex;
            yield return null;
        }
``` ?
vocal spire
#
private IEnumerator SetSprite(Scene arg1)
        {
            Log("Setting sprites");
            var boss = arg1.Find(Bossscene[arg1.name]);
            boss.GetComponent<tk2dSprite>().GetCurrentSpriteDef().material.mainTexture = EnemyTextures[boss.name];
            yield return null;
        }
#

You’ll need to change the EnemyTextures part depending on where you define EnemyTextures

#

Or if you changed the name

cedar hemlock
#

soo

#

new Dictionary<string, Texture>(); is what i need to change

vocal spire
#

No

vocal spire
cedar hemlock
#

wdym with "change the EnemyTextures part"

vocal spire
#

The part

#

In the code I replied to

#

That says EnemyTextures

cedar hemlock
#

what do i need to change it to

vocal spire
#

Well idk, I said it depends on if you changed where you define EnemyTextures, and if you changed the name of it

cedar hemlock
#

i defined it in the class

#
 public class TransMod : Mod
    {
            public Dictionary<string, Texture> EnemyTextures = new     Dictionary<string, Texture>();
    }
vocal spire
#

Ok

#

Then are there any compiler errors?

cedar hemlock
#

nope

vocal spire
#

Ok

#

Now in initialize, show where you set the texture for thk

cedar hemlock
#
Assembly asm = Assembly.GetExecutingAssembly();

           
                
                foreach (string res in asm.GetManifestResourceNames())
                {
                    Log("GetManifestRescourceNames");
                    using (Stream s = asm.GetManifestResourceStream(res))
                    {
                        if (s == null) continue;

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

                        _tex = new Texture2D(2, 2);

                        _tex.LoadImage(buffer, true);
                    }
                }
#

brb

vocal spire
#

Now this probably isn’t the best way, but add after calling the LoadImage method


if (res.Contains(“png file name for thk”))
    EnemyTextures.Add(“Hollow Knight Boss”, _tex);
else if(res.Contains(“png name for something else”)
    EnemyTextures.Add(“Name of this enemy”, _tex);
else if(res.Contains(“yet another png name for an enemy”)
    EnemyTextures.Add(“another enemy name”, _tex);

And so on

cedar hemlock
#

back

#

at png file name for thk do i need to add the .png

#

prob yes

#

bruh why does moble have different ""

#

87 errors

#

and you forgot 2 )'s

#

lets see how bad this goes

#

ehm

#

shat

#

all the textures are dark

#

what did i do wrong

#

anyone know?

nimble lake
#

why is there no spell2prefab?

#

for shade soul instead of vengeful spirit

cedar hemlock
#
  1. its named different
  2. its the same but black maybe its changed it code
#

however

#

idk

#

so when i add something to my project it becomes terribly dark

#

did i do something wrong??

vocal spire
cedar hemlock
#

they are dark

#

just dim

vocal spire
#

Screenshot?

cedar hemlock
vocal spire
#

Don’t open in visual studio

#

It should be fine in game

cedar hemlock
#

yeah but in-game they are also dark

vocal spire
#

Hmm

#

Try replacing the dark file with a non dark file, and don’t open the file in vs? Tmk vs can edit images

cedar hemlock
#

sadly i gtg now

cedar hemlock
#

before using in-game

#

and the file provided (light) is the same as vs uses

#

bye

vocal spire
stone elm
#

I know my particular requirements are a little out of the ordinary, but I'd still appreciate some input from y'all. Reminder: I have a mod referencing LibraryA which uses Newtonsoft. LIbraryA should not, and can not, depend on Assembly-CSharp. It must remain game agnostic. With this in mind, it seems to me my best options are: 1.) Unbundle Newtonsoft from ModdingAPI and put the DLL in the Managed folder; or 2.) Bundle my own Newtonsoft into LIbraryA.

I was hoping for some insight from you fine folks as to why Newtonsoft was bundled into ModdingAPI to begin with. If it was to solve a specific problem that would make sense. If it's just to provide modder's convenience then I'd be willing to put up the work to de-couple those and PR the change. (As well as test a few popular mods to make sure nothing broke, although this may be moot with 1.5 around the corner.)

#

I don't want to crash into an ecosystem and start demanding it conform to me, so RFC is open. Thanks in advance.

copper nacelle
#

it's decoupled in 1.5

#

it's just merged for convenience of distribution rn

stone elm
#

!! Okay, that works perfectly fine for me. Thanks for the update @copper nacelle!

stone elm
#

Is there anything I need to do to enable building the Modding.API solution with C# 9? VS insists it can't update the language version due to the solution being fx4.7.2.

#

Might just need to update VS... Trying that.

copper nacelle
#

shouldn't be anything afaik

stone elm
#

Yeah, just needed to update VS so it recognized C# 9. That's how out of date I was. :/

#

The next issue to present itself is the lack of a Deconstruct() on KeyValuePair<>. Which makes sense as that method doesn't exist in 4.7.2. How have you managed to build this? 😅

copper nacelle
#

net standard 2

stone elm
#

VS disagrees but that's my problem. I'm giving it a break for tonight, thanks for your help

copper nacelle
#

do you have the reference?

#

It's bundled in 1.5's managed folder

#

So it's not going to work at all without that

stone elm
#

Which reference? netstandard.dll?

copper nacelle
#

Yeah

#

That and mscorlib I think are the ones

#

I don't remember which one had deconstruct

stone elm
#

I didn't have it before, but that did it.

#

I was wondering how you got netstandard2 stuff without a reference or targeting netstandard haha.

#

Got it compiling. Your help is super appreciated. pogtamer

copper nacelle
#

np

tacit cedar
#

Hi, I'm experimenting with FSM and have this error:

TypeLoadException: Could not load type 'System.Func`1' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

It's related to inserting a coroutine into a state. Commenting out the line (not the method) and it does fine.

PlayMakerFSM control = ...;
control.CopyState("Foo", "Bar");
IEnumerator routine() {
    Log("...");
    yield break;
}
// Error occurs here.
control.InsertCoroutine("Bar", 0, routine);

I'm targeting net35. Am I missing a reference or something?
Edit 2021-04-03: Add this to your csproj: <PackageReference Include="jnm2.ReferenceAssemblies.net35" Version="1.0.1" />
https://www.nuget.org/packages/jnm2.ReferenceAssemblies.net35

copper nacelle
#

your mscorlib ref looks like net4 ngl

tacit cedar
#

That's what I thought, but <TargetFramework>net35</TargetFramework>

#

To be sure, I added a reference to mscorlib.dll in HK's Managed directory, which is 2.0.0.0. Still the same error

stone elm
#

What DLL am I looking for when it comes to the output of the Modding.API sln? It seems like the output Assembly-CSharp-patched.dll is supposed to be packed with Assembly-CSharp.mm.dll but I don't think that's happening. I don't see a post-build to do the pack. Maybe I'm misunderstanding, but either way I'm not seeing a DLL with the Modding namespace popping out except for Assembly-CSharp.mm.dll.

stone elm
tacit cedar
copper nacelle
#

build in release

#

or get the dll called MONOMODDED_Assembly-CSharp

#

Release makes a zip and moves the dll to an output folder

stone elm
#

That DLL didn't exist in the debug out but does in the release out. 🤔

copper nacelle
#

questionable

#

release literally copies it

stone elm
#

Probably me messing something up, it's my first assumption. But I calls it as I sees it.

#

Although the release build pushes me further so thanks!

stone elm
#

Looks like SerializableStringDictionary (and associates) were removed in ModdingAPI for 1.5. Is there a suggested alternative?

copper nacelle
#

Dictionary

stone elm
#

Okay, didn't want to assume since I'm not 100% on how the saving works. Thanks a ton.

copper nacelle
#

that's why we have newtonsoft really

#

unity json makes me want to off myself

stone elm
#

I figured as much.

#

I looked at Unity's JSON stuff. Yes.

potent dirge
#

That sounds like my cursed .net install issue with the 1221api right off the bat ax1uWide3

paper valve
#

Hey, in what extent does the API let you mess with things ? Is it possible to add rooms ?

cedar hemlock
#

Look at the api docs

#

(Yes its possible)

jolly jungle
#

Some is just more complex than others

paper valve
#

Amazing

#

Thank you :)

jolly jungle
#

You have the documentation?

paper valve
#

Ya you gave it to me two days ago 😅

#

But still haven't had time to look into it much

jolly jungle
#

Wait I did? zote

#

Anyways

#

If you have them then you're all set to go

#

Good luck!

#

Also yeah I did now that I think about it

paper valve
#

how come there was never any ""big"" hollow knight mods released ?

paper valve
jolly oriole
paper valve
#

I see

cedar hemlock
#

is there a way to make my (custom) charm pickupable?

vocal spire
light zodiac
#

is there a version of EventRegister.SendEvent("UPDATE BLUE HEALTH"); but for normal masks?

copper nacelle
#

use herocontroller's sethealth

light zodiac
#

There isn't a sethealth. there's only addhealth and takehealth

#

i did addhealth but it only take effect after i take damage

copper nacelle
#

using addhealth should work

#

there's a proxyfsm event it sends

light zodiac
#

Currently I'm doingcs USceneManager.activeSceneChanged += SceneChanged;

then cs GameObject.Find(CurrentBoss).AddComponent<BossNerf>();

and in BossNerf I do the adding in the private void Start() cs HeroController.instance.TakeHealth(EasierAscended.DoDamage);

copper nacelle
#

might want to wait a frame

light zodiac
#

i wrote yield return new WaitForSeconds(3.0f); in SceneChanged function (before GameObject.Find(CurrentBoss).AddComponent<BossNerf>();)

light zodiac
#

Also, how do you force the player to go into a specific Scene when the scene changes

ornate rivet
#

GameManager has a BeginSceneTransition you can hook on to

light zodiac
#

Thank you

jolly jungle
#

What are you making mulhima?

light zodiac
#

I'm making a mod that makes Ascended Bosses in HoG have same health and damage as p5

copper nacelle
#

you can just hook takedamage and halve it in the scene instead of taking health

light zodiac
copper nacelle
#

ah ok

jolly oriole
#

but i have absutely no idea if it works flawlessly with newest 1432 mapi

light zodiac
#

Thank you

cedar hemlock
cedar hemlock
vocal spire
cedar hemlock
#

instantiate it?

cedar hemlock
#

bruh

#

i notice now

#

i just needed to look 3 cm down

vocal spire
cedar hemlock
#

but what paths are they in

light zodiac
cedar hemlock
#

lets look

cedar hemlock
#

how do i give it the place then?

#

is there an option for it in debug?

#

public static Object Instantiate(Object original, Vector3 position, bool instantiateInWorldSpace); i'll need to do this right

#

no

#

sry lemme cahnge it

#

that

merry lotus
#

Feature request for future ModInstaller/ModInstaller2 updates:

  • A button to to "Open Mods Folder"

There seems to be a fair number of people who struggle with getting to their mods folder, or who accidentally go to a different one that what the installer is seeing/using; in MI2s case, there also isn't Manual Install nor does the Installer add manually installed mods to its list. This would not only help with those (and thus troubleshooting), but also just serve as a convenience for people that don't have a shortcut to the folder already saved.
(Edit: I can delete this from here and repost in #modding-discussion if you want. I wasn't sure which place to put it if it pertained to the installer-itself)

cedar hemlock
#

Idc but it prob better fits in disc not sure tho

copper nacelle
#

sounds like a good idea tbh

jolly oriole
#

idk how easy these are to make, but could also be an alternative to a ton of pushbuttons

copper nacelle
#

I was thinking a hamburger menu in a sidebar

jolly oriole
#

also an option

deep wave
jolly oriole
#

idk, i only did qt

paper valve
#

hello hey its me again thats probably a really dumb question but what is this drive they referring to

vocal spire
#

Pins

#

Also

#

?mods

vocal spire
#

But

#

The installer gets it for you

#

Have you got mods in your game?

#

If so, the ModdingApi is installed

paper valve
#

none

#

i wanna start creating mods

vocal spire
#

Well it’s probably best to install first

paper valve
#

aight

#

thank you

vocal spire
#

So just get an installer(either the one linked above or one in #archived-modding-help pins if it doesn’t work)

paper valve
#

will the installer back up my og assembly dll or should i do it manually first

vocal spire
#

Doesn’t matter

#

You can always reinstall it or verify the integrity of the files

#

But it should back it up

paper valve
#

alright

deep wave
#

i dont have time to fix but in case nobody's aware, modinstaller1 has been throwing this for a lot of people recently, could be a modlinks issue with the great un-windowsing

young walrus
#

@solemn rivet fix ur shit. kthx. Kappa

jolly oriole
#

i hope no one needs the (probably unnecessary) pd.betaEnd call in HeroAnimationController.Update()

paper valve
#

i am a clown help

vestal plover
#

Is anyone here familiar with the codebase of CustomKnight? And if so, does anyone know why it takes a bit of time to swap skins? Is it an artificial delay or does texture swapping actually take that long?

vocal spire
#

Loading textures from files I think

jolly oriole
vocal spire
#

Good thing I don’t use it

paper valve
solemn rivet
#

gottem

young walrus
#

shit

#

u right

solemn rivet
#

that's prolly happening cause...

#

idk

#

I want to blame 56 and angle

jolly oriole
#

tbh, that started happening after 56 removed the windows thing from modlinks

#

so you can blame 56

vocal spire
#

🤔

#

But only for some people

deep wave
#

are you sure about that

solemn rivet
#

yes

#

100% sure

vocal spire
#

Blame 56

jolly oriole
#

i love remembering stuff the right way

deep wave
#

this is an amazing commit. 0 breaking changes happened here

solemn rivet
#

the error description mentions something that 56 and angle worked on

vocal spire
#

Huh

solemn rivet
#

so it's not my fault

vocal spire
#

Here, we see the exact point it fails

#

So some mod has a dependency that doesn’t exist

#

Maybe the ModdingApi has been misspelled?

jolly oriole
deep wave
#

modmanager.cs probably

vocal spire
#

So it’s another mod

#

Time to add logging

deep wave
#

why does it even check for dependencies on launch 🥴

jolly oriole
#

damn, i didn't remove the modcommon dependency from sfcore in the modlinks

#

checked by hand, no mod should actually break

vocal spire
#

Pog, already found a problem

#

Not all places were renamed to Modding API

#

Works for me now

#

There

#

Idk if it’s “the” fix, but it worked for me

paper valve
#

Hey I've started reading the docs but there are things I'm still in the blur with, i have some questions.
In place should I be loading the asset bundles, my initialize?
what is the proper way to load an instance of an enemy into the game?
if I create a custom scene for a new room, how do I put enemies in it? should I do it just by placing the prefab in the unity scene or should I go through code ?

#

Sorry if those are dumb questions

cedar hemlock
#

hehe

nimble lake
jolly oriole
# paper valve Hey I've started reading the docs but there are things I'm still in the blur wit...
  1. i do it in initialize, but you may want to load it at another point, if the assetbundles are really massive (looking at pale court)
  2. preload it using the preloadnames thing, then instantiate it once you know it has to exist (i once did it in a UnityEngine.SceneManagement.SceneManager.OnActiveSceneChanged hook)
  3. i do that by having a custom script in an assembly specifically for the unity editor, where i specify the enemy i want to place (from a self-managed set of preloaded enemies)
paper valve
#

:o thank you

#

that brings me another small question, how do I preload an enemy that is not from one of my assets bundles, but one that is from the real game

jolly oriole
#

that's what the preloadnames thing is for

#

to preload objects of the real game

paper valve
#

thank you !! :)

#

(and sorry if I seem annoying by asking a lot of evident questions)

cedar hemlock
#

dont worry i do that a lot too and they are still friendly lol

paper valve
#

😅

#

Btw is this channel strictly about code or is it mod dev in general (i.e. sprites, audio assets)

cedar hemlock
#

mod dev

#

although code is the main thing they talk about

paper valve
#

oh nice

cedar hemlock
#

nice

paper valve
#

ty :)

paper valve
#

you think so ?

#

what do you think would make you say that, what in the song doesn't feel ambient

#

I see

#

Thank you ! ❤️

#

I'm taking notes

cedar hemlock
#

lol

copper nacelle
#

@jolly oriole why do you hate betaend

jolly oriole
#

it clogs the boolget call

vocal spire
#

🤔

jolly oriole
#

or getbool or whatever

copper nacelle
#

🤔

#

is it unused

jolly oriole
#

i'd have to check more intensly, but it looks like it is only checked in HeroAnimationController, and the only things setting it to true are some methods with betaEnd in their name, so maybe it's in one or two pfsms (though in theory it is unused as of hk 1.0.2.8 or whatever the first release was)

copper nacelle
#

like it's straight up in the binary

vocal spire
#

Huh

ornate rivet
#

maybe he just wanted to be pull request 69

vocal spire
#

I wasn’t in the GitHub

copper nacelle
vocal spire
#

im bad at github

jolly oriole
copper nacelle
#

this isn't even merging from the original

#

this is merging some commit from like two years ago

jolly oriole
#

oh yeah

copper nacelle
jolly oriole
#

snapshot? what are you trying?

copper nacelle
#

profiling

jolly oriole
#

lol, just ask tc for the source code and profile in unity

copper nacelle
#

i'm sure that'll go well

copper nacelle
#

gaming

jolly oriole
#

damn, i would've never guessed that a graphical programming language made on top of c# is slower than the code of the unityengine

vocal spire
#

🤔

jolly oriole
#

btw, is that the vanilla one or mapi?

copper nacelle
#

vanilla

jolly oriole
#

neat

copper nacelle
#

i'd like to note the fsm stuff takes more than the entirety of all of the coroutine movenexts

jolly oriole
#

likely because the coroutine stuff is by unity, therefore backed by managed (or unmanaged?) code, not c# scripts

copper nacelle
#

coroutines are just c# generators

jolly oriole
#

hm

#

though i do wonder how that profiling looks for the mapi, with all the playerdata stuff changed i suspect it may be somewhere near the front

ornate rivet
#

@feral surgemCherry
This is why you should remove fsms

copper nacelle
#

nice ping

feral surge
#

Right away sir

ornate rivet
#

thank you

#

see yusuf, they did respond

#

can you give us the unity project while you're at it

feral surge
#

No, fuck you

ornate rivet
#

typical

vocal spire
#

lol

copper nacelle
#

the initial minute-ish has some modding api stuff where it loads dlls/generates methods/etc

#

aside from that though

#

sick one

#

could wait some delta or something for this though tbh

paper valve
#

hey

#

any idea for a mod code reference where i could see custom enemies

#

admittedly i do not know much hollow knights mods

paper valve
#

ah yeah sorry that might not be clear

solemn rivet
#

56 what are you doing

#

do I have to call the police on you again

copper nacelle
paper valve
#

y'know how looking at other mods' code is good to get started and understand stuff when you started and dont know much

solemn rivet
vocal spire
#

Ah, you want to see how to make a custom enemy?

solemn rivet
#

can you do that for previous builds

paper valve
#

yeah 😅

vocal spire
#

Or modify a boss?

solemn rivet
#

where there were substantially more fsms

paper valve
#

custom enemy preferably

vocal spire
#

Create an new enemy or modify?

copper nacelle
#

i tried previous builds a bit and it didn't go great but i can give it another shot

paper valve
#

new

copper nacelle
#

it just didn't recognize the process

solemn rivet
#

like pre lifeblood

#

I see

copper nacelle
#

like it started working on 1.5

#

rofl

solemn rivet
#

maybe it's a .net thing?

paper valve
#

that one tutorial in the documentation is quite correct but i like crossing sources

#

especially i'd like to see if someone made an enemy without using the uuuh modcommon

vocal spire
# paper valve custom enemy preferably

Only the example adds one tmk. You’d have to make a go with the animations in unity and all the code for it’s ai, then put it in the game with assetbundling, then add a healthmanager and some other components and set them up right

vocal spire
paper valve
#

mh sorry what does tmk stands for

#

(im kinda dumb hi)

vocal spire
#

To my knowledge

paper valve
#

ooh i see

#

well thank you

#

i'll use mod common then

jolly oriole
vocal spire
#

New hk room spin

sage holly
#

what that

jolly oriole
#

that spinning

cedar hemlock
#

nice spin

sour ermine
warped hollow
#

is it possible to create a static camera, or is fixed to the player wherever he goes?

copper nacelle
#

there's an option in debug to do the latter already

#

but yeah you can do either

warped hollow
#

has anyone done a mod where you can move the knight and not have the camera follow you?

vocal spire
#

I don’t think so, but it should be easy

warped hollow
#

how? i wish i could make a it toggle on/off , but i have no idea where to search for it, or how to make the proper mod

vocal spire
#

I’d guess either 1. Setting the camera’s position to the same thing every frame or 2. Stop the camera from following anything

#

Also you might want to edit some more stuff because tmk the little light around the knight farther out looks like a black square

warped hollow
#

Are there modding tutorials for beginners?

vocal spire
#

Also if you haven’t, I suggest downloading and playing a few mods

#

Also don’t manually install the ModdingApi or build it yourself, you don’t need to

#

Just use one of the mod installers

warped hollow
#

i did use some mods, but its this camera thing i'm looking for

vocal spire
#

Ok

untold nebula
#

Can anyone link me the github page of the latest Hollow Knight Modding API that the new mod installer exe uses?

deep wave
#

the current state of the repo is in renovation for 1.5

copper nacelle
#

there's a tag

deep wave
#

oh yeah duh

#

be sure to check out the docs too, extremely helpful (ifl56)

untold nebula
#

Thanks, ^ Is that one different?

#

Or same as the one in the mod installer?

copper nacelle
#

that is my fork it is outdated now

paper valve
#

hello hi me again

#

new dumb question

#

what do i do to know the exact names of the objects i want to preload from a scene

copper nacelle
#

you check a scene dump or the fsm viewer or whatever

jolly oriole
paper valve
#

ive tried using fsm viewer but apparently im quite dumb at understanding name

#

😅

#

i am not very clever i think

copper nacelle
#

check the scene dump it's probably a child

#

or spawned off something if not a child

jolly oriole
#

then go into the linked gameobject dump and search for lost kin in the specific scene, probably is under other gameobjects and may or may not look like

("Dream_03_Infected_Knight", "Boss Scene/Lost Kin")

or something similar

paper valve
#

ooooh

#

ill try that then !

#

thanks you two

#

😐 uuuuuh

jolly oriole
#

what does the modlog say when preloading it?

paper valve
jolly oriole
#

hm

paper valve
#

:/

#

yeah

#

ok idk why but loaded it aain and now its working

paper valve
#

i now have my custom enemy existing but

#

i put it on enemies layer

#

i make it move changing its velocity

#

and hes getting through walls

#

no clue why

#

should i not move it by changing its rb velocity ?

#

or is it something else that i probalby forgot to do

jolly oriole
#

if you're actually instantiating/preloading lost kin, you don't need to change layer

#

though enemies should collide with terrain

paper valve
#

i was loading lost kin only to use its health and infected effect components

#

thats what they did in the uuh enemy tutorial from the docs

#

so i did the same for now

jolly oriole
#

i mean, it should not phase through the wall

#

unless either the part with the hitbox doesn't care if it's at a wall or if the layers don't interact with each other

paper valve
#

the hitbox works to hit my character and i can hit the enemy i have no clue why walls arent colliding to it

jolly oriole
#

put another, non trigger collider beneath it

paper valve
#

oooh

#

the non trigger collider adds nothing, still getting through walls and ground :/

jolly oriole
#

then i sadly have no idea

paper valve
#

somehow it's working now but I have no clue why

#

thanks anyway lol

vocal spire
paper valve
#

nah lol

#

although i'd be capable of doing that considering how dumb i am

heavy patrol
#

Is there a way to rip sound from the game? I'm messing around with an extraction software but I can't seem to find the raw grub noises

copper nacelle
#

AssetStudio is pretty good

heavy patrol
#

thanks! I will look into it ^_^

heavy patrol
copper nacelle
#

cool

sage holly
#

They are also pinned in the lore resources from the mossbag server

copper nacelle
#

snail emoji

ornate rivet
#

mega snail emoji

vocal spire
#

🐌

sage holly
#

Lol

winged mason
#

🐌

hollow bough
#

Hey, new person here. Thinking about a weird extension mod I want to maybe make, is there any documentation on how the HK autosplitter works?

#

I want to maybe coopt some of its functionality, but I need to know how exactly it accesses events

tawny onyx
wide elbow
#

what programming language do I need to know to make mods for HK?

jolly oriole
glass thorn
#

how do I make the grub appear properly in front of the pillar?

paper valve
#

can you change its z axis

#

@vocal spire hey where can i find Vasi ive read that frogcore uses it as dependency

vocal spire
#

Mod installer

paper valve
#

alright

glass thorn
#

you mean, like transform.position.z?

paper valve
#

yup

glass thorn
#

that worked - set its z to be the same as the jar itself

#

though now it shows up in front of the jar

paper valve
#

make the grub z value slightly greater than the jars one

glass thorn
#

what's weird is according to scene dumps they have exactly the same z

#

(both 0)

#

how would I change that? (my unity knowledge is limited)

#

I came up with another solution: make the jar have a lower z than the grub instead of the other way round

paper valve
#

👍

glass thorn
#

however this still happens (even if I lower the grub and jar's Z a bit)

glass thorn
#

nvm that was just me forgetting there was another copy of the code elsewhere

sinful elm
cedar hemlock
#

i dont understand shit about preloading

#

what mods use preloading?

#

so i can steal it and try to understand it

paper valve
#

everythings explained in the docs

cedar hemlock
#

not everything

paper valve
#

on this one page

cedar hemlock
#

i know what the docs are

paper valve
#

preloading is explained

cedar hemlock
#

im not new to modding :)

paper valve
#

ik

#

but preloading is explained

#

on here

cedar hemlock
#

yeah but i find it easier if i had an example

cedar hemlock
#

thx

cedar hemlock
#

so, it used like:

("thing that needs to be placed", preloadedObjects["the scene its placed in"]["what it replaces??"]);
```?
vocal spire
#

What did you just type

cedar hemlock
#

idk

vocal spire
#

You have somehow combined the code in GetPreloads and Initialize

cedar hemlock
#

im tryin to translate
preloadedGO.Add("hornet", preloadedObjects["GG_Hornet_2"]["Boss Holder/Hornet Boss 2"]);

#

in initialize

vocal spire
vocal spire
#

I don’t see the code you wrote anywhere in there

#

Ohh I see now

cedar hemlock
#

no what i wrote is something else lol

vocal spire
#

So you don’t need to do the adding stuff

cedar hemlock
#

not?

vocal spire
#

Basically PreloadedGo is a Dictionary<string, GameObjrct>

#

People tend to use dictionaries if they have multiple preloads

vocal spire
vocal spire
cedar hemlock
#

if i dont use it then what do i need to have in PreLoadObjects(orsmth)

#

oh

#

now i need to find a scenename

#

lets go debug mod

#

ok so when i have the scenename what do i fill in at "Boss Holder/Hornet Boss 2"?

#

the object i want to place?

jolly oriole
#

and the path to that object

cedar hemlock
#

how do i know the path

ashen mason
#

hey guys how can i help

cedar hemlock
#

by telling me the path to a pickupabble object

#

preferably a charm pickup

ashen mason
#

i have years of c# experience but i never modded on hollow knight

#

so i can't really tell you, sorry

jolly oriole
ashen mason
#

is there any way i can learn?

cedar hemlock
#

the docs

#

he will link

paper valve
#

there are a lot of resources in the pins

ashen mason
#

perfect

paper valve
#

and theres this

ashen mason
#

does it take a lot to learn?

paper valve
#

idk i started 2 days ago lol

cedar hemlock
#

no

paper valve
#

🕺

ashen mason
#

are there many new incorporated methods, or is it more intuitive

paper valve
#

wdym

ashen mason
#

are the classes' names intuitive

#

easy to learn and remember

paper valve
#

yup

cedar hemlock
#

we are not good at c#

ashen mason
#

oh ok

cedar hemlock
paper valve
ashen mason
#

i'm just going to read all the documentation

cedar hemlock
#

me

paper valve
ashen mason
#

yakko warner?

cedar hemlock
#

and all the others that are looking at this and are bad at coding

paper valve
#

also looks more like tutorials than documentation itself

vocal spire
#

Hello

cedar hemlock
#

hey

vocal spire
#

Back from a haircut

cedar hemlock
#

nice

ashen mason
#

i have 4 years of c# experience so i hope it doesn't get too hard

ashen mason
vocal spire
vocal spire
cedar hemlock
#

yeah sfgrenade told me

ashen mason
vocal spire
paper valve
#

what's the post counterpart of On.GameManager.BeginSceneTransitionRoutine ?

ashen mason
copper nacelle
#

you just do stuff after yielding the orig call

paper valve
#

omg

#

thats incredible

#

ty

vocal spire
#

Oh

vocal spire
copper nacelle
#

that works too yeah

cedar hemlock
#

does anyone know a scene with a charm pickup

paper valve
#

gonna do it 56's way cause this is awesome

cedar hemlock
#

oh grubfather

jolly oriole
cedar hemlock
#

oh yeah

jolly oriole
#

i have no clue if the scene is called like that btw

cedar hemlock
#

dont matter

#

its exactly called like that lol

#

so this thing is huge

#

where are the paths

vocal spire
#

lol

cedar hemlock
#

oh yeah im stupid

vocal spire
#

Then screenshot and I’ll show you what to copy

jolly oriole
cedar hemlock
#

bruh

#

poo

#

its called poo

#

poo heart poo streangth...

#

do i need to show more?

vocal spire
#

Just copy the part that says Charm Holder\Poo Heart

#

Use that for other objects in the future too

cedar hemlock
#

everything?

vocal spire
cedar hemlock
#

oh ok

jolly oriole
#

i actually preload the charm holder, so i can make the fling thing from an edited fsm lol

vocal spire
#

lol

jolly oriole
#

but if it's static you can just preload the poo heart thing

cedar hemlock
#

ill just stick with poo heart

#

lets look at fsm

vocal spire
#

Also you might need to replace the \ with a / forgot

cedar hemlock
#

oh ok

#

do i do something with this?

var fsm = gameObject.LocateMyFsm("FSM name here");
fsm.AddFsmState("New empty state name");
fsm.AddTransition("from state", "event name", "to state"); // the state has to exist first
fsm.AddGlobalTransition("global event name", "to state"); // the state has to exist first
fsm.ChangeTransition("from state", "event name", "new to state"); // the state has to exist first
fsm.GetState("FSM state name here"); // returns a state, if you ever need it
fsm.CopyState("original state name", "name of new copied state"); // returns copied state
fsm.GetAction<ActionType>("FSM state name here", 0); // returns action instance
fsm.AddAction("FSM state name here", new FsmStateAction());
fsm.InsertAction("FSM state name here", new FsmStateAction(), 0);
fsm.RemoveAction("FSM state name here", 0);
fsm.AddFloatVariable("new variable name");
fsm.AddIntVariable("new variable name");
fsm.AddBoolVariable("new variable name");
fsm.AddStringVariable("new variable name");
fsm.AddVector2Variable("new variable name");
fsm.AddVector3Variable("new variable name");
fsm.AddColorVariable("new variable name");
fsm.AddRectVariable("new variable name");
fsm.AddQuaternionVariable("new variable name");
fsm.AddGameObjectVariable("new variable name");
vocal spire
#

Where did you get that?

cedar hemlock
#

the docs

#

idk if its usefull

vocal spire
#

Did the fsm page get updated since I last checked?

vocal spire
#

Very

jolly oriole
#

that just shows what is possible with sfcore

vocal spire
#

Useful

#

Switching to SFCore from now on

#

No need for modcommon

jolly oriole
#

but you don't need everything of this (maybe not even anything)

vocal spire
#

Or vasi

cedar hemlock
#

so i add?

vocal spire
#

Prob won’t need global events

vocal spire
cedar hemlock
#

i already have them

#

i need them for the other stuff

vocal spire
#

Ok

cedar hemlock
#

do i need to look at the fsm?

vocal spire
#

Well, edit the variable in the fsm for what charm it is(forgot what variable) to the one for your custom charm when you place it

vocal spire
jolly oriole
#
  1. get fsm
  2. get fsm variables
  3. change Charm ID int variable to your custom charm id
  4. change Charm bool variable to true
  5. done
vocal spire
#

Or follow that

jolly oriole
#

not a single bit of the fsm util needed

cedar hemlock
#

ok so what is it called

#

the fsm

vocal spire
#

Grenade gave the instructions so you don’t need to look at it

#

But for the future I suggest always looking at fsms

#

Also look at the GameObject dump for the names of fsms

cedar hemlock
#
  1. get fsm
  1. how
vocal spire
#

In fsm viewer you can also enter the GameObject name to find fsms

cedar hemlock
#

so i need the name :)

cedar hemlock
cedar hemlock
#

ok ill look

jolly oriole
#

Shiny Control

vocal spire
cedar hemlock
#

\--PFSM Name: Shiny Control ^^

#

so just Shiny Control?

#

so i cant find Shiny Contol in fsm vieuwer

#

viewer*

vocal spire
#

Did you open the scene?

cedar hemlock
#

resources.assets is not good enough?

vocal spire
#

No...

#

It is in a scene

cedar hemlock
#

ok so the scenename is in the .txt right?

vocal spire
#

It is the file name

#

Apart from .txt

cedar hemlock
#

oh lol

#

i cant find anything apart from level0 to idk

vocal spire
#

What did you click to open that menu?

cedar hemlock
#

It was in data

#

Hollow_Knight_Data

potent dirge
#

hai. Im trying to do some FSM stuff as well but in 1221 specifically ((un)expected version differences peepoArrive ). This is Uumuu's control FSM in the avalonia fsm viewer along with others, just for help determining the naming format.
Is this <gameobject>-<fsm>?

jolly oriole
#

yes

vocal spire
#

There is another option that just lets you choose the scenes by name

cedar hemlock
#

oh i just clicked the upper button

vocal spire
#

Look at the one that says scene

cedar hemlock
#

ok

potent dirge
#

So this should in theory work when _coro is a static NonBouncer? ax2uHmm

private static void StartUumuuCoro(Scene scene, LoadSceneMode lsm)
{
  //Console.AddLine("Uumuu test: " + scene.name);
  if (scene.name == "Fungus3_archive_02")
  {
    Console.AddLine(_coro.ToString());
    _coro.StartCoroutine(UumuuExtraCoro());
  }
}


Console.AddLine("Uumuu coro check");
// Find Uumuu and the FSM
GameObject uumuu = GameObject.Find("Mega Jellyfish");

Console.AddLine("Uumuu coro mid pls work");
if (uumuu == null)
    yield break;

Console.AddLine("aaaaaaaaaaaaaaaaaaaaaaaaaaaa");
PlayMakerFSM fsm = uumuu.LocateMyFSM("Mega Jellyfish");
fsm.GetState("Idle").GetAction<WaitRandom>().timeMax = 1.7f;```
#

(pretend braces exist and not a million shitty console things. I just like seeing them in-game bc it helps me ax2uWide3)

vocal spire
#

I’d think so

#

What is Console

potent dirge
#

its just the old debug way to show stuff in the in-game debug console

vocal spire
#

Ah

potent dirge
#

backporting the api properly is effort 🥴

#

so just modifying the existing one instead

light zodiac
#

i was trying to edit fsms but I'm getting the error on SetVelocity2d: "static types cannot be used as type arguments"

Currently my code is:cs PlayMakerFSM mmc = gameObject.LocateMyFSM("Mossy Control"); mmc.GetAction<SetVelocity2d>("Leap Launch", 3).y = 100;

copper nacelle
#

does your using contain an On?

light zodiac
#

i didn't use On

copper nacelle
#

ok but do your usings contain it

light zodiac
#

i think i found my mistake i may or may not have forgot to include HutongGames.PlayMaker.Actions 🤡

wide elbow
#

what good resources are there for somebody who has never used C# or Unity but wants to make HK mods?

prime urchin
#

Welcome to this introduction to game development. We'll be starting from the beginning, so no prior knowledge of programming or the Unity game engine is required.

Unity can be downloaded here: http://unity3d.com/get-unity

Watch episode 01: https://youtu.be/9iCnjdXEfMA

If you'd like to support these videos, you can make a recurring monthly don...

▶ Play video
#

As you're interested in making mods, some of the stuff is not exactly relevant but still really useful to know.

wide elbow
#

thanks!

vocal spire
cedar hemlock
light zodiac
#

are you using HutongGames.PlayMaker, HutongGames.PlayMaker.Actions, and ModCommon.Util.?

cedar hemlock
#

modcommon

#

i need the using

#

doesnt do anything

light zodiac
#

you also need to add reference to playmaker.dll and modcommon

cedar hemlock
#

yeah i have those :)

light zodiac
cedar hemlock
#

that doesn't work

#
internal class Fsms : MonoBehaviour, Mod
    {


        public override void Initialize(Dictionary<string, Dictionary<string, GameObject>> preloadedObjects)
        {

        }



            private void wierdthing()
        {
            var fsm = GameObject.LocateMyFsm("FSM name here");
        }
    }
#

i cant do , mod but its needed for the initialize

light zodiac
#

the g is lower case

cedar hemlock
#
Error    CS1061    'GameObject' does not contain a definition for 'LocateMyFsm' and no accessible extension method 'LocateMyFsm' accepting a first argument of type 'GameObject' could be found (are you missing a using directive or an assembly reference?)    
light zodiac
cedar hemlock
#

yes

#

i did

#
public class Fsms : MonoBehaviour
    {
            private void wierdthing()
        {
            var fsm = gameObject.LocateMyFsm("FSM name here");
        }
    }
light zodiac
#

does it still show an error?

cedar hemlock
#

yes

paper valve
#

@vocal spire hey im trying to use frogcore to create a journal entry but i dont think i am understanding everything, which part makes it so it knows which enemy has to be killed in order to actualize the kill count ?

vocal spire
#

hello

#

so you know the journalplayerdata you give it?

#

you can do 2 things to make it grant the entry

#

also I suggest getting the updated frogcore from github which has extention methods for one way

#

1st way(I prefer this one, but still use the other way for some more advanced stuff): get the EnemyDeathEffects component of an enemy and use the SetJournalEntry method with the JournalHelper you initialize as the argument

#

Just realized the GitHub doesn’t have the most recent ver either

#

I really need to update it

paper valve
#

lol

#

ty

#

im gonna look into that 👀

#

i think my problem was that my custom enemy didnt have a enemydeatheffect

vocal spire
#

2nd way is setting the variables in the journalPlayerdata for it, but the other way is better bc it shows the little notification in the bottom left

vocal spire
paper valve
#

oh ? 👁️

vocal spire
#

So hook something(I think HealthManager(instance, this is the HealthManager on your enemy(s)).OnDeath?) and in there call JournalHelper(instance, this is your journal entry that you initialized).RecordJournalEntry

#

And if the ModdingApi was updated to have static reflection fixed, it will also show the notification

#

I don’t like that my pc is decide to be slow

#

It’s reminding me of my other pc

#

Which is the reason I got this pc

paper valve
#

lmao

paper valve
#

i have to create one journal helper per enemy right ?

#

IT WORKED

#

also i got the little icon so i guess static reflection works fine

#

Also is there a way to decide where it will placer in the journal ?

vocal spire
#

nice

vocal spire
paper valve
#

thank you its awesome

#

thank you for having created this journal helper

vocal spire
#

Np

#

My pc is freezing up in discord

#

Anyways, for the insertafter you need to put the playerDataName of something

paper valve
#

ah damn i messed up the saving its not saving

vocal spire
#

What are you doing to save stuff?

vocal spire
paper valve
#

bruh i was saving the settings but forgetting to load them lmao

vocal spire
#

lol

light zodiac
paper valve
#

nvm i cant get my save system to work

#

head empty

#

no brain

vocal spire
paper valve
#

basically this gets called on the before save hook

#

it is called and works ive verified with logs

#

settings is getting the values from the data

#

but then

#

idk if it really saves ?

cedar hemlock
#

i found the problem

#

i had LocateMyFsm but it was supposed to be LocateMyFSM

#
  1. get fsm variables
  2. change Charm ID int variable to your custom charm id
  3. change Charm bool variable to true
#

how do i get fsm variables

vocal spire
# paper valve

Where are you setting the values of the journal player data

cedar hemlock
#

help i cant find how to change the charm id

vocal spire
#

You don’t?

paper valve
vocal spire
#

CharmHelper gives you an id and you use that for whatever

vocal spire
cedar hemlock
#

in the docs i can only find fsm.AddIntVariable("new variable name");

paper valve
cedar hemlock
vocal spire
#

Oh

#

Go back to grenade’s instructions

cedar hemlock
#
  1. get fsm variables
  2. change Charm ID int variable to your custom charm id
  3. change Charm bool variable to true
vocal spire
#

So do
FsmVariables vars = fsm.fsmVariables;
vars.GetFsmInt(“Charm ID”).Value = the charm id;
vars.GetFsmBool(“Charm”).Value = true;

#

Replace the quotes with better ones

cedar hemlock
#

ok so how do i start it

#

nvm lemme try smth

vocal spire
#

?

cedar hemlock
#

i made a new class

vocal spire
#

???

cedar hemlock
#

wait what does monobehavior actually mean

paper valve
#

going insane

vocal spire
vocal spire
cedar hemlock
#

ok so now that i changed the charm id will the charm dropped by devine be my charm?

vocal spire
# paper valve

Try installing Qol and viewing the save files json files

vocal spire
paper valve
#

alright

cedar hemlock
#
public class Fsms : MonoBehaviour
    {

            public void wierdthing()
        {
            var fsm = gameObject.LocateMyFSM("FSM name here");
            FsmVariables vars = fsm.FsmVariables;
            vars.GetFsmInt("Charm ID").Value = 41;
            vars.GetFsmBool("Charm").Value = true;
        }
    }
``` is all i have
paper valve
#

ok damn how do i find Qol, google is definetly not cooperating

cedar hemlock
#

i only need to change FSM name here

vocal spire
cedar hemlock
#

use the modinstaller

paper valve
#

aight

vocal spire
# cedar hemlock oh?

charmHelper.CharmIds[0] is what you want for the charm id if the first charm your mod adds is the one you want to drop

cedar hemlock
#

why is that in a different class
bc mulhima told me it needed to be a monobehavior and a different class

vocal spire
#

What needs to be a monobehavior

cedar hemlock
vocal spire
#

Show me where you use AddComponent<Fsms>

vocal spire
cedar hemlock
#

AddComponent<Fsms>??

#

am i being stupid again

paper valve
#

btw is it possible to save dictionaries ?

vocal spire
vocal spire
paper valve
#

lol ok

vocal spire
#

Also you can just save a JournalPlayerData class

paper valve
#

how do i use qol

paper valve
vocal spire
cedar hemlock
#

i dont have AddComponent<Fsms> as it was not in the docs

vocal spire
#

You NEED to add the component to use it

cedar hemlock
#

huh

vocal spire
#

Learn unity

cedar hemlock
#

so i just place that in initialze?

vocal spire
#

No

#

Where

#

Are

#

You

#

Using

#

The fsm

#

Not in initialize

#

Ex: a scene loaded hook

cedar hemlock
#

i dont have anything other than

public class Fsms : MonoBehaviour
    {

            public void wierdthing()
        {
            var fsm = gameObject.LocateMyFSM("FSM name here");
            FsmVariables vars = fsm.FsmVariables;
            vars.GetFsmInt("Charm ID").Value = 41;
            vars.GetFsmBool("Charm").Value = true;
        }
    }
vocal spire
#

No preloads?

cedar hemlock
#

oh that

#

preloads

vocal spire
#

??????????

#

Why aren’t they in the same namespace

cedar hemlock
#

thay are

#

namespace bgm is totally different

vocal spire
#

What

cedar hemlock
#

bgm was for the music

paper valve
#

yup its not saving in my savefile

#

damn

vocal spire
#

Are you trying to put multiple mod classes in the same assembly

#

I mean it works

#

But why

cedar hemlock
#

i have preloadedGO.Add("hornet", preloadedObjects["GG_Hornet_2"]["Boss Holder/Hornet Boss 2"]); Instance = this;

#

and

#
public static Dictionary<string, GameObject> preloadedGO = new Dictionary<string, GameObject>();
        public static TransMod Instance;
vocal spire
#

Weren’t you preloading a charm object to pick up?

cedar hemlock
vocal spire
#

What happened to that?

cedar hemlock
#
public override List<(string, string)> GetPreloadNames()
        {
            return new List<(string, string)>
            {
                ("Crossroads_01","Charm Holder/Poo Heart"),
                ("SceneName2", "Go/Path/Name/2")
            };
        }
#

that?

paper valve
#

am i missing something am i crazy

#

how do i tell the settings to actually save

vocal spire
cedar hemlock
paper valve
#

😐

cedar hemlock
#

ModHooks.Instance.ApplicationQuitHook += SaveCHEGlobalSettings;

#
private void SaveCHEGlobalSettings()
        {
            SaveGlobalSettings();
        }
vocal spire
#

(don't need that if you don't have globalsettings)

cedar hemlock
#

oh

#

i thought he was asking about globalsettings

#
private void initSaveSettings(SaveGameData data)
        { }
#

thats what i have

#

idk if it does anything

#

i stole that code from sfgrenade

vocal spire
#

didn't finish writing the code but I gtg

        public static GameObject charmPrefab;

        public override List<(string, string)> GetPreloadNames()
        {
            return new List<(string, string)>
            {
                ("Crossroads_01","Charm Holder/Poo Heart"),
            };
        }

        public override void Initialize(Dictionary<string, Dictionary<string, GameObject>> preloadedObjects)
        {
            Log("Initializing");
            Instance = this;

            charmPrefab = preloadedObjects["Crossroads_01"]["Charm Holder/Poo Heart"];

            initCallbacks();

            Log("Initialized");
        }

        private void initCallbacks()
        {
            UnityEngine.SceneManagement.SceneManager.activeSceneChanged += SceneManager_activeSceneChanged;
            ModHooks.Instance.AfterSavegameLoadHook += initSaveSettings;
            ModHooks.Instance.LanguageGetHook += OnLanguageGetHook;
        }

        private void SceneManager_activeSceneChanged(UnityEngine.SceneManagement.Scene arg0, UnityEngine.SceneManagement.Scene arg1)
        {
            if (arg1.name == "target scene")
                GameManager.instance.StartCoroutine(mycoroutine)
        }
paper valve
#

now that i switched to journalplayerdata to save its working 😳 no clue why

vocal spire
#

¯_(ツ)_/¯

copper nacelle
cedar hemlock
#

nice

ornate rivet
#

beautiful

#

ping me when you release it

merry lotus
#

That looks very sleek

#

56, is there anything special people need to do to get the Mac version working?
I thought that they were just supposed to run the .app, but no one has been able to get it working recently. (It tells them it is damaged)

copper nacelle
#

no

#

i hate life

#

ah

#

my zip really is not it

merry lotus
#

They move the files to desktop, then run the app, but it says it's broken

copper nacelle
#

yeah the executable isn't in there lmao

#

it put it into the root of the zip

merry lotus
#

OH

cedar hemlock
#

what

#

is there a fix

#

cus someone needs it in help

copper nacelle
#

i am fixing it

#

or trying to at least

#

does anyone happen to know how to zipinfo in python

copper nacelle
#

yeah

#

it turns out filename means path

jolly oriole
#

then no, have never done this

copper nacelle
#

pretty sure I have it fixed I just had/have to do something

copper nacelle
ornate rivet
#

Thank you father 56

#

This is very good

copper nacelle
#

extremely interesting

copper nacelle
#

@ancient karma ???

#

what

#

Wtf

#

No

proven cipher
#

<@&283547423706447872>

vocal spire
#

????

copper nacelle
#

yeeted

austere vigil
#

??????

wary rose
#

guy got banned

#

no worries

austere vigil
#

whatd he do though if its fine to ask

wary rose
#

nothing serious

#

still bannable

#

Kept asking people to call a random cellphone number they provided

austere vigil
#

ah makes sense

teal hatch
#

Ok so I want to get into the creation of hollow knight mods. Anyone know of any comprehensive tutorials on the creation and other file manipulation oriented details of mod development?

copper nacelle
#

apidocs -> video tutorials -> bad modding tutorial has a basic solution overview but you can generally just go through your ide and do a few things

teal hatch
#

Awesome thx!

teal hatch
#

?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/```
teal hatch
#

When I got to appdata locallow teamcherry hollowknight there are no save files

cedar hemlock
#

Is The folder hollow knight there?

teal hatch
#

Am I ok the wrong place?

cedar hemlock
#

You only have 1 save atm

teal hatch
#

User1 data?

cedar hemlock
#

User1.dat

teal hatch
#

Awesome thx

#

Thought I was looking for a folder