#plugins-dev-chat

1 messages · Page 56 of 1

unique crane
#

Hmmm

#

Fair

celest thorn
#

i have the entire code to be done in a way

#

that if nw adds a toy

#

or changes something i can replace it in 30s

#

the problem is now updating colliders and client

#

without exploding the client

unique crane
#

But the culling is good

#

I'll check it out today

celest thorn
#

yea

restive turret
celest thorn
#

this is me

unique crane
#

Yea I have access

celest thorn
#

like its years i ask for that and now someone listened to me

restive turret
#

No shit (i mean ye ofc)

celest thorn
#

yesterday i slept really well knowing none will endure my same pain

#

working with mirror its a pain

#

without editor or anything

restive turret
#

ye reversubg ut us sgut

celest thorn
#

the problem rn

#

is just making calls lower

#

i could pull of 2 things

#

making parents primitives

#

and just say to the client attach them

#

or i could actually pack them

#

if for the LateUpdate they don't have anything more send the data

#

and sync the collider

unique crane
#

How about

#

Reducing the amount

celest thorn
unique crane
#

Or you don't send it that often and apply movement smoothing

upper vapor
teal junco
#

i made a whole ass town with primitives and had 120 fps

celest thorn
teal junco
#

no tps issues

#

but

celest thorn
#

really fast

teal junco
#

it just made me think

celest thorn
#

its already so optimized that if i touch the code im just destroying a temple

teal junco
#

about the difference between primitives and the rest of the game

#

so if your schematics are so poorly made it tanks your players fps, just delete the regular map

restive turret
unique crane
celest thorn
#

Crazy

unique crane
#

It works but I added so it sets the position of the object with the bounds position

celest thorn
#

i love you hubert

unique crane
#

Otherwise you would have to add offsets for the child gameobject toys

#

or spawn it with position applied already

carmine prawn
limber silo
#

didn't michal add this already

upper vapor
#

it's client-side culling this time

grand flower
#

Made me remember about culling issues with players and their light sources

#

Players behind you with a lantern wont render, nor will their light

#

Probs same with a flashlight

upper vapor
#

with network messages

limber silo
#

not in mer

upper vapor
#

oh in SL?

limber silo
#

in basegame

upper vapor
#

for primitives?

limber silo
#

yeah

#

I guess im just not remembering correctly

upper vapor
#

at michal toomuchtrolling

random scaffold
#

public PlayerDeathEventArgs(ReferenceHub player, ReferenceHub? attacker, DamageHandlerBase damageHandler,
RoleTypeId oldRole, Vector3 oldPosition, Vector3 oldVelocity, Quaternion oldCameraRotation)
{
Player = Player.Get(player);
Attacker = Player.Get(attacker);
DamageHandler = damageHandler;
OldRole = oldRole;
OldPosition = oldPosition;
OldVelocity = oldVelocity;
OldCameraRotation = oldCameraRotation;
}

#

why

#

need old velocity

#

and old camera rotation

restive turret
#

because

#

i need it

random scaffold
#

for what

restive turret
#

because why not

#

not like you can cahnge the value

random scaffold
#

slejm moment

upper vapor
#

use the dying event

#

i guess

#

also the velocity is in the damage handler

#

-# for the ragdoll

grand flower
#

Had to use the dying event to store that data

#

Nice that it's a part of SL now

#

Granted I store a bit more but that's still cool

random scaffold
#
 public Vector3 Scale
    {
        get
        {
            if (ReferenceHub.roleManager.CurrentRole is not IFpcRole fpcRole)
                return Vector3.zero;

            return fpcRole.FpcModule.Motor.ScaleController.Scale;
        }
        set
        {
            if (ReferenceHub.roleManager.CurrentRole is not IFpcRole fpcRole)
                return;

            fpcRole.FpcModule.Motor.ScaleController.Scale = value;
        }
    }

hard system taken more than 1 month

royal mica
#

and want to respawn them instead of forceclass

#

Want to spawn a statue where you can revive dead people for a gamemode

#

idk

carmine prawn
#

how can I check a room is AA?

unique crane
#

AA?

carmine prawn
#

Acroamatic Abatement

random scaffold
#

lol

icy knoll
#

that’s the name

exotic turtle
#

hey, does anyone know where i can find documentation on labapi?

restive turret
#

ye in github wiki

exotic turtle
restive turret
#

ye

random scaffold
#

its all

restive turret
exotic turtle
#

ok. is there a list of all methods in the api?

#

and objects?

random scaffold
#

use ide

exotic turtle
#

and classes?

random scaffold
#

Player pl = new();

#

pl.

#

and will be tips

severe cave
#

Everything

restive turret
random scaffold
#

oh

restive turret
#

browse the src if you wanna find osme stuff

#

or IDE can help you

severe cave
#

Use VS

exotic turtle
#

can i add assmeblies in vs code though?

severe cave
#

Yeah i think

random scaffold
severe cave
#

Somehow

#

I dont use vsc much

exotic turtle
#

is pl. the player?

severe cave
random scaffold
exotic turtle
#

what object

random scaffold
severe cave
random scaffold
exotic turtle
#

i know oop, i was just confused with your replies.

#

thanks

exotic turtle
#

k

#

i will check it out too

#

thanks

random scaffold
#

how i can edit .pdf

#

oh

upper vapor
random scaffold
#

edge browser

#

bruh

#

stupid edge

#

no one button for change text

upper vapor
#

np

random scaffold
#

how i can patch weapon limit?

#

for selected the players

#

which method or class

upper vapor
hearty shard
#

at least for the category limits

random scaffold
#

8.1. A Server Owner and their Sta must respect the privacy of any user that has connected to the
Game Server, and are responsible for keeping their IT Infrastructure secure and compliant with
local privacy laws and regulations

#

why this rule need

#

bruh

random scaffold
upper vapor
#

1 line above

upper vapor
random scaffold
#

but i wanna

#

(

upper vapor
random scaffold
restive turret
#

you are client side

hearty shard
restive turret
#

no

random scaffold
random scaffold
hearty shard
#

idek what ur asking

#

lol

restive turret
#

client also chaning the SyncList for getting the accurate limit

#

if you faking the limit

#

can have multiple

#

I guess

#

since server doesnt check for it or something

#

check yoself

#

@spring swan Yo. DM'ing you with the killer script

untold raft
#

Is it possible to set or get Player ammo in FirearmItem?

unique crane
#

get the Base of it

#

The Firearm

#

and get the MagazineModule

#

Or similar based on the firearm type

untold raft
#

oh i must checking it for every firearm type ?

#

FirearmItem is a wrapper but has no such important things?

unique crane
#

But not merged yet

untold raft
#

okay

restive turret
#

Yo, how can I spawn a gun that already has Ammo inside of it?

#

cust this doesnt work

if (pickup is FirearmPickup firearm && firearm.Base.Template.TryGetModule(out IPrimaryAmmoContainerModule primaryAmmoContainerModule) && primaryAmmoContainerModule != null)
{
  primaryAmmoContainerModule.ServerModifyAmmo(
    primaryAmmoContainerModule.AmmoMax
  );
}
unique crane
humble haven
#

how to mute Cassie for specific players?

unique crane
unique crane
#

We use Mirror framework for networking

#

Which uses RPC (Remote Procedure Calls)

restive turret
unique crane
#

we are moving systems to Messages (lower level than method attributes)

#

Uhhh

#

@restive turret Do you know how to call ClientRpc manually

unique crane
#

to a specific one

#

like send message to that

unique crane
#

struct : NetworkMessage

hearty shard
#

david im going to kill you

restive turret
#

ye kind of

hearty shard
#

oh

#

that

#

whats benefit

unique crane
restive turret
#

with many headbangs

#

ye

unique crane
unique crane
restive turret
#

RpcCassieAnnouncement

unique crane
#

Yea that

restive turret
#

ye its sending to every player

#

Time for Fake

#

@humble haven Are you using Exiled or no

#

if not you need another DLL for it to able to call these

humble haven
restive turret
#

lol you dont need patches

humble haven
restive turret
#

oh mute not play announcement

unique crane
#

Oh in that case you can do 2 things

restive turret
#

idk how cassie work

#

like

unique crane
#

@humble haven Cancel CassieAnnouncingEvent

#

If you want to mute it for all

restive turret
#

and with fakesync send to other players?

#

ye

#

that can be done

humble haven
#

How i should do?

unique crane
#

Yea if you want only for specific

#

I would patch RespawnEffectsController.ServerPassCassie(...) so it sends the rpc only to players you dont want to mute it for.

tulip kiln
#

It's been at least 207 days since these guys invaded my beautiful reload / unload code

unique crane
#

Put the ammo you want

#

Select nothing, wait 1 frame and select the gun back

restive turret
unique crane
#

Until I fig this

unique crane
#

And you need to send it only to specific

restive turret
#

it still req fakesyncvar

#

no?

#

*rpc

unique crane
#

Its ClientRpc it generates something no?

restive turret
#

what

upper vapor
#

Esc -> Settings-> audio -> sound effects to 0

unique crane
#

Ax

#

ill call eve here

restive turret
upper vapor
#

Go get inspired from exiled ig

#

I'm not dealing with that 😭

restive turret
unique crane
#

1984

tired pecan
#

I finally found the exact gravity vector for the old jump, it's not perfect but I was able to use a lot of math to get the air time. As far as I'm aware the map actually got 28% smaller hence (-19.6) - 28% = -14.112

restive turret
#

lmao

tired pecan
#

Feel free to use this knowledge gamers, took me a bit longer than I thought

tired pecan
restive turret
#

well

tulip kiln
restive turret
#

better than Eve's Gravity being Vector3.one

tired pecan
#

I mean I'm gonna keep testing this, if you're looking for just jump height I think -18 is fine but I think this was the old parameter so you actually jump the same heaight as always

tired pecan
tulip kiln
icy knoll
unique crane
#

Wait

#

it changed?

tired pecan
#

Yeah thats new jump lol

tulip kiln
#

Old SL jump

upper vapor
#

Old as n

restive turret
#

prob

upper vapor
#

Pre parabellum

tulip kiln
#

you could jump high af

upper vapor
#

I think

unique crane
#

Oooooooh

restive turret
#

before you worked at NW

tired pecan
#

Yeah definitely

unique crane
#

You could have just asked me

restive turret
#

yknow

#

years

unique crane
#

I can look into git history

restive turret
#

Ah yes, let david see back 2 years

tired pecan
#

I'm pretty sure gravity was decreased becuase the map got way too small

#

But because models (I'm pretty sure) are the same hieght and whatnot it feels like hitting a ceiling

upper vapor
tulip kiln
#

I imagined you doing this

icy knoll
upper vapor
#

I'm not singing it

#

I don't know the lyrics

icy knoll
#

smh

tired pecan
tulip kiln
tired pecan
#

I honestly couldn't tell you why everything was exactly 28% smaller or something but yeah now you know

tired pecan
unique crane
tired pecan
#

So yeah you can pretty quickly the map got smaller

restive turret
#

like

#

count

unique crane
#

Looking at gitlab its almot 5,7K

tired pecan
#

If you were to copy and paste the parameters for the scrapped lighting like I have the lights would be outside the map, but set scale to 0.72 and boom it's back inside

restive turret
#

have fun seeing where gravity

tired pecan
restive turret
unique crane
#

SCP SL Git repo

tired pecan
restive turret
#

well david

#

actually have fun now with that

tired pecan
#

I'm right about gravity being lower regardless since you can't jump to the sameheight as before but still

tired pecan
#

Because the places for the lights would be wrong

#

If you did 0.7 the lights would be going to the middle of the stair well, whereas 0.75 would make the lights be directly on top of the fence

#

In Unity on the old SL version (being MPII) the scraped lights are halfway down 079's camera)

#

I did use 0.7 and 0.75 but after looking at everything I realized that the lights were infact the same place not scaled however it's all the same it's just 28% smaller for some reason

#

There's also a used light on Surface Zone that directly shines on Escape Room but as I said it's only in the correct position if scaled down to 28%

#

It's fucking bizzare

humble haven
# unique crane I would patch RespawnEffectsController.ServerPassCassie(...) so it sends the rpc...
using HarmonyLib;
using Exiled.API.Features;
using Respawning;

namespace BetterMuteCassie.Patches
{
    [HarmonyPatch(typeof(RespawnEffectsController), "ServerPassCassie")]
    public static class ServerPassCassiePatch
    {
        public static bool Prefix(
            RespawnEffectsController __instance,
            string words,
            bool makeHold,
            bool makeNoise,
            bool customAnnouncement,
            string customSubtitles)
        {
            Log.Debug($"BetterMuteCassie: Intercepted announcement: {words}");

            foreach (var player in Player.List)
            {
                if (!EventHandler.EventHandlers.IsCassieMuted(player))
                {
                    // Riproduci Cassie solo per questo player
                    Cassie.Message(
                        message: words,
                        isNoisy: makeNoise,
                        isSubtitles: true
                    );
                }
            }

            return false;
        }
    }
}
#

?

#

Can it work?

unique crane
#

I dont think this will work cause you will just loop over and over again

humble haven
unique crane
#

Oh it might not be that hard

#

This is what is generated

#

You just have to send it to specific clients

#

one sec

#

Oh so like

#
 NetworkWriterPooled writer = NetworkWriterPool.Get();
 writer.WriteString(words);
 writer.WriteBool(makeHold);
 writer.WriteBool(makeNoise);
 writer.WriteBool(customAnnouncement);
 writer.WriteString(customSubtitles);
SendTargetRPCInternal("System.Void Respawning.RespawnEffectsController::RpcCassieAnnouncement(System.String,System.Boolean,System.Boolean,System.Boolean,System.String)", -31296712, writer, 0);
 NetworkWriterPool.Return(writer);
#

@humble haven

#

Try this?

#

Instead of Cassie.Message

humble haven
#

thank you ❤️ , now i try

humble haven
unique crane
#

as its part of NetworkBehavior

#

(protected method)

restive turret
#

you doing the exact same thing

#

as in the rpc

unique crane
#

No its TargetRpcInternal

#

so it sends only to the target connection

#

Underlying message structure is same (?)

restive turret
#

ah

#

ye its good

#

you just missing Con

unique crane
#

I forgot

#

wrote this on discord

restive turret
# unique crane ```cs NetworkWriterPooled writer = NetworkWriterPool.Get(); writer.WriteString...
        NetworkWriterPooled writer = NetworkWriterPool.Get();
        writer.WriteString(words);
        writer.WriteBool(makeHold);
        writer.WriteBool(makeNoise);
        writer.WriteBool(customAnnouncement);
        writer.WriteString(customSubtitles);
        __instance.SendTargetRPCInternal(player.Connection, "System.Void Respawning.RespawnEffectsController::RpcCassieAnnouncement(System.String,System.Boolean,System.Boolean,System.Boolean,System.String)", -31296712, writer, 0);
        NetworkWriterPool.Return(writer);

Put this inside the if "EventHandler.EventHandlers.IsCassieMuted"

#

also

#

david

#

are you planning to use any other SyncObject other than SyncList?

#

others are:

#

if the answer is no then i dont make unneccessary things for making FakeSyncSet, FakeSyncDictionary

unique crane
#

No I dont think we use them anywhere else

#

Just List

hearty shard
#

@unique crane when client desyncs, whats the condition to resync ?

unique crane
#

Like...

#

what exactly?

hearty shard
#

desync

#

when does server tell client thats its desynced and corrects the position

unique crane
#

I guess there is some distance check?

soft depot
#

does anyone know if you can use client side parenting on a players camera transform rather than their ReferenceHub transform?

upper vapor
#

you can't

upper vapor
#

best you can do is offset the position

soft depot
#

I really need to handle the rotation of a players cam, does strangled work now for that now that skele is back?

#

cuz then I could lock a players rotation

#

is strangled basically only server side? As in all checks are on server not client?

unique crane
#

I think that it disabled camera movement client side too

soft depot
#

yeah so I'm wondering if I just fake that strangled is active for a player if the client will just accept it and freeze camera

#

nah I think it wants a ReferenceHub as a target

#

or maybe that's just local player stuff

#

I'm really struggling with this code lol

#

honestly I don't see anything networked in the strangled effect

upper vapor
#

set player.LookRotation every frame

hearty shard
#

troll

upper vapor
#

it won't prevent them from trying to look away but eh

soft depot
#

but like, maybe skeles StrangleAbility sync the target, then Strangled effect gets it from there

soft depot
#

but I'll give it a shot

#

¯_(ツ)_/¯

upper vapor
#

let's add a mouselock effect

unique crane
#

Strangled::UpdateInputOverride() does it

#

that locks the camera

#

(client side)

upper vapor
unique crane
#

It just overrides the input

#

input override

soft depot
#

yeah but where does it get _strangleTarget

#

I don't wanna be throwin client side NRE's cuz I don't understand what's going on

upper vapor
#

decompile it shrug

soft depot
#

it's client side code 😭

#

most of it is in the shadow realm

upper vapor
#

they no longer strip that much client code

unique crane
#

There is nothing stripped in the Strangled code

#

nor in strangle module

soft depot
#

well it seems like the client tries to find a player with a skele strangle subroutine, then checks if that subroutines target is itself, if so, cache it and keep checking that subroutine every tick

#

so I'd need a fake skeleton to strangle the client

upper vapor
#

host

unique crane
#

Yeah thats possible

#

or dummy

upper vapor
#

you can scale them to 0

soft depot
#

yeah but I need the client to think the dummy is in front of them

#

will do

#

part of me almost wants to fake the dummies tho cuz the thing I'm doing entails the players be alive

#

so if I hide the dummies from spectators, it should be fine

upper vapor
#

fake the dummies
just don't fake the entire player gameobject 😭

soft depot
#

well I'm thinking of just spawning them in, then destroying them on spectator clients

unique crane
#

Try it and seeee

soft depot
#

honestly the entire fake strangle thing could be a full plugin 😭

upper vapor
#

side effect: scary auduio

soft depot
#

tru

teal junco
#

wtf am i supposed to do about this

upper vapor
#

<DisableImplicitFrameworkReferences>true</...>

#

are you targeting .net standard?

teal junco
#

im targeting v48

#

okay

#

lemme try

upper vapor
#

yeah make sure you only have the refs from SL folder

true cedar
#

i aliased mscorlib

upper vapor
#

don't 😭

true cedar
#

well

upper vapor
#

that's gonna make it horrible

true cedar
#

i aliased it global and mscorlib

#

and worked fine :3

upper vapor
#

omg...

#

global

#

okay

true cedar
#

global is the default alias

true cedar
upper vapor
#

yeah

#

i didn't think about doing that lol

teal junco
#

thanks it worked

#

i ran into another issue, when I do AudioTransmitter.Play(samples, true) to queue a sound, it seems to end up just playing the sound immediately, skipping any of the other sounds? i feel like i might be doing something wrong.

#

or if i even just enqueue the sounds

#

directly

upper vapor
#

queue = true

#

if you read into the same array, ofc it won't work

#

hence the required array reallocation

teal junco
#

i did do queue = true

#

i dont really understand what youre saying, but what did work for me was making my own queue, and sampling 800 samples instead of 480

#

because 800 is 1/60th of 48000

#

and then i run the sample groups into the speaker

upper vapor
#

the issue is if you reuse thze array

teal junco
#

i dont know

upper vapor
#

how does your code look liek

teal junco
upper vapor
#

new array every time you read n samples?

teal junco
upper vapor
#

yea

upper vapor
teal junco
#

hm

upper vapor
#

bru

teal junco
#

i thought looping meant what i thought it did, but maybe it means something different

upper vapor
#

it replays the clip

#

over and over

teal junco
#

oh well

#

at least i got it working within a day

teal junco
#

maybe its time to go back to the 800 sample thing

unique crane
upper vapor
#

yeah you need to buffer it ahead by a bit

#

read like a thousand samples and every frame 48000 * Time.deltaTime

teal junco
#

can i do that in MEC?

upper vapor
#

yep

#

so enqueue about a thousand or so samples, then keep queueing the new packets

restive turret
#

New server crash method or smth.
Local Admin log looks:
[NM] DataReceived: bad!
[NM] DataReceived: bad!
...
for million time

icy knoll
#

that's a ddos

#

lol

restive turret
#

well

#

cant even know the IP

#

to literally just skip that

#

or to visit all datacenters and send a nuke to them

upper vapor
#

gotta contact the host shrug

#

tell em to get that defense up

icy knoll
#

ive never seen those logs

#

once

#

surprisingly

#

usually my host would legit just slow or completely halt the connection before the ddosing gets to the server, but on my past hosts they halted all connections LOL

restive turret
#

anyway it happens here
NetManager.OnMessageReceived

upper vapor
#

distributed donkey of shrek

restive turret
#

have fun whoever wanna patch it

restive turret
upper vapor
#

XDDDDDDD

restive turret
#

fak

#

doom day of sx

royal mica
#

We had that multiple times

#

Earliest log is 2024-08-03

restive turret
#

Happened literally 5 or 10 min before my message

tired pecan
random scaffold
#

how i can check state if it blinking?

#

WaveManager.State == ?

random scaffold
grand flower
random scaffold
#

which changing property / method call if the player shooting from weapon?

upper vapor
#

ServerCycleAction

#

use dnSpy or dotPeek to find usages

#

though firearms use animators so there are a number of events that are called from the animator (no visible code usage)

random scaffold
#

where i can find primary ammo container

#

it exists only how interface

upper vapor
#

firearm.trygetmodule

random scaffold
#

in decompile

upper vapor
#

oh

#

derived types

random scaffold
#

where implementation

upper vapor
#

again, check the interface's derived types

#

right click and navigate

random scaffold
#

is it possible patch interface?

grand flower
#

Implementations yes

royal mica
#

also if static yes

teal junco
#

interesting thing i learned today

#

if i parent an interactabletoy to a pickup, interacting with the toy grants me the pickup

#

i havent tested with 0 interaction duration but i assume its the same way.

random scaffold
#

exists events for jailbird?

#

JailbirdAttacking or something

upper vapor
#

i assume not

random scaffold
#

doesnt found

random scaffold
upper vapor
unique crane
#

^

humble haven
#
      public static bool Prefix(WaveAnnouncementBase __instance)
        {
            Log.Debug($"[BetterMuteCassie] Patch {nameof(SubtitlePreventionPatch)} triggered");

            MethodInfo sendTargetRpc = typeof(NetworkBehaviour).GetMethod(
                "SendTargetRPCInternal",
                BindingFlags.Instance | BindingFlags.NonPublic);

            if (sendTargetRpc == null)
            {
                Log.Error("SendTargetRPCInternal not found!");
                return true;
            }


            foreach (var player in Player.List)
            {
                if (!EventHandler.EventHandlers.IsCassieMuted(player))
                {
                    var conn = player.ReferenceHub.networkIdentity.connectionToClient;
                    NetworkWriterPooled writer = NetworkWriterPool.Get();

                    try
                    {
                        sendTargetRpc.Invoke(__instance, new object[]
                        {
                conn,
                "System.Void Respawning.Announcements.WaveAnnouncementBase::RpcSendSubtitles()",
                -31296712,
                writer,
                0
                        });
                        Log.Debug($"BetterMuteCassie: Sent subtitles to {player.Nickname}");
                    }
                    catch (Exception ex)
                    {
                        Log.Error($"BetterMuteCassie: Exception sending subtitles to {player.Nickname}: {ex}");
                    }
                    finally
                    {
                        NetworkWriterPool.Return(writer);
                    }
                }
            }



            return false;
        }```
#

[2025-06-29 10:27:05.700 +02:00] [ERROR] [BetterMuteCassie] BetterMuteCassie: Exception sending subtitles to Shodan: System.Reflection.TargetException: Object does not match target type.
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00024] in <13c0c460649d4ce49f991e2c222fa635>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <13c0c460649d4ce49f991e2c222fa635>:0
at BetterMuteCassie.Patches.SubtitlePreventionPatch.Prefix (Respawning.Announcements.WaveAnnouncementBase __instance) [0x0008a] in <873d851353734910a0d406b33eab2f73>:0

#

can someone help me?

unique crane
#

Use Assembly publicizer and publicize Mirror assembly

#

then use the new reference for it

#

It will make every method public

#

=> easier

static meteor
#

Also enable unsafe code if you use publicized methods

unique crane
#

Yeah that too

humble haven
unique crane
#

Yep

#

Here is publicized assembly if you want

humble haven
#

thank you

humble haven
# unique crane

Severity Code Description Project File Line Suppression State
Error (active) CS1061 'WaveAnnouncementBase' does not contain a definition for 'SendTargetRPCInternal' and no accessible extension method 'SendTargetRPCInternal' accepting a first argument of type 'WaveAnnouncementBase' could be found. Possibly missing a using directive or an assembly reference.

unique crane
#

Yeah well WaveAnnoucementBase inst gonna have it

#

Its in RespawnEffectsController

#

you need instance of that

royal mica
#

I yearn for the days where publicized is the past of the ages

unique crane
#

its just part of modding

#

Someone will always want to change that one very specific thing that isnt public

restive turret
#

Just make private thing to public

grand flower
#

Be glad you can publicize stuff in the first place

restive turret
#

Well yeah

#

Il2cpp server would be hell

grand flower
#

We'd be at NW's mercy modding wise

#

which we already are, somewhat

restive turret
#

Cheaters always be cheating no matter what

grand flower
#

aye

grand flower
#

How often does map generation get updated

#

i.e. how often should I expect a singular seed to start generating a different map after an update

restive turret
#

After adding a new map element

#

For example the pipe room, or 127 added the gen changed

grand flower
#

Guessing they don't modify map generation itself often right

#

Outside of when those elements are added

restive turret
#

Idk, they reworked at it in 14 i think

#

But probably will not be much in this 14.x

grand flower
#

I see

restive turret
#

You can make a git and check the decompiled versions (or ask david)

grand flower
#

Eh that's fine, I'll just add a version block to my stuff if a new update changes map generation

#

pretty much renders older files incompatible

#

and it'll be noticed very fast by users hah

#

things going through walls

random scaffold
hearty shard
random scaffold
restive turret
#

@grand flower in #195 you mean something like this?

grand flower
#

The latter would be better yes

upper vapor
#

what if it wasn't out and the caller supplied the list

grand flower
#

Gives control to the modders - they can handle renting

upper vapor
#

we could have extension methods so the player class doesn't get too cluttered

restive turret
upper vapor
#

no need for the collection expression but...

#

why in

#

😭😭

restive turret
#

idk or use ref ClassDTroll1

upper vapor
#

GetAll(ItemType, List<Item> results) => items.AddRange(List.Where(...)))

#

we could return the original list even

#

though not necessary

restive turret
#
    public static void GetAll(ItemType type, ref List<Item> items)
    {
        items.AddRange(List.Where(n => n.Type == type));
    }
unique crane
#

Tf does in do

restive turret
#

get all items

upper vapor
unique crane
#

ahhhh

upper vapor
#

so you can't modify the parameter in the method

grand flower
#

5 am stupidity nvm

upper vapor
#

bru

restive turret
#

so

#

how you like

grand flower
#

Sorry I'm C++ pulled

#

Pilled

restive turret
#

ref vs out vs _(nothing)

#

so i can make a big breaking change on this

#

so

upper vapor
upper vapor
#

-# yes i benchmarked it

restive turret
#

not my head

#

i love downloading 78 gb on steam and 42 gb on browser so my whole pc is slow

restive turret
unique crane
#

how much

#

we talking

restive turret
#

1440 byte in memory

grand flower
#

Why would you use structs

#

For that much data

restive turret
#

bc c++

upper vapor
grand flower
upper vapor
#

like a big context

#

hai Riptide

restive turret
upper vapor
#

that, too

grand flower
#

I'm just gonna go to sleep I can't follow the conversation anymore hahahaha

#

I'll check on it once I'm not sleep deprived

restive turret
#

vote then you are free

#

!!

grand flower
#

Not saying I'm against anything just that I'm too tired to think

upper vapor
#

gn

grand flower
#

Me when i make the mistake of letting VS try to find symbols for the 500+ assemblies loaded

#

Gn

upper vapor
restive turret
#

gn

grand flower
#

I don't use VS for game dev work

#

99% of the time

#

1% is when Rider's debugger doesn't cut it

random scaffold
#

rider fun

grand flower
#

Otherwise Rider does everything i need it to do

#

Worth the money I pay for it

upper vapor
upper vapor
#

-# on rare occasions

#

like, it's not "not responding" but it doesn't react at all

restive turret
#

#202 or smth

humble haven
#

for a commission i should relase source code too?

restive turret
#

ye i guess

#

talk with the one who asked the comission to be src available or smth

hearty shard
#

but usually if someone paid money, they arent asking for it to be open source

humble haven
hearty shard
#

then yes give him source

celest thorn
#

i usually delete source codes after

carmine prawn
#

why some rooms GameObject is null in Room.List?

#

after one server round restart

restive turret
#

Probably room not getting removed from there

worthy rune
#

theres a bug currently where rooms are added back in the generator wrapper remove method

hearty shard
#

oh lol

carmine prawn
#

not fun :<

fresh zenith
#

hey uh has anyone encountered this error message before and knows how to fix it?:

[2025-06-29 14:39:41.992 +00:00] Exception while handling encrypted message on channel RemoteAdmin (server, running a handler). Exception: Object reference not set to an instance of an object
[2025-06-29 14:39:42.002 +00:00] at PlayerRoles.PlayerRoleManager.PopulateDummyActions (System.Action`1[T] actionAdder, System.Action`1[T] categoryAdder) [0x00019] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at NetworkManagerUtils.Dummies.DummyActionCollector+CachedActions.UpdateCache () [0x00016] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at NetworkManagerUtils.Dummies.DummyActionCollector+CachedActions.get_Actions () [0x00008] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at NetworkManagerUtils.Dummies.DummyActionCollector.ServerGetActions (ReferenceHub hub) [0x00006] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at RemoteAdmin.Communication.RaDummyActions.AppendDummy (ReferenceHub dummy) [0x0001e] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at RemoteAdmin.Communication.RaDummyActions.GatherData () [0x0003a] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at RemoteAdmin.Communication.RaClientDataRequest.ReceiveData (CommandSender sender, System.String data) [0x00032] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at RemoteAdmin.Communication.RaDummyActions.ReceiveData (CommandSender sender, System.String data) [0x00095] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at RemoteAdmin.CommandProcessor.ProcessQuery (System.String q, CommandSender sender) [0x0005d] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at RemoteAdmin.QueryProcessor.ServerHandleCommandFromClient (ReferenceHub hub, EncryptedChannelManager+EncryptedMessage content, EncryptedChannelManager+SecurityLevel securityLevel) [0x0002d] in <d9731e675e55453197cf28cd60eed3f2>:0 
                                   at (wrapper delegate-invoke) <Module>.invoke_void_ReferenceHub_EncryptedChannelManager/EncryptedMessage_EncryptedChannelManager/SecurityLevel(ReferenceHub,EncryptedChannelManager/EncryptedMessage,EncryptedChannelManager/SecurityLevel)
                                   at EncryptedChannelManager.ServerReceivePackedMessage (Mirror.NetworkConnection conn, EncryptedChannelManager+EncryptedMessageOutside packed) [0x00071] in <d9731e675e55453197cf28cd60eed3f2>:0```
#

it just really annoys me lmao

fresh zenith
unique crane
#

Known

unique crane
#

Its 2 line fix so I hope we dont forgot about it

hearty shard
#

said it was

#

merged

#

IM GOING TO STRANGLE YOU

unique crane
#

no it isnt yet

carmine prawn
hearty shard
#

known and NEVER fixed

#

because daid SUCKS

fresh zenith
#

(yea the bug exists since the first version lmao)

worthy rune
#

daid

hearty shard
#

RIPTIDE...

#

we renamed daid

#

hes daid now

#

he lost the V by being stinky

unique crane
#

its base game one

#

And not game breaking

#

just annoying

slender lynx
hearty shard
slender lynx
slender lynx
#

@celest thorn next tournament
throwing hot honey buns at homeless people

unique crane
slender lynx
#

@lament niche tf you lurkin here

celest thorn
#

@lament niche what are you doing here???

slender lynx
#

dude heard "next tournament" and INSTANTLY knew

lament niche
#

6th sense

slender lynx
#

instead of 2

lament niche
slender lynx
#

i'll bring it up in our next meeting

lament niche
#

🙏

slender lynx
#

unlikely though

lament niche
#

🙏 x3

lethal atlas
true cedar
true cedar
#

i have a semi large struct

upper vapor
#

high-performance scenarios, like asp.net

#

anything that has to be maximally optimized

true cedar
#

no but

#

at what point

upper vapor
#

hold on i might be stupisd

true cedar
#

like struct size

upper vapor
#

When your API requires that the argument be passed by reference, choose the ref readonly modifier instead of the in modifier.

upper vapor
#

Methods that are defined using in parameters potentially gain performance optimization. Some struct type arguments might be large in size, and when methods are called in tight loops or critical code paths, the cost of copying those structures is substantial. Methods declare in parameters to specify that arguments can be passed by reference safely because the called method doesn't modify the state of that argument. Passing those arguments by reference avoids the (potentially) expensive copy. You explicitly add the in modifier at the call site to ensure the argument is passed by reference, not by value. Explicitly using in has the following two effects:

true cedar
#

oh ik

upper vapor
#

i thought i misunderstood the concept myself but nvm

upper vapor
worthy rune
#

i could be wrong but i think the tipping point is anything over the size of a native pointer is when ref/in is worth it

true cedar
#

nah

upper vapor
worthy rune
#

are they not the same performance wise (in and ref) in the context of passing a struct?

true cedar
true cedar
#

well defensive copies

#

but lik

#

they're both pointers

upper vapor
#

The in modifier allows the compiler to create a temporary variable for the argument and pass a readonly reference to that argument. The compiler always creates a temporary variable when the argument must be converted, when there's an implicit conversion from the argument type, or when the argument is a value that isn't a variable.
i guess then you also can't use ref

#

let's benchmark

worthy rune
#

i didnt know the in keyword was a thing for parameters until today, i only knew about it for generic args and even then i rarely used that

true cedar
#

i think it is basically just for big structs

hearty shard
worthy rune
#

kinda wished they had separated the concept of const from reference like the way c++ does it

#

in is a terrible keyword, i guess they didnt want to make a new one

true cedar
#

if X<in T>

hearty shard
#

heh

worthy rune
#

useful for delegates

true cedar
hearty shard
#

PAI

#

ur bad

upper vapor
# upper vapor let's benchmark
public record struct Amongus(int A, int B, int C);

public record struct Amongus2(int A, int B, int C, int D, int E, int F, int G, int H, int J, int K, int L, int N);

[MemoryDiagnoser(false)]
public class RefAndIn
{

    [Benchmark]
    public int ByRefSmall()
    {
        var small = new Amongus(1, 2, 3);
        return ComputeRefSmall(ref small);
    }
    
    [Benchmark]
    public int ByInSmall()
    {
        var small = new Amongus(1, 2, 3);
        return ComputeInSmall(in small);
    }
    
    [Benchmark]
    public int ByRefLarge()
    {
        var large = new Amongus2(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
        return ComputeRefLarge(ref large);
    }
    
    [Benchmark]
    public int ByInLarge()
    {
        var large = new Amongus2(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
        return ComputeInLarge(in large);
    }

    private static int ComputeRefSmall(ref Amongus small) => small.A + small.B + small.C;

    private static int ComputeInSmall(in Amongus small) => small.A + small.B + small.C;

    private static int ComputeRefLarge(ref Amongus2 large) => large.A + large.B + large.C;

    private static int ComputeInLarge(in Amongus2 large) => large.A + large.B + large.C;

}
#

huh

#

in is slightly faster

slate flume
#

Why is sending rolesyncinfo causing me to get kicked

#

I'm so confused

true cedar
upper vapor
true cedar
#

thats well within the error so

slate flume
upper vapor
#

@restive turret do oyu have fake role sync

upper vapor
slate flume
#

Do I

#

Not use RoleSyncInfo?

true cedar
upper vapor
#

check exiled

upper vapor
#

this is probs more optimized on newer .NET

slate flume
upper vapor
#

ran it on framework 4.8

upper vapor
slate flume
#

Not finding jack

upper vapor
#

idk 😭

true cedar
slate flume
upper vapor
true cedar
#

no for

#

large and small

#

well not 10x logner but

#

wait

upper vapor
#

yeah cuz more members, larger ctor

slate flume
#

Guess I'll just

#

Not use fake role sync?

true cedar
#

i cant do math

upper vapor
slate flume
#

I've got no options here cause I have no way to do this shit

slate flume
#

Oh this sucks ass

#

Okay

true cedar
#

MirrorExtensions...

worthy rune
hearty shard
#

paislee can i kill you

upper vapor
slate flume
#

@upper vapor thank you for the info 🙏🏼

upper vapor
#

np

true cedar
upper vapor
true cedar
#

ah yes get every single serialize sync vars method at once

#

don't do it lazily

#

and the classic fuckNorthwood variable

upper vapor
true cedar
#

even then

upper vapor
true cedar
#

its just wasted memory

#

at most you're gonna be fake syncing like. 4 things

upper vapor
#

❌ RueI
✅ TrueI

hearty shard
#

me when

true cedar
#

t(rue)

upper vapor
# worthy rune is there anyway to exclude that from the benchmark
public record struct Amongus(int A, int B, int C);

public record struct Amongus2(int A, int B, int C, int D, int E, int F, int G, int H, int J, int K, int L, int N);

[MemoryDiagnoser(false)]
public class RefAndIn
{
    
    private Amongus _small;
    private Amongus2 _large;

    [GlobalSetup]
    public void Setup()
    {
        _small = new Amongus(1, 2, 3);
        _large = new Amongus2(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
    }

    [Benchmark]
    public int ByRefSmall() => ComputeRefSmall(ref _small);

    [Benchmark]
    public int ByInSmall() => ComputeInSmall(in _small);

    [Benchmark]
    public int ByRefLarge() => ComputeRefLarge(ref _large);

    [Benchmark]
    public int ByInLarge() => ComputeInLarge(in _large);

    [Benchmark]
    public int ByValueSmall() => ComputeSmall(_small);

    [Benchmark]
    public int ByValueLarge() => ComputeLarge(_large);

    private static int ComputeRefSmall(ref Amongus small) => small.A + small.B + small.C;

    private static int ComputeInSmall(in Amongus small) => small.A + small.B + small.C;

    private static int ComputeRefLarge(ref Amongus2 large) => large.A + large.B + large.C;

    private static int ComputeInLarge(in Amongus2 large) => large.A + large.B + large.C;
    
    private static int ComputeSmall(Amongus small) => small.A + small.B + small.C;
    
    private static int ComputeLarge(Amongus2 large) => large.A + large.B + large.C;

}
#

yeah

#

passing a small local variable struct by value is the fastest as it seems

true cedar
#

solution: do not pass any structs. make everything a class

#

including primitives

upper vapor
#

typo

#

nvm

worthy rune
#

im confused

upper vapor
#

so if we have a local variable that is a small struct, passing it by value is fastest

worthy rune
#

huh

upper vapor
#

if you have a field, in is the fastest

worthy rune
upper vapor
#

ye

worthy rune
#

not sure if you can compare them

upper vapor
#

i mean true

#

for some scenarios you need a local variable, in toomuchtrolling others you refer to a field

true cedar
#

the joys of optimizing c# code

heady turret
#

How can i register event single? Like in Exiled - Exiled.Events.Handlers.Player.Verified += ...

upper vapor
#

just do that

#

PlayerEvents, ServerEvents etc

upper vapor
fresh zenith
#

how can i say lapi he shouldn't add this values to the config if they are empty?:

hearty shard
#

i dont think yaml supports this

fresh zenith
#

thats kinda anoying ngl...

hearty shard
#

i might be able to pr it IF yaml supports it

fresh zenith
slender lynx
#

@unique crane i think they left the balls on the gun

unique crane
#

😐

fresh zenith
#

seems like someone has more balls than the other.

restive turret
hearty shard
true cedar
restive turret
hearty shard
#

thats labapi code

restive turret
#

your code looks the same

hearty shard
#

wait

#

@unique crane

#

WHY

#

WHY DID YOU

#

also not using is not

#

💔

icy knoll
hearty shard
#

source

icy knoll
#

if it was decompiled that would make sense but ye

hearty shard
#

well unless nw compiles and then decompiles and puts that on repo

icy knoll
#

no

hearty shard
#

only lumi would do that

icy knoll
#

the code is just copied from an internal repo

#

😭

fresh zenith
#

hey uh how can i invoke an effect by its name?

#

wait nvm

hearty shard
#

is the thing

#

it is meant to throw but seeing it catch and then throw it again is weird

fresh zenith
#

yea idk does anyone have an quick solution how i can enable an effect via its name as an string?

hearty shard
#
public static StatusEffectBase GetEffect(this Player player, string name)
            => player.ReferenceHub.playerEffectsController.TryGetEffect(name, out StatusEffectBase? effect) ? effect : null!;
#

ssomething like that

still notch
hearty shard
#

im barely functioning

restive turret
#

Hi barely functioning

hearty shard
#

alright chat what do i reply

upper vapor
#

send this

#

i love this sun-kissed gif

celest thorn
#

What could cause the client to fall behind and to desync like on the movement only

#

by just sending primitives and thats it

restive turret
#

*fast

hearty shard
celest thorn
hearty shard
#

this was my response

#

i think it fits

celest thorn
#

but even calculating with TPS and Ping still its not enough

restive turret
#

And it send a Delta

celest thorn
#

it happens only on higher pings tho

restive turret
#

In some time you should stop it and send a full one then wait again

#

So like

celest thorn
#
        private IEnumerator<float> _SpawnRoutine(Player player)
        {
            var all = ClientSide
                .OrderBy(p => p.priority)
                .ToList();
            int total = all.Count;
            int spawned = 0;
#if LABAPI || EXILED
            int ping = LiteNetLib4MirrorServer.GetPing(player.Connection.connectionId);;
            Logger.Info(ping);
#endif

            while (spawned < total)
            {
                float tpsRatio = 1f;
#if LABAPI || EXILED
                if (Server.MaxTps > 0)
                    tpsRatio = Mathf.Clamp((float)(Server.Tps / Server.MaxTps), 0f, 1f);
#endif
                int dynamicChunk = Mathf.Clamp(Mathf.RoundToInt(DefaultChunkSize * tpsRatio), 1, total - spawned);

                int thisBatch = dynamicChunk;

                // spawn [spawned .. spawned+thisBatch)
                for (int i = 0; i < thisBatch; i++)
                    all[spawned + i].SpawnClient(player);

                spawned += thisBatch;

#if LABAPI || EXILED
                float ratio = Mathf.Max(tpsRatio, 0.01f);
                int pingFrames = Mathf.CeilToInt(ping / 125f);
                int waitFrames = Mathf.Clamp(Mathf.CeilToInt(1f / ratio) + pingFrames, 1, 8);
                for (int i = 0; i < waitFrames; i++)
                    yield return Timing.WaitForOneFrame;
#else
                yield return Timing.WaitForOneFrame;
#endif
            }
            if(!PlayersLoaded.Contains(player))
                PlayersLoaded.Add(player);
        }
#

Rn this is the logic

hearty shard
#

why do you #if LABAPI || EXILED

restive turret
#

Sending packets
Wait 1sec
Send packef
Wait 2 sec
Continue vig logic

hearty shard
#

when will it not be either of those

#

😭

celest thorn
restive turret
#

When inside a Unity Engine

celest thorn
#

and this comes from a old build

celest thorn
#

but i still don't quite understand why its happening

restive turret
#

You should wait more then

celest thorn
#

hmmm

#

for ping related tho

#

int pingFrames = Mathf.CeilToInt(ping / 125f);

restive turret
#

Well check on your client

celest thorn
#

should be changed

celest thorn
restive turret
#

What

#

Oh uh idk if NW has a function for re-enabling dev messages like that for litenetlib

celest thorn
#

so yea i should make it higher i guess if you have higher ping lovely

main zenith
#

is there a way to refrence a default human player model(not view model but whole class model) head transform(it can be rig or something like that)

restive turret
#

Yup

#

Why /125?

celest thorn
#

int pingFrames = Mathf.CeilToInt(ping / 125f); its time to change this :yippe:

celest thorn
#

i just divided by my ping

#

because it was the max

restive turret
#

Try idk less

restive turret
#

Or more

celest thorn
#

yea i should

main zenith
hearty shard
# hearty shard get role template
public static bool TryGetRoleBase<T>(this RoleTypeId roleTypeId, [NotNullWhen(true)] out T? role)
            => PlayerRoleLoader.TryGetRoleTemplate(roleTypeId, out role);
#

get role base

#

then use that to get the default

#

of ur role

restive turret
#

roling on my base

hearty shard
#

or if you have a player ur trying to get the model of, just use the players role

upper vapor
#

oh you moved it to support

celest thorn
#

I honestly tried everything and im loosing it

#

Even if i delay it myself manually it still not enough

#

😭

cobalt rivet
#

anyone here do commisions

viral rivet
#

Why when I give the Pocket Corroding effect it doesn't take the player to the pocket dimension but sends him and then sends him back?

hearty shard
viral rivet
#

thanks

random scaffold
#

labapi have ready method for send fake sync vars?

upper vapor
#

no

random scaffold
#

but what it?

upper vapor
#

i'm not sure you wanna fake sync player IDs