#archived-modding-development
1 messages ยท Page 100 of 1
the floor probably shouldn't make mushroom clouds either if it's supposed to be pure black
anyway speaking of black floor time to make my addon/PR now
lol killself without the function does this
also you can pogo off your own skull
nice
Nice
haha yes
i found the dream world thing
rip
wow it's loading forever with even faster mantis lord sounds
y e s
it worked
@compact sedge rebuild imo
did you change any code
yes
because right now I'm working on building your rainbow floor
eh I'm making you do the merge at this rate
shouldn't conflict
im only editing mantis.cs
oh and I guess MantisGods.cs
oh and I added a new file
but other than that
lemmy write my code first then I'll merge
are you trying to increase the chance of a merge conflict
also this removes the annoying shade music
look there's almost certainly gonna be a conflict but ain't nothing I can't resolve
Resolve the conflicts by overwriting 56's changes
ok need to reboot because uh something filled my entire /tmp folder
so now I am out of ram
can't deletd everything still says it's using 8GB
f
idk it was some program making a file full of:
type unknown not a basic type
type unknown not a basic type
type unknown not a basic type
type unknown not a basic type
type unknown not a basic type
type unknown not a basic type
type unknown not a basic type
type unknown not a basic type
type unknown not a basic type```
weird
probably steam
because steam at 100% cpu doin nothin
and when stuff breaks it's always steam
woo got my colors backwards
apparently you need to set the material texture color not the material color
woo my patchset is done. that was really easy
also lets you set the floor color to anything you want
in addition to rainbow

just did the merge
gonna test before PR
turns out I was working with a very old version indeed
ok sent pr
and uh even on the merged version I still don't see my ghostie
but oh well
I use a VERY COMPLEX and SECRET formula for rainbow goodness ๐ณ๏ธโ๐
oh wait I found a bug
don't accept yet
oh wait i found a bug
ok now u good
also shade'll leave the area once you've died in another area
and then after that dying in the arena shouldn't spawn a shade
yeah pr is perfect can confirm no more bugs
anyway now the real question how do you even get hits in it's so fast
pogo
also one more thing I fought mantis lords and then travelled to the left of the black egg and this is what I see
a h h
wow it's rainbow
ima just redownload your save and hope that fixes things
this doesnt look normal
there was THK in that image but he went offscreen to the left
reee bug reproducible
I made the rainbow floor in spite of these bugs
lol
well you did fix the shade bug but
w h y
what's the versioninfo thing
settings version
every time you add a new setting you can bump it up and it will reset the global settings file
got the idea from modcommon
it's for the settings not for the mod as a whole
oh you mean separate class for settings? because it's cleaner
maybe it's because I'm really bad at the game but it's easy to find bugs when all you have to do to find them is die
lol
w t f
Part of compiling every mod I use means reading code from other mods. And y'all have some great ideas tbh.
does anyone know why this makes other objects in fungus2_15_boss not destroy on load
I didn't even find your code until round about 4 days ago gradow.
nice delet
Tempted to undelete but trying to do research before I ask a potentially dumb question
What's the worst that could happen if you ask a dumb question?
We all mock you and you get banned from the server?
Not so bad
well apparently not much because I haven't been banned yet

apparently getting thee root objects isn't making thee arena appear everywhere
it's the destroying everything
nv is ModCommon but loaded through the EnemyRandomizer dll I think
which is the answer to the question I deleted
Oh, nv is a carryover from my non-hollow knight common that I used to create mod common
nv namespace should have gone away for mod common stuff
But it's possible I missed stuff
ok I can send a patch to gradow
Nv? Maybe I didn't push the current blackmoth to git...
I was using the nv together with kerr like a month ago in an effort to try and recreate the super dash fsm in code
My bad tho, for forgetting to push my changes
how much else did you change
well I was gonna build it and play it to see what it's about after 56 recommended it to me but I'll wait I guess
literally never
Drive is up to date
Looking at the code, I can see some changes, but nothing game charging I think
Like, I removed backwards compatibility
why do i exist
Because lifeblood is released now (that commit was from before lifeblood)


did longnail and mark of pride both increase range by 1.2 instead of 1.2 and 1.3?
there was a fucking gameobject
called "BossLoader"
not destroying it fixed the problem
reeeeeeeeeeeee
gj
ok ping me when u update it
I'll push it first thing tomorrow morning

i've gotta go in like 5 minutes

We all elderbug in here
@compact sedge new release, gtg 
ok one slight critique:
GlobalEnums.MapZone.WHITE_PALACE;
is a dream zone but deaths are for real on steel soul
that's cause if i set it to dream_zone or whatever
it just keeps you at a white screen forever after you "die"
ohhh
huh
well it doesn't matter because nobody's playing your mod on steel soul, right?
probably
There needs to be a proper dream return set
o
sean stop 56 has homework
setting that mostly worked
couldn't use spells and couldn't take damage
also @compact sedge 256f makes you not have to cast
now for hw for real
but then you're dividing a float by a float which is less accurate than dividing a double by a double and then casting to float
it's a rainbow floor
wait are vars supposed to be fully capitalized and not camelcase
ok was wondering about https://github.com/5FiftySix6/Mantis-Gods/commit/ad1f0f5bbb3143ae90b65ce224bd370589d8e74a#diff-d4a8732ea25972be12392b585050ab2bR35 but I guess that makes sense

I guess this is where not knowing C# conventions bites me
in c++ even camel case function names is correct
Fuck conventions
not a bad way to do it
actually
there's a better thing for functions
underscore_but_all_lowercase
i do pascal case for everything that's not param names and random variables i make in a function
and the consts thing
Typically we use it the way I described bc of stuff like this:
private float foo;
public float Foo { get { return foo; } }
so function_name()
variableName
CONST_NAME
But you could do the same thing with
public float foo { get; private set; }
The only thing I have tried and sometimes preferred was kFoo for const
Well yes, I'm just describing the case where you have a private backing field of the same type as a public property
readonly and private are different
but what about const
But these days I also prefer the all caps const
This isn't something that's meant to never be changed
Only to never be changed outside of its class
is this bad code:
private var myVar;
var get_myVar() {
return myVar;
}```
bad variable name aside
Harder to read when you have a file full of junk
{
}
If you're writing an api don't make things private imo
^
but uh I think the standard for c++ is add an underscore before the private var so
Idk about standard, but after about 5 different ways that's how I settled on doing it
Er, for member vars
public var myVar {
get
{
return _myVar
}
set
{
_myVar = value
}
}```
Looks my early c# code when I first transitioned from c++
One problem you have with unity tho is what do you label a private serialized field (functions like a public field in the inspector)
Basically, special markings for all these become dumb to manage
Better to just drop them and use intellisense
why make anything serialized
#unitythings
your crossroads modloader broke on linux until I removed all the random serialized tags from one of your function and then everything worked
I didn't change anything about those variables just removed the tag
ยฏ_(ใ)_/ยฏ
[SerializedField] ?
Well if you removed that it would horribly break if those defaults weren't correct
Because that tag means the data was set in the unity inspector
Not in the code
The defaults may still be provided to ease development
ยฏ_(ใ)_/ยฏ
But the attribute says the value is saved in the scene
then maybe I should have taken the smart approach and changed the scene values
but tbh I'm still amazed you wrote a mod installer in unity
(Shrug)
and, just to level with you, I don't like when variables are set in Unity
HK has made me hate that
because everything in that game is set in unity
and it makes it annoying to modify
Well, there's good and bad ways to do things
I understand the bad taste that comes from what you're talking about. We run into it a lot with people's first projects in unity at work
you do game dev for a living?
There's also a lot of people that go over board with the "cool new thing" of the month
Yeah, tho not what you might expect
I do slot machine games
Nah, much bigger
working in gamedev sounds like my personal hell
so uh good for you I guess
but I could never fit into that environment
konami doesn't even do slot machines they do pachinko
Well, one nice thing about what we do. It's way more stable than normal game dev
ehh they're basically slots but if you win you get balls to drop
And I get to do basically everything that normal game dev does. Shaders, physics, networking, etc
normal gamedev from what I heard is like 70 hour work weeks 30 unpayed and you get fired after the DLC is done
(lul 70 hour days)
Depends on the company. My sister works on a team at MS and my best friend works at bungie. We all get crunch times buy don't have that hire and fire revolving doors
Just need to find a good place
idk I'm still in college but I want a job where the primary thing I'm doing is completely unrelated to coding
even though I love doing it
You were into math right?
the only code I write that isn't crap is when it's math
I double majored in math and cs. Took the actuarial track in my math dept bc I was dumb
We hire mathematicians to design math models for various gambling games and scenarios as well as do some coding to test and verify models
So there's a lot you can do with a math focus
Oh cool ๐
if I can do "boring" lab tech work at some company, where code comes in handy but is not the main focus I'll be happy.
Yep, plenty of that out there
Had a friend here that worked in a spices lab developing new spices for various companies
not exactly the most ambitious of plans but oh well it seems fun to me.
Made for neat dinner hangouts when he'd bring in his new experimental samples to season things with
hey yall I found a bug with the randomizer 1.3.1.5
grimm gave me the mothwing cloak, and upon banishing him (not finishing the ritual) the mothwing cloak along with the shade cloak disappeared from my inventory
also, the dream gate upgrade to the dream nail randomly disappeared, even though I have 1500+ essence
edit to the last statement: the dream gate still works/shows up in my inventory in the room that I created a dream gate in, but nowhere else
oh wait no that is weird
i got the dash ability after getting the carefree melody
but the dream gate is still buggy and i have no idea why
I was reborn at this room after dying in the Watcher Knight's room.
Sooo, has anyone played with bonfire mod? Is it just me, or the hud never dissapears when close to bench , even when in inventory ?
yeah, that's something I haven't quite worked out after lifeblood
the way the game checks for inventory has changed
Has Mantis Gods been updated?
Also, as a side thing
an idea: make it so that they (re)spawn the moment you enter the room
this way you can refight them all you want
How do I level the Child Up?
if you have infinite grimm you have to fight him
you can turn it off by editing the config file
and just telling it to not use infinite grimm
and then it will be at max power
mhm
I wanna do it the Infinite Way
Infinity Grimm
OH MY
That wasn't an intentional Infinity War reference
ok well it's just based on the amount of damage you do to him
for max level I do... 15k?
yes
really good once it gets a few upgrades
I'll see that for my shelf
btw did you update IG so it doesn't say version too old
ok
anyway I'd bring it in after your second time and on but it does cost a lot of notches so it's definitely a sacrifice
depending on if you use nail or spells
It costs 3 notches now...?
6
but grimmchild can't stagger but every time his ball hits does reduce the number of nail/spell hits you need to stagger by 1 and he can hit a lot especially during pillars and balloon.
which is what makes him pretty decent in the fight
What's the code for Stalwart Shell?
so, I was looking through the inventory code to try and fix bonfire
and, yikes, it might be worse than fotf
inventory
Oh
Why wold it be?
Isn't it just a simple Inventory?
oh god
it has an fsm for EACH POSSIBLE INVENTORY ITEM
like, every item, upgrade, spell
inventories and menus are pretty complex. even if TC didn't make it in a dumb way, there's a lot of things to account for
especially when you have a ton of possible collectibles
yeah, that's just dumb
i was just addressing the "Isn't it just a simple Inventory?"
HK's inventory is fairly extensive when it comes to inventories
granted.... a lot of things are bools on if you have something or not
compared to adjustable inventories where you can move things around
anyway, sorry for the delay. Here's bonfire with working inventory
@compact sedge https://github.com/Ayugradow/Blackmoth just pushed the latest working ver
So
because they use it
you can easily change from wall to floor, get a hit and hide
And repeat
Only way this "strategy" will fail
is if the 2 decide to go
Boomerang - Drop/Dash
And they tend to use different attacks often
so you can basically go no hit for the 1st half
and then almost no hit for the 2nd

Hey have any of you seen somebody whose name has three letters, starts with a K, and ends with a T?
It's an art movement

I could just make it so they drop on top of you if you go on the wall
KUT
No vowel
K๐ ฑT
yes
K
T
K
T
K
T
K

T
Now ya got it!
KFC it is then
wow a lot changed. you added monomod, made it all one file
nice commit name
it only gives you shadow dash length when you actually have shadowdash and not when you just have the charm on. looks like you rewrote superdash, added a thing for FotF, added custom descriptions for things. Quite a bit of stuff.
idk what happened
i was dashing away from false knight
i think i hit the wall
and then i started floating
re i floated again
stop floating m8
that was a vanilla issue, right?
levels
I think the getting stuck after dash was a vanilla issue
I could try to fix it, but I have no idea what causes it tbh
I'd have to rewrite TC's code from scratch
which is feasible, sure, but
:effort:
"I'd have to rewrite TC's code from scratch"
ugh I hate this because it's semi-relatable.
I don't blame you for not
shield?
nope
my dash stopped doing damage
thought it was the shield but then i went back and couldn't kill my shade
ree
oof
the code is actually just for the visuals
ugh really? that's awful
Team Cherry's good codeโข
there's no easy way to make default dash behave like shadow dash - that is, dashing through enemies
It's weird because I hate TC's code but every good indie game I love made on a tiny budget is almost entirely built in FSM.
I'd have to change the FSM (and at the time blackmoth first came about, we just didn't do that at all)
so what I do instead in blackmoth is just remove "hasShadowDash" from the "CanShadowDash()" method
Seanpr we need this hook in modding API, it would be really useful to me.
right now I just have an update thing where it tries to get the fsm until it's set to awake.
or have 56 kbt's PR accepted
^
that'd be cool too but this seems like a hook worth having in the actual modding API even if 56's isn't accepted.
yeah
wouldn't that require changing playmaker's dll tho
I should prolly add a null check before that var
oh, yeah
that's why it's not there, I guess
wait why would it be null I thought the point of that was that it only triggers when it's not null
like right now the alternative is:
in update:
if (go != null) {
//code
}
yeah makes sense I get what you're saying
I mean, it's only a one-line IF statement
but still
well, I guess it's the same anyway
jump is now useless
I'll be comparing against null
I'm conflicted on using monomod in my next projects
fly?
i meant just go higher than jump
you got dashmaster/quickdash/blackmoth's elegy?
charm
replacing what?
it's grubberfly's elegy renamed
wow you can double jump with dash
oh
wtf
and I'm like "m8, you start with dash"
weird question but: bonfire + blackmoth?
I'm also working on it to make it behave better
sadly, no, AA
they behave entirely differently
missed opportunity
I mean, I can prolly make them compatible
actually, maybe I already did?
last time I touched those was when lifeblood came out

gotta make a modding ecosystem
so every mod you make is compatible with and enhances every other mod
/s
yeah, they are compatible
huh
I'm actually more thorough than I give myself credit
ok so step one done
also, how do I set load order for mods?
for it to work, bonfire has to load after blackmoth
step 2 is making it have exclusive features that activate when you have both mods installed.
that'd be great tbh
@mighty rose Grimm isn't even randomized in the 1.3.1.5 one so you installed the wrong randomizer
I have the most recent one, i thought it was 1.3.5.1
1.3.1.5 is the most recent yeah
What does it say for randomizer in the top left of your main menu?
glad you're enjoying it 56
quickest pastebin in the west
I'm not at my computer right now, will ping later
oh geeze MOP is 50% boost I thought it was only 30%
I need to use it lol
MOP + longnail + sharp shadow
theory says 3.2x dash length
practice says idk need to try it
if (PlayerData.instance.equippedCharm_18)
{
num *= 1.2f;
}
if (PlayerData.instance.equippedCharm_13)
{
num *= 1.5f;
}```
shhh I don't use GetBool
I'm not concerned with you not using GetBool there but it would be helpful to me if you used getint or whatever vartype it is for:
HeroController.instance.DASH_SPEED_SHARP
if that's possible
does HeroController have a GetInt?
nvm
oh well that's ok
because, iirc, most HC fields don't actually see that much use aside from being referenced
I know it looks like a constant/readonly variable because it's all caps but I wonder if it actually is.
it is
@copper nacelle how is it possible for me to add notches to myself using your program?
I didn't get a notch from the coliseum
iirc you can tho
Maybe I'm doing something wrong
or I have an old version
is there a newer version?
of HKSM
@austere torrent what version of HK are you playing
all the numbers
nice "newest version"
wut
1.3.1.5
1.3.1.5
oh ok
^
ya ty
KDT updated it to work with modded savefiles and lifeblood
I dunno why
but every time I save the file
it just resets it back to 10 notches
did you press the save button
how many notches do you want?
But 11 is possible in game
I know
Just go get them all
Oh right my bad I forgot that means you can't do everything
I never got the notch from the coliseum
You're still on that save?
so, it should be fixed now
But I've passed the coliseum before patch
no like
I already beat it
before
a long long long long time ago
Soooo you are still on that save, then
so you are still on that save, gotcha
edit your save file
Pardon?
ok
it's only lying if it's intentional
can you tell us what you're doing with HKSM?
because it should be simple to add/remove notches using it
Listen to me
so
when I add notches
it resets back to 10 after I save
can someone ss with me and see
just set the did CoF variable to false
and redo it
not the CoF one
but the one for the second trial
first
first
sry
colosseumBronzeCompleted
took me all of 2 minutes to find
because it has a weird name
set that to false and redo it
sure
I don't see an option to do so tho
sorry idk as I said I edit it manually in a text file
O
I don't know what advice to give you
I can't do that
I know you can't
kinda sketchy exe
drag system32 onto exe
hey download this totally not sketch exe guyz
Literally anything to do with this channel is running other people's code on your computer with little safeties
Nothing is more sketchy than anything else
nice ama block
oh crap I don't have wine so I can't even figure out what that error exe does.
joke
clone the vm and start it in a copy
lol
it's an itch game
cost me a buck or $1.50 for mit source code
so I paid 3 bucks and made a mod
not a very good game btw
then why'd you buy it twice
itch lets you pay whatever
and the extra goes 100% to the developer
idk why I gave em 3 bucks guess I was feeling generous
give $3 to 753 so he can make 3/100ths of shitmodst 2
I commission stuff I can't do on my own.
but making shitmodst is something I'm overqualified for
partially funded already too iirc
wow that was a hard game to find: https://avarisclari.itch.io/error . Don't buy it it's definitely not worth its current price. Besides I have the source for it (sorta)
it's worth about 6 cents imo
probably belongs on kongregate imo
do people use that site these days or is it all newgrounds?
Kongregate has the BEST idle game of all time though
anti-idle the game
never seen anything made that was 1/10th as good since then
and keep in mind anti-idle the game has no microtransactions and other BS
life is the best idle game
life is a pretty bad game
only if you're bad at it
alright I'ma post that error source code in #297468195026239489 because it's too memey for this channel and not at all hollow knight related. Also I don't even have the original SRC, just the mod I made that adds new choices and makes it actually possible to win.
18y long tutorial is pretty poorly designed tbh
can i use cheats to get 100%
no but you can use cheats to get any%
or turn down the difficulty just to experience the lore
no but you can use cheats for 106%
you can use cheats for 2000%
also are mods a thing
idk NATO and the UN
no
though the latter is kinda lazy
this channel is a myth
c e a s e
There's an infinite money glitch but it's not easily reproducible
Just sometimes when starting you'll already have max money
some enemies you kill drop more money than others of the same type but that might've been patched
is this in base game
yes
oh nvm sorry was asking about Seanpr
o
Memes
if this is vanilla then it seems like a pro speedrunning strat
find the time that produces the right random numbers needed to cause it
set clock to play game at that time
(or use a dank wrapper program to spoof the clock time, idk if that counts as TAS tho)
I feel like you think I was talking about HK
We need a deepfried 
cornywoker and wokest in this server when
I just watched a video about LD_PRELOAD and I'm pretty c++ is an easier language to mod. Theres a thing called dlsym and you can use it just like monomod for hooks except it's built in and you don't need to patch any DLLs to do it.
ofc unity c# has one advantage that all the original function names are intacted and not stripped
LD_PRELOAD loads any arbitrary code before anything else
and if you write your own functions with the same name those will be called instead of the game functions
then you use dlsym to call the original game functions
so like if the game has a function called calculateNotchesUsed()
you write your own function called
calculateNotchesUsed() {
// code here
dlsym(RTLD_NEXT, "calculateNotchesUsed");
}```
I think that's how you do it not 100% sure
but like basically you can use it to call any ingame function I think
and then you compile it as a shared object and do
LD_PRELOAD=mymod.so game
and thus disabling or enabling mods is as easy as setting an environment variable
but with this I'm now convinced literally every game is moddable if you're persistant enough.
I really wanna try using these newfound tools to remove DRM from games but I don't buy very many games with DRM and it's almost always steam DRM which I don't really want to remove.
Can we say drm some more?
drm some more
because I'm thinking more like DRM that stops you from using the game with custom stuff like anticheat or vmprotect.
yes using a custom library to stop custom library detection DRM
ok holy crap blackmoth is fun. broken? absolutely. but fun af
also it's REALLY good on a steam controller because I can bind RT to turbo pressing the dash button and dash like I have dashmaster but I'm also on cocaine.
some people call the turbo button cheating
they're right but idc
actually idk if intentional or not but I'm completely unable to hit these enemies with dash
...or anything I guess that's my punishment for turbo buttoning
That's a vanilla bug
If you sharp shadow into anything that makes the tink effect
Like chests
Just breaks completely
Always been a thing
anyway seriously killing false knight by holding RT and tapping left and right is actually stupid but incredibly fun. you can even stop him from doing his death animation.
I feel like slugcat with a machinegun
Why
literally hold turbo dash button and tap movement buttons and I'm immortal when on the ground and once I get infinite air dash I'll be immortal there too
it's stupid and broken but incredibly fun
I have returned to annoy you (sorry)
anyway I'm gonna look into fixing TC's BS bug because it basically makes shield enemies really annoying @rain cedar
but first
What does that mean
You're speaking gibberish
ima do whatever @flat forum wants from me
ok you know what turbo buttons do, right @fair rampart ?
someone said that PlayerData.instance.nailDamage isn't checked often enough
Like crystal dash
so that even if you modifying it won't have much result
ok
uhh I'll talk to you in #297468195026239489 while I continue talking to folding here
So, I went to the Example Mod and wanted to ask about this
(gonna paste the whole thing here)
public void OnAttack(AttackDirection dir)
{
LogDebug("Attacking");
if (_hitCounter >= 4)
{
LogDebug("Critical hit!");
_tempNailDamage = PlayerData.instance.nailDamage; //Store the current nail damage.
LogDebug("Set _tempNailDamage to " + _tempNailDamage);
PlayerData.instance.nailDamage *= 2; //Double the nail damage
_hitCounter = 0;// reset our hit counter
return;
}
_hitCounter++; //Increase the hit counter
}
The Way I'm understanding things
is that it check every time you begin an attack
Won't that also check for the PlayerData.instance.nailDamage?
So that, every time you attack it checks and you can modify it
it's gonna take the current nail damage, and store it in a variable. then it's gonna double the nail damage
the reason it keeps the current nail damage
is because it has to set it back
or it would constantly double
forever
so it would go from 5 to 10 to 20
etc
Yeah, this part I understood when making the other thing
but it checks for nailDamage every time you attack
so
yes
so you set it right before the attack, which is what the OnAttack hook does
and then you set it back right after
will it work if I replace the if with something else (checking for a charm)
yes
so, A += something will work in a similar way
and thus
PlayerData.instance.nailDamage += 3*(PlayerData.instance.maxHealth - PlayerData.instance.health) will make nailDamage based on health lost
yes but that might not be what you want
won't it simply give you 3 bonus damage for every lost mask?
(I have the part about resetting the damage down there)
yes but that might not be what you want and let me explain
because consider this. if they have 5 max health and only 1 current health and a level 1 nail, their damage would go from
5 normal -> 17
which is over 3x
but if they have 9 max health and 1 current helath and a pure nail their damage would go from
21 normal -> 45
which is only around 2x
just food for thought, the code is correct
I want to make sure it works first
Now, the final question I had was
using .......
using .......
using .......
things at the start of the Mods
I would do something like
PlayerData.instance.nailDamage *= 1 + ((PlayerData.instance.maxHealth - PlayerData.instance.health) / PlayerData.instance.maxHealth)
yes depending on the kind of scaling you want
that looks like a cool idea
Maybe play around with that a bit instead of using it exactly if you like it
Probably a bit too weak
PlayerData.instance.nailDamage *= 1 + [X] ((PlayerData.instance.maxHealth - PlayerData.instance.health) / PlayerData.instance.maxHealth)
where [X] is some number such that [X] + 1 is the maximum multiplier of damage you want the nail doing when at low health.
so you could put 1 + 3 ((PlayerData.instance.maxHealth - PlayerData.instance.health) / PlayerData.instance.maxHealth) and the nail will do just under 4x damage at 1 health
I'll play around and decide on a balanced build
and the
using System.Reflection;
using GlobalEnums;
using Modding;
at the start?
wdym
it's how you use various functions like PlayerData.instance
it wouldn't know what playerdata you were talking about without using Modding;
for example
That's not right
PlayerData isn't in the modding namespace
It isn't in any namespace
TC just dumps most of their classes directly in
well modding is used for the top of the thing
where it says
Class extends Mod
Class : Mod
Yeah
You could alternatively put Modding.Mod
using is just saying you want the compiler to check that namespace for unknown types
Good luck
I don't wanna say that bug makes it unplayable because it doesn't but it certainly makes it less playable.
Definitely
ok this might be harder than it looks
wtf even when it does work it segfaults every time I dash
and it's seemingly not the mod
which one
there's no ondashpressed hook used in blackmoth 
That screenshot you posted has 6 errors from OnDashPressed
oh ModHooks.Instance.DashPressedHook ?
every bit of code there runs before the segfault tho
Yeah
so the hook does nothing?
No it runs, it just also throws an error
It's likely that multiple mods hooking it would have only one work
But it's pretty niche
pls fix also merge monomod hooks into API also give me a million dollars while you're at it
but in all seriousness if it's true that "multiple mods hooking it would have only one work" I really would like a fix asap.
Yeah I guess that is pretty significant if you're planning to use the hook in a mod
or I'll have to postpone my, well let's just call it a meme mod because I still haven't announced it yet
Don't think that's my problem
nope
@solemn rivet
When I cast a spell in blackmoth the game reports this:
[ERROR]:[API] - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
at BlackmothMod.Blackmoth.SetDamages (HutongGames.PlayMaker.Fsm hitter, HitInstance hit) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0
at Modding.ModHooks.OnHitInstanceBeforeHit (HutongGames.PlayMaker.Fsm owner, HitInstance hit) [0x00000] in <filename unknown>:0
once for every frame the spell is on screen.
Nice
Try that
If the dash hook still works properly I'll push it/put it on the drive
Completely untested but it's a very small change so probably fine
what line did you change
thanks
Somewhat related: Looking at API code on github is actually horrible
Someone (I think Wyza) has their VS set to use tabs instead of spaces for some reason
Should do a replace of all tabs with 4 spaces some time
idc I don't read whitespace I read code
Proper whitespace makes it much easier to read code
Github tab size is not 4 spaces
So everything is wack
I guess I should
I just don't want to mess up the github statistics
Since it would add like 600ish lines -/+
those don't matter
You're right
you know whenever someone has an issue with hksm
99.99% of the time they aren't clicking file > save
they are clicking some button on the actual hksm window and not the editor
I swear to god today I found three bugs none of which were my fault
but I know what you mean
I know it sounds like I'm crazy but Blackmoth really does segfault when you cast spells, Modding API really did segfault after DashPressedHook, and the game (presumably) really is in the wrong state when you try to shadowdash after tinking something
No I'm not the first person to find any of these bugs but goddamn it if I'm not gonna get two of them fixed
they're not real segfaults ofc because of the way c# is designed but they're caused by the same thing
undefined behavior from attempting do stuff that's undefined
imo exception
exception is just what you call segfaults caught by libraries
tfw reflection breaks logic
That's not actually restricted memory, though
no or it'd actually crash
but something like this in a library
if ( vector.size < i ) {
throw OutOfBoundsException;
}
ultimately is just preventing undefined memory access even if it's not undefined memory access itself.
And I guess the whole idea of protected memory is just the kernel protecting your computer from entering an undefined state
so ultimately all errors are undefined behavior errors I guess.
I guess that's a little reductive, I'ma start using the correct terminology instead of all the words I use coming from c


