#loaforcsSoundAPI

1 messages · Page 2 of 1

dark crypt
#

I'm sure vanilla replacements work fine, just not super sure on the modded ones yet, or at least just the meltdown music

#

Haven't experimented much outside of that, but LR is doing well so

sleek dew
#

I'm fine with this, I left it on

radiant marsh
#

@dark crypt Like can we do inside factory and outside and also ship? etc

dark crypt
#

The volume changing depending on where you are is only available in PizzaTower atm

fiery arrow
#

what am I listening for here?

radiant marsh
#

I really want @cinder jolt add christmasv2 reference 😛 so I can change it on LEC moons >.<

dark crypt
radiant marsh
radiant marsh
#

LEC still stuck on it >.<

fiery arrow
#

You have to add that yourself :P

radiant marsh
#

I see no refference in debugger for it :S

#

Nothing pops up

dark crypt
#

I remember seeing it I think?

radiant marsh
#

Only sounds for it landing and opening etc

#

Although I haven't updated today if there's any updates

fiery arrow
#

You should just have to change the filename

radiant marsh
#

I don't have to make a replacer for it?

dark crypt
fiery arrow
#

Oh did I not add them to the list? mb

radiant marsh
#

No haha xD

#

and nothing shows in debugger for christmas one so kinda got stuck

radiant marsh
#

I already replaced dropship song, just christmas one I needed to do but there's no refence at all, not even in debugger..

dark crypt
#

I've never had that with LEC, and I sort of assumed they were just the same sound trigger but with different files

radiant marsh
#

This is refence for OG rocketship

radiant marsh
#

Which I believe after looking 😛

dark crypt
#

I've had LEC for weeks and I've never had that, is it only on Wesley's moons?

radiant marsh
#

That I know of yeah, he said version he using still has the christmas song I guess?

fiery arrow
#

The default game uses the non-christmas cue sinc it isnt christmas anymore

radiant marsh
#

Not in this case :S I don't even have the christmas song anyway but can be found in LEC

#

Why I didn't even argue with Wesley about it haha

#

Because I asked him twice, can you please get rid of christmas song - he said he can't 😛

dark crypt
#

What a weird incompatibility

fiery arrow
#

should definitely be able to, thats weird

radiant marsh
#

LEC hasn't been updated has it 😛

#

still using old fork of LE

fiery arrow
#

thats probably why yeah

radiant marsh
#

Probs a good thing tbh with what's going on with LE 😛

fiery arrow
#

whats LE again? lol

radiant marsh
#

LOL

merry sedge
radiant marsh
cinder jolt
#

im sorry i don't hear it even at 14 seconds, if you mean the warning voiceover going "warning: core overheating" that's because that is a seperate sound

#

base facility meltdown has two audio tracks one for the music and the other for those voiceovers, they just both get controlled by the music slider

#

but because you are replacing only the music the warnings can still play like base meltdown

#
  • now that this tool is better you should replace "warning1" - "warning4" instead of putting the warnings in your music (meltdown actually increases the frequencey of these clips as the meltdown progresses)
dark crypt
#

Oh I see, okay. Are the warnings supposed to be so much quieter than the music? Or is it just quieter because my music is loud?

cinder jolt
fiery arrow
#

future feature idea: conditions for different creature behaviour modes
e.g. is little girl chasing you or just watching

chrome forum
#

This seems to get spammed in my logs when I start up a lobby

cinder jolt
#

Or there is an error on load

chrome forum
#

disabling i mean

#

i think i'd rather take the mod developers words over yours, no offense

chrome forum
#

eh sure

merry sedge
#

I don't get it

chrome forum
#

considering my pack uses AC it's possible

cinder jolt
#

@radiant marsh thanks for looking into this, was at school should be able to look closer in a few hours

stoic lily
#

is there an "add" option instead of "replacement" if we have 2 json files replacing the same audio? Because I want to make it where I can let people toggle certain audio sets on/off

So like set 1 has a bunch of replacements and set 2 (if enabled) adds into the list for that audio

cinder jolt
#

if you just have both the audio sets enabled it should just work

stoic lily
#

hmm it doesn't do that for me. Is it because of

        "type": "determinstic"
    },```
in both json files?
cinder jolt
stoic lily
cinder jolt
#

by default it uses pure, so it doesn't matter if you put pure in there or remove the randomness alltogether

stoic lily
#

ah alright, thanks bongo. I really wish I could search more specific details on this thread via discord search.

cinder jolt
#

working on the advanced company issue and got this list that ac messes with

#

seems to be a select few player audios and they get repeated several times

#

alright going to be putting out an patch to change the error into a warning explaning that it is in fact ac messing with something

#

also nvm the repeating several times isn't ac, but the source becoming null is

sleek dew
#

What???

#

When did AC start causing incompatibility???

cinder jolt
#

its not a full incompatibility but it does seem to cause issues

sleek dew
#

Strange, but how can problems manifest themselves?

#

Out of sync with everything? Game crashes?

#

I'm simple, I haven't encountered this

#

Although there were a couple of moments and suspicions about Amongus AC

cinder jolt
#

seems like some sounds could fail to replace

sleek dew
analog egret
#

this something that depends on AC to get fixed, correct?

#

here's hoping potatoe gets on it soon

merry sedge
#

@fiery arrow small change.
SandWorm:SandWormRoar must be replaced with VoiceAudio:SandWormRoar to actually change the audio

fiery arrow
#

Thatd explain a lot TE_cmonBRUHH

cinder jolt
#

it seems to be ac doing some weird stuff between when soundapi detects the source and between when the first frame hits

#

most likely potatoe also ran into playOnAwake issues and solved it in this way

#

would love to check myself but advanced company is closed source and dnspy wasn't giving me answers

proper dragon
dark crypt
#

Are Booleans the only variable types able to be used in configs right now? And what other conditions are available for replacers?

#

Not asking for any functionality specifically, just curious what the limits are right now

#

Reason I asked here is cause I looked there first

#

The wikis aren't extensive rn so I ask here

#

Also is the space between listed options here intentional? It's not typical of jsons to have spaces between listed items in my experiencce so I thought I'd make sure{ "matches": ["AmbienceSource:Random1", "AmbienceSource:Random2"] "sounds": "<ambient sounds>" }

#

Unless it's supposed to be like this?

    "matches": [
        "AmbienceSource:Random1",
        "AmbienceSource:Random2"
    ],
    "sounds": "<ambient sounds>"
}```
#

(I'm sure either probably works tbh)

#

Oh other than the missing comma

fiery arrow
dark crypt
fiery arrow
#

ah, yeah the wiki is outdated

dark crypt
#

All good, it's early days

#

Also deterministic is spelt wrong :(

#

Unless "determinstic" is a specific, other term I don't recognise

fiery arrow
#

youd be right

sleek fjord
#

yeah I dont think itll be that big of a deal

analog egret
#

got work for u bongo

#

doubt there is a way, but if there was any possibility of a check to see what ambiance is playing to STOP the API from injecting more ambiance over it would be nice

analog egret
#

since it would need to recognize the specific sound it played it's probably not very doable

sleek fjord
#

that isnt what hes talking about

#

(I think)

dark crypt
dark crypt
#

Preventing overlapping audio is, I imagine, probably going to be something the API aims to do?

analog egret
#

no i mean, lets say i got three sounds: Ambiance1(Long), Ambiance2(short), and Ambiance3(sudden).
While Ambiance1 is playing, i'm okay with Ambiance3 playing and overlaying on top of it. HOWEVER, while Ambiance2 is playing, no other ambiance sounds should play

#

this would be something i'd set on a per-sound basis, basically

analog egret
#

it would prevent, for example, two long ambiance sounds from overlapping and sounding bad

sleek fjord
#

that is true, and you are right

#

BUT

#

I dont want to deal with it ;-;

analog egret
#

i hear you, but what about this

#

we get bongo to do all of it

#

y'know

#

like all of it

sleek fjord
#

lmao I mean the stuff on my side

analog egret
#

nonono you're not following

#

ALL of it

sleek fjord
#

Jsons are now included in the soundpack whjich is OUR side

analog egret
#

"bongo, do the json for me"

sleek fjord
#

oh boy

analog egret
#

that'd work, no?

#

:3

analog egret
#

(once bongo comes online i'll be tagged on a very heated message)

dark crypt
#

Just like you technically don't need to put "weight":1 on sounds, cause the weight is 1 by default

sleek fjord
#

hmmmm, true on second thought Im okay with this

analog egret
#

that too

sleek fjord
#

ive asked about this so we'll see

dark crypt
#

Only thing keeping me from switching completely from PizzaTower is fading music

sleek fjord
#

if all clips could fade when told to stop BEFORE being finished

analog egret
#

it'd be more like: Deepbass.ogg -noOverlap

dark crypt
#

Oh, does anyone know if you can have multiple conditions? Or how to format it?

    "condition": {
        "type": "config",
        "config": "Copyright:AllowCopyrightedMusic"
    },
    {
        "type": "config",
        "config": "Test:TestConfigOption"
    }```
Instinct tells me it's like this
dark crypt
cinder jolt
#

planning to do that in an update now that I'm on weekend

#

going to do the actual thing condition system

#

won't be by default

sleek fjord
cinder jolt
sleek fjord
cinder jolt
sleek fjord
#

Gotcha, the sudden cutting out is super immersion breaking and before your api I never thought it could be addressed

cinder jolt
#

my priority list is something like:

  1. improve condition and add variable system
  2. better logging and dev tools
  3. investigate issues with apparatus and ship thrusters
  4. fade in and out, random pitch, just more settings for each sound
  5. hotreloading
  6. completly removing a sound
  7. advanced company issues
  8. maybe more audio formats
sleek fjord
cinder jolt
#

but yeah it won't pitch pitched sounds if you dont tell it to

#

also: think ive got a devlish idea on how to solve the issue on where the industrial fan on the facility map (and some other sounds) arent being picked up

#

should be apart of the condition update

sleek fjord
#

also is there a way to make the weight system affected by the previous choice?

#

For example if the options are 1,2,3,4,5 and it pick 1 can the RNG be changed for the next selection to avoid the occasional experience of it choosing 4 like 4 times in a row?

cinder jolt
#

im not overly sure how i'd manage that considering that would use a lot of memory

sleek fjord
#

fair, I kinda expected that

cinder jolt
#

(and you guys using determnistic on everything already is pretty annoying)

sleek fjord
#

since it would have to remember the previous choice

#

we dont use it on everything, only ambience for the most part

cinder jolt
#

ah well i think i need to rewrite a bit of code to get fading working so i could add a little flag then

sleek fjord
#

a little flag?

cinder jolt
# sleek fjord a little flag?

"direct_repeats": false
and then it keeps just a simple boolean (theyre like 4 bytes in memory) and that gets swapped on if it was recently played as part of a replacer

sleek fjord
#

and when I was talking about the fading I just want to make sure we're on the same page that it would only fade sounds that weren't able to be finished playing (interrupted )

sleek fjord
#

I havent noticed any ram hogging issues really

cinder jolt
sleek fjord
#

what kind of ram use are we talking on large packs?

#

just a guestimation

cinder jolt
#

ive got no clue, plan to do more profiling stuff with those better dev tool

#

and plus with the condition update you

#

'll be able to "cache" certain condition results, so it doesn't need to recalculatae the whole condition

#

so if you do
"cache": "on_startup"
i can unload the sound replacer group (or more likely just not load it)
if that condition returns false

sleek fjord
#

well so far Im incredibly impressed with what you've been able to do so far

cinder jolt
#

anyway got it detecing the generated rooms now

#

just gotta complete stuff

sleek fjord
#

BY EACH ROOM????

#

I didnt realize you could get that specific lawrd

cinder jolt
#

main thing is fixing that fan at the facility entrance

#
  • with this you'll also be able to replace the meltdown explosion sound
sleek fjord
#

Room specific sounds will be very cool

#

I assume Ill also be able to specifiy which interior ambiance is used here as well? with this update

cinder jolt
#

yeah

sleek fjord
#

nic nice

fiery arrow
#

Pixel really out here discovering things that I have had listed in the sound doc for a week now dies

sleek fjord
#

THE UPDATE ISNT OUT YEt

cinder jolt
sleek fjord
#

You can already do that?

cinder jolt
#

and plus this i think also removes the bandaid fix for playOnAwake that is currently in

cinder jolt
sleek fjord
#

So thats what you just added in the last update?

cinder jolt
#

because of the whole thing requiring gameobjects to be in the matchers

fiery arrow
#

each room is a game object for lights based sounds

cinder jolt
#

god feels nice to get rid of that bandaid fix

#

nvm i cant 😔

cinder jolt
#

chat it has been completed

#

i think its factorwindambiance right?

#

or am i going to combust

fiery arrow
#

What is?

cinder jolt
#

the starting room for facility

fiery arrow
#

sorry, youre gonna combust

cinder jolt
#

alright with a little bit of magic surely this is the one

fiery arrow
#

sorry, youd be right

cinder jolt
fiery arrow
#

yeah

cinder jolt
#

alright time to add more conditions :3

fiery arrow
#

are weights fixed?

cinder jolt
#

i'll add more debugging stuff if you could look into it

#

i dont have a soundpack setup to test that

fiery arrow
#

specifically the footsteps

cinder jolt
#

going to work on the condition system now

fiery arrow
cinder jolt
#

i changed up how it calculates slightly and added some more debug logs

#

for the random weights

fiery arrow
#

because you included a potential fix or to get a log of whats going wrong?

sleek fjord
#

is the weight system fixed>

cinder jolt
#

also

{
  "type": "and",
  "conditions": [
    {
      "type": "conditionA"
    },
    {
      "type": "conditionB"
    }
  ]
}

does that look good?

cinder jolt
#

also debating on whether or not i have a not condition or you use !config

fiery arrow
cinder jolt
#

conditions and and or are done

cinder jolt
fiery arrow
cinder jolt
fiery arrow
#

doing all 4 horsemen of logic seems like a solid idea

cinder jolt
fiery arrow
#

xor

cinder jolt
#

ah okay

#

yeah xor could be pretty memory intensive

fiery arrow
#

as in only one or neither

cinder jolt
#

and with and and or you can specify as many conditions as you want

#

so id either need to restrict xor to only two conditions or find a way to have it work

fiery arrow
#

why only two

sleek fjord
#

YOU NEED MORE?

cinder jolt
#

i mean may as well

#

because nesting conditions like that
looks awful and more importantly
increases memory usage

fiery arrow
#

Oh wait were talking about conditions, shit
I wanted logic for config options

cinder jolt
fiery arrow
#

TE_PepoThink

LR has two scanner variants, but both can be turned on no? that would cause self confliction, so having one turn off if the other is also turned on is what im thinking (because people will be stupid enough to do that and come asking why things are broken)

cinder jolt
#

oh yeah im working on bringing more types of config options

fiery arrow
cinder jolt
#

so you can have a config option that is "None", "Pixel", "Moroxide" and then you can use a condition to check whether it equals

#

this part could take the longest

cinder jolt
fiery arrow
cinder jolt
#

are you sure cause from these logs it seems to be picking different ones

#

its getting so big holy

fiery arrow
#

I hear the "prkr" variant 8/10 times

cinder jolt
fiery arrow
#

seems to have done it :)

cinder jolt
#

also

{
  "type": "equals",
  "a": {
    "type": "config",
    "config": "Sounds:ScanVariation"
  },
  "b": "Moroxide"
}

does this look good?

#

i just don't really like that use of a and b surely theres better names for it

fiery arrow
#

how else would you do it?

cinder jolt
cinder jolt
#

guys we are in business

#

this is some of the worst code ive ever written but it works

sleek fjord
analog egret
sleek fjord
cinder jolt
#

loaforcssoundapi's foundation is fairly solid id like to think

#

so having a small bit which is slightly shaky isnt so bad

sleek fjord
cinder jolt
#

its also not too bad of code, but c# doesn't have a specific feature so i have to do a bunch of wonky stuff

sleek fjord
#

just the comedy of "Man why would they do this like this, this code is awful" to a few days later "Man I had to do some janky stuff to make this work right" is very entertaining🤣

merry sedge
#

Would this help?

sullen ore
#
Stack trace:
loaforcsSoundAPI.Behaviours.AudioSourceReplaceHelper.Start () (at ./Behaviours/AudioSourceReplaceHelper.cs:20)```
#

I know it's not really an issue but I'll just post it here in case since it's an error 🤷

Unsure if it's LR or LoaforcsSoundAPI

merry sedge
#

most probably LoaforcsSoundAPI

chrome forum
#

Hey I was given a mod that's supposed to replace the facility meltdown music using this api as the dependency instead of PizzaTowerEscapeMusic, but for some reason the audio doesn't play for me when pulling the apparatus. Here's logs from 2 different runs:

proper dragon
#

Cus it's not implemented yet, LR is gonna merge their FacilityMeltdown stuff into normal LR once the api actually implements it

chrome forum
proper dragon
#

Ohhhh okay then he is working on it then

#

XD

chrome forum
#

Was boutta say there's no way I just got hardcore trolled by the mod dev

proper dragon
#

Lmfao

sleek fjord
cinder jolt
#

april fools gonna go wild :3

sleek fjord
#

it will replace all sounds, even footsteps with the "roll"

sleek dew
#

@sleek fjord coilhead and its sounds are not working for me(((

#

Tested in the "LethalDev" test room

sleek fjord
#

really? is this in a testing enviroment that uses exclusively LR and its dependencies?

sleek dew
#

Yes

#

I checked yours separately and nothing else

#

And your custom ones with a piece of you

#

All the same

sleek fjord
#

thank you for letting me know! we'll look into it

proper dragon
#

@sleek dew if I remember you use QualityCompany, you need to disable it's experimental networking feature or else it conflicts with the API and makes some sounds not play

#

I would personally recommend removing that mod entirely though as it caused me more issues than it was worth

sleek dew
#

LETHAL_LONERS: 018dd7d3-4dd6-1482-17c5-a2d5c5126a4f
@proper dragon

cinder jolt
#

@fiery arrow @sleek fjord @merry sedge could you guys give a list of everything you'd want to have be a condition? stuff like "PlayerHealth", "DungeonType" stuff like that

fiery arrow
#

"BehaviourState" for enemies if possible

cinder jolt
#

and my system doesn't let me pass in more context atm

fiery arrow
#

multiple of the same type?

cinder jolt
#

but i think it would end up pretty janky

fiery arrow
#

does the console not specify what enemy has changed behaviour state? I thought it did

cinder jolt
#

might come back to it if i ever upgrade the context system though

fiery arrow
#

What about loading different sets of sounds when a new level is loaded? for variety

sleek fjord
#

PlayerHealth, Sanity State(Not sure if this is in normal game, but I keep hearing about it) Creature distance to Player (no idea if this is possible), TimeOfDay, and hmmmmmmmmmmmmmmmmmmmm

cinder jolt
#

also you guys can do

"condition": {
  "type": "equals",
  "a": { "type": "DungeonName" },
  "b": "Facility"
}
#

and that just works now

sleek fjord
#

just like that?

cinder jolt
#

yeah in the next update

#

its a really flexible system now

sleek fjord
#

cool cool, very nice

cinder jolt
#

when i update meltdown you'll be able to pull in data like the current time until meltdown

#

and check if that is say under a minute

sleek fjord
#

its a nice Spaceship, it really is bongo

cinder jolt
#

moon shouldn't be too hard

fiery arrow
cinder jolt
#

basically

fiery arrow
sleek fjord
#

Im not too fond of a condition moon

cinder jolt
#

alright {"type": "CurrentMoonName"} is something you can plug in now

sleek fjord
#

not that I think we should have less features, just saying

#

(due to modded moons)

cinder jolt
fiery arrow
#

Im more thinking randomizing sounds when a new moon is loaded

cinder jolt
fiery arrow
#

so pixel could for example change the sounds a monster makes when a new moon is loaded, so people cant "get used to it"

cinder jolt
sleek fjord
#

WHY HAVE 3 SOUNDS PER MONSTER WHEN YOU CAN HAVE ONE SET OF MONSTER SOUNDS PER MOON

sleek fjord
dark crypt
#

(I have been wanting a system through which I could have a set of themed sounds per round, like one round a Pikmin preset is selected and selected sounds are only replaced with Pikmin sound effects, and then the next round a different preset is selected etc. Some condition, or other way, which allows for this would be nice)

lament drift
#

tho

#

ok discord keep the page super scroled up

lament drift
cinder jolt
#

yeah ik

lament drift
#

itll be like Level1Flow

cinder jolt
#

really going to need to work on those better tools after this

lament drift
#

lll dependency go brrr 😉

cinder jolt
#

well as long as StartOfRound.Instance.currentLevel.name and RoundManager.Instance.dungeonGenerator.Generator.DungeonFlow.name are both the correct things and are updated by LLL then i won't need a hard dependencyh

lament drift
#

well the bad news is

#

the former might end up changing

merry sedge
#

Oof

lament drift
#

depending on if your using LE moons with or without LLL

cinder jolt
#

oh god

lament drift
#

LE names selectablelevel files based on planet name without sanitizing them

sleek fjord
cinder jolt
#

or by the sounds of it theyre might not even be a good data point

lament drift
#

there isn't a good data point to be completely honest, atleast in the current modding situation

sleek fjord
#

also does LLL allow for custom sounds in moons? Ive noticed a few clips lately with some mixed sounds

lament drift
#

with just LE you get file names like this

with LLL they would be

CDAridionLevel
WastelandLevel

iirc

cinder jolt
#

would you want explict less than operators? because you can just swap the variables because it evaluates it as a > b or a >= b. so you could just swap the values of a and b

sullen ore
#

this got me confuse for a half a second lol

#

i think i understand it

cinder jolt
#

yeah thats just how i do changelogs

#

i have the heading level a lil messed up but yeah

sullen ore
#

also never knew AC had issues with SoundAPI

#

ill go ahead and check my modpack

cinder jolt
#

seems to cause a couple issues

sullen ore
#

eh i only get 1 small error and thats all

#

everything else is fine for me

#

nvm it aint no small error 👀

#

i rechecked my modpack now it got big errors only when loading into a lobby but gameplay is smooth

sullen ore
#

though it wont be the same for others which i'm sure you already knew

#

ooo i found a new issue now

#

is when u leave the lobby the console starts spaming errors (no fps changes) by steam

#

but when playing the game on any lobby no errors would show up

#

only on main menu it starts to (not when you loaded up the game but after leaving a lobby)

cinder jolt
sleek fjord
#

Might be helpful, might be useless, but I’d check it out

sleek fjord
#

No idea if this is even remotely related

#

But it says awake :3

#

Lmk tho if it is/isnt

#

Feel like it’s likely unrelated

cinder jolt
sleek fjord
#

Sad

cinder jolt
#

i already manually do its main use case

#
  • its more optimised on my version cause i know the data better so i can cheat and stop processing more effectevely
merry sedge
dark crypt
#

So many things I want to say.

proper dragon
# merry sedge

I think his response is a bit rude and a bit uncalled for tbh

#

Noone at all said anything about his mod being shit

proper dragon
sullen ore
#

If that helps

#

The new update did fix the errors I got during gameplay now it's errors during main menu

#

not an issue but i guess this is what happens if u cap your lobby to 32 players it heals 32 players even non-existen ones lol

#

so im testing it again with the same modpack and tried doing the same things i did yestday

#

theres no errors i kept trying like 6 times

#

still no errors?

#

i havent change anything since yestday errors

#

neither i got errors during gameplay

#

odd

cinder jolt
merry sedge
cinder jolt
#

I never called ac shit I said it's doing silly stuff

sleek fjord
dark crypt
#

If you can't fix it honestly don't worry about it, it doesn't seem like it causes any functional issues anyway

analog egret
#

the dropdowns? i saw another mod (not this one, but forgot the name) that also separated every 0.x version on a dropdown, that had all the 0.x.x inside

cinder jolt
#

thats how i usyually do changelogs

analog egret
#

gotcha gotcha

#

that's much less confusing, yeah

#

the dropdowns do look cool, though strangely empty

#

too used to seeing pages filled top to bottom with changelogs

dark crypt
#

That's the way I like it

cinder jolt
#

yeah i will add those dropdowns they are really cool

dark crypt
#

Throw your information at me

sleek fjord
fiery arrow
cinder jolt
sleek fjord
#

yes but do they activate at the same time for like ambiance? @cinder jolt

#

like can one person hear ambience and one person not hear it? not the same file, I mean like at all?

fiery arrow
#

deterministic = its always the same. it will be the same for every player, so same sound same time each time

cinder jolt
#

(given that the basegame plays it at the same time for everybody)

fiery arrow
#

pretty much everything except for music and UI should

sleek fjord
glossy ledge
#

I have some questions

  1. If I add my soundpack mod, with just some sounds changed, but have LethalResonance with the same sounds, what sounds are going to play, mine or LR?
  2. I want to add another HightAction2 sound, I have HightAction2_01 and HightAction2_02 and this is what i did, so is that even correct, because when I start the game, I hear the normal music, not the LR one
    {
    "randomness": {
    "type": "determinstic"
    },
    "replacements": [
    {
    "matches": "HighAction2:HighAction2",
    "sounds": [
    {
    "sound": "player/HighAction2_01.ogg",
    "weight": 1
    },
    {
    "sound": "player/HighAction2_02.ogg",
    "weight": 1
    }
    ]
    },
    {
    "matches": "LowAction:LowAction",
    "sounds": [
    {
    "sound": "player/LowAction_01.ogg"
    }
    ]
    }
    ]
    }
fiery arrow
cinder jolt
glossy ledge
fiery arrow
#

I think afterwards overrides?

glossy ledge
fiery arrow
#

Github wiki page of the mod

glossy ledge
#

should be this one?

fiery arrow
#

Still doesnt work?

glossy ledge
fiery arrow
#

Yeah that should work, odd

What does the log say about it?

glossy ledge
#

I will start the game only with LR now to see is it this mod the problem or something else

#

I guess something I do wrong, without it all the LR sounds are there
The mod name start with S, so should override LR

fiery arrow
#

try A

glossy ledge
#

Even with A doesn't work
I'll try again tomorrow, tnx for the help 🍻

#

It's only not working when I add HighAction2_02 sound and do the json for it, if it's with only HighAction2_01 in, it's all good, strange

slow coral
#

Really waiting for this feature
#modding-general message

#

Please let me know if this is planned in the near future and should I count on it?

cinder jolt
slow coral
#

Great, I'll be waiting

proper dragon
#

@cinder jolt Is this an error from SoundAPI? [Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
EnemyAI.EnableEnemyMesh (System.Boolean enable, System.Boolean overrideDoNotSet) (at <af9b1eec498a45aebd42601d6ab85015>:IL_004C)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
EnemyAI.EnableEnemyMesh (System.Boolean enable, System.Boolean overrideDoNotSet) (at <af9b1eec498a45aebd42601d6ab85015>:IL_004C)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

[Error : Unity Log] NullReferenceException
Stack trace:
UnityEngine.Component.CompareTag (System.String tag) (at <e27997765c1848b09d8073e5d642717a>:IL_0001)
EnemyAI.EnableEnemyMesh (System.Boolean enable, System.Boolean overrideDoNotSet) (at <af9b1eec498a45aebd42601d6ab85015>:IL_004C)
StartOfRound.SetPlayerSafeInShip () (at <af9b1eec498a45aebd42601d6ab85015>:IL_008B)
AudioReverbTrigger.ChangeAudioReverbForPlayer (GameNetcodeStuff.PlayerControllerB pScript) (at <af9b1eec498a45aebd42601d6ab85015>:IL_0177)
AudioReverbTrigger.OnTriggerStay (UnityEngine.Collider other) (at <af9b1eec498a45aebd42601d6ab85015>:IL_018B)

#

Been trying to figure out where it's from

cinder jolt
#

no seems to be an enemy is failing to spawn in

proper dragon
#

I'm really wondering what could be causing it

cinder jolt
#

it's taking about tags are you on a modded interior?

proper dragon
#

No

cinder jolt
#

if not remove some custom event mods

#

enemy*

proper dragon
#

Ahhh okay

#

Here let me post my mod list, maybe you can figure out where it's from

#

My only guess would be MEOFork maybe...

proper dragon
#

While I'm at it @cinder jolt could anything in that pack cause voice chat to lag or delay? I was having people telling me vc kept being really choppy tonight and my only guess would be ToggleMute lol

cinder jolt
#

umm no probably wouldn't be soundapi, considering I don't really touch audio sources at runtime atm

#

could be as weird as another mod just spamming a bunch of network traffic

proper dragon
#

My only guess in that regard would be

#

FriendPatches

#

Or LateCompany

cinder jolt
#

ight thought i should start getting feedback on this now. this is the current dev veresion which contains more conditions and a whole new variable system. i'll probably need help writing the docs but want to get it out to you guys

the following should now be possible:

{
  // ...
  "condition": {
    "type": "equals",
    "a": {
      "type": "config",
      "config": "Variations:Scanner"
    },
    "b": "Pixel"
  }
}

this shows off that you can now have different types of config options! (the accepted ones are boolean, number (well technically float and int), string) and then use that in a new condition equals.
there is also greater_than (a > b) and greater_than_or_equals (a >= b). these ones only accept number so be careful!
now im not sure wether or not i should also add a less_than variant as you could flip the values of a and b to do the same thing.

fiery arrow
#

you wanna elaborate on boolean/number/string?

cinder jolt
fiery arrow
#

And what variables can they be used on?

cinder jolt
fiery arrow
#

Like Sanity, is that something we can check for?

cinder jolt
#

oh yeah theres um

#

and the generic ones

fiery arrow
#

What about a variation of mod_installed where if some other mod is also replacing the same sound prioritize that

cinder jolt
#

that could be doable but im just chilling for a little bit so it might be as far as the weekend

cinder jolt
#

no my warning just isn't shit l riding l working l showing up lol

#

meltdown is ready to integrate with sound api, but sound api hasn't updated

cinder jolt
#

3am moment ig

sleek dew
#

0_0
It scares me...

#

But the problem is that I don't even know what it is...

cinder jolt
#

either not a sound api issue (looks like sounds are loading when you are ingame I don't so this) or something is wrong with your sound files

#

make sure they're not corrupted and try ogg format

sleek dew
#

Possibly problems from him

#

There's music playing there

#

Today, after updating the mods, I received a combination of bugs and I’m just sitting in shock

proper dragon
#

@cinder jolt did you ever fix the compat with MoreCompany btw?

cinder jolt
#

no is it actually breaking smth?

proper dragon
#

Gives the same null errors that it gave with AC, even blames AC for doing something lol

cinder jolt
#

I've changed the message in the Dev branch just gotta get the time to actually fucking add changing the audio at runtime

proper dragon
#

Been looking forward to whenever you release the next update

#

^^

glossy ledge
#

One question, sound API has problem only with AC, or with other mods too

pine gale
#

AC and morecompany

glossy ledge
#

What's the problem with more company, because I want to use it with LR

dark crypt
#

Not even a spam, just errors sometimes

sleek dew
#

I didn't think they could have problems at all.

#

0_0

glossy ledge
#

Oo noice

pine gale
#

please use github links for sharing betas etc from now on instead of sending dll's or any files @cinder jolt

#
{
  "update_every_frame": true,
  "replacements": [
    {
      "matches": "MeltdownHandler:music",
      "sounds": [
        {
          "sound": "meltdown/in_facility.ogg",
          "condition": {
            "type": "equals",
            "a": {
              "type": "PlayerLocationType"
            },
            "b": "inside"
          }
        },
        {
          "sound": "meltdown/outside.ogg",
          "condition": {
            "type": "equals",
            "a": {
              "type": "PlayerLocationType"
            },
            "b": "outside"
          }
        }
      ]
    }
  ]
}

the most cooked syntax is here. swapping out audio while its playing is possible now. you'll need this dev version and im not fully sure if it works yet lol but have fun

#

Reposted your.message too

#

Cuz it had the download in it

slow coral
#

Should I even try to make a mod to replace the rn sounds, and after the update I can just add information there that it only plays on a specific moon?

#

Or will I have to redo everything from scratch and it's better to wait for now?

cinder jolt
slow coral
#

Ah, okay, thanks, then I'll wait a bit. I wish you a good recovery!

pine gale
#

i had this being spammed earlier after quitting a lobby, not sure if its a sound api issue or what

cinder jolt
#

might be not sure, but probably not

dark crypt
heavy mist
fiery arrow
#

Any update on randomising PlayOnAwake sounds while they loop?

fiery arrow
#

deterministic is spelled incorrectly in code btw, it only registers "determinstic" @cinder jolt

sleek dew
#

question

#

If I install LCSound, will there be any conflicts? xD

fiery arrow
#

There wont be conflicts as long as two mods arent trying to replace the same sound

fiery arrow
#

@cinder jolt mp3 format is broken

fiery arrow
#

@cinder jolt Hows the update coming along? Or is your ear still being a pain

fading crown
#

That can legitimately be called a CustomSounds/LCSoundTool replacement, incredible job!

merry sedge
cinder jolt
glossy ledge
#

How can I do HighAction2 to have 5 random sounds

pearl kayak
eternal portal
#

Are there known bugs with loaforcs/lethalresonance? It sounds like ship thrusters not playing (or being super quiet?) might be known, but nobody really seems to mention it. A lot of sounds from LR are working, as I can hear the new door sounds, as an example. but overall the feeling of the pack pre and post move to loaforcsSoundAPI feels very different somehow. i think a lot of sounds are maybe not playing, or not being replaced?
perhaps i've gotten used to a lot of the newer sounds, though. the ship thrusters are definitely either not there or much weaker than even vanilla.

cinder jolt
#

they are quieter that is a known issue as for some sounds not being replaced itd probably be fixed in the next update coming sometime

fiery arrow
#

you must also restore me to my former glory 😩😩

fading crown
#

You must restore them to there former glory 😩😩

glossy ledge
#

you must restore him to his former glory 😫😫

merry sedge
#

You must restore her to there former glory 😩😩

pine gale
#

you must all get banned

glossy ledge
#

I tried put weight on HighAction2, I got only 2 audio files, every time just one plays
is there something with the "randomness", what should I type there, do I need it for that

glossy ledge
#

in git, not in thunderstore

cinder jolt
#

yes

glossy ledge
#

it's 1.0.0beta1 right

glossy ledge
#

sorry again for my questions, but is there a way to add different background songs to a maps, that plays all the time until you die

fiery arrow
#

You might be able to connect it to the "startofday" ambience cue, but itd only work outside

glossy ledge
#

but it will be for all the moons, not just some of them

fiery arrow
#

the next update will let you specify what moon

glossy ledge
#

nice, I will wait, thank you 🍻

pallid marsh
#

How up to date is the code on GitHub? I'm assuming threading is still an issue, and I was looking at the threaded sound loading and wondering if you'd considered making it join that thread at the end of the chainloader, or just in time before a sound is requested?

#

that should be an easy way to prevent race conditions when accessing the sound replacement dictionar(y/ies?), assuming I'm reading everything correctly

fiery arrow
#

Beta branch is decently up to date

cinder jolt
#

also i think its the most up to date but i was still planning on rewriting some stuff

pallid marsh
#

sounds can't be replaced in the menu?

cinder jolt
#

they can be, that's the whole point of "load_on_startup" is to have those loaded first

pallid marsh
#

then isn't any menu sound going to access the collections being modified off the main thread?

#

(I should be clear, I'm assuming "connect" means joining or creating a lobby)

cinder jolt
#

no its setup in such a way that things are cached via audioclip name, then that goes to a list.

pallid marsh
#

so SoundReplacementCollection.RegisterWithMatch() isn't called off the main thread? or is SoundReplacementAPI.SoundReplacements populated before the thread starts?

cinder jolt
#

no

pallid marsh
#

wait, no to which?

cinder jolt
#

SoundReplacementAPI.SoundReplacements is populated once on Awake() and then off the main thread

pallid marsh
#

right, and if the thread is adding buckets to the dictionary, then it'll be able to cause a race condition

cinder jolt
#

yes that's the whole crash issue

#

which is why it also gets populated somewhat on awake

pallid marsh
#

if any new keys are added off the main thread it's not safe

#

at least without ConcurrentDictionary

cinder jolt
#

ehh seems to work fine as long as you have a somewhat fast disk

pallid marsh
#

but you can't just assume that

#

even if a PC is blazingly fast, it can still have something slow it down

#

it's either gotta be treated as read only from the second thread or it's got to be joined before the main thread reads from it

#

or it has to use thread-safe collections

#

otherwise you may read from it while it's being resized and then you get back garbage

cinder jolt
#

be silly :3

pallid marsh
#

sure lol

#

I wish you the best in your silliness

fiery arrow
cinder jolt
mellow shoal
cinder jolt
#

i've got no clue what youre talking about (its a 6mb file 😭 ) so im going to guess its about occludeaudio which is a widespread issue that's a bit tempremental

mellow shoal
#

Sorry. I will specify next time. 😆

cinder jolt
#

just to give a bit of progress on the update, im currently rewriting the multi threading. should be a) more reliable and b) faster because im using a thread pool

cinder jolt
#

@sleek fjord @merry sedge 11 seconds to 2

merry sedge
#

wow

mortal nymph
cinder jolt
#

also this approach is techincally more memory efficent than pizzatowerescapemusic

proper dragon
#

Update is going on TS soon right?

cinder jolt
#

yeah going to help the lr team port over meltdown then it will

fiery arrow
#

Yooo

dark crypt
#

Excite

proper dragon
#

Need the update for the multithreading stuff

#

lol push it now push it now!!!!

#

😄

cinder jolt
#
{
    "update_every_frame": true,
    "replacements": [
        {
            "matches": "MeltdownHandler:music",
            "sounds": [
                {
                    "sound": "meltdown_inside.ogg",
                    "condition": {
                        "type": "PlayerLocationType",
                        "location": "inside"
                    }
                },
                {
                    "sound": "meltdown_outside.ogg",
                    "condition": {
                        "type": "PlayerLocationType",
                        "location": "outside"
                    }
                }
            ]
        }
    ]
}

not sure on how different it is from pizzatower but heres everything for it to work

fiery arrow
#

big fixes 5253_BonesDancer

cinder jolt
#

note that "update_every_frame" is very important lol

#

now time to write docs concern

proper dragon
#

Hearing the apparatus sound from LR actually work before it got pulled actually brought a tear to my eye

#

Lol

fiery arrow
cinder jolt
fiery arrow
#

It is? I have dev branch, disregard lol

merry sedge
#

I should start working on lr too

proper dragon
#

😂

#

I'm excited for this update, it's gonna fix so much

fiery arrow
#

Can you just post an example of all the json changes? I dont want to wait for the whole docs to be updated to start writing

cinder jolt
# merry sedge I should start working on lr too

https://github.com/LoafOrc/loaforcsSoundAPI/releases/tag/1.0.0beta4

{
    "update_every_frame": true,
    "replacements": [
        {
            "matches": "MeltdownHandler:music",
            "sounds": [
                {
                    "sound": "meltdown_inside.ogg",
                    "condition": {
                        "type": "PlayerLocationType",
                        "location": "inside"
                    }
                },
                {
                    "sound": "meltdown_outside.ogg",
                    "condition": {
                        "type": "PlayerLocationType",
                        "location": "outside"
                    }
                }
            ]
        }
    ]
}

im gonna start writing docs now but haven't got long before i need to do stuff. theres also "on_ship"

GitHub

final strech 🙏
this version includes full support for "update_every_frame" which lets you change what clips are playing on a source at runtime, i'll be writing some docs soon to help....

cinder jolt
proper dragon
#

Now push it on TS, can't wait to see everyone pog out about the LR sounds that didn't work before lol

cinder jolt
#

yeah theres a good chunk of code just dedicated to playOnAwake sounds lol, hopefully there is no more

fiery arrow
#

I noticed a minor issue when playing with football, that being my Low/HighAction sounds are music, and it sounds a bit out of place when football triggers it. Any way to check whats causing the "stress level" to increase?

cinder jolt
#

probably not unfortunately

fiery arrow
#

Look into it at some point please

#

If there's a way to check you could even do custom tracks for every creature, so id say it'd be worth a small headache to implement

cinder jolt
fiery arrow
#

Is randomizing playonawake sounds while they're already playing possible?

cinder jolt
fiery arrow
#

As in I have two variations of a playonawake sound, and I want it to randomly pick one every time it gets to the loop point

cinder jolt
#

im not totally sure about looping sounds, they might need a bit more attention

fiery arrow
#

Did you fix this typo by chance?

cinder jolt
#

no its fixed now

#

just gotta write some more docs on the range operator (definitely not stolen from minecraft)

#

also i refined the names a little bit more so you may need to change what is in there

fiery arrow
#

Is this right?

cinder jolt
#

what are you trying to do? also it needs to be inside "config"
you have:

"config": {
    <entry>
},
<entry>,
<entry>

the correct way is:

"config": {
  <entry>,
  <entry>,
  <entry>
}

notice how everything is inside the curly braces of config

fiery arrow
#

Having a yes/no toggle for music

cinder jolt
#

yeah thats the correct layout but you'll need to change "EnabledSounds:Menu" to be different, otherwise it will have no way to tell them apart

#

if you want to have different variations of music there's a better way now as well

fiery arrow
#

Would I need two replacers, one with music one with non-music alternatives?

cinder jolt
#

nope i removed that restriction, almost everything can have a condition one sec

#
{
    "condition": "conditions can go here",
    "replacements": [
        {
            "matches": "MeltdownHandler:music",
            "condition": "here",
            "sounds": [
                {
                    "condition": "and here"
                }
            ]
        }
    ]
}
#

also if you plan on having varaitions for the music via config theres a better way than what the lc team had to do

fiery arrow
#

No variations yet thankfully

cinder jolt
#

i've gotta go for now, ive got all the docs written and i can respond to questions in a bit

fiery arrow
#

How would I arrange it to have music and non-music in the same replacer but still have the toggle? Like this?

cinder jolt
#
{
    "replacements": [
        {
            "matches": "MeltdownHandler:music",
            "condition": "non-music config",
            "sounds": [
                {
                    
                }
            ]
        },
        {
            "matches": "MeltdownHandler:music",
            "condition": "music config",
            "sounds": [
                {
                    
                }
            ]
        }
    ]
}

i think this is what you mean?

fiery arrow
#

Yeah that looks more right lol

#

Would I need the condition on all of these or just the first of the batch?

cinder jolt
#

yeah if its some of them

#

otherwise you could do one on just the whole replacer

fiery arrow
#

Then I would need a replacer for music and non-music right?

cinder jolt
#

yeah

#

depends on how you wanna do it

fiery arrow
#

Which would be more performant here? 30 or so in one replacer, or 15 in two replacers?

cinder jolt
#

techincally 2 replacers is slightly worse

#

but in reality it doesnt matter

fiery arrow
#

I would need to have a condition check on every of those 30 sounds

cinder jolt
#

yes on each one of the replacments

cinder jolt
fiery arrow
#

That'd mean it just stops checking for those sounds until reloaded right?

cinder jolt
#

would save a bunch of time

#

anyway gtg

fiery arrow
#

Is the "player is holding item" condition here yet?

cinder jolt
#

nah thats actually crazy

lament drift
#

is that low or high

cinder jolt
#

it was at 12 seconds before i redid it

mortal nymph
#

load times are boutta be crazy fast

lament drift
#

whats the diff

cinder jolt
# lament drift whats the diff

i used to just send off a secondary thread to do some work. changed it over to use a thread pool and just spread out the work more lol

#

still probably not the best considering im not totally sure what im doing with c# multithreading but works fine

cinder jolt
#

alright pushed the update to thunderstore hoping everything doesn't break 🙏

dark crypt
#

Looking forward to messing with it later

low sand
#

Oooo does this mod allow to change the different times of day tunes?

#

For only a specific moon

fiery arrow
low sand
#

wth I’ve got to learn how to do this

proper dragon
#

@cinder jolt is there a bug with SoundAPI again where voice chat doesn't work? We have someone who can't talk while landed

fiery arrow
#

What did I mess up here?

    "randomness": {
        "type": "deterministic"
    },
    "condition": {
    "type": "config",
    "config": "Mods:CompatibilityFootball",
    "value": true
    },
    "replacements": [
        {
            "matches": [
            "FootballPref:PlayerFollower:Shirobon - Opia_loop",
            "FootballPref:PlayerFollower:Shirobon - On The Run_loop",
            "FootballPref:PlayerFollower:Shirobon - Shibuya_loop",
            "FootballPref:PlayerFollower:Shirobon - This Love_loop",
            "FootballPref:PlayerFollower:Shirobon - Fight For You_loop",
            "FootballPref:PlayerFollower:Shirobon - Pure_loop",
            "FootballPref:PlayerFollower:Shirobon - My First LSDJ_loop",
            "FootballPref:PlayerFollower:Shirobon - Chiptuna_loop",
            "FootballPref:PlayerFollower:FLIPPENDO - Love Is Insecurable REMIX_loop",
            "FootballPref:PlayerFollower:KENTENSHI - paranoia_loop",
            "FootballPref:PlayerFollower:Jredd - Blip Shards (DS-10)_loop",
            "FootballPref:PlayerFollower:Lunar Synthetic - Vex_loop",
            "FootballPref:PlayerFollower:Kittenji - LSDJ Shop_loop",
            "FootballPref:PlayerFollower:Lethal Company - Jester Song"
            ],
            "condition": {
            "type": "config",
            "config": "Music:DMCAMusic",
            "value": false
            },
            "sounds": [
                {
                    "sound": "Compatibility/FootballMusicSpaceBoy.ogg",
                    "weight": 20
                },
                {
                    "sound": "Compatibility/FootballMusicGAS.ogg",
                    "weight": 20
                },
                {
                    "sound": "Compatibility/FootballMusicDejaVu.ogg",
                    "weight": 20
                },
                {
                    "sound": "Compatibility/FootballMusicNightOfFire.ogg",
                    "weight": 20
                },
                {
                    "sound": "Compatibility/FootballMusicDancing.ogg",
                    "weight": 20
                },
                {
                    "sound": "Compatibility/FootballMusicRunningInThe90s.ogg",
                    "weight": 20
                },
                {
                    "sound": "Compatibility/FootballMusicDontStopTheMusic.ogg",
                    "weight": 20
                },
                {
                    "sound": "Compatibility/FootballMusicNightOfSecrets.ogg",
                    "weight": 1
                }
            ]
        },```
jovial ingot
#

Every time I have these warnings it is causing major stutters

fiery arrow
#

This doesnt seem right either

cinder jolt
#

if it is then its probably not soundapi

cinder jolt
#

oh might help if i register the conditions 💀

fiery arrow
#

💀

cinder jolt
#

alright 1.0.3 will fix it

fiery arrow
cinder jolt
#

uhh yeah ill get some debug logs for those one sec

wanton pine
#
ArgumentNullException: Value cannot be null.
Parameter name: key
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x00008] in <787acc3c9a4c471ba7d971300105af24>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].set_Item (TKey key, TValue value) [0x00000] in <787acc3c9a4c471ba7d971300105af24>:0 
  at loaforcsSoundAPI.Behaviours.AudioSourceReplaceHelper.OnEnable () [0x00000] in ./Behaviours/AudioSourceReplaceHelper.cs:32 
UnityEngine.GameObject:Internal_AddComponentWithType(GameObject, Type)
UnityEngine.GameObject:DMD<UnityEngine.GameObject::AddComponent>(GameObject, Type)
UnityEngine.GameObject:AddComponent()
loaforcsSoundAPI.<>c:<Awake>b__11_0(Scene, LoadSceneMode) (at ./SoundPlugin.cs:107)
UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)

(Filename: ./Behaviours/AudioSourceReplaceHelper.cs Line: 32)```
cinder jolt
#

i fixed it in 1.0.3

#

nvm thats in onenable

wanton pine
#

I'm on 1.0.4

cinder jolt
#

god damn it im gonna explode

#

it wont be breaking anything so

hollow basin
cinder jolt
#

its fixed in 1.0.5

hollow basin
#

im on 1.0.5 👻 yeah ok we're still on 1.0.0

heavy mist
#
[01:09:31.9883599] [Debug  :me.loaforc.soundapi] [Multithreading] Thread finished. 0 actions are left.
[01:09:31.9933468] [Debug  :me.loaforc.soundapi] [Multithreading] Thread finished. 0 actions are left.
[01:09:32.0272561] [Debug  :me.loaforc.soundapi] [Multithreading] Thread finished. 0 actions are left.
[01:09:32.1215100] [Debug  :me.loaforc.soundapi] [Multithreading] Thread finished. 0 actions are left.
[01:09:32.1743686] [Debug  :me.loaforc.soundapi] [Multithreading] Thread finished. 0 actions are left.
[01:09:32.1743686] [Info   :me.loaforc.soundapi] [Multithreading] Multithreading finished. JoinableThreadPool ran for 260288 ms.

🫠
Not that bad every startup tho. According to debug logs actions are finished within a few seconds and then I get like 3-4min of 100% cpu load thermal stress test

cinder jolt
#

try decreasing the amount of threads in the config?

soft axle
cinder jolt
soft axle
#

Oh gotcha!
Thank you!

#

Im having ab unch of random errors and it can be hard to discern what is real and not sometimes.
I should still try to figure out the cause though

proper dragon
cinder jolt
#

its probably a base game thing

fiery arrow
#

There a reason why every entry seems to have two?

cinder jolt
fiery arrow
#

so which one is correct? lol

cinder jolt
#

just dont worry about them

fiery arrow
#

Well I do kinda want to log a few of them down, yknow?

proper dragon
random rose
#

So apparently of this mod gets updated to any version above 0.1.3 it just completely crashes my computer somehow, and downgrading it makes it work just fine

#

On the newest it just hangs my computer for a good few mins before it actually loads

fiery arrow
#

Probably something to do with the threaded loading

random rose
#

Possibly

mortal nymph
#

sounds like it's gonna be a pain in the ass for bongo to figure out, the typical issue of it working on the dev's pc but not on others' 😭

random rose
#

Weird, it does the same thing with multithreading disabled in the config

cinder jolt
#

the other config option there

random rose
#

Yeah ill do that when I get back control of my pc lol

cinder jolt
#

the multithreading config option doesn't actually disable multithreading, it just forces it to wait for the threads to finish before letting other mods run

#

should make that clearer or just do the intended behaviour lol

random rose
#

Dropping thread count from 32 to 16 makes it much more manageable

#

And loads quicker for me

cinder jolt
#

yeah i kinda wanted to make it automatic but idk

#

btw 4 threads is perfectly fine (it was actually the old default)

random rose
#

i dropped it to 8 because my cpu is 8 thread

cinder jolt
#

yeah that seems like the number i should be using

#

ill eventually get an update out for that

pallid marsh
#

might be worth testing with an unreasonable number of threads to see if you can reproduce the issue

cinder jolt
#

yeah kinda put 32 forgetting that not everybody has an expensive computer

cinder jolt
pallid marsh
#

I wouldn't have really expected it to given the Volatile.Read but I'm not entirely sure

#

Interlocked is basically just lower-level it seems like

#

Volatile.Read(ref f) is like

Interlocked.MemoryBarrier();
f
#

all that said, I think that it might be worth reworking the thread pool class to reuse threads

cinder jolt
#

yeah most definitely

pallid marsh
#

starting threads is costly, you might see a bit of an improvement in the loading time if you start x threads and then have them pull directly from the queue until it's exhausted

#

technically neither is really a thread pool since thread pools are persistent generally, but that's just semantics

#

I would refer to it as a parallel operations

cinder jolt
#

well i was using the c# thread pool but i wanted to join and block at the end of the chainloader

pallid marsh
#

right yeah

#

if you have your class spawn the threads and have those consume from the queue, you can implement your join as checking and yielding until all the actions are gone

#

I'm wondering what's causing the CPU spinning though, if it's hitting 100% usage across all cores that seems to indicate the threads themselves are spinning and not just the control one

#

if it's just one core doing it then it would make sense that the if(active >= max) continue; is causing it

pallid marsh
cinder jolt
pallid marsh
#

huh, curious

#

I wonder if it depends on what sound packs are installed, did you get a code from anyone with the issue?

cinder jolt
#

itd most likely just be lethal resonance as thats the most popular mod that uses this api

pallid marsh
#

hmm

#

another possibility is that it's hardware-dependent

cinder jolt
#

yeah probably

#

i also dont have bad hardware anymore so i cant test 😭

pallid marsh
#

would be curious what CPU brands you have vs them

#

well the fact that it locks up makes me think it might be something to do with the microcode optimizations

cinder jolt
#

okay whatever i did just then my computer did not like

pallid marsh
#

oh nice

#

it might be intermittent given that this is threaded tbf

#

did you just retry or did you change something?

cinder jolt
#

changed to

public void Start() {
    timer = Stopwatch.StartNew();

    for(int i = 0; i < Mathf.Min(max, ActionQueue.Count); i++) {
        new Thread(new ThreadStart(RunThroughQueue)).Start();

        SoundPlugin.logger.LogDebug("[Multithreading] Started thread " + i + "/" + max);
    }
}

public void Join() {
    SoundPlugin.logger.LogDebug("[Multithreading] Joined JoinableThreadPool.");
    RunThroughQueue();
}

void RunThroughQueue() {
    while(ActionQueue.Count > 0) {
        if(!ActionQueue.TryDequeue(out Action action)) {
            continue;
        }

        try {
            action();
        } catch(Exception ex) {
            SoundPlugin.logger.LogError(ex);
        }

        Thread.Yield();
        SoundPlugin.logger.LogDebug("[Multithreading] Finished processing an action.");
    }
}
#

basically tried to implement what you said

pallid marsh
#

is Join() being called here?

cinder jolt
#

join gets called about when the splash screens are over

#

one sec imma get a video

pallid marsh
#

oh, it might help to change it to while (ActionQueue.TryDequeue(out Action action))

#

(and remove the if statement calling TryDequeue)

#

it's fairly common for getting the count of a multithreaded queue to be inaccurate, not sure if that's what's happening here

cinder jolt
#

ah i was planning to look at that because it felt like i could do that

#

wasn't also entirely sure if that would return false if it somehow errored out though

pallid marsh
#

yeah it should only fail if the collection is empty

#

there's a race condition between two threads where one could read from Count and see it as 1, another reads and sees 1, then the first dequeues and sets Count to 0, second one dequeues and fails, continuing the loop

#

not sure if/how that would cause it to spin though

#

it should exit on the next iteration

cinder jolt
#

adding this delay helped a lot

pallid marsh
#

interesting...

#

do you have a copy of the game with debug enabled? it could give a clue as to what's causing the spinning if you can reproduce with VS attached

cinder jolt
#

no and i dont have time before i have to go unfortuneatly

pallid marsh
#

ah damn

cinder jolt
#

ill try when i get back

fiery arrow
#

On another note, the meltdown explosion sound doesn't seem to get picked up by soundapi

eternal portal
#

LR scripts might need updating if spelling was corrected but improper spelling isn't converted over to work?

fiery arrow
#

it would yeah

cinder jolt
#

should be like FacilityExplosion:final explosion

fiery arrow
#

Nothing in logs. The alarms and music wasn’t recorded either.

#

I tried to replace the explosion sound a while ago but never got it to work

cinder jolt
#

well i know for a fact replacing the music works

fiery arrow
#

Log levels set to all, everything else appeared fine

cinder jolt
#

@fiery arrow could you try FacilityExplosion:final explosion

#

i have the thing set to playonawake so cant wait for it to be related to that

fiery arrow
#

Exactly what I had concern

cinder jolt
#

ahh great more playonawake problems

#

im gonna implode

heavy mist
# cinder jolt try decreasing the amount of threads in the config?

that helped a bit I think but there's still something going on occasionally. I'd say even with an unreasonable amount of threads my system shouldn't be freezing to where I can't move my mouse cursor or see any display updates for several minutes. It behaves like running a benchmark/stress test on windows realtime priority. 9700k, 8cores no Hyperthreading (4.8GHz).

warm grotto
#

OccludeAudio.Update error got spammed a couple thousand times in my log while testing my mod list concern

hollow basin
#

i’ve had that happen prior to the 1.0.0 update

#

usually when i end/exit the game lobby and come back to the main menu

#

i didn’t notice any obvious issues ingame. when i loaded into a lobby again, the error spam stops.

#

i wasn’t too sure which mod was causing it, but i didn’t bother looking into it since it wasn’t causing noticeable issues and i already have my hands full with more blatant bugs from other mods.

#

never had any audio issues

warm grotto
#

Yeah, I didn't notice anything breaking on my end either. Just got worried about whether or not it's a problem I should try to fix or not

cinder jolt
cinder jolt
heavy mist
cinder jolt
pallid marsh
#

yeah, if you're able to get the freeze with VS's Unity debugger connected you can pause execution and check what each thread is doing, should tell us what's going on

jolly garnet
#

bro doesn't know about Task 💀

pallid marsh
#

eh?

fiery arrow
fiery arrow
#

the sound a mask makes when it takes control of you after youve held it up to your face for long enough is also not logged @cinder jolt

cinder jolt
fiery arrow
#

@cinder jolt yeah im noticing more and more sounds not being picked up

Hoarding bug has nothing in console, football has nothing in consolee

#

Sounds are still getting replaced, so I think you just messed up logging :P

snow solar
snow solar
#

The SoundAPI wiki is confusing to me and im just trying to change the masked enemy audios

cinder jolt
#

whats confusing about it? have you gotten a sound pack to be registered?

snow solar
#

I have the basics down of making a simple sound pack, but the rest is confusing like idk how to add the config parameter, im guessing its another .json file but idk

#

And my soundpack.json didnt generate a config file?

cinder jolt
#

you define a config under your soundpack.json

cinder jolt
cinder jolt
#

eg heres the soundpack.json from lr

{
    "name": "LethalResonance",
    "load_on_startup": ["menu"],

    "config": {
        "EnabledSounds:menu_theme": {
            "description": "Enable LR menu theme? (AbientPackMusic compatible)",
            "default": true
        },
        "EnabledSounds:ambience_music": {
            "description": "Enable LR main ambience music? (AbientPackMusic compatible)",
            "default": true
        },
        "EnabledSounds:day_music": {
            "description": "Enable LR main day music? (AbientPackMusic compatible)",
            "default": true
        },
        "EnabledSounds:scanner_pixel": {
            "description": "Enable Pixel Scan? (Ensure moroxide_scan is disabled to make it work)",
            "default": false
        },
        "EnabledSounds:scanner_moroxide": {
            "description": "Enable Moroxide Scan? (Ensure pixel_scan is disabled to make it work)",
            "default": false
        },
        "EnabledSounds:menu": {
            "description": "Enable LR menu sounds?",
            "default": true
        },
         "EnabledSounds:ambience_inside": {
            "description": "Enable LR interior ambience sounds?",
            "default": true
        },
snow solar
#

Where would i find the config file

cinder jolt
#

in the regular config spot

cinder jolt
#

im doing other stuff migth be able to get to it later

snow solar
#

What can i add to the audio happen more frequently

cinder jolt
#

weight only applies to your replaced sounds

#

youre only replacing one sound

#

so if the game plays MaskCry2 it wont be replaced

snow solar
#

But my different sounds are playing?

#

How would i fix it then

cinder jolt
#

two ways:

#
  1. duplicate it and just change the matches (bad, copy and pasting code)
    or
#
  1. change matches to do multiple matching tutorial
snow solar
#

so id basically do this:

"matches": ["VoiceSFX:MaskCry1", "VoiceSFX:MaskCry2", "VoiceSFX:MaskCry3", etc, etc]
"sounds": < sound1, sound2 >

#

Cause i have different sounds for different matches

cinder jolt
#

yeah

#

exactly

snow solar
#

and the weight would then actually matter?

#

and so i dont forget, how would i then pack this to upload?

fiery arrow
cinder jolt
mortal nymph
snow solar
#

Does this look somewhat right?

cinder jolt
# snow solar Does this look somewhat right?

the sounds fields are wrong, should look like

{
    "sound": "maskedenemy/MaskCry.wav"
}

not just maskedenemy/MaskCry.wav
also if everything has the same weight; weight doesn't matter so you could remove it here

snow solar
#

Is there something I can add to make each sound play more frequently? Like whenever they move it can play the audio

snow solar
#

Like the sounds the masked enemies dont play as often as i want, is there a command or code i can add that makes the sounds play more often

cinder jolt
#

like the vanilla sounds still playimg?

#

if that happens you havent told soundapi to replace them

snow solar
#

No the modded sounds are playing but i want them to play more often

#

Like a zombie that cant shut up

cinder jolt
#

no that isnt possible

snow solar
#

Dang

snow solar
#

How do i make it networked perceive

cinder jolt
#

there is techincally a way but it probably isnt worh it

snow solar
#

So i should just upload it to thunderstore then?

fiery arrow
snow solar
#

That sounds hard

dark crypt
#

It's the same thing you've presumably already done, just using their footsteps instead

fiery arrow
#

The most you'll have to do is combine the footstep sounds with whatever sound you want to add into a single sound file

snow solar
#

how soperceive this mod has been making me want to wind the jester up yk

fiery arrow
mortal nymph
#

hi i'm james woods hi i'm james woods hi i'm james woods hi i'm james woods

mortal nymph
snow solar
#

Im more of a visual learner so this stuff is really confusing since theres not that many guides outwhar

jolly nova
#

Same so I have no idea what I'm doing here lol, after moving things around quite a bit this finally didn't produce any errors in the console but it's still not working. What's the proper format for conditions supposed to be? (sorry if it's a mess, very little programming experience here HehDead )

{ "condition": { "type": "LethalCompany:player_location", "value": "inside" }, "replacements": [ { "matches": "MeltdownHandler:music", "sounds": [ { "sound": "MELTDOWN.wav" } ] } ], "condition": { "type": "LethalCompany:player_location", "value": "outside" }, "condition": { "type": "not", "condition": { "type": "PlayerLocationType", "value": "on_ship" } }, "replacements": [ { "matches": "MeltdownHandler:music", "sounds": [ { "sound": "OUTSIDEMELTDOWN.wav" } ] } ], "condition": { "type": "LethalCompany:player_location", "value": "on_ship" }, "replacements": [ { "matches": "MeltdownHandler:music", "sounds": [ { "sound": "SHIPMELTDOWN.wav" } ] } ] }

cinder jolt
# jolly nova Same so I have no idea what I'm doing here lol, after moving things around quite...
{
    "update_every_frame": true,
    "replacements": [
        {
            "matches": "MeltdownHandler:music",
            "sounds": [
                {
                    "sound": "meltdown_inside.ogg",
                    "condition": {
                        "type": "PlayerLocationType",
                        "location": "inside"
                    }
                },
                {
                    "sound": "meltdown_outside.ogg",
                    "condition": {
                        "type": "PlayerLocationType",
                        "location": "outside"
                    }
                }
            ]
        }
    ]
}

the conditions go in the same place as the sounds, make sure to enable update_every_frame as well

jolly nova
#

Noted, thanks

#

Figured I'd see if I can do a sort-of workaround and share it while waiting for the official port to come out, will see what I can do

jolly nova
cinder jolt
#

oh yeah i changed it but i havent changed that example lol

jolly nova
#

ahh, so that's an old way that isn't applicable anymore then?

cinder jolt
#

yeah i just changed the names

#

also its not location anymore its value

jolly nova
mellow shoal
#

@cinder jolt
Heyo Bongo!
Question for you. Is it possible to use LoaforcsSoundAPI to change the sounds on a specific moon or interior? If not, could this be done?

cinder jolt
#

yes

mellow shoal
#

I ask because I would like to change the skins and sounds of certain Monsters in Shattered Company based on locale.

mellow shoal
mellow shoal
# cinder jolt yes

Would you mind if I bug you when you have time, maybe on the weekend to figure out how to do that?

cinder jolt
#

yeah thats fine

merry sedge
#

I've been doing the LR Meltdown port

#

But it seems that I've got some issues, can you help me?

fiery arrow
#

dont ask to ask my friend

merry sedge
#

k, I think there's a overlap with the main Facility Meltdown sounds and the LR Meltdown

#

The explosion sound can't be heard

#

And the tester didn't found any difference about location sounds

cinder jolt
jolly nova
#

@cinder jolt So I've managed to make it work to a certain extent - if I can get it to keep the folder structure... I've tried uploading the package twice now but whenever I try installing it with r2modman it takes everything out of the subfolders, which makes your mod not recognize it. It just says something like "Congrats you've made a sound pack, continue following the tutorial to learn how to add sounds!" or something. With the proper folder structure it doesn't do that though, it seems to load up fine. I know it uploaded okay online because if I manually download it off the page the folders are there, so I have no idea what the deal is. Maybe r2modman just doesn't like me, I don't know.

cinder jolt
#

what does the folder structure look like?

jolly nova
#

I just copied what you had in your example and what I saw from Lethal Resonance, main pack contents with the main folder, the sound pack json and sounds and replacers folders in the main folder

#

the final json in replacers

cinder jolt
#

youve gotta do BepInEx/plugins/CustomMeltdownMusic

jolly nova
#

right, it's under BepInEx/plugins

#

no idea how it goes from that to this, i mean i took those screenshots right from the zip, is there some reason a mod manager wouldn't keep it like that? double checked all the uploading instructions and i'm pretty sure i didn't miss anything...

cinder jolt
jolly nova
#

ohh wait i get it now, thanks for the visual structure there. gotta rename the stuff like that. got it.

queen shale
cinder jolt
#

ah yeah ig that makes sense

thorny star
#

I assume its nothing but its still worrisome

fiery arrow
cinder jolt
#

terrria 😋

cinder jolt
merry sedge
cinder jolt
#

like the sound replace?

#

can i see the replacer?

merry sedge
#

sure

proper dragon
#

@cinder jolt New SoundAPI update brokey

#

I got the main menu theme to play for like 1 second then pure silence

cinder jolt
#

god damn it

#

ill have to fix it later

#

playing content warning with friends

fiery arrow
#

the entire menumanager object commits die when loaded for longer than 1 second

formal token
#

so... do I.... update? ... .,.

#

Y'know-... I'mma play it safe 'n probably put a pause on updating basically everything until 50 drops 😅 ...

fiery arrow
#

only update if you need to get logs, otherwise dont

proper dragon
#

@cinder jolt a lot of sounds don't work properly after the new update what did you do? I had a lot of times where footsteps were silent, and turrets were silent etc

cinder jolt
#

i moved some stuff around quickly to help some errors on content warning

#

probably broke stuff

proper dragon
#

You broke it lol maybe you should push an update that reverts back to previous build XD

cinder jolt
#

nah cause it works on content wraning for some reason but not lc

proper dragon
#

Well then maybe revert LC build?

proper dragon
#

I love how it just so briefly plays the main menu theme then it's like "No more"

#

@dark crypt Also had issues with stuttering on her end when audio issues happened btw

dark crypt
#

Yeah my game froze up multiple times, I started losing sound effects at times, and someone else was completely deaf for a bit

proper dragon
#

Yeah

cinder jolt
#

try 1.0.7 then

dark crypt
#

"Okay I pull up" instantly plays in my head every time

proper dragon
#

I notice you didn't post a changelog for 1.0.7 btw

cinder jolt
#
  • reverted changes made for content warning in lc build
proper dragon
#

I wonder why the changes broke for LC, Content Warning must just work differently

cinder jolt
#

lc and content warning's sound system are very different lol

#

you know those null warnings about OnSceneLoaded, literally my entire console was full of those in content warning

proper dragon
#

@cinder jolt SoundAPI still seems to be bugged

#

when going back to the main menu menu sounds stop working