#archived-modding-development

1 messages · Page 523 of 1

copper nacelle
#

unity + redirect to reference mscorlib xml

jolly oriole
#

oh yea, that unity xml with the typo in some vector stream function

copper nacelle
#

lmao

#

i swear

#

the mono internal function is actually more portable

jolly oriole
#

look in the uimodule xml on line 267 and tell me that it's a vertex st(r)eam

copper nacelle
#

corrisponding[sic] pauseshroom

jolly oriole
#

oh lol

copper nacelle
#

breaking modhooks part 2

vocal spire
#

yay

ornate rivet
#

kill me

vocal spire
#

no, first pale court

fickle sparrow
#

true

copper nacelle
#

removed the nullable stuff as you can return orig and that was confusing anyways

#

and then simplified the bool tryget stuff to just use a return

#

removed 'orig' from langget vs current as people didn't think it was too helpful

#

generally this should be easier to use now, the main change from 1432 just being that sets return instead of setting themselves and gets get the original value

#

hopefully not too much of a pain to update but i think it'll be nice

vocal spire
#

new hk update again?

#

was in the middle of debugging fyremoth, then steam is updating hk....

#

I may or may not have also crashed steam

vocal spire
vocal spire
#
[ERROR]:[API] - Error: System.NullReferenceException: Object reference not set to an instance of an object
[ERROR]:[API] -   at System.Delegate.Combine (System.Delegate a, System.Delegate b) [0x00030] in <9577ac7a62ef43179789031239ba8798>:0 
[ERROR]:[API] -   at Modding.ModHooks.add_LanguageGetHook (Modding.LanguageGetProxy value) [0x00008] in <c2a48dab016a4177be1ebaa8c1a99f48>:0 
[ERROR]:[API] -   at Fyremoth.Fyremoth.InitCallbacks () [0x00013] in <858ad8b8baf0461eabc995e5fc05b2ed>:0 
[ERROR]:[API] -   at Fyremoth.Fyremoth.Initialize (System.Collections.Generic.Dictionary`2[TKey,TValue] preloadedObjects) [0x0015b] in <858ad8b8baf0461eabc995e5fc05b2ed>: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 <c2a48dab016a4177be1ebaa8c1a99f48>:0 
[ERROR]:[API] -   at Modding.ModLoader+<LoadMods>d__8.MoveNext () [0x00534] in <c2a48dab016a4177be1ebaa8c1a99f48>:0 ```
strange error
#

something tells me I did something else wrong

#

Seems to just be a problem with LanguageGet

copper nacelle
#

works for me

#

what did you do

vocal spire
#

I cloned and built the api

#

That’s all

#

tried again with the one from actions with the same result

copper nacelle
#

the one from actions is about one hk version old

vocal spire
#

well I did something very wrong

#

verified files, was fine, tried again with the built one, same result

#

imma sleep for now

primal latch
#

Did they update how they implement language?

primal latch
primal latch
#

Fyremoth leaks but not really

light zodiac
#

is the mapi in actions updated to .75?

jolly oriole
#

I meant to reply to the hk update message but mobile sucks

copper nacelle
#

no

#

it'll be updated when I can be bothered downloading the Linux version again

jolly oriole
primal latch
#

Although it is probably broken

light zodiac
#

thanks

primal latch
#

Is our way of using hooks up to date?

jolly oriole
#

Idk

primal latch
copper nacelle
#

why did you ask then bro

primal latch
copper nacelle
#

idk what this means

primal latch
#

There was an issue with zips by macOS that created a wierd file that also had the extension .dll and that crashed the game

copper nacelle
#

should then ig?

light zodiac
#

this is hilarious

#

thank you for adding it

jolly oriole
#

Wait, you added that to the mapi itself? Lmao

floral blade
#

epic

copper nacelle
#

it's good for runs

#

Can't hide it

floral blade
#

someone dedicated enough could hide both top left list and the icon tamershrug

copper nacelle
#

if you're hiding the icon without modifying the API it gets kinda obvious you get me

#

it's also clearer than like the tiny text

#

it's also fun

#

not perfect obv

floral blade
jolly oriole
#

passed my exam, so now i can port mods to the new MApi / hk version

#

smh, not verified commits

rough pulsar
#

everyone is too lazy to make a GPG key fleacrying

jolly oriole
#

don't worry, like 10% of 56's commits are verified

jolly oriole
#

oh no, i have to build myself, no ci for it smh

light zodiac
#

If you're lazy

jolly oriole
#

can i trust that though? palehmm

#

i have aquired mapi

#

also adding xml docs while porting

jolly oriole
#

thanks

jolly jungle
#

Bravo, friend

#

Good luck with everything

jolly jungle
jolly oriole
jolly jungle
#

Is it entirely functional?

jolly oriole
#

it's about as functional as the other sprites

jolly jungle
#

No the mapi

jolly oriole
#

it do be working

jolly jungle
#

I thought 1.5 mapi wasn't yet complete

#

Cool

#

Which link should I get it from?

jolly oriole
#

afaik 56 still wants to remake a bit of it, but most of it is done

#

mul posted it a bit earlier

jolly jungle
#

Thanks hollowknice

#

So what changes will all mods need?

jolly oriole
#

a few

cedar hemlock
#

i believe modhooks are static more idk (exept 2020 and 4.7.2 )

jolly jungle
jolly jungle
cedar hemlock
#

not that i know but i haven't been keeping up date rly

jolly oriole
#

modhooks static, the signatures of those also changed afaik

light zodiac
#

save settings changed

#

new modmenu stuff

#

set/get player bool/int/string hook, language.gethook, reflectionhelper changed

jolly jungle
#

can you, perhaps, send me basic documentation/a list of changes?

#

If it's not too much

#

It probably is though

light zodiac
#

56 put examples follow those

cedar hemlock
#

try looking at the commits

#

maybe those can help a little

jolly jungle
jolly oriole
#

in the repo

jolly oriole
#

oh damn, sfcore even gets an update, the item helper now should show amount of items you have (36 rancid eggs count as a single item) / total amount of items (121 rancid eggs count as a single item)

#

well, not "now", but when i upload it

floral blade
#

so like a count of held type of items / total types of items ?

jolly oriole
#

yes

#

before (or currently, depending on how you want it) it displays the numbers of the hunters journal

floral blade
#

ah cool

primal latch
jolly oriole
#

i hate discord

primal latch
#

also: why does the mapi use a custom version of mscorlib?

jolly oriole
#

to have reflection.emit

jolly oriole
primal latch
#

ok

jolly oriole
#

apparently building it just now worked, so

#

i just add a counted item with a custom sprite, right?

floral blade
#

Expansion of my flappy knight idea:

The player is a shade, and they're looking for their hollow shell (the mask they drop on death),player has infinite 'jumps' and touching any and all walls damages the shade. picking up the shell allows the player to play as the knight for a short duration of time but every shell breaks eventually.

defeating THK is just a way of stealing their shell, permanently.

jolly oriole
primal latch
jolly oriole
#

how you encountered the bug

primal latch
jolly oriole
#

<@&283547423706447872>

cedar hemlock
#

<@&283547423706447872>

primal latch
#

<@&283547423706447872>

cedar hemlock
#

too late

jolly oriole
#

lol

wary rose
#

guys

#

one at a time

glossy olive
#

Thank you

#

Also

cedar hemlock
#

lol

primal latch
#

lmao that was fast

glossy olive
#

They do it in several channels

primal latch
jolly oriole
lofty quiver
jolly oriole
#

sfcore itemhelper bug, 2 keys displaying flower sprite

primal latch
lofty quiver
#

Yea, if you need i can send a screen, but not now...

lofty quiver
primal latch
#

the screenshot flare sent

lofty quiver
#

Ok

jolly oriole
lofty quiver
primal latch
jolly oriole
#

i own it since matpat did his theory

#

time to test items

primal latch
jolly oriole
#

where was a debug build for .75 again?

primal latch
#

you mean of the mapi?

jolly oriole
#

nah, debug mod

primal latch
#

Don't think there is one

jolly oriole
#

thanks

primal latch
#

is there a .75 modcommon build?

jolly oriole
#

uh, can others try to debug themselves geo? i don't get the geo

jolly oriole
#

hm, weird

#

ok, setint and getint hooks don't seem to work like the docs suggest they do

#

having

private int OnSetPlayerIntHook(string target, int orig)
{
    return orig;
}

makes it so i never get geo and possibly any other pd int

copper nacelle
light zodiac
jolly oriole
#

both

jolly oriole
#

get works fine

light zodiac
#

I'm able to get geo using debug mod

primal latch
#

same

jolly oriole
#

i know how to fix the setint hook, i'll just throw an exception and then it will work

copper nacelle
#

oh I'm bad

jolly oriole
#

maybe

#

nvm

copper nacelle
#

return.png

primal latch
#

does anyone have a .75 build of modcommon?

vocal spire
#

I’ve got one that kinda works

primal latch
#

nice

#

because without modcommon Fyremoth destroys the save select

vocal spire
#

Same one I used for other 1.5 patches

primal latch
#

for some wierd reason

vocal spire
#

Has that been my problem

primal latch
vocal spire
#

My Modcommon fails to load but the library part is fine

#

I will figure out why that happens

jolly oriole
#

imagine having anything fail

vocal spire
#

Did you really think I’d put in the effort to slightly change modcommon’s code?

primal latch
#

not really

vocal spire
#

Yep I remove fyremoth and it’s fine

#

Why

jolly oriole
#

not updating legacy code elderCUltra

copper nacelle
#

updating modcommon I sleep

#

using it as an excuse to not use it again I awaken

jolly oriole
#

change every method to

throw new NotImplementedException();
vocal spire
#

Ah yes I love when windows stops working zote

light zodiac
primal latch
#

oh my god

vocal spire
light zodiac
#

turning?

patent zealot
#

beeg knight

light zodiac
#

also why doesnt it become big from y and x. currently is only becoming big on y

primal latch
#

because

#

just because

floral blade
jolly oriole
#

56, can you remove that single line? it's literally killing everything rn

copper nacelle
#

I can but will I

#

and yeah after I get out of bed

light zodiac
#

that is probably the reason then

jolly oriole
copper nacelle
#

very true

#

do it on vector3 too if you do

#

I missed it there as well

floral blade
light zodiac
#

i changed that but it still doesnt change the knights x scale

floral blade
#

There's also the setscale fsm thingy

light zodiac
#

in setVignette?

floral blade
#

Oh wait there's also the check to see if you're actually smol or not

light zodiac
floral blade
#

Yes but this should only impact if HKMP is on iirc

#

Maybe there's a vanilla check to fix x scale ?

jolly oriole
#

oh damn, i appear to have made an error with selecting the sprite to display

#
defaultSprites["Simple Key"] = (Sprite) UObject.Instantiate(equipmentGo.FindGameObjectInChildren("Xun Flower")

nice

light zodiac
#

I'm just gonna yeet everything that related to hkmp for now

floral blade
#

Makes sense

jolly oriole
#

my game isn't responding smh

#

nvm, it did

#

i have aquired ke

floral blade
vocal spire
#

Iirc that makes the knight flash different sizes, might be remembering wrong tho

floral blade
jolly oriole
#

does the chinese translation use traditional or simplified chinese?

#

nvm, appears to be simplified

#

more custom text (lower right corner)

floral blade
#

@light zodiac seems to be working fine! (edit: figured it out)

#

a feature request though: can you change the number of the save in the save select screen to match it's backup number ?

light zodiac
#

I updated to a new version

floral blade
#

this is save 12, yet the number says 4

light zodiac
#

This should save as save 12

#

And it does

#

Just the menu didn't update because uimanager needs to be destroyed for getmenuscreen to be called again which is required to generate new buttons

floral blade
#

this looks great! could the note be made static / the first thing the player sees ?

floral blade
fickle sparrow
#

you can always manually do the menu stuff btw

floral blade
light zodiac
#

Oh like that

floral blade
#

i call it manually to update ck

fickle sparrow
#

like you can edit MenuScreens

#

even after the thing calls GetMenuScreen

floral blade
#

for example, i just keep a reference and call menuSetting.RefreshValueFromGameSettings() to update the horizontal lists

fickle sparrow
#

yeah

#

all of the actual Modding.Menu code should be able to just be done through user code

floral blade
#

yes i tried that, made a custom knight entry beside mods lol was fun

#

that's how i figured mods menu was being yeeted

fickle sparrow
#

yeah if you don't even want to use the ICustomMenuMod shit

#

you just hook on to UIManager.EditMenus

floral blade
fickle sparrow
#

yeah

#

but sometimes you need a lot more direct control

floral blade
#

so that players didn't need to go in 2 level deep menus

fickle sparrow
#

mhm

#

I might look into making a better way to add things directly to the options menu?

#

I'll see

floral blade
fickle sparrow
#

I don't want to pollute the option menu though

floral blade
#

please consider a small taskbar like menu on the top of the screen, that can be hidden

fickle sparrow
#

maybe

#

the problem is that tc does not have super good infrastructure for that

floral blade
fickle sparrow
#

I guess it is pretty simple

#

only 15 lines or something

floral blade
fickle sparrow
#

I'm confused then

#

do you just mean a taskbar in the pause menu?

floral blade
#

yes, pretty much

fickle sparrow
#

ah pauseshroom it would be ugly pauseshroom

#

I'll leave that to a mod to add ngl

floral blade
#

it would be tiny and would auto hide sadcowgrub

fickle sparrow
#

part of my goal for the mod stuff built into the api

floral blade
#

no more clutter on pause menu even for mods like debug

fickle sparrow
#

is to replicate the look and feel of vanilla menus

#

and this would be a fairly dramatic break from that

floral blade
#

that is true, the menu looks and feels seamless i cannot argue with that loveblood

fickle sparrow
#

yeah they look seamless because I spent like a month or something reverse engineering all of the structures ax1uWide3

#

also I'm not sure how controller players would navigate something like that

#

cause it might be kinda counter intuitive

floral blade
#

the only reason i want something like that to be a part of mapi is :

it gives everyone a clear incentive to use the standard way of doing it rather than a bunch of ways of implementing it existing & it would be better than current pause menu clutter that exists.

fickle sparrow
#

wait what pause menu clutter

floral blade
#

i agree that there's not a simple solution for controller players either, because that would be kind of upto the mod to implement, just a standard way to show / hide a mod's interface is all i ask

fickle sparrow
#

honestly though like

#

keybind to show the menu

#

its possible in game I think

#

maybe

floral blade
fickle sparrow
#

oh is it because they like

merry lotus
# fickle sparrow wait what pause menu clutter

A lot of mods in 1.4 use their own menus on the pause screen, and they overlap of you have some of them at the same time. Some mods are adding ways to toggle their UI, but it's not a standard

fickle sparrow
#

had info when you pressed f1

#

oh well

#

put them in the mod menu imo

floral blade
merry lotus
#

Does the mods menu currently go Options > Mods in 1.5, like in 1.4? Because a simple change of putting Mods into the top menu would already be nice.

Possibly a shortcut code could be put in to pull it up too, like SHIFT + [Pause button] could pause and instantly open mod options. ||(This might be overkill though.)||

fickle sparrow
#

so much effort

#

and again I want to keep the mod menu its own thing

light zodiac
fickle sparrow
#

and not stick everything in the option menu

light zodiac
#

i was just being stupid

fickle sparrow
#

if you wanted you could add a custom keybind to pause -> switch to menu

#

just create a coro thats like

merry lotus
#

I meant put the button for mod menu in the top pause menu, assuming it's currently in the options menu. I haven't messed around with the 1.5 API stuff, so for all I know is already there.

light zodiac
#

so like GameManager.instance.TogglePause() and then UIManager.instance.UIGoToDynamicMenu(yourscreen) to open that screen?

fickle sparrow
#

PauseGameToggle but yeah exactly

#

it should be easy

floral blade
#

the problem is : if it's upto mods to implement a pause menu they'd all come up with different solutions and it'll be back to the old setup pretty soon i think and then show/hide the keybindings setup is back again where you have to hide all other mods before you use one and so on and so forth.

instead if we could have a "hide all mod uis except this one" button that was part of the api itself i feel like a lot more mods would be onboard with that

fickle sparrow
#

you see

#

you can have bindable keybinds now

#

and this would interface directly to the menu

#

so it would be hide all mod uis except this one

floral blade
#

with custom pause menu UIs i.e.

light zodiac
#

see timer mod 1.5 its pinned

#

wait i misunderstoof

#

nvm

fickle sparrow
#
yield return GameManage.instance.PauseGameToggle();
if(GameManager.instance.gameState == GameState.PAUSED) {
  yield return UIManager.instance.GoToDynamicMenu(myMenuScreen);
}
#

basically this

#

im not sure if you need to iterate through the two things that are being yield return'd

#

but its a solid maybe

#

anyways

floral blade
#

yes but custom menus just draw whatever they want when the game is paused right ? grubsad

fickle sparrow
#

no

#

they would use the menu api

#

you can place text panels and shit on the menu screens

floral blade
#

oh if they all used the menu api then it would work

fickle sparrow
#

yes

floral blade
#

yes

fickle sparrow
#

like you can just create a MenuScreen wrapped around your custom drawing

#

all of this garbage is optional

floral blade
#

yep gotcha, now to just incentivise people to use this in their mods vs just drawing beside pause menu

fickle sparrow
#

well I mean

#

its super easy to like

#

kinda use the menu

#

so if they don't use it

#

trolling imo

floral blade
#

i like it , i just want it to be used a bunch so i can have my mods and my clean pause menu

fickle sparrow
#

yeah

#

I just need to make sure of something

#

what does this do

#

it just adds a single frame delay to the start wtf

#

w h a t

#

local girl is incredibly confused

candid sapphire
#

How would I add a boss to godhome?

fickle sparrow
#

well it kinda works

#

its just slow

#

I'm gonna implement a patch that moves it directly to the screen

floral blade
#

i present to you my bad krita edit

light zodiac
light zodiac
floral blade
fickle sparrow
#

yeah but like pauseshroom not scaleable at all

#

horizontal scroll bars are cursed

vocal spire
#

Does the modding.menu stuff reload on language change?

fickle sparrow
#

doubt it

jolly oriole
#

smh

fickle sparrow
#

lang integration is extreme effort

#

create a component that auto edits the text tbh

vocal spire
#

Ok

jolly oriole
vocal spire
#

Yeah

fickle sparrow
#

yeah then just add that

#

its so easy

#

adding it to the api is so much effort

#

and way too many settings for it imo

jolly oriole
#

(- textfield)

  • sheettitle
  • textkey
floral blade
#

it also makes accessing mod menus a pause + one click without cluttering the pause menu itself too much

fickle sparrow
#

that completely breaks the vanilla feel honestly

#

so I'd rather not include it in the api

fickle sparrow
#

people can add this themselves its super easy

#

I have the out variables for a reason

floral blade
#

yeah but then it's not a standard so no one would do it 😦

vocal spire
#

Just switch the text for Lang keys

floral blade
#

either way i think i won't change your mind feelsgrubman i accept defeat

fickle sparrow
#

fine I might add a lang key meme

#

if C# had sum types it would be like so much nicer

light zodiac
fickle sparrow
#

I am adding something to make it easier

light zodiac
#

I'll wait for that ig

jolly jungle
#

I entirely forgot to ask

#

Who's working on a 1.5 modcommon?

floral blade
jolly jungle
#

Gonna all be in the MAPI?

floral blade
#

no i yeeted it and copied thingies into my mod

jolly oriole
#

nah, other lib mods or copy pasted into the mod

jolly jungle
#

Oh shit

light zodiac
#

SFCore when

jolly jungle
#

So I'm gonna have to copy in all the fsm stuff?

jolly oriole
light zodiac
#

who needs docs

jolly oriole
#

true, some helpers have a single public function, idk if i need to tell the people what that function is called

fickle sparrow
light zodiac
#

forcing modders to play ag nice

floral blade
jolly oriole
#

All staGs

floral blade
#

i am just as confused now as i was earlier lol , do they mean that they cant save and quit so they need to get all stags to finish the game ?

jolly oriole
#

yuri

#

no need to autotranslate

#

or: have those as additional methods and let the users care about having the correct lang strings

light zodiac
floral blade
#

oh the one where the menu makes one float ?

fickle sparrow
#

ok this is working

#

I also uh

#

broke the mods that use menus

#

🥴 they just need to be recompiled

copper nacelle
#

🥴

fickle sparrow
#

look whats a little breakage

#

its not my fault C# handles optional arguments in a scuffed way

#

anyways tldr

#

free trick

#

idk if the null check is really useful but can't be too safe

#

you can also call PauseToggleDynamicMenu(menuScreen, true) to be able to actually toggle it instead of only opening it

light zodiac
#

nice

fickle sparrow
#

I spent like 10 minutes trying to figure out why the the menu wasn't closing

#

and then I realized I forgot to set the ui state to paused

#

also if you wanted to add some sort of taskbar

#

I think you should be able to get all of the loaded menu mods and construct it yourself

#

basically a budget modlistmenu

#

I'm like 35% sure you can get a list of all loaded mods

#

from outside code without reflection

#

of course you can just use reflection if you need to but echaleph

floral blade
#

but won't one need to build new menus then ?

#

by calling GetMenuScreen ?

fickle sparrow
#

I guess I can cache the built menu screens or something

floral blade
#

and expose them to a public thingy popseeker ?

fickle sparrow
#

yeah

#

just in a map or some meme

#

in modhooks ig

jolly oriole
#

i love letting others handle things

fickle sparrow
#

alright

#

BuiltModMenuScreens gets wiped each EditMenus call

#

wait I made a funny error

#

actually I doubt anything will happen

jolly oriole
#

why am i bothering with letting users pick unique names? but do i want to generate random strings?

fickle sparrow
#

I guess this is a feature

light zodiac
#

With ICustomMenu is Getmenuscreen called before the mods initialize?

fickle sparrow
#

its called at the same time as IMenuMod btw

light zodiac
#

Nice. I just wanted to know whether I would get screwed over for including a dict in init and looking for that

fickle sparrow
#

yeah you can totally do that

floral blade
#

so if i'd just do var x = ModHooks.LoadedModInstances() at some point for example , do i need to worry about the mods disappearing from the list ?

#

if they get toggled off for example

fickle sparrow
#

nah none of them actually get mutated

#

when the menus are rebuilt

#

BuiltModMenuScreens will become a new dict

#

but the old one wont get cleared

floral blade
#

so the references my mod holds will be useless ?

fickle sparrow
#

yeah

#

just acquire a new reference the frame after EditMenus I think

#

or something like that

floral blade
#

playerupdate it is then ah yes

fickle sparrow
#

either way its functionally the same

#

because I can't really guarantee the order of EditMenus

#

most likely your hook will be after modlistmenu though

#

like just reacquire ModHooks.LoadedModInstances when you need to

floral blade
#

wait so if i understand correctly GetMenuScreen could be called multiple times throughout the life of the mod, and devs need to be careful about it

fickle sparrow
#

yeah sure

fickle sparrow
#

SubmitAction = _ => UIManager.instance.UIGoToDynamicMenu(ModHooks.BuiltModMenuScreens[thisMod])

#

this will always work as long as thisMod has a menuscreen

floral blade
#

okay this makes sense

#

will an unloaded mod have a menuscreen ?

fickle sparrow
#

yeah

#

Unload doesn't really unload a mod btw

#

the Mod instance still exists

#

a

floral blade
#

alright then this is perfect, mods don't really get added or removed after the initial load

fickle sparrow
#

yeah

jolly oriole
#

currently

fickle sparrow
#

although when the menus are rebuilt

#

I'd just iterate through them just to make sure

#
foreach(IMod mod in ModHooks.LoadedModInstances) {
  if(mod is IMenuMod immod) {
      //add the button with
      SubmitAction = _ => UIManager.instance.UIGoToDynamicMenu(ModHooks.BuiltModMenuScreens[mod]),
      // etc etc
  }
  // same thing for ICustomMenuMod
}
#

this will lazily evaluate ModHooks.BuiltModMenuScreens

#

so even if for some reason this is called before ModListMenu is built, it will still work

floral blade
#

i still gotta wait till all the mods are loaded though, i don't think there's a way to know right now when that is , correct ?

fickle sparrow
#

no the mods all load first

#

otherwise there is no way any of the mod code would be run

floral blade
#

i mean could it be that my mod could be in the middle of the load order and there are other mods that have not been instantiated, yet?

fickle sparrow
#
1. Load all mods
2. Call `Initialize` of all mods
3. Create ModListMenu
floral blade
#

ah that answers my question

fickle sparrow
#

actually

#

I'm pretty sure this is right?

#

yeah it is

#

the constructors run really early

floral blade
#

i guess there's the preload objects step after it

fickle sparrow
#

either way you don't need to worry about the load order there

#

only thing that might be sketchy is the ModListMenu?

#

but I doubt it because you're lazily accessing it

floral blade
#

there is another concern, the cancel action on all mod menus' buttons etc will take back to the mods menu and not pause menu

fickle sparrow
#

yes that is intended

#

you click escape to exit the pause menu

#

vanilla menus work the same way

#

like theoretically

floral blade
#

yep i get that it is intended but if i invoke the menu manually, then wouldnt player expectation be to go back to where they started from ?

fickle sparrow
#

you could just call the build menus again right

#

and set the modlistmenu to the option menu

#

but like I wouldn't worry about it

floral blade
#

yes, that works

fickle sparrow
#

like probably don't do that tbh

floral blade
#

some mods will probably have side effects in there i am sure of it

fickle sparrow
#

yeah thats why I wouldn't do it

#

most people will be clicking the escape button tbh

floral blade
#

true, but it does break the experience a bit.
could the modmenus not take the backmenuscreen when going to a menu ?

#

(idk if that'd break vanilla)

fickle sparrow
#

changing that would require rewriting a shit ton of code

#

I'd essentially have to keep a global stack of menus and that is hellish

#

like straight up TCs menu code cannot handle that

#

and imo its way more effort than its worth

floral blade
#

i suppose that makes sense

fickle sparrow
#

ideally the menus would have been written with a pushdown statemachine but sadly its hard coded

jolly oriole
#

i hate the delicate flower

#

even has text that you can't see in-game

#

yo 56, docs for hooks in front of the delegate or the public static hooktype hookname;?

fickle sparrow
#

auto formatter or something

copper nacelle
#

my casts pauseshroom

#

and the latter

#

mostly

#

Like you describe the hook itself, maybe an example over the hook

#

and then you explain the args/return over the delegate type

pine girder
#

Anyone do know files for gifs soul like focusing (Not for knight) I am looking for ones that does gif on vessel soul(Not mini ones)

#

I seem couldn't find ones

shy cloak
#

anyone know if gradow == fifty-six ? I think it is but it's been a long time

vocal spire
#

They aren’t the same

shy cloak
#

ok thank you 🙂

#

also nice name

#

follow up question: what's gradow's username on github? lol

vocal spire
#

Looks like it is Ayugradow

#

At least that’s what’s credited in the ModdingApi readme

shy cloak
#

404'd; i think he changed the name but the xml file is a static link

#

I think I found it?

#

thanks ❤️

pine girder
#

I want to make custom designs for certain charms, I saw killer whale's skin can do that
So I wonder
What is the file to use? I uses sprites folder from sprite packer usual. Charms aren't in there.
Is it ok to grab bunch of files from #art-discussion pinned? To use for custom skin?

vocal spire
primal latch
#

So I got some time on my hand the coming days in the afternoon. What has to be done to the mapi before release?

copper nacelle
#

stare at it really hard

primal latch
#

Why?

#

How does that contribute?

floral blade
light zodiac
#

how else do you build the menu

floral blade
#

one of the previous versions had an auto nav thingy that was removed i think , presumably that did similar stuff

primal latch
jolly jungle
#

Stare at it really hard

#

Oooh I know

#

@primal latch do you think you can start working on documentation

primal latch
#

I mean like code

#

I could try documentation

fickle sparrow
#

We already have documentation written pauseshroom

#

Theres like nothing we are really waiting on ngl

#

I mean the real thing thats the roadblock is other mods tbh

#

So if you wanna update those to 1.5 that would make things faster

#

or at least just tell the devs to update pauseshroom cause ive been developing my mod on 1.5 for like months now so its totally possible

fickle sparrow
#

it should be pretty simple

#

GridNavGraph is god tier

#

I'm gonna add more customization in the future to them

light zodiac
fickle sparrow
#

yeah but Im sure some still aren't and its better to not have a bunch of mods break on the new version plus theres not a whole lot that needs to be done to the modding api

light zodiac
#

Could fsm util stuff be added to the API?

fickle sparrow
#

wdym

light zodiac
#

This basically

fickle sparrow
#

just use sfcore then imo

light zodiac
#

Fair

jolly jungle
#

Thanks

#

I think

#

The comments, right?

fickle sparrow
#

all of our public stuff

#

has doc comments written

jolly jungle
#

K, thanks

#

I guess its time to start working on 1.5

fickle sparrow
#

so just include the xml

jolly jungle
#

thanks

jolly jungle
light zodiac
jolly jungle
floral blade
fickle sparrow
#

I mean yeah we could literally release it rn

#

but like theres no real thing in the api itself that we are waiting for

light zodiac
#

Is there a way to remove a mod from the top left of main menu?

#

Like how toggling mod does

fickle sparrow
#

dont think so plus we kinda need that for speedrun validity

floral blade
jolly jungle
light zodiac
#

My reasoning for this is since mods can make custom menus and stuff, the mod menu can have 2 entries for the mod, the toggle switch and the custom menu. It would make sense to add the toggle switch into the custom menu but then the mod still does show up on top left of main menu

jolly jungle
#

It did for others though

light zodiac
#

It appears if you call initialize?

jolly jungle
#

wdym?

fickle sparrow
#

so much effort tbh

jolly jungle
#

Anyways

#

How do I do that

fickle sparrow
#

what

floral blade
jolly jungle
#

A wait I'm dumb

fickle sparrow
light zodiac
#

Go to actions and download the mapi

fickle sparrow
#

yeah I was gonna add the toggle inside the mod menu

light zodiac
jolly jungle
fickle sparrow
#

you download it and use that as refs

light zodiac
#

Toggle just call unload and add to that dictl/list right?

fickle sparrow
#

the what

fickle sparrow
#

ok I have a solution

floral blade
#

if you disable a mod using your own toggle it still displays in top left

jolly jungle
fickle sparrow
#

why though

#

oh

#

I see

floral blade
#

because one mod having 2 entries in modmenu

fickle sparrow
#

also this is what actual mods are gonna use

#

yeah

jolly jungle
#

yknow what nevermind, I'll get this on my pc there and then come back when/if I don't unerstand

fickle sparrow
#

I'll just pass a param of the action to toggle the mod into the mod menu

#

and have IToggleableMod have a property to tell if it should be on the main mod menu

floral blade
#

so the mod can tell mapi to toggle itself on and off ?

fickle sparrow
#

yes

floral blade
#

might want it to be only off

fickle sparrow
#

it still needs to be IToggleableMod

fickle sparrow
#

yeah and

light zodiac
#

It adds to the dict and calls unload

floral blade
fickle sparrow
#

yeah

#

thats what I said

#

I'll add something to IToggleableMod

#

or actually

#

something in IMenuMod

#

this is going to break all mods

#

that use menu stuff

jolly oriole
#

I read something of "use sfcore" me happy widepeepoHappy

floral blade
#

but what if i as a bad mod dev tell mapi i will show a toggle so it doesn't need to but i dont zote ... through clever deduction skill i have concluded that it would then not need to implement the interface at all

floral blade
fickle sparrow
#

so true

#

whats a little breaking changes

floral blade
#

would the modlog display count as a modmenu ?

#

it's info that shows up and can be hidden, but is also an overlay

fickle sparrow
#

idk

#

not really

#

like things that should be overlayed while the game is playing are a bit out of scope

floral blade
#

agreed, no real way to make them interact-able via controller either

#

because it's busy controlling player

fickle sparrow
#

mhm

#

thats why I don't wanna really touch it

#

debug is already not able to really be used without a mouse

floral blade
#

oh Mul was planning to port debug to modmenu i think

light zodiac
#

I have done a grand total of 2 buttons from the top menu till now

floral blade
#

a mod that after player interacts with a certain ingame object , unloads itself and yeets it's own dll and settings file

light zodiac
#

You can't yeet you own dll unfortunately

floral blade
#

why not ?

light zodiac
#

Cuz it's currently loaded into the game

#

Unless there's something I'm missing

floral blade
#

i have deleted mods while the game was running before

fickle sparrow
floral blade
#

with IMenuMod mapi adds the toggle?

fickle sparrow
#

nope

#

you have to add it yourself

#

oh

#

yeah you still have to put it in the list

#

but the MenuEntry is preconstructed

floral blade
#

makes sense

#

at work rn , can test after

jolly oriole
#

if that works, can we just update the modinstaller to work with the amalgamation that is multi patch modlinks or the new modlinks to have the people be satisfied and not ask 36 times per hour in mod help?

fickle sparrow
#

guys why is the mod installer not working??? No i haven’t checked the pins

rough pulsar
#

guys it give me it requre most stable version to run!!!!!! what is thismean,

deep wave
#

1.5 is not stable FeelsInvertedMan

fickle sparrow
#

so fucking true

floral blade
#

btws Yuri , any plans on adding a textbox to modmenu ? not sure how it would look with vanilla styles or if it's even a common requirement.

fickle sparrow
#

ah you see

#

thats hard

#

I can't use unity's textbox

#

so I'd legit have to code one by hand

#

which I will get around to at some point

#

in fact

proven plover
#

When i try to follow the tutorial on the modding api for creating an enemy, the code always errors. Does anyone know why?
Also, i'm using Visual Studio if that helps

light zodiac
#

What is the code?

#

Using VS shouldn't affect anything

proven plover
#

Here is the code from the website:

radiant basin
#

how would i go about making a mod that replaces sprites for a boss, specifically ogrim?

ornate rivet
floral blade
light zodiac
#

What code did you use

vocal spire
#

Prob missing assetbundle

light zodiac
#

Or a reference

vocal spire
floral blade
radiant basin
floral blade
radiant basin
#

thanks!

fickle sparrow
#

like the selection and all of that stuff does not act correctly

#

I tried but it didn't work

floral blade
#

you mean the navigation graph bit ?

fickle sparrow
#

like the navigation shit itself

#

yeah all of the keyboard and controller controls

#

just died

floral blade
#

ah could you not just wrap it in a wrapper that uses mapi navigation stuff but inside is unity input ?

fickle sparrow
#

well I tried that as well

#

but its just bad

#

so much had to be changed that it was just like

#

why bother

#

like legit its just easier to write it myself xd

floral blade
#

personally i think it would be okay if we could not navigate to it in v1
as long as it emulates the feel of HK's UI since without it all mods will end up using unity's inputbox anyways

#

but yeah if it is too annoying to work with might be simpler writing your own setup

fickle sparrow
#

I mean heres the thing right

#

if I can't make it feel like the vanilla menu

#

I'd rather not advertise it to be the thing to use

floral blade
#

yes

#

that makes sense

#

the only situation where i would consider that better than mods using unity's input is if mapi updates could make it more seamless without mod devs requiring to updating

light zodiac
fickle sparrow
#

yes

#

I didn't want to auto place anything cause that would be bad

candid sapphire
#

is there an in depth guide for using weavercore?

light zodiac
#

i dont think other mods can use weaver core as a dependancy

#

I'm wrong?

merry lotus
#

Other mods can use WeaverCore

#

IIRC it just doesn't have good doumentation for others to read right now? And it currently only works in the Main Menu.

candid sapphire
candid sapphire
#

I thought a lot of mods used it

#

like corrupted kin... and a couple others

merry lotus
#

I asked Nick(? I think Nick, but I'm very forgetful with people that aren't super active) about it a few months ago.. They mentioned that one of the issues with it right now, is just that there's not very much user-friendliness in the way of using it.
Currently, I think that all of the mods that use it, are made by the person that made it, so no docs needed gorbbrain

candid sapphire
#

I see

#

is there something like it with better documentation?

light zodiac
#

it?

candid sapphire
#

weavercore

jolly oriole
fickle sparrow
#

OH

rough pulsar
#

Source code is always a documentation fleacrying

fickle sparrow
#

YEAH I KNOW WHY

#

I didn't need to look at my code btw

#

I just remember coding the bug ax1uWide3

#

wait nvm

#

pauseshroom this is correct

rough pulsar
#

you code a bug???? fleacrying

jolly oriole
#

tc coded quite a few

fickle sparrow
#

yeah I fucked up nvm

jolly oriole
#

so coding a single one isn't that big of a deal

fickle sparrow
#

rogue not

rough pulsar
#

yeah by coding what you didn't intend to do feelspkman

#

oh wait i read the sentence wrong

fickle sparrow
#

uhhhh

rough pulsar
#

don't mind

fickle sparrow
#

ok fixed it lol

radiant basin
#

@floral blade sorry im very new to c# and vs so im a bit confused, theres errors in the washer knights project so i cant build to a dll, did i load it up wrong?

light zodiac
#

which references did you add

#

cuz dandy's install is going to be different than yours

floral blade
radiant basin
#

how do i add those in?

floral blade
#

i add them manually, but i know there's supposed to be a visual studio trick to add them easier i just dont know it

light zodiac
#

i add 1 and copy the path manually in the csprof for the rest

fickle sparrow
#

I am begging everyone to use this

#

custom property is so nice tbh

charred topaz
# candid sapphire is there an in depth guide for using weavercore?

There isn't much documentation on the mod right now since it's still pretty messy and several areas of the mod are subject to major changes. However, one area that I have documented is the Settings Menu and how to create panels https://github.com/nickc01/WeaverCore/blob/master/WeaverCore/Settings/Panel.cs

You can find an example of how it's used in Corrupted Kin : https://github.com/nickc01/Corrupted-Kin/blob/master/Assets/MOD FILES/Scripts/CorruptedKinSettings.cs

Added documentation and guides for my mod is something I really want to get to. I recently finished reworking my crappy compilation system and there's a few other things on my to-do list before i get to it.

jolly oriole
floral blade
#

@radiant basin you'd want to set the path to these .dll files correctly

fickle sparrow
#

wtf

#

you just

#

link the actual managed folder

#

or have some refs

copper nacelle
#

you just change the property to your managed folder location I don't see the problem

fickle sparrow
#

yeah

fickle sparrow
#

you can change HollowKnightRefs its so clean

jolly oriole
#

... i meant that as in: contributing to other mods' projects requires me to have the hollowknightrefs of the one i'm contributing to

fickle sparrow
#

well yes that happens with all of them

#

theres no way around that because people have different file structures

#

its better than uploading all the ref dlls in the repo

jolly oriole
fickle sparrow
#

what

#

you can change the content of the HollowKnightRefs tag to literally anything

#

instead of having to change each file path

jolly oriole
#

> i can copy paste that into my .csproj (that's literally it)
> i need some extension or something
which one

copper nacelle
#

what

fickle sparrow
#

first one

jolly oriole
#

ok

fickle sparrow
#

theres no extension

#

its just a property

#

in the csproj files

copper nacelle
#

can you set properties in .csproj.user

fickle sparrow
#

uhhhhhhh

#

maybe

copper nacelle
#

or whatever the fuck it's called

fickle sparrow
#

I think?

#

that would be super ideal

copper nacelle
#

I remember I had a different file path so I just added the ref twice to someone's project with a condition for the file existing

#

Ideal

jolly oriole
#

time to update some mods hotdogHotdog

fickle sparrow
#

I can find 0 documentation on csproj.user

jolly oriole
#

i should write a python script or something to automate that for me

#

i don't want to do this by hand

floral blade
#

meanwhile me : make a symlink in ./vanilla in each mod and actually point to directory with refs & never commit the symlink

light zodiac
fickle sparrow
#

uh yeah I have a symlink directory in my workspace

light zodiac
#

but toggling it off doesnt yeet it from top left menu

fickle sparrow
#

mul did you exit the menu

light zodiac
#

wdym?

fickle sparrow
#

like

floral blade
#

apply ?

fickle sparrow
#

it will only turn off the mod once you go out of the menu

#

for performance reasons

jolly oriole
light zodiac
#

i did it in main menu and opened a save to check wheter language.get hook wasnt hook

copper nacelle
#

stop using ugly csproj

fickle sparrow
#

true

copper nacelle
#

all my homies hate old csproj

fickle sparrow
#

this is the god csproj

#

they call me a homie

copper nacelle
#

less goo

fickle sparrow
jolly oriole
#

idk, i use whatever vs generated for me

light zodiac
jolly oriole
copper nacelle
#

nooooooooooooooo

fickle sparrow
#

ok multiple things mul

copper nacelle
#

I hate that postbuild

#

I rewrote it to be less shit so long ago

fickle sparrow
#

so like

jolly oriole
fickle sparrow
#

all of the CancelActions need to run

floral blade
# radiant basin how would i do this?

the files would be all in your managed directory if you have modding api installed, just add their paths here or create them in the same path structure as the file has right now , where . = current directory

fickle sparrow
#

ModToggleDelegates.ApplyChange or w/e

#

you also need to use SetModEnabled and GetModEnabled for the toggle option

#

otherwise it wont work

light zodiac
fickle sparrow
#

I will update my timer mod

#

as an example

jolly oriole
charred topaz
#

btw, my mods are pretty much all set for release whenever the ModInstaller is up with the latest MAPI

copper nacelle
#

did you check against the second modhooks redo meme

jolly oriole
#

i have sfcore ready (and possibly tot? idk)

copper nacelle
#

🥴

light zodiac
charred topaz
#

You mean the commit where the null and out parameters were removed from some of the hooks, yes

charred topaz
floral blade
#

@fickle sparrow even if a mod does not implement IToggleableMod it still gotta handle ModToggleDelegates in GetMenuScreen ?

light zodiac
#

you can leave it how it is

#

its a ModToggleDelegates? so you can ignore it

jolly oriole
fickle sparrow
#

modtoggledelegates will be null if its not toggleable

#

you don't have to do anything with it if you don't want to

floral blade
#

so just change the function signature

fickle sparrow
#

yes

floral blade
#

makes sense

fickle sparrow
#

there was no better option

#

😔

floral blade
#

now to make custom knight toggleable again

fickle sparrow
#

no default methods in interfaces sadly

floral blade
#

youd probably need a third interface magic to make it work i guess

fickle sparrow
#

yeah thats just bad

#

too much bloat pauseshroom

floral blade
#

wait is this a typo ?

fickle sparrow
#

wtf

#

it is

radiant basin
fickle sparrow
#

not my typo though

light zodiac
fickle sparrow
#

it should have an e cmm

#

I'll fix the docs though

copper nacelle
#

break the interface easy

floral blade
# radiant basin um

you only need to add the reference for the ones with a path in the screenshot i sent

copper nacelle
#

Wiktionary has both

#

Ruined

fickle sparrow
#

ok my code be working

#

oh I should add the version description

#

that would be based and estrogenpilled

#

as the cool kids say

#

shit

#

buttons can't have descriptions

#

🥴

light zodiac
#

just add text below it

fickle sparrow
#

idk how vanilla would do it

light zodiac
#

easy descriptions

fickle sparrow
#

yeah but I need to add it to the menu api

jolly oriole
#

why is menubutton red

#

sorry

#

i meant menuButton

fickle sparrow
#

cause

#

idk

#

I assume I center the description on a button

#

fuck you all I'm slightly breaking the API

#

ok this should work

radiant basin
#

i finally got it to make the dll and it works, thanks!
now the hard part

fickle sparrow
floral blade
#

can i do a ModToggleDelegates() ?

fickle sparrow
#

I mean

#

its not a delegate

#

its a struct

floral blade
#

i don't really understand what i need to do with it tbh

fickle sparrow
#

im gonna upload the code

jolly oriole
#

i hate how vs does this

fickle sparrow
copper nacelle
jolly oriole
#

can anybody write me a python script to make this good (so combing all itemgroups in one and redo the references in the new way)?

radiant basin
#

what is this and how would i find dung defenders version of it?

light zodiac
#

check pins for gameobject dumb

floral blade
#

it's the scene + object path for a watcher knight

radiant basin
#

ah ok

floral blade
radiant basin
#

thank you!

floral blade
#

you just look for whatever dung beetle person is called

#

it works ! but weird that the menu remains

fickle sparrow
#

which menu

light zodiac
#

how else are you going to renable it

fickle sparrow
#

so true

light zodiac
floral blade
#

wait no i am dumb

fickle sparrow
#

lmao

floral blade
#

this is good

#

lol

fickle sparrow
#

yeah I need the menus to stay for many reasons

floral blade
#

hitting apply does give me a spinny cursor though

#

did i do something incorrectly ?

fickle sparrow
#

lemme see your code

floral blade
#

pushing

radiant basin
#

would this be right?

light zodiac
#

wouldnt it be better to check the current scene and then find the boss and change its sprite?

radiant basin
#

idk im just editing dandys washer knights,,

floral blade
#

unless the corpse uses the same sprite then it could work

light zodiac
fickle sparrow
#

what do you mean you got a spinny cursor though

#

can I have error logs or something

floral blade
#

there wasn't much of a log in modlog , it may be CK doing CK things but it looked like the game froze

fickle sparrow
#

you need to activate ModToggleDelegates.ApplyChange in the cancel action or like

#

a submit button

#

not when you create the menu

floral blade
floral blade
fickle sparrow
#

I feel like this is a problem with your unload code then

fickle sparrow
#

can I see the Player.log file

light zodiac
floral blade