#archived-modding-development
1 messages ¡ Page 511 of 1
If you want to be sure then do what đż said
hmmmmmmm
just say mulhima lol
oki
there's also a end credits scene
End_Credits right
Actually, what you could do is download Benchwarp, turn on Show Room Names in the settings and it'll show the room name in the bottom left of the screen
does it also show for endings?
yea but in caps
i added the endings strings
the ones i didn't add was end_credits, mrmushroom scene and stag travel
oh wait, dont hook onto this, use SceneChanged and log target scene
Ah yes, language gets scene names
i am very smart thank you
could also just dump scene names from the global managers
do be already pinned
with the amount of question regarding scene names, i don't think that it's pinned
but i also refuse to check

what about it
i'm adding one more functionality someone suggested: customizable strings
though i'm making them with keywords but i'll give them very unusual names
customizable strings?
like
you can customize and add something so like
you can add anything next to the room you're in
"Colosseum of Fools (doing the funny challenge)"
instead of just
"Colosseum of Fools"
I am writing the guide first because that's the time I can set keywords for value displays
i'm going to add everything i can 
wth are those abreviations
you could've started those with m_ or something
hmmm
suree
now that i have that idea
i might give them proper names
it looks... way cleaner
forcing people to read the readme. nice
no.
its not in the main readme or anything
also
uh adding those are entirely optional
people can choose whether they want custom strings or not
it will still function normally
wdym "forcing people to read the readme"
also
the readme is only for installation guide
where do you have to put these values
in the modsettings
which will only be used for custom strings
entirely optional

if you don't put the values in the modsettings it will work fine too
so uh question
in ModSettings based class it sets the values loaded from the modsettings file right
oh wait i think i get it nvm
nvm i give up
Whats the problem?
me when i wake up in the morning
hm
is there an alternative to HeroUpdateHook that uh
runs every frame even if the knight isn't there?
and is there any way to detect if the knight object exists
just add your own monobehaviour to a gameobject you instantiate and set as dontdestroyonload
check if HeroController.instance is/isn't null
oki
luckily visual studio gives me sum stuff related to unityengine when i do funny stuff 
wait how do you make C# events again
let me google it up
Just please dont to this in a coroutine
prob check unsafeInstance or w/e
do it, I dare you
yeah checking .UnsafeInstance in a coro should be fine
the issue is with the other one
because that does FindObjectOfType every frame

findobjects in general are no good anyways
I mean, having them once in Start or awake is fine
Utterly decimates frames
tru
i made funny rpc mod into toggleable
funny
when you toggle it off it will just do........ one thing
RIP discord, idk when - 2021
discord, more like
disposed
that's what happens when microsoft buys you
what would happen if facebook buys discord?
WHOA
add "display facebook friends"
or "invite facebook friends"
i heard that the toggle thing during gameplay displays the toggleable mods differently than that on the main menu
and there's no need to @ me, i will read every single message here
... sooner or later
i know
hmmmm
oh shit
i forgot to initialize the RPC
that's why it's not working 
fricc
errr
i mean
i didn't institiate the gameobject
DANGIT
not what i wanted to display
:')
OH WAIT I CHECKED IF PLAYERDATA WAS NULL
not the HeroController
am stupid af
i mean, you could just check if the scene is a gameplay scene
ok so hollow knight just stops responding after i toggle the RPC mod off
would you be reseting the status or something on unload ?
like save the status when started and reset the same when stopping might be cool
i might try doing that........
i'll go to %temp%\HollowKnightDRPC and create a new file there that keeps the epoch time
the only data that will be stored there will just be a single int
so it will uh
it will take up 4 bytes as an int instead of storing a string which will be 12 bytes or 13
or i can just store the string instead
more memory cost but no one cares
which file has the monarch wings "wing" animation ? is it Wings.png it seemed like it is more of a cutscene sheet at the first glance
POGGERS
menus?
im in...
oh pogger
can you guess where i am
thats a long term for waterways
i might named something wrong
for me its normal
funny discord bug!
you gonna add blue masks?
nice
RPCLLOW (CHECKREADME)DISCORD
its at the right place at least
you mean when you turn it on, off and on again?
yea
this works i hope
now i'll go to the funny king's pass
and collect some blue hearts
lifeblooodd mm
what if lifeblood was in real life
it aint workin
what
you can try to increase load priority
when you see the bar
the mod isn't loaded yet
so its just normal
w
how
ok so what is the default load priority?
did i die to flukenest
alphabetic
you died to flukemarm
if you dont give one
im stupid
i'll just set the load priority to 10
so if i set load priority it loads before the loading bar or what
no
it just loads before other mods
the funny looking bar are the mods loading
based on priority
so it will be loading first or smth
so this is the test i am making my mod go through
although if it loads before the dependency will it break đ¤
- load a save that isn't normal game mode
- quit
- load any save that isn't the same game mode
- collect lifeblood
what is the modcommon's priority?
ok quitting to menu works
it said "quitting to menu" for a brief second
thats good
"Opening save..."
black egg
What's the (1 of 1) next to geo
idk.
oh
i tried something
like
the "party" object
i thought it would display to the bottom of the "State"
it just displays it next to the state....
i'll get rid of it x)
F
quick edit lol
it said Cinematic_Stag_travel
both of them correct now?
oh it works, awesome
12/8 masks
mmm
funny
imagine not having 21/21 Masks
The health you get from jonis
really?
makes sense
so if i don't have joni's blessing equipped it just becomes 0?
ye
ok so that's poggers
also
i would like to set the "elapsed" time to be the save file's playtime but...
discord only displays maximum 24 hours
sooo
it would overflow
for some reason
what happens when it "overflows"
it just becomes 00:00
just print is as a string?
i can't set the 4th line (timestamp) to be a custom string
if you are using english language it would display as "00:00 elapsed"
in turkish it would display "00:00 geçti"
oh and also
someone who tried my mod found something
what
in city of tear's elevator, it says Resting Grounds instead of city of tears elevator
oh that was me :)
as you can see, me being dumb just decided to set it to resting grounds
i mean, you could've preloaded something nonexistent of every scene, then check with a scenemanager.start hook which scenename corresponds to which map area
yeah i could have
i don't think joniHealthBlue works........
i'll just check if joni's blessing is equipped
i think they may have set ModCommon's load priority to int.MaxValue
You choudlve just checked if jonis charm was equipped
i know i did that rn
7 JONI MASKS
18?
now 18 
smth new to try
HoW dO I iNsTaLl ThIs MoD It GiVeS mE eRrOr WhEn I LoAd tHe GaMe
i think
cHeCk ThE ReAdMe (x1000)
this is the only mod in existence that requires extra steps to install
discord game sdk is to blame >:(
Heard of dependencies?
Discord Game SDK is not a .NET Framework DLL, and uh
if i add it to...
the mods folder
modding API just says "nope" and none of the mods work
so that doesn't work!
the only way to install dependencies is uh
Still extra steps
Ik
Iâm just stating your mod isnât the only one with extra steps
If you donât count dependencies, take player data tracker
player data tracker also requires another dependency that isn't a mod?
Yeah
Website
let your mod unpack the sdk into streaming assets folder
What if it unpacks after that folder is already loaded?
I've gotten away with putting dependencies in the Managed folder, although all my dependencies have been managed code
i mean, you can put dependencies like the sdk into the zip of your mod with the pathing, which 56 just doesn't like, but currently it still works afaik
I thought you could do that but wasnât completely sure
I thought you could do that but wasnât completely sure
i'll try checking if i can just
check if the dependencies exist.
before executing any discord-related code
i have proof that it will work, because in my mod
it logs that Discord SDK is initializing
right after that? discord related code
if you don't have dependencies installed it will say "discord sdk is initializing" then it will display an error right after that.
so installing dependencies is a great way
confusion
soo
i'll try to install dependencies right above the imaginary red line
the question is
the question is
how do i locate the dll again 
The thought of a mod auto-downloading DLLs into my game makes me a little queasy tbh
queasy?
It was always possible
It sure is, but hasn't been done yet. All 'auto-downloads' have been SHA verified so far.
sha verify your discord sdk download
Yeah
Please do
If it updates, you update your mod
(or if available keep using the 'old' sdk so you don't have to push updates to make the newer sdks work)
time to add viruses to pale court
Might need to update if discord updates tho
that's the first step i have to cross
How do you download it
You can just do ..\ to go out one folder
So Assembly.GetExecutungAssembly().Location or something and then navigate the hk files(might be different for mac)
You can check rn
if i go like ..\..\Plugins
But with _
it will go to the right plugins
Yee
alright so that's awesome
the real difficulty is
you know.
it's to download a zip then unzip it
right?
there are no official zip/unzip tools in .NET Framework 3.5
sadly this doesn't work in .NET Framework 3.5
oh yeah
you can open a cmd in dll
since a dll is, you know
attached to the
exe
wait
i will experiment something real quick
Then why dont say the cmd to unzip it
Cant explorer do it?
i don't think so
Yes
command prompt but better except no one uses it
it also can extract zip files within 1 command unlike command prompt which does it in like
13 lines
Expand-Archive lol
Hope that windows defender isn't gonna go crazy
I CAN JUST DO
Process.Start("powershell Expand-Archive -LiteralPath 'zip path here' -DestinationPath 'extract path here'");
Amazing
Ohhh shit
It executes from the hollow_knight.exe file so
that makes sense
it's attached to the game
so I have to do hollowknight_Data\Plugins
oki
i'll try if this code works
oh wait
oh wait
i forgot to delete the thing after else
fixed i
works
Nice
Check how modinstaller does it
Or make modinstaller do it for you
i would but
hhh
it takes me a long time to comprehend a project's source code i haven't even looked at
lol
Is prob all in modmanager.cs
But player data tracker does also download multiple files
Why dont you do that to
wdym?
Oh ok
i don't think i can find the code where it actually checks the <File> section and such
am stupid and i almost never touched the System.Xml namespace
my phone died at 3% im back
?
just add it to the files it downloads?
cant you make it move?
you mean just windows and mac or window 7 and 10?
you're right
but uh i don't think i can uh
find a proper library that does it for me?
they mean "windows and mac" probably
gimme a sec, i have something to differentiate OSes (can just set a temp string var that later just executes the command)
public static string UNZIP_COMMAND
{
get
{
return SystemInfo.operatingSystemFamily switch
{
OperatingSystemFamily.Windows => "windows command",
OperatingSystemFamily.Linux => "linux command",
OperatingSystemFamily.MacOSX => "mac command",
_ => null
};
}
}
you can have this somewhere in the class you're unzipping in
hm thank
You are likely best off using a library to enable zipfile interfacing rather than depending on what a user's system may have installed. (Not so bad on Windows but maybe Mac varies. Likely Linux varies widely.)
DotNetZip apparently is also an option
link before the archive shuts down in 1 jul 2021: https://archive.codeplex.com/?p=dotnetzip
it's much older
:c
i think
oh looks like i already have it
the reason i'm using 0.86.0 is because
it's the only version i can install rn
but you'd need to ship that in your mod (or at least in the mod's zip), y'know?
i think (i might be wrong), the paths are relative to the mod's dll
won't this only work for windows?
well then, you'll need a special case for mac
why
Nothing about that screenshot seems 'windows only' to me.
are the paths relative to the mod's dll in mac?
mac has contents instead of hollow_knight_Data
because there the mod is under resources/hollow_knight_data/managed/mods
or contents
idk
Ah, paths, I suppose that makes sense
Saves
Windows File Paths: (Assumes Default Steam Install Path, Adjust accordingly for DRM Free or Non-Standard Steam Path)
Game Files: C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight\``` ** ** Mac File Paths: ```Save Files: ~/Library/Application Support/unity.Team Cherry.Hollow Knight/ Game Files: ~/Library/Application Support/Steam/steamapps/common/Hollow Knight/hollow_knight.app/``` ** ** Linux File Paths: ```Save Files: ~/.config/unity3d/Team Cherry/Hollow Knight/ Game Files: ~/.local/share/Steam/steamapps/common/Hollow Knight/```
mac mods => contents -> resources -> data -> managed -> mods
what
but there's also contents -> managed -> mods that custom knight uses
If you just need the SDK to be available then it should be placed anywhere the process would look for dependencies. .NET tries quite a few paths. Putting it in the same directory as the EXE probably works.
switch (SystemInfo.operatingSystemFamily)
{
case OperatingSystemFamily.MacOSX:
DATA_DIR = Path.GetFullPath(Application.dataPath + "/Resources/Data/Managed/Mods/");
break;
default:
DATA_DIR = Path.GetFullPath(Application.dataPath + "/Managed/Mods/" );
break;
}
this seems to work for me
Dependencies don't necessarily have to be in the mods folder. They just need to be in a directory where they can be found.
only mac has different path?
comes from custom knight i think, might not handle linux have not tested personally on it
seems like win & linux have similar paths
i'm looking at sharpziplib wiki
apparently this works
i can't even...
foreach-inception
oh wait i can just use
fastzip
code so far (windows)
oh wait i didn't add the sharpziplib dll
add the line at the endcs Directory.Delete(@"\hollow_knight_Data\Managed\Mods")
funny rate limited ?
forbidden 
this happened with me and google drive đ
restart your internet connection if you dont have a static ip
It probably means your token or other auth method is invalid.
you were probably forbidden because of a rate limit , did u delete -> download -> repeat super fast too many times ?
yah i did
and is it working now that you restarted network ?
did you restart your router / modem ?
hmm... it might be vpn time then
dunno how they've set it up but usually it works after a while
yeah but sometimes hours / sometimes days. depends on how they've set it up
best suggestion right now would be to download the file over vpn once and keep using it till you really need it again
oh that works too
send the dll i can test it if you want
mods folder?
yes
uh
first if you have x86 and x86_64 folders in the plugins
delete them
bruh i can just download the zip just fine @floral blade
well
thats weird
you can download it via browser but not via code ?
yeah
i downloaded both mods and tried to open the game and got the DRPC failed to load
Modlog[INFO]:[HollowKnightDRPC] - Mod initializing [INFO]:[HollowKnightDRPC] - DLL Location: C:\Program Files (x86)\Steam\steamapps\common\Hollow Knight [INFO]:[HollowKnightDRPC] - Dependencies don't exist [ERROR]:[API] - Error: System.Net.WebException: The remote server returned an error: (403) Forbidden. [ERROR]:[API] - at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in <filename unknown>:0 [ERROR]:[API] - at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in <filename unknown>:0
unpog
it didn't unzip
user agent
the zip is 0kb it didn't even download
@floral blade
not only that, there's another entire problem with the zip thingy
[ERROR]:[API] - Error: System.NotSupportedException: CodePage 437 not supported
[ERROR]:[API] - at System.Text.Encoding.GetEncoding (Int32 codepage) [0x00000] in <filename unknown>:0
[ERROR]:[API] - at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToString (System.Byte[] data, Int32 count) [0x00000] in <filename unknown>:0
[ERROR]:[API] - at ICSharpCode.SharpZipLib.Zip.ZipConstants.ConvertToStringExt (Int32 flags, System.Byte[] data, Int32 count) [0x00000] in <filename unknown>:0
[ERROR]:[API] - at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries () [0x00000] in <filename unknown>:0
[ERROR]:[API] - at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
crazy
rate limits dont return 403, they return 423
or was it 422, either way, discord wouldnt return 403 on rate limits most likely
i doubt even they are that bad đ
What is the problem with bundling it with the mod again? Was it the fact that it would be in the Mods folder? Why not just write code to move it out 
a quick google shows 403 is a permissions error
wdym
From Mods folder to somewhere else where the modloader won't break on it
like to ../
I might've missed something, but this was all due to modloader breaking due to native dll in Mods folder, yes?
yeah
And you want to download it because it's not easy/recommended to bundle the DLL so that it DOESN'T end up in Mods right?
could it be possible to create a new folder in mods
a real quick question
to contain those files
if i create a subfolder in my zip
then
e.g
the discord game sdk files will be located in "/x86/..." and "/x86/..." right
Yeah, that'd probably work to put a sub-directory in Mods. IDK if the modloader loads from subdirs
Yeah, probably
google drive did that to me like 2 days ago so i have trust issues
damn
google drive rude af not following standards
Embed the DLL as embedded resource then shit it out into a folder on runtime
There's plan D
lfg

should i just remove the "CHECK README" in the modlinks.xml lol
it's no longer necessary
except explaining what it does
he's just a head now lmao
i hope it doesn't break anything though.
are you working on HKMP?
how do i make a copy of a transform ?
yes
yes i think i copied it by reference and modified it to send that other player under ground
i meant to only spawn another obj below them
i'll just try to make a new one
ok so
if i remove the string "check readme" from mod name in modlinks.xml
would it break anything in modinstaller
is it possible that 'Object.Destroy' wont destroy an object but simply freeze it in place ?
i think it will just.......destroy
hmm i must be messing something else up because these objects just freeze on screen
should i just push another commit to my pull request before it gets pushed 
i need to be quick
you should be able to convert pull requests to drafts so they won't be merged before they're ready
amazing
wheres the
instead of naming it x64 or something, name it hkdrpc
itssoulpoggers emote
so people know what it is
hmmmmm you're right
and if possible make 1 folder
ehh nobody gonna look in the plugins folder
its in the mods folder
no
nvm
xD
still gonna do it anyways 
fun
ehh not that bad
yeah we've seen far worse, right?
but indie crossover and my mod being big makes sense
what is your mod
ok
theres a little sprinkle released
you'll probably never have to fix my mod's sha1
eventually yes
imagine only fixing sha1s
who knows
what "rest"
the folders
just put all the files in 1 zip
including any other zips
cus thats always fun
beware that it will all be placed in mods
do i have to add the <File> field for the rest of these files
if you put it in a zip then only the zip
if you want the folders seperate out of a zip then yes
but bye now
ok
i'm still as confused
so
do the files get installed even if the files aren't included in modlinks.xml
so
if i don't add the files inside x86 and x86_64 those files to the modlinks.xml inside those folders will be installed or nah
ok
i think so
anime split second sword clash
anime
downloads that aren't sha verified pog
i'll only add 2files here even though there are 7 other files that i haven't added inside the zip 
i probably should add them as well
If you're downloading files through your mod then adding the shas to the modinstaller repo doesn't constitute verification
no
i'm not downloading files through my mod
the files ARE inside the zip
my mod will be moving those files to the Plugins folder
You aren't downloading the zip? Sorry, I didn't keep up in the last hour
do i have to add those files as well
i guess i will do so. 
though
since my mod will be moving those files...
what will happen if the modinstaller doesn't see the files in place?
If you are downloading any files through your mod then no, adding them does nothing.
If the files are packaged with your mod somehow, then yes add them.
Nothing, most likely
the files are packaged in my mod
like
this is the files inside the zip
x86 has 2 files
x86_64 has 5 files
Uhhh, I do not know if modinstaller does sha checks on files in subdirs... Let me look
I understand the question, I'm searching for the answer.
OK thanks
Yeah, looks like what you put up as an example should probably work.
hope it works
you don't need those, only things in the mods folder and the disabled folder are sha1 checked
but just to be sure i'd also add those
It (seems to) check them by using the filename as a relative path, so putting a folder in there seems like it'll work
I only spent 5 minutes looking at the source tho
i spent a bit just looking at https://github.com/ricardosouzag/ModInstaller/blob/master/ModInstaller/ModManager.cs#L836, maybe another method can handle subfolders
i added shitton of lines in modlinks.xml
those files are necessary for auto dependency to work
since it will
yknow
move those files into the plugins folder
also it has been a few months since i signed up for this 
offtopic but i thought i would mention it
what's the easiest method to reset the ingame achievements of a machine? (don't worry, it's not AchievementHandler.ResetAllAchievements(), as that only resets the achievements of the steam/gog account)
anyone know how to get the input on the right stick of a controller ?
prob just use incontrol
I think there's a ref to the axis device somewhere in the input stuff
i mean left axis is sortof mapped to vertical and horizontal , dash button seems to mess up horizontal tho so i'm not sure
is there any way to get this ?
I mean from what I remember there's a field
but I cba getting out of bed and actually finding it rn
could you point me in the direction of how i could find it ?
unity docs?
google?
just realised by running ILSpy on the dll that incontrol is already in the game
WAIT. you can basically see the entire code with ILSpy?
i thought it'll all be Assembly code
my world has just expanded i have world sense now
by asking you guys what things were?
and looking at existing mod's codes
to figure out what properties/methods exist
đ¤
makes sense
somebody should update the api docs
my excuse for not doing it: bad at github
yeah especially for Macs đ i think i am using older version of mod api because i wasn't able to compile it with c# 9
- how are you logging that. 2. try setting the device property in the listenForInput method
Logger.Info logs to modlog , imma try the second one
I should of said when
listenForInput runs everyframe, and setting device in that function worked, i guess i was setting it before it was initialised
thanks for the help 
np
so
i think i should destroy the GameObject i created
that runs the Update() function
which is one of the two methods that have Discord related code
idrk
might try that
if you want it toggleable, maybe just set the gameobject inactive in unload and active in initialize
do the variables persist through toggled off states?
does it run the Initialize() function when i toggle it back on?
your unload is empty 
yes, you'd need code to check for an existing instance
i just emptied it before publishing it 
modinstaller doesn't install things from subfolders inside zips!!!! oh no!!!!
what do i do now
i don't know
put a zip in a zip
i added the <File> stuff for each file, inside subfolders too
problem fixed
does the modinstaller extract zips inside zips or my mod has to do it itself?
you could simply ask @copper nacelle if it should work like you did or if you have to do that yourself
(my solutions aren't great)
you already pinged 56
yes
i don't think they are online
he did
The pr isn't merged yet
lol
i can't remember the last time 56 wasn't dnd
could also be the reason
SF merge it
wait isn't the pr merged
this is interesting
i can't merge
they dont merge instantly
i know
why not lol
5 days
the PR
what even is this mod
yes
plando
it changes item based on xml
we need that pinned
unsolicited links smh
random links are fun
fixed
true
how do i see who can merge
collaborators?
SFG is there and he cant merge
i am there, you are there
we cant merge
(can people with merge powers merge their own thing?)
that's contributors
collaborators don't need to make PRs to commit
they can just...
commit
i saw homothety do it
he made a pr then merged it
idk why
(or am i stupid again)
contributors are only contributors
the ones that have committed previously
they don't gain any power of some sort
afaik
nope
except the cool contributor badge
yes
cool
is there a github page for modinstaller2?
or only the .exe's in the pins?
do these two variables do anything?
where would it place you
no
good morning
that's not going to work with installer1 no
I think it would with installer2
morning , i just unlocked new super powers yesterday after you'd left 
But the first one just iterates over the zip contents and puts the dll in mods with 0 regards for folder structure
nice
also @copper nacelle would this work, in order to get whether broken vessel is defeated?
if not what should i do
GetVariable<idkwhattype>("whatever that statue thing is called").isUnlocked
to check if broken vessel dead
then getbool(killedbrokenvessel) probs
PlayerData.instance.killedInfectedKnight?
how do you manually save the game inside the mod
I think you'd just call SaveGame on GameManager but haven't ever tried
why would you need to manually save the game?
and to this, shouldn't one do PlayerData.instance.GetBool("killedInfectedKnight") instead?
I haven't needed .GetBool() or anything of the sort yet so you're probably right
if i were to let the player spawn objects on the screen, but not infinitely does it make sense to have an array of go's that i just reuse by resetting them ?
do i have to initialise them all to new go's if i do :
private GameObject[] pool = new GameObject[25];
so the new keyword here only makes a new array with null values , hmm
Just asking where do you make your mods?
what does this mean


