#archived-modding-development

1 messages ยท Page 477 of 1

safe hamlet
#

i guess there are example mods

fair rampart
#

outdated example mods

safe hamlet
#

i might write something if i am bored

fair rampart
#

that don't even work

leaden hedge
#

do they compile

fair rampart
#

they compile but they don't work

copper nacelle
#

compile yeah actually function no

#

that's why I updated hell mod

leaden hedge
#

well as long as they compile and are loaded by the api

copper nacelle
#

wanted a decent example

#

for a working mod

safe hamlet
#

hell mod is a decent example

copper nacelle
#

with settings and fsm changing and all

leaden hedge
#

its still pretty much a usuable example

#

beyond getting your dll loaded into the game

#

nothing else is really relevant

fair rampart
#

okay then make your example mod print "hello world" to the console then if that's all that is relevant

safe hamlet
#

just steal twitchmod at this point, it has so much useless shit i copied from people

leaden hedge
#

pretty much is

safe hamlet
#

except few that i wrote myself

leaden hedge
#

like if set darkness mod as an example

#

how the fuck does darkness mod help you program anything else

#

unless you can actually look through the games code, and figure out how stuff works, no amount of hand holding is going to let you make something novel and good

#

unless you just get someone else to code stuff for you

safe hamlet
#

she do be speaking facts tho

fair rampart
#

you can lie by only telling truths

west ridge
safe hamlet
#

ctrl shift k

west ridge
#

i understand the code has been shown here but i'm not looking for the code i'm looking for how to find it

#

thank you

leaden hedge
#

its in the hero controller

west ridge
#

so how would i hook it would it be
//


internal static dashmod Instance;
public override void Initialize(){
ModHooks.Instance.DashVectorHook += function;}
void function()
{OrigDashVector.vector2 = new Vector2(2,2)}

?

floral furnace
#

are you hooking it with On. ?

west ridge
#

no

leaden hedge
#

doesn't it return a vector 2

west ridge
#

yes

#

anyone else get this error?

#

i do select 3.5

floral furnace
#

it should be

west ridge
#

that's what dnspy says

floral furnace
#

oh wait youre not doing it in visual studio, youre directly coding with dnspy? no idea then

west ridge
#

i am doing it with visual studio

#

just needed to reinstall it

#

ok so i tried

using Modding;
using UnityEngine;

namespace dash_vector_modding
{
    public class vector2mod : Mod
    {
        internal static vector2mod Instance;
        public override void Initialize()
        {
            ModHooks.Instance.DashVectorHook += function;
        }
        void function()
        { new Vector2(2, 2); }
    }
}

but doing this means the overload doesn't match the delegate DashVelocityHandler

#

do i need a scondary value for change or something?

floral furnace
#

you need a Vector2 varnamewtv in your function

#

also like Katie said it returns a Vector2 object

#

so it should be

Vector2 function(Vector2 myVector){
//put shitcode here on how you wanna change that vector
return myVector;
}

#

that error shows up when you dont match the hook's required parameters

west ridge
#

thank you

#

what's the return type?

floral furnace
#

a vector2

west ridge
floral furnace
#

change void function to vector2 function

west ridge
#

thank you

floral furnace
#

methods are like
<access type> <return type> <methodname> (<parameters>)

#

right now your return type is void

#

hehe, void, he he

west ridge
#

ohhhh i seee

#

so i need to check both the mod api and the original code to know what the acsess type is called?

#

i find it odd that the player position is stored with a vector3

floral furnace
#

access type is shit like private, public etc

west ridge
#

gottcha

#

so why Vector2 here?

floral furnace
#

afaik you dont really need to give a shit for now (personally i dont but dont shit on me for that) and just set most of them to public, unless you want certain classes being unable to see that method

west ridge
#

ah gottcha

#

so public should work

floral furnace
#

uhh i think Vec2 can translate to Vec3 easily? and besides theyre only dealing with the Knights movement in a 2d space anyway

#

yeah

#

if you dont set it i iirc itll automatically set it as internal or was it protected?

west ridge
#

i'm sorry i didn't understand the question

floral furnace
#

which one

#

oh the last one, that was a self question

west ridge
#

if you dont set it i iirc itll automatically set it as internal or was it protected?

#

ahhh ok

#

and vector3 is a vector2 with an extra numver

floral furnace
#

yeah its Internal, if you dont set the access modifier itll automatically set it as Internal

so
void weary() is gonna be internal void weary()

west ridge
#

like it's litterally a list of 3 numbers

floral furnace
#

yeah

west ridge
#

i wonder where they change the z axis on him though

floral furnace
#

its mostly for visual and positioning and afaik they dont

#

the game is still in a 3d space for the parallax anyway, unless they do it whenever the knight is walking forward no idea

west ridge
#

ramain esk mechanic of going in to the background and forground would be cool

#

they do do it with paralax not code using a free cam shows you that it's actually pretty close (at least thats the foliage)

#

idk about the normal background in all senarios

#

how do you get the vector2 controls from the player? i'm used to unity's new input system

floral furnace
#

HeroController.instance. something

#

ughhh its on the tip of my toungue

west ridge
#

can i see it in dnspy?

floral furnace
#

you could

west ridge
#

ight just gotta find it XD

floral furnace
#

HeroController.instance.transform.position

#

position should be the vector2 of where the Knight is currently in the worldspace, if thats what you meant

west ridge
#

ah no

floral furnace
#

If im an idiot (which i probably misunderstood your question) and youre actually looking for how the game controls the Knight, you should still read HeroController

west ridge
#

i'm not good at explaining to be honest XD

#

i mean when you tilt a control stick ie xbox left stick you get a vector2 how do I read that?

floral furnace
#

uhh ok ok might still be wrong, but you wanna check what inputs are being held/or used... right???

west ridge
#

the vector a control is being held pressed in for movement ye

#

like up right on a xbox controler (or wd on keybord) would be a Vector2(1,1)

floral furnace
#

ahhh not sure honestly, my only recommendation is you check either HeroController or InputHandler classes in dnspy and see if they touch those

#

I havent really dived into how the inputs work other than when checking whats being pressed or not, sorry

west ridge
#

how do i check what wasd is pressed?

floral furnace
#

well theres
InputHandler.Instance.inputActions

#

for example

//is a boolean that shows if the attack is being held down
InputHandler.Instance.inputActions.attack.WasPressed

//if pressed once, returns false if being held down after
heldAttack = InputHandler.Instance.inputActions.attack.IsPressed;

#

just replace attack with something else, theres tons of it

west ridge
#

i can't see it in dnspy

floral furnace
west ridge
floral furnace
#

not in the InputHandler class?

#

ahh no just check for InputHandler

#

or inputActions

#

honestly sorry dude i cant help you much here, i personally never dived into inputs too much

west ridge
#

i think i found it

#

public delegate PlayerAction hook_ActionButtonToPlayerAction(InputHandler.orig_ActionButtonToPlayerAction orig, InputHandler self, HeroActionButton actionButtonType);

floral furnace
#

yeah thats an On. hook

west ridge
#

ok

#

is on. hook needed here?

floral furnace
#

if you know those hooks, then yeah

west ridge
#

i have no idea

floral furnace
#

theyre not too difficult to go with, the only finicky part is knowing what overloads but you can let VS do it for you if you autocomplete

west ridge
#

ye

#

how conviniant

floral furnace
#

heres my example

// initalize this on start
On.NailSlash.StartSlash += OnSlash;

public void OnSlash(On.NailSlash.orig_StartSlash orig, NailSlash self){

orig(self); //return the control back to the original method you intercepted, so it continues normally
}
#

oh well there you have it

west ridge
#

under public static InputHandler Instance;

#

just gotta work out how to referance it

#

would it be Instance.inputx ?

floral furnace
#

InputHandler.Instance.inputHandler.inputx i guess

west ridge
#

InputHandler.Instance.inputX

#

thanks vs XD

#

also thank you for the help ๐Ÿ™‚

floral furnace
#

this is the part where sid comes in and says "np"

west ridge
#

he's asleep afaik

#

he didn't say it earlier either XD

#

it doesn't work

#

also diables the keyboard

floral furnace
#

did you auto complete it?

#

return orig(self)?

#

because yeah itll disable your keyboard since youre technically overriding the controls

west ridge
#
using UnityEngine;

namespace dash_vector_modding
{
    public class vector2mod : Mod,ITogglableMod
    {
        internal static vector2mod Instance;
        public override void Initialize()
        {
            Instance = this;
            ModHooks.Instance.DashVectorHook += function;
        }
        public void Unload()
        {
            Instance = null;
            ModHooks.Instance.DashVectorHook -= function;
        }
        Vector2 function(Vector2 change)
        { new Vector2(InputHandler.Instance.inputX, InputHandler.Instance.inputY);
            return change;
        }
    }
}```
lets me use the xbox controller but not keyboard
west ridge
#

i tried changing it new error though

#

changed the variable name rebuilt it and it didn't work

#

please a little help

floral furnace
#

sorry i did shit

#

try changing your lasPos var name

#

it probably has naming issue with another variable with the same name i think

west ridge
#

i did

#

it didn't work acted like the mod wasn't on

#

dashing still worked the same

floral furnace
#

can you post a higher res image

#

i cant really read it

west ridge
#
using UnityEngine;

namespace dash_vector_modding
{
    public class vector2mod : Mod,ITogglableMod
    {
        public Vector2 currentdirection = new Vector2(0, 0);
        public Vector2 lastposition = new Vector2(0, 0);
        public void Fixedupdate()
        {
            Vector2 currentpos = HeroController.instance.transform.position;
            Vector2 currentdirection = (currentpos - lastposition).normalized;
            Vector2 lastpos = HeroController.instance.transform.position;
        }
        internal static vector2mod Instance;
        public override void Initialize()
        {
            Instance = this;
            ModHooks.Instance.DashVectorHook += function;
        }
        public void Unload()
        {
            Instance = null;
            ModHooks.Instance.DashVectorHook -= function;
        }
        Vector2 function(Vector2 change)
        { new Vector2(currentdirection.x, currentdirection.y);
            return change;
        }
    }
}```
floral furnace
#

im guessing its also because of this

public Vector2 currentdirection = new Vector2(0, 0);

and another

Vector2 currentdirection = (currentpos - lastposition).normalized;

inside the method, remove the Vector2 in the Fixedupdate method

#

also remember it has to be FixedUpdate, thats the correct method spelling if youre gonna override it

west ridge
#

setting a value before runtime shouldn't cause errors and which Vector2 inside the FixedUpdate methord?

floral furnace
#

no wait hold on my understanding of local variables might be fucked up

west ridge
#

idk how they work entirley but i know declearing the variable before runtime works in the game i'm making

floral furnace
#

yeah it should

west ridge
#

it might be an issue with how i referance the player's position

#

idk

#

how do i referance the player gameobject if it isn't Herocontroller

floral furnace
#

uhh yeah im wrong with the global stuff btw sorry about that

#

just to get this straight are you still getting errors? or is it just not working?

west ridge
#

it's just not working

#

acting like i never put the dll in and enabled it

floral furnace
#

is it not showing up on the upper left corner when you load the game?

west ridge
#

it is showing up

floral furnace
#

then it should be working hold on

west ridge
#

it shows up i can enable and disable but the functionality is non existant

#

the keyboard still won't work either

#

nvm keybord is working

#

forgot you use arrow keys

floral furnace
#

this code is your ENTIRE mod right?

west ridge
#

yes

#

this code is the entire mod

floral furnace
#

Vector2 function(Vector2 change)
{
new Vector2(currentdirection.x, currentdirection.y);
return change;
}

i think this is the problem, youre making a new Vector2 object but, youre not doing anything with it

#

so essentially change is being untouched right now with 0 changes

west ridge
#

it's ment to referance the global variable which is being changed by Vector2 currentdirection = (currentpos - lastposition).normalized; and is Vector2(0,0) by defult in this mod meaning if nothing was happening dash shouldn't work unless the modding api works differantly here

#

or conflicting names or something

floral furnace
#

youre trying to change the dash vector right?

#

right now the value you want to change is not being changed at all

it should be something like return new Vector2(currentdirection.x, currentdirection.y);
or something

#

the hook is basically just returning the same DashVector untouched

west ridge
#

ohhhh that makes sence

#

i really need to learn about methord groups and the return funtion

#

i tried testing it the game crashed

floral furnace
#

so this "function" you have is being called everytime you dash right? youre basically saying "woah woah game before you finish executing this method, let me hijack it and let me modify it"

the return is essentially you saying "use this value instead", right now the game is passing the original Vector2 value... and your returning it back again with 0 changes

#

if youre crashing you might need to use exception catches, itll stop that method from working but at least you have an idea why its crashing

west ridge
#

restarted with no issues

floral furnace
#

aight

west ridge
#

well progress dashing makes me freeze in place so currentdirection isn't being updated

floral furnace
#

remember to use modlogs when you can

#

using static Modding.Logger

then you can easily show logs with Log("my message here")

#

useful if you wanna check whats the value in your currentdirection is

west ridge
#

thank you

floral furnace
#

it should accept Vector2 as an overload so you dont have to manually do it like Log(myVector2Object.x + " " + myVector2Object.y);

west ridge
#

makes sence

#

so do i do

Log(currentdirection);```
floral furnace
#

yeah

#

oh yeah and ; at the end of that import

#

just dont put it in your fixed update ofc, since it runs every other frame

#

unless you want an endless stream of logs

#

putting it on DashVectorHook aka "function" should be good enough

west ridge
#

thank you ๐Ÿ™‚

unborn maple
#

We are planning on making a custom charm extension for exaltation and want to add extra charms to 'glorify'. But to do that we need more charm designs. Who want to help us and make some designs for us?

vocal spire
#

Yes

#

Yay my keyboard is working again

west ridge
#

where does log print to?

floral furnace
#

lower left corner

west ridge
#

ahh thought it was a unity log thing where it'll put it in a txt

#

thank you

copper nacelle
#

it does

#

modlog in your saves folder

#

You can just also see it in game if you enable that

west ridge
#

ahh how do i enable it?

floral furnace
#

didnt you already enabled it in your global json file in your save?

west ridge
#

i think so but i can't see it

copper nacelle
#

show json

west ridge
#

sorry for the flash bang

floral furnace
#

this is ModdingApi.GlobalSettings btw

nimble lake
#

hey 56 can you fix the bug in bindings where you can't get lifeblood masks?

copper nacelle
#

maybe later

#

busy this week

west ridge
#

can you read hitboxes of enimies without assigning it as they are spawned?

copper nacelle
#

wdym

west ridge
#

like can you say the area the player will get hurt if they touch this is [hitbox of enimies in real time]

floral furnace
#

ahh so only show the hitbox of stuff that hits you

nimble lake
#

thanks

west ridge
#

yes but also output that data

copper nacelle
#

For enemies which are spawned after scene load I'd use the modhook for collider create

#

Otherwise you can just do it after scene load

west ridge
#

doesn't collider create get called tooo often?

#

also i did
{ "BoolValues": { "_keys": ["ShowDebugLogInGame"], "_values": [] },
but it didn't show up in game

fair rampart
#

"_values": [true]

copper nacelle
#

you can check for a HealthManager component

west ridge
#

ahh ok thank you

#

i'd be very interested in a mari/o for the knight

#

i wonder what it would think (insert abitray code exicution here)

fair rampart
#

too many variables, not gonna work

west ridge
#

oh?

#

like too much data or too much to consider

fair rampart
#

what would your fitness function look like ? it's a game with a lot of backtracking

west ridge
#

fitness is how quickly you can get the defeat the absolute radiance with the flower ending

fair rampart
#

except you'll never reach that point

west ridge
#

you could input human input as training data and then consider the current tas speedrunning strat then set fitness as the quickest way to do from point a to point b

fair rampart
#

isn't that easy.
otoh you could do PoP with a simple proximity to scene exit trigger fitness function

#

but I don't know if there's an easy way to simulate it faster than normal without rendering frames or skipping logic

west ridge
#

you don't need to afaik you can just run multiplue version of the same game

#

*versions

#

and on top of that it doesn't nesicarily need to be genirational learning

fair rampart
#

bruh I'm not a millionnaire imagine how much it would cost to get any results by running the game realtime

west ridge
#

player input as starting training data

fair rampart
#

no

#

that's not a thing

#

it won't give you any meaningful results

west ridge
#

i have seen it done it ranks the play's inputs like it was a genoration then lets the ai use it as a base line

#

current direction seems to equal my position at all times and i don't know why

        {
            Vector2 currentpos = HeroController.instance.transform.position;
            Vector2 currentdirection = (currentpos - lastposition).normalized;
            Vector2 lastpos = HeroController.instance.transform.position;
            Log(currentdirection);
copper nacelle
#

where do you set lastposition

#

also there's an actual velocity

#

on the rb2d

west ridge
#

i set laspos in the code and globally at the begining like i did for current direction

        public Vector2 lastposition = new Vector2(0, 0);```
#

how do i get the rigidbody is it under the hero controler referance?

copper nacelle
#

lastpos isn't lastposition

#

and HeroController.instance.GetComponent<Rigidbody2D>()

west ridge
#

thank you and it should be as when the next frame is called the public variable will be the same as last frame as it is called after the maths

#

also what is the magnitude of the dash?

copper nacelle
#

idk off the top of my head

west ridge
#

i think 10 makes sence but it might be 5

#

so how do i get the velocity?

copper nacelle
#

.velocity

west ridge
#

is it something like
HeroController.instance.GetComponent<Rigidbody2D>().velocity?

rose berry
#

How far does modding go?

west ridge
#

idk

rose berry
#

Like, total overhaul where you play as PK in a new story based around building the kingdom far?

west ridge
#

so far i've seen some decent progress on multiplayer

#

you could do that

rose berry
#

YES

#

I want that mod so bad

west ridge
#

afaik

vocal spire
#

@rose berry very far, far, not far, and nowhere all at the same time

rose berry
#

I just have no clue how to mod and dont have compiter

#

puter

#

I posted some of my idea in discussion

west ridge
#

you technically don't need a pc just a very strong android phone/switch/something

rose berry
#

true

west ridge
#

then mode it to work with linux

#

*mod

rose berry
#

Huh

#

cool

west ridge
#

i can't remember if hk is on linux but if it isn't you can run windows on vm ware

copper nacelle
#

it's on linux

west ridge
#

nice

#

hollow knight pc mods on switch would be cool

#

i mean both with and without modding

#

owo vessel i can teach you the very little i know and you can try from there

rose berry
#

I'll see if I can even run linux on my switch if I mod it

west ridge
#

be careful

#

honestly i suggest backing up your switch on an sd card if you know how

rose berry
#

yeah

west ridge
#

goodluck if you have a newer model though they really don't want you cracking that thing thouh if you overload it with mario kart ds via using a spindrift on the top of the stairs on the luigi's mansion map you can start running arbitary code you can't pirate with it but you can backup using and sd card unless they patched that i doubt it though

#

honestly though i highly suggest traditional methords
.
.

#

what using lets you use rigidbody2d?

copper nacelle
#

UnityEngine but you need a ref to 2d physics

west ridge
#

ahhh was missing the ref

#

thank you

#

my code doesn't seem to work the currentdirection updates to Vector2 currentdirection = HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized * 5; but when i call
Vector2 function(Vector2 change) { return new Vector2(currentdirection.x, currentdirection.y); } by dashing i dash on the spot

#

does it freeze you for a moment before dashing or am i missing something

copper nacelle
#

If current direction is a field it's just going to be set at the start

#

And then be 0

west ridge
#
using UnityEngine;
using static Modding.Logger;

namespace dash_vector_modding
{
    public class vector2mod : Mod,ITogglableMod
    {
        public Vector2 currentdirection;
        public void OnHeroUpdate()
        {
            Vector2 currentdirection = HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized * 5;
            Log(currentdirection);
        }
        internal static vector2mod Instance;
        public override void Initialize()
        {
            Instance = this;
            ModHooks.Instance.DashVectorHook += function;
            ModHooks.Instance.HeroUpdateHook += OnHeroUpdate;
        }
        public void Unload()
        {
            Instance = null;
            ModHooks.Instance.DashVectorHook -= function;
            ModHooks.Instance.HeroUpdateHook -= OnHeroUpdate;
        }
        Vector2 function(Vector2 change)
        {
            return new Vector2(currentdirection.x, currentdirection.y);
        }
    }
}```
#

it updates every frame

#

but when i dash nothing happens

#

like i just freeze

copper nacelle
#

bro

west ridge
#

?

copper nacelle
#

You're assigning to a local

#

In hero update

#

the field isn't changing

west ridge
#

i have the debug log though it changes when i move

copper nacelle
#

no

#

you're making a local variable

#

and then logging it

#

but that doesn't change the field

west ridge
#

*** o h*** sorry i didn't realize a

#

oof

#

it hurts being this stupid i'll get it eventually i'm sure

#

well good news it works bad news 5 is NOT the magnitude you need to multiply by

#

be funny if i didn't need to normalize or something

#

wait

#

almost the answer

copper nacelle
#

What you trying to do

#

Because this would make the current velocity * 5 the dash vector

#

and you can just get the velocity in the vector function

#

don't need per-frame

west ridge
#

like this? return currentdirection = HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized * 15;

copper nacelle
#

you don't need the variable at all

#

Are you trying to make dash go in the direction you're moving

#

or just change the magnitude

#

because if it's the latter you just do return 15 * change

#

There's no need to get the velocity

west ridge
#

i'm normaizing the vector i'm moving in then setting the speed

#

will that apply to the y axis?

copper nacelle
#

yeah

#

if you just want to change the magnitude

#

change the vector you're given

#

because that's the direction the dash was going to originally go in

#

you can normalize that instead

west ridge
#

well i feel stupid

#

i spent all day on that

#

i bet someone has already done this mod idea as well

copper nacelle
#

ยฏ_(ใƒ„)_/ยฏ

#

that's how starting out be

west ridge
#

15 * change does not apply to the players current y axis movement

#
  • 15 was fast ass hech like this XD
copper nacelle
#

do you want it to?

west ridge
#

yes

copper nacelle
#

Oh

#

then yeah just get the velocity

#

But also you might want to make the x default to the one given by change if the x is zero

#

because otherwise if you're not already moving you'll just dash in place

west ridge
#

yeah

#

i did HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized * 15; that works but the camera acts differantly going up feels disoriantaty the first few times

copper nacelle
#

If you want the normal dash magnitude you can just get it off change

#

like * change.magnitude or w/e

west ridge
#

that's awesome

#

return HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized.x * change + HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized.y * change;

#

wait

copper nacelle
#

You can multiply vectors by a scalar

#

just do .velocity.normalized * change.magnitude

west ridge
#

return HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized * change.magnitude

#

ye

#

thank you for the help ๐Ÿ™‚

copper nacelle
#

np

earnest scroll
#

haha nice

west ridge
#

epic timing

earnest scroll
#

i was just looking the gifs and missclicks

west ridge
#

fair XD

#

how do you detect if a player is on the ground?

earnest scroll
#

i read this topic every 2 or 3 days to check the multiplayer mod progress and other mods, i wish i could help but i dont know anything about programming and my english is terrible xD. Only i want u to know that y admire u guys and ur work. Keep going and thanks!

west ridge
#

trust me i suck as well

#

i'd love to test the multiplayer mod but everyone is trying to test it at 1am bst

earnest scroll
#

jngo tested at 4 am today xD

west ridge
#

still too early XD

#

hey 56 do you know why the play's position is set to a vector3 for some stuff?

#

thank you

#

can i change the private dath length?

floral furnace
#

you mean dash?

copper nacelle
#

the private field?

#

You can use reflection to do that

#

There's a ReflectionHelper class you use which makes it easier and faster

west ridge
#

reflectionhelper?

#

i see it but i can't find dash

#

*dash length

#

like for for how long the dash lasts?

rain cedar
#

dash length is rng

west ridge
#

how do i edit it in the mod?

#

and why are there two dash step ques?

#

thank you

#

what is speed sharp?

vocal spire
#

sharp shadow?

west ridge
#

i think that is public float SHADOW_DASH_SPEED;

vocal spire
#

ok

west ridge
#

?

vocal spire
#

yay

west ridge
#

then waht's the other one

vocal spire
#

is the other one just the normal shadow dash?

west ridge
#

*what's

#

ohhh that makes sence

vocal spire
#

yay I am smart

west ridge
#

then why two seperate speeds? they seem to be the same speed

#

ahhh makes sence

#

so an api thing?

#

intersesting

#

i also noted that the knight's position is tracked in 3d no idea why though

#

but in some cases it is referanced in 2d

#

dispite 3d not being needed in some places

#

what are the que dash steps and why are there 2 of them?

tawny onyx
#

Is there anybody have test the CustomTrail MOD? when I write a lot in the .jml file, the game will crash in preloading phase.
I check the code and find it will pull all the gameobjects in the list I write.
I guess the gc heap is overflow because of too many object loaded. So, is there other way to load a boss gameobject except preloading in game start

west ridge
#

two for dash and shadow dash but not sharp?

fair rampart
#

CustomTrial is abandoned

tawny onyx
#

so sad to heard that

west ridge
#

how's the multiplayer progress?

fair rampart
#

going

shy laurel
#

Wait theres a multiplayer mod for hollow knight?

vocal spire
#

yes

shy laurel
#

wow

#

um

#

Whats it called?

vocal spire
#

multiplayer

west ridge
#

multiplayer

tawny onyx
#

you can get it in github

west ridge
#

wait really?

shy laurel
#

also where can i get the mod installer thingy?

vocal spire
#

or ask here if you want

#

multiplayer isn't on the mod installer afaik

shy laurel
#

ah

tawny onyx
#

bob is developing it now

west ridge
#

if i knew that i'd be looking at the 2 knight's code to see how far it got

#

like i'd love to see what they can and can't do so far it's interesting for me ๐Ÿ™‚

vocal spire
#

sometimes people get to test it

west ridge
#

yeah like when it was 4am for me

#

i saw the client dll

#

fyi one look ath the code and i felt like i couldn't read like i couldn't understand the code XD

fair rampart
#

I don't understand it either

west ridge
#

i thought you were making it

fair rampart
#

most of it yeah

#

a lot of it was just following a simple tutorial

tawny onyx
#

i remember some have made a stand-alone server with C code. is it still update?

fair rampart
#

no

west ridge
#

doing HeroController.instance.DASH_SPEED = 1; doesn't work what's the correct way?

#

i put it in instalize

tawny onyx
#

..

#

HeroController is not exisits when initializing

west ridge
#

oh do i put it in a start methord?

tawny onyx
#

you can start a coroutine, and wait until the HeroController != null

west ridge
#

how?

tawny onyx
#

Emmm

west ridge
#

is a coroutine these void things?

tawny onyx
#

you can use GameManager.Instance.StartCoroutine(functionname)

#

I dont remeber auctually ... you can refer custom knight mod

west ridge
#

the skin mod?

unborn flicker
#

A coroutine is an IEnumerator

#

it can yield return commands like WaitWhile()

#

so that the code executes when it is ready, and does not block the game

west ridge
#

so like


functionname{
WaitWhile(HeroController = null)
HeroController.instance.DASH_SPEED = 1;}
#

to do HeroController.instance.DASH_SPEED = 1 when HeroController != null

unborn flicker
#
GameManager.Instance.StartCoroutine(functionname);

IEnumerator functionname{
  yield return new WaitWhile(HeroController.instance == null);
  HeroController.instance.DASH_SPEED = 1;
}
west ridge
#

IEnumerator functionname{
  yield return new WaitWhile(HeroController.instance.GetComponent<Rigidbody2D>().velocity.normalized * change.magnitude == new vector2 (0,0) && HeroController.instance.cState.onGround);
  log("this is the peek of your jump");
}```?
#

would this work?

rain cedar
#

Nah that would run when you had velocity on the ground

west ridge
#

and where would you put GameManager.Instance.StartCoroutine(functionname); so it fires at start as it doesn't have a definition for instance

rain cedar
#

Not the peak of jumps

west ridge
#

ahh right yeah the !

#

what referance is GameManager in?

vocal spire
#

Does anyone know how to instantiate the dreamshield with it's original functionality? Every time I instantiate it it just sits in the spot it is summoned in.

west ridge
#

no idea i'll have a look using dnspy

#

what is it called in the code?

vocal spire
#

I think it is a fsm, but Orbit Shield

west ridge
#

yeah it's an fsm

vocal spire
#

I get a null reference when I try to do anything there

west ridge
#

does it instatiate straight away i know earlier i needed a corutine to wait for the hero.controller to load before i tried editing it might be a similar error

vocal spire
#

I do it in charm update

west ridge
#

i'm not sure i know you can force equip it and remove the cost of equiping it if that helps

vocal spire
#

I can try that, but I want to make two float around the player

west ridge
#

oh i see how that's an issue

#

you might be able to modify that in system.reflector

vocal spire
#

Ok

#

also I tried copying the original shield with the same outcome

west ridge
#

i'm just trying to figure out how it works to be honest

vocal spire
#

ok

west ridge
#

from dnspy

#
        {
            add
            {
                HookEndpointManager.Add<CaptureAnimationEvent.hook_EquipCharm>(MethodBase.GetMethodFromHandle(methodof(CaptureAnimationEvent.EquipCharm(int)).MethodHandle), value);
            }
            remove
            {
                HookEndpointManager.Remove<CaptureAnimationEvent.hook_EquipCharm>(MethodBase.GetMethodFromHandle(methodof(CaptureAnimationEvent.EquipCharm(int)).MethodHandle), value);
            }
        }```
vocal spire
#

should I summon the extra shield with this?

west ridge
#

i'm not sure

vocal spire
#

I don't think that i'm summoning it at the wrong time

west ridge
vocal spire
#

isn't that for making the charm list?

west ridge
#

ye

#

this is the dream sheild id

#

38

vocal spire
#

yeah, I know

west ridge
#

public int charmCost_38; is the cost thing

vocal spire
#

yeah, I saw that when making an update to dreamshield coop

west ridge
#

ah nice

vocal spire
#

I'm trying to make exaltation use every charm since I updated it to work with the current version

west ridge
#

i wonder if you could edit the ui and force equip 2 of the same charm with 0 cost

vocal spire
#

maybe, but I have seen multiple of the same charm equipped, and it doesn't seem to do anything

west ridge
#

well that's one idea

vocal spire
#

here is what I use to summon the shield
GlorifiedShield = UnityEngine.GameObject.Instantiate(churm.LocateMyFSM("Spawn Orbit Shield").GetAction<SpawnObjectFromGlobalPool>("Spawn", 2).gameObject.Value.FindGameObjectInChildren("Shield"), HeroController.instance.transform.position, default(Quaternion));

#

GameObject churm = GameObject.Find("Charm Effects");

#

put the 2 messages in reverse

west ridge
#

i have no idea how fsm works

vocal spire
#

ok

#

thanks anyway

west ridge
#

the dnspy keeps going to the fsm

vocal spire
#

I have been using fsm viewer since dnspy didn't help me much when updating dreamshield coop

west ridge
#

that's fair how do you veiw the fsms?

#

if i'm understanding correctly it is just following you right?

vocal spire
#

no, there are about 4 fsms related to the shield

west ridge
#

oh

vocal spire
#

I think i need to edit a value in each one to make it go faster

west ridge
#

i can't remeber if unity has it's own methord for instantiating duplicates because if it does you can code the following behavour use a function to make it go in circle with input being in fixedtime.deltatime then just dupelicate the object with fixedtime.deltatime - float

#

that's as far as my brain goes without fsms

vocal spire
#

ok

#

I might just make the original shield faster and larger

west ridge
#

2 has got to be do-able though

vocal spire
#

I can do 15.... except none of them follow the player

west ridge
#

what does it say in events when is the position updated?

vocal spire
#

wdym

west ridge
#

do they spin around a spot

#

i mean where it says set position there is a fsmowner i wonder when it sets the new position

vocal spire
#

here is what I think makes them spin(at least the main part) yes I think there is a fsmowner

west ridge
#

try fixedupdate true

#

afaik fixedupdate is the physics loop

vocal spire
#

I don't think thats the problem

west ridge
#

oh

vocal spire
#

I get a null reference when I do anything in there

leaden hedge
#

any just reprogram the object

vocal spire
#

how?

leaden hedge
#

just program a dreamshield in c#

#

rather than messing with an fsm

vocal spire
#

how?

west ridge
#

like rewriting where it'll be with a rotation funtion based of off fixedtime.deltatime?

leaden hedge
#

no just implement the entire thing yourself

#

in c#

#

its just a sprite that rotates around the player with a hitbox on it with some class that deletes projectiles

vocal spire
#

pretty sure it is a fsm that detects the projectiles

west ridge
#

you can also do if (collider tag)

#

collider would be enimey bullet collider

vocal spire
#

I think it is just a different gameobject or something because the fsm's for "shield" work, but the ones for "Orbit Shield" don't

west ridge
#

public void Show() { if (this.pickedUp) { return; } this.SetActive(true); DreamPlantOrb.plant.AddOrbCount(); this.spreadRoutine = base.StartCoroutine(this.Spread()); }

#

also a referance to dreamplant orb in dnspy

vocal spire
#

ok

west ridge
#

i think i found it!!!!!

vocal spire
#

??

west ridge
#
    {
        while (this.spawnedOrbs > 0)
        {
            yield return null;
        }
        this.completed = true;
        if (this.playerdataBool != string.Empty)
        {
            GameManager.instance.SetPlayerDataBool(this.playerdataBool, true);
        }
        GameManager.instance.SendMessage("AddToDreamPlantCList");
        yield return new WaitForSeconds(1f);
        PlayMakerFSM.BroadcastEvent("DREAM AREA DISABLE");
        if (this.activatedParticles)
        {
            this.activatedParticles.Stop(true, 1);
        }
        if (this.completeGlowFader)
        {
            this.completeGlowFader.Fade(true);
        }
        if (this.audioSource && this.growChargeSound)
        {
            this.audioSource.PlayOneShot(this.growChargeSound);
        }
        if (this.completeChargeParticles)
        {
            this.completeChargeParticles.gameObject.SetActive(true);
        }
        yield return new WaitForSeconds(1f);
        if (this.completeChargeParticles)
        {
            this.completeChargeParticles.Stop(true, 1);
        }
        if (this.audioSource && this.growSound)
        {
            this.audioSource.PlayOneShot(this.growSound);
        }
        if (this.anim)
        {
            this.anim.Play("Complete");
        }
        if (this.whiteFlash)
        {
            this.whiteFlash.SetActive(true);
        }
        if (this.completeGlowFader)
        {
            this.completeGlowFader.Fade(false);
        }
        if (this.growParticles)
        {
            this.growParticles.gameObject.SetActive(true);
        }
        GameCameras gameCams = UnityEngine.Object.FindObjectOfType<GameCameras>();
        if (gameCams)
        {
            gameCams.cameraShakeFSM.SendEvent("AverageShake");
        }
        if (this.dreamDialogue)
        {
            this.dreamDialogue.SetActive(true);
        }
        yield break;
    }```
vocal spire
#

yay

west ridge
#

while (this.spawnedOrbs > 0)

vocal spire
#

now modding can go further

west ridge
#

maybe setting to > 1 will work

#

idk

#

hopefully!

#

i hope that works and doesn't barke like spawning two knights does or some weird classiforcation meaning it counts the other dreamsheild as an enimey bullet or something

vocal spire
#

are you sure it involves the dreamshield? it looks like it has something to do with the orbs that are summoned when you dreamnail a tree

west ridge
#

damit!

#

forgot about thouse

#

public PlayMakerFSM fsm_orbitShield; from dnspy

#

this is the one it uses i think

vocal spire
#

Oh yeah!!! I forgot that was a PlayMakerFSM

west ridge
#

there's a differance?

vocal spire
#

I was trying to find the shield at one point and saw that and didn't use it because it wasn't a gameobject, and then I remembered incorrectly that it was one, and now I think that I need the fsm

west ridge
#

ahhhh fair enough i'm just confused tbh

vocal spire
#

i'm just going to edit the original shield, then go from there

fair rampart
safe hamlet
#

epic

vocal spire
#

nice

ornate rivet
#

I cant believe jngo is stealing my next indie crossover boss ๐Ÿ˜ 

fair rampart
#

didn't you give up on it tho

ornate rivet
#

I did

fair rampart
#

that's why I picked it up

ornate rivet
#

thank you

fair rampart
#

idk if you really wanted to go back to it

#

I don't even know if I want to do this

ornate rivet
#

I wanted to add more bosses to the indie crossover mod but not cagney necessarily

fair rampart
#

fucker has so many sprites

ornate rivet
#

yea but katie did them all for me zote

#

I would give the unity project but I dont think they would be useful for tk2d stuff

fair rampart
fair rampart
#

damn my aseprite build is broken

west ridge
#

how do i see and use an fsm?

ornate rivet
#

Use the FSMViewer

fair rampart
#

I forgot that unity has a max texture size of 8192x8192

#

fuck

copper nacelle
vocal spire
#

oof

fickle sparrow
#

wait wtf

#

how many sprites were you trying to fit into one sheet

leaden hedge
#

probably the cuphead ones

#

they are very big

fickle sparrow
#

texture scaling down ax2uPepo

west ridge
#

I think you can edit the unity editor

fair rampart
#

apparently loading a custom scene with 8 sprites in it takes up enough memory to crash the game

#

bgs for mugman

#

<2000 pixels horizontal

#

I'm just doing something wrong ig

leaden hedge
#

PepoThumb not using powers of 2 sized textures

#

good memory usage

fair rampart
#

the sprites are in a 4096^2 atlas

#

ye

ornate rivet
#

the scene's assetbundle should be separate from the other sprite's assetbundle

fair rampart
#

it is

ornate rivet
#

strange

fair rampart
#

dym from like the boss sprites?

ornate rivet
#

hmm

fair rampart
weak lodge
#

bruh jngo working on another another project

#

this man cannot catch a break

copper nacelle
#

make sure qol is updated

#

there was a hook on unity's logging and that was dying when memory usage was high

#

idk why

#

so i yeeted it

fair rampart
#

it is, but let me see what happens if I just have the one mod on

#

nope

copper nacelle
#

Might want to call a GC collect before it

#

Which is shitty

#

But for like enemy rando you literally had to

fair rampart
#

why did that raise memory usage

copper nacelle
#

GC.Collect?

fair rampart
#

It seemed to, usually it crashed at 50% usage
this time it crashed at 54%

fair rampart
#

spriterenderers

fair rampart
#

I'll send the dll once I finish dinner

leaden hedge
#

tk2d is effectively the same as spriterenderer

#

spriterenderer is just a wrapper for a flat mesh

#

like tk2d

fair rampart
nimble lake
#

Where does it go though

fair rampart
#

yep, just tried it now with a scene from when I was testing out custom scenes

#

does unity version matter?

#

I uh

#

made the scene in 2018

vocal spire
#

Oof

ornate rivet
#

bruh jngo

safe hamlet
#

bruh jngo

copper nacelle
#

bruh jngo

fair rampart
ornate rivet
#

did it get fixed?

jade willow
#

somehow my UI used to work by using an "Image" Component, but I realized it was missing the sortingOrder property to allow me to render them in a specific order to make sure everything shows up in the proper manner on top of eachother, so I've now decided to use SpriteRenderers instead. But now the UI fails to appear at all and I am not sure if I am missing something to make it render properly

fair rampart
#

it did

jade willow
#

All the assets are loaded but they somehow don't show up and I am not sure why. I checked all of the gameObject's names along with the name of the sprite I assigned to them and it all shows up in ModLog

#
//Set the corruption bar container image
_corruptionRectImage = _corruptionRect.AddComponent<SpriteRenderer>();
_corruptionRectImage.sprite = ab2.LoadAsset<GameObject>("CustomUI").transform.Find("UI_Border").GetComponent<SpriteRenderer>().sprite;
_corruptionRectImage.color = new Color(212, 212, 212, 255);
_corruptionRectImage.flipX = false;
_corruptionRectImage.flipY = false;
_corruptionRectImage.material = new Material(Shader.Find("Sprites/Default"));
_corruptionRectImage.drawMode = SpriteDrawMode.Simple;
//_corruptionRectImage.sortingLayerID = SortingLayer.GetLayerValueFromID(0);
_corruptionRectImage.sortingOrder = 1;
_corruptionRectImage.maskInteraction = SpriteMaskInteraction.None;
#

I also noticed that the shader I'm looking for isn't the one I have in my Sprite Renderer
it is looking for Sprites/Default whereas my own is named "Sprites-Default"

jade willow
#

Oh

#

apparently UI can't use a spriterenderer

leaden hedge
#

it can not

#

it has to use ui.image

jade willow
#

thanks, and without sortingorder I guess I have to use the rect transform's Z position to make them show up in the right order one on top of another?

leaden hedge
#

i think its just how its aligned in the tree

jade willow
#

So I guess I have to set sibling index

leaden hedge
#

i would just mess around with ui stuff in unity editor

#

and see what you have to do, to make it correct

jade willow
#

Yeah I did that for my initial set-up but then I used spriterenderers to get my images in the asset bundle but now I realize the convenience of sortingorder came at a price

fair rampart
solemn frigate
jade willow
#

nice

#

managed to get a little UI in the game, I'll have to figure out how to make it fade when paused/map is opened (it might just be on the wrong layer)

jade willow
#

looks super rough but I'm just happy it's in :D

west ridge
#

You can change the alpha on it it'll be the images 4th "color" component if you use unity's thing you could use smooth damp to make it fade in and out whithin a hook

#

@jade willow

jade willow
#

nice, any hook to the pause?

leaden hedge
#

you can use on,

jade willow
#

Oh yeah I need to look into On

leaden hedge
#

GameManager should have a function for the game being paused and the current state its in

#

i wouldnt use a hook though

#

just call a coroutine from the on

jade willow
#

Makes sense, so by checking the state of the pause I can trigger the fade when the game is paused, thanks Katie!

leaden hedge
#

theres also a component to make groups in ui

#

so you can fade everything as 1

jade willow
#

nice that would be helpful

leaden hedge
#

its called CanvasGroup

#

and it comes with a property called alpha

#

just put it on the parent and it affects all children

jade willow
#

nice :D

west ridge
#

you can probably do if (Time.timescale = 0F) as well it's easy

#

note changing Time.timescale will not change how the gui menus works but will make anything in the physics slower

nimble lake
west ridge
#

fair XD

west ridge
#

how do i see the fsm of an object?

flat forum
#

with your eyes

rain cedar
#

FSM viewer is pinned

safe hamlet
#

sorry to break it to you, but you won't

west ridge
#

created a simple hex to rbg converter
the_object_you_want.color = new colour32(value_one_in_the_hex * 16 + value_two_in_the_hex,value_three_in_the_hex * 16 + value_four_in_the_hex,value_five_in_the_hex * 16 + value_six_in_the_hex,alpha_from_zero_through_to_255);
hope it's useful but i doubt it will be

copper nacelle
#

bro

fair rampart
#

bro

rain cedar
#

bro

blissful burrow
#

bro

west ridge
#

?

vocal spire
#

Iโ€™m going to say bro because everyone else is

#

bro

west ridge
#

but did I do something wrong or? i'm just confused

rain cedar
west ridge
#

holy moly

rain cedar
#

There's also built in hex convertors

west ridge
#

i didn't know

#

i needed the tool so i made it feels bad

safe hamlet
#

bro

fair rampart
#

how does your tool even work ? for 0-9 maybe but A-F it shits the bed ?

west ridge
#

nope

#

well yeah but it's assumming you type in 15 not F

#

probably should of said that in the first place

fair rampart
#

it's assumming you type in 15 not F
nobody does that

leaden hedge
#

you can just do parseInt("FF",16);

#

although in csharp its Parse("FF", NumberStyles.Hex) for some reason

jade willow
#

Well it is always good practice to try and make a tool by yourself

fair rampart
#

tried to add the ground vines in phase 2 of cagney but that's making the game crash again

ornate rivet
#

needeth more info

fair rampart
#

memory usage stuff again

#

Ground Vines is an initially inactive child of the main boss gameobject and I activate it when phase 2 starts

#

I wonder if it's bc I have an Animator and tk2d components on it, the Animator being used to animate a box collider 2d

fair rampart
#

now it's just crashing at scene load GWczoneHotdog

#

ah, bc I set the vines active, so it's still a problem with those

fair rampart
#

so yeeting the Animator worked, guess it's not compatible with tk2d components?

#

that means I have to modify all 19 frames of box collider offset and sizes in code

fair rampart
#

now to fix the camera

ornate rivet
#

ayyyyyyyy

#

the knight actually fits the cuphead art style

leaden hedge
#

i think hk has a component for it

#

that just locks the camera to a certain area when you're in that area

fair rampart
#

I think the scene might be too small to fit within the screen's borders

leaden hedge
#

zoom FeelsOkayMan

fair rampart
#

yeah that's what I was thinking

#

might be disorienting for players who are used to hk's more distant camera but oh well

#

zoom time

fair rampart
#

Is there anything I might be missing?

GameObject cameraLockZones = GameObject.Find("_Camera Lock Zones");
GameObject cameraLockZone = cameraLockZones.FindGameObjectInChildren("Camera Lock Zone");
var area = cameraLockZone.AddComponent<CameraLockArea>();
var col = cameraLockZone.GetComponent<BoxCollider2D>();
Bounds bounds = col.bounds;
area.cameraXMin = bounds.min.x;
area.cameraXMax = bounds.max.x;
area.cameraYMin = bounds.min.y;
area.cameraYMax = bounds.max.y;
area.preventLookDown = true;
area.preventLookUp = true;
CameraController cameraCtrl = GameCameras.instance.cameraController;
cameraCtrl.LockToArea(area);
cameraCtrl.SetMode(CameraController.CameraMode.LOCKED);
#

the camera keeps locking to the upper right of the scene

feral surge
#

Howl's going that mod about the 5 royal knights?

#

(They were 5, right?)

safe hamlet
#

404 sf

#

is jngo a collab

#

ic

feral surge
#

So nice that i have no idea about mods

#

But if the mod worth it, i will sacrifice my pc just to play it

#

Quicc question

Where are u going to fight em

safe hamlet
#

at ur mum's house

fair rampart
fair rampart
#

hold on I may be stupid

#

alright nvm there was boxcollider instead of a boxcollider2d on the camera lock zone but changing it didn't fix anything

#

it does say it's LOCKED

fair rampart
#

I looped through all CameraLockAreas and it's empty

#

no, just FindObjectsOfType<CameraLockArea>()

#

let me see what this returns

#

also empty

#

silly me I set it to locked, but of course nothing's changed when I removed that code

#

both

#

I appreciate the help tho

fair rampart
ornate rivet
#

epic

#

I might actually play this mod zote

west ridge
#

how do you add assets in to hollow knight like this?

ornate rivet
#

assetbundling

west ridge
#

is it possable to get it to work with unity 2019.3.13f1 instead of Unity 2017.4.10f1

ornate rivet
#

I dont believe so

#

some features might work, some might not

#

The 2018 version was working for jngo but then it broke when he tried to bundle a new scene

west ridge
#

i'll try and play it safe thank you for your help

jade willow
#

might be too late but you couple probably just put some sidebars to fill the void around the level instead of having to zoom the camera, maybe some curtains or whatever would fit the cuphead look (I don't know cuphead soz)

#

I realized that by changing my UI'd alpha I would end up causing additive blending instead of it looking like a single object becoming transparent

#

now that I think of it, the alpha doesn't change when paused it just turns darker (unless I'm wrong)

west ridge
#

I can't remember I think it does go darker

#

You could just up all the rbg values in the color32 vector4

#

Smoothlerp will probably help

jade willow
#

Yeah that's what I ended up doing

west ridge
#

Neat

jade willow
#

I'll probably have to check some examples of uses of the On namespace as I'd like to trigger the lerp when the pause menu is opened or when the map is shown and make it completely disappear when the inventory screen is opened like it does for the soul orb and health

west ridge
#

I think you could just use an event trigger

jade willow
#

the only way I managed to get stuff to occur so far was through hooks by following the methods seen on radiance.host, I've got some learning to go through it seems

west ridge
#

Unity event trigger that is not the api version though there might be an api method

#

I know roughly how to use dnspy I'd be happy to help

vocal spire
#

I know how to use dnspy pretty well

jade willow
#

I think the "On" namespace is supposed to help me with that but I'm not sure if I'm meant to use it as a function/method or within another function

#

thanks

west ridge
#

I think it's a method like how classes work but I'm not certain

jade willow
#

maybe I could check how others have used it in other mods too, to at least figure out the expected implementation
I've only dabbled a tiny bit in dnspy so far

vocal spire
#

I accidentally made my first mod in dnspy

west ridge
#

My current understanding is it is a way to group classes so names from pubic classes dont get confused
.
I might be wrong I'll look in to it

jade willow
#

Yeah I heard that was the original way to do it, but it makes it incompatible with other mods since you're changing the base code everything else would run on

#

thanks a lot btw

vocal spire
#

It doesnโ€™t have to change the base code

#

It can call it after you run your code

jade willow
#

ah I see

#

okay so I think using ON it is actually making a hook

west ridge
#

That and namespace.class can be a reference functioning like a hook

vocal spire
#

Yes

#

Iโ€™d like to help, but the computer decided to be slow

jade willow
#

I managed to find UIManager.GoToPauseMenu which seems to be the event I'd want to listen to and change my UI lightness when it is called

vocal spire
#

Ok

west ridge
#

If you are looking for a way I suggest the unity docs on event listeners

#

I don't understand it but I'm sure it'll help you ๐Ÿ™‚

jade willow
#

thanks :D

#

i feel like there might be a way with the API to do it

#

but I can try with eventlisteners

vocal spire
#

On.UImanager.hook_GoToPauseMenu Mabe?

fair rampart
#

it's tracking the hero now at least

west ridge
#

I've seen it use return

jade willow
#

Yes that's what I think is gonna be the hook for it

west ridge
#

Yeah not sure if you need to return this.orig.function though

#

I'm stumped here to be honest

fair rampart
#

the lock area I put in the scene is getting added to lockZoneList but camerController isn't being set to LOCKED

jade willow
#

oh wait I just realized it already has a hook for it

west ridge
#

It does?

#

Nice

#

Might be the load order

fair rampart
#

I can of course force it to locked with SetMode but it still follows the player

west ridge
#

Epic

#

How do I find an fsm and how it works i have the viewer do i tell it to look at a scene or?

jade willow
#

trying to figure out how to actually make the hook for it though, I've only used hooks from the Modhooks class, not made one for something that wasn't already "hooked up"

#

something like this?
On.UIManager.GoToPauseMenu += MyFunc;

west ridge
#

i was just typing that guess

vocal spire
#

On.UImanager.hook_GoToPauseMenu

west ridge
#

Has anyone thought of a planetiod gravity mod?

vocal spire
#

Sounds cool

west ridge
#

I know how to already done it in 3d

#

Just gotta add a sprit and collider in for the plannet XD

#

if i work out how

#

i'll do it

jade willow
#

oh wow okay it's that ease, nice :D I'll give it a shot soon tm thanks!!

west ridge
#

sid: np

#

anyway i can help?

fair rampart
#

putting those magic numbers in the CameraLockArea fields made the camera successfully lock, just at the wrong offset

ornate rivet
#

get better magic beans

west ridge
#

might just be the way the zoom scales making the offset seem weird

fair rampart
#

is hk's camera orthographic?

#

man I'm gonna need to give cagney a fuckton of health

jade willow
#

oh no the game now crashes when I pause

west ridge
#

what did you change?

vocal spire
#

What hook did you use

jade willow
#

Those set up in my initialize

On.UIManager.UIGoToPauseMenu += UIManager_UIGoToPauseMenu;
On.UIManager.UIClosePauseMenu += UIManager_UIClosePauseMenu;```
And this code running in them

private void UIManager_UIClosePauseMenu(On.UIManager.orig_UIClosePauseMenu orig, UIManager self){
Log("Closed");
}
private void UIManager_UIGoToPauseMenu(On.UIManager.orig_UIGoToPauseMenu orig, UIManager self){
Log("Opened");
}

vocal spire
#

Add orig(self) to the end of each

#

Ok

#

I guess I was late

jade willow
#

so under my logs I should add orig(self)? or somewhere else

vocal spire
#

Under

west ridge
#

ยฏ_(ใƒ„)_/ยฏ

vocal spire
#

Why am I late

jade willow
#

alright knew I was missing something haha

#

ayyy that did the trick, thanks!

fair rampart
#

wonder if I should disable double jump for this fight, it's kinda op

west ridge
#

trust me it's a burden as well double jump in to a seed? your dead

#

a heath nurf would kinda make sence but how will you shoot continuously at him?

ornate rivet
#

just say it in a readme jngo, that's what I did with propeller knight

fair rampart
#

well ik how to disable it, it's just a simple hook

west ridge
#

what about the range?

ornate rivet
#

I meant, it gives the player the freedom to choose

#

I was going to have it be an option on the statue but got bored

#

that works too

patent zealot
#

Is there a save without wings?

#

In godhome

fair rampart
#

I should make him do 3 masks of damage so he kills you in 3 hits like in cuphead

patent zealot
#

With all equipment or will i just have to use debug

west ridge
#

why not just disable the wing?

patent zealot
#

Yeah 3 mask dmg seems like a good idea

west ridge
#

agreed

fair rampart
#

I also have to lower the ceiling so you can't just pogo cagney

#

tbh sally stageplay would've been a better boss to do cause stationary bosses in hk are just kinda eh

ornate rivet
#

bossmodcore?

#

ah

#

they supply the statue?

#

that should be it.
Will you be setting the name of the gate?

#

yield return null; normally solves half the world's problems

west ridge
#

would a dict be more useful?

#

ahhhh gottchu

#

quick question what is the knight's jump height with gravity considered?

#

thank you

#

is there a debug mod for that stuff?

#

should asset bundling be done in a 2d unity or 3d? (2d makes sence but the knight uses 3d to store his position sometimes)

west ridge
#

epic

vocal spire
#

Cool

#

Mabe it can fix the broken boss lever that one of my mods adds.

west ridge
#

hopeful waiting

vocal spire
#

Has anyone made an Uumuu mod?

jade willow
#

seems like starting a coroutine from the UIGoToPauseMenu hook crashes the game

vocal spire
#

Oof

jade willow
#

I probably am just doing something very wrong

west ridge
#

i don't think it can pause something running on the update methord try making a new methord for waiting and have it return before returning to self, orig

#

i might be 100% wrong though

jade willow
#

I removed every bit of actual code from the coroutine I created in another, I couldn't start the coroutine from the base mod class so I called a function to start a coroutine in another class

west ridge
#

that's fair

#

same issue?

jade willow
#

yes, it seems like it is allergic to startcoroutine (or I'm not using it right)

west ridge
#

could a public static help?

jade willow
#

wait that's a thing?

west ridge
#

why is it tied to game manager i thought it was a c# thing

jade willow
#

I'm guessing its a way to start coroutines from within a class that isn't tied to MonoBehaviour (avoiding the workaround I was going through basically)

#

still breaks when using the game manager instance startcoroutine

rain cedar
#

You're starting the coroutine on a monobehaviour still

#

Because GameManager is one

jade willow
#

that makes sense

west ridge
#

so it starts the coroutine in a place where it won't pause the game?

jade willow
#

Oh!

west ridge
#

?!

jade willow
#

maybe that's part of my issue, but I don't think Time.time would be affected by the game being paused

#

unless it sets timescale to 0

west ridge
#

no i ment coroutine using wait/while

#

thus "pausing a hook"

jade willow
#

I just thought coroutine meant that it wouldn't stop my other script's execution, but it seems like it gets stuck

west ridge
#

as war as i know corotine is tied to the monobehavour it is used it I REALLY need to reaserch

#

would you happen to know if asset bundling for hk works with unity 2d or 3d?

jade willow
#

assetbundling only requires prefabs as far as I know, so that could also be 3d models

west ridge
#

ah i'm just trying to get a circle with a collider to use as a planet

jade willow
#

make a new game object with a sprite renderer and a circle collider and bundle that, should be able to get it in the game this way

copper nacelle
#

why tf are you making a bundle

#

just new GameObject()

jade willow
#

oh right, but he'd need to bundle his visuals, no?

copper nacelle
#

Sprite.Create

#

CanvasUtil.NullSprite

jade willow
#

that's neat

west ridge
#

huh?

#

i don't understand

#

how do i get it to use custom sprite and why would new GameObject() make a circle and collider?

#

please a little help

copper nacelle
#

add a circle collider component my guy

west ridge
#

ok given that how do i find coords on a scene?

#

and make it exclusive

jade willow
#
GameObject myGO;

myGO = new GameObject("TheNameYouWant");
CircleCollider myCircleCollider = myGO.AddComponent<CircleCollider>(); 
myCircleCollider.someParameterYouWantToAdjust = someValueYouWantItToBe;
//you can just skip assigning the collider to a variable
west ridge
#

thank you

#

would i do onsceneload or something?

jade willow
#

to make it show up on specific scenes you'll need to hook some stuff to the ActiveSceneChanged (at least that's how I dealt with it)

UnityEngine.SceneManagement.SceneManager.activeSceneChanged += ActiveSceneChanged;

  if(arg1.name == "Tutorial_01"){
  //spawn your stuff in there
}
}```

or at least something along those lines
west ridge
#

thank you

#

is the scene name the name in data?

jade willow
#

I'm getting scene names from HKEdit personally, but I'm sure they can be found somewhere else too

west ridge
#

here is what i ment

jade willow
#

I know level6 is Tutorial_01 iirc

west ridge
#

do you know dirtmouth?

jade willow
#

scene name is like another parameter that's set in it

west ridge
#

ouch

jade willow
#

I'm guessing it'll be level7 with the name "Town"

unborn flicker
#

the scene number list is pinned

jade willow
#

ah right that is very useful

#

I seem to be rather good at doing things the wrong way

west ridge
#

i didn't realize what it was

jade willow
#

so how should I make my UI fade if I can't call a coroutine from my UIManager_UIGoToPauseMenu hook?

west ridge
#

smoothlerp

#

?

jade willow
#

that's taken care of in the coroutine using Color.Lerp

#

but I can't seem to call the coroutine at all

west ridge
#

what are you trying to do?

#

i might be able to figure out a convoluted way

jade willow
#

when the game is paused I want to fade the colors of my custom UI (I got the hook to work and I can set its color directly and it works alright), but I wanted to slowly fade it using a coroutine where I could check for Time.time to make sure it takes a specified amount of time to complete.
But at the moment as soon as I call a coroutine, the game dies

#

well soft-locks is a more proper term

#
            
            /*float t = (Time.time - start);
            while(t<lerpTime)
            {
                img.color = Color.Lerp(img.color, to, (t/lerpTime));
                yield return null;
            }
            img.color = new Color(to.r, to.g, to.b, to.a);
            */
            yield return null;
        }```
I basically commented out all of it
west ridge
#

why not just do if (inmenu and colour >= colour32(r,b,g,a)) colour32 += Vector4 (r*fixedtime.delta time,b*fixedtime.delta time,g*fixedtime.delta time,a*fixedtime.delta time)

#

or is that dumb i'm not sure how it works

#

i hope i'm right

jade willow
#

that's the next thing to try, but I'd like to make coroutine work if I can first, just as a matter of habit

#

to be fair I haven't made stuff in unity in a long while so I'm just remembering stuff as I'm going

west ridge
#

you're like me if i knew stuff XD

#

what does CanvasUtil.NullSprite do?

copper nacelle
#

1px sprite

jade willow
#

also in case I'm not using this right
StartCoroutine(IE_AnimateColorLerp(img, to, lerpTime,startTime));

west ridge
#

gamemanager.yourcode?

jade willow
#

GameManager.instance.StartCoroutine(corruptionAnimClass.IE_AnimateColorLerp(imageList[0], new Color(0.1f, 0.1f, 0.1f, 1f), 5f, Time.time));

#

trying both ways

#

using the GameManager.instance I manage to see the game go into pause state

#

but it then sort of locks itself right after

west ridge
#

can you use log to see where it brakes?

jade willow
#

testing something real quick

west ridge
#

i don't know how to help but i hope i figure out how to help others reach a knowledge i cannot possess yet ๐Ÿ™‚

jade willow
#

oh wait I think for some reason now it works

west ridge
#

epic codin skills

jade willow
#

Well this is the worst feeling but that's how 3/4 of my issues end up resolving themselves

#

I guess now it works, now to make it fade properly

#

also I can't use Logs in classes that aren't of type Mod, right?

west ridge
#

you can but you need the debug.console and turn it on for the actual build somehow

#

do i need a referance to get Scene to be seen as a virable in the code you gave me earlier?
UnityEngine.SceneManagement.SceneManager.activeSceneChanged += ActiveSceneChanged;
.
.

  if(arg1.name == "Tutorial_01"){
  //spawn your stuff in there
}
}```
#

@jade willow

#

oh

#

SceneManagement

#

i'm stupid sorry for the ping

#

is it scene capture?