#plugins-dev-chat
1 messages ยท Page 26 of 1
no conversion though cuz i'm lazy
Enum.TryParse(typeof(RoomName), RoomType.Whatever, out var name)
So uhhh if I want to implement SSSS what should I do
You can:
- Opt to using a Lib, like https://github.com/Misfiy/SecretAPI and implement their SSSS solution (which is easier)
- Look at an example implementation in
UserSettings.ServerSpecific.ExampleslikeSSPrimitiveSpawnerExample
Guys should I use pluginapi, labapi or something else, and what is the difference between all of them
PluginAPI is now retired and no longer in use, it's been replaced with LabAPI!
If you're developing anything for the current version of the game and beyond use LabAPI or a supported 3rd party framework of your choice
Okay looks like I chose the right api, however there are no tutorials/guide/documentation for it. The github wiki seems outdated and idk where to exactly begin, any tips?
The wiki remains the best source of information about LabAPI I'm aware of, so I'd suggest starting with following the development tutorial there:
https://github.com/northwood-studios/LabAPI/wiki
If you have any questions or get stuck anywhere you're always welcome to ask here!
public static bool TryGet<T>(Player player, [NotNullWhen(true)] out T? setting)
where T : CustomSetting
{
setting = null;
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
if (player is null)
return false;
if (!PlayerSettings.TryGetValue(player, out List<CustomSetting>? settings))
return false;
foreach (CustomSetting toCheck in settings)
{
if (toCheck is T value)
{
setting = value;
return true;
}
}
return false;
}
you should never do that ๐ญ

and then ID will be different
would be useful for smth like a server specific player manager for staff or smth
idk
or a mute manager for scp prox chat
ig you can make a version for with id and without id
wont matter really
why don't you make player nullable
comically long Rider shut up comment
its a copy paste from a different project
i forgot to make it nullable
xd
Lol
it also shouldnt be null
This is why I use Notepad instead
so ill prob just remove null check
Sometimes Player.playerId can be null and I hate it
this guy is a knower
does hid lab not have its own DoorName?

if you search with tagname / string you prob find it
yeah i could, but that adds another NW issue onto my project
im starting to consider going back to exiled
at least enums make sense
me when most people resort to searching for doors via their unity name
same with rooms too lol

when secretapi update 
when i decide im happy w the mirror change and prefab store
wtf ๐ฅ
idk if prefab store works
so never
exactly
tf did u do
i dont know if i like this
did you add cams in the void
thats broken, should be fixed in 14.1.x
you can spawn them in a room first and teleport them, or just set the room up youself
is array or list better to store
array right
(store as in, no modifying it in the future, just permanent there)
yea
if you arent planning on appending or removing
i found the cameras making the server autistic i will remove them for now
atleast 079 works now ๐ญ
me when thats not an option for me
why have RoomName enum at all when you can use strings ยฏ_(ใ)_/ยฏ
i dont buy this, sry
that wasnt the point tho
the point was most ppl use string for it
idc what people use for getting that
imo NW should try to keep it updated, especially when it's a thing helps developers with searching for rooms
everyone can go out there and use unity names, but its just a lil dumb
especially when these can change over time and give you no compile issues
i think that the fact of people even using unity names in the first place already shows how the system is failing
You need to have the room set
I tried that and it didn't work ๐ญ
Which one?
i literally have no clue what ur issue is
i can probably test it rn
Right?!
I'm so confused bro
I know I'm probably doing something wrong I'm just not smart enough to know what
If I can do anything to help resolve this I'll do whatever
test on your own server with this
Will do o7
both are required to be updated to that version btw
theres some changes to the code
Well I'm launching my server I'll be testing in a sec
Literally what the hell am I doing wrong
I feel like it's inevitably the most obvious thing I just can't figure it out
I'm having the same thing as before, the menu pops up, just the keybind doesn't kill me, and I can't for the life of me explain what's going on
It's the exact same code how is this happening
Have you sent the code here yet?
This time I'm literally using the same DLLs
I assume you have no other plugins installed right?
Lemme try with it not there haha
^ called it
๐คฆ
Making an absolute fool of myself is my favorite passtime
I did start out with the wiki but I was left confused. For example should override Enable or should use the pluginentrypoint atttribute?
override Enable
there is no PluginEntryPoint
@hearty shard I apologize for the trouble thanks for being such a huge help
is it from another API?
PluginEntryPoint is from old api
deleted
gone
obliterated
ah I see, thanks

lol
wrong thumbs
XD
I assume there is still no lazy way to position multiple hints right?
use ruei
Kind of want to avoid using deps :\
create ruei urself
how can I broadcast a message to all players, like the one from remote admin panel
not cassie
Server.Broadcast maybe
Server.SendBroadcast();
almost
its auto generated
your IDE should be able to suggest methods to override
ah alr thnx
also the event methods are in PlayerEvents.cs, ServerEvents.cs etc
also if you have Rider you can just go to the original method
yeah ok found it after using F12
and view teh code
It might inherit the doc, not sure
hmm
auto generated source moment
do I have to call the base method?
I can'st access the Broadcast.BroadcastFlags enum (I presume), how can I reference the assembly?
you didnt reference the game assembly
Assembly-CSharp.dll
duh
right click "dependencies" in the project and "add reference"
or something similar
why just not a read the error?
they've read the error
the question was how to reference the assembly
I've never worked with assemblies before
bald
it's already there but it still gives me the error
or do I need a different one
why cant find DoorPermissionFlags?
sl references can be found in server files
ye, you specifically need Assembly-CSharp
SCPSL_Data/Managed
wtf ๐ญ
I used NuGet to set up the project, did I miss something perhaps
someone know?
Works for me
how can I add assembly-csharp.dll then? it doesn't list it in the reference manager
download the server files (the SL dedicated
go to SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed
reference Assembly-CSharp.dll file in there
on github or through steam?
Dedicated is on steam
got it
it worked thank you!
any special things I need to do before building? e.g. target platform or debug/release
Can the jailbird charged attack be disabled?
youll need to edit this but it works
[HarmonyPatch(typeof(JailbirdItem), nameof(JailbirdItem.ServerProcessCmd))]
internal static class JailbirdItemChargePatch
{
[HarmonyPrefix]
public static bool Prefix(JailbirdItem __instance, NetworkReader reader)
{
try
{
reader.ReadByte();
reader.Position -= 1;
JailbirdMessageType messageType = (JailbirdMessageType)reader.ReadByte();
reader.Position -= 1;
if (messageType == JailbirdMessageType.ChargeLoadTriggered || messageType == JailbirdMessageType.ChargeStarted)
{
if (API.Utilities.TryGetSummonedCustomItem(__instance.ItemSerial, out var customItem))
{
if (customItem.Item.Type == ItemType.Jailbird && customItem.HasModule(CustomFlags.NoCharge))
{
__instance.SendRpc(JailbirdMessageType.ChargeFailed);
return false;
}
}
}
return true;
}
catch (Exception ex)
{
LogManager.Error($"{nameof(JailbirdItemChargePatch)}: {ex.Message}\n{ex.StackTrace}");
}
return true;
}
}
oh god
reader.ReadByte();
reader.Position -= 1;
JailbirdMessageType messageType = (JailbirdMessageType)reader.ReadByte();
bruh what the hell boi
the lines i highlighted are completely redundant
[2025-05-21 14:52:00.469 +02:00] [STDOUT] Couldn't create a Convex Mesh from source mesh, within the maximum polygons limit (256). The partial hull will be used. Consider simplifying your mesh. Source mesh name: Sphere what ๐
Why this even happens
ok im so fucking confused.
Upon creating the Primitive, the Collider exists in my component
Later when I do Raycast, get my Component, the Collider is null?!
ok manually toggling the isTrigger doesn't work either. What the fuck is going on
Show code
i can be wrong but u cant turn a primitive collision to isTrtigger
player.SendFakeSyncVar(primitiveInstance.netId, "PrimitiveObjectToy.NetworkMaterialColor", 64, Color.blue);
public static void SendFakeSyncVar<T>(
this Player target,
uint netId,
string syncVarKey,
ulong behaviourMask,
T value)
{
var owner = NetworkWriterPool.Get();
var observer = NetworkWriterPool.Get();
Compression.CompressVarUInt(owner, behaviourMask);
int headerPos = owner.Position;
owner.WriteByte(0);
int payloadStart = owner.Position;
if (!SyncVarDirtyBits.TryGetValue(syncVarKey, out ulong syncVarMask))
{
Debug.LogError($"Unknown SyncVar key: {syncVarKey}");
goto CLEANUP;
}
owner.WriteULong(syncVarMask);
var writerDel = WriterExtensions[typeof(T)];
if (writerDel == null)
{
Debug.LogError($"No WriterExtension for type {typeof(T)}");
goto CLEANUP;
}
writerDel.Invoke(null, new object[]{ owner, value });
Debug.Log($"[FakeSyncVar] {syncVarKey} โ {value} (mask=0x{syncVarMask:X})");
int payloadEnd = owner.Position;
owner.Position = headerPos;
owner.WriteByte((byte)((payloadEnd - payloadStart) & 0xFF));
owner.Position = payloadEnd;
observer.WriteBytes(owner.ToArraySegment().Array, headerPos, payloadEnd - headerPos);
target.Connection.Send(new EntityStateMessage {
netId = netId,
payload = owner.ToArraySegment()
});
Logger.Debug($"[FakeSyncVar] Sent netId={netId}, {syncVarKey}");
CLEANUP:
NetworkWriterPool.Return(owner);
NetworkWriterPool.Return(observer);
}
Someone knows whats wrong because at this point i don't really know
[2025-05-21 13:14:58.846 +00:00] [STDOUT] [FakeSyncVar] PrimitiveObjectToy.NetworkMaterialColor โ RGBA(0.000, 0.000, 1.000, 1.000) (mask=0x40)
[2025-05-21 13:14:58.873 +00:00] [DEBUG] [FakeSyncVar] Sent netId=584, PrimitiveObjectToy.NetworkMaterialColor
goto 
i know scream at me later
what's just unity being unity
This only happens when I use the LabAPI wrapper.
If I spawn the primitive via GameObject.CreatePrimitive, it works
it should be lol
troll
btw you know something lol?
yeah i see now
like primitives don't really change at all
using NetworkWriterPooled writer = ...
then you don't need the return
no error in the client nor console
Ok thats 1 but really i don't know why its not working the client should be able to recieve the update
and i don't really know if that is happening nor if mirror even takes it
will show code soon, need to truncate it + restore into readable format
btw i have a question does anybody know if its possible and how to set class name via server for something else (i mean the display text of the living player)
remove it
set CustomInfo
are you writing the dirty bits twice?
no?
Read the code here
i don't think i am
you have to
Compression.CompressVarUInt(owner, behaviourMask); 2x?
Thx so much 
it's not that simple
owner.WriteULong(syncVarMask);
btw
var writerDel = WriterExtensions[typeof(T)];
if (writerDel == null)
{
Debug.LogError($"No WriterExtension for type {typeof(T)}");
goto CLEANUP;
}
yea?
public static void ProperWrite(NetworkWriter writer, object obj)
{
Type genericType = typeof(Writer<>).MakeGenericType(obj.GetType());
FieldInfo? writeField = genericType.GetField("write", BindingFlags.Static | BindingFlags.Public);
if (writeField == null)
{
Logger.Warn($"Tried to write type: {obj.GetType()} but has no NetworkWriter!");
return;
}
object? writeDelegate = writeField.GetValue(null);
if (writeDelegate is not Delegate del)
{
Logger.Warn($"Writer<{obj.GetType()}>.write is not a delegate!");
return;
}
del.DynamicInvoke(writer, obj);
}
thats my proper write thing
if (!SyncVarDirtyBits.TryGetValue(syncVarKey, out ulong syncVarMask))
{
Debug.LogError($"Unknown SyncVar key: {syncVarKey}");
goto CLEANUP;
}
owner.WriteULong(syncVarMask);
If magically i just do
owner.WriteULong(syncVarMask);
owner.WriteULong(syncVarMask);
if you only modify the primive's props then it should work
for now
just for now then i will start trying to do it for everything
for the data, write
- dirty bits (AdminToyBase)
- AdminToyBase properties
- same dirty bits as before (derived toy)
- derived toy's properties
Im just not understanding so i just need to write admin toys one
and then the one from the toy
owner.WriteULong(syncVarMask);
owner.WriteULong(syncVarMask);
I tried this but nope
maybe..?
64UL is the one
idk if that's correct since it depends on component order
64
is the syncvarmask
primitive objects have their colliders reset when the primitive type changes (also on start)
either patch Start() or delay the isTrigger modification
The strange is that I spawn the primitive at RountStart event, add custom component there and not change the type or anything
It only gets the networkbehavior component
If u not using that than the component list should be fine
honestly i don't know why that is a problem
var collider = SpawnUtil.SpawnObject(
new Vector3(0, 102, 5),
Quaternion.identity,
new Vector3(.5f, 3f, .3f),
new Color(1f, 0.92156863f, 0.015686275f, .7f)
);
var customCollider = collider.GameObject.AddComponent<CustomColliderBehaviour>();
customCollider.Init(collider);
and
public void Init(PrimitiveObjectToy baseObject)
{
Base = baseObject;
baseObject.IsStatic = true;
baseObject.GameObject.GetComponent<Collider>().isTrigger = true;
Logger.Info("Custom Collider Inited");
}
Which actually returns true
but the collider gets destroyed one frame later by the call to SetPrimitive in Start
-# Start is called on the first frame of the object being active
@upper vapor you know what i can do instead of calling fakesyncvar deleting and spawning it back 
i just cannot figure it out on why like its a week
YOOO i got
what was it
PrimitiveObjectToy(Clone) (netId=601): AdminToys.PrimitiveObjectToy OnDeserialize size mismatch. It read 24 bytes, which caused a size hash mismatch of 18 vs. 20. Make sure that OnSerialize and OnDeserialize write/read the same amount of data in all cases.
Like idk at this point
so yea this is code at this point idk
owner.WriteULong(0); before SyncVarDirtyBits if condition
how i can check scp can open a door or not?
wydm?
KeycardPermissionFlags doesnt exists in assembly lol
It does
update your references
public static void SendFakeSyncVar<T>(
this Player target,
uint netId,
string syncVarKey,
T value
)
{
using var observer = NetworkWriterPool.Get();
ulong behaviourMask = 1UL;
Compression.CompressVarUInt(observer, behaviourMask);
int headerPos = observer.Position;
observer.WriteByte(0);
int payloadStart = observer.Position;
if (!SyncVarDirtyBits.TryGetValue(syncVarKey, out ulong syncVarMask))
{
Debug.LogError($"Unknown SyncVar key: {syncVarKey}");
return;
}
observer.WirteULong(0); // sync objects
observer.WriteULong(syncVarMask);
observer.WriteULong(syncVarMask);
if (!WriterExtensions.TryGetValue(typeof(T), out var writerDel))
{
Debug.LogError($"No WriterExtension for type {typeof(T)}");
return;
}
writerDel.Invoke(null, new object[] {observer, value});
Debug.Log($"[FakeSyncVar] {syncVarKey} โ {value} (mask=0x{syncVarMask:X})");
int payloadEnd = observer.Position;
observer.Position = headerPos;
observer.WriteByte((byte) ((payloadEnd - payloadStart) & 0xFF));
observer.Position = payloadEnd;
target.Connection.Send(new EntityStateMessage
{
netId = netId,
payload = observer.ToArraySegment()
});
Logger.Debug($"[FakeSyncVar] Sent netId={netId}, {syncVarKey}");
}
try this
also
if (checkFlags.HasFlag(DoorPermissionCheck.Role) && player.RoleBase is IDoorPermissionProvider roleProvider && requester.PermissionsPolicy.CheckPermissions(roleProvider.GetPermissions(requester)))
return true;
As said.
Do write 0 before the first if statement
no need for two writers
its last
there's already a WriteByte(0) there
He does not writr fake sync object
right
Thats the position
i had it in my code but didn't notice it missing in zero's
Serializing writing SyncObject but admintoy doesn't have any
[2025-05-21 13:54:04.816 +00:00] [INFO] [MeowEditor.API] Works
[2025-05-21 13:54:04.826 +00:00] [DEBUG] [MeowEditor.API] [FakeSyncVar] Sent netId=571, PrimitiveObjectToy.NetworkMaterialColor
Nope
The first is writing the size temp
updated code
Code updated use that
i used that
Im about to say something
and the best to say it
is
IT WORKS
Oh
KeycardPermissionFlags
i thought you meant the other one
yeah no that doesnt exist
i also sent code for it already
checkFlags it what
door
the requester had no connection with the word "door"
actually doors have IDoorPermissionRequester
ye cus its a interface
PermissionsPolicy doesnt exists*
this is an example and is not valid code
in a door
again
you need IDoorPermissionRequester in your check
you call the method
with the door
also door DOES have it
not the labapi door
but the basegame
have you tried uninstalling visual studio 
it does
what is the type of RequiredPermissions
no 
logic
so you don't have the new version
latest version of the server
if using steamcmd add -beta public to the install command
nuh uh
server works with client
well ur clearly not on 14.1 ๐ญ
but server works with 14.1 client lol
then you haven't copied the DLLs
yes but
its server dll
you clearly arent using that
Publicized isnt the one included with SL
Re do the publicize
or reference the non publicized
yea
you did...
you're better off using BepinEx.AssemblyPublicizer.MSBuild
idk about u
but i dont see publicized there
exiled usually has publicized, which means you downloaded exiled references
and threw them in managed folder
@restive turret i hate nuget
๐ญ
skill issue
nuget.yml references just dont work
they look identical to me ๐ญ
how would i know
they said it gonna get removed
you are in exiled dc how could you not read about that
so r u
ok but
where does it say that
"read about that"
theres links to it and forwards
๐
i pinged u cuz one worked and the other didnt
yeah uh
but yes
YOU said "fixed it"
and tell me
where does the pr one unzip
correct?
they both do that

im about other
which?
@hearty shard clearly skill issue since this works for me
https://github.com/SlejmUr/CustomItemsAPI/actions/runs/15165220456/job/42641127782

you literally compared diff
and showed it being close
other than yk
nuget pushing to nuget
isn't it more efficient to access localScale directly?
by a single nanosecond maybe
But if you send it to existing users, what size will be visible to those who enter?
it would be much more efficient to only request the transform once
instead of 3x
What if I cache it by player with a dict to able to show fake scale to new joined players?
hmmm
yes
There's nothing as permanent as a temporary solution.

Well... isTrigger is true and I cannot move into it 
That straight up disabled the Collider
collide with deez
istn auto on when created?
yeah
they want a trigger though
so no collider on the client
but a collider on the server
if the collider is disabled then trigger does nothing

public void Init(PrimitiveObjectToy baseObject)
{
Base = baseObject;
baseObject.Flags = PrimitiveFlags.Visible;
Collider = baseObject.GameObject.AddComponent<BoxCollider>();
Collider.isTrigger = true;
Collider.enabled = true;
Initialized = true;
}

r/tihi
I lost the will to debug why SpawnToy kills it, but prefab spawn works
I mean, I somewhat know
but even now it doesn't work
because GameObject.CreatePrimitive is simple
PrimitiveObjectToy sets the primitive based on network data
in Start, it calls SetPrimitive which reassigns the collider
Right, but that is bypassed by doing a Timing.RunDelayed and then set Trigger, would that work in theory, right?
...
public Collider Collider => _collider ??= Base.GameObject.GetComponent<Collider>();
private PrimitiveObjectToy Base { get; set; }
private Collider? _collider;
private bool _skippedFrame;
public void Init(PrimitiveObjectToy baseObject)
{
Base = baseObject;
baseObject.IsStatic = true;
Timing.CallDelayed(
.2f,
() =>
{
Collider.isTrigger = true;
}
);
Logger.Info("Custom Collider Inited");
Initialized = true;
}
...
Yeah, that might not do it then
unity objects have custom lifetime checks
so is null or ?. or ?? don't work on them
I should learn unity first before doing cursed stuff
Thank you, rewrote it so it is assigned
you gotta use == null to check for null
or !unityObject
since the equality operator is overloaded
but the above operators don't use the overloaded operator
yeah many people dislike this important ""caveat
its just another "this is how the framework works, read the docs" moment
ye
Transparent primitives are cut off by the fog 
well uh
that happens
OH THE CLIENT DOESN'T KNOW ABOUT IT

The existing collider doesn't sync to the Client
the isTrigger
i love networking
Yeah but that completly disabled the collider and that makes the custom copmponent not work
aaaa
just enable it
did you try to say this the whole time and it just went woosh over my head?
perhaps
sometimes I even surprise myself
next step is figuring out if the player is pressing space
that is going to be fun
do i spoiler it
you can't
why couldn't i
i guess implementing cs water will be harder
rq AddingObserver is called when someone looks at 173 for the first time or everytime someone looks at 173?
i think it should be every time
you're not making CS, are you?
something closely related

addcomponent<boxcollider>
.isTrigger = true;
.Scale *= 1.1f;
ready
Didn't want to add a component when there is one alread
since I assume there will be 100 of these
damn Velocity is not synced like Gravity is
then just get
nw moment
It is now working so
is there a command to clear the server console?
clear
doesn't work
cls maybe
what is the difference between Started and starting, or spawned and spawning?
didn't work either
Ing runs before (usually means you can cancel), ed runs after the action
does setting IsAllowed to false cancel it?
Yep
thnx
Np
does it cancel on the next tick or immediately?
what do you mean by that
canceling the event prevents the base game code from executing instantly
i'm not sure how you'd cancel something on the next frame (it's already happened)
well you're setting a bool to a different value and not firing an event or returning, and I thought that the function would run every tick until it is finished, so before running in the next tick it would check if the bools would be true or false
I guess I misunderstood how it works
- the event args are created
- the event is invoked with the event
- the game checks if IsAllowed is false
since the event args are reference types, you can set parameters which will be reflected at the call site
the event itself is just an action, it doesn't return anything
hopefully that clears it up
hmm I see
i think you described a coroutine use-case here
not really what events do
but coroutines are pretty cool (and not limited to waiting for something to complete)
yeah I thought that it would be like the source 2013 sdk where you can set a "think" function that would get called every tick until it was overridden
idk why lol
is there an event that triggers whenever a player gains health or hume shield?
nope, you have to patch it in yourself
Is there a way to check if a player is opting out of SCP pick
has to be
yeah just found it in the scp preferences stuff
i kinda thought it'd just be on the Player class
would be nice to have it there
@random scaffold No issues on my side (a is logged when Escaping is trigger)
how can I disable the game from setting roles? do I set IsAllowed to false on the playerchangingrole event?
I believe so
I want to determine the roles on serverroundstarted
alr
guys does a plugin get reloaded (and thus all of its memory get wiped) when a round restarts or does the data persist?
It stays
Unless you have it set to soft restart server
Then everything is fully restarted
(such as rnr in console)
roundrestart (rr) doesn't clear it right?
Thank you, this worked!
I will can get ASN-player with "OnPlayerPreAuthenticating"?
hey, need a tiny bit of help. Im having an issue with server specific settings when trying to use it as a spectator.
right now im doing this:
private static void ServerOnSettingValueReceived(ReferenceHub hub, ServerSpecificSettingBase @base)
{
CL.Error("ServerOnSettingValueReceived called");
... ...
but that error will never appear in my console so im assuming the ServerOnSettingValueReceived just isnt being called for spectator?
It gets called when your a spectator
but im not reciving it back in my console. what would cause it not to call when im a spectator but work fine when im any other class?
It is registered right?
yup.
ssss for spectator?
yea thats what im trying to get atm
check
/// <param name="preventInteractionOnGui">Prevents key from being pressed when any popup window is active. Recommended to leave as "true" to prevent misinput.</param>
mm ok. ill look into that
this worked perfectly. Thank you sm 
um
but here nothing
bruh
public override void OnPlayerEscaping(PlayerEscapingEventArgs ev)
{
Logger.Info("escaping");
}
what plugins do you have installed
exiled
try removing it and try again
not sure i understand what you are saying
customeventshandler registered in exiled plugin
what does it have todo with this
We aren't responsible for their patches
If you want to use it, you will have to remove exiled
Dedicated or create game
exiled moment
lol
when will be added hcz049gate and hcz049newgate?
in door name
I have 0 clue what you mean by that
Some rooms/doors are missing names ig
^
173 gate in hcz049
Where's is the player's armor visual handled? Found WearableSync
does the disconnect event fire on any reason for disconnecting? banning, kicking, etc
I know they have their specific events too, but I'd like to be able to do something on disconnect without needing to check in every single one
cool name 173 gate
why custom info now have symbols limit??
because that need
Custom info code is unchanged from 14.0
then why if custominfo have more symbols than 399 its dont see?
No one changed this regex
Its been like that before
like in 14.0 we can use too many symbols in custominfo and [ ] in 14.1 we dont
As I said, there was no change to custom info in 14.1 except for making validation methods visible for server
So you see whats wrong with it
Not sure why you need 400+ characters for the custom info anyway
People use the Hint system to display additional info about a player
errrrrr
yes but
400+ characters?
maybe they want to play bad apple on player info
๐ญ
Also it is kinda inconvinient that formatting is also accounted for the 400
(not that you would need raw 400 chars displayed)
i mean its this amount
you dont rly need that
unless ur overriding every detail of a player
then adding some custom stuff thats 3x what basegame does

@heady turret wtf do you need that much characters for
that contain also html tags <color> and etc
yes but wtf r u doing
r u making someones tag a gradient or what
describe player visual, their weapons, their health staT
RP
so every detail of a player
๐ญ
yeah okay
makes some sense ig
but yeah limits always been there afaik
me when custom info
You can put part of it (like health) after player's name
Hi! Is it possible to add here custom symbols, if yes how?
Yes, two ways:
- Harmony patch
RemoteAdmin.Communication.RaPlayerListfunctionGetPrefix - Decompile the
RaPlayerList, copy everything into a new class and override it like this:
CommunicationProcessor.ServerCommunication[0] = new CustomRaPlayerList();
Second is cursed and might break next update, but it's harmonyless
just don't use exiled
me when every sl server still uses exiled
yea its understandable tho. NWAPI was ass ngl
And until servers fully switch to LabAPI it will take some time
20.0
and those are only on exiled as NWAPI was shit
port big plugin to labapi will be hard
so not

Hey
Don't insult my pal NWAPI
It helped me execute all my patches more easily
and also made our brains go boom trying to make a plugin.
cute gif
No need for an API if you have the base game and Harmony 
welp. fair
when framework for doom?

how can I make a multiline description for a key in my plugin config?
key?
yeah cuz # is required for it to be considered a comment
and \n does not generate a # on the new line created
so should I place \n# or is there a better way?
try and see idk
is there a way to give players a specific candy or will it give a random one when I give them SCP-330?
There is a givecandy command, you can look at the impl there, also there is a wrapper for it I think?M
public static Scp330Bag GrantCandy(
this ReferenceHub hub,
CandyKindID candyId,
ItemAddReason itemAddReason)
{
bool flag = false;
Scp330Bag bag;
if (!Scp330Bag.TryGetBag(hub, out bag))
{
bag = hub.inventory.ServerAddItem(ItemType.SCP330, itemAddReason) as Scp330Bag;
flag = true;
}
if ((UnityEngine.Object) bag == (UnityEngine.Object) null)
return (Scp330Bag) null;
if (flag)
{
bag.Candies = new List<CandyKindID>() { candyId };
bag.ServerRefreshBag();
}
else if (bag.TryAddSpecific(candyId))
bag.ServerRefreshBag();
return bag;
}
player.ReferenceHub.GrantCandy
thanks
I did the Harmony patch but then there are no names just ...
You need to check your client console, cause that could mean that the serialization failed
How can i use NetworkServer.SpawnObject without having a player to reference their Connection?
Can i reference the servers connection?
NetworkServer.Spawn
lol
huh
Pro tip, trying to set someone's role at the beginning of the round WILL crash your server
I need to learn how to read 
Look at code, you can just throw null in SpawnObject as well
Hm, for my use case i am saving the "Creator" of an object as a value of 'Player'
What should i do if i want to save noone in specific here, and instead just the server?
-# Or should i rewrite it to not need a Player saved ._.
If you meant to add custom "lines":
https://github.com/Axwabo/CommandSystem/wiki/Options
You could set it to null
NetworkServer.Spawn spawns the object for every connection
Thank you
Np
is this like https://github.com/aikar/commands
but on SL
lol
The structure looks the same
Wait
There is a problem in snake game, cuz if you play too much it overflows the AutosyncMessage Buffer when player joins, we also believe it's causing lags on servers
[2025-05-22 14:53:44.204 +03:00] [STDOUT] ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds
[2025-05-22 14:53:44.204 +03:00] [STDOUT] Parameter name: destinationArray
[2025-05-22 14:53:44.204 +03:00] [STDOUT] at System.Array.Copy (System.Array sourceArray, System.Int32 sourceIndex, System.Array destinationArray, System.Int32 destinationIndex, System.Int32 length) [0x000cb] in <13c0c460649d4ce49f991e2c222fa635>:0
[2025-05-22 14:53:44.204 +03:00] [STDOUT] at System.Array.Copy (System.Array sourceArray, System.Array destinationArray, System.Int32 length) [0x0002c] in <13c0c460649d4ce49f991e2c222fa635>:0
[2025-05-22 14:53:44.205 +03:00] [STDOUT] at InventorySystem.Items.Autosync.AutosyncMessage..ctor (Mirror.NetworkWriter writer, InventorySystem.Items.ItemIdentifier itemId) [0x0004e] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-05-22 14:53:44.205 +03:00] [STDOUT] at InventorySystem.Items.Autosync.AutosyncWriterBase.Send () [0x00010] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-05-22 14:53:44.205 +03:00] [STDOUT] at InventorySystem.Items.Autosync.AutosyncWriterBase.Dispose () [0x00000] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-05-22 14:53:44.205 +03:00] [STDOUT] at InventorySystem.Items.Autosync.AutosyncItem.ServerSendTargetRpc (ReferenceHub receiver, System.Action`1[T] extraData) [0x00020] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-05-22 14:53:44.205 +03:00] [STDOUT] at InventorySystem.Items.Keycards.ChaosKeycardItem.ServerOnNewPlayerConnected (ReferenceHub hub) [0x00007] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-05-22 14:53:44.205 +03:00] [STDOUT] at InventorySystem.Items.Keycards.KeycardItem.<OnTemplateReloaded>b__46_0 (ReferenceHub hub) [0x00008] in <2343be033e9f4e37923f780ece756d8e>:0
[2025-05-22 14:53:44.206 +03:00] [STDOUT] at (wrapper delegate-invoke) System.Action`1[ReferenceHub].invoke_void_T(ReferenceHub)
[2025-05-22 14:53:44.206 +03:00] [STDOUT] at ReferenceHub.Start () [0x00009] in <2343be033e9f4e37923f780ece756d8e>:0
Probably should report it as a bug
#1330097028088201247 message
I want add a badge or something next to the name or the other badges, for example if a player is in light put a wrench emoji next to it. (Just a full random example xd)
Similar but attributes aren't required
I think they're more convenient though
Not sure if the framework you mentioned has a feature similar to resolvers
And it most definitely doesn't have RA options
I'm impressed and a bit annoyed at the same time cuz this #1371227450025050123 is much more extensible compared to my RA options implementation
Though when I made RA options, dummy actions didn't exist yet
Seomthing like this?
Is there any way to access the server name as it appears on the server list?
I only know of Server.ServerListName but it appears empty, or maybe i did something wrong ._.
when do you access it
hm, seems its something from my team, not exactly sure when it fires
you cant do it that early probably
hm okay
You could check how ConfigurationLoader does it
Huh?
Isn't it an entry in the gamellay config
yeah i was gonna say ConfigurationLoader is for labapi
What type of RA implementation did you do ?
And when i see a video with this module I immediately thought I could do something cool with it.
It uses request data
So it's limited to 4 buttons
I made it like
2 years ago
Never realized the potential of dummy actions until I saw your plugin
It's pretty cool
oh yeah i see
guys why does player.AddItem() not work in OnPlayerSpawned event? does the class inventory overwrite it?
Ahah thx.
Use the GrantingLoadout event
When i delete a gameobject using NetworkServer.Destroy it doesnt seem to actually be destroyed..?
I put a regular BoxCollider on the gameobject and after the NetworkServer.Destroy call
Raycasts can still hit the collider, and scripts on the object stay running.....
how can I find this event, only thing I can find is OnPlayerReceivedLoadout
or is that what you mean
Yes (when you replay please ping me xd)
It is probably that
Probably that
alr thnx
Then you probably haven't called the method on the correct game object
Is it a networked object?
You should probably use Object.Destroy for those without a network identity
networked object?
use NetworkServer.Destroy
normal object?
Use Object.Destroy (specifically from UnityEngine namespace)
our dedi player keeps disconnecting leading to weird bugged servers ;-;
so im just patching out the Disconnect() functions for it
tired of that bug
bitch thats mine
Just add tag and this very rapidly decrease
what
<color <size ect..
add tag is more
Take a lot of char
So yeah 400 isn't a lot
wrong choice of words smh
Anyways kinda no happy mood so don't really care
I used LabAPIs RoundStarted to execute my script.
Your Init is called too early or something.... MER wont spawn my cube this early :v
its called when the plugin is enabled
the map hasnt loaded at that point
lmao
it literally says in the doc
"called when the plugin is first enabled"
my bad bro, idk why im acting like this ๐
my disappointment is immeasurable and my day is ruined
If their conflict between exiled and LabAPI you can tell is so we can fix it
Just make a bug report and we fix it
just skill issue
Reworked my speaker system to use batches with duplicate controller ids and it works like a charm
Thank you guys ๐
?
but Chaos keycards which are originate from Dummies does not update the SnakeEngine
like score and length stays 5-0
Keycards from real players gets updated
how can I clear someones inventory?
Player.ClearInventory
thanks
i swear dog when attacking would go visible
have i gone schizo
is that not how it used to be
is there a way to lock a specific door on the map e.g. surface gate
Door.Get()
check the overloads
Question to NW, is there any reason why the dedicated player should be able to be disconnected?
I completely patched it out, just making sure I'm not breaking anything doing so. But so far it doesn't seem to be the case.
It doesn't get disconnected on round restart
or on server shutdown
Wouldn't it just be easier if you just made it not disconnect at all
SnakeEngine is purely client side
so dummies dont do anything on it
Oooooh
I play and it doesn't get updated
pretty sure it disconnecting is a mirror bug, not something NW specifically coded in
yes and no
hang on actually
oh yeah nvm, thought NW wrote the connection that the dedi uses
Is Mirror the reason SL has a dedicated player
Players.Remove(ev.Player);
Is it normal that if i do this the player doesn't get removed from the list in the event PlayerLeftEventArgs because normally it works except here
or is that SL moment
sort of a SL moment
mirror doesn't need it lol
sl moment
also
Intercom
public bool CheckPlayer(ReferenceHub hub)
{
PlayerRoleBase currentRole = hub.roleManager.CurrentRole;
if (!this.CheckRange(hub) || !(currentRole as HumanRole).VoiceModule.ServerIsSending || VoiceChatMutes.IsMuted(hub, true))
return false;
PlayerUsingIntercomEventArgs ev = new PlayerUsingIntercomEventArgs(hub, Intercom.State);
LabApi.Events.Handlers.PlayerEvents.OnUsingIntercom(ev);
return ev.IsAllowed;
}
Make it possible to have non human role trigger (with event ofc)
Mostly annoyed that the host player can spawn if you're not careful, and the whole bag of issues that happen when the dedi player is disconnected
moving, reloading, interacting, talking, a ton of stuff randomly breaks
and sometimes not for everyone heh
yea btw like any clue on this why the Bean for the player changes somehow when in the PlayerLeft and is different?
it should
Although there's a lot of bugs with Player
yea i know
Stuff like players trying to be added multiple times to the list or something
but it doesn't if its disconnecting
I'd use the userid maybe
[2025-05-22 19:54:03.014 +00:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object.
[2025-05-22 19:54:03.014 +00:00] [STDOUT] at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00018] in
if(Players.Count > 0)
Players.RemoveAll(x => x.GameObject == null);
If i even try to do this it explodes
so i just don't know
yes because i need to do Player.Get()
all of the time
and its just annoying
Player.GameObject is just a shortcut to Player.ReferenceHub.gameObject
since ReferenceHub is a NetworkBehaviour I'm guessing it's null
NW should really make GameObject nullable in this case and do this.ReferenceHub?.gameObject
hmm so i should check if the referencehub is null
yup
you shouldn't hold players that way tbh, but checking that should fix your issue
huh.
PlayerRoleBase currentRole = hub.roleManager.CurrentRole;
if (!this.CheckRange(hub) || !(currentRole as HumanRole).VoiceModule.ServerIsSending || VoiceChatMutes.IsMuted(hub, true))
return false;
am i stupid
did you write that or
decompiler probs
it makes pattern matching funky
im confused about what you guys are talking about are you removing a player from a list inside the PlayerLeft event?
cuz CheckRange checks for HumanRole
i was so confused why intercom didnt throw null ref
๐
i dont think we override equality on the player wrapper, so im guessing they must be adding back the player somewhere
pvt. dedicated server
why shouldn't i do it like that?
that should be fine
the whole Player.Get() adding to the list if it isn't there is a BAD design decision imo
You screw up somehow and you end up with a ghost player
player should be the only one that does it iirc
so this is an issue?
Like my issue
i have a list
when the event playerleft gets called and i try to remove the player
it says its removed
but in reality its not
yeah thats unrelated
but still this is strange lol
i think you are adding the player back somehow
did you try logging when ever you add a player
btw your using the Player wrapper and not reference hub correct
Yes im using the player wrapper
alright, ill take alook into it then
yep its not getting added its like staying there
because when i join back it sanitize itself
removing the null players
this only happens tho on the left others work fine
https://github.com/northwood-studios/LabAPI/pull/144 this should help

