#archived-modding-development

1 messages ยท Page 36 of 1

young walrus
#

i like it

rain cedar
#

I should probably change that hook to return Vector2? instead so that I can look for null instead of a zero vector

buoyant wasp
#

if it helps, here's what the "original version would look like

#
private void Dash()
{
    this.AffectedByGravity(false);
    this.ResetHardLandingTimer();
    if (this.dash_timer > this.DASH_TIME)
    {
        this.FinishedDashing();
        return;
    }
        float num;
        if (this.playerData.equippedCharm_16 && this.cState.shadowDashing)
        {
            num = this.DASH_SPEED_SHARP;
        }
        else
        {
            num = this.DASH_SPEED;
        }
        if (this.dashingDown)
        {
            this.rb2d.velocity = new Vector2(0f, -num);
        }
        else if (this.cState.facingRight)
        {
            if (this.CheckForBump(CollisionSide.right))
            {
                this.rb2d.velocity = new Vector2(num, this.BUMP_VELOCITY_DASH);
            }
            else
            {
                this.rb2d.velocity = new Vector2(num, 0f);
            }
        }
        else if (this.CheckForBump(CollisionSide.left))
        {
            this.rb2d.velocity = new Vector2(-num, this.BUMP_VELOCITY_DASH);
        }
        else
        {
            this.rb2d.velocity = new Vector2(-num, 0f);
        }
    
    this.dash_timer += Time.deltaTime;
}
#

minus discords indendation sucking

bronze temple
#

Quick sketch in the Discord message box, hopefully I didn't screw anything up:

private extern void orig_Dash();
private void Dash() {
    // Check if we run our own dash code.
    Vector2? vector = ModHooks.Instance.DashVelocityChange();
    if (vector == null) {
        // Run the original dash code.
        orig_Dash();
        return;
    }

    // Our own dash setup.
    AffectedByGravity(false);
    ResetHardLandingTimer();
    if (dash_timer > DASH_TIME) {
        FinishedDashing();
    } else {
        // Our own velocity.
        rb2d.velocity = vector;
        dash_timer += Time.deltaTime;
    }
}
#

dat discord formatting

#

lemme fix this

#

discord go home you're drunk

rain cedar
#

That code is functionally different, though

bronze temple
#

It shouldn't be functionally different, though

rain cedar
#

The first two function calls in the vanilla function are later

bronze temple
#

Huh? They're not later

#

at the beginning, it checks if you're providing a replacement velocity

#

if you don't, it runs the original code

buoyant wasp
#

but it doesn't run this first

#
    this.AffectedByGravity(false);
    this.ResetHardLandingTimer();
    if (this.dash_timer > this.DASH_TIME)
    {
        this.FinishedDashing();
        return;
    }
    
rain cedar
#

The replacement velocity might be reliant on changes done by the other functions, though

bronze temple
#

if you do, it does its own setup (the first few lines in the original code), then sets the velocit~

#

oh

#

so those may affect the result of DashVelocityChange? :/

rain cedar
#

AffectedByGravity changes gravityScale, which I could see being relevant

buoyant wasp
#

or they could prevent the rest of the function from running entirely due to the dash_timer > dash_time check

rain cedar
#

Not currently with the one mod that uses this hook

bronze temple
#

The original code still keeps its dash timer / time check; the hook just checks it if the original code doesn't run at all

#

but yeah, I didn't take the "setup" affecting the return value of any mod into account :/

buoyant wasp
#

hmm i wonder

#

what about this

rain cedar
#

With this I think you would get infinitely long dashes if you change the velocity

leaden hedge
#

well you'd never call finishedDashing

#

so you'd never stop

bronze temple
#

Huh? We'd still call FinishedDashing if dash_timer > DASH_TIME

rain cedar
#

Oh yeah, nevermind

#

I was just being dumb there

buoyant obsidian
#

Alright great master of GUI KDT, how would I go about rendering subtitles using one or a few lines of code in HeroController?

leaden hedge
#

are you using my canvasutil

buoyant obsidian
#

Nope, I was hoping I'd be able to handle everything by just adding several lines into a method like Attack()

leaden hedge
#

well you can you'll just have to write out the functions one sec

rain cedar
#

Canvas is like a hundred lines to do anything

buoyant wasp
#
private extern void orig_Dash();
private void Dash() {
    this.AffectedByGravity(false);
    this.ResetHardLandingTimer();
    if (this.dash_timer > this.DASH_TIME)
    {
        this.FinishedDashing();
        return;
    }
    // Check if we run our own dash code.
    Vector2? vector = ModHooks.Instance.DashVelocityChange();
    if (vector == null) {
        // Run the original dash code.
        orig_Dash();
        return;
    }
    rb2d.velocity = vector;
    dash_timer += Time.deltaTime;
}

#

the question really is, would calling AffectedByGravity and ResetHardLandingTimer twice hurt anything?

#

cause if not, then this, I think, would do the same thing

rain cedar
#

I don't think it would do anything bad

bronze temple
#

this'd do pretty much the same thing except call the first 2 methods twice, yeah

#

looks good to me

buoyant wasp
#

still doesn't solve the save/load hooks, or the attack hook though, those are buried much deeper in the methods

rain cedar
#

LookForQueueInput would be tough too

buoyant wasp
#

yeah

bronze temple
#

hm, so I'll probably just implement [MonoModInject(Type, Method, ILOffset)] in MonoMod

leaden hedge
#

with canvasutil it'd be like

CanvasUtil.createFonts();
GameObject c = CanvasUtil.createCanvas(RenderMode.ScreenSpaceOverlay, new Vector2(1920, 1080));
Text subtitle =  CanvasUtil.createTextPanel(c, "subtitlehere", 24, TextAnchor.MiddleCenter, new Vector2(0, 50), new Vector2(0, 25), new Vector2(1, 0), new Vector2(0, 0), new Vector2(0.5f, 0.5f), true).GetComponent<Text>();
subtitle.text = "updated subtitles";

not using the util I don't think I can even fit it in discord @buoyant obsidian ill make a pastebin hollowface

buoyant obsidian
#

oh boy

bronze temple
#

The first question regarding a MonoModInject attribute would be: If providing multiple injections, does ILOffset point to the "original" offset or the shifted one?

buoyant wasp
#

hmm

#

original I'd think

#

could we do

#

[MonoModInject(Type, Method, ILOffset, ILSizeCheck)]

#

where ILSizeCheck lets us pass in what we know to be the total IL size?

#

i'd like to have a warning that is printed if the size of the function has changed (since that means they might have change the method between releases and we might need to adjust the injection offset)

#

so if I know that a method has a size of 120 IL instructions, i'd put 120 in ILSizeCheck. Then when monomod is run, if it finds that the IL length is now 144 instructions, it might pop up and say, "Warning - Method IL size has changed, method may have changed and Injection may not be valid anymore, check this method to ensure it is corect"

#

(or something)

#

cause it might still be fine, but it also could very well be not

#

on more than one occasion they've changed the methods for seemingly no reason ๐Ÿ˜‰

rain cedar
#

It's also technically possible to not be fine with the same IL count

leaden hedge
rain cedar
#

But that's a lot less likely

buoyant wasp
#

true

#

not much for that though unless we can generate some sort of checksum on the method

buoyant obsidian
#

That's only for 1920x1080p right?

buoyant wasp
#

and use that instead of count

leaden hedge
#

nah it'll work for every resolution

#

1920,1080 is the reference resolution

buoyant obsidian
#

what's that refer to

leaden hedge
#

so if the resolution is 1280,720 everthing will be 66% the normal size

buoyant obsidian
#

Oh I get it, thanks

leaden hedge
#

can I even fit my comment on how this works in here

buoyant wasp
#

discord needs snippets like slack ๐Ÿ˜›

rain cedar
#

Slack is great but some important stuff is locked behind the paid version

buoyant wasp
#

agreed

rain cedar
#

Discord nitro is pretty much useless, which is nice

buoyant wasp
#

the search limits suuucccckkkkkk

#

"oh sorry, you hit 10k messages, your search function is now basically useless"

leaden hedge
#
            //sizeDelta is size of the difference of the anchors multiplied by screen size so
            //the sizeDelta width is actually = (((anchorMax.x-anchorMin.x)*referenceWidth) + sizeDelta.x)*(actualWidth/referenceWidth)
            //so assuming a streched horizontally rectTransform on a 1920 screen, this would be
            //(((1-0)*referenceWidth)+sizeDelta.x)*(actualWidth/referenceWidth)
            //(referenceWidth + sizeDelta.x)*(actualWidth/referenceWidth)
            //(1920+sizeDelta.x)*(1920/1920)
            //so if you wanted a 100pixel wide box in the center of the screen you'd do -1820, height as 1920+-1820 = 100
            //and if you wanted a fullscreen wide box, its just 0 because 1920+0 = 1920
            //the same applies for height

this is roughly how rectTransforms work @buoyant obsidian

bronze temple
#

sorry, was afk

#

unless we can generate some sort of checksum on the method

#

GWbowsuBlobThonkeng yes

#

Technically we can, but we need to be able to figure it out from outside MonoMod

#

Maybe just the .dll md5?

leaden hedge
#

well thats always going to change between versions

bronze temple
#

(it'd take too much into account, but should work fine)

leaden hedge
#

wouldn't really help narrow down if a function we hook has been changed and needs to be updated

buoyant obsidian
#

Alright I'm free from class, let's get this to work\

#

So here we have the Stuff() method, where exactly would I be calling it?

leaden hedge
#

I put mine in my api init function, you could call it anytime really

buoyant obsidian
#

I guess it would make more sense to have a Stuff("subtitles") method somewhere in HeroController, then I could just call Stuff("Subtitle example") in scenes?

leaden hedge
#

nah you'd only call this once

buoyant obsidian
#

oh

buoyant wasp
#

I would say a small console application that I can run once that would dump the checksum of the functions we're doing these more complicated injections on

leaden hedge
#

and then get a reference to the Text gameobject

#

and do Text.text = "new text";

buoyant wasp
#

@bronze temple - (and no worries about being afk. i'm only hopping in and out since i'm working ๐Ÿ˜‰ - US based so its the middle of my work day)

#

but then i can put the checksums into the source and if it changes in the future, i can just update the source

buoyant obsidian
#

So... could I place this code in SceneInit()?

#

in HeroController

leaden hedge
#

you want it to only happen once

buoyant obsidian
#

oh, once once

leaden hedge
#

or else it'll make lots of canvas'

#

you also want to do DontDestroyOnLoad(c)

buoyant obsidian
#

where's a method I can steal that only loads once?

leaden hedge
#

I dunno, you could just do

public static GameObject c;
public static Text textObj;
public void someFunc(){
if( c == null )
    stuff();
//rest of someFunc()
}
buoyant obsidian
#

errr, I'm not really understanding

leaden hedge
#

well you're going to create a GameObject with the variable name c in stuff

#

and you want to store it anyway

#

so you can just check that c is null

buoyant obsidian
#

Oh, duh

#

what do I need to import to get the Text type?

leaden hedge
#

UnityEngine.UI;

rain cedar
#

That's in its own dll so you might have to add a new reference

leaden hedge
#

fairly certain the default assembly has a reference to it

#

so I don't think you should

buoyant obsidian
#

what's a static variable in this scenario

#

why can't I just be lazy and not specify

leaden hedge
#

lets you do ClassName.textObj.text = whatever

#

from any class

buoyant obsidian
#

oh wow, that's powerful

leaden hedge
#

but you can only have one textObj ever

buoyant obsidian
#

Yep

leaden hedge
#

but in the case for a subtitle thats what you want anyway

buoyant obsidian
#

renderMode isn't instantiated, where should I define it?

#

as a public static with the others?

leaden hedge
#

oh

#

RenderMode.ScreenSpaceOverlay

#

replace it with that

buoyant obsidian
#

c.AddComponent<Canvas>().renderMode = renderMode;

#

replace all that?

leaden hedge
#

no

#

c.AddComponent<Canvas>().renderMode = RenderMode.ScreenSpaceOverlay

buoyant obsidian
#

Gotcha

#

Thanks a ton

leaden hedge
#

magic

#

I'd recommend the util still hollowface

buoyant obsidian
#

psssh I'll stick to my haphazard mess of code

#

this isn't updating the subtitles what's wrong

leaden hedge
#

did you remove the Text from before textObj

#

or else that is just setting a local variable

#

and not the actual one

buoyant obsidian
#

so just remove the word Text?

#

or the whole line

leaden hedge
#

just Text

#

also remove GameObject before c

#

and do DontDestroyOnLoad(c);

buoyant obsidian
#

how does one do DontDestroyOnLoad(c)

leaden hedge
#

herocontroller isn't a monobehaviour right?

buoyant obsidian
leaden hedge
#

well then DontDestroyOnLoad(c) should just work

buoyant obsidian
#

anywhere in particular?

leaden hedge
#

do it somewhere after you create c

#

obviously hollowface

buoyant obsidian
#

So just beginning of stuff()

leaden hedge
#
c = new GameObject();
DontDestroyOnLoad(c) ;
#

should be fine

buoyant obsidian
#

It's beautiful, thank you

leaden hedge
buoyant obsidian
#

I see now the naivety of my ways

#

Now, how many thousand lines do I need to make the text fade out 10 seconds after being updated?

leaden hedge
#

you want it to fade out after 10 seconds?

#

do

public void fadeOut(){
    HeroController.textObj.CrossFadeAlpha(1,0,0.25f);//fade from 1 -> 0 alpha over .25 seconds
}
public void updateText(string text){
    HeroController.textObj.text = text;
    HeroController.textObj.CrossFadeAlpha(1,1,0);// fade to 1 in 0 seconds
    Invoke(fadeOut, 10);
}
#

Invoke is a MonoBehaviour function so you'll have to
MonoBehaviour.Invoke(fadeOut, 10);
if you're not inheriting from MonoBehaviour;

buoyant obsidian
#

CrossFadeAlpha takes alpha, duration, and ignore timescale as inputs

#

float, float, bool

leaden hedge
#

it should take, alphaStart, alphaEnd, duations and ignore timescale

#

oh wait it doesnt

#

it just takes alphaEnd, duration, ignoreTimescale

#

then its

public void fadeOut(){
    HeroController.textObj.CrossFadeAlpha(0,0.25f, false);//fade from 1 -> 0 alpha over .25 seconds
}
public void updateText(string text){
    HeroController.textObj.text = text;
    HeroController.textObj.CrossFadeAlpha(1,0,false);// fade to 1 in 0 seconds
    Invoke(fadeOut, 10);
}
buoyant obsidian
#

What's the 100% alpha value?

leaden hedge
#

1 is opaque

#

0 if transparent

buoyant obsidian
#

is there an easier way I could use rather than Invoke?

leaden hedge
#

easier than a 1 line thing

buoyant obsidian
#

well Invoke wants me to call a method

#

I don't like methods

buoyant wasp
#

is writing in c#. doesn't like methods

buoyant obsidian
#

I don't like making new methods in mods I mean

leaden hedge
#

where is that code

#

is it in update

buoyant obsidian
#

Currently in Attack(), but it'll probably be called in SceneInit when it reads a certain scene

#

ie. when the scene is Radiance it will say "yo dawg so you finally came to fite yer pops"

leaden hedge
#

your choice is either use Invoke or some thing like

float delay = 0f;
stuff(){
//....
HeroController.textObj.CrossFadeAlpha(1f,0f,false);
delay = 10f;
//....
}
public Update(){
    if( delay > 0 ){
        if( delay < Time.deltaTime ){
            HeroController.textObj.CrossFadeAlpha(0f,0.25f,false);
            delay = 0;
        } else {
            delay -= Time.deltaTime;
        }
    }
}
buoyant obsidian
#

ah fuck, invoke it is

bronze temple
#

back again

@buoyant wasp What about a "context rule?"

#

It'd allow us to determine the offset programmatically

#

and I'd like to help with that - the rule for Dash would just check for ldfld equippedCharm_16 and give an offset based on that

buoyant wasp
#

that'd make life easier, it's basically what i'm doing right now. I don't have the code pushed to github, but basically in pseudo code i'm doing this:

instruction startAt = null
foreach instruction in instructions
    if instruction == ldfld equippedcharm_16
        startAt = instruction;
        break

while (instructionsToAdd.Any())
    ilProcessor.InsertAfter(startAt, instructionsToAdd[0])
    startAt = instructionsToAdd[0]
    instructionsToAdd.RemoveAt(0);

#

which, adding IL structions by hand is annoying

#

not so bad if it's a straight injection of a single thing, much more annoying in the dash example cause it totally changes the structure cause of adding the if/else

buoyant obsidian
#

Probably my final question, how would I move the text up a few pixels

#

your rectangle explanation was too advanced for me

bronze temple
#

That's something I was worrying about when first thinking about injection: Manipulating code flow

#

Luckily it can be easily solved in the Dash example by relying on return

leaden hedge
#

@buoyant obsidian rt.anchoredPosition = new Vector2( xOffset, yOffset );

bronze temple
#

but, let's say, wrapping something in a try - catch would require multiple injections: One to mark the beginning of the try section, one to mark the end of the try section

#

You can't split that into two methods, though

#

and there's minimal macro support in MonoMod, but... wait a second, we're actually kinda preserving code flow here

#

MMIL.Skip / MMIL.SkipUntil

#

brb

buoyant wasp
#

in a perfect world we'd be able to get the method body as csharp, modify it, and recompile it in the same context as the original method.

#

but i understand that is a whole new kettle of fish

#

cause if we could modify it as c#, then we could do regex/string replacements and it'd be vastly easier to maintain. (and easier for future developers to understand as IL code is, at least to me, pretty arcane compared to most stuff)

leaden hedge
buoyant obsidian
#

LOL

timber gale
#

I got to the end of boss rush again, and still can't select the radiance

leaden hedge
#

did you kill all the other bosses?

timber gale
#

Yes

#

Second time it's happened ๐Ÿ˜ฆ

buoyant wasp
#

@leaden hedge i assume VS or VSC isn't sufficient?

leaden hedge
#

VS works fine

#

just unity auto loads stuff in mono develop

#

so if im testing stuff in unity I'll be using monodevelop

buoyant wasp
#

interesting

#

i think VS2017 has built in Unity support

leaden hedge
#

mono actually sucks massive dick too

buoyant wasp
#

at least, when you install it there is a box to check for Unity

leaden hedge
#

like it'll crash when loading a new script

#

hell sometimes it'll crash when being unminimized or swapping tabs

buoyant wasp
#

i've never checked said box, but I have to assume it does something

leaden hedge
#

not sure I use VS2013

buoyant wasp
#

you can have both

#

like, you can install 2017 and still have 2013 installed

leaden hedge
#

Im pretty sure theres a way to change what unity opens csharp stuff with

buoyant wasp
#

i had 2013/2015/2017 all installed at work for a long time

#

until we finally got rid of the crap i needed 2013 for

#

alternatively, you could use VS Code if unity lets you change the editor. it's pretty nice for a lightweight alternative

#

it's what i did all of the overlay stuff in

leaden hedge
#

don't think I've even got VS2015 installed ๐Ÿค”

buoyant wasp
#

it probably sees 2013 as 2015

#

because 2013 is so old

#

i mean VS 2013 is now 5 years old (pretty sure it came out in late 2012)

leaden hedge
#

and gcc is 30yrs old

#

whats wrong with that hollowface

buoyant wasp
#

gcc is not a IDE

#

gcc is a compiler

#

VS is not a compiler

#

it has a compiler

leaden hedge
#

well I'm not using VS as an IDE

#

im using as a compiler

buoyant wasp
#

then why not just use msbuild?

wary drift
#

you making the next glass soul mode? xD

buoyant wasp
#

cause loading VS to compile something is like using a tank to squash an egg

leaden hedge
#

I tried to get MSBuild too work

#

couldn't get it to compile

buoyant obsidian
#

Next Glass Soul mode?

leaden hedge
#

what do I even do, drag csproj onto the exe?

bronze temple
#

mono actually sucks massive dick too

#

do you mean MonoDevelop or the Mono runtime?

leaden hedge
#

develop

bronze temple
#

because Unity ships with outdated versions of both GWbinMmlol

buoyant wasp
#

msbuild.exe /p:Configuration=Release "project.csproj" > Output.txt

#

assuming msbuild is in your PATH

#

if it isn't, then you'd have to specify the whole path for it

leaden hedge
#

i'll just make a bat for it

buoyant wasp
#

pretty much

leaden hedge
#

I assumed it'd support drag and drop

#

then gave up hollowface

buoyant wasp
#

it doesn't have enough information to do that

#

it has to know, at the very least, what configuration you want

#

and almost every c# project has 2 at the very least

#

Debug and Release

#

I use msbuild for continuous integration/testing at work ๐Ÿ˜ƒ

leaden hedge
#

(CoreCompile target) ->
CSC : error CS1617: Invalid option '6' for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default [C:\Users\Kristian\Desktop\desktop\Hollow Knight\mod tools\MOD STUFF\API MoreSaves\Source\MoreSaves.csproj]

0 Warning(s)
1 Error(s)

hmmm

buoyant wasp
#

yeah, you're csproj files are really weird, when i cloned the project from github i had to mess around with the structure a fair bit

#

it put the properties folder as a sibling to src/, when it should have been it's child

#

for example

leaden hedge
#

thats me being lazy

buoyant wasp
#

you using the version of msbuild that comes with vs2013?

leaden hedge
#

im using C:\Windows\Microsoft.NET\Framework\v4.0.30319

buoyant wasp
#

it should give you the current msbuild.exe. the one in v4.0.30319 is not what visual studio uses

#

it uses one that's in the VS folder itself

leaden hedge
#

I move the project files into src, so I can just use the folder upload in github, rather than load up github desktop

buoyant wasp
#

hah

#

i just use the builtin git client in VS ๐Ÿ˜‰

solemn rivet
#

@leaden hedge I feel like playing BossRush. Want me to do some bug/glitch-hunting while at it?

leaden hedge
#

I think most of the bugs are known

#

but if you find any extra

solemn rivet
leaden hedge
#

close enough

solemn rivet
#

searched for posts by you with file, and that was the latest one I found

leaden hedge
#

yeah theres an unuploaded version with some fixes

solemn rivet
#

k

leaden hedge
#

like for mantis claw not working

#

so don't report that bug hollowface

solemn rivet
#

got it

leaden hedge
#

the 3 major glitches atm are
dying to CG2 softlocks you
grimm1 occasionally doesn't spawn items
THK occasionally doesn't spawn items

ornate rivet
#

memez

solemn rivet
#

_gitgud

fair rampart
solemn rivet
#

^implying people die to CG2

leaden hedge
#

people got softlocked by being unable to kill watcher knights

#

so tbh I'd believe anything you told me

solemn rivet
#

I mean, at least it's not mantis lords

#

because oh lordy how much salt I've seen for Mantis Lords on Steam Forums

leaden hedge
#

mantis lords is like the easiest fight

#

I usually do it right after FK

solemn rivet
#

also, honest question (cus I have no idea how these things work), but since TC is porting HK to Switch... How does that work? Is it not run in Unity anymore?

leaden hedge
#

it does

#

the main reason its took this long is, unity just didnt run well on switch

solemn rivet
#

and it "runs well" now?

#

I ask this because if they, for some reason, had to recode some of HK to be Switch-compatible, maybe - just maybe - we could ask them to remove FSMs completely from the PC ver

leaden hedge
buoyant obsidian
#

I don't see that happening

leaden hedge
#

you can literally just make unity build for whatever

#

only reason switch isn't there is I don't have the apis for it

buoyant obsidian
#

a message from my sources

young walrus
#

๐Ÿค”

buoyant obsidian
#

Something about a Unity update

leaden hedge
#

graig said that about the current patch

#

unlikely they'll remove FSMs

buoyant obsidian
#

Didn't the current patch have a lot of under the hood changes? Stuff like grass moved ever so slightly

leaden hedge
#

it'd take weeks to remove it all

solemn rivet
#

only small changes as far as I could tell, 753

leaden hedge
#

and doing nothing else

solemn rivet
#

same thing with non-TGT related changes on the TGT patch

#

they always change a few, seemingly random, things each patch

#

like the cursor thing in the latest patch

young walrus
#

would that change help with the switch port?

#

for some reason?

leaden hedge
#

no

#

its because the old system was technically depreciated

solemn rivet
#

also, why not add NGG as a surprise bonus boss if you beat boss rush hitless?

young walrus
#

lol

leaden hedge
#

no one can beat NGG

young walrus
#

"congrats on winning."

#

JUST KIDDING

#

NOBODY WINS

leaden hedge
#

whats the point hollowface

ornate rivet
#

add a hard mode to boss rush where every boss is doubled

#

or somehow more difficult

leaden hedge
#

wow I took days to make NGG

young walrus
#

nail dmg = 1

leaden hedge
#

lets just do that for every boss hollowface

ornate rivet
#

yes

#

forget about your own life

leaden hedge
#

and I can't even test half of it

#

because traitor lords room crashes my game

ornate rivet
#

traitor lord sucks anyways

young walrus
#

well make it not crash your game

leaden hedge
#

I told will to fix his game

#

he said
k

#

so I assume he is on it

young walrus
#

fair enough

leaden hedge
#

I'm not on payroll hollowface

young walrus
#

what if.... you fixed it for them

#

then held the build ransom

#

unless they hired you

ornate rivet
#

I'll pay you a thousand geo

young walrus
#

i'll pay you in 3 high fives

leaden hedge
#

don't even think its something I can fix on my end

ornate rivet
#

3 digital hugs

young walrus
#

3 REAL hugs

#

o.O

leaden hedge
#

I could fix most of the things in the game from my end, but not the game randomly running out of memory when loading rooms

young walrus
#

make it use less memory

#

boom

leaden hedge
#

its not the memory its using

solemn rivet
#

make it download more memory on demand

#

boom

young walrus
#

just fix the things!

leaden hedge
#

its trying to allocate like 900gb

#

for some reason

young walrus
#

...sounds about normal

leaden hedge
#

then going I can't allocate 900gbs of ram

#

guess i'll die

solemn rivet
#

such a poor pc, doesn't even have 900gb ram

trim grove
#

clearly we need to get a system with 1tb of ram to play with

leaden hedge
#

does it THK room too

solemn rivet
#

I mean, at this day and age who doesn't have such a system?

leaden hedge
#

and moss knight arena

#

so I can't even do speedruns

young walrus
#

Get new PC?

leaden hedge
#

its probably the harddrive

#

infact

#

I'm like 99% sure it is

#

because when I run it in a seperate location for previous patches

#

it works fine

buoyant wasp
#

HDD in 2017 makes me cry the sad cry of my people

leaden hedge
#

I have an sdd hollowface

#

its on my desk

buoyant wasp
#

lul

young walrus
#

But but.....

#

they're so cheap

#

and great for general storage

buoyant wasp
#

@leaden hedge - You have that Canvas utility class hosted somewhere?

leaden hedge
#

nope

#

I updated it slightly if you want me to reupload

buoyant wasp
#

was gonna stick it in the API, if you think that makes sense. (if it's generic enough to use)

#

also, lol at the comments ๐Ÿ˜‰

leaden hedge
#

its pretty generic

#

its missing a few types like ImageMask

#

but it'll work for 99% of use cases

buoyant wasp
#

k

#

Can you upload the most recent "ExampleMod" zip you had? I wanted to go through and add examples for using save and global settings

#

or is it on your Git account?

leaden hedge
#

it isnt

#

one sec

#

that should be it

buoyant wasp
#

thanks

buoyant obsidian
#

I want to save an instance of an enemy when it spawns, how do I do that?

#

as in, TikTik spawns, I save the TikTik gameObject

leaden hedge
#

playmakerunity2dproxy

#

do GameObject x = Instantiate(this.gameObject) in thats start function

#

if its a tiktik

buoyant obsidian
#

OnCollisionEnter2D?

leaden hedge
#

it has a start function

buoyant obsidian
#

But there are no gameObjects in the start function

leaden hedge
#

ye

#

this.gameObject works

buoyant obsidian
#

A gameObject's name is that thing you showed me earlier right?

#

Like Dreamshield is "Shield"

leaden hedge
#

yes

buoyant obsidian
#

ayy

solemn rivet
#

so, first I'd add something to print out enemy object names when loading a scene that has them, then enter a scene that has a tiktik

#

this way you're sure you get the correct name

buoyant obsidian
#

Oh, I was making a sword that names what I hit

#

WhoTheFuckAreYou()

solemn rivet
#

what

#

xD

#

like

#

IgaVania's bestiary?

buoyant obsidian
#

What's that?

solemn rivet
#

eh

#

ever play a castlevania?

buoyant obsidian
#

Sadly not

solemn rivet
#

well

#

when you hit an enemy you get a small box telling you that enemy's name

buoyant obsidian
#

I think this would allow me to move / copy platforms and stuff too

#

I know y'all already do that but I'm figuring it out on my own :P

solemn rivet
buoyant obsidian
#

TikTiks are Climbers

solemn rivet
#

see how it shows "Merman" on the bottom right corner when he hits a merman

buoyant obsidian
#

Any way to respawn Gruz Mother?

leaden hedge
#

set the killedBigFly variable to false

#

and reload the room

buoyant obsidian
#

Reload the room?

leaden hedge
#

exit and re-enter

buoyant obsidian
#

That's all?

leaden hedge
#

if the variable is false yes

buoyant obsidian
#

She's not back :(

rain cedar
#

Look for an fsm called "Battle Scene"

#

You need to set a bool "Activated" on it false

buoyant obsidian
#

@leaden hedge PlayMakerUnity2DProxy doesn't seem like it was finding the objects

quick ravine
#

Is there a directory or document with details about how to access the FSM?

timber gale
#

How do I uninstall boss rush?

#

Nvm got it

buoyant wasp
#

there is one other option we could take with the functions we need to copy entirely to change, could always switch the source code to a private repository instead. not the hugest fan of that cause I'm very much in the "open" camp when possible, but it'd still make it easier that screwing with IL or manually editing the DLL.

fair rampart
#

is there a mod where i can equip every single charm?

buoyant obsidian
#

You mean CHEATING?

fair rampart
#

NO

#

i swear it isnt

buoyant wasp
#

the save editor would do it

#

or could

fair rampart
#

theoretically?

buoyant wasp
#

i'm almost positive it's not theory

rain cedar
#

I posted a free charm thing here a while back

#

Just search from: seanpr has: file

#

Good luck

buoyant wasp
#

lol

fair rampart
#

how OP is it truly?

#

are there videos?

buoyant wasp
#

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

rain cedar
#

Man it's more annoying than anything

buoyant wasp
#

^

rain cedar
#

Half the charms suck

buoyant wasp
#

so much crap all over that does every little

#

i mean, there's a reason there is a button in boss rush to skip picking up the items because sometimes all 3 things it drops will cause more harm than good in the run

rain cedar
#

Deep focus, dashmaster, grimmchild DansGame

rustic fossil
#

I'm just imaging having the shield, thorns, and glowing womb at the same time

#

And grimmchild

#

There would be no way to heal, for one

#

Unless Kingsoul gave more soul than glowing womb takes

#

But quick focus and deep focus would cancel each other out in terms of time

rain cedar
#

Well lucky you because you can have all 4 of those in vanilla

rustic fossil
#

Yep

#

I'd never do it for obvious reasons

buoyant wasp
#

why heal? don't get hit ๐Ÿ˜›

rustic fossil
#

Dude, Shield is so annoying for me

buoyant wasp
#

though right now, having those can totally screw you on fights like collector

rustic fossil
#

I feel like it makes it harder to dodge

#

Yep

buoyant wasp
#

thorns screws up my timings on everything

#

so i never, ever pick that up

rustic fossil
#

I used it briefly, but same here

#

Actually, I never use steady body for the same reason

#

Because I'm used to correcting

trim totem
#

Quick deep focus has helped me through hard times

#

Don't you hate on it

rain cedar
#

I think quick focus alone is better than the combo

rustic fossil
#

Agreed

#

But they might both be good

#

I've rarely used them together

trim totem
#

I feel personally attacked rn

#

Tbj

#

Tbh

rustic fossil
#

I hope we can add charm slots

#

I wanna do a 100 charm mod

#

But I'd need info about how to add custom charm graphics

rain cedar
#

We actually have all the pieces of something like that

#

Custom shiny pickups, custom game UI, fsm modding

#

Just need to figure out how to insert the custom UI into the inventory fsm as a new pane

rustic fossil
#

That's the tough part

#

And then coming up with 60 charm ideas

buoyant obsidian
#

Good luck, Lightbringer only has 12 unique ones

#

and some of them take over the roles of other charms

rain cedar
#

This actually looks fairly modular and not as awful as most of the fsm stuff in the game

buoyant wasp
#

@rain cedar is there a reason damageAmount = Modding.ModHooks.Instance.AfterTakeDamage(hazardType, damageAmount); is stuck before if (this.playerData.equippedCharm_5 && this.playerData.blockerHits > 0 && hazardType == 1 && this.cState.focusing && !flag) instead of just at the end of the routine?

#

guessing it's so that you can affect the outcome of some of the hazards?

#

and death

rain cedar
#

I don't think I placed that hook

buoyant wasp
#

hmm, wonder if thats one of the ones gradow had me put in....goes and looks

rain cedar
#

I don't get why that would even return anything if it's basically at the end

buoyant wasp
#

yeah, this was one gradow wanted for bonfire. I don't know the reasoning for it happening at that spot though.

rustic fossil
#

What does Blackmoth do?

buoyant wasp
#

i think i'm gonna stick it at the end and just say that he'll need to adjust if there's some edge case for it, cause it adds unecessary complexity to handle add it

#

nail does nothing

#

dash does damage

#

or something

rain cedar
#

Sharp shadow mod, basically

buoyant wasp
#

i haven't played it, but it seems neat

rain cedar
#

What we really need is a grimmchild only mod

#

Wouldn't be terrible at all

buoyant wasp
#

only if you can make it so grimchild gets all the the abilities of the later grimm things

#

like fire pillars

#

and expanding fire orbs and stuff

#

and a free icepick to stab yourself with

#

@solemn rivet - Is there a way you could redo your thing in Bonfire to not need AfterTakeDamageHook and just use TakeDamageHook instead? Seems like you might be able to get away with that and it work well enough. It would greatly simplify the modification of that method.

leaden hedge
#

as for making custom ui panes, I honestly think it'd be easier and much more extensible, to recode the entire thing in c#, the only parts of it that'd be annoying is the map / journal

#

and journal is pretty pointless and you could just keep the quickmap shortcut in for using the map

solemn rivet
#

Could we ask TC nicely to lend us part of the source code?

#

@buoyant wasp I'll see what I can do about it

leaden hedge
#

we have all the code

solemn rivet
#

so, you're saying what we can't do is all FSM stuff?

leaden hedge
#

yeah, theres no hidden code anywhere

#

and its not even that we couldnt' do it via fsm

#

just fsm is way more trouble than it's worth

solemn rivet
#

technically fsm is hidden, now?

#

since we have to dump it during runtime

leaden hedge
#

what would they give us that we already don't have hollowface

solemn rivet
#

eh

#

access to decompiled FSM?

#

a nicer viewer?

#

world peace?

leaden hedge
#

none of which they have

solemn rivet
leaden hedge
#

well they technically have a slightly nicer viewer

#

but they cant' legally give it to us because its not theirs hollowface

cunning basalt
#

hey guys

#

just wanted to ask but

#

what mods are there already fo HK ?

#

is there anything stable already or is everything still expiremental ?

royal ridge
#

Check the pinned google drive

#

That'll show you majority of the mods that have been made ๐Ÿ˜„

solemn rivet
#

you can ask for clarification on what those mods do here, or simply read their respective readme

dapper folio
#

Charm Notch Mod, last updated oct 26
Randomizer, oct 28
Debug, oct 28
Nightmare God Grimm, oct 31
Boss Rush, nov 9
Blackmoth, nov 10
Player Data Tracker, nov 11
Glass Soul, nov 14
Lightbringer, nov 14
Bonfire, nov 14
Modding API, nov 14

any of these need updating?

buoyant wasp
#

stability wise. Randomizer is stable with a few minor issues. Bossrush is stable with a couple of intermittent major issues (though largely playable most of the time). Blackmoth is stable afaik, bonfire is stable(ish?), glass soul is stable, lightbringer is stable

dapper folio
#

I meant if the mod authors had updated these and I needed to update the drive folder

buoyant wasp
#

yeah, i was answering @cunning basalt ๐Ÿ˜‰

leaden hedge
dapper folio
#

ah, well... carry on...

#

More Saves (by...)

leaden hedge
#

me

dapper folio
#

is there a readme?

leaden hedge
#

its just an api mod,
its very vanilla

#

but yes there is a readme

dapper folio
#

thankee

#

1.2.2.1?

#

or just whatever works for API?

leaden hedge
#

its api, should work on any version

dapper folio
#

alright

#

formatted, added, and uploaded

buoyant obsidian
#

I think Lightbringer has been updated since the 14th

dapper folio
#

yep, nov 16

#

and is that a new mod pinned i see?

#

both formatted, divided, added, and uploading

leaden hedge
#

@buoyant wasp @rain cedar https://github.com/KayDeeTee/hk-mod-inventory the vanilla ui isn't populated and its not "ported" to the actual game, but this works fairly well in unity ( for the basic inventory )
you just make a class that inherits from PaneHandler, add it to a gameobject and its all sorted out in terms of next pane previous pane and controls
you just have to create the PreInit,Init,onMove, getSprite,onSelect,onSubmit functions
only thing I think it needs to actually work for everything in game (which matters) is an animator for invItems which gives a callback, which is required to for the charm equip animation

buoyant wasp
#

do we need to add any hooks into the assembly to make it work?

leaden hedge
#

it works entirely on its own, its not quite finished, I'm more posting it so people can look at it and see if theres anything obvious I missed, (excluding the animator) hollowface

buoyant wasp
#

cool

leaden hedge
#

before I spend the next day and a half porting the vanilla ui and charms to this

buoyant wasp
#

lol, so we'd be basically rewriting the game's inventory UI rather than just injecting new pages?

leaden hedge
#

yes

#

less effort tbh

buoyant wasp
#

my only real concern is long term maintainability, but I'm guessing other than when they add new charms or new items, the game really hasn't changed much?

leaden hedge
#

it really wouldn't be a masive pain to maintain

buoyant wasp
#

k. well, I can pop it in and test and see what happens, but I'm not sure i'd notice what might or might not be missing or wrong at this point. I know so little about the UI stuff that i might not be of much help. at least tonight my goal is to finalize the fully automated patching of Assembly-Csharp and do testing. Pretty much finished last night...i think. but it was also 2am so you know how that goes...

leaden hedge
#

well it probably won't work in hollow knight rn

#

I've only been testing it in unity

buoyant wasp
#

ah

#

oh, yeah i see now. k, makes sense

#

so, one thing we can do with this new patching approach

#

is replace functions in their entirety, exceptionally easily

#

so it'd be pretty trivial to replace the inventory stuff as long as the signatures/names/etc of the classes/methods matched whatever it is where replacing

leaden hedge
#

its all fsm afaik

#

although super conviently

#

theres a function called canOpenInventory

#

you can just return false for hollowface

buoyant wasp
#

right, but i mean, if there is just this one function that says "call the fsm to display inventory", we can replace that function with "call our new inventory code"

leaden hedge
#

oh

buoyant wasp
#

it's literally as easy as

[MonoModReplace]
public void OpenInventory() {
    Lookmah.MyNewCode();
}
#

just don't "fix" inventory falling, k? ๐Ÿ˜‰

leaden hedge
#

well you could do

CanOpenInventory(){
    bool ret = false;
       //whatever
    if( ret == true )
        OpenInv();
    return false;
}
#

as for inventory dropping, hmmmm

buoyant wasp
#

honestly as long as it's not changing the middle of a function, it's drop dead easy, prepending, appending, and replacing are simple. injecting is doable, but annoying

#

so i imagine it should be fairly easy to get your stuff in

#

once it's ready

leaden hedge
#
public bool CanOpenInventory()
{
    return (!this.gm.isPaused && !this.controlReqlinquished && !this.cState.transitioning && !this.cState.hazardDeath && !this.cState.hazardRespawning && !this.playerData.disablePause && this.CanInput()) || this.playerData.atBench;
}
#

well this is CanOpenInventory

#

so

public bool CanOpenInventory()
{
    bool ret = (!this.gm.isPaused && !this.controlReqlinquished && !this.cState.transitioning && !this.cState.hazardDeath && !this.cState.hazardRespawning && !this.playerData.disablePause && this.CanInput()) || this.playerData.atBench;
    if( ret )
        OpenModInventory();
    return false;
}
buoyant wasp
#

yup

#

though I would probably do this

#
public extern bool orig_CanOpenInventory() {}

public bool CanOpenInventory() {
    if (orig_CanOpenInventory())
        OpenModInventory();
    return false;
}
#

the patcher can auto rename the original version of a method

#

so i don't even have to care what was in it, it will rename it to orig_Method() and I can call that.

#

(which is why prefixing/appending stuff is so stupid easy)

#

the final result would have the publix extern statement removed and just replaced the renamed method, so it'd look "normal"

leaden hedge
#

also relevant

#

if you were to add new charms

#

it'd make sense that every mod could "request" a charm

#

and then the api would give them out

buoyant wasp
#

neat

leaden hedge
#

I know why default inventory does it

#

so I can just emulate that behaviour

buoyant wasp
#

didn't we determine it's just cause it doesn't change the timescale to 0?

#

or was that just a theory

leaden hedge
#

well inv should do that, but thats not why you fall super fast and don't hard fall

buoyant wasp
#

ah

young walrus
#

they don't cap your movement

#

since usually you open it on the ground

buoyant wasp
#

yeah, but that doesn't explain the hard landing not being hard does it?

young walrus
#

but if you're in air, you get constant gravity acceleration

#

shrugs you cancel it with the closing animation of the inventory

buoyant wasp
#

yeah, it's just weird

leaden hedge
#

its because your in the idle state

#

and you need to be in fall state for over x seconds

#

to hard fall

buoyant wasp
#

ah

leaden hedge
#

the fall state is also what caps your movespeed

buoyant wasp
#

so as long as your modded inventory keeps you in the idle state, should just "work"

#

work being the operative term for "be broken the way we all love"

young walrus
#

lol

leaden hedge
buoyant wasp
#

well... that's....something

leaden hedge
#

well it was because by my maths

#

right, sin goes from 0 -> 1 every 90 degrees

#

so If I multiplied the time by 90

#

i'd get one pulse a second

buoyant wasp
#

while i used to be quite good at algebra, that skill has withered over the years due to lack of use

#

(much like the 4 years of Japanese)

leaden hedge
#

without trig

buoyant wasp
#

i wouldn't, i'd find someone who could. Remember, all my programming experience is in databases, web design, server software. I don't do UI generation, game design, or anything of the like. So outside of some basic algebra, i don't use much else for my job

#

though not looking forward to having to help my kid with common core high school math....

#

it's not that I don't think it's worthwhile. i do, but like all skills, if it's not something you practice often it fades in time

leaden hedge
#

its alright

#

they got it wrong in the base game

buoyant wasp
#

so....how does it work in the base game then?

leaden hedge
#

the top 2 are like 90deg apart

#

and 135deg apart from bottom one

buoyant wasp
#

lol

#

"KDT: I fixed your Inventory UI. "

#

though it would be amusing if someday some part of our mod work got pulled into the base game because it was such a fundamental improvement they couldn't not use it

leaden hedge
#

hopefully moresaves ๐Ÿ‘€

buoyant wasp
#

rip discord

leaden hedge
#

its back PogChamp

#

TC ddos'ing discord to keep the information about the spells being oddly aligned suppressed

buoyant wasp
#

lol

buoyant obsidian
#

It's Slack trying to get their audience back

hazy sentinel
#

aaand pausing crashed the game

#

there are like

#

30 lances spawning per second

#

probably more

buoyant obsidian
#

ummmmm

#

what charms?

hazy sentinel
#

silent divide quick slash dashmaster twin fangs nailmaster's passion

#

although restarting the game fixed it for some reason

buoyant obsidian
#

I know what's wrong thanks

#

I'll get it when I get home

hazy sentinel
#

oh it seems to scale with enemies killed ๐Ÿค”

#

although without that glitch nailmaster's passion seems terrible

buoyant obsidian
#

it's still regular nailmaster's too

hazy sentinel
#

who needs nailmaster's glory with lances though

buoyant obsidian
#

give the nailmaster a break he's gonna be laid off now that lances are the new thing

buoyant wasp
leaden hedge
#

oh yeah you might want to update some of the strings in there hollowface

buoyant wasp
#

hah, yeah

#

but still, intellisense for modders! ๐Ÿ˜ƒ

#

well, for anything in the Modding namespace

#

I can't make it magically appear for the TC code

#

sadly

leaden hedge
#

its always worked

#

atleast for me

buoyant wasp
#

intellisense only works if there is a Assembly-CSharp.xml file

#

i'm not talking about just showing the method name and parameters

#

but also the stuff in <summary>

#
        /// <summary>
        /// Called by the game in PlayerData.SetBool 
        /// </summary>
        /// <param name="target">Target Field Name</param>
        /// <param name="val">Value to set</param>
#

that

#

gets stripped out at compile time

#

so when we would edit the assembly-csharp in dnspy, we wouldn't get to have that

#

it's why they used [HookInfo] (at least I'm assuming that's why @rain cedar used them)

#

Good lord setup new player data gets called a crap ton

rain cedar
#

It's literally just when a new PlayerData is made

buoyant wasp
#

or when Reset() is called

#

which has 4 things it can be called by

rain cedar
#

Nice

buoyant wasp
#

i kind of wonder...hmm, i'm gonna do a stack trace and see what the offending method is

buoyant obsidian
#

how do I summon explosions

buoyant obsidian
#

I'm gonna try to steal the explosionPrefab from the Bullet class

buoyant wasp
#

oh, i think i see what's happening. hmm

buoyant obsidian
#

Can't find explosion, I bet I have to use FSM stuffs

solemn rivet
#

what kind of explosion?

#

takeDoubleDamagePrefab is explosion-ish

buoyant obsidian
#

I wanna hurt enemies with it

solemn rivet
#

that... Is significantly harder

buoyant wasp
#

weird. no idea what's constructing playerdata over and over and over again. For whatever reason the stack trace ends at the constructor

[FINE]:[API] - AfterNewPlayerData Invoked   at Modding.ModHooks.AfterNewPlayerData(.PlayerData instance)
   at PlayerData.SetupNewPlayerData()
   at PlayerData..ctor()
#

meh, whatever

#

@rain cedar - was the purpose of the HookInfo attribute purely because we had no method to document what the hook was?

rain cedar
#

Yep

buoyant wasp
#

if we have everything in source and intellisense comments, is there a reason to keep it? (idc either way)

rain cedar
#

I suppose not

fair rampart
#

whistles

copper nacelle
#

lol

#

so first

#

open hollow knight and make sure your version is 1.2.2.1

fair rampart
#

alright

#

@copper nacelle doing that now

copper nacelle
#

cool

fair rampart
#

itsss

#

ye

#

its ver. 1.2.2.1

#

@copper nacelle

fair rampart
#

kek

buoyant wasp
#

what exactly this "this" ?

copper nacelle
#

it was the modding api for 1.2.2.1

#

direct url

#

that didn't work

buoyant wasp
#

use the pins

copper nacelle
buoyant wasp
#

direct URL is never gonna stay the same

copper nacelle
#

and download the [1.2.2.1] one

fair rampart
#

okk

#

@copper nacelle

#

did it

#

sorry for slow progress

#

im dealing w/ something rn

#

what next

copper nacelle
#

it's fine

#

extract the .zip

#

and take the Assembly-CSharp.dll

#

@fair rampart is your steam normal

#

or is it on D: or something

fair rampart
#

yes

#

its normal

#

its in x86 program files

#

iird

#

iirc*

copper nacelle
#

go to program files x86 or whatever

fair rampart
#

this is the folder

copper nacelle
#

yea

#

go to hollow_knight_Data

#

then Managed

#

duplicate the assembly-csharp.dll already in there

#

then replace the current one with the one you just downloaded

fair rampart
#

alright

#

which one??

copper nacelle
#

the normal one

fair rampart
#

eh

#

it doesnt matter

copper nacelle
#

the one near the Mods folder

#

IT DOES MATTER

fair rampart
#

i can still do verify steam files lol

#

okay so the one below the Mods

copper nacelle
#

just duplicate and then replace the Assembly-CSharp.dll one

#

yes

#

the one right below mods

#

with no -firstpass added to it

fair rampart
#

alright i got it in

#

duplicated the original one too

copper nacelle
#

cool

#

now rename your Mods folder to OldDeadMods

#

or something

fair rampart
#

alright @copper nacelle

copper nacelle
#

lmao

#

download the zip in there

fair rampart
#

doned

#

done

#

@copper nacelle now what

copper nacelle
#

now extract the zip

#

then go back two folders into the folder that hollow_knight_Data is in

#

and put the Randomizer folder in there

fair rampart
#

alright

#

so like this? @copper nacelle

copper nacelle
#

no

#

you put it in the folder called "Hollow Knight"

fair rampart
#

kk

copper nacelle
#

yea

#

exactly

fair rampart
#

dat it?

copper nacelle
#

now go back to hollow_knight_Data

#

then to Managed

fair rampart
#

ok

copper nacelle
#

and copy the Mods folder in the zip into there

fair rampart
#

which?

copper nacelle
#

in the zip

#

go into hollow_knight_Data

#

into Managed

#

and take the mods folder in there

fair rampart
#

ohh

#

bewm

copper nacelle
#

yea

#

now try booting Hollow Knight

fair rampart
#

kk

#

rEEEEEEEE

copper nacelle
#

just click the button

#

and then click it again because Hard is the best

fair rampart
#

yes hard

#

ok and for the seed

#

what do i do there

copper nacelle
#

put what you want

#

if you want literally my world

#

it's 999999999

#

(suggested by Johnnyme๐Ÿ…ฑoy)

#

but you can do anything

buoyant obsidian
#

753?

rain cedar
#

694201337

fair rampart
#

ooo

#

let me ask in discussion

rain cedar
#

You're not gonna get anything there

copper nacelle
#

I got like 6 seeds there

fair rampart
#

perfecto

buoyant wasp
#

should give him the seed from last night with the missing item at leg eater, or was that 2 nights ago. that was fun

timber gale
#

is there any way to turn off the console popups w/debug mod?

#

They come up even when the debug mod overlay is disabled

rain cedar
#

I should probably just remove those entirely

#

They only come up when console is off

#

I think I'm finally gonna get around to trying to add rebindable keys now

knotty tapir
#

ayy nice โค

timber gale
#

thank you!

knotty tapir
#

do the hp bars have to be bound to enemy console though > >

rain cedar
#

Actually there's a good reason for that one

#

Searching for enemies is an expensive process and can cause lag on worse computers

#

So having the enemy panel disabled is a good way of saying "Don't search for enemies anymore"

#

No enemy list means I can't put health bars on things

knotty tapir
#

ahhhhh that makes loads of sense

rain cedar
#

Anyone have suggestions for how the key rebind UI should be handled?

#

Simplest way would just be to make the help panel have buttons for all the keys

timber gale
#

The popups still seem to be appearing for me when I installed that dll

rain cedar
#

You sure you installed it correctly?

#

I completely deleted the object that renders that text

#

Shouldn't be possible for it to still show up

timber gale
#

I dropped the new dll file in the mods folder. Let me try it again.

#

Yes, I'm still having the "Hazard respawn location" and "scene loaded" things pop up after the UI is disabled.

rain cedar
#

Alright, let me check

#

It's working for me

#

I'm not even sure it's possible to overwrite mods while the game is running, but just to be sure: You restarted your game, right?

timber gale
#

Yes

rain cedar
#

If you've got multiple installations, maybe you're putting it in the wrong mods folder

timber gale
#

possibly, I'll mess around a little bit and see what happens

#

Yup, wrong mods folder. Thanks for the help!

rain cedar
#

@buoyant wasp If I'm changing debug mod to add global settings, how would I access static members in it from outside the class? I am getting an error when I try to just do
DebugMod<IModSettings, IModSettings>.whatever
Probably because the IModSettings constructor is protected

#

I don't have a lot of experience working with generic classes

buoyant wasp
#

DebugMod.Instance.GlobalSettings

#

should work

#

The generic part only applies to the initial class definition (in this case, there can be generic methods, but that's neither here nor there)

rain cedar
#

I'm not trying to access that, though

#

I have static members I need to get at, those probably aren't going to be in the instance

#

Yeah, doesn't work

buoyant wasp
#

k, sec

rain cedar
#

I guess there's no downside for it to not be static

#

There's never a reason to have more than one of it but there's only ever going to be one DebugMod class anyway

buoyant wasp
#

you could probably do

#
public override void Initialize()
        {
            Log("Initializing Debug");
            StaticGlobalSettings = GlobalSettings;
        }

        public static ExampleGlobalModSettings StaticGlobalSettings;
#

then you could do DebugMod.StaticGlobalSettings.ShowConsole = true;

#

or something

#

the only thing that's different about global settings is that you control when the settings are saved. (since savegame doesn't make sense). for that you'd do

DebugMod.Instance.SaveGlobalSettings();
rain cedar
#

The problem is I don't get how to access static members at all

#

This isn't really related to global settings

#

Neither of those works

buoyant wasp
#

is "refCamera" a static property/method/field?

rain cedar
#

refCamera is this:

public static CameraController refCamera
{
    get
    {
        if (_refCamera == null) _refCamera = GameObject.Find("tk2dCamera").GetComponent<CameraController>();
        return _refCamera;
    }
    set
    {
    }
}```
#

Just an example, anyway

buoyant wasp
#

what does your class declaration look like for DebugMod?

rain cedar
#

I just did the same as is in the API

#
public class DebugMod<T1, T2> : Mod<T1, T2> where T1 : IModSettings, new() where T2 : IModSettings, new()```
buoyant wasp
#

ah, no

rain cedar
#

I can get rid of the "new()" to fix this error, would that not break anything?

buoyant wasp
#

sec

#
public class SaveSettings : IModSettings {}
public class DebugModGlobalSettings :IModSettings {}
public class DebugMod : Mod<SaveSettings, DebugModGlobalSettings> {}
rain cedar
#

Oh ok

#

That seems really strange

#

Why does it need to be that way?

buoyant wasp
#

the generic says "I have a class, it has a save settings of type T and type T needs to be inheritable from IModSettings"

#

save for global

#

but

#

here's the advantage

#

when you look at DebugMod.GlobalSettings, you'll see it's of type DebugModGlobalSettings, not IModSettings, that means you have the ability to do something more than what IModsettings has inherently

#

it's basically a step beyond normal polymorphism

rain cedar
#

I see

buoyant wasp
#

now, You could just do nothing with DebugModGlobalSettings

#

but i wouldn't really suggest it

#

I'd make accessing the settings inside of it easier

rain cedar
#

Yeah, I'll add some stuff in there

buoyant wasp
#

if you look at bonfiremod on github

#

there is some sample

#

boilerplate

#

i wanna see if i can remove that boilerplate at some point

rain cedar
#

You could just add all public fields in the settings object to the dictionaries on save and the reverse on load for keys with matching variable names

#

Don't think there's really a better way to make it work without the copy/paste code on all the variables

buoyant wasp
#

I suppose if I cached the names that'd be fine. the game saves...alot, so i wouldn't want to reflect those multiple times

#

since reflection is relatively expensive

#

but that was my thought as well

#

but i've done reflection type caching before, so I have a handle on it, shouldn't be hard to implement

rain cedar
#

I've never seen this nameof function before but it looks really useful for this

buoyant wasp
#

it's something relatively new

#

it compiles to the same thing

#

but, it means that if you change the name

#

it is checked at compile time

rain cedar
#

Yeah

#

I don't think I can use it because my Visual Studio is so old

#

So I guess I'll just never be able to change these variable names without a huge hassle

buoyant wasp
#

haha, you could always upgrade for free ๐Ÿ˜›

#

but yeah, i think it was C# 6 or 7 they added that

rain cedar
#

Yeah, I suppose I could just download 2017

buoyant wasp
#

(if you don't know, the community version of vs 2017 has no cost for non-profit/non-business devs)

rain cedar
#

Gonna have to download this eventually to ever make changes to the API, anyway

#

Since I don't think I can use the => syntax in vs 2013 either

buoyant wasp
#

ouch, expression bodies are wonderful for simple stuff

rain cedar
#

Yeah, they're nice, but it's not like it's a huge pain to type out the little bit extra without it

#

Just a lot less compact

buoyant wasp
#

yeah, i don't mind the typing, i just find it cleaner to read for simple stuff

rain cedar
#

Oh, no wonder I couldn't figure out my login

#

I used a friend's email

#

I guess because I didn't want spam

buoyant wasp
#

haha

#

ms isn't bad about that

#

i might get 4 or 5 a year

#

also, 2017 has git baked in, (assuming you use something like pagent for you ssh key handling, you can push/pull right from vs)

rain cedar
#

Cool

#

I'll probably still use a command line because I'm used to it

#

But good to know the option is there

buoyant wasp
#

yeah, i've used command line, git extensions, and vs git. each has pros and cons

#

for simple stuff like commit and push and see what's changed and see the diffs, the VS one does well. if you want to do merges, i still prefer something else, like kdiff

rain cedar
#

Command line pros: You can do anything
Command line cons: You have to know how to do it

buoyant wasp
#

pretty much

#

cons2, since you can do anything, you can royally screw yourself easily

rain cedar
#

Haha yeah

#

I mean I'm not gonna accidentally type some shit like "git checkout ." ever

#

But the option is there

buoyant wasp
#

native bash in windows has really been nice

young walrus
#

Has the rando been updated at all since last week?

rain cedar
#

No, but I might work on that after I finish with some debug stuff tonight

buoyant wasp
#

i'm so close to having the entire API buildable in 1 step

rain cedar
#

Oh cool VS 2017 tells me which using statements are unnecessary