#plugins-dev-chat

1 messages · Page 55 of 1

unique crane
#

Give source

#

NOW

upper vapor
#

soon™

#

in about 5 days

restive turret
#

Neat trick:
stream.Read

upper vapor
unique crane
teal junco
#

you used NAudio to stream the mp3 right?

upper vapor
#

yep

teal junco
#

why did AudioPlayerApi use Nvorbis over Naudio?

upper vapor
#

cuz it was easier

#

much easier

teal junco
#

i dont know anything about audio so im curious

teal junco
upper vapor
#

playing float arrays isn't as complicated as a sample provider

#

don't look at the AudioTransmitter in LabApi ClassD_Hollow

upper vapor
#

streaming from disk has pretty much no overhead

#

also with AudioPlayerApi you must provide a 48000Hz mono ogg file which is a bit ehhh

teal junco
#

i use C# tasks to load instead

unique crane
#

I just load them all at start

upper vapor
#

you can resample with WDL and mixdown to mono

upper vapor
teal junco
#

while that isnt ideal it at least doesnt freeze the server

restive turret
#

Ye sure

teal junco
upper vapor
#

what do you load

teal junco
#

i push the loading of the audio in AudioPlayerApi onto another thread

restive turret
#

My

restive turret
#

A 2 hour long Unreal Tournament music

teal junco
#

if i need to load it immediately, i just load it on another thread so that in the case it takes a significant amount of time, the TPS doesnt drop to 0

upper vapor
restive turret
#

Preload deez

unique crane
upper vapor
teal junco
restive turret
#

Making the server suffer more🔥

teal junco
#

no way am i loading that on startup or having that in memory

upper vapor
restive turret
#

Nice

unique crane
#

Yeah thats fair

teal junco
restive turret
#

Preloading 50 fart noises

upper vapor
#

yep

upper vapor
teal junco
upper vapor
#

why do you need 2K clips

unique crane
#

What do you use the 2K clips for

restive turret
teal junco
#

i deal with two thousand clips, thats why i dont want to load it at startup

upper vapor
#

but why

#

what for

restive turret
#

Ambiance

teal junco
#

so that my cassie can say the top one thousand names in the United States

#

is that a satisfactory answer

restive turret
#

That's secret lab

upper vapor
#

😭

teal junco
unique crane
#

Factorio

restive turret
unique crane
teal junco
#

no i think i should let him live

restive turret
#

Just to suffer

teal junco
#

hes a smarter programmer than me, i need to let him make another plugin before i kill him

teal junco
#

no i object to the use of AI except for that one time

restive turret
#

AI as

#

Bot

#

Not like

#

LLM

unique crane
#

AI voiceovers for some songs are quite funny

restive turret
#

Uhh

#

Nyah

teal junco
unique crane
#

It is creepy

#

but markiplier singing fnaf 1 song is funny

upper vapor
restive turret
#

Ban this guy

unique crane
upper vapor
#

ye

unique crane
#

💀

restive turret
#

💀

unique crane
#

Wait

teal junco
#

as an alternative to streaming MP3s i was going to have my plugin utilize yt-dlp-dotnet to download the entire audio file, then load it into audioplayerapi, and then play it

unique crane
#

@teal junco

#

If 1K is the USA names

teal junco
#

i think it is an amazing system and is very efficient

unique crane
#

whats the other thousand

upper vapor
restive turret
#

Explode

#

Deez

#

Videos

teal junco
# unique crane whats the other thousand

well, its more like 3-4 thousand.
I have the base game cassie words, and then i have top 1 thousand surnames, top 1 thousand male names, and top one thousand female names (which goes to 2.7k when i exclude the duplicates, so about 3 hundred names that belong to more than one group)

unique crane
#

So you just.... rewrote cassie

restive turret
#

Yes

#

He did

teal junco
#

i also have all US states, i have a collection of vulgarities, and some other stuff i dont recall

restive turret
#

Collection of swear words

teal junco
#

the plugin is probably my biggest project ive ever made so far and it was painful

#

i dont even know how it functions

restive turret
#

I didn't checked it but it might be ye

restive turret
#

With magic and friendship

teal junco
restive turret
#

Your code

unique crane
#

I would load these clips dynamically at runtime

#

like they arent that long

teal junco
#

i had to make special text formatting for the tts to correctly readout

upper vapor
#

ohlahoma

teal junco
restive turret
teal junco
# upper vapor ohlahoma

i just wanted to cram in as many words as possible, i dont even know if i used the US states

#

it was just funny hearing cassie with a different voice saying unhinged shit

upper vapor
upper vapor
restive turret
upper vapor
hearty shard
#

hi pai

restive turret
#

Pog

#

Thanks JesusQC

limber silo
#

no worries

hearty shard
#

jesus can you release 2.0.0 yet

#

or 15.0

#

or 21.0

solid mica
#

or 69.0

limber silo
#

there is already so much [obsolete] stuff in the api so I wouldnt be surprised if we release 2.0.0 not so far away

true cedar
hearty shard
restive turret
#

Also x3rt's one is actually 🔥 addition

hearty shard
#

@limber silo is there role wrappers pr currently in internal labapi ?

#

i might pr it otherwise

restive turret
#

I don't think u have role wrapper

hearty shard
#

well idk!!!!!!

#

thats why i asked jesus!!!

limber silo
#

there is, sadly the developer working on them is busy for a few weeks, so dont expect them soon

hearty shard
#

okie

restive turret
#

First they would need to make some constants not const so can change these small things

hearty shard
#

finally

restive turret
#

No

hearty shard
#

yes!!!!

restive turret
#

I wanna change cooldown!

hearty shard
#

noo...

#

u dont need it

restive turret
#

I need it

#

That's why i patched it

grave eagle
#

Please add textures to the primitives. They are easy to implement)

upper vapor
#

if they're so simple, PR them toomuchtrolling

grave eagle
#

-# no 🗿

upper vapor
restive turret
grave eagle
restive turret
#

Oh

#

Well

#

Have funFear

upper vapor
#

i wonder how optimized that is

restive turret
#

None

grave eagle
#

It's unclear whether they will use materials or textures. The materials look beautiful

upper vapor
#

at this point they might as well add AssetBundle support

grave eagle
#

We can create a Hubert ball with Hubert texture

main zenith
#

why does

                 ServerSpecificSettingsSync.TryGetSettingOfUser<SSTextArea>(
               player.ReferenceHub,
    MainCosmetics.Instance.Config.TextID,
    out var setting
); 
``` always gives null?
im trying to update TextArea content 

new SSTextArea(AbilityId.TextId,"...",textAlignment: TMPro.TextAlignmentOptions.Center)

the AbilityId.TextId = MainCosmetics.Instance.Config.TextID
but still always null
icy knoll
#

when you get by ID that is setting id

#

oh right they match

#

hmm

unique crane
#

GetSettingOfUser

#

Try that

#

Ah so

#

User has to send any value back to server

#

for this to work

#

(???)

hearty shard
#

yes.

#

i had to fix this weirdly in secret api

unique crane
#

Just use GetSettingOfUser<T>

#

its guarantee to create the setting if it doesnt exists yet

hearty shard
#

does it

unique crane
#

yep

hearty shard
#

i

#

dont like you

#

personally

#

i create the setting when its sent to the player

unique crane
#

Thats one way to do it

hearty shard
#

this monstrousity

#

i cant spell that word

#

anyway

main zenith
main zenith
unique crane
#

Just use the GetSettingOfUser

upper vapor
icy knoll
#

yours is/will be better

#

just

#

we actually kinda need the plugin to test that fact

#

LOL

upper vapor
#

Oh this thing has group chats

#

HSM required

true cedar
#

i think it doesnt have like

#

im dumb

upper vapor
#

Look

#

Lol

#

Competence isn't bad though :3

restive turret
icy knoll
#

someone added RueI support to their HSM plugin

#

rather than adding configurations

#

they just made a branch

upper vapor
#

What

icy knoll
#

completely recoded their whole plugin on that branch for ruei only

#

so now they have to maintain 2 brances

#

LOL

restive turret
#

Fire

upper vapor
#

RueServiceMeow

restive turret
#

What is hsm

icy knoll
#

hint service meow

restive turret
#

Hardcore SL Map

upper vapor
icy knoll
#

it's like ruei, but tbh the syntax is pretty crap 😭

icy knoll
#

full on ruei version

upper vapor
#

Wtf

icy knoll
#

anyway

#

when scp prox chat labapi by axwabo?

upper vapor
lost burrow
upper vapor
#

it's impressive actually

#

not the usual simple scp prox chat

icy knoll
upper vapor
#

click it Smart

restive turret
#

Today 10:53

icy knoll
#

not the day

#

smh

hearty shard
#

it

restive turret
#

Today

hearty shard
#

was sent today

icy knoll
#

oh wait it was today?

hearty shard
#

...

restive turret
#

Ye

hearty shard
#

LUMI.

icy knoll
#

HOW WOUKD I KNOW

#

GRRRRRR

upper vapor
#

because it doesn't say yesterday or a date

icy knoll
#

shud up

upper vapor
#

you can hover it

restive turret
#

Blind girl

hearty shard
icy knoll
hearty shard
#

nuh uh

upper vapor
#

then tap it

icy knoll
#

smh

restive turret
upper vapor
#

yes

#

Pannon-Víz

restive turret
#

Shaking my LabApi-Tree

#

Getting nice fruits (plugins) from jt

forest sentinel
#

What could be the reason for pickup following lagy?
its client parented to player
what i tried ?

rigibody.isKinematic = true;
rigibody.useGravity = false;
pickup.Base.syncInterval = 0f;
pickup.Transform.parent = Player.Transform;

Shouldn't client parenting normally resolve this?

terse bone
#

clientside parenting only works for admintoys ig

upper vapor
soft turtle
#

How do I know which grenades were activated due to another grenade exploding?

forest sentinel
unique crane
soft turtle
terse bone
#

you can do a postfix on InventorySystem.Items.ThrowableProjectiles.TimedGrenadePickup::OnExplosionDetected
and inside patch check if __instance._replaceNextFrame is true

#

you would probably want to add that pickup instance to a List to and somewhere else check if it's in it

#

just don't forget to remove that pickup from the list and clear the list between rounds

#

hm, sory, don't store the pickup instance

#

it will get destroyed, just store pickup's serial

soft turtle
terse bone
#
[HarmonyPatch(typeof(TimedGrenadePickup), nameof(TimedGrenadePickup.OnExplosionDetected))]
internal static class LimitGrenadeChainingPatch
{
    public static Dictionary<Vector3, int> _chainedGrenades = [];

    private static void Postfix(TimedGrenadePickup __instance, Footprint attacker, Vector3 source, float range)
    {
        if (!__instance._replaceNextFrame)
            return;

        if (!_chainedGrenades.ContainsKey(source))
            _chainedGrenades[source] = 0;

        int count = _chainedGrenades[source]++;

        if (count <= 10)
            return;

        __instance._replaceNextFrame = false;
        __instance._attacker = default;
    }
}

I think this should work

#

And in the ServerEvents.OnExplosionSpawned you can remove that key from the the dictionary

#

LimitGrenadeChainingPatch._chainedGrenades.Remove(ev.Position);

terse bone
soft turtle
# terse bone ```cs [HarmonyPatch(typeof(TimedGrenadePickup), nameof(TimedGrenadePickup.OnExpl...

I just noticed that you wrote... Unfortunately ThrownProjectile is cleared because of which it always returns 1. And I wrote the code like yours

        private static readonly Dictionary<Vector3, int> GrandeCount = new Dictionary<Vector3, int>();

        private static bool Prefix(Footprint attacker, Vector3 source, float range)
        {
            if (GrandeCount.TryGetValue(source, out int count))
            {
                count++;
                GrandeCount[source] = count;
            }
            else
            {
                count = 1;
                GrandeCount[source] = count;

                Timing.CallDelayed(0.1f, () => GrandeCount.Remove(source));
            }

            return count <= 10;
        }
#

XD

unique crane
#

Or you can patch the base method for explode

#

and count the triggered nades

#

IExplosionTrigger

terse bone
#

for me it works

soft turtle
unique crane
#

¯_(ツ)_/¯

#

works too

soft turtle
upper vapor
soft turtle
unique crane
#

let me check

upper vapor
#

Either I'm delulu or it used to exist

unique crane
#

dont see anything like that in gameplay config

celest thorn
#

Someone knows why this could be happening? im doing it with base game

royal mica
#

uhoh, are you doing funky primitve spawning?

upper vapor
#

missing dirty bits

celest thorn
upper vapor
celest thorn
upper vapor
celest thorn
upper vapor
celest thorn
#

to see what crazy shit i can do with it

upper vapor
upper vapor
#

that's vanilla

celest thorn
upper vapor
celest thorn
#

im joking but yea i understood let me check if its actually that

celest thorn
#

Hii david

unique crane
#

Hiii

celest thorn
#

how are you doing :3?

unique crane
#

yea good

celest thorn
#

nice to hear

celest thorn
#

because i tested and it works fine with previous code

restive turret
#

1C - 24

upper vapor
restive turret
#

Ye you missing a long

#

@celest thorn

celest thorn
#

Into a primitive???

#

Wait....

upper vapor
#

"guys idk why it breaks"
"show code"
"um"

restive turret
#

Or you have more of it

upper vapor
unique crane
#

and top level redacted

upper vapor
restive turret
#

You either missing or having more

upper vapor
#

but

#

dirty bits

restive turret
celest thorn
upper vapor
#

😭😭😭😭

celest thorn
#

i just wanna see what happens

restive turret
#

Crash? No network send?

#

You brun the client down

celest thorn
#

idk

#

just idk im going insane

restive turret
#

Didn't had to guess that part

royal mica
#

"guys I cannot drive the car"
"why"
"I replaced the driving shaft"

celest thorn
upper vapor
#

when
-# i know mirror is not websocket

upper vapor
unique crane
upper vapor
#

WS frame != TCP packet

#

you can just wait a few years for that frame to come in

unique crane
#

Its going to be a big one

restive turret
#

Like

upper vapor
#

better get the page file ready

unique crane
#

Your gonna get that big 10exabytes drive meanwhile

#

dont worry

upper vapor
#

yeah just hot swap it as the message is arrivin

upper vapor
#

how have i not seen this before

unique crane
#

yeah its me

#

XD

upper vapor
#

i thought it was

#

something

#

like literally something

unique crane
#

what

upper vapor
#

"your pfp is your pfp" type shit

#

i didn't pay attention to it

unique crane
#

Okay

restive turret
#

My is a spinning cat

upper vapor
#

yeah it's a hi cat

#

-# high

woeful geyser
#

I found a bug — can anyone recommend a good auto clicker or macro software so I can spam totally legitimate bug reports into beryls DMs?

celest thorn
#

buttons?

unique crane
woeful geyser
#

(I was absolutley shitposting to mess with beryl please forgive me)

upper vapor
#

Beryl is on break i believe

#

or something like that

woeful geyser
#

damn

unique crane
#

There are no vacations in Northwood

#

as there is no outside

restive turret
#

ahaa ye

fallen sentinel
#

true

#

thank you comrade David

restive turret
#

random hubert appeared

upper vapor
unique crane
#

thank you

fallen sentinel
#

now return to work

unique crane
#

Yes sir

restive turret
#

we need more events NOW

fallen sentinel
#

@woeful geyser send ging

woeful geyser
#

you know he’s on vacation

celest thorn
#

random hubert showup

woeful geyser
fallen sentinel
#

thank you

unique crane
#

cat

upper vapor
#

cat

fallen sentinel
#

cat

celest thorn
#

cat

woeful geyser
unique crane
#

Sneaky cat

restive turret
#

cat

celest thorn
#

Im trying to understand why its still happening

#

i cannot figure it out

#

Like nothing has changed

wheat jacinth
#

How to implement a plugin to the server?

upper vapor
#

who set the repo's description to be a modding framework
i'm not sure if you can call it that 😭

limber silo
#

hey

#

aren't plugins modifications to the game

#

making it a modding framework

upper vapor
#

okay...

celest thorn
#

Im honestly lost rn

#

I CANNOT understand why it doesn't work at all

#

and its just random asf the error

upper vapor
#

do you need emotional voice chat support

celest thorn
#

if you are down

upper vapor
#

i'm up

celest thorn
#

im just so fucking tired

limber silo
#

(trust)

restive turret
#

Syncing till i fake it

fallen sentinel
celest thorn
#

i wanted to make easy money ;(

limber silo
fallen sentinel
#

chatgpt supremacy

static osprey
#

i used duckduckgo ai lol

#

microsoft copilot seems to be closer but still hella broken

celest thorn
hearty shard
#

plugin api

upper vapor
#

forgot a keyword

hearty shard
#

that seems about right

#

give chat gpt the sl source code

fallen sentinel
#

^this is using advanced reasoning

harsh thorn
celest thorn
#

Works i guess

celest thorn
# fallen sentinel

hubert you want to become blind, you are already bald and make other people blind please don't make yourself blind too

celest thorn
fallen sentinel
#

I did use it

celest thorn
fallen sentinel
#

because you got more lucky

hearty shard
#

hubert my gf called u an egg, how does this make you feel

celest thorn
#

i guess

fallen sentinel
#

the beauty of LLMs is that you get different response every time you generate

celest thorn
celest thorn
#

HE JOINED

#

AND LEFT

hearty shard
#

david pls stop typing

#

this is not okay

fallen sentinel
#

this is exactly the same prompt and exactly the same model

celest thorn
#

too scared

unique crane
fallen sentinel
#

completely different answer

upper vapor
celest thorn
#

oh wait

hearty shard
#

i

celest thorn
#

hubert

hearty shard
#

put the wrong emoji

fallen sentinel
#

it even searched the web this time, previously it didn't

unique crane
#

You have to make it search web

#

otherwise it outputs NWAPI code

hearty shard
celest thorn
#

HUBERT WHAT DO YOU THINK ABOUT CAPYBARA THERAPY

#

@slender lynx

fallen sentinel
#

yeah but didn't search for the first time, despite using the exact same prompt and model

hearty shard
#

hubert pls ban zenlet, hes trying to defame me

fallen sentinel
#

for the second time it decided to search web on itself

unique crane
true cedar
hearty shard
#

also

#

ur a loser

#

anyway hi pai

upper vapor
celest thorn
#

nah hubert don't let me down answer please our projects depends on capybaras

hearty shard
#

and i guess misclicked

#

idk

#

😭

#

wrong emoji

true cedar
harsh thorn
mild ice
hearty shard
#

LUCID.

#

IM GOING TO PUNCH YOU

unique crane
#

Eve is so agressive today

hearty shard
mild ice
#

I'm just trying to tell the truth here

hearty shard
unique crane
#

Lucid

hearty shard
#

i do NOT

#

use that emoji

unique crane
#

please send her somewhere

#

remote island

hearty shard
#

pai might though

#

@true cedar

#

u need it

true cedar
#

im gonna kill u

hearty shard
#

do it u wont

mild ice
regal lakeBOT
#

I successfully removed Plugin Developer from obvevelyn

harsh thorn
#

all so agressive today

mild ice
#

Gone

harsh thorn
#

LOL

unique crane
#

XDDDDD

celest thorn
#

HAHAHAHAHAHA

royal mica
celest thorn
#

YES NO MORE NAMELESS

upper vapor
#

lmfaooo

celest thorn
#

W

upper vapor
#

deported

hearty shard
#

YOU CANT BANISH ME

#

THIS IS MY HOME

unique crane
mild ice
celest thorn
hearty shard
#

ur like

#

exiled #1 fan

celest thorn
hearty shard
#

i swapped before u im pretty sure

celest thorn
#

it took me alot because i was studying for my exams

hearty shard
#

just get better at the exams

celest thorn
hearty shard
#

get gud

celest thorn
#

so i wasn't scared

#

i just wanted a good grade

grand flower
#

Imagine still studying

celest thorn
#

90/100

grand flower
#

Or having touched exiled

restive turret
#

imagine stll living

grand flower
#

Dang you got me beat there

true cedar
hearty shard
slate flume
celest thorn
#

im going to cry

restive turret
#

What is happening in labapi channel

spring swan
icy knoll
slate flume
#

So

#

Am I being stupid

#

What is wrong here

true cedar
#

16 people in vc wtf

slate flume
earnest egret
#

um, sigma?

icy knoll
slate flume
#

You right

true cedar
restive turret
true cedar
#

is

#

this

#

guy

#

here

slate flume
icy knoll
#

yeah i guessed that :3

#

just thought id give you the better property

#

LOL

true cedar
#

what about it is broken

slate flume
#

It doesn't

#

Role sync

hearty shard
#

ReadyList gets npcs too

#

GetAll is fine

icy knoll
#

fr?

hearty shard
#

yes

earnest egret
hearty shard
#

i believe?

#

might be wrong slightly

icy knoll
#

id hope not

#

lol

hearty shard
#

but yeah GetAll is fine

hearty shard
#

if ur trying to do stuff without breaking server but also letting dummies yk act as dummies?

#

theyre meant to be fake players

icy knoll
#

hmm

true cedar
#

shit

slate flume
#

OH

#

Wait

#

I know

#

I'm just

#

Really fucking stupid

true cedar
#

like eve!

slate flume
#

SodaSpy was null 🤦🏼‍♂️

hearty shard
true cedar
dull temple
#

does changing the wave tickets still only change the starting tickets

lethal atlas
limber silo
#

it will be delivered with labapi's next release

dull temple
#

gotcha, thanks 🫡

teal junco
#

I can get a float array from NAudio right?

grand flower
#

Yeah

#

Whatcha trying to do

#

Oh btw new rules seem to make audio recording ok for your demo stuff so that's good

#

On the flip side you'll probably get the EU and any other country/state with privacy laws at your doorstep if you don't do it right, so still a nono

teal junco
grand flower
#

Yeah you can use NAudio for that

#

You'll need to encode it using VorbisEncoder iirc

#

before sending packets to players

teal junco
#

(i want to play a very large audio file in smaller chunks so i dont fuck up my memory)

#

i dont think ill be able to get this plugin in time tho so idk if i want to even start at this point

grand flower
#

I mean how big's the file

teal junco
grand flower
#

bruh

teal junco
#

thats why i wanna play it in pieces 😭

grand flower
#

in any case you can just use VorbisReader to read the file, it'll stream it in

#

and then VorbisEncoder to encode & send

teal junco
#

so that I can get readable chunks

grand flower
#

Pretty sure you can make it read as many samples as you want

#

It's what we do

#

Read X samples, encode & send, read more if we're under a threshold

teal junco
#

oh so i dont even need NAudio in this case?

grand flower
#

nop

#

VorbisReader will do the reading and VorbisEncoder the encoding needed by SL

#

You'll need NVorbis as a dependency, that's it

teal junco
#

uhm....

so I do
VorbisReader.ReadSamples(float[] samples, int offset, int samplestoread);
offset += samplestoread;
then i can use the vorbis encoder i have to encode the samples and then send it as an AudioMessage?

teal junco
#

i dont see a VorbisEncoder

grand flower
#

oop, yeah, you're right

#

OpusEncoder

grand flower
#

Offset should be 0

#

at all times

teal junco
#

the offset doesnt need to be specified

grand flower
#

It'll read from the first byte in the samples that way

#

Read it to a buffer, then push the read samples into a queue

teal junco
#

then when i dequeue, i encode it and send it as n audio message?

grand flower
#

yep

teal junco
#

each sample is a byte array right

grand flower
#

each sample is a single float

#

You'll need to encode multiple and send them

teal junco
#

oh

#

I think I can figure out a way to mod this into AudioPlayerApi

#

probably lazy but i want to have it by tomorrow

teal junco
celest thorn
#

Does someone know if with EntityStateMessage you can send multiple info like

Position, Rotation and Scale?

worthy rune
#

ESM can send any syncvar info for any network behaviour for the specified network identity

celest thorn
#

that are this ones

#
    public static void SendFakeUpdate(
        this Player target,
        uint netId,
        Type targetType, 
        ClientSide side
    )
    {
        string syncVarKey_Position = $"{targetType.Name}.NetworkPosition";
        string syncVarKey_Rotation = $"{targetType.Name}.NetworkRotation";
        string syncVarKey_Scale = $"{targetType.Name}.NetworkScale";
        using var observer = NetworkWriterPool.Get();
        
        Compression.CompressVarUInt(observer, 1UL);

        int lengthPos    = observer.Position;
        observer.WriteByte(0);
        int payloadStart = observer.Position;

        if (!SyncVarDirtyBits.TryGetValue(syncVarKey_Position, out ulong syncVarMaskPosition))
        {
            return;
        }
        
        if (!SyncVarDirtyBits.TryGetValue(syncVarKey_Rotation, out ulong syncVarMaskRotation))
        {
            return;
        }
        
        if (!SyncVarDirtyBits.TryGetValue(syncVarKey_Scale, out ulong syncVarMaskScale))
        {
            return;
        }

        var syncVarMask = syncVarMaskPosition + syncVarMaskRotation + syncVarMaskScale;
        
        //REMINDER 16 is when transform updates for AdminToys.
        bool isSecondWrite = typeof(AdminToyBase).IsAssignableFrom(targetType) && syncVarMask > 16;
        
        observer.WriteULong(0);
        observer.WriteULong(syncVarMask);
        
        if(isSecondWrite)
            observer.WriteULong(syncVarMask);
        
        if (!WriterExtensions.TryGetValue(typeof(AdminToyBase), out var writerDel))
        {
            return;
        }

        writerDel.Invoke(null, new object[] {observer, side.position, side.rotation, side.scale});

        if(!isSecondWrite)
            observer.WriteULong(0);
        
        int payloadEnd = observer.Position;
        observer.Position = lengthPos;
        observer.WriteByte((byte)(payloadEnd - payloadStart));
        observer.Position = payloadEnd;

        target.Connection.Send(new EntityStateMessage
        {
            netId = netId,
            payload = observer.ToArraySegment()
        });
    }

I tried making it like this, if i just do one value it works fine if i do multiple nope

worthy rune
#

yeah any amount of values works

celest thorn
#

the client doesn't reply with anything

#

and the server is sending

#

but client doesn't actually do anything

worthy rune
#

the only restriction is that they have to be associated with the network identity

worthy rune
celest thorn
#

i mean

worthy rune
#

ahh

celest thorn
#

like the client is fine, and the server is fine

#

but in reality nothing updates

restive turret
#

1uL

celest thorn
#

i checked Mirror but it should be fine

celest thorn
restive turret
#

You should set how many sync var you send

#

I think

celest thorn
#

let me check

#

lets see if 3 does the job

#

because syncvars are fine in total is 7

restive turret
#

Also idk if SyncVarMask is accurate

worthy rune
#

shouldnt need to write the number of sync vars, as thats apart of the mask

celest thorn
#

yea it doesn't still even changing that

worthy rune
#

do you a version of the code thats documented line by line

worthy rune
#

this would of been a good time

celest thorn
#

I just know with one works, with 3 no trollfancy

#

Oh wait

#

i just saw something

#

probably is not sending?

#

nope it sends

restive turret
#

I think your SyncVarMask is not valid

worthy rune
restive turret
worthy rune
#

i see

celest thorn
#

for admintoys

worthy rune
#

that doesnt seem right

celest thorn
#

the problem with >= 2 doesn't work

restive turret
#

I will try something when i will be at my PC

#

How many SyncVars you wanna write?

#

Like maximum

celest thorn
restive turret
#

Ok

celest thorn
#

in general i think 3

#

but i will rewrite to actually support more

#

and do like one update every time

worthy rune
restive turret
#

I don't think such a writer exists

celest thorn
# worthy rune is there a NetworkWriter<Admintoy>() method that you are getting?
    /// <summary>
    /// Gets <see cref="MethodInfo"/> corresponding to <see cref="Type"/>.
    /// </summary>
    public static ReadOnlyDictionary<Type, MethodInfo> WriterExtensions
    {
        get
        {
            if (WriterExtensionsValue.Count == 0)
            {
                foreach (MethodInfo method in typeof(NetworkWriterExtensions).GetMethods().Where(x => !x.IsGenericMethod && x.GetCustomAttribute(typeof(ObsoleteAttribute)) == null && (x.GetParameters()?.Length == 2)))
                    WriterExtensionsValue.Add(method.GetParameters().First(x => x.ParameterType != typeof(NetworkWriter)).ParameterType, method);

                Type fuckNorthwood = Assembly.GetAssembly(typeof(RoleTypeId)).GetType("Mirror.GeneratedNetworkCode");
                foreach (MethodInfo method in fuckNorthwood.GetMethods().Where(x => !x.IsGenericMethod && (x.GetParameters()?.Length == 2) && (x.ReturnType == typeof(void))))
                    WriterExtensionsValue.Add(method.GetParameters().First(x => x.ParameterType != typeof(NetworkWriter)).ParameterType, method);

                foreach (Type serializer in typeof(ServerConsole).Assembly.GetTypes().Where(x => x.Name.EndsWith("Serializer")))
                {
                    foreach (MethodInfo method in serializer.GetMethods().Where(x => (x.ReturnType == typeof(void)) && x.Name.StartsWith("Write")))
                        WriterExtensionsValue.Add(method.GetParameters().First(x => x.ParameterType != typeof(NetworkWriter)).ParameterType, method);
                }
            }

            return ReadOnlyWriterExtensionsValue;
        }
    }

I didn't create this but its from exiled and yes the fucknorthwood is from there lol

restive turret
#

Please check in ACS if there is a Network writer dedicated for AdminToy

#

There is probably NONE

#

But you can try

worthy rune
#

^

celest thorn
#

wtf are you guys on

worthy rune
#

there wouldnt be one for admin toys

celest thorn
#

OH i figured it out

worthy rune
#

those network writer functions are for serializing/deserializing primitives and custom code. the code for syncvars and entity state messages is entirely generated

celest thorn
#
        if (!WriterExtensions.TryGetValue(typeof(T), out var writerDel))
        {
            return;
        }

        writerDel.Invoke(null, new object[] {observer, value});

Other code does this T is the value so for example Vector3

restive turret
#

Also you can just do
observer.Write(Position)

celest thorn
#

But now i need to write multiple

worthy rune
#

yeah

restive turret
#

Ye

celest thorn
#

So by knowing this how tf am i going to send data

#

I just write it?

restive turret
#

Wait you don't write anything after the 16'th SyncVar so you gucci

worthy rune
#

you already know the types, so you dont need to get it via reflection

celest thorn
#

observer.WriteVector3(side.position);
observer.WriteQuaternion(side.rotation);
observer.WriteVector3(side.scale);

#

i guess this does the job

worthy rune
#

yeah

celest thorn
#

lets see if my client will explode

#

or work

teal junco
# teal junco I think I can figure out a way to mod this into AudioPlayerApi

Should this sorta work? Yes, is very derivative of AudioPlayerApi.


    void Awake()
    {
        Timing.CallDelayed(10f, () =>
        {
            InvokeRepeating(nameof(SendAudio), 0, (float)AudioClipPlayback.PacketSize / AudioClipPlayback.SamplingRate);
        });
        Timing.RunCoroutine(ReadAudioFile());
    }

    public Queue<float[]> sampleQueue = new Queue<float[]>();

    internal IEnumerator<float> ReadAudioFile()
    {
        bool shouldRun = true;
        while (shouldRun)
        {
            while (sampleQueue.Count < 200)
            {  
                float[] _pcm = new float[480];
                vorbisReader.ReadSamples(_pcm, 0, 480);
                sampleQueue.Enqueue(_pcm);
            }
            yield return Timing.WaitForOneFrame;
        }
    }

    internal void SendAudio()
    {
        float[] pcmGot = sampleQueue.Dequeue();
        int encodedLength = OpusEncoder.Encode(pcmGot, _encodedPcm);
        AudioMessage msg = new AudioMessage
        {
            ControllerId = ControllerID,
            Data = _encodedPcm,
            DataLength = encodedLength,
        };
        NetworkServer.SendToReady(msg);
    }
restive turret
#
writer.WriteULong(dirtyBitMask); //writing the mask
// Writing Sync Var here now, should write from smalles of SyncVar Byte to higher one, first 1uL, 2uL, 4uL, .. etc
writer.Write(syncVarForFirst); // THIS SHOULD BE THE SMALLEST ONE!
writer.Write(syncVarFor2);
writer.Write(syncVarFor3);
writer.WriteULong(dirtyBitMask); //This satisfy the inherited one.
teal junco
worthy rune
#

i see

teal junco
#

im gonna go sleep and ill test it tomorrow

restive turret
#

Its already tomorrow

#

8:25

worthy rune
#

you could use the labapis audio transmitter for sending audio, instead of trying todo it yourself

teal junco
worthy rune
#

a basic one yeah

#

to play/pause/stop

teal junco
#

oh so can i enqueue samples for it to play

#

so i only have to handle acquiring the samples

#

oh holy shit

worthy rune
#

yeah

celest thorn
#

Ok so it works

#

i don't understand tho its because im doing 140ms on the server or what but if i spawn multiple of 100 primitives moving randomly the client decides to delay everything

#

I just do it only when there's an update tho

teal junco
#

500,000 should be a nice amount, right?

#

i mean thats like ten seconds of samples

#

i think

worthy rune
celest thorn
#

just when its needed

worthy rune
#

not sure if its a mirror thing but the client can fall behind

celest thorn
#

but rn it does that

worthy rune
#

best way to save on networking is to make sure you only move the parent/root object

worthy rune
#

if you have like a particle system, your out of luck

celest thorn
#

but every object inside needs to update too

#

to like work in that way

worthy rune
#

no?

celest thorn
#

Vector3 currentPosition = transform.position;
Vector3 currentRotation = transform.eulerAngles;
Vector3 currentScale = transform.lossyScale;

        UpdatesObject updates = UpdatesObject.None;

        if (currentPosition != _lastPosition)
        {
            updates |= UpdatesObject.Position;
            _lastPosition = currentPosition;
        }

        if (currentRotation != _lastRotation)
        {
            updates |= UpdatesObject.Rotation;
            _lastRotation = currentRotation;
        }

        if (currentScale != _lastScale)
        {
            updates |= UpdatesObject.Scale;
            _lastScale = currentScale;
        }

        if (updates != UpdatesObject.None)
            UpdatePosition?.Invoke(this, updates);
worthy rune
#

unless the children are not admin toys they dont require updates

worthy rune
celest thorn
#

so everytime there's an update it does that

teal junco
celest thorn
#

attachedObject.UpdatePosition += (e, o) =>
{
if (e != AttachedObject)
return;

        foreach(Player player in this.PlayersLoaded)
            player.SendFakeUpdate(NetId, typeof(AdminToyBase), this); 
    };
worthy rune
worthy rune
celest thorn
worthy rune
#

your not patching anything internally to use world over local are you?

celest thorn
worthy rune
#

yeah

teal junco
#

im pissed off by this error but if i fix it the plugin will probably work if i set it up correctly

teal junco
#

its very helpful

#

to not have to handle the messaging myself :D

worthy rune
#

for the error there should be a property with the currently loaded count(samples not sent yet)

teal junco
restive turret
#

Gahaha

#

Of fuckin course

worthy rune
#

use AudioTransmitter.CurrentSampleCount instead of AudioTransmitter.AudioCLipSamples.Count

restive turret
#

Add mscorlib from game.
You probably need to add other stuff into csproj

celest thorn
worthy rune
#

local?

celest thorn
#

Vector3 currentPosition = transform.localPosition;
Vector3 currentRotation = transform.localRotation.eulerAngles;
Vector3 currentScale = transform.localScale;

worthy rune
#

something wrong

restive turret
#

If you use that you doing need to add mscorlib

#

I think

teal junco
worthy rune
celest thorn
restive turret
teal junco
restive turret
#

Please check admintoy serialize

#

It should be a quat

#

Instead of v3

celest thorn
#

oh yea no it gets converted

#

don't worry

restive turret
#

Ah

worthy rune
#

i thought i had added one for total samples, i guess not

#

you will need to referece mscorlib from the game(also you might have to remove the reference VS/rider provides to get it to work) like SlejmUr said

restive turret
#

<NoStdLib>true</NoStdLib>
I think inside your csproj and add mscorlib to your references or smth

worthy rune
# celest thorn yep

technically thats how the game is doing it, and iirc networking was vastly improved(it used to send all even children in 14.0 which caused that delay like you saw before)

teal junco
#

it worked

celest thorn
worthy rune
#

should be been as easy as replacing world with local

celest thorn
#

wait

worthy rune
#

but idk how you have set everything up

celest thorn
#

if i send an update for each children

#

so like

Main
child 1

#

etc..

#

thats causing the lag

#

because each children is sending an update

#

i don't think i can send just update this...

#

else i would need to spawn a primitive and update just that

worthy rune
#

so are you saying if the root changes, you force update all children?

celest thorn
#

yes.

upper vapor
worthy rune
restive turret
#

never

celest thorn
#

I mean what can i do to make it better

#

because as of rn the primitives don't have a parent with an identity

#

just with something normal

worthy rune
#

im referring to cases where you have primitives where they are children to other primitives and you want all to move together, if thats not the case and all should move indepentant theres nothing you can do

upper vapor
celest thorn
#

i guess i could use this 2

unique crane
celest thorn
restive turret
#

Can confirm

worthy rune
#

i think thats only called when transform.parent changes, not any changes to the pos/rot/scale

celest thorn
#

but i used it yesterday and just wasn't alr

worthy rune
unique crane
#

(I didn't know about them either)

celest thorn
restive turret
#

And been there since 2021

unique crane
worthy rune
#

ahh, ofc on the day im away

upper vapor
#

i have a recording if you want it

restive turret
#

:D

celest thorn
#

btw hii axwabo

upper vapor
#

haii

celest thorn
#

lets see if today by staying in vc i can crash central server by convincing someone

upper vapor
#

😭

unique crane
#

I wonder if I can stream doing stuff too

celest thorn
#

im honestly loosing my mind

celest thorn
restive turret
unique crane
#

Labapi Dev streams

celest thorn
#

Crazy

celest thorn
unique crane
#

Where we refactor old game code

celest thorn
#

the heat death of exiled

restive turret
#

🔥

worthy rune
unique crane
#

August 2025

#

Heat death of the exiled

celest thorn
#

New mantra

upper vapor
#

gotta ffmpeg it still, it's 800 MB and separate audio channels

restive turret
celest thorn
unique crane
#

It's reference to the spongebob ai

restive turret
unique crane
#

😭

celest thorn
#

i did the same lol

restive turret
#

What

upper vapor
celest thorn
#

the heat death of exiled

celest thorn
upper vapor
#

i got it ty

restive turret
#

Upload into yt

celest thorn
#

crazy

restive turret
upper vapor
#

like for reading

#

you need a buffer per "clip"

#

i guess you could overwrite data in an existing buffer but i don't think you can guarantee at which point the end is reached

teal junco
#

i only plan to play one audio file per player

celest thorn
#

yea btw no hangout this is sad ;(

unique crane
#

It's 9 in the morning

upper vapor
#

i need a few mins, gotta breakfast stilll

#

i'll let ffmpeg run in the meantime for Riptide

celest thorn
#

Honestly

#

Im going insane

#

spawning 200 primitives moving around cause the client to explode so badly

#

not of fps of mirror messages

#

i need a way to just lower that down ;(

unique crane
#

Rewriting admin toys to messages now

celest thorn
#

i did

#

and thats what im doing

#

its JUST TOO MANY MESSAGES

#

i cannot do much

#

WAIT

#

i could bundle them

unique crane
#

That's why SL used like the cascaded RPCs

#

Like the auto sync stuff

celest thorn
#

im going insane

#

i need a way to bundle them without causing desync

unique crane
#

Prob no

celest thorn
#

because the server collider updates fine

#

the problem is client exploding

unique crane
#

Why

worthy rune
restive turret
#

Batch deez

#

Tbh don't think you can send multiple at once

#

But

celest thorn
#

Rn this is how it looks 100 primitives stacked on top of each other updating and just doing weird stuff

restive turret
#

Good luck

celest thorn
#

so 200 primitives just moving randomly and changing rotation scale

restive turret
#

You and your primitives

celest thorn
#

i know

#

im going insane

#

to try and make it optimized

restive turret
celest thorn
#

i need to resist for another build

celest thorn
unique crane
#

Zer0 I'll rewrite primitives and break all of your stuff

celest thorn
unique crane
#

Wdym

celest thorn
#

I use fucking low level mirror directly

#

to do everyting

#

even handling movement

restive turret
celest thorn
#

so try breaking that

unique crane
#

What if I don't make them network behaviour

celest thorn
#

yea at that point i cannot do much

unique crane
#

I make standalone message to spawn them

celest thorn
#

i can just recreate that by changing one line