#archived-modding-development

1 messages ยท Page 48 of 1

rain cedar
#

It's winter

solemn rivet
#

how's the on-screen debug going?

leaden hedge
#

wyza is working on it rn

#

for the console

buoyant wasp
#

do i need to set DontDestroyOnLoad for CreateTextPanel?

#

hmm

#

well

#

it's a start

copper nacelle
#

beautiful

solemn rivet
#

what are you writing exactly? Everything in modlog?

buoyant wasp
#

basically

solemn rivet
#

hmm

buoyant wasp
#

that way you can do logging

#

and have it show up while working on coding

#

it's an in-game tail

#

basically

solemn rivet
#

yeah

#

that's nice

#

better than keeping it open in n++

buoyant wasp
#

indeed

copper nacelle
#

better than re-opening it every 10 seconds in notepad

buoyant wasp
#

or that

solemn rivet
#

it would also be useful to include relevant logs from output_log

#

but I guess that'd be too hard

buoyant wasp
#

"relevant"

solemn rivet
#

because more it's mostly garbage

copper nacelle
#

relevant

#

more like

#

FSM not processed

solemn rivet
#

yeah

buoyant wasp
#

just put try/catch around anything that fails so that you can always log it to modlog ๐Ÿ˜›

solemn rivet
#

god, no

#

that'd be awful

#

I can just try not to suck

#

and fail miserably at it

#

and put try/catch around stuff till it doesn't break anymore

buoyant wasp
#

doing this, i finally have a reason to put a try/catch around all the hook calls

rain cedar
#

That's not how you're meant to use try/catch, though

#

Clearly you're meant to have purposeful exceptions to use them as control flow

buoyant wasp
#

yeah, catching is for unhandled exceptions

#

๐Ÿ˜›

#

@leaden hedge - One thing is that textpanel doesn't seem to show until you are actually in game, any chance to make it show in the main menu?

leaden hedge
#

it should show in main menu

buoyant wasp
#

yeah, not sure why, but it doesn't. also the Start() method on the behavior doesn't seem to start until much later than I expected. Like, all of the mods finish loading before it starts

#

but i know that the GameObject code is getting called because i log when it tries to add text and when it starts

vagrant leaf
#

i just found a really weird bug with blackmoth

#

whenever you switch charms the dash damage is weakened significantly

solemn rivet
#

oh god

#

do people still play that?

hazy sentinel
#

blackmoth is just a giant pile of unfixed bugs

solemn rivet
#

^ tru dat

#

which version you playing, Banana?

#

API version?

vagrant leaf
#

yep

solemn rivet
#

eh

#

can you send me your modlog.txt?

leaden hedge
#

start should trigger the frame after component is created iirc

vagrant leaf
#

where is that located

#

the modlog

leaden hedge
#

save folder

solemn rivet
#

save folder iirc

buoyant wasp
#

save folder path is pinned

#

btw

vagrant leaf
#

oh

#

i just deleted the save

#

i was gonna make a new save

#

i'll put it here if the bug happens again

buoyant wasp
#

@leaden hedge which RenderMode should i be using?

leaden hedge
#

sso

buoyant wasp
#

k, that's what i have

solemn rivet
#

did you delete the whole folder?

vagrant leaf
#

no i deleted the save in game

leaden hedge
#

but yeah that behaviour isnt canvas util

#

something else weird is going on

solemn rivet
#

it shouldn't matter

buoyant wasp
#

i suppose that the "next frame" could very well be after the mods finish loading

solemn rivet
#

unless you closed and reopened the game, it should still be fine

leaden hedge
#

might be

buoyant wasp
#

though, i don't know why it wouldn't show up in the menu

#

cause clearly we have frames at that point

leaden hedge
#

not sure show me your code

buoyant wasp
#
internal class Console : MonoBehaviour
    {
        public static GameObject OverlayCanvas;
        private static GameObject _textPanel;
        private List<string> messages = new List<string>(20);

        public void Start()
        {
            Debug.Log("Console.Start");
            DontDestroyOnLoad(gameObject);

            if (OverlayCanvas == null) { 
                CanvasUtil.CreateFonts();
                OverlayCanvas = CanvasUtil.CreateCanvas(RenderMode.ScreenSpaceOverlay, new Vector2(1920, 1080));
                OverlayCanvas.name = "ModdingApiConsoleLog";
                DontDestroyOnLoad(OverlayCanvas);
                _textPanel = CanvasUtil.CreateTextPanel(OverlayCanvas, string.Empty, 12, TextAnchor.UpperLeft,
                    new CanvasUtil.RectData(new Vector2(1920, 400), new Vector2(200, 680)), false);
                Debug.Log("Overlay Created");
            }
        }

        public void AddText(string message)
        {
            Debug.Log("Attempting to log to console:" + message);

            if (_textPanel != null)
            {
                if (messages.Count > 19)
                    messages.RemoveAt(0);
                messages.Add(message);
                _textPanel.GetComponent<UnityEngine.UI.Text>().text = string.Join(string.Empty, messages.ToArray());
            }
        }
    }
#

and then

#
        private Console _console;

        internal void LogConsole(string message)
        {
            try
            {
                if (GlobalSettings.ShowDebugLogInGame)
                {
                    if (_console == null)
                    {
                        GameObject go = new GameObject();
                        UnityEngine.Object.DontDestroyOnLoad(go);
                        _console = go.AddComponent<Console>();
                    }

                    _console.AddText(message);
                }
            }
            catch (Exception ex)
            {
                Debug.LogException(ex);
            }
        }
#

that's in ModHooks.cs

#

in here you can see that the "Attempting to log to console" message shows up a ton before the "Console.Start" message

leaden hedge
#

odd shouldn't make a real difference though as it wouldn't even update the text until all mods are loaded anyway

buoyant wasp
#

well, mostly cause we have mods that affect the menu (more saves)

#

so it'd be nice to show it there, just don't know why it wants to not show

leaden hedge
#

and without doing any thing it works once you load a save?

buoyant wasp
#

yup

#

also, i pulled canvas util from bossrush

#

so

#

i am assuming that's the most recent

leaden hedge
#

should be the same

buoyant wasp
#

oh, i bet i know what's going on.....hmm, sec

#

nope, was just thinking it wasn't showing cause nothing got logged after it was created, but that isn't it. is there an "after start" method?

rain cedar
#

Maybe awake?

leaden hedge
#

awake gets called whenever it gets enabled

#

I'd just create the canvas after _canvas == null

#

then just give the console class a reference to the canvas you created

buoyant wasp
#

hmm

#

k

#

but doesn't that just move the problem?

leaden hedge
#

actually

#

try doing

#
        public static Sprite createMonoColourSprite(byte[] col)
        {
            Texture2D tex = new Texture2D(1, 1);
            tex.LoadRawTextureData(col);
            tex.Apply();
            return Sprite.Create(tex, new Rect(0, 0, 1, 1), Vector2.zero);
        }

then add an Image to both your canvas and text object

#

so

Image imgCanvas = _canvas.AddComponent<Image>();
imgCanvas.sprite = createMonoColourSprite(new byte[]{ 0xFF, 0xFF, 0xFF, 0xFF} );
#

and your canvas should be white

#

and do the same for text

#

but pick a different colour

#

so you can check its actually being drawn

buoyant wasp
#

k

#

well

#

canvas is definitely getting drawn

#

i'm assuming the first 3 bytes are RGB?

leaden hedge
#

yes

#

RGBA

buoyant wasp
#

Image imgCanvas2 = _textPanel.AddComponent<Image>();
imgCanvas2.sprite = CreateMonoColourSprite(new byte[] { 0xFF, 0x00, 0xFF, 0xFF });

#

that's what i had on the textpanel

#

so it should be a purple block i'd think

leaden hedge
#

it should

#

turn off the canvas one

buoyant wasp
#

yeah

leaden hedge
#

canvas might not get lined up correctly because you're not actually supposed to render stuff on that layer

buoyant wasp
#

hmm, textpanel doesn't seem to like that, it doesn't change anything

#
public static Sprite CreateMonoColourSprite(byte[] col)
        {
            Texture2D tex = new Texture2D(1, 1);
            tex.LoadRawTextureData(col);
            tex.Apply();
            return Sprite.Create(tex, new Rect(0, 0, 1, 1), Vector2.zero);
        }

        public void Start()
        {
            Debug.Log("Console.Start");
            DontDestroyOnLoad(gameObject);

            if (OverlayCanvas == null) { 
                CanvasUtil.CreateFonts();
                OverlayCanvas = CanvasUtil.CreateCanvas(RenderMode.ScreenSpaceOverlay, new Vector2(1920, 1080));
                OverlayCanvas.name = "ModdingApiConsoleLog";
                //Image imgCanvas = OverlayCanvas.AddComponent<Image>();
                //imgCanvas.sprite = CreateMonoColourSprite(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF });
                DontDestroyOnLoad(OverlayCanvas);
                _textPanel = CanvasUtil.CreateTextPanel(OverlayCanvas, string.Join(string.Empty, messages.ToArray()), 12, TextAnchor.UpperLeft,
                    new CanvasUtil.RectData(new Vector2(1920, 400), new Vector2(0, -400)), false);
                Image imgCanvas2 = _textPanel.AddComponent<Image>();
                imgCanvas2.sprite = CreateMonoColourSprite(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF });
                Debug.Log("Overlay Created");
                
            }
        }
pearl sentinel
#

oh sweet

#

i been fighting with trying to load asset bundles this weekend

#

looks like that's coming along nicely though

buoyant wasp
#

getting there ๐Ÿ˜‰

pearl sentinel
#

๐Ÿ˜„

leaden hedge
#

_textPanel = CanvasUtil.CreateTextPanel(OverlayCanvas, string.Join(string.Empty, messages.ToArray()), 12, TextAnchor.UpperLeft,
new CanvasUtil.RectData(new Vector2(1920, 400), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0)), false);

maybe

#

infact

#

_textPanel = CanvasUtil.CreateTextPanel(OverlayCanvas, string.Join(string.Empty, messages.ToArray()), 12, TextAnchor.UpperLeft,
new CanvasUtil.RectData(new Vector2(0, 400), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1, 0)), false);

buoyant wasp
#

testing

#

nope, oh, i see why the background doesn't work

#

Can't add 'Image' to New Game Object because a 'Text' is already added to the game object!
A GameObject can only contain one 'Graphic' component.

leaden hedge
#

oh

#

disable it for a second hollowface

#

also

internal class Console : MonoBehaviour
    {
        public static GameObject OverlayCanvas;
        private static GameObject _textPanel;
        private List<string> messages = new List<string>(20);

        public void Start()
        {
            Debug.Log("Console.Start");
            DontDestroyOnLoad(gameObject);

            if (OverlayCanvas == null) { 
                CanvasUtil.CreateFonts();
                OverlayCanvas = CanvasUtil.CreateCanvas(RenderMode.ScreenSpaceOverlay, new Vector2(1920, 1080));
                OverlayCanvas.name = "ModdingApiConsoleLog";
                DontDestroyOnLoad(OverlayCanvas);
                _textPanel = CanvasUtil.CreateTextPanel(OverlayCanvas, string.Empty, 12, TextAnchor.UpperLeft,
                    new CanvasUtil.RectData(new Vector2(1920, 400), new Vector2(200, 680)), false);
           _textPanel.GetComponent<UnityEngine.UI.Text>().text = string.Join(string.Empty, messages.ToArray());
                Debug.Log("Overlay Created");
            }
        }

        public void AddText(string message)
        {
            Debug.Log("Attempting to log to console:" + message);
            if (messages.Count > 19)
                messages.RemoveAt(0);
            messages.Add(message);
            if (_textPanel != null)
            {
                _textPanel.GetComponent<UnityEngine.UI.Text>().text = string.Join(string.Empty, messages.ToArray());
            }
        }
    }
#

wouldn't that fix it not working for stuff logged prior to creation

buoyant wasp
#

yeah, i thought so too, which is why i was attempting to pass in the text to use in the CreateTextPanel, but that wasn't working. I'm wondering if something else isn't afoot there though. going to log the value of messages near Overlay Created to see if perhaps unity is recreating the object when it starts and actually wiping out what was there before

leaden hedge
#

yeah unity is kinda weird sometimes with gui stuff

#

like it'll cache sprites to be put on the gpu until you actually render them when you use OnGUI

#

so if you use lots of sprites it'll just lag like shit

buoyant wasp
#

it's called "helping" right?

#

ok, so yes, it's getting rendered on the menu

#

which means

#

the problem isn't the render

#

it's timing

leaden hedge
#

sounds like, "it's not my problem" ๐Ÿ˜Ž

buoyant wasp
#

this time, that sounds correct ๐Ÿ˜‰

leaden hedge
#

yeah I'd recommend using coloured sprites to check alignment

#

and that stuffs being rendered correctly

buoyant wasp
#

yeah

#

i may enhance canvas util to have an option to have borders

#

on canvases created

leaden hedge
#

its part of unity

#

you just need to set a thing on your sprite and image

#

I think its Image.Type and Sprite.Borders

#

I don't think it worked last I tried though

#

I guess you could easily mimic the behaviour just using anchors

#

not sure on what optimizations sliced sprites do and if that'd make lag

buoyant wasp
#

yay, closer, figured out the timing issue, i was checking to see if the textpanel was created before putting the message onto the list

#

instead of putting the message regardless

#

which is why it wasn't getting added during start

#

now just need to get the vertical alignment right

leaden hedge
#

I fixed that in my post above hollowface

#

also the in-game font is nice in some places

#

but IMO for dev intended tools

#

arial works fine

buoyant wasp
#

i guess i could add an overload to CreateTextPanel that allows font

leaden hedge
#

oh yeah I hardcoded it to either use normal or bold

buoyant wasp
#

there, done

solemn rivet
#

that's actually looking awesome, Wyza! Cheers!

copper nacelle
#

^

buoyant wasp
#

which one of the examples you gave did you say you fixed KDT? we have several versions of _textPanel's assignment

#

floating around

leaden hedge
#

oh not alignment

#

the timing issue

buoyant wasp
#

hah, ok, yeah, we're good there now i think

leaden hedge
#

do

#

TextAnchor.BottomLeft

#

I think its bottom left

buoyant wasp
#

LowerLeft

leaden hedge
#

ye

buoyant wasp
#

now, if i wanna stick a grey background behind it

#

i just create a image canvas, attaching it to the same parent canvas?

#

with the sprite code?

leaden hedge
#

create an image panel, then make the text the child of the image panel

#

well

#

you could make the both under same parent

#

doesn't really matter, just gotta watch sibling order then

buoyant wasp
#

eh, if the best way is just do do nested children, i don't care really ๐Ÿ˜ƒ

leaden hedge
#

yeah deeper objects get rendered ontop of shallower objects

#

and its much easier to sort things via depth instead of sibling order

#

gotta keep an eye on your rect though

#

because your anchors and sizeDelta are based off your immediate parent

buoyant wasp
#

hmm

#

so i'm guessing I have the size or position or both wrong here

#
            if (OverlayCanvas == null) { 
                CanvasUtil.CreateFonts();
                OverlayCanvas = CanvasUtil.CreateCanvas(RenderMode.ScreenSpaceOverlay, new Vector2(1920, 1080));
                OverlayCanvas.name = "ModdingApiConsoleLog";
                DontDestroyOnLoad(OverlayCanvas);

                GameObject background = CanvasUtil.CreateImagePanel(OverlayCanvas,
                    CreateMonoColourSprite(new byte[] {0x00, 0x00, 0x00, 0xFF}),
                    new CanvasUtil.RectData(new Vector2(0, 500), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1, 0)));

                _textPanel = CanvasUtil.CreateTextPanel(background, string.Join(string.Empty, messages.ToArray()), 12, TextAnchor.LowerLeft,
                    new CanvasUtil.RectData(new Vector2(0, 500), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1, 0)), Arial);


                Debug.Log(string.Join(string.Empty, messages.ToArray()));
                Debug.Log("Overlay Created");
                
            }
#

cause presently i don't see it on the screen anywhere

#

so i'm guessing it's somewhere off the screen

#

what does anchor pivot do?

leaden hedge
#

sets where you rotate it around

#

it also technically sets were you draw from

#

so at 0,0 you'll rotate around BL, 0,1 is TL etc

buoyant wasp
#

so would I want both min and max to be 0,0?

leaden hedge
#

that'd lock it to bottom left

#

for pivot it doesn't matter

#

text panel wants to be min 0,0 max 1,1 which will make it fill parent

#

and sizeDelta wants to be 0,0

buoyant wasp
#

so

#
new CanvasUtil.RectData(new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1, 1))
leaden hedge
#

yeah that'll make something fill its parent

#

you could do like -5, -5 to put 5 pixels of padding

buoyant wasp
#

k

quartz trout
#

Hey @leaden hedge , you know about the Boss Rush bug where the collector stops taking damage?

leaden hedge
#

no

#

I know about the vanilla bug

buoyant wasp
#

^

leaden hedge
#

where collector stops taking damage

quartz trout
#

Lol, okay, I'd only experienced it in boss rush, my bad

buoyant wasp
#

yeah, pretty much everything other than nail can make it happen in vanilla

leaden hedge
#

it happens when you overkill him, or kill him with something that isn't "from" you

buoyant wasp
#

just sneeze on him and it'll happen

quartz trout
#

Ah, strange... any chance of putting in a manual way to restart the fight as a workaround?

leaden hedge
#

its fixed in beta patch so

#

well

#

it was fixed before, and before then

quartz trout
#

Fingers crossed this time's the real one then

leaden hedge
#

I recommend not picking up grimm child, weaversong or dreamshield

#

as those are the main culprits

buoyant wasp
#

and they suck anyway

quartz trout
#

Haha, true. I take weaversong a lot, over like, HP/MP or more useless stuff though

#

and have seen a choice of "grimm child, grimm child and grimm child"

buoyant wasp
#

yeah

#

cause there are 4 levels

#

or 3

#

or whatever

leaden hedge
#

thats gotta be super unlikely

hazy sentinel
#

is level 0 grimmchild an option zote

leaden hedge
#

like at best 1 in 800

#

it is

quartz trout
#

I've seen it 2 times twice, and all 3 once

#

I've played a lot of boss rush <_< Really like the mod, ha

buoyant wasp
#

i'd say i see it probably every 3-4 runs

leaden hedge
#

what 2 grimms ?

#

thats like 1 in 40

#

and you get 26 sets of items

#

so makes sense

buoyant wasp
#

hmm, is black not a viable sprite color?

#

or does it need to be 0x01

#

instead of 0x00

leaden hedge
#

maybe

#

wouldn't surprise me if LoadRawTextureData struggled with 0x00

buoyant wasp
#

weird, 0x01 won't work either

#

RGBA right?

#

or is it ARGB?

leaden hedge
#

should be RGBA

#

the default texture format is 24bit RGBA

#

unless its reading the bytes backwards

#

which honestly

#

wouldn't surprise

#

me

buoyant wasp
#

apparently it's reading it not in that order

#

cause 0xFF, 0x00, 0x00, 0x00 works

#

for solid black

leaden hedge
#

oh ok

#

so its reading them backwards

#

so its probably ABGR

buoyant wasp
#

cause that makes so much sense /s

leaden hedge
#

hey if you push to pc / android

#

all your android sprites will be upside down

buoyant wasp
#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

#

ok, so i have my greyish box

#

but no text

#
if (OverlayCanvas == null) { 
                CanvasUtil.CreateFonts();
                OverlayCanvas = CanvasUtil.CreateCanvas(RenderMode.ScreenSpaceOverlay, new Vector2(1920, 1080));
                OverlayCanvas.name = "ModdingApiConsoleLog";
                DontDestroyOnLoad(OverlayCanvas);

                GameObject background = CanvasUtil.CreateImagePanel(OverlayCanvas,
                    CreateMonoColourSprite(new byte[] { 0x80, 0x00, 0x00, 0x00}),
                    new CanvasUtil.RectData(new Vector2(0, 500), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1, 0), new Vector2(0,0)));

                _textPanel = CanvasUtil.CreateTextPanel(background, string.Join(string.Empty, messages.ToArray()), 12, TextAnchor.LowerLeft,
                    new CanvasUtil.RectData(new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1, 1)), Arial);


                Debug.Log(string.Join(string.Empty, messages.ToArray()));
                Debug.Log("Overlay Created");
                
            }
leaden hedge
#

odd

#

thats not what should happen

#

new CanvasUtil.RectData(new Vector2(0, 500), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1,0)));
should make something that goes from left to right and 500 tall

buoyant wasp
#

i added a pivot to the image panel creation

#

because it was sticking it in the center of the screen

#

center bottom i mean

leaden hedge
#

oh

#

the text might be being rendered off the far left

#

new CanvasUtil.RectData(new Vector2(500, 500), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0,0)));

buoyant wasp
#

is that for imagepanel or textpanel?

leaden hedge
#

image

buoyant wasp
#

k

#

if that made a difference, i can't see it

leaden hedge
#

aight try new CanvasUtil.RectData(new Vector2(500, 500), new Vector2(0, 0), new Vector2(0.5, 0.5), new Vector2(0.5, 0.5), new Vector2(0.5,0.5)));

#

for image

#

gonna watch gdq

buoyant wasp
#

yup

buoyant wasp
#

well, not quite that code, had to add f after the 0.5

solemn rivet
#

that's close enough

leaden hedge
#

alright so text isn't being put off screen

#

draw text panel as image

#

see what it does

wraith ether
#

Hey guys, I'm new here, just stepping in real quick to kindly ask if an established Randomizer has been made yet. Much appreciated ๐Ÿ˜ƒ

copper nacelle
#

yes

buoyant wasp
#

look at the pins

#

for this channel

wraith ether
#

(there's a lot of pins lol)

buoyant wasp
#

there is one that has all the mods listed

#

(the first one)

wraith ether
#

Seanpr & Firzen?

buoyant wasp
#

they are the authors

wraith ether
#

Bless you kind sir

#

thanks much

buoyant wasp
#

mmhmm

solemn rivet
#

have fun

buoyant wasp
#

sigh i'm a derp

#

reason text wasn't showing was cause it couldn't find the arial font

leaden hedge
#

nice

buoyant wasp
#

is it arial lowercase?

leaden hedge
#

not sure

#

it might not even me arial

#

it might be times new roman

buoyant wasp
#

you have a mod where you use it?

leaden hedge
#

Resources.GetBuiltinResource(typeof(Font), "Arial.ttf") as Font

buoyant wasp
#

ah

#

thanks

#

just gotta figure out why the text bounds outside the box

#
                GameObject background = CanvasUtil.CreateImagePanel(OverlayCanvas,
                    CreateMonoColourSprite(new byte[] { 0x80, 0x00, 0x00, 0x00}),
                    new CanvasUtil.RectData(new Vector2(800, 400), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0, 0), new Vector2(0,0)));

                _textPanel = CanvasUtil.CreateTextPanel(background, string.Join(string.Empty, messages.ToArray()), 12, TextAnchor.LowerLeft,
                    new CanvasUtil.RectData(new Vector2(-5, -5), new Vector2(0, 0), new Vector2(0, 0), new Vector2(1, 1)), Arial);
leaden hedge
#

you need to set wrap modes

#

its on the text object

buoyant wasp
copper nacelle
buoyant wasp
#

now just need to have a hotkey to toggle it off

leaden hedge
#

canvas has a canvas group

#

you can set alpha on that

#

and everythings alpha fades with it

buoyant wasp
#

oh neat

#

hmm, can I just add the Update() method to the MonoBehavior to capture the keybind?

sterile meadow
#

Oh shit I havent been paying attention to chat but is that what I think it is?

leaden hedge
#

yes

buoyant wasp
#

cool

leaden hedge
#

you can probably use

        public IEnumerator FadeInCanvasGroup(CanvasGroup cg)
        {
            float loopFailsafe = 0f;
            cg.alpha = 0f;
            cg.gameObject.SetActive(true);
            while (cg.alpha < 1f)
            {
                cg.alpha += Time.unscaledDeltaTime * 3.2f;
                loopFailsafe += Time.unscaledDeltaTime;
                if (cg.alpha >= 0.95f)
                {
                    cg.alpha = 1f;
                    break;
                }
                if (loopFailsafe >= 2f)
                {
                    break;
                }
                yield return null;
            }
            cg.alpha = 1f;
            cg.interactable = true;
            cg.gameObject.SetActive(true);
            yield return null;
            yield break;
        }

        public IEnumerator FadeOutCanvasGroup(CanvasGroup cg)
        {
            float loopFailsafe = 0f;
            cg.interactable = false;
            while (cg.alpha > 0.05f)
            {
                cg.alpha -= Time.unscaledDeltaTime * 3.2f;
                loopFailsafe += Time.unscaledDeltaTime;
                if (cg.alpha <= 0.05f)
                {
                    break;
                }
                if (loopFailsafe >= 2f)
                {
                    break;
                }
                yield return null;
            }
            cg.alpha = 0f;
            cg.gameObject.SetActive(false);
            yield return null;
            yield break;
        }
#

then just do

base.StartCoroutine(this.FadeInCanvasGroup(OverlayCanvas.GetComponent<CanvasGroup>());
buoyant wasp
#

hmm

leaden hedge
#

although not sure what happens if you spam the button then ๐Ÿค”

buoyant wasp
#

in what context is "this"?

#

cause VS says that method does't exist

leaden hedge
#

your monobehaviour

#

that has the above functions

sterile meadow
#

Is there a logic to the randomizer that prevents you from getting softlocked

leaden hedge
#

yes

buoyant wasp
#

not saying it's impossible, but it's definitely difficult to softlock these days

#

most of the known places where it happens have been patched out

rain cedar
#

There's 3 I know of, but 2 of them are just from sitting at benches you have no business sitting at

sterile meadow
#

Sitting at benches ?

rain cedar
#

Yeah, benches

leaden hedge
#

benches that are in a "pit" you can't climb out of

rain cedar
#

Like let's say after hornet you have only crystal heart for movement

#

You use that to get to that hut with quirrel in it

#

Then sit there

#

Don't do that

copper nacelle
#

isn't crystal heart basically dash

rain cedar
#

With dash you wouldn't be stuck

leaden hedge
#

doesn't actually help you if you need to go up aswell

#

even if its a single pixel

copper nacelle
#

ohh

rain cedar
#

I'll start back on mod stuff tomorrow

buoyant wasp
#

well, progress, i can make it fade out, fade in, but then the next time it should fade out, it fades out and instantly fades in

#
public void Update()
        {
            if (Input.GetKeyDown(KeyCode.F10))
            {
                StartCoroutine(_enabled
                    ? CanvasUtil.FadeOutCanvasGroup(OverlayCanvas.GetComponent<CanvasGroup>())
                    : CanvasUtil.FadeInCanvasGroup(OverlayCanvas.GetComponent<CanvasGroup>()));
                _enabled = !enabled;
            }
        }
#

oh, nvm,

#

1.2.2.1-28 Beta - Adds new diagnostic overlay for Modders to use while developing mods. Overlay will print out the same messages that are printed to ModLog.txt in game (tail). To enable Edit ModdingApi.GlobalSettings.json and make "BoolValues" look like this


"BoolValues": {
        "keys": [
            "ShowDebugLogInGame"
        ],
        "values": [
            1
        ]
    }

Overlay visibility can be toggled On/Off using F10.

leaden hedge
#

yeah I put an explanation of how they all work in the AddRectTransform function with examples

#

but they are stuff

buoyant wasp
#

yeah, i still didn't quite understand how size works

leaden hedge
#

so basically the anchors decide how big a "panel" will be

#

so 0.5,0.5 min and 0.5,0.5 max will be 0x0

#

because 0.5-0.5=0, 0*screenWidth = 0

#

then the sizeDelta is added to that

#

to get the final size

#

I guess if you know css
its an absolute positioned div and
anchorMin = left + bottom
anchorMax = right + top
sizeDelta = padding

I don't think css has stuff for offset / pivot

buoyant wasp
#

so it's not size, it's sizedelta

#

i think that's the problem

#

the wording makes you think that you are describing the size itself

leaden hedge
#

you can rename the variable if you want

buoyant wasp
#

if at some point you take the time to figure out how to do scrollable text areas that'd be great to add to the canvas util

pearl sentinel
#

sweet debug log

#

very handy! thank you ๐Ÿ˜ƒ

rose barn
#

@copper nacelle

#

im fking done with your mod

#

shit mod

#

go die

#

i hate you

#

I fking died at 102%

#

played the game 12 hour straight

#

6 hour the next day

#

died to radiance

#

im done

#

going to neck

pearl sentinel
#

thanks again, Wyza ๐Ÿ˜ƒ

#

also, finally got asset bundle loading working in my project

copper nacelle
#

@rose barn sadgrub

rose barn
#

Die

#

I don't like you anymore

buoyant wasp
#

i'm gonna say that is a bit over the top

#

rein it in there buddy

hazy sentinel
#

reign more like rein

buoyant wasp
#

you saw nothing

hazy sentinel
#

I don't have 1000 discord screenshots for nothing

buoyant wasp
#

true

copper nacelle
#

if I add a new variable to player data does it stay set across app instances

buoyant wasp
#

in any case @rose barn - it is unacceptable to tell someone to die, you're welcome to dislike the mod, you're not welcome to indicate harm for the person

#

@copper nacelle - via the API or via dnspy?

copper nacelle
#

API

buoyant wasp
#

you can't really. PlayerData itself isn't mutable in the API. you could, however, add a setting that would get saved across loads

copper nacelle
#

cool

buoyant wasp
#

i think example2 in the source has an example of custom save settings

copper nacelle
#

ooh

#

thanks

buoyant wasp
#

np

#

example 3 also has an example of doing global/non-save-specific settings

fair rampart
#

Alright so

#

im almost 100% sure the debug menu freezes when i start a new save

#

I tested it a few times and that seems to be the cause

buoyant wasp
#

anything in the logs?

copper nacelle
#

was hegemol supposed to be a guardian or something

#

hegemolDefeated is next to lurienDefeated and there's also maskBrokenLurien and maskBrokenHegemol

buoyant wasp
#

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

pearl sentinel
#

Question, is there a way to get all the exits from an area? I see there's something like an entry gate?

#

Could I search a loaded scene for all exit gates?

buoyant wasp
#

there's a ton of weird stuff like that all throughout the code. the naming of the scenes gives you some interesting understanding of what the game used to be like in the alpha days

#

dunno @pearl sentinel

#

@rain cedar or @leaden hedge might know

copper nacelle
#

MegaBeamMiner and Megajelly

#

lol

pearl sentinel
#

Alrighty. Just wondering of there was something obvious in the game manager

#

Before I start digging

rain cedar
#

@pearl sentinel Find all GameObjects containing a TransitionPoint component after loading in

pearl sentinel
#

Excellent. Thanks!

#

Does that include doors into buildings?

rain cedar
#

It does, yeah

pearl sentinel
#

Sweet

copper nacelle
#

does killsFinalBoss/killsHollowKnight increment when you get all endings

#

or only the true ending

rain cedar
#

I would assume killsHollowKnight is for any ending and killsFinalBoss is only true ending

#

Should be easy for you to test

copper nacelle
#

wtf

#

it doesn't go up

#

it goes down

#

I opened the save where I killed HK and the Radiance

#

and both values are set to 0

buoyant obsidian
#

Yeah because that's how they handle journal entries

#

they set it to like 10 tik-tiks so when you hit 0 you've killed 10 tik-tiks and your journal is updated

copper nacelle
#

is there any good way to check for the player getting an ending

#

I was gonna set killsHollowKnight/killsFinalBoss to 0

#

and check for change on both of them

buoyant wasp
#

just check for 0?

copper nacelle
#

wait

#

yeah

#

that'd work

#

that's way easier

#

thanks

buoyant wasp
#

hmm?

copper nacelle
#

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

#

looked cool

#

this is the best one tho

fair rampart
#

Lol

buoyant wasp
#

lol

copper nacelle
#
TypeLoadException: Could not load type '<>c' from assembly 'NewGamePlus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
  at (wrapper delegate-invoke) UnityEngine.Events.UnityAction`2<UnityEngine.SceneManagement.Scene, UnityEngine.SceneManagement.LoadSceneMode>:invoke_void__this___Scene_LoadSceneMode (UnityEng
#

help

buoyant wasp
#

interesting

#

is that the entire error?

copper nacelle
#

no

#

figured it out kinda

#

got rid of the hook

#

UnityEngine.SceneManagement.SceneManager.sceneLoaded += OnSceneLoad;

#

and the error went away

#

which is weird because I was using that exact hook in the same way in HellMod

buoyant wasp
#

most likely, the problem is within OnSceneLoad

copper nacelle
#

i broke the game

#

I used the mod api's sceneChanged

#

and on scene change

#

black screen

buoyant wasp
#

most likely your hook broke something

copper nacelle
#

yeah

buoyant wasp
#

meh, i think I'm going to break down and wrap all the hook calls in the API in try/catch....the only reason i wasn't doing it before was that it didn't make a difference since it'd just log the error to output.txt, but now that we have an on screen display of modlog, i can't see a reason not to do it

copper nacelle
#

nevermind

#

didn't figure it out

#

same error grimm

#

@buoyant wasp do you know how to load the lights in a scene

#

I tried loading a scene onScene change

#

and now the screen is black

#

but I exist

buoyant wasp
#

I know next to nothing about the scenes

copper nacelle
#

darn

buoyant wasp
#

what's the full stack trace you get when you load into a scene? and what does your method that you're calling on change look like?

copper nacelle
#

doing this UnityEngine.SceneManagement.SceneManager.LoadScene("Tutorial_01");

#

on scene load

#

the scene loads fine

#

I got light

#

by killing myself

#

running into some spikes I found caused me to respawn w/ lights on

buoyant wasp
#

oh, i have no idea what effect you would have by loading scenes manually

copper nacelle
#

figured it out

#

GameManager.instance.LoadFirstScene();

#

ez

pearl sentinel
#

I've done a bunch with manual scene loading. It does tend to leave things in a janky state but if you load the scenes additively and then unload them things sometimes remain unchanged. That's how I load all the enemy types in for my enemy randomizer

buoyant wasp
#

really need to figure out how to load stuff like that without loading the entire scene

pearl sentinel
#

Problem is that the enemies are only raw game objects that exist in the scene.

#

No enemy prefabs in the game, as far as I was able to see with a lot of digging

#

Now, doing the loading and serializing out the data ourselves into a format others could use is a possibility

buoyant wasp
#

only if the extraction is simple to do when new releases come along. last thing we want is to have to do alot of crap when they release a patch that changes the behaviors of half the enemies in the game

pearl sentinel
#

Yeahhh

fair rampart
#

@leaden hedge hey dud, could u plz add moss charger to bosses you can fight?

#

In boss rush

buoyant wasp
#

dud!

fair rampart
#

DuD!

#

ik most people don't consider moss charger a boss, but i think moss charger is more of a boss than gruz mom

buoyant wasp
#

i've only ever fought moss charger once

#

the first time i played the game the "intended" way

fair rampart
#

same

#

Ez boss

#

I probs still died to him

copper nacelle
#

you can jump out of the arena

#

and then kill stuff

#

and heal

willow path
#

I'm confused

#

I'm trying to get Randomizer to work but I'm stuck at getting to Properties in Visual Studio

copper nacelle
#

wtf

#

why are you in VS

#

C E A S E

#

A N D

#

D E S I S T

#

@willow path why VS

#

you download the API from the google drive

#

you install it

#

you download randomizer from the google drive

#

you install it (move the stuff)

#

no compiling or visual studio or anything needed

willow path
#

didn't work

#

unless Fury of the Fallen isn't randomized

#

I did that for Lightbringer and Boss rush

#

it worked

copper nacelle
#

did the randomzier logo show up

willow path
#

It had it in the top left

#

but no logo

copper nacelle
#

you put the folder in the wrong spot

#

there's a folder called randomizer or something

willow path
#

ye

copper nacelle
#

you put it next to hollow_knight_data

#

not in

#

but next to

willow path
#

I got confused because it was just png

copper nacelle
#

folder

willow path
#

kk

#

ty

copper nacelle
#

yw

willow path
#

I know

#

I got the files

copper nacelle
#

then you move the folder in the files to C:\Program FIles (x86)\Steam\steamapps\common\Hollow Knight\

#

I think that's the right thing

willow path
#

ye

#

I just didn't move the randomizer folder

copper nacelle
#

ohh

#

I did that too

#

was also confused

willow path
#

it works

copper nacelle
#

nice

#

have fun

vagrant leaf
#

Lightbringer is the best mod

buoyant wasp
#

Modding API is the best Mod IMO (totally not biased at all)

copper nacelle
#

tbf

#

more than half of the mods need the API

buoyant wasp
#

@leaden hedge - What does RectMask2D do?

#

lightbringer definitely has the best trailer though

copper nacelle
#

time for a mod api trailer

#

just include all the mods made with it

buoyant wasp
#

if i had any talent in video production at all

#

i still wouldn't do it, because it'd take too much effort ๐Ÿ˜›

copper nacelle
#

lol

vagrant leaf
#

Lightbringer is the best mod

#

still

rain cedar
#

It's ok

#

Randomizer is better

ornate rivet
#

shidst mod is best mod

vagrant leaf
#

i played shitmodst

#

it sayed

#

said

#

play lightbringer

#

therefor

#

lightbringer is best mod

ornate rivet
#

no

#

shidst mod is satire about how the life of a mod needs light to be brought to it

#

it's very deep

vagrant leaf
#

then wouldn't it say

ornate rivet
#

the lore behind it can only be interpreted by people with high IQ

vagrant leaf
#

"bring light"

#

instead of

copper nacelle
#

play lightbringer

vagrant leaf
#

"play lightbringer

copper nacelle
#

means

vagrant leaf
#

"

copper nacelle
#

bring light

#

via play

#

(by playing shitmodst)

ornate rivet
#

no, that's just made to distract you

vagrant leaf
#

is this like yoda speak or something

#

play lightbringer โŒ bring light

copper nacelle
#

play lightbringer = bring light by playing shitmodst

vagrant leaf
#

is it a coincidence that the creator of lightbringer also made shitmodst

ornate rivet
#

To be fair, you have to have a very high IQ to understand Shidst Mod. The humour is extremely subtle, and without a solid grasp of theoretical physics most of the jokes will go over a typical viewerโ€™s head. Thereโ€™s also 753โ€™s nihilistic outlook, which is deftly woven into his characterisation- his personal philosophy draws heavily from Narodnaya Volya literature, for instance. The fans understand this stuff; they have the intellectual capacity to truly appreciate the depths of these jokes, to realise that theyโ€™re not just funny- they say something deep about LIFE. As a consequence people who dislike Shidst Mod truly ARE idiots- of course they wouldnโ€™t appreciate, for instance, the humour in 753โ€™s existential catchphrase โ€œPlay Lightbringer,โ€ which itself is a cryptic reference to Turgenevโ€™s Russian epic Fathers and Sons. Iโ€™m smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion as Dan Harmonโ€™s genius wit unfolds itself on their television screens. What fools.. how I pity them. ๐Ÿ˜‚

And yes, by the way, i DO have a Shidst Mod tattoo. And no, you cannot see it. Itโ€™s for the ladiesโ€™ eyes only- and even then they have to demonstrate that theyโ€™re within 5 IQ points of my own (preferably lower) beforehand. Nothin personnel kid ๐Ÿ˜Ž

vagrant leaf
#

oh no

ornate rivet
#

get destroyed kidz

vagrant leaf
#

play lightbringer

pearl sentinel
#

zote .

vagrant leaf
#

lightbringer is the best mod

#

fact

copper nacelle
#

Dan Harmon's genius wit

#

also isn't it

#

shit modst

ornate rivet
#

oh

#

uhh

#

no

copper nacelle
#

wrong

ornate rivet
#

no

#

that video is a lie

#

veru doesnt know anything

copper nacelle
ornate rivet
#

fake news

ornate rivet
#

time travel

#

also mandela effect

#

get rekt

hollow pier
#

checkmate

ornate rivet
#

only people with iq of 90000 understand advanced quantum physics concepts like mandelads affect and interpoliroidnizationalnucleartransposition69fakslikeinator

#

check mate atheists

hollow pier
#

mandelads

copper nacelle
#

transposition69

#

fakslike

buoyant wasp
#

what exactly is going on here?

hollow pier
#

nothing

#

hide

#

cease

#

scatter

ornate rivet
#

shidst mod is best mod

copper nacelle
#

meaningful discussion of shitmodst's lore

ornate rivet
#

shidst mod*

#

plz stop this plebeian

buoyant wasp
#

need to change my title here i think

buoyant wasp
#

there

copper nacelle
#

lmao

ornate rivet
#

a person with a high iq would know that populasramsos theory suggests that inverse relations like more numbers does not mean more betterer

hollow pier
#

joy, killer of wyza

ornate rivet
#

take that atheisdassts

buoyant wasp
#

well, it flows better than "wyza, stick in the mud"

vagrant leaf
#

atheists, if god doesn't exist then what's lightbringer?

ornate rivet
#

shidst mod's complex lore actually answers that

vagrant leaf
#

no u

#

shitmodst's complex lore begs the player to play lightbringer

ornate rivet
#

I cant even speak with weak minded plebiansdns such as urself, ur argument is null

vagrant leaf
#

i pity those with your incredibly low IQ

copper nacelle
buoyant wasp
#

hehe, just considering how best to threaten the hammer

hollow pier
#

o no

vagrant leaf
#

gasp

buoyant wasp
vagrant leaf
#

wait what's the hammer

copper nacelle
#

_ban

hazy sentinel
#

the hammer's the MC

vagrant leaf
#

gasp

ornate rivet
#

_banpls

vagrant leaf
buoyant wasp
trim nimbus
#

yo what is the hell mod?

buoyant wasp
#

it's about what you think it is

copper nacelle
#

hell

buoyant wasp
#

it makes the game harder

#

in pretty much every way

copper nacelle
#

@trim nimbus

# Hell Mod
#### By 56 (me)

## Effects
- 1/2 Nail Damage
- 2x incoming damage
- 1/3 max SOUL
- 1/2 SOUL collection
- no SOUL collection while your shade is alive
- Heal focus is nerfed to Deep Focus speed
- Deep focus multiplier increased by 1.3725
- Dream shield only costs 1 notch (bugged, shows up as 1 but still uses 3)
- 80% spell damage (20% reduction)

## Installation
Hell Mod is an API mod, so install the Hollow Knight API (by Seanpr, Firezen, and Wyza) and then place the HellMod.dll into the Mods folder
trim nimbus
#

wow

#

thats great

copper nacelle
#

one more thing I forgot to add

#

the spell/not nail damage is 80%

trim nimbus
#

makes sense

#

thats pretty cool

#

I'll have to try this out soon

copper nacelle
#

you can also combine it with other API mods

#

so Randomizer + Hell Mod is good

vagrant leaf
#

nightmare god + hell mod

copper nacelle
#

it would work

vagrant leaf
#

someone should do that

#

damageless

copper nacelle
#

just overcharm

#

damageless is then required

#

I think

vagrant leaf
#

wouldn't that do like 8 masks?

copper nacelle
#

yes

vagrant leaf
#

two damage + hell mod + overcharm

#

wow

#

so you would have two hits until you're dead with max masks

copper nacelle
#

you could also just do glass soul

#

1 hit kill

vagrant leaf
#

yeah someone should do that

rain cedar
#

Glass soul messes with nail damage so it's not entirely compatible

#

One of them would likely overwrite the other unless they're coded multiplicatively to the current value

#

Which isn't entirely possible

#

Since it would just stack upward indefinitely

vagrant leaf
#

then just don't get the last mask

#

just have 8 or less masks

copper nacelle
#

recompile glass soul with nothing for the attack hook

vagrant leaf
#

or maybe

#

play lightbringer

soft rain
#

is lightbringer crashing for me on mac because it isn't compatible or because of something else

buoyant wasp
#

lightbringer is not mac compatible

soft rain
#

thanks

#

also are any mods made for the api cross platform

copper nacelle
#

all the api mods are cross platform

soft rain
#

neat

vagrant leaf
#

is the boss rush mod in the drive?

#

i see the beta but nothing else

buoyant wasp
#

the boss rush on the drive is it

vagrant leaf
#

okay thanks

pearl sentinel
#

fun random bit of info: i went and hit that weird metal statue thing that doesn't do anything inside the dreamer's den in deepnest with a thing printing out the name of objects my nail collides with. it's called "god shrine stuff"

leaden hedge
#

@buoyant wasp rectmask2d hides everything in this object and children objects that goes outside this objects rect

#

there is imagemask2d but thats just the same as an image with one line of code and it doesn't work very well

#

so I didn't put it in

#

The X, Y, Width, Height part of CreateSprite is for subsprites, i.e if the texture has 4 sprites you dont need to load 4 textures from that one texture you just need to put the correct positions in

#

And Toggle Group is for a set of toggles where only one can be true

buoyant wasp
#

ah

#

so, it's a texturemap where you select which part of the texture you are using for the sprite

#

IE the spritemaps you gave me a long time ago with all the charms in them

#

there, comments updated

buoyant wasp
#

@leaden hedge - so i've incorporated your loader code in for the menu. it shows the Mods menu option, but click on it, takes me to the games options rather than the mod list

leaden hedge
#
                EventTrigger events = modButton.gameObject.GetComponent<EventTrigger>();

                events.triggers = new List<EventTrigger.Entry>();

                EventTrigger.Entry submit = new EventTrigger.Entry();
                submit.eventID = EventTriggerType.Submit;
                submit.callback.AddListener((data) => { fauxUIM.UIloadModMenu(); });
                events.triggers.Add(submit);

                EventTrigger.Entry click = new EventTrigger.Entry();
                click.eventID = EventTriggerType.PointerClick;
                click.callback.AddListener((data) => { fauxUIM.UIloadModMenu(); });
                events.triggers.Add(click);
#

you have that code?

buoyant wasp
#

yeah

leaden hedge
#

well thats the code that removes the game option trigger and adds the mod menu trigger

#

put a print before and after that snippet

#

to make sure its actually being executed

buoyant wasp
#

hmm, its not, array index exception. Guessing because i put a filter on which mods it will show and none of them apply. (since the mod needs to have implemented both unload and initialize for off/on to work) I just need to check to make sure there is at least 1 mod that falls into that category. but tomorrow when i'm not passing out at my chair

rain cedar
#

Literally no mods implement unload

leaden hedge
#

I'd drop that system if you're using the mod options thing

#

I'd make it mod implement a getOptions function
that returns an array of Options
each Option has a title, callback and optionSet

then just populate that menu with those
title = text on the left to say what it is
optionSet = the possible options i.e. off, on
when it changes give them the callback with the option it was set to

#

then you could put stuff like difficultly and debug options in there

rain cedar
#

But I already made fancy UI for option stuff

#

Well, maybe not so fancy for randomizer

copper nacelle
#

lmao

leaden hedge
#

is it as fancy as this ๐Ÿค”

buoyant wasp
#

@rain cedar i am adding an interface that a mod must implement in order for it to show up as togglable in the menu

#

Right now it's purpose is purely to enable or disable mods.

#

And now. Actually passing out. Later

rain cedar
#

Neat

solemn rivet
#

Wyza is our hero

ornate rivet
#

does Assembly-CSharp.dll have the code for bosses too?

leaden hedge
#

no

ornate rivet
#

where can I find them

#

dont tell me it has to do with playermaker

leaden hedge
#

alright but I'd be lying

ornate rivet
#

okay then, how do I change the player maker stuff

solemn rivet
#

do you have a virgin sacrifice handy?

ornate rivet
#

yes

solemn rivet
#

good

#

then all you need is the FSM viewer

#

and FSM dumper

leaden hedge
#

before we get into the how, we need to ask what

solemn rivet
#

and said virgin

ornate rivet
#

what's this fsm viewer and dumper nonsense

#

and where can I get them

solemn rivet
#

Playmaker FSM is what contains most of the game's code

#

but KDT has a point

ornate rivet
#

I did ask what

solemn rivet
#

the FSM dump is pinned

#

dunno about the viewer

ornate rivet
#

I only see unity studio, dnspy, and the asset changer thingy

solemn rivet
#

FSM (kcghost)

#

this one

ornate rivet
#

yep, I am blind

solemn rivet
#

with this installed, just run the game and go to whatever scene contains what you want to mod

#

it'll dump their fsm

#

and you can then spend countless hours trying to figure out wtf is going on with it

#

and change what you need to change using the assembly

ornate rivet
#

it says I need permission when I want to download it from google drive

solemn rivet
#

to download it?

#

weird

solemn rivet
#

have permissions changed while I was away?

ornate rivet
leaden hedge
#

its private for me too

solemn rivet
#

just right-click and download

#

worked for me

ornate rivet
#

wait, it's for an older version though

solemn rivet
#

when I click your link, it's also private for me

ornate rivet
#

does it matter?

solemn rivet
#

it doesn't really matter, no

ornate rivet
#

ok

#

thank you

solemn rivet
#

it just dumps stuff

ornate rivet
#

now the hard part

solemn rivet
#

ye

#

@leaden hedge can I link your FSM viewer here?

leaden hedge
#

go for it

solemn rivet
#

october 18th

#

seems consistent with the github, so I assume it's uptodate

ornate rivet
#

ok thanks

spiral turtle
#

I can't open the readme in the seanpr mod API zip, I don't have any programs that can open that file type. Does anyone know what it says? I'm guessing they're instructions which are what I need

leaden hedge
#

is it .md?

#

its just a textfile

spiral turtle
#

I'm pretty sure

leaden hedge
#

drag it into any text editor

spiral turtle
#

yeah it's .md

#

Ahhh nice, notepad++ worked. Thanks!

#

YES, feelsgoodman. Just downloaded my first hollow knight mod. Got the debug and API. I need it too practice bosses for speedruns

leaden hedge
#

hopefully debug will be getting better functionality for practicing bosses soon โ„ข

spiral turtle
#

I just clicked hide menu, what's the hotkey to get the debug HUD on again? ๐Ÿ˜‚

leaden hedge
#

f1

spiral turtle
#

thank you

buoyant wasp
#

I'm only half a hero, @leaden hedge did all the hard work to make the menu UI stuff look and work like the normal menu.

#

i'm just putting the pieces together

pearl sentinel
#

so i've made my mod's UI in unity and i'm loading it in through an asset bundle. any reason i shouldn't be doing this? it seems to work and look fine

leaden hedge
#

no real reasons

#

depends on what you are doing

#

just making button and labels etc?

buoyant wasp
#

kdt's just been working on making "standard" mod UI elements that behave/look similar to the vanilla game so that the mods feel like they belong

#

but you can do really whatever you want

pearl sentinel
#

so far just buttons, slider, and labels etc. at runtime i'm having the scripts find the assets and link up to them by adding listeners etc as needed.

#

just nice to be able to layout stuff in the editor and prototype scrolling areas and such

leaden hedge
#

well scroll rects and sliders suck in code

#

so I've not even bothered with them

#

although I don't think anything in game actually uses them

#

actually volume and brightness use sliders

#

so I guess I should implement them

buoyant wasp
#

I'd love you long time if you did scroll rects ๐Ÿ˜ƒ

pearl sentinel
#

Sliders are also a convenient way of making a loading bar

leaden hedge
#

image has a thing for it

pearl sentinel
#

Which, since I have a load step where I load and unload about 50 scenes, is nice to have

#

Ah, cool

leaden hedge
#

fillMethod

#

and

#

fillAmount

#

oh and

#

type

#

although no point giving code for it if you use the editor to make them hollowface

#

but then you can use an actual image for it instead of a slider

pearl sentinel
#

๐Ÿ‘

#

Overall, modding this game has been very easy. You guys do good work

#

So other than a lot of bug fixing, enemy randomizing seems to work well. I just need to figure out how with only a few exceptions (like the collusem)

#

*how I want the logic to work

leaden hedge
#

which exceptions

pearl sentinel
#

Replacing a spawned enemy in the collusem makes the event softlock

leaden hedge
#

ah

pearl sentinel
#

I have some ideas for a work around

leaden hedge
#

weird it does that

#

work around isn't too hard anyway

#

just keep one enemy and repeatedly call its die function

pearl sentinel
#

That's kinda what I was thinking would work, cool

#

Do you know why sometimes spawned enemies will just zip through the floor/world?

leaden hedge
#

in the fsm I think theres a state that says something like decrement battle enemies

pearl sentinel
#

Like giant moss charger doesn't seem to like getting spawned anywhere

#

Even up in the air

leaden hedge
#

might be locked to a certain region

#

of x / y

pearl sentinel
#

Where it should fall and settle

#

Ah, that would make sense

leaden hedge
#

soul master for instance can't move outside his boss arena

#

but he floats / teleports

pearl sentinel
#

Gotcha. And the logic for that is un the fsm?

leaden hedge
#

probably in its controller fsm

pearl sentinel
#

Looks like may be digging into that to see if I can un-region lock some of these.

#

Though it may not be worth it

#

Since idk if anyone wants random bosses while exploring

#

Nosk is particularly annoying to run into

leaden hedge
#

half of them probably won't even work anyway

#

nkg won't

#

tmg won't

#

mantis lords probably wont

#

soul master probably wont

pearl sentinel
#

Mantis lords actually work fone

#

Fine *

leaden hedge
#

do they weird

pearl sentinel
#

They will cling on invisible walls

leaden hedge
#

I'd have assumed they would have needed the 2 anchor points either side of their arena

pearl sentinel
#

But that's about it

leaden hedge
#

radiance probably won't work, zote probably won't either

pearl sentinel
#

Normal zote?

leaden hedge
#

nah gpz

pearl sentinel
#

Ah

leaden hedge
#

he spawns adds

#

which are probably just invis in his arena and linked to him

pearl sentinel
#

Ah

#

Yeah

buoyant wasp
#

NGG spawning randomly when?

pearl sentinel
#

:p

#

But yeah, mostly need to figure out how I want to shuffle things. Also, baulder shell enemy is horrific. Each spit is randomizing the roller it shoots out

#

It spat a nosk at me once

leaden hedge
#

yeah its 50/50

#

and each one will be random

#

they are called elder baldurs btw

solemn rivet
#

holy shit

leaden hedge
#

just make it consistent

solemn rivet
#

imagine an Elder Baldur spitting another Elder Baldur

leaden hedge
#

speaking of elder baldurs do they respect the one baldur rule

pearl sentinel
#

It could

leaden hedge
#

if they spit a none baldur

pearl sentinel
#

Which is?

leaden hedge
#

well anything that isn't a baldur

#

i.e. can it have 2 enemies out at a time

pearl sentinel
#

Oh

leaden hedge
#

normal elders can only have one baldur out at a time

pearl sentinel
#

Yes it seems so

#

Tram spitting guys in deepnest do

ornate rivet
#

Uhhh, what do I replace the playermaker.dll with to make the files go in save_fsm when I run the game

leaden hedge
#

they don't have a limiter afaik

#

not actually looked at their fsm though

solemn rivet
#

you need to use a patcher which should be with the mod you downloaded

ornate rivet
#

what do I do with the patcher

solemn rivet
#

wait, enemies that spit trams?

leaden hedge
#

no the flying things

#

that spit the deepnest mobs

solemn rivet
#

ah

#

phew

#

on the other hand

#

tram-spitting enemies would be amazing

pearl sentinel
#

Lol

ornate rivet
#

what do I put in the XDelta patch textbox

solemn rivet
#

@ornate rivet so, you run the patcher, select the vanilla playermaker.dll as input and PlayMaker1117-whatever as another input

ornate rivet
#

ok thanks

#

what do I do once I've opened the fsm viewer and I see this:

leaden hedge
#

the lines don't really matter too much

#

you can extend them if you want

#

just the health_manager is extremely big

ornate rivet
#

I cant edit them

buoyant wasp
#

if you use my version of the viewer, the lines work all the way ๐Ÿ˜‰

#

that's why it's called a viewer

#

not an editor

leaden hedge
#

yeah this is just for editing

ornate rivet
#

then what do I do with it

buoyant wasp
#

this is to tell you how the FSMs are laid out

ornate rivet
#

ooh

buoyant wasp
#

once you know that, then you have to write code to edit them in c#

#

during runtime

leaden hedge
#

its like trying to edit a book

#

without opening it

#

this just lets you see whats already written in there

ornate rivet
buoyant wasp
#

you can look at the source code for NGG, Randomizer, (bossrush? dunno), they all have examples of editing the FSMs

ornate rivet
#

ok

buoyant wasp
#

it's kind of light giving yourself a root canal with a rusty spoon

leaden hedge
#

I can't remember if I put good examples in any of those

#

once I got a better understanding

buoyant wasp
#

lol

ornate rivet
#

lol

buoyant wasp
#

yeah, some of our early FSM stuff is....scary

#

lots of terrible looping

leaden hedge
#

yeah NGG does some basic stuff

#

changing transitions and values

#

no injection of "new" code

solemn rivet
#

I believe you guys changed the spells functionality in Bonfire

#

and it's all FSM, so if you want to take a look...

buoyant wasp
#

i did, but the newest code wasn't ever posted to github i don't think

#

or you posted it and i didn't know, i know i sent it to you ๐Ÿ˜‰

#

but that was when you went poof

solemn rivet
#

I did nothing

#

yeah

#

I'm still kinda poof-d

#

I'm here, but not

#

I'm like a shadow

#

like a blackmoth

leaden hedge
#

no one really did anything the last month

#

until yesterday when I posted code for the mod menu

buoyant wasp
#

pretty much

leaden hedge
#

although in the case of injecting and removing code from fsm states pretty sure FsmUtil does have code for that

#

although its not quite as fleshed out as CanvasUtil

#

although I don't think they quite work entirely as is

buoyant wasp
#

heh, i'll hold off on adding that to the API until it's more fleshed out

ornate rivet
#

will bigger mods be released once all the patches have been released