#archived-modding-development

1 messages · Page 495 of 1

jolly jungle
#

Oh, ok

#

What did it do?

vocal spire
#

They would appear behind the skin names

jolly jungle
#

Ahhh

#

I see

vocal spire
#

But they were crashing the game

jolly jungle
#

Oh

#

That's unfortunate

#

Any fix for this in CK2?

vocal spire
#

You don’t select skins yet

jolly jungle
#

Oh?

vocal spire
#

Plus I can’t think of a fix, because no matter what, all the images would need to be loaded at once

jolly jungle
#

Then what does it do?

vocal spire
#

It’s just one skin

#

At a time

jolly jungle
#

Oh, ok

vocal spire
#

Like the old CustomKnight

jolly jungle
#

So you need to swap them in the folders?

vocal spire
#

Yeah

jolly jungle
#

That means it'll load only one skin at a time, though, right?

vocal spire
#

Yes

jolly jungle
#

Is there at least going to be enable/disable?

vocal spire
#

?

jolly jungle
#

Switching between the chosen skin and Default

vocal spire
#

No

#

I mean, I might be able to do that, but I might not want to do that

#

Speaking of CK2, I should work on finishing the editor

#

I’ll do it later

#

modding on a slow pc where unity constantly crashes isn’t fun

jolly jungle
#

Woah, hold up

#

editor?

vocal spire
#

Editing large json files isn’t fun so I’ve been making a program to do it instead

#

I also probably need to display images of every frame and possibly animations when I’m finished with the functionality

jolly oriole
#

now i also got obj exporter working, so now i can create the meshes dynamically and also export those to refine them in blender

jolly jungle
#

Unless?

vocal spire
#

It will be a separate app that generates globalsettings for the mod

vocal spire
jolly oriole
#

maybe

vocal spire
#

?

jolly oriole
vocal spire
#

Yay

#

Thanks

jolly jungle
jolly oriole
#

no, i use unity to create scenes, which then just need to be loaded to be accessed, what i do is just to make some things easier

jolly jungle
#

Oh, alright

glass thorn
#

I've made the benchwarp hotkeys configurable now - anyone want to try it? Also, I figure it can't be included in the mainline version at least until the rando tourney ends, can it?

copper nacelle
#

I can try it

#

If you want

#

Sounds convenient

jolly jungle
#

fiftysix is dying to try it out, don't believe their indifference

glass thorn
proven cipher
#

I will definitely be checking this out next time I play. Thank you for this. 😊

jolly oriole
#

unity crashes after compiling/importing my mod (after i added some monobehaviours) and i don't know how to fix that

jolly jungle
#

Can someone explain this piece: ("SceneName1","Go/Path/Name/1") ?

vocal spire
#

That’s part of preloading

jolly jungle
#

In GetPreloadNames()

vocal spire
#

SceneName1 is the name of the scene you are preloading from

jolly jungle
#

Makes sense

#

And the other?

vocal spire
#

The 2nd string is the path to the object

jolly jungle
#

How do I find it?

vocal spire
#

So, for example: parent/child/child of child/child of child of child/target go

jolly jungle
#

wh?

vocal spire
#

To find it, I suggest using the scene dumps in the pins.

vocal spire
#

Yeah

#

Use the ggscenes from me for godhome

jolly jungle
#

Alright, i'll take a look at them

#

All the gg is cuz Gods&Glory, right?

vocal spire
#

Yeah

#

GG is the prefix for a lot of stuff from that update

jolly jungle
#

V = ascended?

vocal spire
#

No

#

And yes

jolly jungle
#

second form

#

?

vocal spire
#

Yes

jolly jungle
#

The file looks like it was printed with some script

#

With all the END and START and formatting

#

Though it would be madness to do all this by hand

vocal spire
#

So for example, you want a preload a object with a fsm(a boss for example), you take the scene name, then in the GameObject dump(or some other means) you find the object and it’s path(like what it’s a child of) ex: _SceneManager/Effects/BossName would give you: the child called BossName on the Effects object which is a child of SceneManager

#

It would return null tho because I’m pretty sure there would never be a child of SceneManager in the first place

jolly jungle
#

Suppose I want to edit an enemy

#

What would I need to get?

vocal spire
#

Depends

jolly jungle
#

The FSM? The enemy as a whole? Something else?

vocal spire
#

What are you adding, is it just in one instance of the enemy

#

Are you adding the enemy to other rooms then editing it

jolly jungle
#

Hm

#

Good question

vocal spire
#

What do you want to edit too

jolly jungle
#

How are, for example, bosses usually modded?

vocal spire
#

Editing fsms

#

And sometimes spritesheets

jolly jungle
vocal spire
#

And sometimes adding stuff from other bosses

#

?

jolly jungle
#

Wait what did your question mean

vocal spire
#

Do you want to edit every enemy like this enemy, or just this enemy

jolly jungle
#

Well
A godhome boss
Is only one instance
No?

vocal spire
#

?

crimson trench
#

where is the link to the mod installer pls help

vocal spire
vocal spire
jolly jungle
#

Well, the boss is different in and outside, no?

vocal spire
#

?

#

Usually bosses are exactly the same in and out of godhome except for a couple states

jolly jungle
#

Oh, alright

#

And those states won't cause problems?

vocal spire
#

Probably

jolly jungle
#

So yes, I'll happily try to do all changes

jolly jungle
vocal spire
#

With bosses, it’s different because they are in a set bit of rooms

#

Well only one way to know, test it

jolly jungle
#

You never tried?

vocal spire
#

Well why would I

#

I haven’t tested every boss

jolly jungle
#

Eh, fair point

vocal spire
#

It was my design choice to only occur in godhome

#

Plus I prefer adding boss levers in godhome so I don’t outright replace the boss

jolly jungle
#

Oh, yeah, how would one do that

vocal spire
#

Pale prince, and Uuwuu source?

#

I got it from pale prince

jolly jungle
#

Also, suppose I turn off the mod while playing the game, will it just revert the boss/remove lever/whatever else you choose to do?

vocal spire
#

Depends on the coding

jolly jungle
#

Hm

#

Anyhow

#

Back to the practical stuff

vocal spire
#

So take a object from the scene dump that you want as a example for preloading

#

Tell me the scene and screenshot the name of the object

jolly jungle
#

I have a file open in front of me

#

I just need to choose an aboject

#

ogject

vocal spire
#

Just choose any of them

jolly jungle
#

object

#

uh

vocal spire
#

Just a example

jolly jungle
#

but

#

Will they be of any use to me?

vocal spire
#

It’s a example

jolly jungle
#

I don't even know how to read this file

vocal spire
#

So yes and no depending on what you choose, but remember that it’s just a example

jolly jungle
#

I'm not sure what here is an object

vocal spire
#

So you see where every object begins

#

Ok

jolly jungle
#

and what is just... stuff, about it

vocal spire
#

Screenshot something and I’ll explain

jolly jungle
vocal spire
#

Oh come on

#

Editing images on mobile not fun

#

So the 2nd line under start is the object and it’s path

jolly jungle
#

first line is just the script telling us stuff?

vocal spire
#

Yes

#

None of these seem to have a path tho

jolly jungle
#

Uh

#

Wdym

vocal spire
#

Well they have a path, but their name is the only thing in the path as they have no parent

jolly jungle
#

Alright, makes sense

#

How do I know what things I need for whatever I decide to do?

vocal spire
#

So if you go down to where they start having \ in the path/name I’ll explain more

jolly jungle
#

Also there isn't a difference between Pantheon and Hall, right?

#

When fighting a boss

#

just making sure

vocal spire
#

No difference except a variable in game manager or Playerdata I think

vocal spire
#

Yeah

#

Copy that name

#

Or copy the entire path

#

The object door_dreamEnter is a child of Boss Scene Controller

#

Now to use it in preloading, replace \ with /

jolly jungle
#

this is what I'll want?

vocal spire
#

Yes but do the replace thing I said

jolly jungle
#

and swap the \ with / of course

vocal spire
#

Yeah

jolly jungle
#

scene name is just the file name, right?

vocal spire
#

So you see how \ or / separates the objects

#

Yeah

jolly jungle
#

mhm

#

I see that now

vocal spire
#

Yeah

jolly jungle
#

Problem is, how do I know what I want?

vocal spire
#

Well, the dump shows you the components and some of the values of the components

#

You can use that

#

Also it completely prints all the fsm states and what actions are at what index

jolly jungle
#

may I point out this is a 13k line file and I never used this before

vocal spire
#

Ever heard of ctrl + f

#

So you can find a object’s name in fsm viewer.

jolly jungle
jolly jungle
#

I see

vocal spire
#

You can find both the object and Fsm’s names

jolly jungle
#

lemme open it up real quick

vocal spire
#

Gtg, gl

jolly jungle
#

thanks

#

Well I gtg too, anyways

carmine pivot
#

finite state machines everywhere

vocal spire
#

playmaker finite state machine vs non playmaker finite state machine who wins

jolly jungle
#

@vocal spire it can't be as simple as that though

vocal spire
#

It is

ornate rivet
#

is there a way to get a list of all the mods that have been loaded?

jolly jungle
#

What does it help to receive copies if I want to change the gameobjects themselves

jolly oriole
ornate rivet
#

hmm

ornate rivet
#

what is this

jolly oriole
#

something like modcommon or seanprcore wont be listed in that tho

ornate rivet
#

that's fine

#

why won't they be on that list though?

jolly oriole
#

because they don't have a class that derives from Mod or IMod

ornate rivet
#

I see

ornate rivet
jolly oriole
#

or wait a sec, checking something

ornate rivet
#

okie

jolly oriole
#

ok, confirmed that only mods with an actualy derived Mod class get added to that list

jolly jungle
#

This is all so confusing

#

How did you all get started with this?

ornate rivet
#

we didn't start with this, there was no guide before

vocal spire
ornate rivet
#

the preloader the guide is talking about is for if you want to get a copy of a gameobject (GO). It does the work of going to the room the GO is in and getting it for you

#

but if you want to edit a specific GO from a specific room, then you have to wait till the player goes to that room, use GameObject.Find as RedFrog said, and edit the GO

jolly jungle
#

Ah, I see nowww

#

Thank you

vocal spire
#

Nah

#

UnityEngine.SceneManagement.SceneManager.ActiveSceneChanged I think

jolly jungle
#

Eh nevermind

#

I'll just try it, why the hell not

jolly oriole
#

i use the UnityEngine.SceneManagement.SceneManager.activeSceneChanged hook

jolly jungle
vocal spire
#

yes

jolly jungle
#

Cool

#

Now I need to figure out how to use this

#

can I throw away the throw

vocal spire
#

yes

jolly jungle
#

What do I pass in, and what does it give

#

Generally

vocal spire
#

....you put in a string

jolly jungle
#

Like, I obviously pass in a string, but what is it

vocal spire
#

it returns a gameobject

jolly jungle
#

The name of it?

jolly jungle
vocal spire
#

my hands are frozen and ive had a really hard time typing

jolly jungle
#

so, I put in the name of the gameobject, and it gives me back the actual gameobject?

vocal spire
#

yes

#

but

jolly jungle
#

oho?

vocal spire
#

this is where you should use a coroutine

jolly jungle
#

Ah

#

Yes

vocal spire
#

to wait until it's not null

#

I suggest attaching a monobehavior to the game manager and using (monobehavior instance).StartCoroutine(coroutine)

jolly jungle
#

Haven't touched one of those in a long time

jolly jungle
#

Lemme think palehmm

#

Hm

vocal spire
#

GameManager.Instance.AddComponent<MonoBehaviorThingIdkWhatYouWouldNameIt>();

#

why did I press enter early

jolly jungle
#

Wait

#

Where does GameManager come from?

#

Oh god, I smell big chunk of code

vocal spire
#

example

private void OnSceneChange(Scene arg0, Scene arg1)
{
   var thingy = GameManager.Instance.AddComponent<MonoBehaviorThingIdkWhatYouWouldNameIt>();
   thingy.StartCoroutine(ThingThatDoesStuff);
}
private IEnumerator ThingThatDoesStuff()
{
   yield return new WaitWhile(() => !GameObject.Find(ThingythatIwanttoget));
   var thingyIwanttoget = GameObject.Find(ThingythatIwanttoget);
}

I think

#

GameManager is a thing

#

that does things

#

its a component on the _GameManager object

jolly jungle
#

Wait

#

var?

#

I thought types matter

vocal spire
#

c sharp is cool stuff man

#

inferred type I think

jolly jungle
#

Oh wow

#

I like that

vocal spire
#

My spelling is probably all over the place sorry

#

I suggest not adding the component on room change tho

jolly jungle
#

Oh?

#

What, then?

#

Wait, no

#

Aren't we only finding it?

vocal spire
#

?

#

wdym

jolly jungle
#

nevermind, keep explaining zote

vocal spire
#

I'm talking about adding the component to the gamemanager

#

here, let me change it up a bit

jolly jungle
#

I'm lost, again

vocal spire
#
private void OnSceneChange(Scene arg0, Scene arg1)
{
   var thingy = GameManager.Instance.GetComponent<MonoBehaviorThingIdkWhatYouWouldNameIt>();
   if (!thingy)
      thingy = GameManager.Instance.AddComponent<MonoBehaviorThingIdkWhatYouWouldNameIt>();
   if (arg1.Name == "TheSceneWhere Stuff Happens")
      thingy.StartCoroutine(ThingThatDoesStuff);
}
private IEnumerator ThingThatDoesStuff()
{
   yield return new WaitWhile(() => !GameObject.Find(ThingythatIwanttoget));
   var thingyIwanttoget = GameObject.Find(ThingythatIwanttoget);
}
jolly jungle
#

Where does GameManager come from?

vocal spire
#

it is a component attached to the GameObject _GameManager

#

you could also just do something like

var mygo = new GameObject("Name of the thing that makes stuff happen") 
// var mygo = new GameObject() also works
GameObject.DontDestroyOnLoad(mygo);
mygo.AddComponent<COMPONENTTTTTTTTTTTTTTTTTTTTTTTTTTTT>();
#

k ima go do something else now

jolly jungle
#

Aaaaand I'm back

jolly jungle
#

My point is, do I need to do anything special to use it or does it exist simply thanks to whatever other things I use

vocal spire
#

it exists because it's part of hk

#

you don't specifically need gamemanager because of the 2nd method I showed you where you create a new gameobject and attach your monobehavior to that instead

jolly jungle
#

Ah, alright

#

I still don't get your actual code

#
// var mygo = new GameObject() also works```
#

what's the difference?

vocal spire
#

one makes a object with the string as it's name

#

the other uses New GameObject as the name I think

jolly jungle
#

So mygo stores inside it a GameObject called "whatever we put in here"?

vocal spire
#

yes

jolly jungle
#

Oh hell yeah

#

I understand something

#

And then what component do you add to it here?

mygo.AddComponent<COMPONENTTTTTTTTTTTTTTTTTTTTTTTTTTTT>();

vocal spire
#

a monobehavior that you make

jolly oriole
#

Unity Problem: when i update the DLL, unity compiles the scripts, after compilation the editor just closes and i don't know why.
What i do know is that the changed code is actually compiled, because after reopening the project everything works as it should.
Editor.log: https://hastebin.com/lokapikudo.makefile

jolly oriole
#

fixed the editor crashing

#

made a second project with the same assembly name as the first, but it only has just the monobehaviours, even without function bodies

jolly oriole
vocal spire
#

?

jolly oriole
#

nvm, figured it out

copper nacelle
#

what bro

floral furnace
#

uhuh

jolly oriole
#

ig this was another helpfull development message?

ornate hornet
#

Who do I have to bribe to get the HowwowKnyight mod into the mods drive ?

vocal spire
copper nacelle
#

both of you gimme your emails

copper nacelle
#

bro why are you monocling me

#

adding stuff to the drive myself is so much effort

#

this is future proof

#

really though the drive isn't super necessary at this point

#

Because of modlinks.xml

vocal spire
#

K

#

So should we just put it in the drive ourselves?

copper nacelle
#

yeah

vocal spire
#

Ok

#

Do we need to edit the installer to put it on there?

copper nacelle
#

yeah pr modlinks.xml

vocal spire
#

K

copper nacelle
#

there are some instructions at the top

vocal spire
#

since I'm adding frogcore, I might as well do the uuwuu update too

vocal spire
#

k did a pr for uuwuu and frogcore

vocal spire
#

how do I fix FrogCore constantly needing to update?

copper nacelle
#

that means you put in the wrong shasum

vocal spire
#

shasum?

#

sha1?

copper nacelle
#

yes

vocal spire
#

how do I get the right one

#

I searched up a sha1 generator and generated one from the name FrogCore.dll

copper nacelle
#

bruh

#

you need the file hash not the hash of the name

vocal spire
#

well ill remember this

#

ill use the excuse of I am tired

#

ok I think I have it now

#

created another pr

#

this time it should have the right hashes for uuwuu and frogcore

grave basin
#

hey so im interested in learning to make mods but I have no clue where to even begin can anyone point me in the right direction 😅

floral furnace
grave basin
#

tyvm

jolly jungle
#

And good luck

grave basin
#

lol ty

jolly jungle
#

Do you already happen to have background in anything like this?

grave basin
#

I have experience writing code and I've made small mods for other games before so I have a bit of a head start in that department but t_shrug

#

I've never published anything I've made, just small QoL changes or funny things for myself

jolly jungle
#

What kind of mods are you planning to make here?

grave basin
#

No idea. something fun. My one meme idea is to spite a certain someone who made a photoshopped multi-grimmchild by replacing 4 charms with more grimmchilds

jolly jungle
#

Wait
Explain

#

You mean, actually turning the charms into Grimmchildren?

grave basin
#

someone sent a photoshopped image where they had like five grimmchilds

#

so I want to do that

jolly jungle
#

And then, the more you have, the more heads?

#

Wait

#

OH

#

Just multiple grimmchildren

grave basin
#

the more you have the more grimmchilds giggle

#

ye

jolly jungle
#

I thought for a sec you want to have one grimmchild
With multiple heads

grave basin
#

nah

#

I mean my image editing skills are sorta okay but that just sounds like it'd be a pain in the ass to make look good, if it was even possible which IDK

jolly jungle
#

Oh, it probably is

#

You'd only need to separate the head, and get each head to float around the main head or something, and for all heads to function independently

#

What charms will you sacrifice for these grimmchildren?

grave basin
#

probably the four-dots

#

and then...

#

dreamshield
cos it's ass, fight me

jolly jungle
#

Change all charms except for heavy blow

grave basin
#

nah then I'd have to give up unbreakable strength

#

ooh possibly make something that gives buffs to the 4-notch-bois while still retaining their original ideas I.E. Deep Focus no longer slows your heals down, Hiveblood delay is halved and regenerates back up to full no matter your damage, Soul Eater is removed from the game, stuff like that

#

something that makes them worth using 4 notches on

jolly jungle
#

regenerates back up to full no matter your damage
Not at once, of course
Like, one after another

#

Soul Eater is removed from the game
We should find a replacement to it, then

proven cipher
#

Soul Eater regenerates soul whenever you get a spell hit

#

Make it give like 17 Soul so that if you double with a VS you get a full refund.

#

Maybe it would need to change port spell because that would also let you just press Abyss Shriek over and over

vocal spire
jolly oriole
vocal spire
summer moat
#

sorry

jolly jungle
copper nacelle
#

uh huh

jolly jungle
#

Alright, I might use heavy blow now and then
but the others are trash

vocal spire
#

does it make me trash if I use all of the above

jolly jungle
#

Nah, it makes you a pro player

vocal spire
#

K

jolly jungle
#

They're such bad charms that using them is detrimental

jolly jungle
vocal spire
#

Not the entire thing

jolly jungle
#

Hm

#

Can you explain in english what basically needs to be done?

vocal spire
#

You need to start a coroutine to wait until the object you are looking for isn’t null

jolly jungle
#

It seems like I need to find the boss component upon entering and attach a monobehaviour

vocal spire
#

You don’t have to do that. I suggest it tho

jolly jungle
#

but I might be missing something cuz what you wrote seems longer in there

#

Alright so what's the coroutine for?

#

Oh I see

#

So when I enter, start a coroutine that waits for the object to be acquired, then attach a monobehaviour that alters it as I wish

#

yes?

vocal spire
#

Yes

jolly jungle
#

omg I actually figured something out

vocal spire
#

But, you need a monobehavior to do that coroutine

jolly jungle
#

Wait what

vocal spire
#

Look at lost lord again

#

It has the LostLord class which is the mod class

#

It has the KinFinder class which is a monobehavior

#

Then it also has the Kin class which is also a monobehavior

jolly jungle
vocal spire
#

Yes

jolly jungle
#

Alright

#

So what does each of the three you said do

vocal spire
#

Look at where it adds the Kin and KinFinder components

jolly jungle
vocal spire
#

First one

#

See where the hook is?

jolly jungle
#

The second appears to be a verification of sorts, what is it for?

jolly jungle
vocal spire
jolly jungle
vocal spire
#

It is also called in the after save game load hook

jolly jungle
vocal spire
#

Yes

vocal spire
#

In game disable and enable

#

Yes

jolly jungle
#

Alright

vocal spire
#

So see how AddComponent is called on making a new save and loading a save

jolly jungle
#

Yep

vocal spire
#

And how it’s adding it to the game manager?

jolly jungle
#

so, to what is the KinFinder added?

#

Oh yeah

#

Alright

vocal spire
#

You could replace adding that to the game manager with the new GameObject code I gave you

jolly jungle
vocal spire
#

And instead of destroying the component in unload, you’d destroy the GameObject

#

Yes

#

Look in KinFinder

jolly jungle
#

but

#
    {
        private void Start()
        {
            USceneManager.activeSceneChanged += SceneChanged;
        }

        private void SceneChanged(Scene arg0, Scene arg1)
        {
            if (arg1.name != "GG_Lost_Kin") return;

            StartCoroutine(AddComponent());
        }

        private static IEnumerator AddComponent()
        {
            yield return null;

            GameObject.Find("Lost Kin").AddComponent<Kin>();
        }

        private void OnDestroy()
        {
            USceneManager.activeSceneChanged -= SceneChanged;
        }
    }```
#

screw it

#

Hm

#

Is internal like private?

vocal spire
#

See how it starts a coroutine that adds the component

#

Internal is public but only things in this assembly can access tmk

jolly jungle
#

Ah, alright

#

tmk?

#

Anyways

vocal spire
jolly jungle
#

On start (loading a game/new save file, because of the code in LostLord) adds a hook for scene change, when it's called checks for the scene - in this case, Godhome's Lost Kin - and starts the AddComponent() coroutine. AddComponent does yield return null which I'll be honest I don't remember how yield works but I remember it waits for something or another

vocal spire
#

Yeah

#

I think it waits for a frame but I’m probably wrong

jolly jungle
#

GameObject.Find() only searches within the current scene, right? It can't find outside of it

vocal spire
#

Yeah I think

jolly jungle
#

Would be weird otherwise

#

Anyways, what's the Kin component that's added?

#

Oh found it

vocal spire
#

Look inside and find out

jolly jungle
#

It's the cs file there

#

I wasn't sure if it's the mod's file or something else

#

nevermind

#

So that's the fsm's code?

vocal spire
#

It’s what edits the fsm

jolly jungle
jolly jungle
vocal spire
#

Edit

jolly jungle
#

Alright, alright, nice

vocal spire
#

I mean, you could remake every attack

jolly jungle
#

Do I need to do anything special to open a monobehaviour?

vocal spire
#

?

jolly jungle
vocal spire
#

public class AAAAAAA :MonoBehavior

#

Yeah

#

Public or internal works

jolly jungle
#

thought so hoped so

#

Alright

#

So with this conversation, I think I'm ready to take my mod one step further in complexity while still doing nothing other than taking up space in the top left corner of the menu

#

Thanks

jolly jungle
#

Does the FSM-editing component need to have some specific name?

copper nacelle
#

no

jolly jungle
#

Alright, thanks

copper nacelle
#

if you want to have it be properly toggleable yeah

jolly jungle
#

👌

#

What does Lost Lord's SetupSettings() do? Defined on line 85, called in AddComponent()

copper nacelle
#

creates the global settings file if it doesn't exist

jolly jungle
#

Hm

#

Do I myself need to care about it in any way?

vocal spire
#

Pretty sure you can also call it in initialize

#

You don’t need to care about it if you aren’t using globalsettings

jolly jungle
#

pretty sure I'm not

grave basin
vocal spire
#

Meet SFCore by SFGrenade. Cool thing. Lets you add all sorts of stuff

jolly jungle
vocal spire
#

Yes

jolly jungle
#

Thanks

#

Time to open one of the many things that can give me the scene name

#

I can already guess it, knowing the format, but
we need to make sure

jolly jungle
#

private HealthManager _hm;
HealthManager is HK-specific, right? It's just something defined for whatever reason for this game

#

More importantly, when is Awake() called? Upon starting? Sometime around it? Some other time entirely?

vocal spire
#

Unity’s definition: when the script instance is loaded

vocal spire
jolly jungle
#

Thought so, thanks

vocal spire
#

It can be set to invincible, you can set a certain angle invincible, and more

jolly jungle
#

private InfectedEnemyEffects _enemyEffects;
Same idea for this, too, right?

vocal spire
#

Yes

jolly jungle
vocal spire
#

Yes

vocal spire
#

Should I make a page for the ApiDocs about adding journal entries?

jolly jungle
#

Sure

#

How does that have to do with infection particle effects?

#

Unless I misunderstood what that is

vocal spire
#

The class EnemyDeathEffects contains the code for granting journal entries

#

I misunderstood what you said

#

I thought you said InfectedEnemyDeathEffects

jolly jungle
#

Ah, I see

#

Anyhow

#

I just need to log some stuff and then I think I have the basic structure of the thing done

#

Then comes the hard part

#

Of addin actual content

vocal spire
#

What are you planning

jolly jungle
#

Not much

#

Just some Hive Knight buffs

vocal spire
#

K

jolly jungle
#

You?

vocal spire
#

stealing lifeblood master

jolly jungle
#

?

vocal spire
jolly jungle
#

What's that

vocal spire
#

Hive knight mod I made

jolly jungle
#

lifeblood master

#

ah

vocal spire
#

lol

jolly jungle
#

wait it's called lifeblood master

#

oh no

#

I don't like that

#

you're too close to my idea right now

vocal spire
#

At the time I couldn’t think of anything better

jolly jungle
#

Does it actually involve lifeblood though? palehmm

vocal spire
#

Nah

jolly jungle
vocal spire
#

Was too dumb at the time

jolly jungle
#

Anyhow

#

The real question

#

Is this

vocal spire
#

I was planning to remake it in a large expansion I was making

jolly jungle
vocal spire
#

What?

jolly jungle
#

no

#

back to doing stuff

copper nacelle
#

// no

#

it's pretty simple

ornate rivet
#

wow

#

@safe hamlet

#

🥒

safe hamlet
#

wtf

#

i can't dm you

ornate rivet
#

why not?

safe hamlet
#

not friended

ornate rivet
#

I guess I'll never join back 🥺

floral furnace
#

yo 56 we got a pleading emoji here

grave basin
#

yoooo guess who's making mods

vocal spire
#

Me

grave basin
#

well yes but also me

vocal spire
#

What happened here?

grave basin
#

If I've done this right and I probably havent but if I have, baldur shell should have a 25% chance of restoring one hit of durability per kill

#

survey says I have not

#

but the other thing worked correctly

#

so I guess that wins

quick nimbus
#

Is anyone here? Out of curiosity, how are mods created? Can we modify legacy code? What language do we work in?

#

Is this C#? Looks like Java and Golang combined

floral furnace
#

C# yeah

#

basically you create a dll and the modding API loads it into the game when you start it

#

heres a good place to start if youre interested in making mods

quick nimbus
#

Thanks. If I were specifically interested in the multiplayer mod, do I have to do something easier first or can I jump right in

#

And is the code for mods public on Github?

floral furnace
#

most of the mods are open source

#

id suggest you do something easier just get your bearings

#

but if you already know your shit then you can probably quickly transition into the multiplayer mod if you think you can handle it

#

i dont have the link to the multiplayer atm

quick nimbus
#

I haven't made a mod in a game before nor have I worked in C# before so it'll be a learning experience. But yeah, I have a fair bit of experience programming.

#

I'll try something easier first, I guess.

floral furnace
#

if you know Java already most likely youre gonna have a very smooth transition to C#

#

syntactically theyre super similar

#

BUT you will need to understand Unity concepts such as implementing MonoBehaviours

#

HellMod is probably your best option of understanding how to make a simple mod and its on github

quick nimbus
#

Oh, thanks. Link please

#

Nvm got it. Thanks a lot!

floral furnace
#

yeah, the video tutorial in the 2nd section of the apidocs should guide you relatively straightforward, 56's provides the basic modding tutorial whereas saleh handles stuff like adding scenes and what not

quick nimbus
#

Oh no, no autofill 😦

#

Nvm there is autofill. Sweet! I'll probably get to work on this tomorrow. Thanks @floral furnace

jolly jungle
#

Can I join your surveys?
That just means playtest right?

grave basin
#

"survey says" is a jokey way of saying "I tried it and"

ornate rivet
#

what makes white defender laugh? I kill his AudioSource but he still keeps making noise.

jolly oriole
#

do you happen to know when he laughs?

jolly jungle
#

You can never kill the laughter of the jolly Wit Depender

ornate rivet
#

when he is stunned

#

ok found the Voice Player event

#

thanks not sure why I didn't look there

jolly oriole
#

FSM Dung Defender
State Stun In Air has an AudioPlayerOneShot (idk if those contain laughs, but they appear to be)

ornate rivet
#

yea

#

I'll copy paste the fade audio event into an earilier state so it happens earlier

#

yay it worked thank you

jolly oriole
#

np

jolly jungle
#

What do you need to stop the laughter for?

jolly jungle
ornate rivet
#

for pale court

jolly oriole
#

As if that's ever going to be finished lmao

vocal spire
#

lol

ornate rivet
grave basin
jolly jungle
#

Same

#

I have roughly a week more than you in this

#

And it seems like you already did more than I did

#

So just

o7

jolly jungle
#

Alright I have no idea what I'm doing wrong

#

There's some problem in the coroutine to add the altering code/the altering code itself

#

Wait I might have found it

#

The coroutine is meant to wait one frame, run once, and end, correct?

#

Aight I have no idea what's wrong

#

It seems to still... not not-work, yet

#

But there's definitely an error message at the top left corner and in the logs

#

... FAILED TO LOAD! Check ModLog.txt.

#

Alright

#

So far, the mod doesn't not-work

#

All it's supposed to do it change the boss's hp

#

but for some reason

#

There's still the error message and error logs

#

Which I have a bad feeling aren't good

jolly oriole
#

send them here

#

even tho it's christmas i can take a look at them

copper nacelle
#

shit time zone

jolly jungle
#
[ERROR]:[API] -   at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)
[ERROR]:[API] -   at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at System.Reflection.MonoMethod.GetCustomAttributes (System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0 
[ERROR]:[API] -   at Modding.ModLoader+<LoadMods>d__9.MoveNext () [0x00000] in <filename unknown>:0 ```
#

The mod works perfectly

#

but there's still error logs and the "cant load" message in the topleft

copper nacelle
#

incredibly interesting

#

what are you marking with IteratorStateMachine

jolly jungle
#

Ah
Glad you asked
I have no idea

#

This happens only when I have the coroutine defined

#

you disable this piece of code, and while the mod - obviously - doesn't function, no errors of any kinds

copper nacelle
#

what framework are you compiling for

vocal spire
#

You need to do 3.5

jolly oriole
#

you need to compile against .net framework 3.5

vocal spire
jolly jungle
#

aight, I'll take a look at this later

#

in the meantime, I wanted to know

#

How does something like Stunning a boss work?

#

The time-out part of it

vocal spire
#

Stunning is a fsm

jolly jungle
#

Yeah, I know that part

vocal spire
#

There is a method on game manager called FrezeMoment I think

jolly jungle
#

Hm

vocal spire
#

Also what framework are you doing?

jolly jungle
#

Lemme pull up the fsms quick

jolly jungle
vocal spire
#

As we said earlier, you need to do 3.5

jolly jungle
#

As I said earlier, I'll take a look at it later

vocal spire
#

As I said now ok

jolly jungle
#

oh

ok

#

Why does it care for charm 15? Is that Heavy Blow -> Reduces hits for stun?

vocal spire
#

Pretty sure

jolly jungle
#

Alright

#

Anyways

vocal spire
#

Yep heavy blow is 15

jolly jungle
#

So what I want is some timed event where the countdown to it resets upon being hit

#

Hm

vocal spire
#

?

jolly jungle
#

Oh god this is gonna be complicated

#

Should I draw the way I want this to work before I try to code it?

#

Seems like a good idea

vocal spire
#

?

jolly jungle
#

Hm

#

Why did I choose this boss

#

Oh god

vocal spire
#

¯_(ツ)_/¯

#

What exactly are you trying to do

jolly jungle
#

Different idea

#

Let's start

#

By modifying one of the existing attacks

vocal spire
#

K

jolly jungle
#

Suppose I want to summon the honey spike projectiles

vocal spire
#

It’s just a simple send event if I remember correctly

jolly jungle
#

Mhm, alright

#

Lemme take a look

fair rampart
#

Hi guys, Is there a way to mod Hollow Knight? I checked the video made by Relyea on how to mod it, but I can't find the bot that sends it

jolly jungle
#

You mean use mods?

#

Or create mods?

fair rampart
fair rampart
jolly jungle
fair rampart
jolly jungle
#

no problem

jolly jungle
#

Battle Scene\Globs\Hive Knight Glob\Stingers
These are the spikes?

#

Ah, no, that's all eight of them

#

So its children are the spikes

#

Now, how do I
plagiarise them

jolly jungle
#

Aight, I don't have much to base my code off
So I believe this is not the best way to do it, if even possible
But
Is it possible to do it similarly to Lost Kin/Lord's infection projectiles?
Still trying to figure out how to find them

#

Well anyways I gtg

grave basin
#

im currently trying to make a mod that adds five more copies of grimmchild into the game that each spawn their own grimmchild and I am quickly discovering exactly how not-simple that is

#

Why am I doing this? to dunk on someone. Will it be worth it? No. Am I gonna do it anyway to see what I can learn from it? Yes.

ornate rivet
#

why not just have the 1 charm make 5 grimmchildren

jolly oriole
#

grimmdergarten

grave basin
#

The screenshot I'm mimicking shows 6 grimmchild charms

#

it's a photoshopped meme but i want to make it a real thing

#

that's my backup plan tho

vocal spire
#

@grave basin you might want to look at the dreamshield coop mod in Dnspy(I based the grimmchild part off CustomKnight. It was my first mod, the coding is terrible) and jngo’s CustomKnight code on GitHub. The thing with the way I did it makes only one grimmchild appear though. I think you need to change the tag on it after instantiating so it doesn’t bug

#

Gtg

grave basin
#

neat ty

granite kestrel
#

Guys do you know the more save mod is conflict with debug mod

gilded lotus
#

yes

granite kestrel
#

Why

proven cipher
#

Because More Saves is a bit broken.

jolly jungle
#

"A bit"

jolly jungle
vocal spire
#

@jolly jungle you need to replace every instance of the original charm being used. It’s better to add completely new charms

jolly oriole
#

may be easier than that, as charms are loaded exactly once (after startup, on the menu screen)

vocal spire
grave basin
#

Actually I found a better solution that's more in line with the original meme

#

It actually came from an error in the code from the custom charms version

#

whenever something tries to mark grimmchild as equipped undo that

#

you put the grimmchild on by selecting it in the inventory and take it off by selecting it in the equipped bar

#

If that ends up breaking something it doesnt matter because this mod is literally just a meme that I'm going to use once and then throw away OMEGALUL

grave basin
#

and then spawn in a bunch of grimmchilds

#

Alright and that's not how the game handles charms and that gets it stuck in an infinite loop and crashes the game.

#

See this is why I do these dumb projects - I'm learning a lot through experience

grave basin
#

OOP NEVERMIND

#

the right answer was to override the check with a "return false"

#

Now all that's left is to find a way to spawn in that many grimmchildren without relying on equippedCharm_40

#

side note if you close and re-open the menu, the fact that the game doesnt think these are equipped leads to a very strange thing where unequipping them essentially adds two temporary invisible charm notches that last until you close and re-open the menu again

jolly oriole
#

after looking at it, for the grimmdergarten to work, you could add a bunch of custom charms, set a string value to that new boolname (Charm Effects - Spawn Grimmchild FSM -> Check State -> PlayerDataBoolTest action -> boolName string)
and you can add custom stuff to the custom grimmchild in the Idle state of the same FSM

grave basin
#

ye

#

that was the plan but then I got a better idea giggle

#

I still have the other idea saved tho so if I go for that...

#

in any case I appreciate it

vocal spire
#

pretty sure grenade's idea doesn't risk "killing" saves, but whatever your intention for the mod is

#

Then again equipping custom charms, not taking them off, then disabling the mod can be bad for saves too

jolly oriole
#

i forgot to mention that you'd have to copy the Spawn Grimmchild FSM onto a Charm Effects GO as many times as you want grimmchildren

grave basin
#

actually from having accidentally done that it's not too bad it just turns into a no-effect grayed out version of dashmaster and you unequip it

#

And yes that's true

#

that was the plan

#

But in any case im not too concerned about the save killing thing bc this is a throwaway gag on a fresh save file

#

More to learn about the edge cases that are hard to study in a document

#

"what will I learn if I break as much as I can in this specific way"

jolly oriole
#

true

vocal spire
#

Gravity Knight and Random Knight mods

#

anyway, trying to get the playmaker editor working with the utiny ripper dumped hk isn't going too well

#

also it's on my new pc

grave basin
#

rip

vocal spire
#

I'm resorting to commenting out code that doesn't work and hoping it isn't used anywhere

grave basin
#

been there

vocal spire
#

the only stuff I had to do it to so far was obsolete tho

grave basin
#

"look if this breaks something I can undo the comment"

vocal spire
#

ok I think I fixed everything

#

more errors out of nowhere

grave basin
vocal spire
#

lol

grave basin
#

modding is fun because I like programming but the thought of slaving away churning out code for some corporation makes me want to commit quirrel

vocal spire
#

F

vocal spire
#

new idea: throw away 50% of my first idea, use new idea that will probably take another at least 1/2 hour of my life

grave basin
#

programming

jolly oriole
#

new ideas are great, that's how TestOfTeamwork was created lol

vocal spire
#

lol

#

new ideas scrapped my white palace addition tho

jolly oriole
#

... and easy custom charms, achievements, items (sorta) and some other stuff

vocal spire
#

good point

grave basin
#

easy custom charms
you're speaking in relative terms, right? OMEGALUL

vocal spire
#

?

#

custom charms are like one of the easiest things to add

grave basin
#

valid I'm just having trouble making the charm show up

vocal spire
#

it has no sprite?

grave basin
#

well it had no sprite and then I realized I gave it the wrong path and now its sprite is the default tiny-question-mark box

vocal spire
#

still really easy to add them

grave basin
#

ye

jolly oriole
#

can you show the code you use to load the image?

grave basin
#

not rn I closed it for now

#

lemme pull it up actually

jolly oriole
#

just @ me when you do

vocal spire
#

btw who likes the idea of making a mod from a json file except you can edit the json file with a program to make it 100x less confusing

grave basin
#

that takes all the fun out

jolly oriole
#

customknight+?

vocal spire
#

it's meant for people who don't actually make mods

#

same idea

#

not the same thing tho

#

I should really finish that tho

grave basin
#

copy-pasted from the tutorial thing cos I lack originality OMEGALUL

vocal spire
#

lol

#

there's a way to do a foreach with that but I gtg

grave basin
#

oh nono there's only one sprite

#

it's just grimmchild 5 times

vocal spire
#

just saying for multiple charms

grave basin
#

ye

vocal spire
#

you could also probably get the grimmchild charm sprite from the charm icon list

grave basin
#

you would think that

#

but

jolly oriole
#

wait no

grave basin
#

as it happens, the way that the game handles the grimmchild charm in particular makes that painful and asinine to do to the point where I just fucking gave up

jolly oriole
#

is fammchild the sprite of the charm or grimmchild

vocal spire
#

gtg

grave basin
#

charm sprite

jolly oriole
#

then idk why it doesn't work

grave basin
#

IDK either

#

wait

vocal spire
#

what's the code for replacing or adding charms

grave basin
#

wait

jolly oriole
#

maybe something related in Modlog.txt or output_log.txt

grave basin
#

I just had an idea

vocal spire
grave basin
#

TRU

vocal spire
#

I actually gtg now

jolly oriole
#

bb

grave basin
#

have fun and thx for the help

#

for reference

#

also the idea I had didnt work out

#

I think this might be indicative of a problem

jolly oriole
#

uh, let me test that

#

it may be an issue of the png having problems with checksums and stuff, but idk

grave basin
#

?

#

let me test that?

jolly oriole
#

can you DM me the image that you use for the sprite?

grave basin
#

sent

jolly oriole
#

... just to be sure, you have gone into the properties of the image withing visual studio and set the build thing to "embedded resource"?

grave basin
#

yes. I tried other things but they just went back to blank image so I figured that wasnt the issue

jolly oriole
#

ok

#

trying in a bit

#

there definetly is something wrong with your image, yours is the tiny question mark, the other grimmchild i loaded your image in paint.net and just saved it again.

grave basin
#

kk I'll do the same

jolly oriole
#

no need

grave basin
#

too late

#

ah gottem ggs

jolly oriole
#

pog

high iron
#

oh jesus

#

i aint complaining but thats gonna be a cute overload

grave basin
#

Now time for the easy part

#

making the charm actually do something

#

wait did I say easy

high iron
#

i pity your head, from the desk slamming that must come forth.

jolly oriole
#

isn't too difficult

high iron
#

i wouldnt know, i can barely program basic flags in python

grave basin
#

I know it's not too difficult now I just need to learn how to bridge the gap between flowchart and code

jolly oriole
#

i'm actually kinda stuck, cause idk how to put an existing fsm onto a gameobject in code easily

#

so i'll let you figure that out :) have fun

grave basin
#

My solution might genuinely be to make an identical copy of the fsm and stick each one on a separate gameobject

safe hamlet
#

weeb

grave basin
#

?

grave basin
vocal spire
#

@jolly oriole would cloning the Fsm on the PlayMakerFSM component then setting it on the new one with reflection work?

jolly oriole
#

i tried to look for a something that doesn't involve reflection, but it's probably the only way to do that

grave basin
#

reflection

vocal spire
#

reflection is definitely simple enough for a first mod

#

Should actually be really simple tho

grave basin
#

oh fuck yes

#

This is my fucking jam

jolly oriole
grave basin
#

the first thing I do dives deep headfirst into something I have barely dipped my toe into

vocal spire
#

That also works

grave basin
#

oh shit thats neat

vocal spire
#

But wouldn’t editing the fsm edit both at that point(not sure if it’s required) since both components reference the same Fsm?

grave basin
#

The FSM has a check for if the child has already been spawned in and cancels if it has so I assume so

jolly oriole
#

that's to test

grave basin
#

unless I modify it so it's like weaversong in that it only goes for a certain number

#

and then set the target number based on the number of grimmchild charms equipped

vocal spire
#

It might be as simple as editing one value

#

Yeah

grave basin
#

which value

vocal spire
#

On Charm update hook change the number to the amount of grimmchild charms equipped

#

Well nvm

grave basin
#

isNotNull -> CANCEL

vocal spire
#

If grimmchild is already there, then the GameObject isn’t null

grave basin
#

what im gonna have to do is cannibalize weaversong and Mad Science it into one

vocal spire
#

Yeah

grave basin
#

Yeah I know what it means

#

The first time I opened this in the viewer my heart sank a little

vocal spire
#

It would probably be easiest to do insert method to calculate the grimmchild s

grave basin
#

and then I was like "wait weaversong exists"

#

wait a minute no

#

weaversong just spawns 3 weavers and doesnt check count???

#

WAIT A MINUTE WHAT IF I JUST

#

nah I have to clone the fsm

#

cos weaversong is a single charm to spawn 3 weaverlings

grave basin
#

ok dumb question but how do I find the GameObject to copy from 😅

jolly oriole
#

GameObject.Find("Charm Effects")

grave basin
#

tyty

#

also I changed the charm descriptions

#

wait wouldn't I be copying both to and from the same gameobject? I would need to find and change the fsm's overall name in that case, right?

#

Ok so because I'm an idiot tell me how badly I fucked up before I continue

#

@jolly oriole

copper nacelle
#

Wtf is this supposed to do

grave basin
#

it's supposed to be half-written code to duplicate grimmchild's effects five times onto different charms

#

WAIT I realized a serious mistake

copper nacelle
#

why are you copying onto one object 5 times

grave basin
#

because trust me

copper nacelle
#

no I don't think I will

grave basin
#

in my defense I have literally never done this before and I have already spotted several serious flaws in my current approach that you haven't mentioned yet.

copper nacelle
#

This is overkill

grave basin
copper nacelle
#

no that's right

grave basin
#

So I'm copying it because I'm fucking stupid and I've been led astray.

#

and just realized there is a much simpler and better approach to take

#

With a caveat

#

deleting that because uh

grave basin
#

Better question how do I create a new game object for use within the context of an FSM

grave basin
#

as in

#

I need to spawn a thing and first I need a gameobject for that thing to exist I guess is what I'm trying to get at?

copper nacelle
#
var go = new GameObject();
go.SetActive(false);
grave basin
#

Ah, that 2nd line must have been what I was missing

#

I'll try that tomorrow thx

jolly oriole
#

i mean, i would have done this with copying the charm effect FSM as many times as i want additional grimmchildren, seems possibly simpler to me

copper nacelle
#

bruh

#

literally just dupe the SpawnObjectFromGlobalPool action a few times

#

so fucking overkill

vocal spire
#

Yeah, just change the tag on the clones and manage the spawning yourself

jolly jungle
#

Alrightyyyy

#

Who pinged

#

It feels good to know someone pinged me here when I was offline, means I have some minimal presence at the very least

#

@grave basin Sorry for the ping but I absolutely must know
How far did you get, what stuff happened along the way, etc.
Cuz I'm too lazy to read all of chat

vocal spire
#

Bruh

jolly oriole
#

bruh

grave basin
grave basin
#

I got it to the point where it'll give me a blowjob but not to the point where it spawns the extras yet cos i got tired and went to sleep

vocal spire
#

I suggest cloning grimmchild itself instead of in the fsm on the charm update modhook

modest vapor
#

what tool do you guys use to extract game files from hollow knight?

ornate hornet
#

It's in the pins, I think it's the AssetBundles thing. Haven't used it myself. There's already a few dumps of gameobjects and image assets around.

jolly oriole
#

UABE

#

or nes's HKWE2

#

sometimes i also need nes's unity assets view (forgot the name lol)

modest vapor
#

Where would I find this?

#

I already use UABE but I don’t know where HKWE2 is

jolly oriole
ornate rivet
#

how do you determine what scene the player respawns into after they die?

#

cant remember

jolly oriole
#

1 sec

#

PlayerData.respawnScene

#

and respawnMarkerName for the GO to spawn at

ornate rivet
#

thanks

#

this game hates me

jolly oriole
#

pog

jolly jungle
#

Does the SSEAdv extract sprites, too? I'd guess it does, cuz of the name and all, but you never know

jolly jungle
#

Anyways

#

Now that I have my boss

#

I just do LocateMyFSM

#

and find the control one

#

and then I don't need to do anything from scratch, right?

#

I can just change things, too

#

Actually, I think I'll start by changing the stun fsm and lower the hits per stun, see if I can change it correctly

#

Where should I, uh, acquire, the fsm?

#

Lost Lord did it in Start()

#

So I suppose, why the hell not

#

better than most other options I could've chosen

#

Ah, wait, that's in Awake()

#

Whatever, we'll just see what happens

#

_stunControl.FsmVariables.FindFsmInt("Stun Combo") = 3;
Alright anyone knows why this isn't working?