#archived-modding-development
1 messages Β· Page 92 of 1
I'll see it later
btw if your 9 minute run wasn't your first run of nkg
it's probable that it was moving at more than 3x speed
you might be able to do even better now
it wasn't
it was like
the 3rd or 4th
So, can someone explain how this should be done:
I wanted to try and make a mod that makes the nail much longer when you equip Longnail
and Gradow nicely pointed out that there's this thing
ModHooks.Instance.SlashHitHook
That can be used. But it only works when you hit things and not all the time
Gradow said that I have to Hook the nail thing
Hook AfterAttack
Use reflection to get Herocontroller.slashComponent
Change stuff on it
what about? PlayerData.instance.nailRange
set that to any value you want when longnail is equipped
by doing a check for longnail?
maybe idk not a programmer either
might be the totally wrong way
Could work or it could be a dead variable
pretty sure thats a wrong var
Or it could require some FSM event
like nail damage doesn't actually change nail damage
It does if you send an event
well yeah
Ill check if its dead in dnspy
There's OnAttack and AfterAttack, what does each one do?
AfterAttack for this case
just use runtime detour on the nail controller class
NailSlash.scale will definitely work
that changes it 
I was getting some stutters when I tested runtime detour hooks
and how do I check if Longnail is equipped?
I'll have to have someone like ciplax with an absolute garbage computer test it
yeah, I know
To see if it's actually bad
it's in startslash
StartSlash is called immediately after AfterAttack
oh nvm
That's why you want to hook there
so if having both mantis and longnail makes it 40% bigger in both x and y direction it actually makes it 1.96 times bigger vs 1.56 times bigger of mantis alone and 1.32 times bigger of just longnail
so the total area of the hitbox almost doubles?
It's 1.25 mantis, 1.15 longnail, 1.4 both
yeah but those are size increases in both x and y direction
which means the total area of the hitbox is 1.25x1.25, 1.15x1.15, or 1.4x1.4 ?
Total area of the nail isn't a good metric imo
here
if (this.mantis && this.longnail)
{
base.transform.localScale = new Vector3(this.scale.x * 1.4f, this.scale.y * 1.4f, this.scale.z);
this.anim.Play(this.animName + " M");
}
else if (this.mantis)
{
base.transform.localScale = new Vector3(this.scale.x * 1.25f, this.scale.y * 1.25f, this.scale.z);
this.anim.Play(this.animName + " M");
}
else if (this.longnail)
{
base.transform.localScale = new Vector3(this.scale.x * 1.15f, this.scale.y * 1.15f, this.scale.z);
this.anim.Play(this.animName);
}
else
{
base.transform.localScale = this.scale;
this.anim.Play(this.animName);
}
this is the thing about the MoP and Longnail
It sure is
I guess it helps if you're really bad at pogoing.
increase both height you can pogo at and the horizontal distance from the object
I'm gonna try it in path of pain some time
I wanted to try and make this
if (this.mantis && this.longnail)
{
base.transform.localScale = new Vector3(this.scale.x * 1.4f, this.scale.y * 14f, this.scale.z);
this.anim.Play(this.animName + " M");
}
else if (this.longnail)
{
base.transform.localScale = new Vector3(this.scale.x * 1.15f, this.scale.y * 11.5f, this.scale.z);
this.anim.Play(this.animName);
but
I don't understand jackshit of coding stuff
I just look around and try udbnerstanding what each thing does
```csharp
Code here
```
and then I edit what I udnerstand
You'll have to store the original scale somewhere then multiply it by the numbers you want divided by the original numbers if it's equal to the original
yeah i've killed nkg twice now
ok do you have modcommon
no whats with these dependancies
just modcommon and mod api
also use the latest dll i put in the discord it fixes an important bug
not a large one but an important one
ok updated the one on the github https://github.com/natis1/infinitegrimm/releases/tag/0.2.3
too lazy to make new release like I'm supposed to
It's just this in HeroController.DoAttack()
if (this.playerData.equippedCharm_32)
{
this.attack_cooldown = this.ATTACK_COOLDOWN_TIME_CH;
}
else
{
this.attack_cooldown = this.ATTACK_COOLDOWN_TIME;
}```
and ATTACK_COOLDOWN_TIME_CH is?
can it be modified?
lol
maybe unity editor stuff isn't constant? or was it that way in the script itself?
i dumped the values for attackspeed
and can something like "ATTACK_COOLDOWN_TIME_CH; = ATTACK_COOLDOWN_TIME_CH; * 1.25f " be done
they are on the wiki
Idk man fix your formatting
no semicolon after the variable
```csharp
CODE HERE
```
ATTACK_COOLDOWN_TIME_CH = ATTACK_COOLDOWN_TIME_CH * (float) 1.25;
how do you do this?
semicolon goes at the end of the line
I don't have the symbol for it
this-> `?
Minecraft calls it grave
I guess it looks like a grave accent
but don't try writing e` instead of the real Γ¨
But I don't have the real e` on my keyboard
I forgot how to do it on windows
Alt codes
I do alt+shift+ ue8
ok that's like about the same number of keystrokes
nah because with alt shift you're doing twice as much work with your left hand.
unless you don't have a numpad
Not having a numpad in 2018 LUL
how much hp is each balloon phase?
so im at 8.5k or something
Cool
didn't actually seem to be getting faster so I killed myself
how do i update a mod via mod installer?
In my installer, just uninstall and install again
hmm, my friend would like this mod. every time i play hollow knight with my screenshare on, she immediately asks "where the heck is grimm"
Does she want a mod that turns everything into Grimm or something
probably would enjoy that
does anyone know how the zoom effect while focusing works?
beats me
so, I'm detouring the GameObjectIsNull fsmaction to find a certain gameobject for my mod
and this happens everytime I swing the nail:
[INFO]:[Berserker] - FSM GameObject None
[INFO]:[Berserker] - FSM GameObject Scenemap
[INFO]:[Berserker] - FSM GameObject TileMap Render Data```
these objects get checked if they're null
for some reason
well, those are actually FsmGameObjects
wait so it checks if the scenery has changed?
so every time you swing the nail it checks if there's something to be destroyed?
I guess
I told it to print out the actual game objects
[INFO]:[Berserker] - TileMap Render Data```
[INFO]:[Berserker] - _Scenery```
mfw it actually does
seriously
the fury fsm is a nightmare
it's supposed to be such a simple fsm
but there's like 5 layers or so of fsms
but people say the whole game's code is a nightmare
I mean it's definitely the worst game I've ever written a mod for... technically.
you could literally translate fury into a few lines of code (10 max) if you had access to all the resources
animations, sounds and stuff
it's far from a good starting point for something to try taking apart without previous knowledge of coding?
you had no previous knowledge of coding?
just basic
that's already more than me
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (11)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (18)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (13)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0001_glow
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (24)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (7)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (20)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (14)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (5)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (3)
[INFO]:[Berserker] - Found fury vignette fury_effects_v2
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (6)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (8)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (22)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (12)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0000_screen
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (10)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (28)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (16)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (9)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (1)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0003_glow
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (4)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (2)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (26)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2 (15)
[INFO]:[Berserker] - Found fury vignette fury_pieces_0002_cracks2```
these
ALL of these
are game objects
WHY
why?
I only hope I don't have to activate all of these to get the cracked screen effect
cracked screen effect?
oh my god
@solemn rivet I think it's better if you found a way to disable that effect altogether
I'm going to use it as an indicator for berserkmod, Niko
is every vein a separate thing?
I fear so
...
2 different variations of the vein
and they are all positioned individually
...why
I don't think there are two variations
I can't find fury_effects or fury_effects_v1
wait let's see what the sprite dump mod does
so there might not be fury_pieces_0001
so
progress
Printing scene hierarchy for game object: fury_effects_v2
_GameCameras\HudCamera\fury_effects_v2```
OH GOD
open this at your own risk
cursed txt
πΎ
Uuuuhhhhhhh
wtf
each one has a spriterenderer component
oh god
please tell me I'm sleeping
and this is a nightmare
i can't even be mad really
hey
βββββββββββββββββββββ
I found an empty keyboard symbol
wut
βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ βββββββββββββββββββββ
it's nothing
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
here's a bunch
but they all still aren't visibly marked
it appears empty
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
huh
I don't know what it is
aaaβaaa
βaaa
hm
it's not some text editing tool
hey, @compact sedge
try renamingyourself to this character
β
yay!
got it!
so
\--Component: Transform
\--GameObject activeSelf: True
\--GameObject layer: 5
\--GameObject tag: Untagged
\--Transform Position: (0.2, 0.0, 15.7)
\--Transform Rotation: (0.0, 0.0, 0.0)
\--Transform LocalScale: (1.5, 1.5, 1.5)
\--Component: Animator
\--Component: FadeGroup```
it has a "FadeGroup" component
which is basically a nice way of saying that it groups all of those individual gameobjects and activates/deactivates them all at once
all fonts?
also on discord but only in the message box not in the actual message
yes
I think the slash is the character for invalid characters but the slash is cutoff
this is on its own
ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββ ββββ ββ ββalso the discord message box I'm like half way on the first line right now
wait hold up what
wtf
yeah that's not 0 width
maybe that char isn't zero-width space
thought it was
β
this is zero-widthββββ
and it shows in the discord message box as zero width too
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββhiββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
wait idk if that has any 0 widths
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Yeah that's zero width alright
I put like 20 of them before that
nice
wow good site
i was literally searching zero width space and copying it
cause ctrl-shift-u for alt codes doesn't exist on windows
and i don't have a numpad
I should probably add that as a layer at some point
zero width spaces are so useful for doing things that shouldn't be done
whoever decided to add zero width space to unicode has a lot to answer for
it's great ree
You should play lightbringer
Whats it like?
idk I saw an ad for it in the greatest mod ever
Only saw preview, no idea if it's good/bad/easy/hard etc
^
so, this is how the berserkmod is atm
it takes 2 seconds to enter into berserk mode
once it starts, your health drains at 1 mask/second, but you deal double damage
current issues:
during the first usage, you get no aura, sadly 
if you s&q, it stops working
also, there's no audio cue for the effect
oh, the trigger is the backspace button
So how do I add options to the mod options menu?
currently I have options saved to a json file
after looking at example 3
but I want the player to be able to change options in game
too bad the steam moves
the steam loops too
i took the video into blender and did some basic splicing
unless you have magic eyes it's a smooth loop sequence
i have that exact same background running on wallpaper engine
the only ones I could find on WP Engine were superwide (which isn't compatible with my monitor) and one that had the knight visible, which I didn't want
yeah mine has the knight visible
actually, i have an idea
maybe it's just me but the only mod I see that has its own option menu is enemy randomizer so I guess I'll look into that is done
if you actually figure that out, I'm all ears
oh god nvm just looked at the enemy randomizer code
If I implement it that way nobody will be able to use my mod with any other mod that adds options because it just hardcodes an options menu button
at a specific location
oh
It's not bad it's just that I want my thing to work with other stuff so I guess I'll just stick to json until y'all add options to Modding API
as in more options than: mod enabled/disabled
it's because i edited the thing to upload a better version, one moment
i just wanted to say thanks for the debug mod because i was able to make some loopydoop wallpapers
but in the first upload i accidentally copied a thing twice so there were a few extra seconds where it overlapped itself all stupidface
Cool
sean, did you see the fsm I posted earlier today?
Yeah I read the fury stuff
is the item pickups fsm even worse than that?
oh
it took me a while to figure it out, since I couldn't find any references online
yeah, I figured after looking through it
it's specifically made for animations and stuff
So uh do I need to call something to get my global settings to load from a file?
im dumb
no wait nvm I thought LoadGlobalSettings() would do it but it didn't
but no it's still not loading from the file
wait nvm im dumb again
sorry
π
Fuck.
Guys.
Someone needs to make a Hollow God mod.
Buff the final boss (not radiance, hollow knight) into what he should be.
Go for it
you can if you believe
I believe in you
But come on, wouldn't that be really cool if someone made it?
Buff the crap out of THK.
It probably wouldn't be that hard for you to do
I'm working on hardmode right now for my mod and the hardest part is gonna by far be balancing it so there's no RNG
I can't either but I can read docs, copy other people's code, and ask a lot of stupid questions in here
Oh no, believe me
I am the example of someone who can't do anything properly except maybe annoy people
But someone did send me the code for the THK fight
So, I'll look through it ans try undsrstanding what does what
Hardmode, y'all!
Oh fuck that's so loud
sorry I keep my system volume levels low and game volume levels normal
and you might do it the other way around
Nah I do it the same
That's still deafening
I can't watch that btw
Discord must use software rendering
- high fps on the video
Lags hella hard
you can click the mute button and also there's a download button
also wtf why is the linux client better in this regard
you want hard mode?
Is it compatible with InfinitGrimm
this is infinite grimm
I'm adding an optional hard mode and testing it out at its fastest setting
That looks pretty crazy
yeah everyone here is too gud at the normal grimm fight
Heh
also in all the bugtesting I became pretty gud at it too and got 7k dmg
I mean my mod's open source so I could tell you the variable to change
you just changed 1 variable and that's what happened?
Nah he means to make it that fast
It looks like that video is two grimms
Definitely not one variable changed
It looks like there's 1 Grimm, but time between attacks has been set to like 0
1 grimm but all waits have died instantly
i think
and the attacks have been speed boosted a shit load
Yeah actually there's never two grimms on screen
there's only one grimm but I'm editing all the wait times using 3 variables which are generated by taking 1 variable and doing a linear transformation on it
and because I'm not a mathmatician I just plugged the matrix into wolfram alpha
I love that site
It's how I used to pass math classes
But now half the shit I need to do it doesn't give step by step solutions for
if you're doing advanced enough math there comes a point where you give it up for python or R or mathematica desktop
or so im told
idk
I never got there
so, looking through an example mod I found
and I was wonedring
if a similar thing exists for Berserk Mod
it's a .cs file thing
that's the source yeah
in github
yw
what charm number is Longnail?
so, checking for them being equipped will be like
if PlayerData.instance.equippedCharm_18 and PlayerData.instance.equippedCharm_13
else if (PlayerData.instance.equippedCharm_13)
else if (PlayerData.instance.equippedCharm_18)
or something like that
yeah basically
hiveblood
29?
Hiveblood
yeah
I'm going through Berserk's code
that's why that was left there, my mistake
if elses are for nerds tbh
length = 1 + PlayerData.Instance.GetBool("equippedCharm_13") ? 0.15f : 0 + PlayerData.Instance.GetBool("equippedCharm_18") ? 0.25f : 0
No that's bad
wha-?
actually you should multiply
But that is bad
but I dunno if csharp treats false as 0 and true as 1
I'm still trying to learn code don't confuse me more than necessary
it's inline if statements
It doesn't KDT
GetBool is?
Convert.ToInt32 tbh
can't I add an implicit
I don't think there's an implicit bool to int
oh apparently you can't lol
and what's the Nail component thing?
the one I need to resize
that's resized with Longnail and MoP
someone said there's a PlayerData.instance.nailRange
iirc might not even be used
Yeah doubt it does anything on its own
Maybe if you can figure out an event that makes it update
so, Herocontroller.slashComponent
Yeah
and there's this gameObject.transform.
umm actually I have a problem idk if anyone can help with.
for some reason waits in FSMs are all 0 when I load the scene.
so I could do 1 of 2 things. 1 I could hardcode in the starting wait times
or 2 I could uh figure something else out
so that's why the attacks are instant
you can force them into init
Something else meaning recode grimm as actual code
then read them
or you could just directly read the byte array
if I force them into init would it spawn grimm early?
what does "gameObject.transform.localScale" do? it seems to work is a similar way as it's used in the original MoP/Quicks;ash code
You don't need that
just read the byte data
Just change scale on the NailSlash
you say just like that's the easy option
the easy option is hardcoding the times in and the slightly less easy option is trying to get the times to be set early
int are actually pretty easy to read from byteData tbh
so, resizing of the nail when equipping charms should be
if (PlayerData.instance.equippedCharm_18)
then Herocontroller.slashComponent.scale = Herocontroller.slashComponent * 1.15f
else if (PlayerData.instance.equippedCharm_13)
then Herocontroller.slashComponent.scale = Herocontroller.slashComponent * 1.25f
idk where they are position wise so I'd have to print them out first and scan them
No
you can't multiply a component by a float
slashComponent.scale
And you can't just multiply it, that would stack indefinitely
You need to store the original value on the first run
How?
every state has byteData paramDataType, paramName, paramDataPos, paramByteDataSize to init each action
so you just need to find the action that sets the variables
someone did it like this
Vector3(gameObject.transform.GetScaleX() * 5f, gameObject.transform.GetScaleY() * 5f ...
I'm confused
mhm
int x = 5;
x += 10;
// x is 15 now
it's basically just
int x = 5;
x = x + 10;
// x is 15 now
A += 5 => A = A + 5
yeah
you can also do -=, *= and /=
This is the new max speed for hardmode. What do y'all think? (video has no sound)
still trying to understand what stores it
I can't use Herocontroller.slashComponent.scale *= 1.5
You need reflection to get slashComponent
post that image in meme
It's private
wait why did you reupload it so tiny
anyway that's basically my code
i think you can do worse tbh
how
actual code
let me push it to github I need you to tell me if that video is too fast or slow first
it's a video file
Is that essentially 2 dicts implemented as 4 arrays?
I guess
I like it
speed seems really good imo
that's the maximum speed btw.
Nothing will ever beat the mega huge switch statement of hard coded times for animations I found in one of our games at work
show
also note you'll be getting stuns really rarely at that point
switch(array.Length){
case 0:
return 0;
break;
case 1:
case 2:
return ArrayIsLengthOne();
break;
case 3:
case 4:
return ArrayIsLengthThree();
//etc
ArrayIsLengthOne(){
return new List<Int> { 1 };
}
ArrayIsLengthThree(){
return ArrayIsLengthOne.Add( 3 );
}
i think this would work
No
what the fuck
Please
so if array is length 2 it returns 1
Don't make me post the "how to get fired using switch statements" article again
yes the only odd number between 0 and 2 is 1
ur reminding me of some mesh code I wrote a while ago
I write my entire codebase in a switch using case statements exclusively as labels for goto π
731 votes and 180 so far on reddit
I've seen worse
https://github.com/seanpr96/HollowKnight.RandomizerMod/blob/master/RandomizerMod2.0/Requirements.cs#L1080 This right here is a triply embedded switch
just pointing out not only is it an 18 case switch but there's if statements inside it.
switch (!0) {
case (createAccountForm = forms.filter(createAccountForm), !!createAccountForm.length):
createAccountFormFn(createAccountForm);
processQueryString(createAccountForm);
break;
case (addNewProperty = forms.filter(addNewProperty), !!addNewProperty.length):
addNewPropertyFn(addNewProperty);
processQueryString(addNewProperty);
break;
case (!!templates.length && templates.is(contactUsFormTemplate)):
contactUsFn(forms);
break;
case (!!templates.length && templates.is(loginFormTemplate)):
loginFn(forms);
break;
case (!!templates.length && templates.is(forgotPassTemplate)):
forgotPassFn(forms);
break;
case (!!templates.length && templates.is(GetSecurityQuestionTemplate)):
resetPasswordFn(forms);
break;
};
I don't have to write good code if it's in a coroutine
I can just spam yield return
Gottem
Read full article to be truly horrified
too late already pretty horrified
delet this
I used to work with a guy that pulled this kind of crap.
A couple years after he left I had to make version 2 of the game he had done
It had a part where you roll X dice
I spent hours trying to find were he was incrementing the dice thrown counter
And it was basically embedded in something like that
I increment things with
for (; num < num + 1; num++);
Needs more yield
int orig = num;
while (num != orig + 1)
{
yield return null;
num = new Random().Next(2147483647);
}```
Hey y'all I'm gonna do something very smart for once
Funny fact: our leading competitor stays "1 years worth of unity versions behind for stability". They're just moving out of 4.6
you wanna see some legit garbage I code I wrote once in a language with no named variables, functions or gotos and also only simple arthimetical functions 
https://pastebin.com/raw/dD60FdT7
these 2331 lines is ai for tetris
ye 2100 of those
Not to interrupt you all but I just updated infinite grimm. The smart thing I'm doing is I'm gonna put the binary here before I create a release on github so you can test it first. I also updated the source on github but I'm not making a release there until I'm sure this version is mostly bug free.
how do I activate HardMode Grimm?
launch the game once with it and it will make a file called InfiniteGrimmMod.GlobalSettings.json
in your saves folder
edit that and change the one bool value to true: IGHardModeEnabled
it makes the boss faster but it also lets you skip talking to regular grimm to save you time
you should in a later version add an ingame way to actiavte it
actiavte
I can only write code by copying others and nobody except enemyrandomizer I think have gotten working in game configs and that implementation isn't great imo
hmm
maybe I'm wrong
i;main(){for(;i++<=99;printf("%s%s%.d\n",i%3?"":"Fizz",i%5?"":"Buzz",(i%3&&i%5)*i));}
modapi has code for an ingame menu
some mods add ingame menu things
Item randomizer has settings on the play mode screen
that's not what I want
Althoguh I looked at that too
I want a custom menu inside the modapi menu so it doesn't take up space
but I can't do that yet
I don't think
You could, there's just no shortcut to do it
Enemy randomizer menu was mostly me stealing modding api and not having any time to develop anything other than a hack
the problem is if I did what kerr did for my mod the menu button would overlap with randomizer
you need to find the position of the bottom element in the modding api menu, duplicate it, move it down and change its text + on click function
Yeah I think I'll wait for someone else to do that first so I can copy their code like the hack I am.
btw everyone's world records reset because I made even the normal fight harder
Ok
15k remains as a previous world record
Is this intended?
AA, sounds like your mod needs a score leaderboard
Dialog still showed up but I could move
yes
I wanted to let you skip the pause part of it on hard mode
since you need to edit a text file to do it I'm not worried about introducing any jank
you need to enable in game modlog
I remember you called the custom text annoying seanpr so I wanted to make it not annoying on hard
"BoolValues": {
"keys": [
"ShowDebugLogInGame"
],
"values": [
true
]
},
in ModdingApi.GlobalSettings.json
the video was the max speed
yes by like 8k damage it should be at max speed
Tbh I've never had issues running tail -f on modlog
^
if you have a second monitor
that's the best way to do it
or you play in windowed
infinite Grimm fight was te buffed one, right?
yeah
both normal and hard mode
normal grimm is normal grimm
and same with normal nkg
what output log kerr?
I don't see one
is it only made by the debug mod?
Unity's
ohh
It shows nullrefs and such
isn't it in hollow_knight_Data
huh I can't find it Β―_(γ)_/Β―
output_log.txt
it's different on linux
O
it's in some unity folder

yeah
^
is randomizer updated for lifeblood?
yeah
oo
I just wish I could tail the output_log.txt with a grep filter for nullrefs
could probably use watch
tail -f output_log.txt | grep null ?
Yeah but that causes it to break
(not on lunix)
Least when I do it on windows
git bash == cygwin
Ok I got 780 geo on my first hard attempt
geo is doubled in hardmode btw
7800 then
Yeah makes sense
you need around 8k damage I think to reach maximum hardness on hardmode
His uppercut gets really hard to deal with
Sounds like you should display the hp done so people that don't know the formula can know how good they did
gotta play more defensive I guess
that's why geo is doubled
so you can do half the damage
and get just as much reward
sharp shadow obviously top tier 
I think sharp shadow is needed near the end
but every attack should be avoidable at every speed
and if not please send a bug report
report
time to fail
gl y'all. :)
Geo is still 10% of damage, right?
^
I'm planning on doing two things
one have grimm tell you your damage after you teleport back to the tent after dying. two adding to grimm's possible dialogs a line that tells you that you get twice as much geo in hard mode.
Has an option for 'no bosses' been considered for enemy randomizer? Its bosses that cause the majority of the issues ive noticed (falling through floor, crashes)
oh btw I figured out about 12 hours ago why it seemed like grimm got faster when you restarted on the old version. This is gonna sound stupid but... my code used to make grimm SLOWER the more damage you did.
yeah
for some reason I had a brainfart and thought lower animation fps = slower animation
higher fps is faster but I thought higher fps was slower for some reason
mostly because I looked at the NGG code and got confused
4634 with fury π€
judging by these scores I think I made hard mode hard enough, hopefully not too hard though
I keep dying to the balloon phase lol
I might remove balloon from the sped up attacks if it's impossible to dodge at those higher speeds
I think it might be possible without pogoing but I think it might also might require shadow dashing forward if you get a bad pattern and then jumping backwards which sounds really weird for a human player to do.
keep in mind the fireballs move slower the closer you are to grimm
no him
no you can pogo on top of grimm
oh that
I think it requires taking 2 damage though
dang
just gotta know when he is going to spawn
well that's not easy on this unless you're counting damage
because the spawn is instant
for mine not for real nkg
@compact sedge you planning on making a strong THK mod, right?
you can
I'll first make a stupidly-OP-Nail mod
that buffs Longnail, Quickslash and Heavy Blow
You mentioned Quickslash's code used a float or something
on Longnail we talked about it
and Heavy Blow
where can I find info on Heavy Blow?
Heavy blow is probably handled in the enemy FSMs
Heavy blow also affects the hitinstance
There's a field there for recoil
Dunno what it's called
try checking out Kerr's ModCommon for that
That's probably the best, yeah
Also, about bersek's code
I haven't had much time recently, so the code is even messier than usual
And I haven't pushed the most recent ver to github yet
how do you downgrade your hollow knight ver?
Hollow Knight - Downpatching the game using the Steam console - by seanpr
You need to store the original value on the first run
Save it into a Vector3 on your mod class
You need reflection to get slashComponent
How... I'm confused
Sorry
Hey Mickely
and a hook that works only when hitting things isn't what I want
ok nvm I thought you were using a reflection for one of your variables not for one of the game's variables
that makes more sense if the game's variables is set taht way.
or do and have a screen-wide nail by second 3
because it will increase the length by 1.5x every frame
hmmm
no because you're going to do
if( modLength == null )
modLength = fi.GetValue(HeroController.Instance)
nailLength = modLength * multiplier;
does the fieldinfo line persist across different scenes?
yes aslong as you keep a reference to it
so yes
no slashComponent is private
Ok
you need the herocontroller instance
so you can use reflection on it
to get its private members
can you set any private variable this way in c#?
Huh why is this a feature?
I mean it's useful for modding but what an odd thing to put in a programming language
won't GetValue(HeroController.Instance) give me all the info on HeroController related things?
no
fi takes a class and a varname
then you do fi.GetValue(class)
and it'll return the variable with varname from class
so
FieldInfo fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);
GameObject = fi.GetValue(HeroController.Instance);
GameObject go = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(HeroController.Instance)```
I think idk that's kinda gross
BUt ```
FieldInfo fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);
yeah so when you need it again
so it will go away as soon as your function is over
you have to run .GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance); again
which is slow
Why not do
private FieldInfo fi
and then in your code fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);
That way you don't run reflection every time
ok so not your inline solution
that I just explicitly told you not to do
because reflection is very slow
poor KDT
poor KDT
poor KDT
it's your fault
stop off topic
rich KDT
also stop reaction spam
so
I have no idea what you're talking about but what's wrong with just doing
GameObject go = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(HeroController.Instance);
once in init and then using go for everything you need to do?
I mean other than it looks ugly
because go could and will get deleted
go will still get deleted in most cases
pretty sure the slash component does get reloaded
FieldInfo fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance); GameObject = fi.GetValue(HeroController.Instance);
wouldn't fi get deleted if you do it the way folding is though
which is the way you posted
I'm lost
FieldInfo fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);
is easier to write than
public FieldInfo fi;
//stuff
public void someFunc(){
//stuff
if( fi == null)
fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);
//more stuff
}
and I can just tell you to cache it
once you have GameObject go you have a reference to the slashComponent, you can save its scale to a var, if that var is null
then set slashComponents scale to that var multiplied by some var
i think reflection gives you shallow copies
but I dunno test it
I feel like I confused poor Folding sorry about that
no
I'm always confused
So, the FI part in the If ModLength thing
can it be replaced with the Field info thing above?
public FieldInfo fi;
public void SetFieldInfo() {
if( fi == null)
fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);
}
public void SetSlashSpeed() {
GameObject go = fi.GetValue(HeroController.Instance);
// code to set length of slash speed here
}
I think not 100% sure
thanks for the reaction "Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
this if( modLength == null ) modLength = fi.GetValue(HeroController.Instance) nailLength = modLength * multiplier; comes after the last one?
Also, it's length instead of Speed
You're welcome
if( modLength == null )
modLength = fi.GetValue(HeroController.Instance).Scale
fi.GetValue(HeroController.Instance).Scale = modLength * 1.5
although thats 50/50 depending on if its a shallow or deep copy
and I don't mess with it enough to know
just replace whatever I put in SetSLashSpeed with that code and there's a 50/50 chance it just works
might also need public float modLength; at the top next to public FieldInfo fi;
public void SetFieldInfo() {
if( fi == null)
fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance); GameObject = fi.GetValue(HeroController.Instance);
}
wait
why is my box broken?
three backticks
public FieldInfo fi;
public Vector3 modLength;
public void SetSlashLength() {
if( fi == null)
fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);
if( modLength == null )
modLength = fi.GetValue(HeroController.Instance).Scale;
fi.GetValue(HeroController.Instance).Scale = modLength * 1.5;
}```
try this maybe?
scale should be Vector3
fixed thanks
there's no if then. after your if statement put { and at the end of whatever you want to do put }
I just put this if PlayerData.instance.equippedCharm_18 and PlayerData.instance.equippedCharm_13 in there
so if (x) { //code here; } else if (y) { // code here; }
also only set modLength = fi.GetValue(HeroController.Instance)
once
or it will stack forever
mhm
modLength should be a Vector3, which can't be null
^
Either use Vector3? or check against Vector3.zero
you could also just do something like this in the set code
if( fi == null) {
fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance); GameObject = fi.GetValue(HeroController.Instance);
modLength = fi.GetValue(HeroController.Instance);
}
and only set it once
and if you don't there's discord search
Or all i said
uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhderstand it
How did y'all learn to code? I just looked at and modified it until it made sense so I have no real formal education.
So I have no idea how to teach others how to learn
Pretty much that
i don't think a formal education helps 
I mean I was given a 20kg pascal book and a test
I'm sure it does with some things. It took me 2 years to understand how pointers work.
because most of the code I looked at barely used them
but if I had been taught their syntax they would have made sense from week 3
Good thing C# doesn't even have those outside of unsafe blocks
because theres not a lot of uses for pointers tbh
I don't write c# or java mostly because I don't really like them as languages though tbh, most of my code is c++
nothing against them as languages but they seem to encourage bad practices.
they are easy to learn though which helps I guess.
only time I ever write stuff in c++ is when I'm doing something I shouldn't be doing, like reading and writing to other processes memory
With c++ you always know when you should and shouldn't be doing something. the line gets blurred with languages like c#.
that's my opinion at least
in c++, unless they are constant (or readonly from other classes) the most global your global variables should get is class level and even that's rare. In c++ you know always if you are passing memory or merely pointers and can take advantage of that to avoid copying large segments of ram. Arrays are more primative in c++, rather than just being basically vectors in disguise, this also saves lots of memory and can improve performance.
These are things that make the language harder but imo encourage better code.
Question: Should I add an optional (and default off), "classic mode" for infinite NKG? In this mode grimm will be at standard speeds and stuns and won't get harder to fight no matter how much damage you do, but you won't earn any geo rewards. Would this be a good use of my time?
no
would chaining the dive and dash be too much
or should i have it chain like half the time
if you chain it all the time it's easier to learn the pattern than if you do it half the time.
exactly

