#archived-modding-development

1 messages Β· Page 92 of 1

compact sedge
#

I also added a print to tell you the framerates it will be using

#

So if that doesn't change it should be good

flat forum
#

I'll see it later

compact sedge
#

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

flat forum
#

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

rain cedar
#

Hook AfterAttack

#

Use reflection to get Herocontroller.slashComponent

#

Change stuff on it

compact sedge
#

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

rain cedar
#

Could work or it could be a dead variable

leaden hedge
#

pretty sure thats a wrong var

rain cedar
#

Or it could require some FSM event

leaden hedge
#

like nail damage doesn't actually change nail damage

rain cedar
#

It does if you send an event

leaden hedge
#

well yeah

compact sedge
#

Ill check if its dead in dnspy

flat forum
#

There's OnAttack and AfterAttack, what does each one do?

rain cedar
#

AfterAttack for this case

compact sedge
#

acutally idk

#

if it's alive it's only used in fsms

leaden hedge
#

just use runtime detour on the nail controller class

rain cedar
#

NailSlash.scale will definitely work

leaden hedge
#

that changes it hollowface

rain cedar
#

I was getting some stutters when I tested runtime detour hooks

flat forum
#

and how do I check if Longnail is equipped?

compact sedge
#
            this.anim.Play(this.animName);```
#

this is how longnail is done

rain cedar
#

I'll have to have someone like ciplax with an absolute garbage computer test it

flat forum
#

yeah, I know

rain cedar
#

To see if it's actually bad

compact sedge
#

it's in startslash

rain cedar
#

StartSlash is called immediately after AfterAttack

compact sedge
#

oh nvm

rain cedar
#

That's why you want to hook there

compact sedge
#

yeah

#

or I guess just NailSlash.scale

rain cedar
#

Yep

#

Use reflection to get slashComponent and up the scale

compact sedge
#

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?

rain cedar
#

It's 1.25 mantis, 1.15 longnail, 1.4 both

compact sedge
#

yeah but those are size increases in both x and y direction

rain cedar
#

Eh

#

Upping it in the y direction hardly matters

compact sedge
#

which means the total area of the hitbox is 1.25x1.25, 1.15x1.15, or 1.4x1.4 ?

rain cedar
#

Total area of the nail isn't a good metric imo

flat forum
#

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

rain cedar
#

It sure is

compact sedge
#

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

flat forum
#

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

rain cedar
#

```csharp
Code here
```

flat forum
#

and then I edit what I udnerstand

rain cedar
#

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

leaden hedge
#

doesn't seem to work for me

#

infinite grimm just dies as usual

flat forum
#

did you fight NKG?

#

you need Grimmchild 4

#

and then go refight NKG

leaden hedge
#

yeah i've killed nkg twice now

compact sedge
#

ok do you have modcommon

leaden hedge
#

no whats with these dependancies

compact sedge
#

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

#

too lazy to make new release like I'm supposed to

flat forum
#

also, what's the code for Quickslash?

#

I wanna see it too

rain cedar
#

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;
}```
flat forum
#

and ATTACK_COOLDOWN_TIME_CH is?

rain cedar
#

A float

#

It's assigned somewhere outside of the game code

#

Probably in editor

flat forum
#

can it be modified?

rain cedar
#

Yeah

#

It should be const but it isn't

compact sedge
#

lol

#

maybe unity editor stuff isn't constant? or was it that way in the script itself?

leaden hedge
#

i dumped the values for attackspeed

flat forum
#

and can something like "ATTACK_COOLDOWN_TIME_CH; = ATTACK_COOLDOWN_TIME_CH; * 1.25f " be done

leaden hedge
#

they are on the wiki

rain cedar
#

Idk man fix your formatting

compact sedge
#

no semicolon after the variable

rain cedar
#

```csharp
CODE HERE
```

compact sedge
#

ATTACK_COOLDOWN_TIME_CH = ATTACK_COOLDOWN_TIME_CH * (float) 1.25;

flat forum
#

how do you do this?

compact sedge
#

semicolon goes at the end of the line

flat forum
#

I don't have the symbol for it

compact sedge
#

tilda

#

it's below escape

#

like you're entering console commands

flat forum
#

this-> `?

compact sedge
#

and the key is actually called "backtick"

#

yeah

flat forum
#

a

#

Oh

rain cedar
#

Minecraft calls it grave

compact sedge
#

I guess it looks like a grave accent

#

but don't try writing e` instead of the real Γ¨

rain cedar
#

But I don't have the real e` on my keyboard

compact sedge
#

I forgot how to do it on windows

rain cedar
#

Alt codes

compact sedge
#

I do alt+shift+ ue8

rain cedar
#

Alt+0232 apparently

#

Γ¨

compact sedge
#

ok that's like about the same number of keystrokes

rain cedar
#

I mean it's 5

#

That's not about the same, it just is the same

compact sedge
#

nah because with alt shift you're doing twice as much work with your left hand.

#

unless you don't have a numpad

rain cedar
#

Not having a numpad in 2018 LUL

leaden hedge
#

how much hp is each balloon phase?

leaden hedge
#

so im at 8.5k or something

rain cedar
#

Cool

leaden hedge
waxen widget
#

how do i update a mod via mod installer?

solemn rivet
#

In my installer, just uninstall and install again

wintry ore
#

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"

iron crown
#

Does she want a mod that turns everything into Grimm or something

wintry ore
#

probably would enjoy that

solemn rivet
#

does anyone know how the zoom effect while focusing works?

wintry ore
#

beats me

flat forum
#

Wait

#

where is that written?

#

the INFO You did XXXX Damage

leaden hedge
#

in modlog

#

you can enable in game debugging with a string in your mod settings

solemn rivet
#

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

exotic venture
#

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?

solemn rivet
#

I guess

#

I told it to print out the actual game objects

#
[INFO]:[Berserker] - TileMap Render Data```
#
[INFO]:[Berserker] - _Scenery```
exotic venture
#

mfw it actually does

solemn rivet
#

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

flat forum
#

but people say the whole game's code is a nightmare

compact sedge
#

I mean it's definitely the worst game I've ever written a mod for... technically.

solemn rivet
#

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

flat forum
#

it's far from a good starting point for something to try taking apart without previous knowledge of coding?

solemn rivet
#

nah

#

that's what I did tbh

flat forum
#

you had no previous knowledge of coding?

solemn rivet
#

just basic

flat forum
#

that's already more than me

solemn rivet
#

logic, if, else, etc.

#

also

#

I should mark this as NSFL but

flat forum
#

if ___
else if ___
else if___
?

#

nsfl?

#

not safe for... life?

solemn rivet
#
[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

flat forum
#

why?

solemn rivet
#

I only hope I don't have to activate all of these to get the cracked screen effect

exotic venture
#

cracked screen effect?

solemn rivet
#

yeah

#

the "veins" that pop up when fotf activates

#

on the edge of the screen

exotic venture
#

oh my god

sterile valley
#

@solemn rivet I think it's better if you found a way to disable that effect altogether

solemn rivet
#

I'm going to use it as an indicator for berserkmod, Niko

sterile valley
#

And just leave the red aura + red colored attack.

#

Oh, okay.

solemn rivet
#

like, while you're entering berserk mode it shows those

flat forum
#

is every vein a separate thing?

solemn rivet
#

I fear so

flat forum
#

...

exotic venture
#

2 different variations of the vein

#

and they are all positioned individually

#

...why

solemn rivet
#

I don't think there are two variations

#

I can't find fury_effects or fury_effects_v1

exotic venture
#

wait let's see what the sprite dump mod does

solemn rivet
#

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

#

cursed txt

#

πŸ‡Ύ

exotic venture
#

it takes one particle

#

and rotates and

#

places it

#

on the screen

flat forum
#

Uuuuhhhhhhh

exotic venture
#

i think i need a moment

#

to process the sheer amount of wat i am now processing

solemn rivet
#

wtf

#

each one has a spriterenderer component

#

oh god

#

please tell me I'm sleeping

#

and this is a nightmare

exotic venture
#

this is real

#

this is actually real

flat forum
#

You're slepping

#

this is a nightmare

exotic venture
#

i can't even be mad really

flat forum
#

hey

#

​​​​​​​​​​​​​​​​​​​​​

#

I found an empty keyboard symbol

solemn rivet
#

wut

flat forum
#

here

#

​

#

this

#

try marking it with your mouse

#

you can copy it

#

but

compact sedge
#

​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​ ​​​​​​​​​​​​​​​​​​​​​

flat forum
#

it's nothing

#

​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

#

here's a bunch

#

but they all still aren't visibly marked

#

it appears empty

compact sedge
#

it's a unicode modifier

#

it modifies an existing letter

#

a​​

#

idk

flat forum
#

I don't think it's modified

#

I think it's jsut so

#

empty

#

​

compact sedge
#

​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

#

huh

flat forum
#

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

#

​

solemn rivet
#

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

flat forum
#

Good Job

#

​

#

I found an empty character

#

I'm proud of myself

solemn rivet
copper nacelle
#

@FoldingPapers#0783 that's zero-width space

#

wtf

#

@flat forum

compact sedge
#

zero width space has width on libreoffice

#

for some reason

copper nacelle
#

all fonts?

compact sedge
#

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

#

​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​ ​​​​ ​​ ​​also the discord message box I'm like half way on the first line right now

#

wait hold up what

copper nacelle
#

wtf

compact sedge
#

yeah that's not 0 width

copper nacelle
#

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

compact sedge
#

​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

#

​​​​​​​​​​​​​​​​​​​​​​hi​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

#

wait idk if that has any 0 widths

rain cedar
#

​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ok_grimm

#

Yeah that's zero width alright

#

I put like 20 of them before that

copper nacelle
#

nice

buoyant obsidian
#

Zero width spaces are useful

copper nacelle
#

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

buoyant obsidian
#

zero width spaces are so useful for doing things that shouldn't be done

compact sedge
#

whoever decided to add zero width space to unicode has a lot to answer for

copper nacelle
#

it's great ree

fair rampart
#

Thoughts on lightbringer?

#

I think it looks good, but too easy

compact sedge
#

You should play lightbringer

fair rampart
#

Whats it like?

compact sedge
#

idk I saw an ad for it in the greatest mod ever

fair rampart
#

Only saw preview, no idea if it's good/bad/easy/hard etc

solemn rivet
#

it's good

#

fun

#

not that hard

#

but interesting nonetheless

copper nacelle
#

^

solemn rivet
#

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 sadgrub

#

if you s&q, it stops working

#

also, there's no audio cue for the effect

solemn rivet
#

oh, the trigger is the backspace button

compact sedge
#

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

compact sedge
#

too bad the steam moves

willow quarry
#

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

kindred forum
#

i have that exact same background running on wallpaper engine

willow quarry
#

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

kindred forum
#

yeah mine has the knight visible

willow quarry
#

actually, i have an idea

compact sedge
#

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

solemn rivet
#

if you actually figure that out, I'm all ears

compact sedge
#

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

solemn rivet
#

oh

compact sedge
#

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

rain cedar
#

I have a ping but there's nothing here

#

Good

willow quarry
#

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

rain cedar
#

Cool

solemn rivet
#

oh

#

that's what that whole steam talk was about

#

thought I was going crazy

copper nacelle
#

^

#

I thought it was in the wrong channel or something

solemn rivet
#

sean, did you see the fsm I posted earlier today?

rain cedar
#

Yeah I read the fury stuff

solemn rivet
#

is the item pickups fsm even worse than that?

rain cedar
#

Nah

#

It's bad but not that bad

#

Also uses fadegroup

solemn rivet
#

oh

#

it took me a while to figure it out, since I couldn't find any references online

rain cedar
#

Well yeah it's custom for HK

#

It's not a standard playmaker action

solemn rivet
#

yeah, I figured after looking through it

#

it's specifically made for animations and stuff

compact sedge
#

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

rain cedar
#

πŸ‘

sterile valley
#

Fuck.

#

Guys.

#

Someone needs to make a Hollow God mod.

#

Buff the final boss (not radiance, hollow knight) into what he should be.

young walrus
#

Go for it

sterile valley
#

I can't code.

#

It's just a suggestion.

copper nacelle
#

you can if you believe

compact sedge
#

I believe in you

sterile valley
#

But come on, wouldn't that be really cool if someone made it?

#

Buff the crap out of THK.

compact sedge
#

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

rain cedar
#

But didn't you hear? He can't code

compact sedge
#

I can't either but I can read docs, copy other people's code, and ask a lot of stupid questions in here

rain cedar
#

That would be the joke, yeah

#

Anyone can code if they actually try

flat forum
#

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

compact sedge
rain cedar
#

Oh fuck that's so loud

compact sedge
#

sorry I keep my system volume levels low and game volume levels normal

#

and you might do it the other way around

rain cedar
#

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

compact sedge
#

you can click the mute button and also there's a download button

#

also wtf why is the linux client better in this regard

flat forum
#

What the actual everloving hell did you do

#

And mire inportantly

compact sedge
#

you want hard mode?

flat forum
#

Is it compatible with InfinitGrimm

compact sedge
#

this is infinite grimm

#

I'm adding an optional hard mode and testing it out at its fastest setting

rain cedar
#

That looks pretty crazy

compact sedge
#

to makes sure it works and isn't broken

#

like it is now

flat forum
#

Oooohhhh

#

Wooaaahhhhh

compact sedge
#

yeah everyone here is too gud at the normal grimm fight

flat forum
#

Heh

compact sedge
#

also in all the bugtesting I became pretty gud at it too and got 7k dmg

flat forum
#

(15k damage =P)

#

can I have the hardmode that's as broken as in the video

compact sedge
#

I mean my mod's open source so I could tell you the variable to change

flat forum
#

you just changed 1 variable and that's what happened?

rain cedar
#

Nah he means to make it that fast

#

It looks like that video is two grimms

#

Definitely not one variable changed

flat forum
#

It looks like there's 1 Grimm, but time between attacks has been set to like 0

copper nacelle
#

1 grimm but all waits have died instantly

#

i think

#

and the attacks have been speed boosted a shit load

rain cedar
#

Yeah actually there's never two grimms on screen

compact sedge
#

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

rain cedar
#

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

compact sedge
#

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

flat forum
#

so, looking through an example mod I found

#

and I was wonedring

#

if a similar thing exists for Berserk Mod

copper nacelle
#

?

#

wdym

#

like the source?

flat forum
#

it's a .cs file thing

copper nacelle
#

that's the source yeah

flat forum
#

in github

copper nacelle
flat forum
#

Ok

#

I couldn't find it for some reason

#

thanks

copper nacelle
#

yw

flat forum
#

what charm number is Longnail?

rain cedar
#

18

#

Mark of pride is 13

flat forum
#

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

copper nacelle
#

yeah basically

rain cedar
#

Seems weird to check 29

#

Idk what charm that even is

copper nacelle
#

hiveblood

flat forum
#

29?

#

Hiveblood

#

yeah

#

I'm going through Berserk's code

#

that's why that was left there, my mistake

leaden hedge
#

if elses are for nerds tbh
length = 1 + PlayerData.Instance.GetBool("equippedCharm_13") ? 0.15f : 0 + PlayerData.Instance.GetBool("equippedCharm_18") ? 0.25f : 0

rain cedar
#

No that's bad

flat forum
#

wha-?

rain cedar
#

Don't do that

#

It's ternary

#

Not always bad

leaden hedge
#

actually you should multiply

rain cedar
#

But that is bad

leaden hedge
#

but I dunno if csharp treats false as 0 and true as 1

flat forum
#

I'm still trying to learn code don't confuse me more than necessary

copper nacelle
#

it's inline if statements

rain cedar
#

It doesn't KDT

leaden hedge
#

bad language

#

how am i supposed to add numbers up based on a conditional

flat forum
#

GetBool is?

rain cedar
#

Convert.ToInt32 tbh

leaden hedge
#

can't I add an implicit

copper nacelle
#

(bool ? 1 : 0)

#

more ternary is always the answer

rain cedar
#

I don't think there's an implicit bool to int

leaden hedge
#

oh apparently you can't lol

flat forum
#

and what's the Nail component thing?

#

the one I need to resize

#

that's resized with Longnail and MoP

rain cedar
#

slashComponent

#

It's an instance of NailSlash

flat forum
#

someone said there's a PlayerData.instance.nailRange

copper nacelle
#

iirc might not even be used

rain cedar
#

Yeah doubt it does anything on its own

#

Maybe if you can figure out an event that makes it update

flat forum
#

so, Herocontroller.slashComponent

rain cedar
#

Yeah

flat forum
#

and there's this gameObject.transform.

compact sedge
#

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

leaden hedge
#

you can force them into init

rain cedar
#

Something else meaning recode grimm as actual code

leaden hedge
#

then read them

compact sedge
#

lol hell no

#

to seanpr

leaden hedge
#

or you could just directly read the byte array

compact sedge
#

if I force them into init would it spawn grimm early?

flat forum
#

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

rain cedar
#

You don't need that

leaden hedge
#

just read the byte data

rain cedar
#

Just change scale on the NailSlash

compact sedge
#

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

leaden hedge
#

int are actually pretty easy to read from byteData tbh

flat forum
#

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

compact sedge
#

idk where they are position wise so I'd have to print them out first and scan them

rain cedar
#

No

copper nacelle
#

you can't multiply a component by a float

rain cedar
#

slashComponent.scale

#

And you can't just multiply it, that would stack indefinitely

#

You need to store the original value on the first run

flat forum
#

How?

leaden hedge
#

every state has byteData paramDataType, paramName, paramDataPos, paramByteDataSize to init each action

rain cedar
#

It's just a Vector3

#

Save it into a Vector3 on your mod class

leaden hedge
#

so you just need to find the action that sets the variables

flat forum
#

someone did it like this
Vector3(gameObject.transform.GetScaleX() * 5f, gameObject.transform.GetScaleY() * 5f ...

#

I'm confused

rain cedar
#

Forget about transform

#

You don't need to deal with the object transform at all

flat forum
#

mhm

flat forum
#

what does += do?

#

it's used pretty often in mods

copper nacelle
#
int x = 5;
x += 10;
// x is 15 now
#

it's basically just

int x = 5;
x = x + 10;
// x is 15 now
flat forum
#

A += 5 => A = A + 5

copper nacelle
#

yeah

leaden hedge
#

you can also do -=, *= and /=

compact sedge
flat forum
#

still trying to understand what stores it

#

I can't use Herocontroller.slashComponent.scale *= 1.5

rain cedar
#

You need reflection to get slashComponent

compact sedge
#

post that image in meme

rain cedar
#

It's private

compact sedge
#

wait why did you reupload it so tiny

pearl sentinel
#

Hmm

#

I didn't, I was relinking

rain cedar
#

It's the _d

pearl sentinel
#

Weird

#

Oh

compact sedge
#

anyway that's basically my code

leaden hedge
#

i think you can do worse tbh

copper nacelle
#

how

pearl sentinel
#

Compilation of cs grad meme

compact sedge
flat forum
#

how do I actiavte Hard mode?

#

what form of extension is .m4v?

compact sedge
#

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

rain cedar
#

Is that essentially 2 dicts implemented as 4 arrays?

compact sedge
#

I guess

rain cedar
#

I like it

copper nacelle
#

speed seems really good imo

compact sedge
#

that's the maximum speed btw.

pearl sentinel
#

Nothing will ever beat the mega huge switch statement of hard coded times for animations I found in one of our games at work

copper nacelle
#

show

compact sedge
#

also note you'll be getting stuns really rarely at that point

leaden hedge
#
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

rain cedar
#

No

copper nacelle
#

what the fuck

rain cedar
#

Please

compact sedge
#

so if array is length 2 it returns 1

pearl sentinel
#

Don't make me post the "how to get fired using switch statements" article again

leaden hedge
#

yes the only odd number between 0 and 2 is 1

compact sedge
#

ur reminding me of some mesh code I wrote a while ago

rain cedar
#

I write my entire codebase in a switch using case statements exclusively as labels for goto πŸ˜ƒ

compact sedge
#

not my finest work

rain cedar
#

I've seen worse

compact sedge
#

just pointing out not only is it an 18 case switch but there's if statements inside it.

copper nacelle
#

wtf

#

coroutines using switches

pearl sentinel
#
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;
    };
rain cedar
#

I don't have to write good code if it's in a coroutine

#

I can just spam yield return

#

Gottem

copper nacelle
#

lol

#

why tf is that a switch for true

#

wtf

#

why

pearl sentinel
#

Read full article to be truly horrified

compact sedge
#

too late already pretty horrified

copper nacelle
rain cedar
#

I don't think C# switches can be that bad

#

Unfortunately

pearl sentinel
#

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

rain cedar
#

I increment things with

for (; num < num + 1; num++);
pearl sentinel
#

Needs more yield

rain cedar
#
int orig = num;
while (num != orig + 1)
{
     yield return null;
     num = new Random().Next(2147483647);
}```
compact sedge
#

Hey y'all I'm gonna do something very smart for once

pearl sentinel
#

Funny fact: our leading competitor stays "1 years worth of unity versions behind for stability". They're just moving out of 4.6

leaden hedge
#

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 hollowface
https://pastebin.com/raw/dD60FdT7

#

these 2331 lines is ai for tetris

rain cedar
#

There's hundreds of lines of that

leaden hedge
#

ye 2100 of those

compact sedge
#

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.

flat forum
#

how do I activate HardMode Grimm?

compact sedge
#

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

flat forum
#

you should in a later version add an ingame way to actiavte it

compact sedge
#

uhhhhhh

#

about that

copper nacelle
#

actiavte

flat forum
#

activate

#

I'm dying today

#

cought cought Zoat mashine cought cought

compact sedge
#

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

flat forum
#

hmm

compact sedge
#

maybe I'm wrong

pearl sentinel
#
i;main(){for(;i++<=99;printf("%s%s%.d\n",i%3?"":"Fizz",i%5?"":"Buzz",(i%3&&i%5)*i));}
copper nacelle
#

modapi has code for an ingame menu

flat forum
#

some mods add ingame menu things

rain cedar
#

Item randomizer has settings on the play mode screen

compact sedge
#

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

rain cedar
#

You could, there's just no shortcut to do it

pearl sentinel
#

Enemy randomizer menu was mostly me stealing modding api and not having any time to develop anything other than a hack

compact sedge
#

the problem is if I did what kerr did for my mod the menu button would overlap with randomizer

leaden hedge
#

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

compact sedge
#

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

flat forum
#

Ok

compact sedge
#

At this point I'm in the lead with 6k points

#

but I bet everyone can beat that

flat forum
#

15k remains as a previous world record

rain cedar
pearl sentinel
#

AA, sounds like your mod needs a score leaderboard

rain cedar
#

Dialog still showed up but I could move

compact sedge
#

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

flat forum
#

also, there was a way to make it say the damage you've done

#

what was it?

compact sedge
#

because it's already janky

#

it's in the modlog

copper nacelle
#

show your modlog on screen

#

it's in modding api global settings

leaden hedge
#

you need to enable in game modlog

flat forum
#

I'll see it

#

later

compact sedge
#

I remember you called the custom text annoying seanpr so I wanted to make it not annoying on hard

leaden hedge
#
"BoolValues": {
        "keys": [
            "ShowDebugLogInGame"
        ],
        "values": [
            true
        ]
    },
#

in ModdingApi.GlobalSettings.json

rain cedar
#

This is just normal grimm

#

Does he get crazy gradually?

copper nacelle
#

the video was the max speed

compact sedge
#

yes by like 8k damage it should be at max speed

pearl sentinel
#

Tbh I've never had issues running tail -f on modlog

compact sedge
#

^

#

if you have a second monitor

#

that's the best way to do it

#

or you play in windowed

pearl sentinel
#

If you run it on output log it fucks up hard

#

But modlog seems fine

flat forum
#

infinite Grimm fight was te buffed one, right?

compact sedge
#

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?

pearl sentinel
#

Unity's

compact sedge
#

ohh

pearl sentinel
#

It shows nullrefs and such

copper nacelle
#

isn't it in hollow_knight_Data

pearl sentinel
#

Er

#

Yes

compact sedge
#

huh I can't find it Β―_(ツ)_/Β―

pearl sentinel
#

output_log.txt

copper nacelle
#

it's different on linux

pearl sentinel
#

O

copper nacelle
#

it's in some unity folder

pearl sentinel
compact sedge
#

Player.log

#

in saves folder

#

it has a lot of junk in it

copper nacelle
#

yeah

pearl sentinel
#

Some useful

#

Mostly junk

copper nacelle
#

^

delicate ether
#

is randomizer updated for lifeblood?

copper nacelle
#

yeah

delicate ether
#

oo

pearl sentinel
#

I just wish I could tail the output_log.txt with a grep filter for nullrefs

copper nacelle
#

could probably use watch

compact sedge
#

tail -f output_log.txt | grep null ?

pearl sentinel
#

Yeah but that causes it to break

compact sedge
#

(not on lunix)

copper nacelle
#

are you using git bash?

#

or wsl

#

or cygwin

pearl sentinel
#

Least when I do it on windows

compact sedge
#

git bash == cygwin

pearl sentinel
#

Cygwin

#

Bash

#

W/e

rain cedar
#

Ok I got 780 geo on my first hard attempt

compact sedge
#

geo is doubled in hardmode btw

copper nacelle
#

7800 then

compact sedge
#

so that's only 3400

#

err

#

3900

rain cedar
#

Yeah makes sense

compact sedge
#

you need around 8k damage I think to reach maximum hardness on hardmode

rain cedar
#

His uppercut gets really hard to deal with

pearl sentinel
#

Sounds like you should display the hp done so people that don't know the formula can know how good they did

compact sedge
#

try not jumping on the uppercut

#

Yeah I'll implement that in 0.3

rain cedar
#

Yeah, need to just shade cloak through it

#

But then I lose damage

compact sedge
#

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

leaden hedge
#

sharp shadow obviously top tier hollowface

compact sedge
#

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

pearl sentinel
#

grubfather report

copper nacelle
#

time to fail

compact sedge
#

gl y'all. :)

flat forum
#

Geo is still 10% of damage, right?

copper nacelle
#

3066

#

it's 20% of damage on hard mode

compact sedge
#

^

#

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.

delicate ether
#

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)

compact sedge
#

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.

copper nacelle
#

wtf

#

lmao

compact sedge
#

yeah

#

for some reason I had a brainfart and thought lower animation fps = slower animation

copper nacelle
#

isn't higher fps faster

#

or am i screwing it up

compact sedge
#

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

leaden hedge
#

4634 with fury πŸ€”

compact sedge
#

judging by these scores I think I made hard mode hard enough, hopefully not too hard though

leaden hedge
#

I keep dying to the balloon phase lol

compact sedge
#

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

copper nacelle
#

pogoing?

#

you can pogo the balls?

leaden hedge
#

no him

compact sedge
#

no you can pogo on top of grimm

copper nacelle
#

oh that

compact sedge
#

I think it requires taking 2 damage though

leaden hedge
#

no you can do it without taking damage

#

without cloak or dj

compact sedge
#

dang

leaden hedge
#

just gotta know when he is going to spawn

compact sedge
#

well that's not easy on this unless you're counting damage

#

because the spawn is instant

#

for mine not for real nkg

flat forum
#

@compact sedge you planning on making a strong THK mod, right?

compact sedge
#

no

#

you are

flat forum
#

Well

#

if I could

#

I would

#

but I'm still figuring out thing

copper nacelle
#

you can

flat forum
#

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?

rain cedar
#

Heavy blow is probably handled in the enemy FSMs

solemn rivet
#

Heavy blow also affects the hitinstance

#

There's a field there for recoil

#

Dunno what it's called

exotic venture
#

try checking out Kerr's ModCommon for that

solemn rivet
#

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

amber citrus
#

how do you downgrade your hollow knight ver?

void tree
flat forum
#

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

young walrus
#

Hi confused. I'm dad

flat forum
#

Hey Mickely

flat forum
#

and a hook that works only when hitting things isn't what I want

compact sedge
#

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.

leaden hedge
#

also dont do that snippet every frame

#

only do the FieldInfo line once ever

compact sedge
#

or do and have a screen-wide nail by second 3

#

because it will increase the length by 1.5x every frame

flat forum
#

hmmm

leaden hedge
#

no because you're going to do

if( modLength == null )
    modLength = fi.GetValue(HeroController.Instance)
nailLength = modLength * multiplier;
compact sedge
#

does the fieldinfo line persist across different scenes?

leaden hedge
#

yes aslong as you keep a reference to it

compact sedge
#

so yes

leaden hedge
#

as its nothing to do with unity or the game

#

its a feature of csharp

flat forum
#

The HeroController.Instance

#

Herocontroller.slashComponent.Instance?

leaden hedge
#

no slashComponent is private

flat forum
#

Ok

leaden hedge
#

you need the herocontroller instance

#

so you can use reflection on it

#

to get its private members

compact sedge
#

can you set any private variable this way in c#?

leaden hedge
#

yes

#

including stuff in builtin libraries afaik

compact sedge
#

Huh why is this a feature?

#

I mean it's useful for modding but what an odd thing to put in a programming language

flat forum
#

won't GetValue(HeroController.Instance) give me all the info on HeroController related things?

leaden hedge
#

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);
compact sedge
#
GameObject go = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(HeroController.Instance)```
#

I think idk that's kinda gross

leaden hedge
#

no

#

don't do that

#

you have to cache fi

#

reflection is hella slow

compact sedge
#

C# doesn't have optimization?

#

rip

leaden hedge
#

it doesn't automatically cache stuff for you no

#

no language does afaik

compact sedge
#

BUt ```
FieldInfo fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance);

leaden hedge
#

yeah so when you need it again

compact sedge
#

so it will go away as soon as your function is over

leaden hedge
#

you have to run .GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance); again

#

which is slow

compact sedge
#

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

leaden hedge
#

ok so not your inline solution

#

that I just explicitly told you not to do

#

because reflection is very slow

flat forum
#

poor KDT

fair rampart
#

poor KDT

unborn badger
#

poor KDT

flat forum
#

it's your fault

leaden hedge
#

stop off topic

hollow pier
#

rich KDT

leaden hedge
#

also stop reaction spam

flat forum
#

so

compact sedge
#

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

leaden hedge
#

because go could and will get deleted

flat forum
#

in the made up scenario I actually manage to get the thing

#

what do I do with it?

compact sedge
#

Sorry I mean
private GameObject go

#

and then just go = ...

leaden hedge
#

go will still get deleted in most cases

compact sedge
#

ok

#

I'll trust you on this

leaden hedge
#

pretty sure the slash component does get reloaded

flat forum
#

FieldInfo fi = typeof(HeroController).GetField("slashComponent", BindingFlags.NonPublic | BindingFlags.Instance); GameObject = fi.GetValue(HeroController.Instance);

leaden hedge
#

but even if it never did get deleted ever

#

you should still cache FieldInfo

compact sedge
#

wouldn't fi get deleted if you do it the way folding is though

#

which is the way you posted

leaden hedge
#

well im not telling you where or how to cache it

#

im just telling you to do it

compact sedge
#

I'm lost

leaden hedge
#
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

compact sedge
#

ok makes sense

#

so it's shorthand for that then.

leaden hedge
#

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

compact sedge
#

I feel like I confused poor Folding sorry about that

flat forum
#

no

#

I'm always confused

#

So, the FI part in the If ModLength thing

#

can it be replaced with the Field info thing above?

compact sedge
#
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"

flat forum
#

this if( modLength == null ) modLength = fi.GetValue(HeroController.Instance) nailLength = modLength * multiplier; comes after the last one?

#

Also, it's length instead of Speed

fair rampart
#

You're welcome

leaden hedge
#
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

compact sedge
#

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;

flat forum
#

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?

compact sedge
#

three backticks

flat forum
#

Oh

leaden hedge
#

also do cs directly after it

#

so it looks like
'''cs
code
'''

compact sedge
#
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?

leaden hedge
#

scale should be Vector3

compact sedge
#

fixed thanks

leaden hedge
#

woah calm down there frendo

#

lets just check the simple code works

compact sedge
#

there's no if then. after your if statement put { and at the end of whatever you want to do put }

flat forum
#

I just put this if PlayerData.instance.equippedCharm_18 and PlayerData.instance.equippedCharm_13 in there

compact sedge
#

so if (x) { //code here; } else if (y) { // code here; }

#

also only set modLength = fi.GetValue(HeroController.Instance)

#

once

#

or it will stack forever

flat forum
#

mhm

compact sedge
#

set it in setfieldinfo

#

with a check if it's null just like with fi

leaden hedge
#

it'll be null if fi is null

#

or close enough

rain cedar
#

modLength should be a Vector3, which can't be null

compact sedge
#

^

rain cedar
#

Either use Vector3? or check against Vector3.zero

compact sedge
#

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

leaden hedge
#

well no need to check anyway

#

because if fi is null, modlength also isn't set

flat forum
#

well

#

I'll go to sleep now

#

hopefully I'll dream and remember all you said

compact sedge
#

and if you don't there's discord search

flat forum
#

and udnerstand it

#

Uhhhh, please

#

don't

fair rampart
#

Or all i said

compact sedge
#

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

rain cedar
#

Pretty much that

leaden hedge
#

i don't think a formal education helps hollowface

#

I mean I was given a 20kg pascal book and a test

compact sedge
#

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

rain cedar
#

Good thing C# doesn't even have those outside of unsafe blocks

leaden hedge
#

because theres not a lot of uses for pointers tbh

compact sedge
#

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.

leaden hedge
#

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

compact sedge
#

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.

compact sedge
#

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?

exotic venture
#

you mean infinite TMG

#

troupe master grimm

copper nacelle
#

no

compact sedge
#

No like with the nkg defaults

#

not the TMG defaults

copper nacelle
#

nkg won't speed up

#

it'll just be infinite

compact sedge
#

Basically like that -1 nail video

#

except infinite minutes instead of 40 minutes

copper nacelle
#

would chaining the dive and dash be too much

#

or should i have it chain like half the time

compact sedge
#

if you chain it all the time it's easier to learn the pattern than if you do it half the time.

copper nacelle
#

exactly