#plugins-dev-chat

1 messages ยท Page 35 of 1

upper vapor
#

though firearms have primary ammo containers usually

sweet flax
#

ok i'm just asking if this should be Base o GameObject or something diffrent

#

thanks man

upper vapor
#

on the base-game firearm, yeah

#

np

grand flower
#

How does the Custom role type work

hearty shard
grand flower
#

bummer

restive turret
#

Me neither

#

Don't think there is such a thing

grand flower
#

rip

#

Are you allowed to make custom additions to models via parented primitives

restive turret
#

You have to remake sl basically from ground up to be that moddable on server side

grand flower
#

hmmm

#

can you change the color of the tutorial playermodel

restive turret
#

No

#

Well probably on local but wont be replicated

grand flower
#

sadge

hearty shard
restive turret
#

In 19.7

grand flower
restive turret
slate flume
#

@unique crane where at

unique crane
#

You know very well that I cant promise anything..

hearty shard
#

PROMISE IT

unique crane
#

-loud buzzer-

grand flower
#

Is spawning primitives on a player verboten

restive turret
#

verboten

limber silo
#

it is not verboten at all

hearty shard
#

jesus ?!?!!?

limber silo
#

hey

hearty shard
#

hii

grand flower
#

I mean if I can't have custom models or colors I'll just fashion it myself mmLul

restive turret
#

Lmao

#

A moving amoguss!

unique crane
#

With that furry scp model...

grand flower
#

Lmao

unique crane
#

But it was like fully animated

grand flower
#

I just want some primitives serverside so players can know what flavour custom role it is

unique crane
#

Crazy

grand flower
#

Yeah that's insane

unique crane
#

What I would like to do is to finish labapi for the rest of the base game stuff

#

Wrappers and such

restive turret
restive turret
hearty shard
#

you might explode while doing it

#

you gotta get lucky

random scaffold
#

how i can give access or group to ra panel by plugin? If config doesn't have it

grand flower
#

On Mayhem we limit it to 100%

#

There's a bug that lets you survive a normally deadly effect that gives you 255% though, but it requires luck

#

We decided to keep it, if you manage it you deserve it hah

hearty shard
grand flower
#

Fair

hearty shard
#

lucky coins...

#

its cuz of the change i made

#

cuz like

#

the speedster used to be temporary

#

but now if you get a different one that stacks AND is permanent....

#

then it overrides....

#

its funny tho

#

so i keep it

grand flower
#

I program super defensively on Mayhem now

#

Because if I let a bug go through the community's gonna beg to keep it if it gives an edge

hearty shard
#

๐Ÿ˜ญ

#

50 QA testers for a 1 line change

hearty shard
grand flower
#

I'm just used to thinking about all the different edge cases from work

hearty shard
#

Testing in production >>>

grand flower
#

I don't wanna break servers too much

hearty shard
#

Nothing could go wrong

slate flume
#

How did you go about setting userID? I got the ReferenceHub dummy and tried dummy.authManager.UserId = null; but had no luck

grand flower
#

and also set the instance mode

#

to like, dedi server iirc

#

Question do bans do something funky to the player like disconnecting them twice

#

Just banned a cheater and our dcreplace plugin triggered twice for them

#

kinda weird

#

nvm issue on our end

slate flume
#

I did uh

#

And it still showed in player list

hearty shard
#

Show full code

#

i dont think it works on dummies

grand flower
#

It does

hearty shard
#

Oh

grand flower
#

But you have to make your own init code

#

You can't use DummyUtils.Spawn

#

oh

#

and you need a patch

#

sorry forgot about that one

#

but the patch to work will require you make your own dummy spawning method

#

Basically you need to block PlayerAuthenticationManager.InstanceMode's setter

#

And refuse any value other than DedicatedServer for your "custom" dummies

#

@slate flume

slate flume
#

Oh okie

#

Okie dokie ๐Ÿซก

#

I have an idea I want to implement but I want to know if it's stupid or not

#

My plan is: spawn a bunch of invisible dummies to pass voice messages through to make it so SCP prox chat works through the actual proximity chat channel

#

So I did this to the dummies

#

Will this still actually have the voice module follow the original player?

slate flume
#

At least when I tried it

hearty shard
#

ah

#

to make the dummy invis btw

#

Id recommend setting their size as like

#

0

#

player.GameObject.transform.localScale or smth

slate flume
#

OH

#

OH

#

GENIUS

#

This is why you get paid the big bucks

hearty shard
grand flower
#

not in the player list sure, but you'll need more work to make them disappear for spectators

grand flower
#

if you wanna show your support mmLul

#

would be sweet because the code you'll have to write for that is a little finnicky

slate flume
#

Sick

ionic prawn
#

Is there a template for commands, LabApi btw

fallen orchid
#

There's a Drone in this channel, and I can sense it...

#

Anyways, I'm going to make a coin flip plugin.

slate flume
#

I set localScale but they still somehow were killed

#

Maybe I just make invulnerable and hope for the best?

grand flower
#

Just make an event handler that denies any event against your dummies

slate flume
#

I need your expertise

#

This still creates a player on the player list but they're (null)

grand flower
#

Did you make the patch

slate flume
#

Yes

#

Very interesting

#

My full code is kind of cursed

ionic prawn
slate flume
# slate flume

Realized I never @ ed you @grand flower
If you're able to take a look at this sometime tomorrow or something and tell me what I did wrong I'd be forever in your debt O Wise One

grand flower
#

Make sure to give them a nickname

#

Also

#

You still didnt set the instance mode

#

@slate flume

slate flume
#

I'm just stupid

#

My bad

restive turret
slate flume
upper vapor
upper vapor
celest thorn
#

There's an alternative to VerifiedPlayer?

#

because OnJoined is Before Authentication

worthy rune
#

OnJoined happens on authentication

glass karma
#

are player connections marked as reconnected in some way between round restarts? I'd like to know if a certain player or connection is from a previous round. I know I can keep track of them manually, but I'd like if there's a cleaner way built into labapi or the game itself

worthy rune
#

i dont think anything like that is built into the game itself let alone the lab api

unique crane
glass karma
#

I see, thank you both

celest thorn
#

tho

worthy rune
#

it is, its called at the end of PlayerAuthenticationManager.ProcessAuthenticationResponse

upper vapor
restive turret
grand flower
#

You know your idea's gonna be good when you start using Desmos to balance things

#

like health over player count

carmine prawn
#

IStaminaModifier really funny in base game

#

@hearty shard thanks!

hearty shard
#

Huh

carmine prawn
hearty shard
#

the i stamina thing theres a property in there you should not use

#

I think its SprintingDisabled

#

Or smth idk the name of it

#

This is the solution for that issue

carmine prawn
celest thorn
#

so you are wrong

upper vapor
#

You need to auth the cat properly though

celest thorn
hexed girder
#

AHAHAH

celest thorn
#

your becoming annoying

#

blocked

#

:3

hexed girder
#

:3

carmine prawn
upper vapor
#

There are multiple modifiers

#

Like item usage speed modifier etc

carmine prawn
#

they seem to be in a lot of different namespace

upper vapor
#

Yeah

#

You could also look at the effect types

#

Since they are mostly in one namespace

#

And see what they implement

hearty shard
#

Also not every modifier will work

#

If its not server sided then it doesnt work

carmine prawn
#

that's going to be challenging

#

also

carmine prawn
hearty shard
#

disabling stamina on server = client still has stamina lol

carmine prawn
#

make client go to server
make server go to client

upper vapor
hearty shard
#

fuck making game engines

grand flower
#

Can you send unicode glyphs to players with the hint system

soft turtle
#

How to enable sounds via SpeakerToy for only one player and not for all?

SpeakerToy speakerToy = SpeakerToy.Create(referenceHub.transform, true);
speakerToy.Play(soundSample, false);
worthy rune
#

you can set the ValidPlayers filter to only accept the player

hearty shard
#

hiii riptide

worthy rune
#

hi

soft turtle
worthy rune
#

toy.ValidPlayers = x => x.Base == hub

soft turtle
soft turtle
# worthy rune ``toy.ValidPlayers = x => x.Base == hub``

How to make sure that each player has their own SpeakerToy?

        internal static IEnumerator<float> SearchScp(ReferenceHub referenceHub)
        {
            SpeakerToy speakerToy = SpeakerToy.Create(referenceHub.transform, true);
            speakerToy.ValidPlayers = x => x.ReferenceHub == referenceHub;

For some reason, all SpeakerToys listen to only one ValidPlayers, which is why only one player out of all of them hears the sounds

worthy rune
#

have a look at controllerId, each controlerId is on its own "channel"

soft turtle
worthy rune
#

nothing is stopping you from having more than 256 speakers? thats just the channel limit

soft turtle
worthy rune
#

yes

soft turtle
grand flower
#

What are you doing that requires playing 256 different sounds at once

upper pike
#

His goals are beyond our understanding

soft turtle
worthy rune
#

you can use a single speaker toy for that if your clever about it

upper vapor
#

Reuse speakers

#

Get one that isn't currently playing
If there's no such speaker, create a new one

unique crane
#

^

#

And even then you dont have 256 players

hearty shard
unique crane
#

Then your server dies instantly

hearty shard
#

nah id win

unique crane
#

Okay fine Ill give you 50โ‚ฌ if do server with 256 real players and play a whole round

icy knoll
restive turret
soft turtle
random scaffold
#

100 its over in scp sl for avg pc

#

or make validating ev.isAllowed= false;

icy knoll
random scaffold
#

who have more?

upper pike
main zenith
#

i need a little help i'm making SCP-372 plugin and i need to set his Player info to normal after death from

SCP372player.CustomInfo = "SCP-372";

SCP372player.ReferenceHub.nicknameSync.Network_playerInfoToShow &= ~PlayerInfoArea.Role;

how can i do that?

unique crane
#

Register to on dying and set the CustomInfo to an empty string?

main zenith
unique crane
main zenith
#

nv i figured it out

unique crane
#

That is default value

main zenith
unique crane
#

Alright cool

hearty shard
#

hi david!!

unique crane
hearty shard
#

fix my code

unique crane
hearty shard
unique crane
#

No fix then

hearty shard
#

anyway i think i finally understand the issue

#

#rueistinks

#

david

#

why does COM-15 here not have ammo

#

but A7 does

#

nvm it works now

#

๐Ÿ’€

#

ok so it works if i dont need to role swap

#

if the SetRole is called then it doesnt work

#

@unique crane wtf do roles do that affect whether a weapon given has ammo

unique crane
#

With ItemAddReason.StartingItem?

hearty shard
#

yea

unique crane
#

Might be

hearty shard
#

it works when i give it without changing their player role before it

unique crane
#

let me see

hearty shard
#

but only the com15 here is breaking not the A7

unique crane
#

MagazineModule & CylinderAmmoModule

hearty shard
#

heh?

unique crane
#

Yeah it like insta loads ammo from inventory to the magazine

slate flume
hearty shard
#

so i should give ammo

unique crane
#

Yes

hearty shard
#

first

#

ok

#

yea cuz ammos last given

unique crane
#

Remember to give it what you want + 1 mag

#

As it autofills it and removes it from the inventory

hearty shard
#

And A7 works cuz CI spawns with chaos ammo...

#

ok

#

thank uu

slate flume
#

Setting the instance mode and giving them a nickname did nothing

#

Well giving them a nickname made that nickname show up in the player list

#

But it made no significant change from before

#

They still show up

#

All the patch did was remove the Dummy player tag

slate flume
#

Why is it so hard to just remove a Dummy from the player list why

slate flume
#

Didn't work ore_sad

upper vapor
#

the synced user id must be null

#

then you can set _privUserId back to "ID_Dummy"

#

-# in the authManager of the reference hub

slate flume
upper vapor
#

uh

#

if that doesn't work

#

idk ๐Ÿ˜ญ

slate flume
#

๐Ÿ˜ญ

#

It's not in remote admin anymore though

unique crane
#

Spawn it and then set the synced stuff

slate flume
#

Gotcha

upper vapor
#

oh what i said was for RA

slate flume
#

I did the synced stuff after and uh

#

Yeah

worn gull
#

How can I spawn a door where the buttons will display what permission is need to open it?

worn gull
upper vapor
slate flume
upper vapor
#

right

slate flume
#

Why do I always end up breaking shit lmao

upper vapor
#

david

#

help

#

oh wait i didn't ping

upper vapor
unique crane
#

Uuuh let me check the condition for it to be added

upper vapor
#

i mean

#

do you need it to have a nickname?

#

no

#

@slate flume just don't give it a nick

unique crane
#

The mode should do it?

slate flume
upper vapor
teal junco
#

does audioplayerapi handle speaker controllerIds well?

slate flume
unique crane
#

Can you show me your code?

slate flume
#

Of course!

slate flume
unique crane
#

I aint patching expert but shouldnt you return false?

#

so it doesnt call the normal code

#

After

#

Since its prefix

slate flume
#

Uhm

#

I'll change it rq

#

See if that does it

#

I had it like that earlier but it wasn't working but maybe that with the other changes will do it

teal junco
# upper vapor wdym

Well I have a helper class that uses audioplayerapi but it seemed to cause issues with scp proximity chat (i think the controller ids conflicted). since audioplayerapi isnt framework specific i thought itd be okay to ask here. Its annoying because I dont have any direct control over it.

unique crane
#

What you think

upper vapor
#

they're just changing the input value

#

i'm not sure if the condition passes though

upper vapor
#

lemme look rq

slate flume
#

I think david might be right
I'm testing rn

#

Wait no

#

Shit

upper vapor
slate flume
#

That's what I had changed it to

slate flume
#

I'm uh

#

Confused

upper vapor
slate flume
#

Yeah I reverted it

#

But like why no work

teal junco
#

thats actually fire

upper vapor
#

yea

slate flume
#

It should just work

teal junco
#

i also just realized i dont know if i dispose the speakers correctly either...

slate flume
#

Ohhh lmao

#

I might know the problem

#

Maybe?

slate flume
#

Wait nvm that wasn't the issue

#

I changed the check to this but it had no change

upper vapor
#

cuz your dummies have no user id

slate flume
#

They have a _privUserId

#

But any synceduserid is null

upper vapor
#

right

slate flume
#

Maybe if I set that to null it'll fix ๐Ÿคท

upper vapor
#

what if you set the instance mode to unverified

slate flume
#

Uhhh sure let's try it

hearty shard
upper vapor
#

surely not

hearty shard
#

reminds me

#

i gotta test my npc

#

ive forgotten to do it for the past 2 weeks

#

๐Ÿ’€

teal junco
#

thanks tho

slate flume
#

I'm gonna crash out

hearty shard
#

@slate flume alr i can give u working code

slate flume
#

NOOO

#

PLEASE

hearty shard
#

wrong image

#

this one

teal junco
#

how about they make controller Id a 9 bit int instead

slate flume
#

:OOOO

#

PLEASE

#

I NEED IT

hearty shard
#
public static Npc Spawn(string nickname, RoleTypeId role)
        {
            GameObject gameObject = Object.Instantiate(NetworkManager.singleton.playerPrefab);
            if (!gameObject.TryGetComponent(out ReferenceHub refHub))
                throw new NullReferenceException("[Npc.Spawn] Could not find ReferenceHub");

            // TODO: Remove npc from Player List (N)
            try
            {
                refHub.authManager.UserId = null;
                refHub.authManager.InstanceMode = ClientInstanceMode.Host;
                refHub.nicknameSync.MyNick = nickname;
            }
            catch (Exception exception)
            {
                LabApi.Features.Console.Logger.Warn($"[Npc.Spawn] Failed to properly spawn:\n{exception}");
            }

            Timing.CallDelayed(0.1f, () =>
            {
                refHub.roleManager.ServerSetRole(role, RoleChangeReason.RemoteAdmin);
            });

            NetworkServer.AddPlayerForConnection(new DummyNetworkConnection(), gameObject);
            return new Npc(refHub);
        }
#

ignore the todo

upper vapor
#

host

hearty shard
#

i forgot to remove that

upper vapor
#

omg

hearty shard
#

oh and

teal junco
hearty shard
#

nickname doesnt work

#
Pet = Npc.Spawn($"{Owner.DisplayName ?? Owner.Nickname}'s Pet", Owner.Role);
#

will always show (null)

#

๐Ÿ’€

upper vapor
#

not an issue for them cuy it'll be invis

hearty shard
#

yeah but

#

๐Ÿ’€

#

i still need to fix it for myself

upper vapor
#

well crap

slate flume
hearty shard
#

up to u

#

i dont use the patch

#

works...

slate flume
#

Okay sick

hearty shard
#

until it doesnt work but sh

slate flume
#

What happen

hearty shard
#

well it works now

#

but it might break

#

i havent done thorough testing

slate flume
hearty shard
#

heh?

slate flume
#

When I set instance mode before connection it fucks me over

hearty shard
#

mines an error at

[2025-06-02 17:30:54.093 +02:00] [WARN] [EveLabs] [Npc.Spawn] Failed to properly spawn:
                                 System.ArgumentNullException: Value cannot be null.
                                 Parameter name: key
                                   at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <069d7b80a3914a08b6825aa362b07f5e>:0 
                                   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <069d7b80a3914a08b6825aa362b07f5e>:0 
                                   at PlayerRoles.Voice.VoiceChatReceivePrefs.GetFlagsForUser (ReferenceHub hub) [0x0000b] in <8db1ca0fe9a6484084cda320b139932c>:0 
                                   at PlayerRoles.Voice.VoiceModuleBase.SpawnObject () [0x0003f] in <8db1ca0fe9a6484084cda320b139932c>:0 
                                   at PlayerRoles.Voice.StandardVoiceModule.SpawnObject () [0x00000] in <8db1ca0fe9a6484084cda320b139932c>:0 
                                   at GameObjectPools.PoolObject.SetupPoolObject () [0x00012] in <50e7962387d5429a9799f24df7973b76>:0 
                                   at PlayerRoles.PlayerRoleManager.InitializeNewRole (PlayerRoles.RoleTypeId targetId, PlayerRoles.RoleChangeReason reason, PlayerRoles.RoleSpawnFlags spawnFlags, Mirror.NetworkReader data) [0x0006e] in <8db1ca0fe9a6484084cda320b139932c>:0 
                                   at PlayerRoles.PlayerRoleManager.get_CurrentRole () [0x00008] in <8db1ca0fe9a6484084cda320b139932c>:0 
                                   at PlayerRoles.PlayerRolesUtils.GetTeam (ReferenceHub hub) [0x00000] in
slate flume
#

Ohhh wait uh

upper vapor
#

0.1s delay?

slate flume
#

^

#

I need that

upper vapor
#

lol

hearty shard
#

oh cedmod is the one starting error

#

hmm

upper vapor
hearty shard
#
namespace CedMod.Patches
{
    [HarmonyPatch(typeof(PlayerAuthenticationManager), "InstanceMode", MethodType.Setter)]
    public static class NpcInstanceModePatch
    {
        public static bool Prefix(PlayerAuthenticationManager __instance, ClientInstanceMode value)
        {
            if (AudioCommand.FakeConnectionsIds.ContainsValue(__instance._hub))
            {
                if (value != ClientInstanceMode.Unverified && value != ClientInstanceMode.Host && value != ClientInstanceMode.DedicatedServer)
                    return false;
            }

            return true;
        }
    }
}
#
                                   at PlayerRoles.RoleAssign.RoleAssigner.CheckLateJoin (ReferenceHub hub, CentralAuth.ClientInstanceMode cim) [0x00007] in <8db1ca0fe9a6484084cda320b139932c>:0 
                                   at (wrapper delegate-invoke) System.Action`2[ReferenceHub,CentralAuth.ClientInstanceMode].invoke_void_T1_T2(ReferenceHub,CentralAuth.ClientInstanceMode)
                                   at (wrapper dynamic-method) CentralAuth.PlayerAuthenticationManager.CentralAuth.PlayerAuthenticationManager.set_InstanceMode_Patch1(CentralAuth.PlayerAuthenticationManager,CentralAuth.ClientInstanceMode)
#

huh

slate flume
#

What the hell is going on

upper vapor
#

it's always cedmod

slate flume
#

Maybe I need to blank slate it

hearty shard
#

ok it happens regardless of cedmo

slate flume
#

Start from a fresh plugin, no dependencies

hearty shard
#

and my local server shows the npc...

slate flume
#

But I would prefer to avoid that

hearty shard
#

oh

#

at PlayerRoles.PlayerRoleManager.InitializeNewRole (PlayerRoles.RoleTypeId targetId, PlayerRoles.RoleChangeReason reason, PlayerRoles.RoleSpawnFlags spawnFlags, Mirror.NetworkReader data) [0x0006e] in <2343be033e9f4e37923f780ece756d8e>:0

#

it calls that

#

early

#

hmm

#

wait what

#

hmm

#
System.NullReferenceException: Object reference not set to an instance of an object
                                   at NicknameSync.SetNick (System.String nick) [0x00079] in <2343be033e9f4e37923f780ece756d8e>:0
#

wtf is null in there

#

@unique crane can u help :3

hearty shard
#

possibly connectionToClient is null here

hearty shard
#

i got it

#

now i fix player showing in tab

slate flume
#

The problem is with this

#

Uh

hearty shard
#
GameObject gameObject = Object.Instantiate(NetworkManager.singleton.playerPrefab);
            if (!gameObject.TryGetComponent(out ReferenceHub refHub))
                throw new NullReferenceException("[Npc.Spawn] Could not find ReferenceHub");

            NetworkServer.AddPlayerForConnection(new DummyNetworkConnection(), gameObject);
            try
            {
                refHub.nicknameSync.MyNick = nickname;
                refHub.authManager.UserId = null;
                refHub.authManager.InstanceMode = ClientInstanceMode.Host;
            }
            catch (Exception exception)
            {
                LabApi.Features.Console.Logger.Warn($"[Npc.Spawn] Failed to properly spawn:\n{exception}");
            }

            Timing.CallDelayed(0.1f, () =>
            {
                refHub.roleManager.ServerSetRole(role, RoleChangeReason.RemoteAdmin);
                if (position.HasValue)
                    refHub.TryOverridePosition(position.Value);
            });
#

this works now

#

no error

#

but it does show in tab

slate flume
#

In tab?

#

Like in the player list?

hearty shard
#

yes...

#

trying to fix it

slate flume
#

Motherfucker

#

Why does setting instancemode before network connection cause everything to break

#

And why is it the only way rn to get someone to disappear from the player list

hearty shard
#

cuz some stuff is called on ref hub

#

the connection is null

slate flume
#

I patched it and it still breaks

hearty shard
#

idk the solution here

#

@harsh thorn sry for ping

#

whats the solution to hiding player from N

slate flume
#

It's inactive right now but when I implement this patch I get no more errors

hearty shard
#

or npc ig

slate flume
#

But it still kicks me from the game when the dummy is spawned

harsh thorn
hearty shard
#

oh

harsh thorn
#

also cant have a userid

#

must be ID_Dedicated iirc

hearty shard
#

userid is null for me

#

i swear ive tried DedicatedServer tho

slate flume
#

^
And I tried dedicated server earlier but it no work

#

^

harsh thorn
hearty shard
#

guh

harsh thorn
#

but if its set to null it might also work

hearty shard
#

oh

#

will try

#

yea nope

slate flume
#

^

hearty shard
#

ill try with patch

slate flume
#

I just

#

UGH

#

Okay I'll be back in a few minutes I need a snack bro

hearty shard
unique crane
#

Youuuu might need to destroy the player on client and respawn him again

#

Looking by the code

#

(base game one)

hearty shard
#

without it idk

#

but i can try it?

#

NetworkServer.Respawn(refHub.networkIdentity);

#

would that do the job

unique crane
hearty shard
#

nope

slate flume
#

So uh no progress?

hearty shard
#

nope

#

hmmm

#

thatd explain it

#

well idk if its completeing those

slate flume
#

This removed my dummy from player list but not from RA panel

#

Very interesting

upper vapor
unique crane
#

Player list is dependant on the InstanceMode

hearty shard
#

what does RA use even

#

for who to add there

unique crane
#

lets see..

hearty shard
slate flume
#

maybe

#

My full code is a little cursed

hearty shard
#

Nope

slate flume
#

That's

#

So

#

Odd

#

Maybe it's the fact that I do .SendSpawnMessage?

hearty shard
#

i do that too but after 0.5s

slate flume
#

Uhhhhh

#

Wtf

hearty shard
#

i do it for my size code

slate flume
#

Maybe you also need to set the _privUserId?

#

I'm a little confusion

unique crane
#

AHA

slate flume
#

DAVID

#

WHAT DO YOU GOT

#

SHOW ME WHAT YOU GOT

unique crane
#

You as server define what Admin receives

#

in RA menu

hearty shard
#

oh

#

right

#

thats how cedmod does the thing for showing reports...

#

damn

slate flume
#

SHOW ME WHAT YOU GOT

unique crane
#

RaPlayerList::ReceiveData(CommandSender sender, string data)

slate flume
#

Haha

#

Sick

#

Lemme patch it baby

unique crane
hearty shard
#

Oh

unique crane
#

Just patch it so it doesnt append the if the mode is Dummy

hearty shard
#

it ignores dedicated server tho

#

and thats what we set instance mode to

slate flume
#

^

#

Wat

unique crane
#

Well it only updates when you change the sorting?

slate flume
#

OHHH

unique crane
#

Or when new player joins

#

leaves

slate flume
#

So we just reupdate

#

How do

unique crane
#

it sends a giant string of names

#

bruh

hearty shard
#

mine STILL doesnt work for hiding in player list

slate flume
hearty shard
#

david why did u break it ๐Ÿ’”

hearty shard
#

i did

unique crane
#

Player list is purely dependant on the mode

#

not id

slate flume
#

It's interesting cause the thing that does it for me is NetworkServer.Respawn();

hearty shard
#

however

slate flume
#

Without it I get no fix

hearty shard
#

and i do prevent it from changing

unique crane
#

But the issue there is on the client

slate flume
#

Oh I use no patch

unique crane
#

It spawns on client

slate flume
#

No patches

hearty shard
slate flume
#

Do no prevent setting

hearty shard
#
foreach (Player target in Player.GetAll(PlayerSearchFlags.AuthenticatedPlayers))
                NetworkServer.SendSpawnMessage(player.ReferenceHub.networkIdentity, target.Connection);
slate flume
#

Trust

hearty shard
#

shouldnt this fix that

#

cuz i respawn them

slate flume
#

No patch

#

Trust

#

Fix everything

unique crane
#

On client is just registers to on mode change

#

Adds it on the first mode change

#

And then ignores any mode changes

hearty shard
#

but i prevent it

#

unless it defaults to smth that my patch isnt getting

slate flume
#

Trust me bro

unique crane
#

It might change to ReadyClient on the client for a sec

#

before you receive the Dummy or Dedicated mode

slate flume
#

I removed my patches and did NetworkServer.Respawn() and it works

unique crane
#

Oh see

#

do that

slate flume
#

^^^

#

I've been saying that this whole time

hearty shard
#

yeah no didnt work

#

now it shows as dummy

slate flume
#

WHAT

hearty shard
severe cave
#

Where does actionname enum is being used?

slate flume
#

This is all I do

#

Ong

slate flume
hearty shard
#

its a dummy now

unique crane
#

ActionName is client side

hearty shard
#

no patch = dummy

slate flume
#

I no understand

#

Why it no work for you

severe cave
hearty shard
severe cave
#

like can you give me an example

hearty shard
#

its client sided

severe cave
slate flume
#

Maybe it's the order I do it in?

hearty shard
#

use SSSS keybinds

slate flume
#

^

hearty shard
slate flume
#

There's this really cool thing called SecretAPI

#

FUCK

#

How tf

#

What happens if I wrap mine in a try-except

#

Also, how do I refresh the RaPlayerList?

slate flume
#

That's the problem

#

On god

#

On everything

unique crane
hearty shard
#

i already tried it

slate flume
#

FUCk

#

What

#

Why did my code break when I put it in try-except block then

unique crane
slate flume
#

Doesn't work

unique crane
#

console writeline

slate flume
unique crane
#

throw;

slate flume
#

I had it autofill

#

Okay

#

Shut up

#

I wasn't trying to make a proper try-except

slate flume
#

Fucking

#

Uh

#

What if I just spawn a dummy and then immediately destroy it to sync the RA list lmao

unique crane
#

Wouldnt be easier to just patch that out

#

to not send it when the mode is dummy or something?

#

Since you dont want that

#

(?)

slate flume
unique crane
#

Then mark the ones you dont want to

#

contains()

#

Skip

slate flume
#

Fax

#

Lemme try this first lmao

#

If it works consider me a fuckin genius

#

No harmony required

hearty shard
#

an yway

#

yeayh

#

idk why mine doesnt work

slate flume
#

WHY ARE MY DUMMIES BACK

#

WHAT

#

WHY DID IT BREAK ๐Ÿ˜ข

hearty shard
#

trolled

slate flume
#

what the freak

hearty shard
#

oh hey...

slate flume
#

Bro

#

Why are my dummies back in the player list

#

It was working before?

unique crane
hearty shard
#

[2025-06-02 18:55:18.029 +02:00] [INFO] [EveLabs] 2
[2025-06-02 18:55:18.045 +02:00] [INFO] [EveLabs] Unverified
[2025-06-02 18:55:18.061 +02:00] [INFO] [EveLabs] 2
[2025-06-02 18:55:18.076 +02:00] [INFO] [EveLabs] Unverified
[2025-06-02 18:55:18.091 +02:00] [INFO] [EveLabs] 2
[2025-06-02 18:55:18.106 +02:00] [INFO] [EveLabs] DedicatedServer
[2025-06-02 18:55:18.122 +02:00] [INFO] [EveLabs] Prevented setting to Dummy
[2025-06-02 18:55:18.138 +02:00] [INFO] [EveLabs] Prevented setting to ReadyClient

#

oh

#

its setting it to Unverified

#

do you think thats the issue

unique crane
#

Might be

slate flume
#

My code doesn't work anymore ๐Ÿ˜ญ

#

What the hell

hearty shard
slate flume
#

I literally reverted back to an old version

#

And tried it

#

And it failed

#

What

hearty shard
#

[2025-06-02 18:56:47.015 +02:00] [INFO] [EveLabs] Prevented setting to Unverified
[2025-06-02 18:56:47.031 +02:00] [INFO] [EveLabs] Prevented setting to Unverified
[2025-06-02 18:56:47.062 +02:00] [INFO] [EveLabs] DedicatedServer
[2025-06-02 18:56:47.079 +02:00] [INFO] [EveLabs] Prevented setting to Dummy
[2025-06-02 18:56:47.095 +02:00] [INFO] [EveLabs] Prevented setting to ReadyClient

#

so it only sets to dedicated

#

and yet

#

thats an issue

slate flume
#

So my fix didn't actually work?

unique crane
#

Yes I told you

#

First time it changes the mode it gets added

#

and then ignores any other change

hearty shard
unique crane
#

Hm

#

Might not on the client

random scaffold
#

eve moment

hearty shard
#

client HAS to be recieving smth different

#

yes

#

but then its a client sided thing

#

ill try smth

unique crane
#

Perhaps

hearty shard
#

nope

random scaffold
#

you can only change type

hearty shard
#

????

random scaffold
#

real player -> dedicated

hearty shard
#

logic what r u on about

hearty shard
#

its trying to set to dummy / readyclient

#

but i reject it

slate flume
#

Dawg

hearty shard
#

@unique crane can you see where in client it might be receiving it

#

or

#

setting it client

slate flume
#

Why the fuck is it so complicated to remove a dummy from the player list

hearty shard
#

cuz clearly its not server controlled entirely

harsh thorn
#

also, should probably mention

#

cant remove a player from the list after its already been added (other than despawning)

slate flume
#

So cedric

slate flume
#

We set instancemode before we send NetworkConnection and it breaks everything but works

unique crane
#

OH

slate flume
#

We set instancemode after and it no work

harsh thorn
#

instancemode is a syncvar

#

you cannot set it before networking the player

unique crane
#

What do you set the UserId too?

slate flume
hearty shard
#

ive tried null and ID_DEDICATED

#

top one

slate flume
hearty shard
#

i also reject it if its not host or dedicated server

harsh thorn
#

should be it

hearty shard
harsh thorn
#

but i havent touched manually spawning dummies for a while

#

its ID_Dedicated

#

not ID_DEDICATED

hearty shard
#

...

#

oh

#

i mean ive still tried that

unique crane
#

Ced is right

hearty shard
#

i mean i copied before from the thing

unique crane
#

And if its not one of the predefined ones, it sets it to ReadyClient

hearty shard
#

yea but i tried that

unique crane
#

so what might have happened is

hearty shard
unique crane
#

Unverified -> ReadyClient -> Dedicated

hearty shard
slate flume
#

^

#

Northwood moment

harsh thorn
#

this is how i spawned mine

#

which works

hearty shard
#

you dont use delay on role set anymore?

harsh thorn
#

this is old

hearty shard
#

damn

slate flume
#

Oh so you set UserId and instancemode before connection?

#

Gotcha

harsh thorn
#

apparently so

#

it could be that the server tries changing it to readyclient because some weird shenanigan
i do have a harmonypatch that prevents InstanceMode from gotten for a dummy as ReadyClient

hearty shard
#

that errored for me

slate flume
#

^

harsh thorn
#

try catch it

slate flume
#

It fucked everything up

slate flume
#

Not the actual line

#

It broke everything else

#

.IsPlayer breaks

#

Other code stops function

harsh thorn
#

i didnt counter it LaserShrug

#

but this is from 14.0

slate flume
#

When I do it that way it causes so much shit that it kicks me from the server

hearty shard
#

thats when
NetworkServer.AddPlayerForConnection(new DummyNetworkConnection(), gameObject); is called after the user id sets

harsh thorn
#

if that isnt working idk, what i posted worked for me back in 14.0, i havent messed with dummies that need to be hidden since

#

(note the empty catch)

hearty shard
#

well

#

its still not working

slate flume
#

whhhhhhhhhhhhhyyyyyyyyyyyyyyyy ๐Ÿ˜ญ

hearty shard
#

@unique crane ok so i think NetworkServer.AddPlayerForConnection(new DummyNetworkConnection(), gameObject); when client receives this it sets the instance mode

#

or SOMETHING

#

and it has to be before the serveer sets instance mode or errors happen

#

so im not sure how ur meant to go by that

slate flume
#

Why can't this be easy and nice

#

I did this and I get no errors in the console, but it still kicks me from the server

limber silo
#

what are you guys trying to do

slate flume
hearty shard
slate flume
#

^

hearty shard
#
GameObject gameObject = Object.Instantiate(NetworkManager.singleton.playerPrefab);
            if (!gameObject.TryGetComponent(out ReferenceHub refHub))
                throw new InvalidOperationException("[Npc.Spawn] Could not find ReferenceHub");

            NetworkServer.AddPlayerForConnection(new DummyNetworkConnection(), gameObject);
            try
            {
                refHub.authManager.UserId = PlayerAuthenticationManager.DedicatedId;
                refHub.authManager.SyncedUserId = PlayerAuthenticationManager.DedicatedId;
                refHub.authManager.InstanceMode = ClientInstanceMode.DedicatedServer;
            }
            catch
            {
                // ignore
            }

            refHub.nicknameSync.MyNick = nickname;
#

NetworkServer.AddPlayerForConnection is probably the issue

#

cuz it has to be there before we do stuff
but im pretty sure client receives it with instance mode that server didnt set to Hmm

unique crane
#

Well you set the id and stuff afterwards

#

Not sure how game handles that

hearty shard
#

yea

slate flume
#

Cause we literally can't do it before ๐Ÿ˜ญ

#

Everything breaks if we do

hearty shard
#

can you just make it so server can set instance mode and sync without it doing this on client ๐Ÿ’€

#

this doesnt work either

limber silo
#

try sending a fake syncvar changing the PlayerAuthenticationManager.SyncedUserId only in the player

hearty shard
#

apparently

#

so it wouldnt do anything would it

limber silo
#

let me see

hearty shard
limber silo
hearty shard
#

i mean ced says dedicated works fine

hearty shard
#

how would this be different from just setting it

limber silo
#

actually unverified will break some other stuff

hearty shard
#

normally

#

cuz i do set it

limber silo
#

well that also changes it on the server

hearty shard
#

thats fineeee....

#

probably..

limber silo
burnt hearth
limber silo
#

crashes or doesnt work

hearty shard
#

npc isnt hidden

slate flume
#

^

#

+1

hearty shard
slate flume
#

It removes the Dummy tag

#

But does nothing else

limber silo
#
public static ReferenceHub SpawnDummy(string nickname = "Dummy")
        {
            GameObject dummy = Object.Instantiate(NetworkManager.singleton.playerPrefab);

            if (!dummy.TryGetComponent(out ReferenceHub hub))
                return null;

            // We set the nickname before adding the dummy to the network.
            hub.nicknameSync.MyNick = nickname;

            // Then we can spawn the dummy with a DummyNetworkConnection which will mark it as a dummy internally.
            NetworkServer.AddPlayerForConnection(new DummyNetworkConnection(), dummy);

            return hub;
        }

try changing DummyNetworkConnection to a LocalConnectionToClient

#

and use that to spawn the dummy

#

this will automatically set the id to ID_Dedicated

#

so you can also skip manually setting that

hearty shard
#

something aint working cuz now theres no npc at all

#

oh

#

Player (unknown) (localhost) failed to authenticate: authentication timeout exceeded.

slate flume
hearty shard
slate flume
hearty shard
#

no crash here

limber silo
#

right it will request auth

hearty shard
#

but npcs dont spawn

#

yea

slate flume
hearty shard
#
[2025-06-02 19:41:28.309 +02:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object
[2025-06-02 19:41:28.310 +02:00] [STDOUT]   at Mirror.LocalConnectionToClient.Send (System.ArraySegment`1[T] segment, System.Int32 channelId) [0x00021] in <d73d070e2abb49cd982556c9f692e950>:0
[2025-06-02 19:41:28.310 +02:00] [STDOUT]   at Utils.Networking.NetworkUtils.SendToHubsConditionally[T] (T msg, System.Func`2[T,TResult] predicate, System.Int32 channelId) [0x00055] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-06-02 19:41:28.311 +02:00] [STDOUT]   at PlayerStatsSystem.SyncedStatBase.Update () [0x0003b] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-06-02 19:41:28.311 +02:00] [STDOUT]   at PlayerStatsSystem.PlayerStats.Update () [0x0000b] in <2343be033e9f4e37923f780ece756d8e>:0
#

oh....

slate flume
#

Why it do

limber silo
#

lets see, we can try doing a

/// <summary>
    /// A dummy network connection that does nothing.
    /// </summary>
    public class TempDummyNetworkConnection : NetworkConnectionToClient
    {
        private const string DummyAddress = "127.0.0.1";

        private static int _idGenerator = ushort.MaxValue;

        /// <summary>
        /// Creates a new instance of the <see cref="DummyNetworkConnection"/> class.
        /// </summary>
        public DummyNetworkConnection()
            : base(_idGenerator--)
        {
        }

        /// <inheritdoc />
        public override string address { get; } = DummyAddress;

        /// <inheritdoc />
        public override void Send(ArraySegment<byte> segment, int channelId = Channels.Reliable) { }

        /// <inheritdoc />
        protected override void SendToTransport(ArraySegment<byte> segment, int channelId = Channels.Reliable) { }
    }
#

try using that connection

#

but now you have to manually set the id do dedicated

slate flume
hearty shard
#

rename it to the proper one

limber silo
#

sorry change that to Temp...

#

yeah

slate flume
#

๐Ÿ‘๐Ÿผ

hearty shard
slate flume
#

WHAT THE FUCK

hearty shard
#

okay

slate flume
#

Who wrote this shit

#

I'm gonna rip them apart

hearty shard
#

@limber silo it works

slate flume
#

Holy fucking shit

limber silo
#

cool

hearty shard
slate flume
#

No fucking way

hearty shard
#

so yeah

slate flume
#

I'm gonna test this rn

hearty shard
#

its cuz the other was a dummy connection

#

so it set it to dummy type

#

and then told players "hey this is dummy"

slate flume
hearty shard
#

๐Ÿ˜ญ

slate flume
#

Why would you check the connection broooooo

slate flume
limber silo
hearty shard
#
public static Npc Spawn(string nickname, RoleTypeId role, Vector3? position = null)
        {
            GameObject gameObject = Object.Instantiate(NetworkManager.singleton.playerPrefab);
            if (!gameObject.TryGetComponent(out ReferenceHub refHub))
                throw new InvalidOperationException("[Npc.Spawn] Could not find ReferenceHub");

            try
            {
                refHub.authManager.UserId = PlayerAuthenticationManager.DedicatedId;
                refHub.authManager.SyncedUserId = PlayerAuthenticationManager.DedicatedId;
                refHub.authManager.InstanceMode = ClientInstanceMode.DedicatedServer;
            }
            catch
            {
                // ignore
            }

            NetworkServer.AddPlayerForConnection(new NpcNetworkConnection(), gameObject);
            refHub.nicknameSync.MyNick = nickname;

            Timing.CallDelayed(0.1f, () =>
            {
                refHub.roleManager.ServerSetRole(role, RoleChangeReason.RemoteAdmin);
                if (position.HasValue)
                    refHub.TryOverridePosition(position.Value);
            });

            return new Npc(refHub);
        }
slate flume
hearty shard
#
namespace EveLabs.Npcs
{
    using System;
    using Mirror;

    /// <summary>
    /// A dummy network connection that does nothing.
    /// </summary>
    public class NpcNetworkConnection : NetworkConnectionToClient
    {
        private const string DummyAddress = "127.0.0.1";

        private static int _idGenerator = ushort.MaxValue;

        /// <summary>
        /// Initializes a new instance of the <see cref="NpcNetworkConnection"/> class.
        /// </summary>
        public NpcNetworkConnection()
            : base(_idGenerator--)
        {
        }

        /// <inheritdoc />
        public override string address { get; } = DummyAddress;

        /// <inheritdoc />
        public override void Send(ArraySegment<byte> segment, int channelId = Channels.Reliable)
        {
        }

        /// <inheritdoc />
        public override void SendToTransport(ArraySegment<byte> segment, int channelId = Channels.Reliable)
        {
        }
    }
}
limber silo
#

but the auth system has some really old codebase part indeed

limber silo
hearty shard
#

oh also

#

dummies no longer show in RA whoops

#

me when i

limber silo
#

this is why I was saying the fake syncvar would be better

#

otherwise the server wont think it is a dummy

slate flume
limber silo
#

and wont show it on RA

slate flume
limber silo
#

dummies were a plugin thing before

#

then they were added to the game

hearty shard
#

ok fixed it

#

now only pets dont show

slate flume
#

Fucking hell

#

It crashed me

hearty shard
#

moment

#

works for me

slate flume
#

Me when

limber silo
#

I think I see the issue

#

NetworkSyncedId

#

so it syncs to the client

slate flume
#

Does this look right?

#

I wanna make sure i'm not doing something wrong

limber silo
#

remove the files

slate flume
#

Wdym?

#

I'm a little slow sorry

limber silo
#
ReferenceHub dummy = SpawnDummy(....
dummy.authManager.NetworkSyncedUserId = PlayerAuthenticationManager.DedicatedId;
dummy.authManager.SyncedUserId = PlayerAuthenticationManager.DummyId;
#

that should e why it wasnt working for both of you before

#

try that instead

#

that should keep the dummy in RA but hide it from the list

#

@hearty shard try that instead

#

funny not using the Network variable moment

slate flume
#

UserId
SyncedUserId
NetworkSyncedUserId

#

That's funny

slate flume
#

Nope

limber silo
#

when mirror compiles SyncVars they generate a property called Network__fieldName__ which is the one used to sync them

limber silo
slate flume
#

Delay between spawn and setting userID?

limber silo
#
ReferenceHub dummy = SpawnDummy(....
Timing.CallDelayed(1, () => {
    dummy.authManager.NetworkSyncedUserId = PlayerAuthenticationManager.DedicatedId;
    dummy.authManager.SyncedUserId = PlayerAuthenticationManager.DummyId;
}
slate flume
#

Didn't work

hearty shard
#

it wont hide when its already set as a dummy once