#archived-modding-development

1 messages · Page 520 of 1

dark wigeon
#

totally breaks the stack trace

vocal spire
#

I hate avolonia in visual studio

dark wigeon
#

better in rider?

copper nacelle
#

It's ok

vocal spire
#

just keeps having errors with little to no results when searching online + 56 not hearing of them ¯_(ツ)_/¯

copper nacelle
#

If you set the classes and stuff you get autocomplete in xaml and all

dark wigeon
#

I swear the openfiledialog returns null but the openfolderdialog returns empty string

#

amazing skills avalonia

copper nacelle
#

rofl

vocal spire
#

Amazing

copper nacelle
#

the file dialog is null or length 0 I think

#

Or at least that's what I have

dark wigeon
#

that's what I have too

#

so SaveFileDialog returns null

#

OpenFileDialog returns empty array

#

and OpenFolderDialog returns empty string

#

way to be consistent

copper nacelle
dark wigeon
#

oh no looks like it's platform dependent

#

I think I will just not

vocal spire
#

The consistency we deal with here is just amazing

dark wigeon
#

basically the entirety of avalonia

vocal spire
#

if only someone would design avalonia but better nope sounds like effort

dark wigeon
#

microsoft

#

imagine if maui actually supported linux

copper nacelle
#

community support ax1uWide3

#

maybe it won't turn out terrible

dark wigeon
#

lollllll you have too high hopes for the community

copper nacelle
#

probably

vocal spire
#

Too high hopes for humanity

dark wigeon
#

the results

#

windows

#

so even the consistency is inconsistent

vocal spire
#

Huh ok

#

That’s very inconsistent

dark wigeon
jolly oriole
#

Thats about as jank as c++'s long double

floral blade
light zodiac
#

Yee

ornate rivet
floral blade
#

ty

jolly oriole
vocal spire
#

Nice

floral blade
#

is that a new repo for just ModLinks ?

jolly oriole
#

gonna be the new location of modlinks in the future

#

maybe also in another form than currently

floral blade
jolly oriole
#

i hate the github api

#

nvm, should work, unless people try to refresh package list more than 60 times an hour

vocal spire
#

Well I know what I’m doing for the next hour

floral blade
#

per person or like everyone combined

jolly oriole
#

per person

floral blade
#

and if they do it borks only for them right?

jolly oriole
#

yes

floral blade
#

asking for @vocal spire

jolly oriole
#

close, but different person lol

vocal spire
#

lol

floral blade
#

(sorry other someone)

primal latch
#

I'm currently working through all the info warning in the modding api and seeing which make sense

vocal spire
#

?

primal latch
#

ah. vs calls them messages

merry lotus
#

Hey, while everyone is beginning to rebuild mods, I have a suggestion/request:

As much as possible, can it be a standard to have a method to minimize/hide mod UI (preferably using a customizable button press)?

It would be really cool if going forward, there was never a need to worry about mod UI overlap grublove

light zodiac
#

But that would involve having more random hotkeys

#

Solving one problem would cause another

merry lotus
# jolly jungle wdym?

Having some method of removing menu UI, especially from the Pause menu.

WeaverCore accomplished this by minimizing the UI to a hamburger menu.

HKMP accomplishes this by having a remappable key (right-alt by default) be a toggle to completely hide it's menu.

jolly jungle
#

Wdym by menu UI tho

#

I don't use many mods

#

So the only ones I know of having ui are customknight and debug

#

and debug is togglable, obviously

merry lotus
#

CustomKight and Benchwarp are two that also use the pause menu to include their UI menus. Custom Knight (by default) uses a lot of the left side of the screen. Benchwarp uses (without choice afaik) the entire top of the screen.

#

Just imagine if debug wasn't a toggle. But it's great that it is. And that's a design choice that I genuinely believe should be a standard, so that even if a dev is unaware that their mod UI overlaps with that of a mod that they don't use, it isn't an issue.

merry lotus
# light zodiac Solving one problem would cause another

That's why I feel like they should always be customizable. Multiple UIs could potentially be bound to the same button, so that a player could have "sets" of menus if needed, and know that they never problematically overlap.

#

The toggle could not even be set by default tamershrug
Just be an option so that an implemented solution exists

light zodiac
#

Making it customisable means people have to to go settings file and add keys there

merry lotus
#

I'm aware

floral blade
#

I think perhaps mapi should have a default way to represent all mods ui kind of like the mods option.

jolly jungle
#

Hey, uh, question

floral blade
#

It would obviously not stop mods if they really need to go above and beyond that UI system. But give a standard practice / setup that is perhaps better thought out than each mod figuring out for itself

jolly jungle
#

How do I look at Colosseum enemies' FSMs

light zodiac
merry lotus
#
  • Tilde ~
  • Regardless of my answer, I did state the button would not need to be set by default. Just having it available in the settings would be a major step forward. I can make easy instructions to help people edit settings.
jolly jungle
#

So there are many mods that take up ui space that arent togglable?

floral blade
#

what if -

  • mapi exposes a function like unload() but simply called toggleUI()
  • mods that do implement this method can use this to inform if they should have their UI visibility toggled
  • clicking the name of the mod in the top left toggles the UI & hotkeys for this can be set in modding api settings.
jolly oriole
#

working on a potential new way of modlinks (not .xml)

jolly jungle
#

How do I look at Colosseum enemies' FSMs

#

If anyone knows or has an idea please tell me

#

I have no clue where to start

floral blade
jolly oriole
floral blade
#

so it'll just be called modlinks ?

jolly oriole
floral blade
#

so when you say versions you mean the versions of the mod or the versions of the game ?

jolly oriole
#

of the mod

dark wigeon
jolly oriole
#

though both methods have the downside of having to be completely remade/wiped once a new major patch is out

floral blade
#

sounds cool! Apart from players being able to request whatever version of the mod they'd want, and being able to maintain multiple versions of the mods. is there anything else this system would allow for ?

jolly oriole
#

by adding an additional field there could be multi patch support

floral blade
#

yes that's basically 2 versions of the mods where the mod manager can choose which one to use right ?

jolly jungle
#

They get spawned in later by the cages

#

Unless you have a "scene" with all those kinds of FSMs?

dark wigeon
#

sharedassets3x.assets ?

jolly jungle
#

Hm

#

Where would I look at those?

dark wigeon
#

sharedassets are just prefabs

jolly jungle
#

Makes sense

dark wigeon
#

the scene picker won't let you open them

#

just click file->open and open sharedassets instead of level

jolly jungle
#

Ahhh

#

Thank you

jolly oriole
#

big pog

dark wigeon
#

just in case you don't have the list up atm

jolly jungle
#

And will I know to find to others?

dark wigeon
jolly jungle
#

So the shielded fools are these?

dark wigeon
#

that's just the prefabs that belong to scene 32 (Room_Colosseum_Bronze)

#

or at least, first showed up in scene 32

jolly jungle
#

Ohh I see

jolly jungle
#

So that's what the number is for

dark wigeon
#

data[32] = level32 and sharedassets32.assets

jolly jungle
#

K thanks

#

I need the first of the three, right?

#

Eyy, it works

dark wigeon
#

yeah ignore resS and resource

#

they are just textures/audio

jolly jungle
#

Any reason I might need them in the future?

dark wigeon
#

no

#

you will never need to open them manually, .assets files will reference them if they are needed

floral blade
#

probably a super noob question but : where do static members go ? how do dlls load ?

like if mapi loads a dll (subclass of mod class)
then another mod loads the same dll but this time instantiates a different class and calls a method on it that modifies a static member's value

is this the same static member that mod class has access to?

#

(i will gladly accept reading links if the answer is too simple)

jolly oriole
floral blade
#

i'm actually kinda needing to load assembly.

because HKMP has a standalone server where i would like to have the ability to load a mod without mapi / hk.

#

these mods would augment HKMP if it works

dark wigeon
#

if you're asking where static variables are stored, I think it's with the assembly instance

#

but yes that makes the static members the same everywhere

floral blade
# dark wigeon but yes that makes the static members the same everywhere

Then does this setup make sense ?

Mapi can instantiate the subclass of mod class
HKMP can instantiate the subclass of addon class
static members can be used to share data across the mod class and the addon class when running in game.

and on standalone server only the subclass of addon class can be instantiated , from the same dll.

dark wigeon
#

like a singleton? I guess you could

#

are you saying that addons are loaded by the mod, or are just another type of mod

floral blade
#

addons are loaded by the mod, but they may as a part of the same dll contain a mod

floral blade
#

so they could potentially be "loaded twice and have two disconnected copies" was what i was fearing

#

seems like that is not the case

light zodiac
#

I'm getting a null reference exception by calling this function. Am I doing something wrong. (This works in 1.4 tho)

private bool CanDash()
        {
            return (bool) typeof(HeroController).GetMethod("CanDash", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(HeroController.instance, null);
        }```
jolly oriole
#

try new object[0] instead of null

#

i had more success with it

vestal plover
#

What is the status of releasing the modding API for 1.5? In other words, should I continue developing for 1.5 or is it still a long ways away and should I focus on 1.4 for the time being?

light zodiac
merry lotus
# vestal plover What is the status of releasing the modding API for 1.5? In other words, should ...

I'm sure I'll be corrected, but my current understanding is that the 1.5 Mapi is pretty good-to-go, but the idea is to have the Installer + Modlinks somewhat overhauled (so that it can be updated for 1.5, while offering 1.4.3.2 legacy support) before "releasing" 1.5 as the main thing.

It seems like all work should be done for 1.5, with maybe a final legacy patch for 1432 versions if needed/wanted.

vestal plover
vocal spire
#

I’ve already made a version of modinstaller/modlinks that works with multiple patches, all it needs is for the 1.5 api’s files to be uploaded to google drive or something, and then add it to modlinks

patent zealot
#

which hit type is dreamshield called?

floral blade
#

@light zodiac do you have any example mod that implements this ? I'd love to use it in the next version !

light zodiac
#

Idt there is

#

You have to inherit from IMenuMod

#

There's also a ICustomMenuMod but idk how to use that

floral blade
#

i'll look into this for the 1.5 release then, thanks!

#

especially if this would make selecting skins with a controller possible

light zodiac
#

I think it will

primal latch
#

Is there a way to specify boundaries for the camera?

jolly oriole
#

CameraLockArea?

primal latch
#

I’ll look into it later

ornate rivet
#

omg thank you so much I got 10 human skins made of real flesh for freeeeeee oh no it got deleted :(

#

anyways back to modding

vocal spire
#

Wdym

#

This is completely normal

merry lotus
#

I don't remember who was last working on updating Mod Installer 1 (RedFrog/Someone I think), but possible idea to help it:

Can it be changed to not check for mod updates unless a "check for updates" button is pressed? And/or not even download/check modlinks until then?

Reason: a lot of people who go back and forth between vanilla and modded don't like using Mod Installer (even if they fix it), because it takes awhile to initially load, so they end up using alternate methods (like Jamie's Vanilla switcher, or making separate installs). On top of that, because hashes are used for validation and version checking, anyone who's using builds of mods newer than on the installer has to sit through "do you want to update x" messages unnecessarily every time

copper nacelle
#

that one was on purpose

#

pretty sure

#

gradow thought people would just leave it outdated without it

#

lmoa

merry lotus
#

Yeah, I get the idea of it being automatic

#

And if there were only ~10 mods on the installer, it probably would be fine.
But as the community has grown, it's kinda become a problem lol

copper nacelle
#

no the idea is being forced

#

It used to straight up update them entirely

#

I think

merry lotus
#

I've just seen probably a dozen people over the ~6mo who want to make a separate install just for mods, or use Jamie's switcher (which actually uses an outdated 1432 mAPI right now iirc).
So it seems like any means to make switching via installer not feel like "a hassle" would be good

jolly oriole
deep wave
#

outdated modding api best modding api 😤 (i cba to change it, it's been using -57 the whole time but tbh it's mainly aimed at rando/speedrun people who don't really need the most recent api for stuff to work)

copper nacelle
#

we do a little breaking

patent zealot
#

is there a github for absrads orbs

light zodiac
#

Absrads orbs?

patent zealot
#

yeah the one sawyer made

#

constant orbs

primal latch
#

I'm using this code to load a custom scene. For some reason a black rectangle appears in the top right of the screen. ```cs
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;

namespace Fyremoth
{
class SceneLoader : MonoBehaviour
{

    private IEnumerator Start()
    {
        yield return new WaitWhile(() => !Input.GetKey(KeyCode.F));
        string[] scenePath = Assets.sceneBundle.GetAllScenePaths();
        Fyremoth.Instance.Log(scenePath[0]);
        UnityEngine.SceneManagement.SceneManager.LoadScene(scenePath[0]);
        yield return new WaitForSeconds(1f);
        var mat = new Material(Shader.Find("Sprites/Default"));
        SpriteRenderer[] rends = FindObjectsOfType<SpriteRenderer>();
        foreach (SpriteRenderer rend in rends)
        {
            rend.material = mat;
        }
        HeroController.instance.transform.position = new Vector3(101f, 55f);
        yield break;
    }

}

}

fair rampart
primal latch
fair rampart
#

I am talking to send my script in discord

patent zealot
#

do 3 ` at the start and end

primal latch
#

and add cs at the end of the first 3

fair rampart
#

Ok thx

primal latch
#

found the issue

#

or at least a part of it

#

it seems like I'm setting a wrong material

copper nacelle
#

bro you are changing literally all the sprite renderers

merry lotus
jolly oriole
#

why would one change every sprite renderer

#

custom scenes work fine without it

primal latch
jolly oriole
#

yea, i know why

calm thorn
#

hello !
quick question as someone who is really inexperienced in programming and modding in general : how tough would it be to make a custom Colisseum trial? I was thinking taking the base enemies and bosses in the game and make several waves with them

for instance, a "Trial of the ancient warriors" and you'd have waves battling 2 ou 3 spirit warriors at once, and False Knight + White Defender at the end

copper nacelle
#

I think jngo had something for that you could just configure

patent zealot
#

@calm thorn , fireb0rn probably has a link in his video for that mod italy and jngo both worked on

#

its a bit buggy but you can go in the trial of the gods or pure masochist video

calm thorn
#

probably this I suppose

well, I'll try to make it work. Thanks !

floral blade
fair rampart
#

so uhh... how is the pale court and the sanctuary mods going?

pine girder
#

Can I just use the sprite folders from google drive to dump on SpritePacker?

ornate rivet
#

pale court will never come out now

pine girder
#

how do I use newtonsoft Json since it says that required for Spirit Packer

topaz oar
#

question, which link goes to modinstaller?

copper nacelle
#

there's a few in modding help pins depending on what you want

topaz oar
#

just the standard one, i remember the one i used to use but can't find the og link anymore

#

the more low effort the better :P

pine girder
#

there is a link for mod installer

topaz oar
#

thanks

#

that's probably it, huh?

pine girder
#

yep I guess so

#

meanwhile...me tryong to figure out how to put sprites in Sprite Packer

#

I am getting white hair from stress

topaz oar
#

ouch

#

i feel for you man

pine girder
#

youtube videos do help but I feel like their method is different? idk

topaz oar
#

there's my zote

#

oh how i missed you

pine girder
#

I have this file called "newtonsoft.json.dll" I seem couldn't open it

copper nacelle
#

why are you trying to open it what the fuck

pine girder
#

Because I dont know?

ornate rivet
#

to find newton

pine girder
#

I just want to use sprite packer that's it

copper nacelle
#

then open it I don't get it

pine girder
#

but the youtube video says download it

copper nacelle
#

go on

pine girder
#

I did

copper nacelle
#

ok

#

so then you presumably have the exe?

pine girder
#

yes, I have a folder both spritepacker and whatever is that dill

#

And um

#

I am trying to put sprites
i already downloaded the knight

#

I opened the sprite packertoo, obviously

#

I clicked "Get single sprites" so I did that but it just led me to the link github

#

I am so confused

copper nacelle
#

no idea

#

modding-discussion imo

pine girder
#

okay I thought this channel may be ok for setting up to make skins

jolly oriole
#

i hate how windows wants me to use visual studio code when havin "vi" in the search bar, but visual studio with "vis" (and visual profiler [something from eclipse? idk] with "visua")

copper nacelle
#

keypiranha

jolly oriole
#

is that on winget

#

/s obv

copper nacelle
#

might be

#

it isn't but it is on scoop

jolly oriole
#

it isn't, i checked

copper nacelle
#

this is why you use scoop 😤

jolly oriole
#

scoop the fucks i give from the floor 😤

copper nacelle
#

smh

jolly oriole
#

though keypirinha do be looking kinda similar in functionality to something else i once had, let me remember the name

copper nacelle
#

≈ Alfred/Quicksilver/Spotlight on Mac ≈ rofi/dmenu/etc on Linux

#

idk any other good windows ones

jolly oriole
#

"Everything" is what it was called

copper nacelle
#

ah

#

keypiranha has a thing to invoke everything from it

jolly oriole
#

nice

#

ok wow, that configuration window is definetly made by programmers, for programmers

#

damn, i found a typo in unity's module xmls

primal latch
#

Lmao

#

Report it

jolly oriole
#

where

primal latch
#

Idk

jolly oriole
primal latch
jolly oriole
#

found the contact us button, maybe

#

nvm

#

customer support ticket it is

floral blade
#

56 can you please merge the CK PR into MI ?

#

it's probably the last major CK update for 1.4.3.2

copper nacelle
#

why you gotta do this to me

#

i am begging you just put it in the root

#

this folder structure is awful and i have been trying to kill it for actual months

#

I can't take the paths seriously because half of them use this shit and half are actually reasonable

#

so if i actually expand you get my favorite managed/mods/hollow_knight_data/managed/mods

floral blade
#

I believe this had worked with MI2

#

Do you need everything in root of the zip ?

#

I can do that if that'll work on both installers

copper nacelle
#

It works because I added a hack

#

I think it will idk

#

I don't care that much about 1432

#

i will simply enforce it in 1.5 with a new links

floral blade
#

Lol as long as there is a standard way to do things I'm good either way

jolly oriole
#

everything at root, make a mod with a zip that contains 32k+ files

floral blade
#

The reason I'd maintained the directory structure is because that's what old CK releases had , this time I'd tweaked it a bit because it wasn't working

versed haven
#

Hello, I have never made a Hollow Knight mod. But I really want to change the number of slots for charms + I want to change the number of slots that charms take up. Can anyone suggest how this is done? =)

I know I need to modify the Assembly-CSharp.dll file for this, but I don’t know how.

copper nacelle
#

override GetInt

cedar hemlock
#

You dont need to override the assembly-Csharp

#

Read the SFCore section

jolly oriole
#

wait what

versed haven
#

Thanks)

jolly oriole
#

what does sfcore have to do with charm notches

cedar hemlock
#

Oh notches

#

Just use the playerdata section iirc

copper nacelle
#

any

#

PlayerData

#

GetInt

versed haven
#

Ok

light zodiac
cedar hemlock
#

But why

#

If you want to make a new charm, do that. Otherwise no

versed haven
#

want to change charms from the game, not create new ones. there is a similar mod "Easier Mode - Cheap Charms". but in this mod the number of slots for charms is not changed, so I want to create my own mod, which will contain everything that is needed)

deep wave
#

can override the getplayerdataint for charm notches to a higher count based on the real value

charred topaz
#

Hey @dark wigeon , I'm running into an odd issue in regards to AssetTools.Net. I have these ScriptableObjects called Registries, and all I'm trying to do with them is change their "modAssemblyName". If the modAssemblyName is "Assembly-CSharp" for example, then it should get changed to "CorruptedKin". But when I go to dump the contents of the Registry using UABE, it seems that half of the data in the registry object gets corrupted with data from other assets in the bundle, and I'm not entirely sure what's going on. Attempting to view the data in UABE via "View Data" causes the program to crash.

Code is here:
https://gist.github.com/nickc01/297a2553ffbee11d62bcde464e962a50

dark wigeon
#

like monodeserializer/getmonobasefieldcached?

#

just saw the code and it does look like you're missing it

#

also the official way to check if a field exists is .IsDummy()

#

and you can load assetsfiles from bundles now without all the wacky memorystream stuff

charred topaz
#

Alright, I'll look into it when I get a chance

ornate rivet
#

can someone link the built version of debug mod again

jolly oriole
ornate rivet
#

thanks

#

hmm
[ERROR]:[API] - Error: System.NullReferenceException: Object reference not set to an instance of an object
[ERROR]:[API] - at DebugMod.DebugMod.Initialize (System.Collections.Generic.Dictionary2[TKey,TValue] preloadedObjects) [0x00137] in <c4b9a59d30514948a90606b6f577131c>:0 [ERROR]:[API] - at Modding.ModLoader.LoadMod (Modding.IMod mod, System.Boolean updateModText, System.Boolean changeSettings, System.Collections.Generic.Dictionary2[TKey,TValue] preloadedObjects) [0x00047] in <85b90636b40d4597bad3d43b9f3685b0>:0
[ERROR]:[API] - at Modding.ModLoader+<LoadMods>d__8.MoveNext () [0x00b1c] in <85b90636b40d4597bad3d43b9f3685b0>:0

#

hmm

[ERROR]:[API] - Error: System.NullReferenceException: Object reference not set to an instance of an object
[ERROR]:[API] -   at DebugMod.DebugMod.Initialize (System.Collections.Generic.Dictionary`2[TKey,TValue] preloadedObjects) [0x00137] in <c4b9a59d30514948a90606b6f577131c>:0 
[ERROR]:[API] -   at Modding.ModLoader.LoadMod (Modding.IMod mod, System.Boolean updateModText, System.Boolean changeSettings, System.Collections.Generic.Dictionary`2[TKey,TValue] preloadedObjects) [0x00047] in <85b90636b40d4597bad3d43b9f3685b0>:0 
[ERROR]:[API] -   at Modding.ModLoader+<LoadMods>d__8.MoveNext () [0x00b1c] in <85b90636b40d4597bad3d43b9f3685b0>:0 
jolly oriole
#

i do be using whatever mulhima linked me once alongside an outdated mapi afaik

copper nacelle
#

outdated shroompause

ornate rivet
#

bruh

jolly oriole
#

though that do be the latest build there is

ornate rivet
#

whyy

jolly oriole
#

smh, leaking

ornate rivet
#

oh

#

but I have 16 gb of memory

patent zealot
#

you should zoom out a bit more

ornate rivet
#

ok

patent zealot
jolly oriole
#

saleh, you can download and build debug yourself

#

potentially works then

ornate rivet
#

that's going to take years with my internet connection rn

jolly oriole
#

smh

ornate rivet
#

which repo do I download

jolly oriole
#

is debugmod supposed to be buildable?

ornate rivet
#

@copper nacelle stop watching sid

jolly oriole
#

nvm, last thing was just postbuild

#

may be missing functionality, idk

#

i didn't check commits

ornate rivet
#

thanks me dude

#

hopefully it works, wow just running debug alone takes 5 years for hk to load

#

bruhh

jolly oriole
#

your key binds are apparently bad

ornate rivet
#

so delete the config file?

jolly oriole
#

probably

ornate rivet
#

now it's just the preloading that's failing

#
[INFO]:[ModCommon] - Mod Common is done initializing!
[INFO]:[DebugMod] - Initializing
[INFO]:[DebugMod] - Building MethodInfo dict...
[INFO]:[DebugMod] - Done! Time taken: 0.0008621216s. Found 91 methods
[ERROR]:[API] - Error: System.NullReferenceException: Object reference not set to an instance of an object
[ERROR]:[API] -   at DebugMod.DebugMod.Initialize (System.Collections.Generic.Dictionary`2[TKey,TValue] preloadedObjects) [0x00137] in <cd1140c20a5940458a720a58ca39d2ae>:0 
[ERROR]:[API] -   at Modding.ModLoader.LoadMod (Modding.IMod mod, System.Boolean updateModText, System.Boolean changeSettings, System.Collections.Generic.Dictionary`2[TKey,TValue] preloadedObjects) [0x00047] in <85b90636b40d4597bad3d43b9f3685b0>:0 
[ERROR]:[API] -   at Modding.ModLoader+<LoadMods>d__8.MoveNext () [0x00b1c] in <85b90636b40d4597bad3d43b9f3685b0>:0 
regal iris
#

For someone who's curious about bleeding-edge, would it be possible to get a broad overview of the current state of 1.5 modding?

mortal nest
#

1.5 modding: attempting to make work but having difficulties.

regal iris
#

(I'm mostly interested in Randomizer and I am willing to test out potentially buggy/unbeatable versions)

mortal nest
#

But that's just me looking at messages on this channel, I don't know for sure

ornate rivet
#

is this supposed to work?

#

wtf why is everything in that project completely wrong

copper nacelle
#

why are you on an old version of vs

#

that's standard syntax

ornate rivet
#

because I haven't used this laptop in a while

#

I have to update vs for it to understand the syntax?

copper nacelle
#

i mean just vs2019

ornate rivet
#

update to 2020?

copper nacelle
#

idk check the lang version

#

that's c# 9

#

i have 2019 and i do c# 9 shit

#

when i occasionally open vs

jolly oriole
#

according to an article from 2020/10/21, c#9 is only supported with .net5

copper nacelle
#

untrue

#

"supported" as in you need it for like { init; }

#

otherwise any language feature works fine basically

#

like async from c# whatever isn't gonna work without the tasks

#

same deal

ornate rivet
copper nacelle
#

try latest

ornate rivet
#

that's what it was before I changed it

#

everything hates me

#

haven't even gotten to modding this moronic game yet

#

I actually hate team cherry now

jolly oriole
#

which version is your vs 2019?

#

because afaik you do be needing at least 16.8 or 16.9

ornate rivet
#

it doesn't really matter, downloading it will take until I'm back home by which time I could just use my pc

#

so no progress on modding today I guess

#

thanks for all the help though

vocal spire
#

Sad

tawny onyx
#

also check your refs, probably missing

light zodiac
light zodiac
nimble lake
#

ok
let's make a mod

primal latch
#

Ah. Yes. Editing a class called Class1

#

In the MoreBaseHealthUI mod

nimble lake
#

yea i had to do something

#

i’ll be back to it

#

don’t judge

nimble lake
#

I'm not sure how am I supposed to rename an fsm
also, GameObject.Instatiate doesn't take a string

#

GameObject.Instantiate(GameObject.Find("Health 1"));?

primal latch
nimble lake
light zodiac
#

Pretty sure it's a variable

#

Check the variables tab in fsm viewer for which variable to change

nimble lake
#

i'm supposed to rename it apparently

light zodiac
#

I don't get what you mean

nimble lake
#

i'm just trying to follow what sfg told me

light zodiac
#

Check the variables tab in fsm viewer for which variable has the value "health 1" and change that

nimble lake
#

well i think it's this one

#

but i don't understand how do i rename it. FSM doesn't seem to have a method for that or something

jolly oriole
#

Not renaming the fsm, you want to
Take the gameobject "heatlh 1"
Instantiate it
Rename that new copy
Have that new copy at the correct position and with the same parent as thr hralth 1 one
Edit the fsm variables to reflect the New thing (heatlh number int to e.g. 12)

light zodiac
#

Their question was how do you rename the new copy

jolly oriole
#

The question was about renaminf the fsm, though maybe renming isnt needed at all

jolly oriole
#

so something like

for (int i = 12; i < 21; i++)
{
    var healthGo = GameObject.Instantiate(health1Go, health1Go.transform.parent);
    healthGo.name = $"Health {i}";
    healthGo.transform.localPosition = new Vector3(-10.32f + (0.94f * (num - 1)), 7.7f, -2);
    var healthFsm = healthGo.LocateMyFSM("health_display");
    var healthFsmVars = healthFsm.FsmVariables;
    healthFsmVars.GetFsmInt("Health Number").Value = i;
}

should be the complete package

nimble lake
#

you're supposed to reference modcommon and playmaker for LocateMyFSM to work, right?

jolly oriole
#

modcommon not needed

nimble lake
#

why am i getting cannot resolve then?

#

same for transform, health1Go and num

jolly oriole
#

oh, error while copy pasting, num is supposed to be i, but transform should be available, and health1Go should be whatever the health 1 gameobject is, i haven't added that though

primal latch
#

Did you reference UnityEngine?

nimble lake
#

i did

primal latch
#

Wierd.

nimble lake
#

using UnityEngine as well

primal latch
#

Ok

#

Then it should work fine

nimble lake
jolly oriole
#

with those being fixed, it may look like this

nimble lake
#

oh, that fixes it for some reason

#

which hook btw?

jolly oriole
#

hook?

nimble lake
#

ModHooks.Instance.

jolly oriole
#

shouldn't be needed for that health display thing

#

like, at all

#

wait nvm

nimble lake
#

i tried using just what you gave me but that didn't work, so i thought i needed to use a hook

jolly oriole
# jolly oriole with those being fixed, it may look like this

have this inside a On.GameCameras.Start hook, so like

// inside of the constructor of your mod, yes constructor, intialize is too late
On.GameCameras.Start += MoreHealthDisplay;

// somewhere else in your mod class
private void MoreHealthDisplay(On.GameCameras.orig_Start orig, GameCameras self)
{
    orig(self);
    // the code from the screenshot, though 'GamerCameras.instance' can be changed to 'self'
}
#

should work way better

light zodiac
nimble lake
#

i'm guessing the fsm

jolly oriole
nimble lake
#

hmm, still doesn't seem to work

#

brb

light zodiac
jolly oriole
#

i actually don't know if it's with the fix from 14 hours ago, but that shouldn't change things

light zodiac
#

What fix?

#

I don't even know what was wrong

#

Pretty sure this is correct ("Tutorial_01", "_Enemies/Buzzer")

#

For vengeflies

jolly oriole
light zodiac
#

Oh

nimble lake
#

yea i can't figure it out

jolly oriole
#

also currently puzzled why its not working

nimble lake
#

everything seems fine but still no extra health on HUD

using System.Reflection;
using Modding;
using UnityEngine;

namespace MoreBaseHealthUI
{
    public class MoreBaseHealthUI : Mod
    {
        public override string GetVersion()
        {
            return Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }

        public override void Initialize()
        {
            Log("Initializing...");
            MoreBaseHealthUI.Instance = this;
            On.GameCameras.Start += MoreHealthDisplay;
        }

        private void MoreHealthDisplay(On.GameCameras.orig_Start orig, GameCameras self)
        {
            orig(self);
            var health1Go = self.gameObject.transform.GetChild(0).GetChild(1).GetChild(4).gameObject;
            for (int i = 12; i < 28; i++)
            {
                var healthGo = GameObject.Instantiate(health1Go, health1Go.transform.parent);
                healthGo.name                    = $"Health {i}";
                healthGo.transform.localPosition = new Vector3(-10.32f + (0.94f * (i - 1)), 7.7f, -2);
                var healthFsm     = healthGo.LocateMyFSM("health_display");
                var healthFsmVars = healthFsm.FsmVariables;
                healthFsmVars.GetFsmInt("Health Number").Value = i;
            }
        }

        internal static MoreBaseHealthUI Instance;
    }
}
jolly oriole
#

ok, that goes on me

#

change the GetChild(4) to GetChild(5)

#

for some reason i forgot that 0 based indizes were a thing

#

nvm, still only 11

#

oh wow

#

i think this is working

nimble lake
#

oh, how did you do that?

jolly oriole
#

minor textwall

#

gonna make it a file

nimble lake
#

MonkaUMEGA that suddenly got a lot bigger than before lol

jolly oriole
jolly oriole
nimble lake
#

what is AddGameObjectVariable? it can't find it

jolly oriole
#

oh yea lol, my bad, 1 sec

nimble lake
#

also may as well say it now, sorry for making you do all of this and write all of it. HK modding is pretty complicated

#

and also thanks

jolly oriole
#

exchange

healthFsm.AddGameObjectVariable($"Health {i}");

with

List<FsmGameObject> tmpList = new List<FsmGameObject>(healthFsmVars.GameObjectVariables)
{
    new FsmGameObject($"Health {i}")
};
healthFsmVars.GameObjectVariables = tmpList.ToArray();
jolly oriole
light zodiac
#

Is this 1.4 or 1.5?

jolly oriole
#

both

nimble lake
jolly oriole
#

it may require having a preload, i have only tested with one

light zodiac
light zodiac
#

I haven't lol

jolly oriole
jolly oriole
# nimble lake oh no

maybe you don't have On.GameCameras.Start += MoreHealthDisplay; in the constructor? like

nimble lake
#

I do have it on Initialize

jolly oriole
#

then it's too late, have it in the constructor

#

though the important code for your mod is the last line in public RadiantMenu() and the rest below the initalize

sage relic
#

debug mod loaded and then not loaded

light zodiac
#

Have you tired deleting debug mod.globalsettibgs?

sage relic
#

That's what caused the error. I just opened 1432 debug, let it create a DebugMod.GlobalSettings.json. Now loading into 1.5 debug works again

light zodiac
#

Interesting

#

Maybe a new settings file isn't generated by the 1.5 API if it's missing

sage relic
#

and just deleted the json file, and it's broken the same way

sage relic
jolly oriole
fickle sparrow
#

I assume 1.5 debug was set up incorrectly then

#

because it worked when I tested

#

like this gets generated when I use the example

sage relic
jolly oriole
#

this do be looking good though, unless globalsettings isn't supposed to be internal

fickle sparrow
#

nope

#

the settings doesn't have a default value

#

thats a problem

light zodiac
#

I didn't understand

#

Default value as in setting1 = 5

fickle sparrow
#

idk internal static GlobalSettings settings { get; set; } = new GlobalSettings();

#

need to initialize all settings fields because if the file is not present OnLoadGlobal will not be called

light zodiac
#

Seems like an easy fix

nimble lake
#

@jolly oriole oh it's working this time. thank you!

jolly oriole
#

👍

left birch
#

Hello and good morning to you all! I am looking for the mod "Double Vessel" to give a try, is possible to got it?

light zodiac
fair rampart
#

hi

#

is normal that PSFMaker is not working anymore?

#

PMFSMview

jolly oriole
nimble lake
light zodiac
nimble lake
#

people who use mods ig

ornate rivet
#

anyone with a brain

jolly oriole
#

anyone without a brain

copper nacelle
#

anyone without a brain

sage relic
#

people.....who do rando?

deep wave
#

people who miss inv hard fall cancels and dash inv drops 😤

nimble lake
copper nacelle
#

they should've simply ported rando

#

smh my head

#

and I mean if you're using mods sure they're not updated yet but considering this is the development channel I think it'd be a bit stupid to be developing for a version which is about to be obsolete so I'd assume 1.5

nimble lake
#

yea 1.4.3.2 is like LTS

copper nacelle
#

as far as modding goes 1.5 is nicer as an experience by default for the most part with a version of net that isn't infinity years old and support of portable pdbs

#

the only real downside is that reflection.emit is stripped by default but it looks like that's kinda fixable? anyways

jolly oriole
#

i like 1.5 because i can make my mods take up 24 GB of ram

primal latch
jolly oriole
#

yo 56, you still wanted to make some changes to the mapi, right? could i help in some capacity so we can stop doing ?pins in #archived-modding-help?

charred topaz
floral blade
#

@light zodiac I got ICustomMenuMod to work after cannibalising code from inside the mapi lol gorbbrain

copper nacelle
jolly oriole
fickle sparrow
#

all the stuff inside of Modding.Menu is related to that API

#

so I'd recommend just reading the docs for that

#

also 56 can you pin this for refs

floral blade
#

yep I've been referring to ModListMenu.cs to implement this one

fickle sparrow
#

yeah that ones good

#

shows how to do scrollbar stuff

#

which is still sketchy as fuck

vocal spire
#

Time to move all my global settings stuff!

floral blade
#

what did you mean when you said "reading the docs" tho ? the annotating comments in the mapi code ?

vocal spire
#

Apidocs update?

floral blade
#

this is what i'd been referring to so far

fickle sparrow
#

yeah the doc commennts

vocal spire
#

The apidocs do need some updating though

fickle sparrow
#

it'll show up in an IDE

#

the api docs are bad echOmega

jolly oriole
fickle sparrow
#

hell no I don't want to touch them

floral blade
jolly oriole
#

then don't say anything about them

vocal spire
#

fine I’ll do it then

#

I’ll add a page for frogcore while I do it

fickle sparrow
#

they're still omega bad

#

idk when they were last updated

vocal spire
#

Save settings is real outdated

jolly oriole
fickle sparrow
#

they're probably as old as the old examples

copper nacelle
#

not quite

#

that would be impressive

fickle sparrow
#

true I don't even think hollow knight is as old as those examples

patent zealot
#

is there a github for traitor god?

floral blade
#

its basically the code from mapi mostly lol

copper nacelle
#

idk where the original went but I have a fork from when I was pring it

fickle sparrow
#

fwiw I wouldn't use the AddModMenuContent and just add the horizontal options by hand

floral blade
#

yeah, that makes sense. rn this is basically the code that implements the mod menu with an extra apply button

patent zealot
#

ty

primal latch
patent zealot
#

how does getvectortoplayer() work?

fickle sparrow
#

pretty simple

#

get the delta vector

#

and then just normalize it

patent zealot
#

ah alr

#

mustve missed that

#

ty

fickle sparrow
#

the commented out part looks like just position prediction based on the player's velocity

jolly oriole
#

<@&283547423706447872> scammer

#

thanks mods

weak lodge
#

gone

jolly oriole
#

smh, hk crashes with a clr mod

dark wigeon
#

is it possible that the directory isn't correct and isdummy failed?

jolly oriole
#

ah yes

charred topaz
# dark wigeon what is in Libraries/ScriptsAssemblies

That folder contains the Assemblies that Unity has built for the project, such as Assembly-CSharp.dll, WeaverCore.dll, and any other assemblies that are defined via asmdef files in the project. I’m not at my computer right now so I can’t show a picture. Since it has WeaverCore.dll, it does seem to be resolving the Registry class just fine, and I have been seeing the Log() on line 87 show up in the console.

jolly oriole
#

c++ optimization sucks ass

elder radish
#

I've updated the dlls and C# version but this error is still stands

#

I'm probably missing something but what could it be?

copper nacelle
#

are you referencing the hook dlls

elder radish
#

what is the full name of it?

light zodiac
#

The mmhooks_assembly-csharp

elder radish
#

Nop I wasn't, now it seems like the errors are gone thanks

light zodiac
#

Thank you to whoever deleted that

floral blade
light zodiac
#

?

#

There was a message above with a random sketchy link

#

Probs for deleted by mods

floral blade
#

oh! i thought you wrote that in context of the previous message

#

my bad!

light zodiac
#

Lol

floral blade
#

is there a way to determine if the mod menu is opened from options menu or from the main menu?

#

(should i just check if hc is present ?)

jolly oriole
#

gamemanager scenetype maybe? idk if it has a method

floral blade
#

^ how does one do this ?

dark wigeon
jolly oriole
floral blade
vocal spire
#

But you can’t access the menu in that scene

floral blade
#

but this pointed me in the direction of directly using the scene name

jolly oriole
#

as if you can open the menu there

floral blade
#

you cant pause in the middle of stag travel ?

vocal spire
#

No?

copper nacelle
#

No

#

That just skips the cutscene

vocal spire
#

Thanks for the mod idea tho

#

I know what I’m doing today

#

Being lazy and not doing that

floral blade
#

damn sorry for doubting you SF!

jolly oriole
#

tbh i just picked the first thing that jumped at me when i searched for "menu"

vocal spire
#

shhhhhhh

#

Just assuming though you can’t pause in a non gameplay scene

#

Since it’s not gameplay

#

1/2 of my playtime in hk is running through the pause menus cause why not

#

epic gameplay right there

floral blade
vocal spire
#

I’d feel weird seeing a frame of a cutscene while paused

floral blade
patent zealot
#

so im trying to make crystal guardian spawn shockwaves whenever it lands on the ground from a jump so did how gpz does it by spawning it from a global pool but unsure of what to do as this isnt working, was wondering if i could have some help

#

<@&283547423706447872>

#

ty

indigo scroll
#

thx

charred topaz
dark wigeon
#

I can debug but I won't have a computer for a while

#

I'll let you know when

vocal spire
patent zealot
#

oh ok

vocal spire
#

You can just leave storeobject null if you want

#

Iirc everything has null checks

patent zealot
#

gotcha

runic wind
#

has anyone dealt with masks before? I'm trying to mask an image panel so it's only visible within a square, but changing the transform of the mask just changes the size of the image instead of masking it

jolly oriole
#

yes, i've dealth with masks before

runic wind
#

do you have some example code or a github link?

jolly oriole
#

i have a screenshot, 1 sec

#

in the middle you see the selected gameobject, with a sprite mask (which masks whatever given a sprite as a template) to let the black spriterenderer be see-through.
that background plane has the mask interaction Visible Outside Mask then set

runic wind
#

oh sorry, I meant purely through scripting

#

I need to confine an image I created within a square

jolly oriole
#

why not make the image smaller in the first place? 😅

runic wind
#

the idea is to make a square like this, with diagonal stripes. The best way I can see to do it is to make 10 or however many stripes horizontally in a square sqrt(2) times larger, rotate the base panel 45 degrees, and then mask it so you can't see the corners

runic wind
#

ok, I'm trying this a completely different way with meshes. However, the color doesn't display correctly and I think it's because I don't have a material for it. How can I make a very simple material (just a solid color)?

runic wind
#

what unity version does hk 1.4.3.2 use?

copper nacelle
#

2017.4.10f1

primal latch
#

@copper nacelle what are the features that you still want to add before release?

jolly oriole
#
  • some IL rewrites
  • potentially a way to get mono module process
primal latch
#

Mono module process?

#

And how would you rewrite il? Isn’t that the intermediate language that c# compiles to?

copper nacelle
#
  • change reflection helper api
  • few more obsolete things to kill
#
  • change some hook signatures
#

the design on some of them is questionable

primal latch
#

Ok

#

So nothing that I can really help with

#

Don’t ask me why but I’m considering challenging myself to rewrite the modding api in cil

nimble lake
#

yea same

jolly oriole
#

il seems interesting

copper nacelle
jolly oriole
#

even though it took me like 20 minutes to find how i could do that 'Assembly-CSharp' part

copper nacelle
#

gg you can now implement unsafe

jolly oriole
#

unsafe as in

unsafe {}

or as in "so many things will go wrong"?

copper nacelle
#

System.Runtime.CompilerServices.Unsafe

#

Unsafe.As<TFrom, TTo> is just ldarg.0; ret;

jolly oriole
#

still unsure if you mean that in a 'that is unnecessary' or in a 'that is actually good' way, but 👍

floral blade
#

OnLoadLocal seems to be getting called on menu screen for me, what save game would that be loading ?

copper nacelle
#

all of them

#

it loads the saves at startup for the previews

#

and I just think it's cool because you can do a lot in IL which you straight up can't represent in c#

floral blade
#

so till player selects a save, localSettings should be ignored i guess

jolly oriole
#

currently puzzled how i tell il that Initialize is to be override

#

wait, i have ildasm

#

i can just look at how its done

copper nacelle
#

virtual hidebysig

jolly oriole
#

found hidebysig virtual instance, probably the way to go

copper nacelle
#

oh yeah instance lmao

#

can do ldarg.0 and use actual log too

jolly oriole
#

probably good, because i don't see a single log of it

floral blade
copper nacelle
#

I don't think so

jolly oriole
#

hm, it doesn't want to log for some reason

copper nacelle
#

did you add hidebysig

#

matters with the overload

jolly oriole
#

yes

#

currently looks like

.method public hidebysig virtual instance void Initialize() cil managed
{
    ldarg.0
    ldstr "Initializing"
    call instance void ['Assembly-CSharp']Modding.Loggable::Log(string)
    
    ldarg.0
    ldstr "Initialized."
    call instance void ['Assembly-CSharp']Modding.Loggable::Log(string)
    ret
}
copper nacelle
#

.method public hidebysig virtual
instance void M () cil managed

#

yeah ok

jolly oriole
#

but i'm seeing things like this in dasm, which i think i need that this class can be recognized at all

copper nacelle
#

make your class auto ansi beforefieldinit

#

Yeah your ctor is missing

#

you gotta call the base class constructor

jolly oriole
#

nvm, that image is from the wrong piece of code (i hate 2 space indentation)

#

but i found the part from the actual class

copper nacelle
#
    .method public hidebysig specialname rtspecialname 
        instance void .ctor () cil managed 
    {
        // Method begins at RVA 0x205c
        // Code size 8 (0x8)
        .maxstack 8

        IL_0000: ldarg.0
        IL_0001: call instance void [Assembly-CSharp]Modding.Mod::.ctor()
        IL_0006: nop
        IL_0007: ret
    } // end of method

?

jolly oriole
copper nacelle
#

serializable sealed nested ax1uWide3

jolly oriole
#

oh wait, i forgot ret

#

now it looks better in dnspy

copper nacelle
#

gg

jolly oriole
#

the smallest hk mod can be 2 KB

copper nacelle
#

uh huh

jolly oriole
#

i commented everything out, that it's base constructor & initialize and only the reference for the base class, resulted in 2 KB filesize, though i can try leaving out the initialize function

copper nacelle
#

oh I thought you meant ≤

jolly oriole
#

oh

primal latch
#

@jolly oriole how do you get it to compile? I installed an extension but it still throws compiler errors

jolly oriole
#

ilasm .\CursedModIL.il /dll

#

i don't use vs for this

copper nacelle
#

any ilproj

jolly oriole
# copper nacelle any ilproj

they suck, at least with an extension which allows for il it still somehow needs .cs files and that just sucks

copper nacelle
#

what

jolly oriole
#

with the ILSupport extension you still have fragments of c# generated IL in the resulting DLL, can't optimize it fully 😤

copper nacelle
#

shit extension

#

I mean an actual ilproj

#

e.g.

floral blade
#

my mods menu seems to disappear now after quiting to main menu , and i dont see a clear stacktrace anywhere
😦

vocal spire
#

time to learn il

prime urchin
#

TIL that ilproj exists

glossy pilot
#

hotreload feature when shroompog

copper nacelle
#

you need your own appdomain and all for that

#

aids

jolly oriole
#

you could reload the default appdomain

#

and as some gameobjects are marked as dontdestroyonload, you would need to destroy every gameobject manually before reloading

jolly oriole
primal latch
#

What does he mean by hotreload? That you can reload mods without restarting the game?

jolly oriole
#

yes

#

basically a soft restart

glossy pilot
#

It seems to just keep loading new dlls in specific folder without having to unload dlls, so no need to care about AppDomain?

jolly oriole
#

interesting module the appdomain has

#

nothing can go wrong

#

CannotUnloadAppDomainException: The default appdomain can not be unloaded. smh

copper nacelle
#

yeah you can't do default

jolly oriole
#

tbh i don't know what would happen if it did unload

copper nacelle
#

we do a little unloading the entire clr

safe hamlet
#

bro wdym

#

it would die

#

the default must be loaded until the end of the process

copper nacelle
#

virgin System.Exit vs chad unload the default app domain

jolly oriole
#
NotSupportedException: Specified method is not supported.
  at System.Runtime.Remoting.RemotingServices.IsTransparentProxy (System.Object proxy)
  at System.Runtime.Remoting.RemotingServices.Marshal (System.MarshalByRefObject Obj, System.String ObjURI, System.Type RequestedType)
  at System.AppDomain.GetMarshalledDomainObjRef ()
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.AppDomain.InvokeInDomain (System.AppDomain domain, System.Reflection.MethodInfo method, System.Object obj, System.Object[] args)
  at System.Runtime.Remoting.RemotingServices.GetDomainProxy (System.AppDomain domain)
  at System.AppDomain.CreateDomain (System.String friendlyName, System.Security.Policy.Evidence securityInfo, System.AppDomainSetup info)
  at System.AppDomain.CreateDomain (System.String friendlyName)
  at Modding.ModLoader..cctor ()
Rethrow as TypeInitializationException: The type initializer for 'Modding.ModLoader' threw an exception.
  at OnScreenDebugInfo.Awake ()

why

ornate rivet
#

what if

primal latch
#

What are you trying to do?

jolly oriole
#

trynna add an AppDomain

primal latch
#

Ah

vocal spire
#

Ah, a while ago somebody tried that and apparently it’s broken with unity

primal latch
#

Fun

#

Just like custom scene shaders are always broken

primal latch
#

Maybe there is a difference

vocal spire
#

¯_(ツ)_/¯

#

Judging by the NotSupportedException I’d say it’s still not supported

primal latch
#

Fair point

jolly oriole
#

apparently people worked around that by having a custom mono version they use

primal latch
#

The lengths we go through to mod a 3-4 year old game

copper nacelle
#

It's probably the same emit deal

#

You gotta override the mono path and all

#

Pita

jolly oriole
#

i think i did something wrong

copper nacelle
#

🥴

jolly oriole
#

it apparently didn't like this

copper nacelle
#

oh that's uhh

#

not it

jolly oriole
#

i just tried, didn't work

copper nacelle
#

Pretty sure you have to like get the module

#

Which is where the platform dependent code comes in echvoid

jolly oriole
#

i have something

copper nacelle
#

noooooooooo

#

the cross platform echtav

jolly oriole
#

though i am on windows

#

i can't test other platforms

copper nacelle
#

untrue

#

wsl2

jolly oriole
#

would need to install that

#

so out of the question

copper nacelle
#

why the fuck do you not have wsl bro

jolly oriole
#

does wsl add a context menu 'open linux bash here'? if so, i have one of the two isntalled apparently

copper nacelle
#

yeah

#

Doesn't really matter which tbh I think

jolly oriole
#

can i just open hk with wsl lol?

#

ok nvm

#

the wsl shell won't even open

#

oh yea, makes sense

#

i don't have a distribution for wsl

#

which one is good for testing

copper nacelle
#

I just have arch

jolly oriole
#

downloading ubuntu rn, may have minimal set up

#

unless i have to install steam/gog on that again

#
Enter new UNIX username: SFGrenade
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX[_SYSTEM] configuration variable.  Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.

fuck you ubuntu

#

ok, so my method gets the modules on both windows and ubuntu

#

unless starting the game from ubuntu wsl just redirected it directly to windows

rough pulsar
#

Can't you... dual boot with linux

copper nacelle
#

don't use caps

rough pulsar
copper nacelle
#

did you install steam under wsl

#

cause otherwise that's windows

jolly oriole
#

then it's windows

#
root@SFG-DESKTOP:/home# apt install steam
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package steam is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  steam-devices

E: Package 'steam' has no installation candidate

what

copper nacelle
#

rofl

#

sudo apt install steam-installer

jolly oriole
#
The following packages have unmet dependencies:
 steam-installer : Depends: steam (= 1:1.0.0.61-2ubuntu3) but it is not installable
E: Unable to correct problems, you have held broken packages.

you can't make this shit up

copper nacelle
#

lmao

#

how are you getting the module

#

psapi/kernel32?

jolly oriole
#

Process.GetActiveProcess.Modules i think, let me open vs again

copper nacelle
#

Oh what the fuck

#

Interesting

jolly oriole
#

sounds like this already solves some problems, like getting the module

copper nacelle
#

I wouldn't trust that to be portable lmao

#

Yeah it isn't

#

EnsureState throws a platform not supported looking at the reference source

#

Looks like there's a unix equivalent

#

Important part really is dlsym

floral blade
#

so.. turns out it's not my mod. the mods menu just does not appear if one does a quit to menu from a save and goes into options.

copper nacelle
floral blade
jolly oriole
#

wsl2 doesn't want to make a xserver connection ;_;

copper nacelle
#

vcxserver, turn off access control, DISPLAY=ip:0.0

#

lan ip

#

not 127.0.0.1 or anything

jolly oriole
copper nacelle
#

odd

#

I might have an idea

#

For the mono function

jolly oriole
#

PauseChamp

safe hamlet
#

wsl2 is shit

copper nacelle
#

it isn't

jolly oriole
#

now it works

#

x server

#

thanks i guess

copper nacelle
#

based

jolly oriole
#

quickly made a user and steam is updating

copper nacelle
#

I think if you do an internal import that might work out portably

#

Mildly fucked up

jolly oriole
#

installing hk rn, i hope i can just copy the mapi from the mounted drive

#

ok, i think the x server doesn't want to handle hollow knight

floral blade
runic wind
#

I'm trying to edit/use code from Rider in VS and getting a ridiculous number of errors-seems like all of the references are missing. Additionally, my VS is being weird and I can't add references. Anyone seen this before?

fickle sparrow
#

this is a problem with TC yeeting the UIManager every s&q

#

so I added some stuff to make it work for mods that have custom menu creation and w/e

floral blade
#

Yo thanks !

primal latch
#

Hey guys! If you don’t hear back from me I have killed myself. I’m going to rewrite the mapi in il.

primal latch
#

written by hand ```.assembly extern mscorlib {}

.assembly Test
{
.ver 1:0:1:0
}
.module test.exe

.method static void main() cil managed
{
.maxstack 2
.entrypoint

ldc.i4 4
call int32 Square(int32)

call void [mscorlib]System.Console::WriteLine (int32)
ret

}

.method static int32 Square(int32)
{
.maxstack 2
ldarg.0
dup
mul
ret
}vs compiled.class private auto ansi '<Module>'
{
}

.class private auto ansi abstract sealed beforefieldinit '<Program>$'
extends [System.Private.CoreLib]System.Object
{
.custom instance void [System.Private.CoreLib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
01 00 00 00
)
.method private hidebysig static
void '<Main>$' (
string[] args
) cil managed
{
.maxstack 8
.entrypoint

    IL_0000: ret
}

.method assembly hidebysig static 
    void '<<Main>$>g__Main|0_0' () cil managed 
{
    .maxstack 8

    IL_0000: ldc.i4.1
    IL_0001: call int32 '<Program>$'::'<<Main>$>g__Square|0_1'(int32)
    IL_0006: pop
    IL_0007: ret
}

.method assembly hidebysig static 
    int32 '<<Main>$>g__Square|0_1' (
        int32 x
    ) cil managed 
{
    .maxstack 8

    IL_0000: ldarg.0
    IL_0001: ldarg.0
    IL_0002: mul
    IL_0003: ret
} 

}```

#

Why does the c# version contain so much jump markers? You only need them when you want to jump to somewhere. The method names are also wierd

#

Way to high maxstacks

#

Compilergenerated attributes

jolly oriole
#

try to disassemble the il written by hand, probably also has those markers/position indicators

primal latch
#

I used an online site

#

I’ll try later

#

I just find it funny how much bigger the c# compiler makes it

primal latch
#

Wow. Il is very interesting. It can give some surprising insight. For example: the memory usage could be slightly reduced by making it inherit byte. This reduces it from 32 bits of data to just 8

jolly oriole
#

remake the entire assembly-csharp in il omegamaggotprime

primal latch
#

That would probably reduce size usage by a lot.

#

And give slight (unnoticeable) performance improvements

#

I’m not sure if we can rewrite the patches in il. That might be a problem.

#

I’ll look into that

#

I’m stupid. I just realised that the c# code is compiled to il before being merged using modcommon. That should mean it’s possible

#

@copper nacelle why did you react with that emoji? What does it mean?

#

Also, make the logginglevel enum inherit byte

copper nacelle
#

definition of premature optimization

primal latch
#

Yeah. It’s not even needed. It really shouldn’t make a difference

jolly oriole
#

yea, optimize things in c# before doing it in il, if the il part is needed at all after that

copper nacelle
#

bro why the fuck

primal latch
#

Honestly, I’m just going to try to write it in il to challenge myself. I’ll probably give up soon. Also, those small optimisations are just things I do to make a habit of writing optimised code.

primal latch
#

@copper nacelle why does AssemblyTypeAttribute have an empty constructor with an argument? I don’t see the use in it.

copper nacelle
#

I didn't write it idk

primal latch
#

Who did?

#

If you don’t know it’s fine too

copper nacelle
#

serena

primal latch
primal latch
#

There is nothing in it yet. I forgot to push. I’ll do it later

jolly jungle
#

Anyone knows why FSMViewer keeps crashing?

jolly oriole
#

use the newest version

jolly jungle
#

Isn't the june 15 one the latest?

#

Unless someone else continued it

copper nacelle
#

use the Avalonia one

jolly jungle
#

Oh ok

#

Where do I get it?

jolly jungle
#

Thanks

#

I might've taken the wrong thing, not sure

#

is it meant to have a hell lot of files floating around?

dark wigeon
#

blame avalonia

jolly jungle
#

Ah wait I found it

#

Alright so I just copy this folder with everythign in it right

dark wigeon
#

or .net

jolly jungle
#

and then run the exe in there

jolly jungle
copper nacelle
#

single file release for optimal 100mb executable

#

terrible

dark wigeon
#

yeah but it just copies it to the temp directory

copper nacelle
#

that's true

dark wigeon
#

so it just hides it being multiple files

dark wigeon
jolly jungle
#

extract, thats what I meant

#

I do need all the files around the exe, right?

dark wigeon
#

yes

#

Just put a shortcut on your desktop if it bothers you

light zodiac
dark wigeon
#

most of it you do need though

jolly jungle
dark wigeon
#

it's a windows publish so most of the non windows dlls have already been stripped

jolly jungle
#

Wait how do I move between two FSMs

dark wigeon
#

there's no tabs if that's what you're asking

#

it just discards the last

jolly jungle
dark wigeon
#

yeah well the last fsm viewer tab support was an actual hack

jolly jungle
#

please tell me you'll add that in sometimes in the future

jolly jungle
dark wigeon
#

like awful

#

don't look

jolly jungle
#

Oh dear

#

Welp that sucks

jolly oriole
#

probably the cause of some tab related crashes lol

dark wigeon
#

it can be done better but I can't code it right now

jolly jungle
#

So we'll never get multiple tabs FSMViewer

jolly oriole
#

you can pr it

dark wigeon
#

or that

jolly jungle
#

you were in here three seconds ago

#

you can suffer a ping

jolly oriole
#

no, i refuse to suffer

dark wigeon
#

what it I stream myself adding tabs

#

10/10 stream

jolly oriole
#

i'd watch

vocal spire
#

I’d watch for like the 10 mins I have free atm

dark wigeon
#

well not now

#

probably tomorrow

vocal spire
#

Ah, I’d watch it then

jolly jungle
#

ping me when you stream it

dark wigeon
#

ok

primal latch
#

I’ll watch if I have time. Ping me

primal latch
#

remember that I said I was going to rewrite everything in IL? Yeah. Way too much work

copper nacelle
#

shocking

primal latch
#

Yeah

#

Never expected that

jolly jungle
#

Any idea why removing the third action on In Air caused the enemy who threw the projectile (sturdy fool) to freeze sometimes when I hit the projectile?

#
    _control.FsmVariables.GetFsmGameObject("Pickaxe").Value.LocateMyFSM("collide_with_wall").RemoveAction("In Air", 3);
});```

This is what I did to the fool

#

the fsm seen in the image is the projectile's collide_with_wall

#

Wait actually it doesn't seem to be when I hit the projectile

#

I can't tell what does cause it

#

Yeah alright this time I had zero interaction with it but it still froze in place

#

These two threw once and then both froze

#

I'm gonna try some stuff but if anyone has any idea how what I did caused this please tell me