#archived-modding-development

1 messages Β· Page 466 of 1

north sequoia
#

YES

solemn rivet
#

I know

north sequoia
#

lol

solemn rivet
#

I'm explaining it to papers

flat forum
#

so it's not a single world for multiple people

#

it's multiple worlds overlayed

north sequoia
#

Yes I am too

solemn rivet
#

yes

flat forum
#

okay that makes more sense

north sequoia
#

yes

fair rampart
#

yes

solemn rivet
#

not something I would play

#

but you can do it

north sequoia
#

Thats fine

solemn rivet
#

yeah

flat forum
#

yeah

solemn rivet
#

shouldn't be terribly difficult tbh

unborn badger
#

honestly it would be a bit fun imo

north sequoia
#

Honestly I'm fine doing it just to play with my friends over the internet

solemn rivet
#

ehhh

#

yeah

flat forum
#

again though, question on

#

the server thing

solemn rivet
#

that's enough tomjon

#

honestly

#

imo at least

flat forum
#

will there be a need for a host or smth for it to work

north sequoia
#

Just something to install in the background for the novelty of unexpectedly running into people

#

Just an online server that updates itself

#

like ghost net

fair rampart
#

Maybe weaken players to encourage them to stick together

#

Oh wait nvm

solemn rivet
#

like, I don't feel like the bloodstains in Dark Souls add to the gameplay at all

flat forum
#

why weaken players

#

when you can

#

buff bosses

north sequoia
#

lol

solemn rivet
#

I'd disable them, if at all possible

north sequoia
#

bosses dont share hitbars

unborn badger
#

yeah but it’s funny to watch people die

solemn rivet
#

not really

#

but that's just me

north sequoia
#

actually, there should totally be a skull left behind everywhere a player dies

#

or maybe their current nail?

#

that would be neat

unborn badger
#

a skull being left behind would be fun

north sequoia
#

steps into traitor lord bossfight

#

the ground is covered in skulls and nails

unborn badger
#

why would there be skulls at traitor lord

fair rampart
#

Guess no one will be seeing my skull anywhere 😎

north sequoia
#

because people died there chingu

solemn rivet
#

why

north sequoia
#

why what?

solemn rivet
#

traitor lord, I sleep

#

marmu, real shit

unborn badger
#

πŸ—Ώ

north sequoia
#

Dude marmu was a piece of cake

unborn badger
rain cedar
#

You just gotta run te noobss to become a marmu pro

solemn rivet
#

throw the noobs at marmu

north sequoia
#

I actually didn't fight marmu till I had already finished the first ending though

solemn rivet
#

marmu, more like marmuwu amirite

north sequoia
#

lol

#

anyhow, sound like a fun after school project to be working on.

#

Imma definitely try and do it cuz there seems like no reason not to

solemn rivet
#

do it

#

any questions you can ask here

north sequoia
#

alright thanks

solemn rivet
#

np

flat forum
#

how do people die to traitor lord tho

solemn rivet
#

idk

north sequoia
#

cuz traitor lord is hardddd

flat forum
#

only thing he has going is the fact he's fat

solemn rivet
#

dammmmn

safe hamlet
#

bruh who writes c# as c sharp

#

at least use csharp

rain cedar
#

see sscharp

copper nacelle
#

c += 2

safe hamlet
#

c += 1

unborn flicker
#

c~~//~~

fair rampart
#

c = c + 1

#

Dβ™­

glossy gorge
#

@unborn flicker Tried an Area Rando on the new version Saturday, and it looks like the dreamer trap issue returned. FYI

unborn flicker
north sequoia
#

@fair rampart i think you meant c++;

charred parrot
#

Who here is working on that 5 Knights Boss mod?

#

How did you visualize the hitboxes in build?

copper nacelle
#

any DebugColliders

charred parrot
#

You're able to get that in build?

charred parrot
#

Apparently there is a mod that allowed you to visualize these things.

#

Anyone know who made it?

nimble lake
#

isn't there a hitbox setting in debug mod?

rain cedar
#

I made that mod hello

#

And it's separate from debug

nimble lake
#

btw did you mention that you were going to update debug?

gilded lotus
#

@charred parrot ask jngo

fair rampart
#

nah, sean made the hitboxes mod

gilded lotus
#

oh i actually thought sean was memeing πŸ€” lmao

charred parrot
#

@rain cedar How are you visualizing the hitboxes?

rain cedar
#

Many line renderers

fair rampart
#

DebugCollider is fucked anyway

charred parrot
#

If you mind me asking.

#

Oh lol really?

rain cedar
#

Yeah

charred parrot
#

Alright not too bad.

#

Ty

rain cedar
#

Why do you want to know?

#

If you're in editor there's way better things to do

charred parrot
#

Sometimes you want to do some debugging in build.

#

And unfortunately Unity doesn't provide much to work with.

#

(My own project, not HK)

glossy gorge
#

Thanks, Homothety, didn't catch the Sunday update. πŸ‘

young walrus
#

Okay team, trying to hook into the FSMs of arenas and boss battles to change the music in them. Having a hard time understanding how to change an FSM (or really anything). Any guidance would be appreciated.

#

pretty sure this is Hornet 1's FSM from Fungal1_04

#

where the musicCue is used

rain cedar
#

The api has an FsmUtil class for helping modify these

#

From only looking at this pic I'd expect you need to change either the music snapshot or cue (or both)

young walrus
#

I'd want the cue to remain the same, just cue something else

rain cedar
#

Nah I think you're thinking of the trigger for it

#

Cue is something else, but idk what without looking more

young walrus
#

musicCue isn't a trigger?

rain cedar
#

Nah the start trigger is almost certainly the enter transition out of idle

safe hamlet
#

i modified the cue for one of my mods to change the music, i think that works

young walrus
#

is info.SceneName updated all the time?

#

or only when it's called from a hook

unborn flicker
#

Yeah, the start trigger is the Trigger2dEvent when you physically enter the Music Region

young walrus
#

trying to understand here what's happening

rain cedar
#

"info" is a specific instance of a class

unborn flicker
#

Well, remember that the code will be blocking, so it won't really have time to "update" either

rain cedar
#

It doesn't really change all the time so much as it's just a different thing every time

young walrus
#

taken from GameManager

unborn flicker
#

but when it ends with orig(self, info) info is the GameManager data that is kept

#

so there I edit the info.sceneName to change the destination scene, while self just refers to the current GameManager

young walrus
#

gotcha. so it's not a call to see what scene you're currently in

#

you're editing it to change the room you go to

#

or it's doing both?

unborn flicker
#

Right, that particular block is to check for starting in Godmaster mode and intercept to start in a randomizer start location instead

#

That's why the new version of the randomizer skips the cutscenes

#

I was too lazy to figure out how to do it from the normal mode start zote

young walrus
#

All I really need to do is check for the current room I'm in, and if true, run the FSM music change

#

if true meaning "in a target room"

unborn flicker
#

self.sceneName will be fine then

young walrus
#

it'll be like.... 5 of them

unborn flicker
#

or GameManager.instance even

rain cedar
#

GameManager.instance.GetSceneNameString() is probably better

#

Because it forces an update of the scene name

young walrus
#

am I on the right track here at least

unborn flicker
#

Not quite

#

in Initialize you set up the hook

young walrus
#

and I'll probably just use a switch instead of a huge if/else thing

unborn flicker
#

referring to a method which is outside Initialize

#

so On.FSMUtility.whatever += MickelysHook

young walrus
#

so the hook on the right is just defined locally?

#

i still don't understand how hooks work

#

so if On.FSMUtility.whatever is caught, it'll run method "mickelyshook"

#

??

rain cedar
#

A hook is a list of functions which get called at a specific point in the game code

#

Yes

unborn flicker
#

You're adding a delegate to the hook. When the hook is called, every delegate on the hook runs in the order they were added

young walrus
#

would that be too late to run that specific swap?

#

in the case of changing out an audio track?

#

isn't that changed as soon as the trigger is hit to start the music then?

rain cedar
#

Nah if you hook that fsm action it'll be fine

young walrus
#

and I'm guessing I have to destroy whatever was going to be run?

#

else it'll play both at once

rain cedar
#

Yeah, replace it with your thing

unborn flicker
#

The hook replaces the output, so you shouldn't also destroy it

young walrus
#

so in this case..... the trigger2d event would be enum2?

rain cedar
#

You can figure out what enum2 means by looking in dnspy

young walrus
#

if it wouldn't crash immediately.....

#

fucking thing

unborn flicker
#

Rivatuner

#

was crashing it for me

rain cedar
#

Odd

copper nacelle
#

tf

young walrus
#

wow

#

that was it

#

fuckin a

rain cedar
#

0 indexed so enum2 is exit

young walrus
#

what are you looking at here?

#

what'd you open in dnspy

rain cedar
#

Trigger2dEvent class

young walrus
#

just the normal csharp assembly?

rain cedar
#

Yeah everything you'll want to look at is in the one file

young walrus
#

I can't find where you got that from

rain cedar
#

HutongGames.PlayMaker.Actions.Trigger2dEvent

#

Then click the type of the trigger field

young walrus
rain cedar
#

Oh, look in a vanilla assembly

#

The modded one is a pain in the ass

#

You get like 10x the results for any search and the extra 9 are all garbage

young walrus
#

well okay. lol

#

but anyway, I'm gonna use the RID value?

rain cedar
#

What?

young walrus
rain cedar
#

Oh that

#

Those comments are irrelevant for modding

#

You can disable them, I'm just lazy

#

It's just 0, 1, 2

#

Or you can hover over them and it'll show the value

young walrus
#

okay. so I'm looking to use "OnTriggerExit2D"

unborn flicker
#

You shouldn't be looking at OnTriggerExit2D I think

#

Can't you hook ApplyMusicCue directly?

rain cedar
#

You could, this is all a bit of a tangent because he asked what enum2 meant

#

Or something like that

young walrus
#

There's an "applymusiccue" hook?

rain cedar
#

There's a hook on literally every method

young walrus
#

now where the hell is that located..........

fair rampart
#

On.AudioManager.ApplyMusicCue

young walrus
#

thx

#

why doesn't it like this?

rain cedar
#

Method signature doesn't match

#

You also shouldn't be using a local method for this

copper nacelle
#

If you delete the method and alt-enter the hook it'll make the method for you

rain cedar
#

But that won't stop it from compiling

young walrus
#

local meaning I should create a different class to run it?

copper nacelle
#

no

#

local methods are methods inside methods

young walrus
#

gotcha

young walrus
#

if I'm putting the audio files embedded in the dll, I don't need to run WWW to search for them right?

fair rampart
idle pelican
#

why you put megalovania in hollow knight. Answering myself why not.

young walrus
#

I think I found the FSM event to remove (42969)

#

now just need to input my own using the wav file I have

flat forum
#

I can't get the copying rain to work

#

it always starts at the very left edge of the screen and looks like a waterfall in the rare cases you get to actually see it

compact sedge
#

can you set the x and y scale

#

as in not the position but the scale

flat forum
#

why wouldn't it copy it over with the scales notlikequirrel

#

is there a way to get it to copy over the scales as well?

#

since I'm not doing it for 1 object in one room

#

I'm doing it for a type of object

hasty fractal
flat forum
#

ooh!

copper nacelle
#

doesn't instantiate go to 0,0

hasty fractal
#

Don’t worry, I will test it before posting it.πŸ˜‰

copper nacelle
#

@flat forum e

flat forum
#

well seems like it does

#

how do I

#

not make it do that

copper nacelle
#

instantiate takes a transform param i think

#

might be a vector2

flat forum
#

you mean list the position/rotation/scale of the original on the copy

#

like, manually?

#

do I do this for each go?

copper nacelle
#

you probably only need position

#

tbqh

#

Instantiate(go, go.transform.position) would probably work out

unborn flicker
#

Probably not. I don't believe mapzone is used for anything other than setting the save file banner and controlling Jiji dialogue

#

Several of the mapzones are unused

copper nacelle
#

MapZone is used for whether or not to spawn a shade as well

young walrus
#

what is used to play the file though?!?

rain cedar
#

It's loading that from Unity resources, not your embedded ones

#

Not gonna find it there

young walrus
#

it's loading it from a similar location to customknight

rain cedar
#

You can look at other mods that use assets (randomizer, benchwarp, etc) to see how they do it

#

Custom knight definitely doesn't use Resources.Load

young walrus
#

no, but it uses the Data_DIR shortcut like I did to define the location

#

not shortcut

#

variable

#

customknight uses a "WWW" something or other to load the sprites

#

but my mod doesn't even recognize that

#

here

rain cedar
#

Custom knight does it in an odd way yeah

#

It's the most time efficient way I could find

#

But for one resource it doesn't matter

#

Not gonna be async anyway

young walrus
#

I can't find anything besides UnityEngine.Resources.Load

#

that works for audio

rain cedar
#

Look at how other mods do it

young walrus
#

audio files are weird

rain cedar
#

Hollow point has audio

young walrus
#

textures and sprites are easy according to everything I've been seeing

rain cedar
young walrus
#

hollow point would be a good reference, yeah

#

thx

rain cedar
#

It might not be in there because apparently ttacco never pushes

solemn rivet
#

can you load audio as a byte[]

rain cedar
#

8 months old feelspkman

solemn rivet
#

like I load the sprites in hpbar

rain cedar
#

Yeah you can load anything as byte[]

solemn rivet
#

I figured

rain cedar
#

Idk how you would convert that to a usable format

#

But I'm sure you can

young walrus
rain cedar
#

Alright yeah ttacco does that

#

byte[]

#

This is my code lmao

safe hamlet
rain cedar
#

He just changed it slightly for audio

solemn rivet
#

buddy

#

what was it used for originally

rain cedar
#

It's from randomizer

safe hamlet
#

bruh why is it on my thing

solemn rivet
#

o

safe hamlet
#

o fork

young walrus
#

AudioClip doesn't work in mine

#

is that pulled from somewhere special?

rain cedar
#

Missing a reference probably

young walrus
#

should be a unity class right

rain cedar
#

UnityEngine.AudioModule.dll or something

young walrus
#

that might be my whole problem to all this

#

.......

#

I hate this

#

I was trying AudioClip for forever

#

just missing a fucking reference

rain cedar
#

That'll happen

solemn rivet
#

but usually intellisense will tell you

#

rider is always like "dude, you sure you're not missing some refs"

rain cedar
#

Oh yeah get ReSharper if you don't have it

young walrus
#

I've seen tons of stuff for AudioClip loading and shit. I thought the NET3.5 or something was outdated

rain cedar
#

Or use rider

#

One of those is basically mandatory

young walrus
#

don't you need a license for resharper

rain cedar
#

If you have a student email it's free

#

But you probably don't

#

Idk how much it costs

young walrus
#

i'm old as dirt

rain cedar
#

I mean

solemn rivet
#

I mean same, but I still have one

rain cedar
#

My school is letting me keep my email forever

solemn rivet
#

^

rain cedar
#

I graduated like 8 months ago

young walrus
#

i still have mine I guess

#

we'll see if it works?

solemn rivet
#

try it

rain cedar
#

It should

solemn rivet
#

rider is real good tho

rain cedar
#

I assume they accept anything that's *.edu

solemn rivet
#

resharper is good too, but VS is already pretty damn slow on its own

#

so I prefer to just use rider, which is considerably faster and lighter on my pc

safe hamlet
#

i don't like r#

young walrus
#

it's fine on my machine

#

Β―_(ツ)_/Β―

safe hamlet
#

messes everything up

solemn rivet
#

u

rain cedar
#

He's not wrong though

solemn rivet
#

just don't let it force its settings

rain cedar
#

ReSharper is fine for me on vs 2017

#

Lags horribly in 2019

safe hamlet
#

yea it's so slow

solemn rivet
#

resharper does have some stupid defaults tho

#

I cannot deny

#

but you can customize everything

young walrus
#

i like what you had before

#

costumize

solemn rivet
#

idk why I keep swapping letters in words today

safe hamlet
#

today

solemn rivet
#

idk how many times I misspelt now as nwo

#

sid

#

any?

safe hamlet
#

any what

solemn rivet
#

n-e

safe hamlet
#

bruh

#

i don't follow

#

who is n-e

solemn rivet
#

follow me on twitch

safe hamlet
#

i am followed

solemn rivet
#

so you do follow

#

nice

safe hamlet
#

eldercprime

solemn rivet
#

oh I know

copper nacelle
#

resharper being slow is why I went to rider

#

rider has vs-style defaults as an option too

hasty fractal
#

Finally done!

#

Feel free to use and have fun with the skin!

rain cedar
#

Looks really good

hasty fractal
#

Thank you!

young walrus
#

okay so.......

#

what's the default audio source for boss scenes like this

#

or how can I find it

#

Hollow point initiates the sound effects from the hero upon certain events, but I don't want to do that. It'd just play it next to the default scene sounds

rain cedar
#

If you don't call orig in that hook it should prevent the normal music

#

Situationally, of course, you don't want to always stop the music

#

Unless that's your eventual goal

young walrus
#

what do you mean

rain cedar
#

Are you trying to replace all the music in the game or just a few tracks?

young walrus
#

just a few

#

so I should put a check in there first that's checking what room I'm in?

rain cedar
#

Looks like you already have that

young walrus
#

so I don't stop it from playing always

rain cedar
#

You'll want a call to orig if it's not those scenes

young walrus
#

my main question is around what I've circled. I don't know how to launch the track that I have stored in SongList

rain cedar
#

You can probably pull a source from the AudioManager instance you have

young walrus
#

cuz the music cue should bring me there, but Im not understanding the syntax of PlayOnSource

rain cedar
#

Private so you need reflection

#

But there's a thing for that in the api

#

ReflectionHelper (ReflectionUtil?)

#

One of those two

young walrus
#

I have no idea what reflection means

rain cedar
#

ReflectionHelper.GetAttr<AudioManager, AudioSource[]>(self, "musicSources");

#

Reflection is, in this use case, a way of accessing private fields

#

That's the only use case that ever really matters unless you're doing something really fucked up

young walrus
#

okay, so what did that line just do that I typed

#

how can I access that to play on the source

rain cedar
#

Don't elderC me you know it's right

young walrus
#

just reference "musicSources"?

copper nacelle
#

iterating over all fields is cool

rain cedar
#

Yeah it's essentially equivalent to self.musicSources

#

If that field was public

copper nacelle
#

sid how else are you going to serialize

rain cedar
#

With JsonUtility

#

πŸ™‚

copper nacelle
#

json utility i sleep

young walrus
#

do I just enter that as a non string then?

rain cedar
#

GetAttr returns the value

safe hamlet
#

serialize what

#

what are we even talking about

#

i just elderced because i can

copper nacelle
#
char[] unsafe real_shit<T>(T structure) where T : unmanaged
{
    char arr = new char[sizeof(T)];
    fixed (T* ptr = &structure)
    {
        char* char_ptr = (char*) ptr;
        for (int i = 0; i < sizeof(T)/sizeof(char); i++);
            arr[i] = *(char_ptr++);
    }
    return arr;
}
rain cedar
#

Unsafe bad

young walrus
#

I see, so just this

rain cedar
#

Yeah that might work

#

For readability I'd put that in a local first

#

Like

AudioSource whatever = ReflectionHelper.GetAttr(...);
#

Functionally the same thing though

young walrus
rain cedar
#

var maggotprime

#

This is entirely opinion based but using var is incorrect

young walrus
#

good. I'll leave it then

copper nacelle
#

I use it when the type is like super obvious

safe hamlet
#

what does that code do 56

copper nacelle
#

fwiw though if you alt-enter the keyword it'll let you expand it if you just don't want to bother typing

young walrus
#

does Unload() get run at game close always?

copper nacelle
#

Takes a pointer to the struct, casts it to a char* (think a char array or string), and then puts it in an actual char array which it returns

#

Unload from IToggleableMod?

young walrus
#

yeah

copper nacelle
#

no

young walrus
copper nacelle
#

That's when people swap it off in the menu

rain cedar
#

There's an application quit hook

safe hamlet
#

bruh i can read code

young walrus
#

I just see this at the bottom of people's mods

safe hamlet
#

what is it used for tho

rain cedar
#

If you want game close

copper nacelle
#

serializing stuff quickly

rain cedar
#

But I don't think that runs if you alt+f4

#

Not sure

copper nacelle
#

fairly sure it doesn't

young walrus
#

I just don't want to create a memory leak or anything

copper nacelle
#

FeelsGradowMan

rain cedar
#

It's hard to leak memory in C#

#

The only way it'll realistically happen is through Unity calls

copper nacelle
#

Or leaving a bunch of stuff hooked and then hooking again 80 times

rain cedar
#

Looks like you stole the ttacco SoundLoader and that's the only place I would expect a mod like this to leak

#

So you're fine there

young walrus
#

yeah. and his WavUtility class

safe hamlet
#

i mean it's not that hard to leak memory

#

it depends on the type of stuff you work with

rain cedar
#

Anything unmanaged yeah

safe hamlet
#

compared to other languages tho, yea

rain cedar
#

But for this use case that just means unity

safe hamlet
#

and yea unmanaged too

rain cedar
#

Unless you've got like an infinitely growing list

#

Which I have accidentally done before

safe hamlet
#

relatable

rain cedar
#

Also mick the hollow point repo has no license, which means it defaults to all rights reserved

#

So you should ask ttacco but I'm sure he's ok with it

copper nacelle
#

I think WavUtility is MIT

#

when you rob robbed code

#

feelspkman

safe hamlet
#

truly

young walrus
rain cedar
#

The SoundLoader is robbed code as well

#

From randomizer

#

lmao

copper nacelle
rain cedar
#

Robbing two pieces of robbed code

safe hamlet
#

well there isn't any other logical way tho

young walrus
#

well it loaded

rain cedar
#

Yeah that's like 90% of programming

#

Stealing from old projects/stackoverflow/random repos

safe hamlet
#

this man speaks truth

#

9% trail and error

young walrus
#

and.......... eternal black screen. lol

#

way to go mick

safe hamlet
#

1% writing code that works

#

maybe even less

rain cedar
#

Enable debug log in game

#

And qol for output_log in game

#

Makes stuff a lot easier to debug

young walrus
#

how

rain cedar
#

In the api global settings you have to add EnableDebugLogInGame

#

true

copper nacelle
#
    "BoolValues": {
        "_keys": [
            "ShowDebugLogInGame"
        ],
        "_values": [
            true
        ]
    },
rain cedar
#

Show

#

I was close

young walrus
#

so I just deleted all music from the game

#

yaya

rain cedar
#

Yeah you're not calling orig anywhere

safe hamlet
#

did c# always have the dereference operator ->?

young walrus
#

what's the difference between += and -= for the hooks

rain cedar
#

+= adds

#

-= removes

#

I was not aware of a deref operator

#

But I also don't ever write unsafe code

young walrus
#

so I'm intercepting the music cues always

rain cedar
#

Gonna go eat, I'll be back in like 30 minutes if you still need help

#

In the meantime ping yusuf a lot

copper nacelle
#

-> is ptr to field

safe hamlet
#

is it not like the cpp operator

copper nacelle
#

that is the cpp operator

safe hamlet
#

since it just accesses the member by dereferencing the pointer

copper nacelle
#

so like if you had

struct T
{
    int i;
}

// in method
T *t = ...;

t -> i // gets field i
safe hamlet
#

yea

copper nacelle
#

yes

safe hamlet
#

did it always have it tho

copper nacelle
#

I think so

#

Found a stack overflow post on it from 2017

#

And another one from 8 years ago

#

so probably

jade venture
#

Hello, I was wondering if the Hollow Point mod was open source?

safe hamlet
#

yes

jade venture
#

Thank you!

copper nacelle
#

@floral furnace license your mod idiot

rain cedar
copper nacelle
unborn flicker
#

If you want the hook to work the way it would normally be used, Mick, I think you need to do the following:

  1. Load the music files in Initialize, and create MusicCue objects for each one
  2. Set musicCue to the new object inside the hook.
  3. Call orig before the hook ends.
    If you aren't replacing the cue, then the hook really won't be better than just editing the fsms you want to change
#

Unfortunate. I thought I had done audio stuff for rando 3, but I actually never managed to get the byte[] to format correctly so I ended up just ripping the cry off of a preloaded grub

jade venture
#

Hm, the assets folder defined in the solution for Hollow Point dont match with the assets provided in the github page.

#

Anyone have that folder?

copper nacelle
#

the assets in the github page are a lie

#

they're only there because taco forgot to delete them

#

fwiw you can get this same zip by just stealing all the files off the dll

#

using dnspy

floral furnace
#

i forgot licenses, are a thing

flat forum
#

go.transform.position gives the error of can't convert from UnityEngine.Vector3 to UnityEngine.transform

rain cedar
#

Are you trying to set a transform equal to that?

#

Show the full line

flat forum
#

I'm trying to copy over an object and keep its original position, and either SFG or 56 suggested doing a Instatiate(go, go.transform.position )

rain cedar
#

Instantiate takes a transform, not a vector3

#

Delete .position

copper nacelle
young walrus
#

Homothety, how do you do step 2 there though

#

musicCue is defined already, and converting an AudioClip into that I don't really understand

fresh cipher
#

i wish I could mod HK but don't understand Unity at all :(

rain cedar
#

The conversation literally right above this is someone modding with 0 experience in any kind of programming

fresh cipher
#

ah

ornate rivet
#

how can you change where a gg boss spawns you once you die/win

copper nacelle
#

dream return scene

ornate rivet
#

thanks

#

is it just an fsm?

copper nacelle
#

field

#

player data

#

dreamRespawnScene or dreamReturnScene

#

Can't remember which and I'm on a bus

flat forum
#

hi on a bus

#

I'm Papers

copper nacelle
ornate rivet
#

ok 56 boio. There was a dream return fsm too so that's what I thought you meant.

safe hamlet
#

56 became a bus

#

feelsokayman

young walrus
#

Does HK use Unity or Playmaker to actually play/store the sounds? Unity right? Playmaker is only used as a trigger system?

#

If that's the case, I think I can write something that'll print the Clip that's being initiated and then use that to intercept that specific GameObject.AudioSource.AudioClip

grizzled steppe
#

Having a conversation with yourself is great

young walrus
#

it's thinking out loud, through chat

grizzled steppe
#

insane

young walrus
#

I was trying to do that, but didn't know how to define the audiosource as a musiccue

#

cuz then I was just going to replace the musicCue variable that was being run by orig

flat forum
#

hey, Mick

#

you think that'll work with area backgrounf music, too?

young walrus
#

Probably

#

You'd probably have to do a couple extra things to ensure it keeps playing and isn't destroyed on scene load

#

this is trying to replace the clip in the FSM, but wasn't working and just making a really loud screech

#

SoundLoader.SongList[0] is the AudioSource for the song I'm trying to put in

rain cedar
#

You could instantiate your own audio source and play on that just to make sure it's loaded properly

young walrus
#

play it on a nail swing or something. lol

#

I think it might not have been created correctly actually. or defined correctly

#

it's defined as an AudioSource right now, but shouldn't it be defined as an AudioSource.AudioClip

solemn rivet
#

@copper nacelle

copper nacelle
#

@solemn rivet

solemn rivet
#

didja compile the new enemyhp and add it to the installer

#

just asking cause you mentioned

copper nacelle
#

Ah fuck

solemn rivet
#

no, it's fine

#

I'll do it

copper nacelle
#

Okay

#

Sorry

solemn rivet
#

but not rn

#

don't be

#

I should be the one doing that

#

no worries

#

but the dll is back home in my gaming pc

#

so it might be a while until I update it

#

which is fine since no one cares

#

I'll also be mimicking customknight to make the hpbars customizable

#

mick, did you eventually get Rider?

young walrus
#

no

#

resharper

#

the edu license worked

#

so I have a student one for a few years

#

I wasn't seeing any performance issues so

#

Β―_(ツ)_/Β―

solemn rivet
#

wtf 56

#

I apparently only pushed the changes to componenthpbar.cs

#

not to hpbar.cs

#

feelspepoman

round vapor
#

DRYYA MOD - DRYYA MOD - DRYYA MOD ... !!! happygrub happygrub happygrub

unborn badger
#

sir calm down

#

what the fuck are you saying

round vapor
#

(i can't wait for some updates on the FGK mod)

unborn badger
#

what are you talking about

round vapor
#

Five Great Knights of Hallownest Mod! ...have you been living under a rock? 😏

unborn badger
#

no

#

since when was there a mod about the great knights

#

what does it even add

round vapor
#

it's in development right now. it's about boss fights against the original five great knights of hallownest, that means dryya, hegemol, isma and ze'mer (with the exclusion of ogrim who already got his fgk fight as white defender).

rain cedar
#

Ching you left for like 8 months

#

I think that counts as living under a rock

unborn badger
#

GWchadMEGATHINK i never left for that long

#

anyways that mod sounds like a massive undertaking

rain cedar
#

Your last message before this month was may last year

#

7 months

#

Close enough

solemn rivet
#

ching

rain cedar
#

In this channel, at least

solemn rivet
#

5 Knights at Graddy's

unborn badger
#

gradow

#

i see

solemn rivet
#

that's the official mod name

unborn badger
#

oh so it's not serious

solemn rivet
#

yesn't

gilded lotus
unborn badger
#

oh shit

#

do we get to fight all 5 at once

#

because like

#

a year ago

#

pre-godmaster

#

i expressed how cool it would be to fight 5 great knights at once

#

except it wouldn't be at once it would switch between teams of 2 knights and then the last one would get super buffed orenstein/smough style

unborn badger
#

oh that's sick

solemn basin
#

I think it's Five Knights at Corny's. Be thankful you got a map to know where the knights are.

gilded lotus
#

five knights at pale king's. It's a haunted palace

solemn basin
#

Pale King hires vessels and replaces them daily.

gilded lotus
#

i mean placing void inside suits of armor to act as guards isn't that far off form spirits inhibiting animatronics

ornate rivet
#

Pale Court

#

PC

#

Pale Champion

#

it all connects

gilded lotus
#

colorful hero when

ornate rivet
#

colorful hero a year ago

proud snow
#

White is a color

#

black is a color

ornate rivet
#

wow

solemn rivet
#

I'll be fixing hpbars in a sec

unborn badger
#

pog

solemn rivet
#

done

young walrus
#

okay. audio is playing, but new problem: there's two instances of the audio playing, one playing with a delay of like 2s

rain cedar
#

Progress though

young walrus
#

it was the damn wav file causing all the problems

#

threw in a new wav, boom, no issue

#

....except the delay

young walrus
#

can I change a value in an FSM?

#

like if I wanted to change that 2

floral furnace
#

i think theres like an FSMVariables with an Set FSMFloat extension method? (forgot the method name) that takes a string of the variable name and the value you want it changed as

fair rampart
#

it'd be
fsm.Fsm.GetFsmFloat("Transition Time").Value = yourValue

floral furnace
#

yeah that one

young walrus
#

except set

#

right

#

I don't want to get it

fair rampart
#

you get the value and then change it

floral furnace
#

i might be remembering miscorrectly sorry, but is there a set version? otherwise jngos should work

fair rampart
#

I don't remember seeing one

floral furnace
#

yeah thats my bad then sorry

fair rampart
#

either way VS should show autocompletion so you can see for yourself

floral furnace
#

im more used to SetAttrib/GetAttrib so i misremembered it being the same for FSMs

rain cedar
#

FsmFloat is a reference type so getting it gets the actual thing not a copy

#

Then you can change it to whatever

young walrus
#

what do I reference when it's asking for the PlaymakerFSM fsm

#

is that the tab name?

#

so, SceneManager-Music Control

#

?

rain cedar
#

I don't think you have access to the fsm with how you're currently doing it

#

But you could use a different hook

young walrus
#

would this work? I can't figure out what game object to pull the FSM from though

#

lol

#

I don't think this will work

fair rampart
#

SceneManager is the name of the game object, Music Control is the name of the fsm

rain cedar
#

Does it have the same name for both scenes you're trying to change?

young walrus
#

I'm just trying to change one scene

#

but I believe so

#

I think the tabs are 2 different instances of the same FSM

#

[2704b]

rain cedar
#
FSMUtility.LocateFSM(GameObject.Find("SceneManager"), "Music Control")
#

Should work to find it

young walrus
#

yeah I got it

#

but it's the wrong fsm

#

none of the variables did anything

#

so I'm trying to grab "Music Region" now

#

but it's in a "different scene"

#

Β―_(ツ)_/Β―

#

Fungus1_04_boss

#

instead of Fungus1_04

#

so what do you suggest

#

I'm trying to change the "Enter Transition Time" variable on this one

#

but like i said.... different scenes

#

unless the boss part counts as it's own sub-scene somehow?

rain cedar
#

In a way yeah

#

Both scenes are loaded

young walrus
#

okay, so that may be why two instances of the music are playing

#

it's playing for fungus1_04 and fungus1_04_boss

#

with a delay for the second one

round vapor
#

how about a PALE KING BOSS MOD ???

unborn badger
#

that exists

#

it’s called path of pain

#

what

solemn rivet
#

hex, sounds like a good idea

#

do you have the assets and code for it?

flat forum
#

Hex

#

modding discussion is a more appropariate place for this

#

to suggest and expand on ideas

#

why would it

safe hamlet
#

how are you loading the audio tho

#

you would need to convert the file into pcm data, no? i am asking what you use to do that

young walrus
#

use the WavUtility class

#

steal it from ttaco

#

the game should already be doing that, so you just need to replace the audio in the right spots

#

BG audio is tricky. b/c the game has multiple tracks loaded and then will only have certain ones playing

#

depending on scene

#

if you look at the assets anyways, each track has multiple components, like a bass, excitement, and main loop

#

How'd you end up replacing them?

#

Maybe we'll have to "collab" for the next mod I want to do, will have all custom a Capella audio sounds.

flat forum
#

hey, SFG

#

can I reuse some of your code to try to replace the music in CoT for the thing I'm doing?

#

thanks a ton!

round vapor
#

@solemn rivet & @flat forum you're right, wrong channel

young walrus
#

is it auto-looping it?

#

does the file have a bunch of empty noise at the end of it?

#

I'm sure I'll run into this issue tonight after I fix the double play instance

#

weird.

#

I'll keep a watch out for that though and try rendering audio as mono if I have to

#

How much time between is there

#

Weird

copper nacelle
#

@jolly oriole Sid had the same issue

#

He had the fix it you ask him

#

@safe hamlet yeet

young walrus
#

that doesn't sound right

#

didnt you just run it through this anyway

#
if (res.EndsWith(".wav"))
                {
                    Modding.Logger.Log("[HOLLOW POINT] Found sound effect! Saving it.");
                    Stream audioStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(res);
                    if(audioStream != null && res.Contains("support"))
                    {
                        byte[] buffer = new byte[audioStream.Length];
                        audioStream.Read(buffer, 0, buffer.Length);
                        audioStream.Dispose();
                        airStrikeSoundFX[airsupportCount++] = WavUtility.ToAudioClip(buffer);
                    }
#

this is also what I used to load the exact length of my wavs

#

πŸ‘

safe hamlet
#

the heck

#

discord is shit now

#

@jolly oriole did you fix the issue

#

o you did

#

i didn't realize the empty part was half of the total audio, dividing by the number of channels would make sense

#

i can easily fix the hollow point sound bug now, thank sf

#

i was using a different script to fix this issue

compact sedge
#

alright I have a question for y'all

#

does anyone have any thoughts on the new github sponsors system/thingy?

#

I kinda wanna support someone on it but it's really new to me

rain cedar
#

Idk what that is but it sounds like a way that you could give me money

#

And I am always in favor of receiving money

compact sedge
#

are you developing fna right now?

rain cedar
#

Not currently no

compact sedge
#

okay then maybe I'll give you money another time

rain cedar
#

But I could probably find something to pr if it means money

compact sedge
#

sadly it only lets you sponsor people not prs. it's not like a bugbounty thing

#

although if you're interested in that there's probably a bug out there annoying enough for me that I'd pay to have fixed I just can't think of any

vapid crag
#

@solemn rivet sorry for the ping, but afterthe new update I can not see boss hp

#

sorry if im missing something

solemn rivet
#

I'll see what's happening

#

why is your pfp mitchirineko but hk

vapid crag
#

it was cute

#

best pfp 2020

solemn rivet
#

bruh

vapid crag
#

i also threw on santa hats in premiere

solemn rivet
#

my boi mawlek not even there

vapid crag
#

I'll throw him on

#

but like, it kinda ruins it

solemn rivet
#

it's fine

#

don't worry

#

mawlek never gets invited to the party anyway

#

he's used to it by now

#

poor fella

unborn badger
#

he gets invited more than tiso

solemn rivet
#

gottem

vapid crag
solemn rivet
#

imagine caring about tiso

#

topkek

vapid crag
#

omg we have team cherry here now?

unborn badger
#

things tiso got invited to:
coliseum???
things mawlek got invited to
coliseum
godhome
forgotten crossroads

#

we always have

#

tc have been here for a while

vapid crag
#

rlly?

#

nvr saw

unborn badger
#

yes

#

;lore

solemn rivet
#

yeah

#

I remember when some code from godmaster leaked

unborn badger
solemn rivet
#

and Will came here to ask us what we'd found

#

and then he was like "that's fine"

#

@vapid crag what exactly is not working

unborn badger
#

remember when a member of tc shitposted their own fsms

solemn rivet
#

does it not show at all?

#

does it not decrease?

vapid crag
#

not show

#

in specific i have no fucking clue what the name of the boss im fighting is

#

lemme check

#

its a half boss

solemn rivet
#

what

#

Oro and Mato?

vapid crag
#

wait, lemme grab a clip

#

as you can see, no bar hollowsad

solemn rivet
#

watcher knights

vapid crag
#

ah

unborn badger
#

that's a spicy framerate

vapid crag
#

indeed

#

next to unplayable

#

might go to gfouce

rain cedar
#

to what

solemn rivet
#

gfouce

rain cedar
#

oh

#

I think I have deciphered it

#

gfouce -> geforce -> shadowplay

vapid crag
#

gforce now

#

aka shadowplay

solemn rivet
#

@vapid crag fixed it

#

I'll tell you when it's up so you can dl it

vapid crag
#

wow thar was fast

solemn rivet
#

try it now

vapid crag
#

got it

#

thanks

#

may I ask what the old update did

solemn rivet
#

wdym

vapid crag
#

like the update that broke it

#

what was it for?

solemn rivet
#

wait

#

gimme a sec

#

ok

#

it should be fine now

#

uhhh

#

the old update was supposed to fix the alleged memory leak

#

which I've never experienced

#

so idk if it fixed it or not

#

but it should theoretically run smoother now

#

also, 56

#

@copper nacelle

#

had to make it two canvases

#

one for bosses and one for enemies

#

not like it matters

#

2 vs. 12980239842093849 is still improvement

vapid crag
#

yes

#

i suppose it is

solemn rivet
#

before the last update

#

I would draw a "transparent film" over the screen and draw the hp on it

#

one for each enemy

#

and these films didn't get properly destroyed, I don't think

#

now I have only one "film"

#

and draw all hpbars on it

vapid crag
#

nice

#

so the more you play the more film residue

#

?

solemn rivet
#

before the last update, the films would pile on top of eachother

#

which costs processing power

#

even if it's only a little, it adds up over time

#

now, that shouldn't happen

vapid crag
#

hmm,it does run a bit faster

#

but what if there are other enemys

#

more than one?

solemn rivet
#

it doesn't matter

#

it works just fine

vapid crag
#

may I ask how you make the mods? do you do it within unity?

solemn rivet
#

nooo

#

just code

vapid crag
#

sounds painful

unborn badger
#

why do you think all the modders want to die

vapid crag
#

coding to add onto somthing you did not code

fair rampart
#

you can do parts of it in unity

solemn rivet
#

it's not painful

#

I like doing it

young walrus
#

okay. my theory of why my clip is playing twice is not panning out

#

any ideas? I thought it was because the scene Fungus1_04 reloads as soon as the hornet 1 fight starts, but I made sure the clip doesn't load on the first scene load, and it's still playing twice

rain cedar
#

Is your music hook being called twice?

young walrus
#

the orig?

#

orig(self, musicCue, etc.....

#

i'm setting a bool on the first time the scene is loaded

#

then after that first time, the music replacement is allowed to run

#

which is happening when I enter the hornet arena

#

but it's still playing twice

rain cedar
#

You're setting it in a loop on every channel

#

Might be it

young walrus
#

the only thing I could think would be causing the issue at this point is that

  1. the clip is loading incorrectly as two clips
  2. the orig function is being run twice
#

what do you mean

rain cedar
young walrus
#

what would you suggest to change that to? I'm not even sure I know what that's doing. 56 told me to write that to load in the clip

rain cedar
#

Idk try just doing channels[0]

young walrus
#

what do those channels represent

rain cedar
#

Probably different audio sources

young walrus
#

like this?

copper nacelle
#

yes

young walrus
#

thx for being patient with me through all this. I know I've been an annoying little shit this week

#

well it's working

rain cedar
#

gg

copper nacelle
#

gg

safe hamlet
#

ggg

young walrus
#

now I have the same problem of the huge void space

#

just added in the / int channels tho

#

we'll see if that helps

#

recording audio now.....

young walrus
#

if anyone wants to try it. only Hornet music is changed

young walrus
young walrus
#

well at least the music is replaced. Gotta figure out how to destroy what I put in there though after a scene change

#

it's still playing in the next scene. lol

#

with regular BG music underneath it

solemn rivet
#

gg mick!

ornate rivet
#

I've permanently ruined my godhome file tisoweary

#

so many memories lost

fair rampart
#

rip

safe hamlet
#

any savefile edit

ornate rivet
#

what would I edit

#

soul warrior room is stuck in workshop room

#

or maybe the other way around

#

lmao I dont even know where godhome is in waterways

ornate rivet
#

Using additive loading results in every scene load after also being additive, what should I do?
UnityEngine.SceneManagement.SceneManager.LoadScene("ismaScene", UnityEngine.SceneManagement.LoadSceneMode.Additive);

ornate rivet
#

I already use a transition point

#

I'm trying to add stuff to an existing scene so I make a scene in Unity with all the new stuff in the right spot and load that scene additively into the existing scene

#

and this works but it ruins all other scenes too

copper nacelle
#

@ornate rivet you're at -20k, -20k or something fwiw

#

you can just noclip in at like 10x timescale

gilded lotus
#

literally stuck in parallel universe lmao

copper nacelle
#

and all the boss scenes tc has have the same meme

#

They have a SceneManager fsm which takes care of fixing it if you want to take a look

#

If the SceneManager doesn't get loaded you just get mantis lords everywhere

solemn rivet
#
        public static void Load()
        {
            if (loader == null)
            {
                loader = new GameObject();
                loader.AddComponent<SpriteLoader>();
                DontDestroyOnLoad(loader);
            }
        }```wtf is this in customkinght
#

how can you add a component from inside the component itself

#

and why

safe hamlet
#

why wouldn't you be able to

rain cedar
#

That's a static method

#

But even if it wasn't

#

Still would work, it'd just be a bit odd

safe hamlet
#

yea

solemn rivet
#

I know it would work, but

#

what's the point

safe hamlet
#

i agree with gradow on this one, the design for that is questionable

solemn rivet
#

can't you just do that on the main class

#

or heck, add it to the knight himself

#

or to the gamemanager

safe hamlet
#

you can do it in the main class and it should imo

solemn rivet
#

I mean, that's what I'm gonna do anyways

#

just checking

#

I'm working on customizable hpbars

#

should be able to finish by tonight

safe hamlet
#

imagine not streaming

solemn rivet
#

I will

#

gimme a second will ya

young walrus
#

.done

safe hamlet
#

i won't be there very long tho since i have my science fair tomorrow

solemn rivet
#

yhtsi

#

just go sid

#

don't play with my heart

young walrus
#

he couldn't if he tried

solemn rivet
#

@safe hamlet

rain cedar
#

There's nothing wrong with static instantiation methods