#archived-modding-development

1 messages · Page 37 of 1

rain cedar
#

I meant to clean that up but couldn't be bothered figuring out which I could delete in all the files

buoyant wasp
#

yup

#

vs 2017 took alot from resharper, which is really nice

rain cedar
#
public static string GetCallerName([CallerMemberName] string name = null) => name;

public bool EnemiesPanelVisible
{
    get => BoolValues.ContainsKey(GetCallerName()) ? BoolValues[GetCallerName()] : true;

    set
    {
        if (BoolValues.ContainsKey(GetCallerName()))
            BoolValues[GetCallerName()] = value;
        else
            BoolValues.Add(GetCallerName(), value);
    }
}```
Went ahead and made this stuff even more easy to copy/paste than it already was
buoyant wasp
#

oh, that's clever, nice

rain cedar
#

Get and set both call that function twice, though

#

No idea how expensive that is

#

Maybe I should cache it

#

Or just grab it once, I mean

#

Not really caching it

buoyant wasp
#
get { string caller = GetCallerName(); return BoolValues.ContainsKey(caller) ? BoolValues[caller] : true; }
#

?

#

maybe

rain cedar
#

Ah ok I found the answer to how it works

#

CallerMemberName just gets compiled to a hard coded name

#

So it shouldn't be expensive at all

#

Might as well just keep it as is

buoyant wasp
#

cool

rain cedar
#

I think that's the first time I've seen someone show the IL code for something

buoyant wasp
#

yeah, i've not seen that on SO before, but that's a really good way to explain it

#

i wonder then...hmmm

#

if I added say, GetString([CallerMemberName] name = null);

public string MySetting { get => GetString(); set => SetString(value);}
rain cedar
#

Oh that's smart, I can make this way more compact

buoyant wasp
#

yeah, but i'm thinking i add this to the ModSettingsDictionary class so that it's just baked into the IModSettings class, then you don't have to even worry about it.

rain cedar
#

There is a downside to this, though

#

You can't nearly as easily set default values for everything

buoyant wasp
#

actually, that's trival too

#

just change it to this

#
public string GetString(string defaultValue, [CallerMemberName] name = null) {
    return StringValues.ContainsKey[name] ? StringValues[name] : defaultValue;
}
public string MySetting { get => GetString("Hi"); set => SetString(value);}
rain cedar
#

Yeah, that makes sense

#

Alright that cut my settings class down by like 30 lines

buoyant wasp
#

hmm, callermembername is .net 4.5, guess we'll find out soon enough if a mod compiled under 4.5 will work on HK

rain cedar
#

Ah yeah guess I should check that before continuing too far

#

Works fine

#

Oh awesome the UnityEngine.KeyCode enum has stuff for controllers too

#

Woo not having to do extra work for controller support

buoyant wasp
#

if you pull up your dll with dnspy, what does the GetString function you added look like decompiled?

#

oh, derp, i need to look at something that uses it, not the function itself

rain cedar
#

Hang on

#

It's just completely replaced the CallerMemberName with hard coded strings

#
{
    get
    {
        return this.GetValue(true, "EnemiesPanelVisible");
    }
    set
    {
        this.SetValue(value, "EnemiesPanelVisible");
    }
}```
buoyant wasp
#

yeah, i'm just checking to make sure this "hack" of 3.5 works. I can't compile the API in 4.5 because Assembly-CSharp is 2.x. So i have to output in a compatible version, however, turns out, if you add the attribute

#

to the assembly

#

the compiler will still use it

#
namespace System.Runtime.CompilerServices
{
    [AttributeUsage(AttributeTargets.Parameter)]
    public class CallerMemberNameAttribute : Attribute
    {
    }
}
#

just had to add that

rain cedar
#

Weird that that works but whatever

buoyant wasp
#

and it behaves just like it should, (strings get replaced like your example)

rain cedar
#

That's really odd

#

I should probably do that and switch back to targeting 3.5

buoyant wasp
#

yeah, you don't want to accidentally try to use some 4.5 nicety only to find out it doesn't exist. Maybe we'll get lucky and when they do the hornet DLC or something they'll upgrade unity to something newer

rain cedar
#

If you're adding that to the API though I think I'll just wait for you to have a release of that before switching so we don't end up with a duplicate attribute definition

#

Compiler seems to have also changed all the stuff like this

(int)Keycode.F1

into just numbers

#

Hopefully nobody has to modify this in dnspy ever

buoyant wasp
#

yeah, enums are just ints in discuise

rain cedar
#

Yeah, enums are great

#

Super easy to save keycodes in the API stuff because of it

buoyant wasp
#

yup

rain cedar
#

The only thing I'm not sure of on this is if I should bother trying to get proper controller button names from the keycodes

#

I mean seeing that your bind for the help menu is "Joystick1Button6" is obviously useless

#

But I also have no idea how to get proper names

buoyant wasp
#

i wonder how kdt did it for moresaves

rain cedar
#

There's also the problem that half the stuff on controllers isn't even buttons

buoyant wasp
#

yeah

rain cedar
#

Alright I think I figured out a solution to one of those problems at least

#
if (GameManager.instance.inputHandler.activeGamepadType == GlobalEnums.GamepadType.XBOX_360)
buoyant wasp
#

note that the ps4 one i think registers as "generic controller"

#

maybe...

#

or wireless controller, something

rain cedar
#

The enum has PS4 in it

#

If that doesn't actually work, not my problem

buoyant wasp
#

Joystick connected ("Wireless Controller").

#

though honestly

#

as long as the buttons are in the same place it doesn't matter

rain cedar
#

Yeah

#

I think I need to make my own key enum for the controller stuff because of triggers and stuff

#

Maybe I need to save strings instead of ints for the keys, I dunno

buoyant wasp
#

Modding API 1.2.2.1-13 (ALPHA) - Most functionality is still unchanged, however the new helpers have been added to IModSettings. Also this is now built in 1 step with only 1 minor edit in dnspy required after build (which I think is fixable with a change to MonoMod, we'll see what the author says). Also, now should give intellisense comments on all the stuff in the hooks in VS out of the box.

rain cedar
#

Sounds neat

#

Do I just stick the XML in the game folder for intellisense stuff to work?

buoyant wasp
#

yeah, it just needs to be in the same place as the dll. VS always looks for "AssemblyName.xml" if its "AssemblyName.dll"

#

sometimes VS intellisense won't auto update, in which case deleting the .vs folder in your solution and restarting VS will clear the cache and have it rescan

rain cedar
#

I just restarted VS and it's working

#

Awesome

buoyant wasp
#

obviously it only works for stuff that we add (since it's based off of the /// stuff), but it's better than nothing 😃

rain cedar
#

Yeah

#

It should probably have the arguments expected for each hook

buoyant wasp
#

ah, yeah

rain cedar
buoyant wasp
#

you can change your preference, but it actually will make suggestions in both directions I think

#

so if it's currently an expression body, it will suggest block body, and if its a block body, it'll suggest an expression body

rain cedar
#

You're right, it does

rain cedar
#

@buoyant wasp Dash just does the animation in place with this API

#

No mods hooking it

#

Ah here's your problem

#

You changed the Dash function to look for null instead of Vector2.zero

#

But that's still being returned from the hook

buoyant wasp
#

ah

#

so just need to change the hook to do

#
            return _DashVectorHook?.Invoke();
#

my plan once things are all stable is to make a mod who's entire purpose is to have every single hook in it so that it's easy to test all of them quickly

rain cedar
#

Funny thing is that in this case having dash hooked would have fixed it

buoyant wasp
#

hah, good point

rain cedar
#

Oh nice, that looks really cool

buoyant wasp
#

it's generated by docfx, it needs some cleaning up and whatnot, but it's designed to work on something like github.io

#

so it builds it based on the source/xmldocs/etc + whatever other static content you want to serve up

#

also, dang just realized how late it is

buoyant wasp
#

at some point i should see what happens if i try to run this single build process on the gog version of the game

#

or the *nix version

rotund karma
#

hello i have decided to try a mod

#

does it automatically enter my game or do i have to do something

buoyant wasp
#

you'll need to be more specific

#

what mod?

rotund karma
#

blackmoth

young walrus
#

Did you finish that tutorial thing Wyza?

rotund karma
young walrus
#

On installing mods?

buoyant wasp
#

finishing requres starting, but no, not yet. this weekend, i promise

young walrus
#

Was that even you that said they were going to do it? Lol

buoyant wasp
#

yup

young walrus
#

Lol. K good. I'm not mistaken

buoyant wasp
#

just currently obsessed with the API for some reason 😃

young walrus
#

Anyway. I'm off to bed.

#

Wyza can help you Paco

rotund karma
#

ok

young walrus
#

:P

rotund karma
#

goodnight stranger

young walrus
#

throws Wyza under bus and runs away

rotund karma
#

oh nose

buoyant wasp
#

@rotund karma depends on the mod. the blackmoth one is probably drag and drop

#

from there anyway

rotund karma
#

drag and drop?

#

i aint never mod before

buoyant wasp
#

it's literally a zip file, that you unzip and copy the contents of which into your games installation folder. It will overwrite some files, and your game will be modded

rotund karma
#

oh ok

buoyant wasp
#

that said, blackmoth from moddb is pretty out of date

#

I'd suggest looking at the pinned messages in this channel

#

it has a link to a google drive that has alot of mods including that one

#

you'll want to:

rotund karma
#

alrighty

buoyant wasp
#
  1. Go into the "Modding API" folder and download that and unzip its contents into the game's directory. (for your game's version)
rotund karma
#

ok

buoyant wasp
#
  1. Go download the blackmoth mod from the drive and do the same
rotund karma
#

alrighty

buoyant wasp
#

that's it, fire up the game, and if everything went well, you'll see in teh upper left hand corner the versions of the mods installed

rotund karma
#

oh nice

buoyant wasp
#

lul

#

why bother playing at that point

rotund karma
#

you can beat the radiance and say you beat it with no damage

buoyant wasp
#

winning while cheating isn't winning

rotund karma
#

it is if no one knows you cheated

rain cedar
#

But you just told literally everyone here you're cheating

rotund karma
#

im not actually downloading it

buoyant wasp
#

yeah, no, i'm too tired and grumpy to really have a non-pissy answer to that kind of argument

rain cedar
#

You should sleep soon

rotund karma
#

i have decided to get a boss rush mod instead of blackmoth

rain cedar
#

You can use both

rotund karma
#

yeah but im getting boss rush first

buoyant wasp
#

indeed, afaik, they have no incompatabilities 😉

#

anyhow, i'm off, much progress made today. i see the light at the end of the tunnel. it might be a train

rotund karma
#

nevermind i cant do the boss rush mod im using a later version

rain cedar
#

See, this is exactly why I removed version numbers from randomizer and debug

#

It'll work fine still

rotund karma
#

im trying the scale mod now

#

since i run 1.2.2.1

#

i wanna beat up every single boss in the game no

#

now

#

i already beat it so you cant say its cheating i already know what happens

rain cedar
#

Missing a \\

#

Global settings are also not getting loaded properly

#

I really don't get what's going wrong here

#

After closing the game the global settings file has the right stuff

#

This doesn't break anything

SaveGlobalSettings();
GlobalSettings = null;
LoadGlobalSettings();```
#

And yet if I relaunch the game the settings file is empty again

late sphinx
#

new boss rush time

#

29:10

rain cedar
#

Nice

late sphinx
#

got super lucky

#

not really super lucky

#

but like

#

sup lucky

#

super without the last 2 letters

rotund karma
#

i just beat hornet in a fast time

#

@rain cedar hello can you please explain your debug mod

#

and is it available for 1.2.2.1

rain cedar
#

It has a pretty good readme

#

And yes

rotund karma
#

alright thanks

knotty tapir
#
SaveGlobalSettings();
GlobalSettings = null;
LoadGlobalSettings();```
rotund karma
#

wh

knotty tapir
#

Globalsettings is weakly typed?

#

what happens if you exclude each line and keep the other two?

rain cedar
#

What do you mean by that?

#

Exclude each line but keep 2?

#

Also GlobalSettings is this:

public TGlobalSettings GlobalSettings
{
    get
    {
        TGlobalSettings result;
        if ((result = this._globalSettings) == null)
        {
            result = (this._globalSettings = System.Activator.CreateInstance<TGlobalSettings>());
        }
        return result;
    }
    set
    {
        this._globalSettings = value;
    }
}```
#
private TGlobalSettings _globalSettings;```
knotty tapir
#

oh you want to save the keybinds into the json file

rain cedar
#

Keybinds and some other stuff, yeah

knotty tapir
#

but every time you do load() the file empties itself?

rain cedar
#

No, the file only empties itself on game load

#

It's fine after closing the game and after loading while it's running

knotty tapir
#

you running any other mod?

rain cedar
#

Nah

rotund karma
#

seanpr which folder are you talking about in the readme

knotty tapir
#

when you download it there's a readme in the zip 😄

rain cedar
#

I dunno man, it's been like a month since I wrote that

#

Probably the game install folder

rotund karma
#

ok

#

it just says this folder

rain cedar
#

Try reading the bit before that

rotund karma
#

yeah i open that

#

i copied it into that

rain cedar
#

Ok then what's the problem?

rotund karma
#

and no overwrite stuff came up

#

let me try again

rain cedar
#

Well now it'll ask to overwrite even if you do it wrong again

#

Since you already copied the stuff in

#

Only the api will always ask about overwriting

rotund karma
#

ok

#

also what key is it to open the console

#

is it just `

rain cedar
#

If by that you mean something you can type commands in, that doesn't exist

#

If you just mean the debug output console it's F4

#

Or F3

rotund karma
#

oh ok

rain cedar
#

I can't remember

knotty tapir
#

by loading while it's running you mean, if the user makes changes while the game is live, as long as the game stays live the changes stay and the file remains updated

#

same for close

#

but if the user opens the game the file clears

rain cedar
#

I mean I can arbitrarily call load during gameplay and it doesn't clear the file

knotty tapir
#

you have load() running as part of the init process when the game starts?

#

what happens if you, say, put a time delay on it

rain cedar
#

I don't have control of that

#

It's in the API code, not the mod code

knotty tapir
#

oh.

#

oh.

rain cedar
#

The mods are loaded well after the game has fully loaded, anyway

#

It's some time around when the main menu loads

#

The problem is probably with the API, though

#

Just not sure what it is or I would fix it

knotty tapir
#
get
    {
        TGlobalSettings result;
        if ((result = this._globalSettings) == null)
        {
            result = (this._globalSettings = System.Activator.CreateInstance<TGlobalSettings>());
        }
        return result;
    }
rain cedar
#

What about it?

knotty tapir
#

i'm trying to figure this out

#

so when you do load() it presumably runs this part of the code

rain cedar
#

Nah, load is this

public void LoadGlobalSettings()
{
    bool flag = !System.IO.File.Exists(this._globalSettingsFilename);
    if (!flag)
    {
        base.Log("Loading Global Settings");
        using (System.IO.FileStream fileStream = System.IO.File.OpenRead(this._globalSettingsFilename))
        {
            using (System.IO.StreamReader streamReader = new System.IO.StreamReader(fileStream))
            {
                string json = streamReader.ReadToEnd();
                this._globalSettings = JsonUtility.FromJson<TGlobalSettings>(json);
            }
        }
    }
}```
knotty tapir
#

double negatives

rain cedar
#

Yeah, I'm assuming that's a result of this having been put through a compiler and a decompiler

#

I'd give you better code but wyza hasn't pushed this to the github yet

knotty tapir
#

imma get some food and think

#

this is code from the API or from the mod

rain cedar
#

This is API stuff

rotund karma
#

i honestly cannot get this debug mod to work

#

im probably like retarded or something

rain cedar
#

You installed the mod API, right?

rotund karma
#

yes

#

its the only folder you can download

rain cedar
#

What?

rotund karma
#

all downloaded

#

did it like 3 times

#

api

rain cedar
#

That's not the mod api

rotund karma
#

what the fuck

rain cedar
#

Read the file name

rotund karma
#

[api]

rain cedar
#

Meaning it's a mod that uses the api

rotund karma
#

w h a t

#

how do i get the mod api then

rain cedar
#

Same google drive folder

rotund karma
#

o h

#

alright the csharp is replaced

#

now to try it again

#

YES

#

ME LIKEY

knotty tapir
#

it can't be the function's fault then cause all it does is read, it looks like

#

what happens if you, say, comment out the write function? what happens if you uninstall the API?

#

like you have a functioning file and you /* out SaveGlobalSettings() in the API

#

does the file still get wiped?

rain cedar
#

The only time I'm calling save is game quit

#

I don't think the file gets wiped immediately on game load, just no settings are loaded

#

So it's wiped when I save on game quit

knotty tapir
#

but you do see "Loading Global Settings"?

#

per the load() function

rain cedar
#

You're right, I don't actually see that

#

So it's failing the check for the file existing somehow

knotty tapir
#

well you can always put another line outside the if

#

that way you can tell if it's the filecheck fail or the function not getting called

rain cedar
#

I can't, actually

#

Something wyza has done makes dnspy fail to compile literally any change to the dll

knotty tapir
#

!

rain cedar
#

And he hasn't pushed these changes to github

knotty tapir
#

can you not do System.IO.File.Exists(this._globalSettingsFilename); in your mod

#

like base.log(System.IO.File.Exists(this._globalSettingsFilename));

rain cedar
#

Yeah, I'll try that

#

Yeah it passes the check

knotty tapir
#

when you do load() at any arbitrary time does it successfully load the stuff in the file into memory?

#

if it does then i think it has to do with the specific time you call load(), maybe. like try a 10 second delay, then load() and see if that works

rain cedar
#

I don't ever call load though

#
public override void Initialize()
{
    this.LoadGlobalSettings();
    base.Initialize();
}```
#

base.Initialize() is the entry point for my code

#

I just added my own call to LoadGlobalSettings immediately in Initialize and it worked, so I guess that doesn't do what it's supposed to

#

Or maybe I'm just misinterpreting this completely

#

I think the problem is actually in the mod loader code

#

It's checking for Mod and Mod<T>, but not Mod<T1, T2>

#

So I guess instances of Mod<T1, T2> are being initialized as Mod<T>

#

Meaning the full stack of inherited Initialize functions don't run

#

I could also be completely wrong here, though

#

I have basically no experience with class inheritance

knotty tapir
#

i was supposed to learn it properly in my A level class but i kinda forgot about it after the exam because i'm not really a good programmer at heart

#

read: trash

trim nimbus
#

hello

#

are there any hotkeys for debug mode?

#

I installed it but nothing and the readme doesn't tell me what to do with it?

knotty tapir
#

did you install the API as per the readme?

trim nimbus
#

I'm pretty sure I did

knotty tapir
#

if you installed the API correctly, pressing F1 should toggle all menus

#

` for help

trim nimbus
#

so the folder

#

DebugMod should be in Hollow Knight folder

#

or HK/HKdata/Managed/Mods

#

oh

#

I'm also on

#

1.1.1.8

knotty tapir
#

mmm... there might be an old copy of the mod/api kicking around

#

unless you're talking about mod version

trim nimbus
#

I'm playing on 1.1.1.8 hollow knight version

#

downloaded this

knotty tapir
#

there's an old version of the API

#

for 1.1.1.8

trim nimbus
#

oh right

#

I already installed the modding API on a different version

#

so it completely slipped my mind this time round

#

let's see if that works

#

I can't load my save???

knotty tapir
#

whaaaa

trim nimbus
#

tried loading a save

#

and it didn't let me

#

but I can make a new save

knotty tapir
#

ah

#

well

#

when you go to the drive for debug mod

#

on the right there's a bar

#

click Activity, scroll down, there's a 1.1.1.8 mod vsn

#

try that and see if it works

#

as always back up your save first

trim nimbus
#

I don't see anything like that

#

I don't even have a bar to the right

#

nevermind found it

#

ok it works.

#

thank

solemn rivet
#

@rain cedar same thing was happening with mod-specific saves before. They would work fine up until closing and reloading the game, at which point they would reset

#

Wyza had fixed that, dunno how

leaden hedge
#

@buoyant wasp this is how moresaves gets the icons and input states

InputHandler ih = gm.inputHandler;

if ( lastSkinType != uim.uiButtonSkins.GetButtonSkinFor(ih.inputActions.paneLeft).skinType )
{
    MoreSaves.rectLeft.sizeDelta = MoreSaves.rectRight.sizeDelta = uim.uiButtonSkins.GetButtonSkinFor(ih.inputActions.paneLeft).skinType == ButtonSkinType.SQUARE ? buttonKeyboardSquareSize : buttonShoulderSize;

    MoreSaves.imageLeft.sprite = uim.uiButtonSkins.GetButtonSkinFor(ih.inputActions.paneLeft).sprite;
    MoreSaves.imageRight.sprite = uim.uiButtonSkins.GetButtonSkinFor(ih.inputActions.paneRight).sprite;

    MoreSaves.textLeft.text = uim.uiButtonSkins.GetButtonSkinFor(ih.inputActions.paneLeft).symbol;
    MoreSaves.textRight.text = uim.uiButtonSkins.GetButtonSkinFor(ih.inputActions.paneRight).symbol;

    lastSkinType = uim.uiButtonSkins.GetButtonSkinFor(ih.inputActions.paneLeft).skinType;
}

if (ih.inputActions.paneRight.WasPressed ) //key was pressed
#

and if you added a new PlayerActionSet to the modding namespace you could probably do (although I haven't tested it at all)

//this would happen in game init
string keybinds = loadKeyBindsFromFile(fileName);
ModHooks.ModActions.Load(keybinds);
//this would happen on mod init
if( !ModHooks.ModActions.Contains("A Press") ){
    PlayerAction pa = new PlayerAction("A Press", ModHooks.ModActions);
    pa.AddBinding( new KeyBindingSource(Key.A) );
    pa.AddBinding( new DeviceBindingSource(InputControlType.Action1) );
}
//update loop
if (ModHooks.ModActions.GetPlayerActionByName("A Press").WasPressed)
    ModHooks.Logger.Log("A was pressed");
//on quit or save
keybinds = ModHooks.ModActionsSave();
saveKeyBindsToFile(keybinds, fileName);
hazy sentinel
#

@buoyant obsidian Is the max completion percentage for lightbringer not 106% on CP? I only got to 99% and I'm pretty sure I got everything done

#

do the 7 dream warriors not add a percent b/c they respawn?

buoyant obsidian
#

That should be patched after lowercase fangs patch

hazy sentinel
#

ok

surreal helm
#

so how do you install the mod?

#

i downloaded boss rush but i'm not really sure about how to continue

solemn rivet
#

okay

#

first you need to download and install the modding api

#

it's in the google drive as well

#

to install it, just drag and drop whatever is inside the .zip in the root folder of your hollow knight installation

#

also, I don't know if this is common knowledge or not, but it seems the Modding API is not platform-specific

#

I'm playing boss rush on drm-free ver as we speak

hazy sentinel
#

@solemn rivet bonfire mod API version on the GDrive is formatted incorrectly

#

the mod dll is inside a folder named Mod instead of Mods

#

unless that still works for the api and I'm being dumb 🤔

solemn rivet
#

oh

#

thanks verulean

#

yeah, that was a mistake on my part

#

fixed

hazy sentinel
#

do the levels save

solemn rivet
#

from 1.2.2.1-7 onwards, yeah

hazy sentinel
#

hey uhh @solemn rivet

#

i have a hunch this isn't intentional

#

what is this like the 5th bonfire mod break i've done

timber gale
#

I had the same thing I think when i messed around for a bit

hazy sentinel
#

where is my credits mention intenseface

timber gale
#

infinite swing speed balanced/10

hazy sentinel
#

well at least steady body has a use now

solemn rivet
#

how in the hell can you button mash so fast?

#

also, yeah, that's a bug

#

but that a porting bug

hazy sentinel
#

#Justice4Russia

#

also i play on KB

timber gale
#

You can do it on controller too. you just gotta get thicc thumbs

hazy sentinel
#

i use my middle finger for attack

#

that was supposed to be hollowface but it still works

fair rampart
hazy sentinel
#

pogo timing? more like spam attack

fair rampart
#

Exactly

#

i use my pinky finger for attack

#

lol

#

spamming is hard

hazy sentinel
#

my middle/index fingers are probably the easiest for me to spam with

timber gale
#

Thumbs for me

hazy sentinel
#

man you really notice the knockback when you swing infinitely fast

#

hitting fool eaters doesn't knock you back for example

timber gale
#

imo a mod that makes holding down attack spam attack instead of nail arts would be nice, then have another button for nail arts

hazy sentinel
#

fuck storage on a toll doesn't open the gate

#

wasted 50 geo

solemn rivet
hazy sentinel
#

excuse me why would i unbreak the game

solemn rivet
#

because I'm nice and haven't implemented anti-cheese for you

hazy sentinel
#

or you keep forgetting to 🤔

solemn rivet
#

no

#

it's simple

#

I simply count how many relics there are and that give's me a limit to free levels

#

and I add a conditional check for free levelling that checks how many free levels you got versus how many there are

#

and if you try adding more than there should be, it does nothing

#

it's easy

#

but I'm lazy

hazy sentinel
#

yo i counted the relics, there are: 999 wanderer's journals, 999999 hallownest seals, 9999999999 king's idols, and 9999999999999 arcane eggs

solemn rivet
#

and I figure if you really want to break the game, then, by all means, do

#

also, I'm gona remove relics as free levels on a later patch

#

they make the game SOOOO much easier

hazy sentinel
#

wait does a crit parry have a custom animatino hollowwow

#

animation*

solemn rivet
#

it does?

#

:x

hazy sentinel
#

there's like a red ring and small flames

solemn rivet
#

OH

#

shit

hazy sentinel
#

wht

#

what

solemn rivet
#

yeah, that's intended

hazy sentinel
#

"it does?"

solemn rivet
#
if (this.crit)
{
    pd.nailDamage = ls.CritDamage(Settings.DexterityStat, pd.nailDamage);
    PlayMakerFSM.BroadcastEvent("UPDATE NAIL DAMAGE");
    spriteFlash.FlashGrimmflame();
}```
hazy sentinel
#

should the grimmflame effect trigger every hit?

solemn rivet
#

before TGT I had created my very own spriteFlash, but since TGT added a few new ones, I decided I'd just use one of them

#

well, it triggers when you crit - that's why you flash red

hazy sentinel
#

yeah but why is there the red flash when you parry

solemn rivet
#

but I didn't know it interacted with parries

hazy sentinel
#

when does that happen in grimm/NKG fight thinkgrub

solemn rivet
#

dunno

#

try critting while pogoing

#

for science

#

I'm thinking that it has a different interaction for each kind of attack type

hazy sentinel
#

crit pogo is just a black ring

solemn rivet
#

I can fix that, but effort

#

THAT is why I don't fix whatever you find

hazy sentinel
#

what

solemn rivet
#

the game is so much better with those bugs

hazy sentinel
#

also crit slashing while getting hit plays the crit parry animation too

#

there's like a 70% chance I'll parry an attack while spamming

#

knockback from hitting an enemy stops your dash

solemn rivet
#

what do you mean? With sharp shadow?

hazy sentinel
#

no like normal dash

#

if you're dashing and slash an enemy the dash stops

#

so you can dash like

#

half a player width

solemn rivet
#

well

#

not my fault

#

I don't mess with dashes - not on Bonfire at least

hazy sentinel
#

steady body acquired

#

so apparently you can parry contact damage

#

and that's why the flames pop up when you get hit

#

you also don't take damage

#

even though the sound plays

solemn rivet
#

no

#

I looked here

#

that's another API issue

#

those flames are from the "hit resistance"

#

it's somehow getting activated - except it doesn't get activated

#

also, it stopped working completely

#

the hit-resistance, that is

hazy sentinel
#

hm

#

that's weird

solemn rivet
#

the new api is still experimental

#

I'm trying to see if I can fix it

#

also, can you please send me your version of the mod?

#

I wanna take a look at something

hazy sentinel
solemn rivet
#

thanks!

humble sinew
#

hmm
If I want the Lightbringer mod, do I need the launcher?

hazy sentinel
#

no

humble sinew
#

alrighty

#

Manual instal or patch? and which of the most recent versions? one of them says DRM free

buoyant obsidian
#

Moddb has the latest version of Lightbringer

#

Google Hollow Knight Lightbringer mod

solemn rivet
#

drm free is for gog/humble

humble sinew
#

so the top file listed?

#

on Mod DB?

solemn rivet
#

@buoyant wasp getting this while testing Bonfire on newest APIcsharp Unable to move save game to backup file: System.IO.IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path: at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x00000] in <filename unknown>:0 at GameManager.SaveGame (Int32 saveSlot) [0x00000] in <filename unknown>:0

hazy sentinel
#

wtf

#

healing broke

#

i literally cannot heal

humble sinew
#

alright so do I put the mod in manually or is it automatically forwarded to where it needs to be?

solemn rivet
#

yeah, newest API broke a lot of things

hazy sentinel
solemn rivet
#

get rekt

#

the only real way to play is Glass Soul Steel Soul

humble sinew
#

Where do I put the Lightbringer file?

#

or is it compatible with Mac

buoyant wasp
#

jeeze, i got to sleep and come back to 100 million messages

humble sinew
#

does anyone know if I need the API for Lightbringer?

buoyant wasp
#

lightbringer is not an api mod, no

humble sinew
#

where do I put it in the files?

buoyant wasp
#

in fact, lightbringer basically uninstalls the api mod

humble sinew
#

oh ok

#

still

#

I have no idea where to put this

buoyant wasp
#

you install it just like every other mod i believe, pretty sure it's just a folder you drop into the HK install folder

humble sinew
#

the what

buoyant wasp
#

is your game from steam?

humble sinew
#

yes

#

its also a Mac version

buoyant wasp
#

oh

#

idk then, would have to ask @buoyant obsidian if there is a mac version

#

because the dll's are different between PC and Mac

solemn rivet
#

wyza, there were a few issues with the new api ver

buoyant wasp
#

i saw

#

global settings are broken

#

something weird about slashing?

humble sinew
#

so I guess I delete the Lightpringer.zip

solemn rivet
#

I took a look at the way TakeDamageHook is set up and how you redefined the TakeDamage method and, theoretically, moving the hook from AfterTakeDamageHook to TakeDamageHook should work

#

afaik, the slashing issues were my fault

#

I accidentally set it so your slash speed increases everytime you swing your nail

buoyant wasp
#

ah, cool

#

ok, so

#

oh, i see what happened

#

i was gonna handle the take damage thing differently and forgot

solemn rivet
#

oh

#

still, I have no idea how it doesn't work

#

also, it works on GOG version

#

so that's good

#

the API, I mean

buoyant wasp
#

really?

#

huh, neat

buoyant obsidian
#

@humble sinew No MAC version, sorry

#

unless you wanna buy me a macbook ;)

humble sinew
#

aw

#

crap

buoyant wasp
#

so other than take damage and global settings, anything else broken?

#

dashing is broken?

#

oh, right, yes,

#

sean found that, i fixed it, just hadn't posted it

hazy sentinel
#

what

buoyant wasp
#

as far as the savegame backup file thing goes

#

i'm pretty sure that's a bug in the base game. cause the api isn't changing that part of the behavior

#

i'll see if i can fix it since i'm rewriting the method anyway to put in the stuff

hazy sentinel
#

what about no healing 🤔

buoyant wasp
#

hmm

#

i'll look

#

lol

#

that video is great

#

is healing broken in all mods or just bonfire?

hazy sentinel
#

no idea

#

restarting the game didn't fix it

#

i could try uninstalling bonfire w/ api still on if you want

buoyant wasp
#

nah, i'm gonna test it

#

just figured if you knew it'd save me the 30s

fair rampart
#

Has anyone made a mod that allows you to get your OC ingame yet?

buoyant wasp
#

OC?

leaden hedge
#

original content

buoyant wasp
#

ok, so it works without bonfire, so lemme load up bonfire

fair rampart
#

Lol

#

if noone made such a mod yet i'm happy

buoyant wasp
#

no one has done it not because it can't be done

#

but

#

because it's such a royal pain in the butt to do

#

though we're making progress on some things

#

inventory is going to become fully moddable soon™

#

hmm, nope, healing works fine in bonfire too. at least on the version of the API i'm running

#

lemme package this up and you can try it with the newest version

timber gale
#

Is there a way to easily replace textures?

#

So if you wanted to just replace the MC textures you could get your character in game?

buoyant wasp
#

spritesheets, yes, but it's manual. (and the sheet is randomly reorganized every time a new release comes out). I think @leaden hedge said you could define a new spritesheet and replace the call to that instead

hazy sentinel
#

the easy way is called replacing every sprite by hand

buoyant wasp
#

753 was hand changing it for every lightbringer release

#

which sucks

#

as far as level assets, idk we've tried that

leaden hedge
#

you'd have to create a spritesheet, and create animations which match the original ones in length and no. frames

#

level assets would be way easier to change because they're generally not animated

buoyant wasp
#

Modding API 1.2.2.1-14 (ALPHA). Fixes the save game backup error message (though I am pretty sure this is a vanilla bug). Fixes dashing being broken if you have a hook on dash. Fixes The TakeDamage hook so bonfire resilience should work.

#

@solemn rivet - btw, we added some helpers in the newest version for the settings which should reduce alot of that boilerplate you had for handling settings.

#

instead of

        public int StrengthStat
        {
            get => IntValues.ContainsKey(nameof(StrengthStat)) ? IntValues[nameof(StrengthStat)] : 1;
            set
            {
                if (IntValues.ContainsKey(nameof(StrengthStat)))
                    IntValues[nameof(StrengthStat)] = value;
                else
                    IntValues.Add(nameof(StrengthStat), value);
            }
        }

you can do

        public int StrengthStat { get => GetInt(1);  set => SetInt(value); }
#

where the 1 above is the default value to return if StrengthStat had never been set

hazy sentinel
#

healing's still broken

buoyant wasp
#

what version of bonfire are you on?

hazy sentinel
#

uhh the one in the drive

buoyant wasp
#

k

hazy sentinel
#

maybe INT -> focus cost messed something up

solemn rivet
#

could be that

hazy sentinel
#

i also don't get the extra masks from resilience stat anymore

buoyant wasp
#

also

#

the drive folder is wrong

solemn rivet
#

in bonfire there's code that changes the StartMPDrain method

#

maybe that's not working on the newest API?

hazy sentinel
#

RES is at 5 but i don't get the 4 lifeblood HP when i rest thinkgrub

buoyant wasp
#

what do i need to do to make that take affect, cause at least starting out, i can go get hit, then heal and it works, so i'm guessing i have to put a point into something?

hazy sentinel
#

bonfire mod is trying to kill me

solemn rivet
#

I added a check

#
if (verulean_is_playing)
dont_work;```
hazy sentinel
#

also i got to lurien without dream nail kms

solemn rivet
#

fixed gdrive

buoyant wasp
#

idk, i gave myself +1 int

#

and got hit 3 times

#

and healed just fine

hazy sentinel
#

my int is at 21 but ok

buoyant wasp
#

can you send me the save file?

hazy sentinel
buoyant wasp
#

danke

#

or...Спасибо ? (based on name/flag)

#

(i just asked google, so, if it's wrong, or you're not russian, then i apologize)

hazy sentinel
#

no that's right

#

google translate is generally ok for one word translations

buoyant wasp
#

yeah, but with complicated languages (like english/russian/japanese) I've seen alot of weird stuff over the years

fair rampart
#

Lol

timber gale
#

Also with languages that have endings like latin it's sometimes impossible for one word translations to be entirely accurate

fair rampart
#

Worst thing is, when someone corrects a word/sentence in google translate but corrects it with accent-specific words

solemn rivet
#

btw, wyza

#

did the level up screen stay for you after leaving the bench?

buoyant wasp
#

nope

solemn rivet
#

oh

#

what version of the mod are you using?

#

because mine seems to stay even after I leave the bench

buoyant wasp
#

drive version

solemn rivet
#

hm...

#

that is so weird

hazy sentinel
#

also geo cost to level up resets to 50 sometimes

solemn rivet
#

for me it's resetting everytime

#

but I also believe it's an API issue, because it was working perfectly on older versions of the API

buoyant wasp
#

you using the version of the API i just posted?

hazy sentinel
#

yes

solemn rivet
#

yup

#

no

#

xD

#

the one before that

hazy sentinel
#

yup no

buoyant wasp
#

so

#

one thing i've noticed is that you have some inconsistencies in your naming

#

@solemn rivet

#
        public int FocusCost() => (int)((float)ls.FocusCost(Settings.IntelligenceStat) / 33f);
#

so that says it uses the intelligence stat

#

but ls says

#
        public int FocusCost(int totalWsdm) => (int)Math.Round(34.0 * Math.Exp(-0.01 * ((double)totalWsdm + 1.0)));
#

so it's using the int stat

#

but you seem to think it's wisdom 😉

#

i don't think that's the root cause

solemn rivet
#

eh

buoyant wasp
#

cause it works out the same

solemn rivet
#

yeah

leaden hedge
#

charms should be almost no grunt work though

#

as its in a neat grid, and theres no conditionals

#

unlike the inventory

buoyant wasp
#

so @solemn rivet - its bonfire's fault

#

for focus cost

solemn rivet
#

what's wrong?

buoyant wasp
#

go here

#
           Console.WriteLine((int)((float)(int)Math.Round(34.0 * Math.Exp(-0.01 * ((double)21 + 1.0))) / 33f));
#

run that

#

you'll see why 😉

#

casting back and forth between int/float/double is causing you to end up with a focus cost modifier of 0

solemn rivet
#

yeah...

hazy sentinel
#

can i be lead breaker now

solemn rivet
#

that whole operation should add up to 33

#

but it's getting 27

#

and hence Round(27/33)=0

buoyant wasp
#

i'm not really sure why the API has the focus cost handler as an int

solemn rivet
#

ROUND(34*EXP(-0.01*(B4+1))) in excel it works fine

buoyant wasp
#

the focus cost in the game is a float

#

so....

#

i think i'm gonna chant it to that

#

it'll break mods that use it, though i think bonfire is literally the only one

solemn rivet
#

wait - 21?

#

I can change it to float

#

makes WAY more sense

#
(float)Math.Round(34.0 * Math.Exp(-0.01 * ((double)21 + 1.0)))/33f```now returns 0.81...
buoyant wasp
#

well, that's better

solemn rivet
#

so yay

buoyant wasp
#

i think i might have messed up blue health

weary oyster
#

can you change your nail tier with the debug tool?

#

its like the only thing i cant find

buoyant wasp
#

ah, yes, i know why blue health is broken

solemn rivet
#
  • and = iirc Ax2u
#

@weary oyster

buoyant wasp
#

it lives!

#

k, fixed blue health and updated the focus hook to float, now fixing global settings

weary oyster
#

@solemn rivet oh yea you can change the nail dmg with those, the nail still stays at the same tier though 🤔

leaden hedge
#

yes

#

the nail "upgrades" is just visual

weary oyster
#

how much dmg does each upgrade add

#

4?

leaden hedge
#

4

weary oyster
#

alright thanks

solemn rivet
#

k, am back

buoyant wasp
#

Modding API 1.2.2.1-15(BETA) - Fixes blue health not being calculated right with the hook. Changes the focus hook to float from int. Fixes auto loading of global settings on the Mod class instantiation.

delicate finch
#

there's no mod to replay specific bosses right?

solemn rivet
#

you can use debug for that

delicate finch
#

@solemn rivet any documentation on that?

solemn rivet
#

there's a pretty nifty readme

buoyant wasp
#

it's also fairly straightforward

#

Pause->Bosses->click boss you want to respawn->exit/enter room->profit

solemn rivet
#

also, I may ask Sean that later, but why is there no cursor when the overlay is active? Or even an option for that?

#

just so you don't need to pause

buoyant wasp
#

it's cause of how the game handles cursors when not in pause mode

solemn rivet
#

you mean the constant check for isPaused?

solemn rivet
#

wait, we have overriden that with bonfire, have we not?

buoyant wasp
#

i couldn't remember if the pause check

#

was before or after the hook

#

it's after

#

so I don't see why you couldn't have it show even when the game is playing

solemn rivet
#

also, iirc you changed the InputHandler.OnGUI() method to behave as it used to (instead of locking the cursor)

buoyant wasp
#

yup

#

that's the 2nd link

#

where we just flat out replaced it

solemn rivet
#

yeah

#

dunno why TC did that tbh

buoyant wasp
#

kdt said the old way is depreciated, so at some point we might have to do something else, but for now, it still works hollowknice

solemn rivet
#

oh

#

there should be an equivalent which doesn't lock the cursor, I assume

#

anyway

#

I'll ask Sean later

buoyant wasp
#

there isn't

#

there are 3 options

#

Locked, Constrained, None

#

Constrained sort of does what the old one did

#

in that you can move around within the game

#

but you can't leave the window

solemn rivet
#

that... Sucks

buoyant wasp
#

None hides it

solemn rivet
#

oh

buoyant wasp
#

and locked hides it

#

but puts it in the center while it hides it

solemn rivet
#

so, why is None bad?

buoyant wasp
#

cause even when you pause, it's still hidden, you have to go back and override visible again (which is depreciated). they need a 4th state

#

basically it removed the ability to have an unconstrained visible cursor

#

i can't begin to fathom why

solemn rivet
#

oh

#

yeah, I thought those 3 were "options to hide the cursor"

buoyant wasp
#

no, those are the 3 cursor options, period

solemn rivet
#

and that there were also "visible" states as opposed to those

#

ffs

#

that's stupid

buoyant wasp
#

yup

#

but in any case, your idea for debug mod is doable i think. it'd just be up to him to code it

solemn rivet
#

I mean, it's not entirely needed

#

it makes actual sense to only change things on pause

#

but, on the other hand, it's not bad either to have the option to change things on the fly

#

so, @rain cedar , what do you think about this?

buoyant wasp
#

(This being an option to show the cursor in debug mode when the game is not paused)

#

since we digressed like 30 lines there

solemn rivet
#

heh, fair point

#

but yeah, not necessarily as the default, but to add that option, like a "show cursor" key

buoyant wasp
#

@leaden hedge your canvasutil changed at all with all your work in inventory replacement?

leaden hedge
#

yes

buoyant wasp
#

heh, k, i'm just gonna wait to put it in the API until you're done fiddling with this project

solemn rivet
#

KDT - the hero we need and maybe deserve

#

okay, gonna test bonfire with newest api

#

okay, gonna test bonfire with newest api

hazy sentinel
#

healing still doesn't work 🤔

solemn rivet
#

Wyza, so csharp public int StrengthStat { get => GetInt(1); set => SetInt(value); } means that if not set, StrengthStat will be set to 1, correct?

solemn rivet
#

weird

#

for me, level up screen stays up at all times

buoyant wasp
#

correct (on the strength thing)

solemn rivet
#

got it

buoyant wasp
#

it works for string/float/bool too

solemn rivet
#

redid every field to be like that

#

also, on Steam, blue masks do no work, weirdly

buoyant wasp
#

even with v-15?

hazy sentinel
#

blue HP is working for me now

buoyant wasp
#

cause i tested blue masks on the save i got from Verulean and they showed up

hazy sentinel
#

ye

solemn rivet
#

maybe I didn't replace steam's assembly.dll

buoyant wasp
#

k, so the dll you just posted does have the level issue, which is interesting because the drive folder version does not have that issue

solemn rivet
#

oh, it works now

#

yeah

#

what's weird is that I changed a lot of stuff

#

but I didn't touch the if for showing the GUI

hazy sentinel
#

also i think enemy HP scaling is broken

buoyant wasp
#

well, i gotta head out for an hour or so, but if you haven't solved it before i get back i will take a look

solemn rivet
#

it is, verulean, by the same reason the geo per level is broken

#
  at Modding.ModHooks.OnFocusCost () [0x00000] in <filename unknown>:0 
  at HeroController.StartMPDrain (Single time) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at HutongGames.PlayMaker.Actions.CallMethodProper.DoMethodCall () [0x00000] in <filename unknown>:0```eh
#

ok, the issue is with the PlayerData.atBench

#

I started a new save and the level up screen simply does not show at all

solemn rivet
#

I've confirmed that the issue is with atBench

ornate rivet
#

does Sly's spritesheet actually have proof that we were meant to fight him

hazy sentinel
#

no

ornate rivet
#

ok good

solemn rivet
#

I think I got it

#

eh

#

maybe the issue is getting the PlayerData reference?

#

because I can't even add levels, even though I have more than enough geo

#

okay

#

I changed all PlayerData.instance.atBench (including the cursor hook) for HeroController.instance.cState.nearBench, and everything works

#

okay, I give up

buoyant wasp
#

when you fire up the game, what version of the API does it show?

#

@solemn rivet

#

where are you seeing that error?

solemn rivet
#

-15

#

output_log

buoyant wasp
#

and you changed your hook call to use the float right?

solemn rivet
#

yup

#

I've pushed my most up-to-date version to git, if you wanna take a look

#

seems like anything at all related to atBench is not working for me

buoyant wasp
#

ah, ok, well, i know why focus was broken

#

that i can fix

solemn rivet
#

the thing is

#

focus worked fine for me

#

it seems that atBench is not working and the hit resistance is also not working

#

aside from that, everything seems fine

buoyant wasp
#

yeah, something odd with atBench, it's always true

solemn rivet
#

wut

#

😮

#

I only just thought of printing out atBench

#

wait

#

the new api adds an orig_SetupNewPlayerData iirc

#

and SetupNewPlayerData sets atBench = false

#

so maybe... Something wrong with that hook?

#

even if it was, it should update when you leave a bench

#

also, when starting a new file the level up screen would not show when sitting at a bench

#

so I assume in that case atBench was always false

buoyant wasp
#

all the orig_SetupNewPlayerData does is let me rename the original. (basically it's a cheap way to prefix or append calls to modhooks without having to rewrite the function

#

but there definitely is something odd there

#

hmm, gonna try something

solemn rivet
#

I know

#

my guess is that somehow the call from the new SetupNPD to the original one isn't working, or something

buoyant wasp
#

dunno. I found it curious how often that method was being called, but i just fired up a completely vanilla install and it's called a ton there too

#

when i looked into it last night, the weird thing was was that the constructor's stack trace just ended at ctor

#

it didn't say what constructed it

#

you messing with FSMs at all in your mod?

#

i figured out how to get a more complete stack trace

#

and this is what i found

#
SetupNewPlayerData() PlayerData:SetupNewPlayerData()
PlayerData:.ctor()
UnityEngine.Object:INTERNAL_CALL_Internal_InstantiateSingle(Object, Vector3&, Quaternion&)
UnityEngine.Object:Internal_InstantiateSingle(Object, Vector3, Quaternion)
UnityEngine.Object:Instantiate(Object, Vector3, Quaternion)
HutongGames.PlayMaker.Actions.CreateObject:OnEnter()
HutongGames.PlayMaker.FsmState:ActivateActions(Int32)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:UpdateState(FsmState)
HutongGames.PlayMaker.Fsm:Update()
PlayMakerFSM:Update()
#

and i see that. ALOT

rotund karma
#

@rain cedar the debug mods health bars and auto scan are helpful for trial of the fool thanks

#

dont worry im not using anything else this is my good save

solemn rivet
#

Wyza: only in two instances - calculating spell damage and looking for inventory

buoyant wasp
#

yeah, i'm looking through it now. i think i have the bench thing figured out...maybe

buoyant wasp
#

it's amazing this game runs at all, i swear

#

the setup new player data hook is basically useless for now

#

or...hmmm

#

i think i have an idea on how to "fix" it

solemn rivet
#

Oh?

buoyant wasp
#

so, for reasons I can't begin to explain

#

anytime FSM has certain things set

#

it goes an constructs a new PlayerData

#

but it doesn't do it using PlayerData.Instance

#

so, i'm going to make a delegate that is only assigned when the instance property is used to create the instance

#

when FSM goes and creates this random playerdata that is never used, it won't subscribe to that event

#

but when the new game/load game runs, it will

#

it's stupid, but, not much for it. otherwise we get that thing where the hook is called 20 times

buoyant wasp
#

nope, for now i'm just going to have to mark this as obsolete. it's just called too often. if TC ever fixes it so the FSM's don't instantiate 20 instances of player data, then...something

#

@solemn rivet - how do i test hit resistence?

#

like, how should it work?

buoyant wasp
#

nvm, figured it out. just had to change a few things.

#

1.2.2.1-17 (BETA) - Fixes a bug FocusCostHook. Obsoletes SetupNewPlayerData. It just doesn't work right at the moment.

buoyant wasp
#

@rain cedar - dunno if you saw, but I'm pretty sure i have global settings properly saving/loading now (and in the right directory)

rain cedar
#

Thanks

scarlet monolith
#

Hi.

buoyant wasp
#

hello

buoyant obsidian
#

Howdy

scarlet monolith
#

what is a mod

buoyant obsidian
#

It's a modification to the game you can install that changes some aspect of it

#

for example, the Glass Soul mod makes it so you die in one hit

scarlet monolith
#

I know

#

I was joking.

leaden hedge
#

What is a mod? A miserable little pile of code!

buoyant obsidian
#

Here's the first game I ever made for anyone who wants to try it out

#

it's a fairly challenging platformer with some puzzle elements

#

and it'll piss you off

leaden hedge
#

753 more like 75 shill

buoyant obsidian
#

come on man you act like you don't like random .exe's

buoyant wasp
#

@rain cedar or @leaden hedge - Should the ExampleMod Projects be part of the API repository? (not the distrobuted API, but the git repo)

#

i think yes....so i'm gonna do it 😛

buoyant wasp
#

in general, you should be able to copy/paste the steps out of the example mod into your mod and it "just work" though if you need help with it, let me know. If you aren't familiar with msbuild steps, some of it can be a little arcane

#

I think, at this point, the only thing really left is hopefully getting the monomod bug fixed that requires the 1 small manual step after the API is built. Fleshing out the documentation a bit better (and theming the pages better). And that's nearly it. once @leaden hedge is done with giving us the glorious helpers for UI stuff we'll add that. but at this point I think the API can finally calm down some. I've done a rando run on the current version and it works as far as i can tell. still need to do a bossrush run or 2.

buoyant wasp
#

@leaden hedge - Another thing on bossrush. It'd be nice if the pause screen was drawn over the boss selection grid rather than under it (if thats even possible)

leaden hedge
#

probably not

timber gale
#

Oh well. It gets annoying if the mod gets fucked because if that happens you have to alt+f4 instead of quitting to menu

buoyant wasp
#

yeah, but my guess is that there isn't a layer between the pause menu and the game that can be easily injected into

leaden hedge
#

canvases just get drawn in the order they are created

#

and I'm sure you can use the menu from memory

buoyant wasp
#

yeah, you can pause then press down twice

#

between that and figuring out how to fix dream fades and/or boss drops. i'd take the latter hollowstare

deep scroll
#

hey evreybody, I wanted to try out the randomizer mod for hollow knight. I just have a few questions about it

buoyant obsidian
#

What do you want to know?

deep scroll
#

Will it delete my files I played in the normal game?

buoyant obsidian
#

I'm like 99% sure no, just start a new file and enjoy.

#

If you're scared you can back up your save files which is always a good idea, but you probably don't need to

leaden hedge
#

you dont

deep scroll
#

yeah, what I want to do is keep 3 normal files, and then have one for the randomizer, then when I'm done with randomizer go back to my other 3

#

after deactivating the mod of course

leaden hedge
#

you select if you want to play randomizer

buoyant obsidian
#

Yeah just download randomizer now

leaden hedge
#

when you make a save

deep scroll
#

oooohhhhh

leaden hedge
#

also moresaves lets you have multiple pages

deep scroll
#

that's awesome, thanks

leaden hedge
#

so you can have more than 4

deep scroll
#

I'm at the google drive that has all the mods and I can't find moresaves. Is it not there?

#

oh nevermind there it is haha

#

@leaden hedge thanks for making such great mods for players to enjoy. I've been having a ton of fun with Boss Rush and moresaves sounds really efficient.

hazy sentinel
#

@КDT thanks for making such great mods for players to enjoy. I've been having a ton of fun with NGG and Player Data Tracker sounds really efficient.

leaden hedge
#

PDT is cool though FeelsBadMan

#

without it we wouldn't have cool stream overlays hollowface

buoyant obsidian
#

atKDT thanks for making such great telling me how to do confusing stuff in code

leaden hedge
#

thats a really nice sentence

#

thanks

copper nacelle
#

actually though @leaden hedge moresaves is amazing

#

thanks for making it

leaden hedge
#

its only like 50 lines of code hollowface

#

don't know why its not in base game tbh

copper nacelle
#

it should be in base game

#

it's still amazing tho

hazy sentinel
#

how many save slots are added

buoyant wasp
#

infinite

leaden hedge
#

effectively

hazy sentinel
#

dank

buoyant wasp
#

you'd be limited by windows limits

leaden hedge
#

technically theres a cap due to hdd space and the size of ints

buoyant wasp
#

i'm pretty sure there is a smaller limit to the number of files between that and an int

hazy sentinel
#

moresaves windows mod when

leaden hedge
#

I dunno what the upper limit is, and I really don't feel like making 8b saves to find out

buoyant wasp
#

oh, i was wrong, they upped it

#

file count is an unsigned int

leaden hedge
#

on a per folder basis?

buoyant wasp
#

yeah

#

actually no

#

period

#

per disk

#

is unsigned

leaden hedge
#

well I could still technically get 8.5b saves hollowface

#

I'd actually have to code something to get that to work if someone got close

buoyant wasp
#

though with more saves, we really need to find a way to label them

leaden hedge
#

if you can put an array of loaded mods into SaveGameData or whatever its called

#

I can probably put text up when you select them

buoyant wasp
#

i can do that

leaden hedge
#

let me actually look at dnspy one second

buoyant wasp
#

I'd love to have the option to name them too. (I can easily add that as well)

leaden hedge
#

hmm, returning it as part of SaveStats

#

which reads from SaveGameData

#

its just what actually gets returned

buoyant wasp
#

which i modify automatically 😃

#

oh, i see, hmm

leaden hedge
#

well UIManager.slotOne.saveStats exists

#

its private but nothing a bit of reflection won't solve hollowface

buoyant wasp
#

well, the big thing is that you need to have savestats have the values we want in them right?

#

so you need the dictionary

#

of mods

#

(and i think their version#)

leaden hedge
#

yeah, technically you could just put them in the save, and I could parse

#

but that'd be slower than just putting them into savestats when its parsed by the save select anyway

buoyant wasp
#

yeah

#

k

#

almost have it

leaden hedge
#

as for labels: can replace the region text i.e. BLACK EGG or DIRTMOUTH
and instead of listing all mods installed, could just have a few icons
❗ = missing mods
❓ = different mod versions
🇻 = vanilla save
✅ = matching mods
then instead of listing them all, just list the error on hover

buoyant wasp
#

well, lets see if this blows up....

buoyant obsidian
#

I'm not 100% sure what y'all are trying to do but you can use the ghostcoins variable in playerData if you want a variable to define what your save file is for

#

ex: 122145 ghostcoins would be mod 45 on 1.2.2.1 or something

leaden hedge
#

api has stuff to save additional stuff into saves

buoyant obsidian
#

oh

#

ignore me than :P

#

wasn't sure if you could put stuff in saves without hurting vanilla

leaden hedge
#

I mean I figured out how to add stuff to the save way before the api

buoyant wasp
#
    [MonoModPatch("global::SaveStats")]
    public class SaveStats : global::SaveStats
    {
        public Dictionary<string, string> LoadedMods { get; set; }
        public string Name { get; set; }
   }
#

@leaden hedge

rotund karma
#

@leaden hedge will you be updating boss rush to 1.2.2.1

buoyant wasp
#

it already works on 1.2.2.1

rotund karma
#

oh ok

#

last i checked it was like 1.1.4.9 or something

buoyant wasp
#

heck, it wasn't even written until 1.2.2.1

#

there was an old boss rush

#

by another modder

rotund karma
#

oh

buoyant wasp
#

some stuff happened

#

and it went away

rotund karma
#

thank you for this information

rain cedar
#

1.1.4.9 best version