#archived-modding-development
1 messages ยท Page 139 of 1
so pipe those game objects to a coroutine
that waits a short time before deletin
they don't work because you aren't using a monobehavior
and idk why
let me make something for you
yeah?
Ok
Every mod should use this template
or something similar
and then just make EVERYTHING ELSE part of a monobehavior
and monobehaviors can have coroutines
and just add that monobehavior in that addcomponent function
Does that even compile?
No comma between Mod and ITogglableMod and you don't implement anything from ITogglableMod either
Wait you do have Unload
Idk how I didn't see that
shit ur right let me fix
There's a space before using System as long as you're fixing shit
But that's not an error just bad formatting
version 2
fixes all the dungo stuff
Ok
I'll be back sooner or later
I will release the first version once I stop those centipedes from moving
and the next version will focus on removing all NPCs except Elderbug
Also that ModCommon check isn't safe
It breaks if any of the "loaded" assemblies failed to load
shouldn't it be assembly.GetTypes().Any(type => type.Namespace == "ModCommon")
or better
Probably equivalent
if (assembly.GetTypes().All(type => type.Namespace != "ModCommon")) continue;
noModCommon = false;
break;
https://gist.github.com/natis1/043d80259df05a3267556b24eac82d27 @flat forum version 3 and hopefully my final version of this done.
just follow the very simple to follow instructions in the text below
Load order 30 seems like a really odd number
Ok
it comes from... one of my mods
well actually I probably shouldn't be using it
because the GetInt and Language hooks are broken insofar as loadorder is concerned iirc
that is
the mods with the LOWER load order take priority over what ints and strings are set
whereas with every other hook the mods with the highest load order take priority
unless I read the modding api code wrong
I should make a testcase to see if it's true
actually I REALLY should make a testcase because this is gonna be a mild problem for redwing if it is in fact a real bug and not just something that seems like a bug looking at the code.
but I'm lazy so I'll do it next week
'ey @young walrus, is the room mapping project still going?
I have some free time this coming week
nobody has worked on it since i have that one day

but the google doc is available still
I'll try doing greenpath at least then
you'll have to request access to it
I think I already have access to it
do you?
asked you like 1 year ago
i don't remember
i've given access to like 2 people
sean had a list of all the actual transition names too
might be helpful to link those
doesn't debug tell you those?
you could also use the format I did if you want to i guess
will you still have the hard/easy format?
or go with a more flexible format like sean did with rando2
either i guess
the hard mode traversal options cover any speedrun tech
so that could be parsed out later into specific skip types
I assume the movement is all nmg
yeah
kk
i'd have debug on to make it easier
and to list room names, etc
test out skips and shit like that
kk
I'm not great with spike tunnel skips tho... So if I ever map an area that has those, I won't map those rooms
also
should we include mag skips?
I really don't want to get to Isma's with only dash+claw+wings
shivers
no
include only RTA viable things
if you have questions on shit like that, can just ask i guess
there's some skips i think i want to remove, even though i could do them, they were tough
like fireball skip / shriek skip up to salubra
yeah
there's also one mag skip which isn't that bad. That is getting to Unn without Isma's
it's way easier than that acid skip on the archives
Sean
TEO wants you to update debug mod and it's health checking system
Because there may have been changes to the healths of some enemies and TEO wants to check
Send it in the wiki if you're there
what channel
Suggestions
why isn't update on drive
consider this: modlinks debugmod downloads the one that is built for 1.2, but every mod installer downloads the 1.3 API
I hope someone else sees the issue there
aaa anyone know why I can't load fsm vectors
I have the following code:
private IEnumerator _WaitForSetVelo2DToBeLoaded(SetVelocity2DData inputData)
{
// after this much time it will assume the set velocity 2d actually in fact has a magnitude of 0
// at which point it WILL NOT add it to the list. because: simply put, you can't speed up or slow down
// a zero vector by any amount.
float maxWaitTime = 5f;
while (inputData.cachedVelo2D.vector.Value.magnitude <= epsilon && maxWaitTime > 0.0f)
{
maxWaitTime -= Time.deltaTime;
yield return null;
}
if (maxWaitTime <= 0.0f)
{
Modding.Logger.LogError("[ModCommon] Unable to add setvelocity2d to CustomEnemySpeed because the velocity is a " +
"zero vector which cannot have its speed modified.");
yield break;
}
inputData.SetDefaultMagnitude(inputData.cachedVelo2D.vector.Value);
speedModifyVelocity2D.Add(inputData);
if (active && speedModActive)
{
_UpdateSingleSetVelocity2D(inputData);
}
}
and even though the fsm dump indicates that the vector I am using isn't a zero vector it still says it is.
inputData.cachedVelo2D is a SetVelocity2D and is never null, or I'd get a null ref.
omg I found out why
EWWWWWWWWWWWW
\----PFSM ---- SetVelocity2d (vector?.Value) = (0.0, 0.0)
\----PFSM ---- SetVelocity2d (x) = 12
\----PFSM ---- SetVelocity2d (y) = 0
wtf playmaker
aaaaaa
am I crazy or is this bad
why would it have both a settable and gettable vector and x and y as separate floats that are seemingly unrelated
ok explain this science
I set the boss to be faster
and the gameobject dump shows he should be faster
but he's the same speed
no but really wtf soul mage
im dying and idk what to do
OMG
eww
the second the soul guy spawns in it deletes the old game object and makes a new one
hes... just not in the scene dump
wtf
help
here's my code:
GameObject[] allObjects = UnityEngine.Object.FindObjectsOfType<GameObject>() ;
foreach(GameObject go in allObjects)
go.PrintSceneHierarchyTree("dump/scenedump" + dreamPrintNumber + "_" + go.name + ".txt");
there's NO soul guy
when his second phase spawns I can find that gameobject
that one's called "Corpse Dream Mage Lord 1(Clone)"
but this dump isn't giving me the other one
so uh what am I doing wrong
is this in the English language
no
aa please stop spamming
ok
but only if TC
makes soul tyrant code not shit
I just wasn't expecting my least favorite dream boss to also be the worst programmed
i wish i spoke this alien tongue
anyway it's not that I'm spamming more that my shit's broken and all the real modders are offline so idk how to fix it
literally getting a null ref for code that rider tells me is impossible to be null
Wow thanks I'm not a real modder
you were offline
Never
ok so the proper speeds get set
but then they're set back by something
and im too stupid to figure out what
I should just make like the benji brothers and play GnG
just open properties, beta then type in "gngwhennever" to download and play the beta of GnG ez
serious ideas for fixing this would be appreciated
maybe
you cannot cache waits for one
?
tfw i was on lightbringer, started grimm dlc after i got dreamnail, got the 6 flames then killed grimm 1st form, sat on a bench, then the game breaks and makes it so i cant get off the bench
ez
doesnt matter what bench or what i do, rip me, and rip 3 hours
Yea is there a way I could mod the switch version to protect Myla? No? Ok.
so make a mod for it

anyway, happy news y'all. I gave up working on soul jerk until 56 helps me and instead decided to get false knight working and I'm already almost done with him, he works perfect and just needs balance.
*failed champion
goddamn it I did it again
argh
I must have 0 sanity left at this point
anyway if you would allow me to I'd like to update CustomEnemySpeed. I made it a lot more versatile
and I added regions
submit pr when
20 seconds was literally writing the commit message
my next project is lost kin because I'm gonna put off soul master as long as I can lol
fuck I was too slow
thanks for the tip on his behavior btw that's gonna save me infinite time
jesus christ y'all merged that fast
is it possible to mod on switch or nah?
no
make its name orange
an automatic ice dispenser that keeps it cool
put a pi in your switch
you won't be able to run HK but maybe it could run celeste or something.
celeste is on switch ๐ค
modded celeste tho
HK custom maps when
also whenever a game is easy to mod. 90% of the mods never touch code.
or in the case of Skyrim, 99%
you can turn any retail xbone into a devkit
like if it can run any old binary then surely it's like, at least jailbroken IOS levels of open.
but anyway lol imagine if a skyrim mod required you to do this as the end user
well theres no reason to prevent arbitrary code execution
yes there is
when you can run anything on your xbone
consider this: activating dev mode is hard
downloading a random arbitrary dll mod
is easy
if you want the process of running unsigned code to be hard
then you shouldn't allow these kinds of mods
Technically possible but difficult for the average user is kinda Microsoft's thing
they build their OS and everything else around technically possible but difficult for the average user
the more difficult while still not being impossible the better
unless xbox has some userland privelege escalation I doubt anyone can write anything malicious
and I doubt theres an exploit for that because you'd probably have sigpatching from devmode if there was
no but my point is this: MS can get away with shitty default settings on their products because people will defend them on PC forums as "oh microsoft loves choice, you can disable or change X on windows or xbone" so long as it's technically possible. Nevermind that it requires downloading a program and running through 30 clicks or running something in cmd or adding 1200 lines to your hosts file.
i mean its literally just searching for dev mode in the store
and putting a key in a webpage
like 4 steps if you include making a dev account and opening the store
people here who actively seek out HK mods and thus consider themselves technically above average can't even read readmes
so what hope do the other 90% of computer users have
I mean technically everyone considers themselves above average
but still
Well half of them are right
I'd argue 100% of people are above average at something
above average at being bad
it's just, being above average at fighting slightly spedup NKG hasn't gotten me any jobs yet.
still looking tho
is there an AddGeo thing but for dreams?
you mean for essence?
yes

i dunno what it is though
I guess you could check the healthmanager class
as die should run whatever it is to add essence
not seeing it in healthmanager
if (UnityEngine.Random.Range(0, max) == 0)
{
this.dreamEssenceCorpseGetPrefab.Spawn(base.transform.position + this.effectOrigin);
playerData.dreamOrbs++;
playerData.dreamOrbsSpent--;
EventRegister.SendEvent("DREAM ORB COLLECT");
}
its in EnemyDeathEffects.EmitEssence()
SendEvent("DREAM ORB COLLECT");
thanks
dunno if I need to modify but I'll just see if that works
sending that event should just make the number + icon show up
what is dreamOrbsSpent for
its to make enemies drop essence when you've spent some on dreamgating
more often that is
if (!playerData.hasDreamNail)
{
return;
}
bool equippedCharm_ = playerData.equippedCharm_30;
bool flag = playerData.dreamOrbsSpent > 0;
int max;
if (equippedCharm_ && flag)
{
max = 40;
}
else if (equippedCharm_ && !flag)
{
max = 200;
}
else if (playerData.dreamOrbsSpent <= 0)
{
max = 300;
}
else
{
max = 60;
}
what's max for
also I feel like it's gonna be below 0 most of the time unless ur that one guy who uses dream gate 25 times a day.
not sure why this isn't like max = (int)((equippedCharm ? 40 : 200) * (playerData.dreamOrbsSpent <= 0 ? 1.5 : 1))
max is the chance for random to trigger
1/max
woah wiki is VERY wrong on this then
cause tc
69 septuagintillion iq
blackmoth is buggy af
dashed into an enemy and took damage at the end and got put into a float
until i took damage again
tbh I couldn't even tell you if that's a blackmoth bug or a vanilla bug
tru
yeah pretty sure its a blackmoth glitch
if pressed dash right as i took damage and im put into float
I can try to fix it but uh no promises
nah its alright
i have to see if thats actually what causes it
its happened 2 times but still not sure what actually causes the float
i think its if u try to dash right as u take damage or right after the damage happens
if it's you taking damage on the frame you start dashing here's my theory
your cstate is set as invulnerable, but your player has already recieved the "TAKE DAMAGE" thingy
so you get a weird kind of storage where it can't do the TAKE DAMAGE animation because you're set as invulnerable
idk
maybe not but that's possibly what's happening
maybe it should wait a frame before making your character invulnerable. maybe it should happen earlier in the frame, might just need to do testing to find out.
yeah im trying to figure out if its before or after
but its an easy fix ingame
just open and close your inventory
it is indeed an easy fix
but it gets annoying when it happens 3 times in 1 fight
maybe you spam the dash button too much?
longdash helps to reduce hits taken
@compact sedge a question, why did you add the go through walls charms while dashing?
it's gradow's mod
is he in here?
yeah
he's pretty busy these days but yeah
@compact sedge sorry got confused since you made redwing
it's ok. I stole some code from blackmoth for it
and these days I'm interested in helping fix any blackmoth bugs both because redwing is designed for it and because I just really love that mod.
wait im supposed to use redwing with blackmoth
either or
it works really good with it
redwing is better with blackmoth installed imo
originally it was just gonna be an addon but the blackmoth replacement in redwing is pretty alright. But I mean cmon if you wanna be a super overpowered knight why not go the full mile and install both.
Debug mod makes you more op tbh
when i installed lightbringer i thought the game would be ez af
i found that harder than this
and click the kill enemy button
but blackmoth + lightbringer is broken af
now imagine those two but also with redwing

and I mean at that point you basically have to try to die
so that's why right now I'm making a mod that makes 3 bosses almost infinitely harder.
soul tyrant meme
so that there's at least SOMETHING you can do that will challenge you
right now it's only one boss
but I could release an alpha I guess for memes
is that one boss done tho
ok let me just check that essence gain works and I'll send binary
and update on git*
did you guys see the gods and glory showcase at e3
tbh if this mod I'm currently making is recieved well I have some fun plans for a mod to make GnG even more arcadey as well.
ok def still need to fix some shit before I send sry 56
ok
for one, saving is not working the way it should and idk why
you've got the modding api bug fix in right?
no but I fixed THAT bug manually in infinite grimm and this with some hacky code
i mean do you have the hack in
no
ok
so idk which bug we're talking about but the one I'm thinking of is where it will copy your save data between saves
if you exit out
you've sat on a bench?
I exited to menu after fighting and killing a dream boss
which prompted the saving data message
rip
global_vars.falseDreamFails = Settings.falseDreamFails;
global_vars.falseDreamLevel = Settings.falseDreamLevel;
global_vars.kinDreamFails = Settings.kinDreamFails;
global_vars.kinDreamLevel = Settings.kinDreamLevel;
global_vars.soulDreamFails = Settings.soulDreamFails;
global_vars.soulDreamLevel = Settings.soulDreamLevel;
this code run in ModHooks.Instance.AfterSavegameLoadHook should load it from the save file right?
yeah but why tho
make an instance imo
and just do ModName.Instance.Settings.blah;
and/or in your monobehaviour do ModSettings x = Modname.Instance.Settings;
for less verbosity
a
I thought arraylists were older
?
oh
so instead of c# copying java it's going the other way
nice
ok failed champ health management is disgusting
yeah he has 2 hp bars
it has a healthmanager that has 360 health for its first phase, and once that runs out it then transitions to using an FSMint to manage all future health
that FSMInt, also has 360 health
excuse me what the fuck
not the heads themselves
but the armor
all 3 have 360 hp
but the first one is run using a HM and the other 2 are run with this fsm
\----PFSM StateName: Check
\----PFSM ---- Transitions for state: Transition on STUN to state Stun
\----PFSM ---- Actions for state: Actions on Check ::: GetHPEveryFrame
\----PFSM ---- Actions for state: Actions on Check ::: IntCompare
\----PFSM ---- IntCompare (Name) =
\----PFSM ---- IntCompare (integer1) = 360
\----PFSM ---- IntCompare (integer2) = 0
\----PFSM ---- IntCompare (greaterThan) =
\----PFSM ---- IntCompare (lessThan) = STUN
\----PFSM ---- IntCompare (equal) = STUN
\----PFSM ---- IntCompare (everyFrame) = True
its probably good code
the fsm is fine code, the healthmanager is fine code, putting them together this way
tbh I have a feeling this boss is one of the first ones TC made
because
no waits
all waits are done with animations
that are empty animations
\----PFSM ---- Tk2dPlayAnimation (Name) =
\----PFSM ---- Tk2dPlayAnimation (animLibName) =
\----PFSM ---- Tk2dPlayAnimation (clipName) = Blank
on the other hand easier to mod
but my god poor TC
can anyone tell me how to set binds to unbound in debug mod?
You'll have to clear them in the settings file manually if you want to
@rain cedar where is it located?
Save folder
whats the file name?
got it. it's debugmod.globalsettings.json
thanks a lot
I can't get my settings to save
ok how does Settings work
time to read the example mod
ok idk what I
am doing wrong
it doesnt work
is infgrimm global or persave?
it does persave score tracking
afaik global is read only for somereason
but my settings are uninitialized every time I load the game
but in infinitegrimm in that version they worked fine
wait is it because I changed my settings to add new vars that I didn't have before
and those new vars don't get saved
ugh I wish I still had the python save extractor
hksm can save to plaintext
yes save (switch)
instead of save
was added like a few days after switch hk was released
uh ok
well
good because the python one had intentional shittyness in it I had to remove
and I'm too lazy to do that again right now
and I just need it extracted
pretty sure the python one was just a copy of my code ๐ค
but in the future I might redo the unshittifying
NO STFU
I mean
ofc its a copy of your code
but
all it does is extract and unextract
and guess what
the random exe one by raining chains is somewhere
and other than that everything else is just using your programming language's crypto tools
so
nope
because java doesn't let you use crypto functions over a certain keylength
because terrorists could use it
yep you heard me right
so if they copied your code they did more work than they had to
from Cryptodome.Cipher import AES
yeah probs not copying your code
but that's a shitty library
also c# has wrong names on their crypto libraries
and completely wrong functions afaik
oh it uses RijndaelManaged now
which actually does use the correct values
also I know for a fact the python script is based of my code
because in his reddit post he links to my repo ๐ค
he has an online one now https://bloodorca.github.io/hollow/
they gonna steal your savedata
tbh I wish I had the unshitty version of the python script still
it took me like 15 mins to make but I forgot exactly what I did
well its not just a AES cipher
because its BASE64 too
and you need c string headers
but either way I'll have you know I actually had to get AES to work via gnu.crypto which had basically no documentation and took literally forever to do ๐
well he likes it to feel like its doing stuff
tbh you could just repurpose my java script to unpack saves real quick
all you need to do is
SaveLoader.saveSwitchSave(fileDir, SaveLoader.loadSave(fileDir));
and it'll decrypt saves for you
this almost works but I think I forgot one small thing
also
private static byte[] getLength(byte[] input){
String rawLengthBinary = Integer.toBinaryString(input.length);
String reverse = new StringBuffer(rawLengthBinary).reverse().toString();
System.out.println(reverse.length());
String[] data = new String[(int) Math.ceil( ((double)reverse.length()) / 7.0f)];
System.out.println(data.length);
for( int i = 0; i < data.length-1; i++){
data[i] = reverse.subSequence(i*7, ((i+1)*7)).toString()+"1";
}
data[data.length-1] = reverse.subSequence((data.length-1)*7, reverse.length()).toString();
byte[] output = new byte[data.length];
for( int i = 0; i < data.length; i++){
System.out.println(data[i]);
output[i] = (byte) Long.parseLong( new StringBuffer(data[i]).reverse().toString(), 2);
}
return output;
def getLength(input):
# lenBin = format(332184, 'b')
lenBin = format(len(input), 'b')
lenBinReverse = lenBin[::-1]
dataLen = math.ceil(len(lenBinReverse) / 7.0)
data = list(range(dataLen))
for i in range(dataLen - 1):
data[i] = lenBinReverse[i*7:(i+1)*7] + "1"
data[-1] = lenBinReverse[(len(data)-1)*7:len(lenBinReverse)]
output = list(range(dataLen))
for i in range(len(output)):
output[i] = int(data[i][::-1], 2) # doubleCast()
return bytes(output)
I aint saying anything but :^)
wow that's straight copied
ok I got it worked
I aint saying he used more than my keys but :^)
ยฏ_(ใ)_/ยฏ
the other one used a weird ass crypto library too
even though you can just use normal python Crypto
also no shebang at the top
also the decode didn't even work
anyway lots of problems I think I fixed some of them
change it to your hollow knight save path it's currently set to mine but the default python thing had it set to the Desktop
but unfortunately I can't recommend this. Because it doesn't feel like it's doing anything because it's too fast
it should really have a busy loop somewhere in the middle
yeah make it slower
use a more inefficient algorithm
infact encode and decode to every crypto fuction your library supports
anyway literally all this is for is to splice off the end of the savefile
but it's really effing hard
to get valid json
because this one goddamn line
thats like half of my code
also if I put it in a beautifier idk if it will still work
is making the json be read
i mean it decrypts them
I could technically put in a tab for modded data but it'd be zzz
oh ok I did the cutting correctly
but there was a bug in my unshitty python
so its still shitty I guess
aa irl
UpperCamelCase BADDER 
big delet
no its because I can't easilly reencode and decode stuff
after editing it
for one it saves it as user1.dat.switch
so that's one more renaming thing I have to do
and call kdt's code
I did
I made a new program
stealing ur code
stealing some other guy's code stealing your code
and do
SaveLoader.saveSwitchSave(fileDir, SaveLoader.loadSave(fileDir));
that decrypts saves
i want my money back this is in camel case
btw
I really fucking hope
that this works
because fuck moddingapi Settings data
and SaveLoader.saveSave(fileDir, SaveLoader.loadSave(fileDir)); should encrypt
I can't add new settings without forcing people to make a new save
aslong as my code isn't bad
or I could use existing code that does the same thing
which this code does exist ๐ค
ur mum is too lazy to run java
java is java -jar file
I mean you could just make it drag file onto jar
#!/bin/bash
java -jar urmumgay.jar
run code
real shitpost
the real shitpost would be me doing this after having it working 15 minutes ago
lol
kdt that's because ur on a shit os
that's ur own fault
get rid of everything that's not 3.6 and 2.7
then like 2.7 code doesn't even work on 3.x
so you write 2.7 code in your sublime text
go to double click and find out your path is 3.x
and it doesn't work 
no
yes
2.x good
delet
urMum not defined
print(urMum) not cool
tbh
kdt ur problems with python are problems with you
im going to do my next hk project in pascal
$ and .
thats wyza
just steal code that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen that was stolen and fix modding api
tbqh
anyway enjoy this meme of almost 1/3rd of a mod since you asked for it 56
I'm passing out
so ping me if anything other than saves, or 2/3rds of the dream bosses are broken
it's just fc right
yes
cool
it works until you quit the game
i like how i still have all the mods installed
and then it doesn't properly save the level ur on
this folder is good
put it in the installer
lol I'd get banned from the drive
x to doubt
it's on my git too cuz memes
nice
You fix it
cause you did it wrong here
Idk not my code not my problem

tfw u do it the same way
use an instance var when
I had an instance var
it didn't work
so I swapped to copying my infinite grimm code line for line
fc
or I can just say it
he has levels
he gets harder every level
if you beat him he goes up a level
neat
if you die 3 times to a level you go down one
you get essence based on how many levels you have when you win
do his staggers get slower
does that get slower tho
also with that guy and that guy only
his jumps get shorter instead of taller
the higher the level
and the jumping physics on that guy is really weird
his gravity is ~0.4 when he goes up and 3.0 when he falls
which always made him feel very unnatural to me
but that's how TC programmed him
yeah
so if you put down a dreamgate ur at the same as before
maybe I broke something with this code but it works on my pc:
FsmState meme = falseGuy.LocateMyFSM("FalseyControl").GetState("Dream Return");
List<FsmStateAction> actions = meme.Actions.ToList();
actions.Add(new CallMethod()
{
behaviour = GameManager.instance.gameObject.GetComponent<dream_manager>(),
methodName = "falseKill",
parameters = new FsmVar[0],
everyFrame = false
});
meme.Actions = actions.ToArray();
send player.log
wait
no
if the difficulty goes up
then you should be getting essence
omg did I not send you the version with the shorter wait
uh just wait 5 seconds before nailing him again and you might get essence
or maybe
2l8
it can't add it because you do have the one with the shorter wait
and that is causing it to try to add the essence in a loading screen
or something
well level 5 was fun
this might fix that but don't try now or you'll lose all your levels
ok
gonna try a spell build this time
with quickslash
cause staggering him every 10 seconds is nice
still no essence
@compact sedge is this u
NullReferenceException: Object reference not set to an instance of an object
at dreams.false_dream..ctor (UnityEngine.GameObject falseGuy, Int32 level) [0x00000] in <filename unknown>:0
at dreams.dream_manager+<loadFalseDream>d__15.MoveNext () [0x00000] in <filename unknown>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0
oml
im a meme
ok
let me open up rider reql quick
why tf doesn't it tell you WHERE the goddamn NRE happened
like line number
should work if pdb is moved with it
wait what
hold up
pdb gives me line numbers
excuse me
where were you like
3 months ago with this info
I knew pdb had line numbers
I didn't know u could just move it in the same folder
as the dll
pretty sure I complained about it before
can't remember if feature got added or not 
ok gonna test this r quick
and if I don't get except u get new binary
and I get sleep
gn
NullReferenceException: Object reference not set to an instance of an object
at dreams.false_dream..ctor (UnityEngine.GameObject falseGuy, Int32 level) [0x00000] in <filename unknown>:0
at dreams.dream_manager+<loadFalseDream>d__15.MoveNext () [0x00000] in <filename unknown>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in <filename unknown>:0
yeah ik
static readonly is better than const tbh
Less prone to issues at least
Not "better" in that it runs faster, should run marginally worse
does it
Yes
That's the difference between const and static readonly
Const gets replaced by whatever its value is
surely that'd break whatever.SOME_CONST
Static readonly is still a reference
which is why it's bad if you're going to change it
cause if you have an assembly built with an old version using that constant
and then that library changes it
the assembly will still have that old constant
even w/ the new version
@compact sedge @copper nacelle @leaden hedge making line numbers show up in old versions of Mono requires you to use pdb2mdb, and run mono with the --debug flag... Which is impossible in Unity. Unless you're fine with one of the following:
- hunting down addresses of unexported functions with x64dbg on Windows, or gdb on macOS and Linux and then performing black magic with a patched UnityEngine.dll
- patching Unity's copy of mono
Guess which method I had to use in Gungeon
that's what I assumed
or not that specifically because I'm not a coder
but I assumed it wouldn't be easy to do
Actually I use const whenever possible because it's faster. BUT I use (or should be using) static readonly for vars I want read from other mods. because if I didn't then every time I changed the value it would break those mods. @rain cedar
because iirc if you read a const var without reflection from another mod, and then change that var on the first mod without rebuilding the second mod, the second mod will still read the old var value
and that
is the opposite of the behavior I want
which reminds me this probably needs to change for the reason I listed above https://github.com/natis1/ModCommon/blob/master/ModCommon/ModCommonSettings.cs#L13
or maybe not, maybe it's useful for mods to know which version of modcommon they were built against but I can't see how.
Hey guys! Really I have a really silly question, but... How do I install ModCommon, so I can play Lightbringer?
YES
uh
you download it from the drive
like where you downloaded lightbringer and modding api. You downloaded those things from the drive right?
Yes
modcommon is like lightbringer in that it just goes in the mods folder
But how do I install it? Same as the other mods, like Randomizer?
Oh
Thanks
I can't seem to find ModCommon on the drive though
I found this link from github though https://github.com/Kerr1291/ModCommon
ok so now you know who made it so just look for their name on the drive
Oh thanks!
I'm dumb, just found it
Now, let me see if it will work this time...
It seems to be working just fine! Thank you @compact sedge
go to #archived-modding-help in the future. I would have asked you then to go there but I was just happy enough that you actually TRIED to install modcommon.
and if you're thinking there's no way someone could just ignore the giant text box when you open the game... you'd be amazed.
Hahaha, yeah
Sorry, I hadn't noticed the #archived-modding-help chat before
Next time I will be sure to go there
hey is there a non-reflection way to get the version of the game?
i mean there's a const in Constants called GAME_VERSION but you'd have to use reflection to get it cause it's a const
ok
thaks
yw
I don't need it in this instance I think but it's def gonna be useful to have if there's other fsms that are also different between beta and regular, esp with regards to waits and animations
ok I guess I'll try to fix the saving thing in modding api today but I have 0 knows about how tf unity serialization works
Wtf reflection to get const
It works like a static member
You can just get it
I guess that only works assuming you recompile for the new version
if you get consts from a program that is dynamically linked (say a mod) and rebuild the original without rebuiling the program, it will read the wrong number
Which is a safe assumption for API but not for mods
and that's what I was talking about earlier
with why I use static readonly instead of const for my version number
basically all consts are copied into the assembly at compiletime
@flat forum get dusted
if (data.modData.ContainsKey(name))
{
data.modData[name] = Settings;
return;
}
this code never runs
ok
something clearly changed in the modding api or in LB beta 1.3.3.7 because there;s just straight up no more save serialization
stop using beta ez
ok well riddle me this batman
do your levels save in dreamfighter
since ur on not beta
like if you quit to the menu does it start you back at level one?
oh
what
so the first one isn't a valid int but the second is?
public int kinDreamFails;
public int settingsVersion { get => GetInt(); set => SetInt(value); }
I guess it's a fault in my code then
[INFO]:[SuperDreamFighterDX] - Adding Settings to Save file
[INFO]:[SuperDreamFighterDX] - Adding settings to SuperDreamFighterDX
[INFO]:[SuperDreamFighterDX] - Add success. here's all the intvalues it found
[INFO]:[SuperDreamFighterDX] - Found key settingsVersion with value 1
i died 8 times to a version and never leveled down
yeah I know I fixed it in this version I'm working on
cool
I have a feeling that saves will work in this version but let me test first
and if they do
then I'll send it and start making lost kin
ok I just gave myself storage
same way blackmoth guy did
by dashing right as I got hit
jk it's unrelated to dashing
it's probably a redwing bug
by getting hit too often
but yeah I didn't realize this but
public int var;
is NOT valid for save data
but
public int var { get => GetInt(); set => SetInt(value); }
is valid
is this common knowledge and I'm just a dungo
why would the first one be valid tho
i mean it'll exist but it won't save anything
yes
ur right
but I didn't know that it made a difference
just because I'm wondering. How would you say
public int var { get => GetInt(); set => SetInt(value); }
without =>
curly brackets around getint and setint
public int var
{
get
{
return GetInt();
}
set
{
SetInt(value);
}
}
indentation on mobile is no
w/e I get the point
I really shouldn't be testing this mod with redwing
I feel like what I consider a fair and balanced speed is gonna be way too fast if you have to actually wait for your shadow dash
just down dash

tbf this is supposed to go to level 255 which is supposed to be unbeatable for humans
just like pacman
someone beat Pacman tho
and before you say it just because people have gotten to level 255 in pacman doesn't mean it was designed to be possible
Why doesn't Angle have a modder role yet imo
idk
Literally here talking and helping all the time
He doesn't like green
that's so wrong
Unrelated do you guys know what's up with the out of bounds geometry and why there's a bunch of sloped floors out there despite there being literally zero in bounds sloped floors?
green's like my favorite color, alongside red and purple and every other color
Because they threw shit together and didn't care about oob space?
well because sloped shit behaves so weirdly in HK
like the game is clearly not built for it
so they didn't put any inbounds
I understand why there's oob geometry, but why would it be sloped
Yeah ok
cause it's easier than not probably
and there's several inbound slopes too, well idk if they count
but like the roof of the FC boss fight
Also I guess I lied there's like that one roof somewhere that's sloped I think
there's def more than one iirc
Yeah there are a couple places I think
I tried reversing the gravity on lost kin but the ceiling was sloped so he was shit
darn that would have been interesting
I remember someone bringing up how you could slide really fast across them if you tried superdashing on them
I'd believe it
most of the slopes I'm familiar with you just fall infinitely on
so your vert velocity skyrockets until it hits maximum but you keep hitting the collider and getting pushed back up
Oh really? What's max speed? And could we do some SM64 style gain insane speed to clip through stuff or do collisions work properly in this game
Well
"properly"
there's a speed cap because the game has jerk
I guess you could try it with menu drop lol
and
collisions probably don't work properly
like I'm 95% sure
So if I held menu open while on a slope it's possible I'd eventually fall through?
That's actually helpful in one spot if so
try it
I will when im home


