#plugins-dev-chat
1 messages · Page 19 of 1
Are there any plans on changing LabAPI-Beta directory name?
Good question
prob if not be in beta
I hardcoded it in a few places and it'd suck if it's changed in 14.1 release..
Best time to change it to PathManager.LabApi
It will be changed
Those are standalone console apps 😭
Well in that case I am sorry
move paths to a config file
check all subdirectories of the SL folder and check if it contains LabAPI
creating a folder labapi-trap

that remindss me
or a .
?
It'll be LabAPI in 14.1 release, right?
capybara collisions don't work
and hide it
bru
disabling them keeps the colliders
also why is there a collisionsenabled property
networkcollisionsenabled does the same thing
extra call to setcollidersstate
because you have to disable/enable them both client and server-side
and thats what that property does
me when mirror isnt mirroring
Network_collisionsEnabled does that, too
if the syncvar changes, it invokes SetCollidersState
so the non-network property is redundant
But hook is client-side
So what you did is disabled colliders client-side only
and kept them on server
but they don't get disabled 😭
they do
@unique crane or when it's planned?
if you set Network_collisionsEnabled, the colliders still get changed on the server (via SetCollisionsEnabled)
but CollisionsEnabled also calls SetCollidersState by itself which is redundant
hooks also get executed on the server
sue mirror
Oh
pc crashed when starting unity gg
average david message
unity 
Half time of game dev is waiting for unity
best worst engine
unity is so fun to make games in
98% crashes
just the 10 hours it takes to load is the least fun part
*most
No that is the fastest part
script compilation: running backend
😭
hold on...
application.enterplaymode
Switching from dedicated server profile back to normal one is funny
I have to restart unity
Oh and close VS
otherwise it doesnt build
what
Yeah VS locks the source files or whatever
And then build fails
Maybe I just need to close it in the IDE?
dont know
¯_(ツ)_/¯
poggies
i think same issue about rider
I have like 15 project in one VS
give me source and i'll test
thats simply skill issue

eve would say that
I can imagine
but is it SL-scale?
-# new freedom unit unlocked
well well well
looks like the _collisionsEnabled field is ticked in the inspector
this works
i wonder how many the labapi is now
where can I see mine?
eerily similar to ushort.MaxValue
Analyze -> Calculate code metrics
6 lines left
short.MaxValue*
lmao
also did it show the other metrics for you, i never actually used them so idk what good values are xD
had to unselect my things
You have to set it to true and then to false wtf
wait
you just have to tick a box
Oh this also reminds me to add it to spawn command

tf is Depth of Inheritance mean
" Indicates the number of different classes that inherit from one another, all the way back to the base class."
I wonder what's the value for Assembly CSharp
3 miéliion
redo it
until it reaches 100
My plugins are better than sl source code confirmed 😎 😎 😎
SNake has 83
Hello world
^
obv empty projects or codes below like 200 lines does not count
100 times hello world
Console.WriteLine("Hello world!");
I mean no
Pasting it a 100 times is not maintainable
I mean its just rough average of what the maintainability is...
Yeah
i wonder what it takes to get under 20
And to be fair it used to be a lot worse 😄
5 years later, the nightmares about QueryProcessor.cs has finally stopped
meanwhile CustomNetworkManager
maintainability is just math
it's
not really a
how do i say this
it's not a "real" metric
numbers alone can't tell you how good the code is
don't let this metric get to non-technical project managers 😭
"um Jared i don't think you should be speaking because your maintainability index is only 99... just rewrite the whole codebase, how many story points would that be?"
no pőlz
pőlz
ik
i love plugin magic
ghost hand
I wonder what kind of results id get if i ran scp sl rounds with several stat trackers
ive always kind of wanted to collect scp sl scientific data.
Like what
Not scientific really but
like how many of each item is dropped, thrown, used, picked up and by what percentage of which classes
how many kills each gun gets and in the hands of what % of which classes
so to make cool looking graphs
Yes
But I cant get 20 random players
I could ask an already active server to help me collect data but nobodys gonna be like "okay sure i will install this plugin you made :)"
friendly fire incidents, who gets the most ff damage and who gets the most ff kills 
You would have to clean these data like hell
if you wanted something useful
Cause you get 1 raiding idiot who throw grenade into elevator
and its all useless
Yeah. Ive never collected data before so idk how exactly to organize it
make a global stats plugin
No that is valid data
cedmod and another guy already did this
keep it anonymous unless people sign up on the site and link their accs
dont know who the other guy is and rly? cedmod did?
pretty sure cedmod tracks stats
and yeah another guy did
well do it again
joseph fallen although that's for exiled
and better!!
oh man this is a whole lot of new stuff to learn
nahh its shrimple
Yea
Solution: tostring in console
I probably wont make a stats plugin

since nobody will use anyways
i saw someone requesting it a while ago
im sure plenty of zap hosters and related will use it
idk about the people that actually have their own dedi though, they seem to care about security a bit more :p
yeah
I wonder if it breaks eula to track how many seconds people talk for
oh thats a good stat
aslong as its anonymous its fine
Time spent on radio
Time spent on intercom
Time spent talking
time spent talking: astronomical
honestly
Average time spent as spectator
its smth i wanted to do
but i cba to make a website
nor do i feel like paying to store allat
Time spent on radio / Time spent talking * 100 == 0.082%
Radio experience:
AAAAAAAAAA
I feel like such a server would be pretty cheap to maintain
Pick up -> press alt voice chat -> play single soundboard -> drop it
like probably a $5 per month vps would cover that
heres a vsr breaker:
record all voice chat
run it thru ai
and track the frequency of words
in scp sl?
i was just thinking about whether local server processing to detect nwords in vc would be allowed
No that is not allowed i believe
Yea like directly in game it aint possible (as far as I know
speech to text of course
You can do it if you send the data to a lib
same as discord apis
with enough layers of abstraction you can do anything
all of them is newer than 4x
including sending data from 4.8 app to a dotnet core app
You can just make your own
same on ai
discord is just HTTPS
Most frequent word prediction
Fuck (and variations thereof)
second most frequent word
N word
yeah but
i dont have a job
😭
Gamble in cs
Wahh
I think sending the stats to a central db is the problem
although there are several ways to do that for free
If your doing global stats plugin then you pay for it XD
theyre not all wise
but free
I came up with a system where it gives a discord token to the plugin and the bot sends the data in a channel
and you have another bot running locally to process that
@harsh thorn sorry for ping, but there is a critical bug in labapi, breaking a lot of stuff with custom damage to SCPs
https://github.com/northwood-studios/LabAPI/issues/112
is this reproducable without exiled?
yes
and monomod
and could you post the stracktrace without those
so its just pure labapi
give me a moment 
Harmony 2.3.x
Oh
harmony no longer includes monomod in its assembly
or smth i forgot what the exact change was
https://cdn.discordapp.com/attachments/472406493229219860/1370555323777024133/2025-05-09_20-17-05.mp4?ex=681fec9c&is=681e9b1c&hm=35d46012408b7ff91c9d9ae0a88e9f4b935307fd8de58490610e27b2530361fe&
https://cdn.discordapp.com/attachments/472406493229219860/1370556965759090758/2025-05-09_20-23-45.mp4?ex=681fee24&is=681e9ca4&hm=7066d933e8fd2bfa87820e3beeea4d258963be27db36ece624e88b2143773e4e&
Camera toys can't be accessed by SCP-079 sometimes, even tho the room is assigned, does someone know why?
it happens randomly
any errors in server/player logs?
Uh question, any issues where after changing role sometimes Player.Position doesn't work anymore?
It's not the actual position of the player
I had to switch ReferenceHub.transform.position
And then I switch to an SCP and that one doesn't work anymore
I'm very confused
Is there a "catch all" method to get the current position of the player
both Player.Position and ReferenceHub.transform.position should be the same unless the player is not a FPC role. it could be because of the the spawn flags used, if the spawn point flag is enabled then position gets overridden right after the event. you should be able to use OnPlayerSpawnedEvent instead if thats the case
I grabbed it on tick so grabbing it wasn't the issue
but good to know, what are examples of FPC roles?
Wouldn't 106 be one 
any first person role, so humans and scps(not 079)
i think it stand for First Person Control, you can check if a role is an FPC role by doing player.RoleBase is IFpcRole
Well the repro is "simple":
- Spawn as NTF
- Make simple gameobject that gets a reference to a Player, and moves to the Player.Position in Update.
- Spawn it. I do so through a console command using the sender to determine the Player reference to hook the gameObject to.
- Should be at your position
- Change yourself to spectator. I handle the PlayerChangedRole event -> if spectator, destroy the gameObject that's hooked to the player.
- Respawn as NTF again.
- Respawn the gameobject through console command.
- It appears to stay where you were right before switching to spectator
hmmm, that sounds like it should work. especially because you say its activated by a console command which means issues like i mentioned above dont apply. i would have to see the code myself as im certain what you described should work
can't send the exact code for reasons but pretty much this
// Component on the gameObject that sticks to a player.
private void Update()
{
if (!IsReady)
{
return;
}
if (gameObject.ReferenceHub.roleManager.CurrentRole is IFpcRole {FpcModule: not null} fpcRole)
{
// Owner is Player
var position = Owner.Position;
fpcRole.FpcModule.ServerOverridePosition(position);
}
}
@worthy rune
the gameobject is a dummy
oh boy i wonder where i can go today
looks like the PlayerFollower component used for dummies, im thinking it could be something weird with dummies then as i remember sometimes the follower would break
oof
well if I have it happen again and I manage to figure out why i'll let you know
odd
How does one enable verbose logging?
havnt heard of it for sl plugins
thought there were some, nvm
trying to figure out why im being dropped by my local server when i switch role
in a pretty nasty way, my client doesn't even get the memo heh
hmmm, the LocalAdminLog usually contains errors that are not logged to the Console(unless you set your local admin up differently) that could be what you need
where can I access it?
they should be in a folder named LocalAdminLogs i think next to where the root plugin folder is
did get that bug again
strange
ah
I've got exceptions if it helps
[2025-05-09 22:44:11.783 -07:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object.
[2025-05-09 22:44:11.784 -07:00] [STDOUT] at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00018] in <6869b1608d104370ab4484f8f699b3fc>:0
[2025-05-09 22:44:11.784 -07:00] [STDOUT] at UnityEngine.Transform.set_position (UnityEngine.Vector3 value) [0x00006] in <6869b1608d104370ab4484f8f699b3fc>:0
[2025-05-09 22:44:11.784 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FirstPersonMovementModule.set_Position (UnityEngine.Vector3 value) [0x00000] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-09 22:44:11.784 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FpcNoclip.UpdateNoclip () [0x000e7] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-09 22:44:11.784 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FirstPersonMovementModule.UpdateMovement () [0x0002a] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-09 22:44:11.784 -07:00] [STDOUT] at PlayerRoles.PlayableScps.Scp049.Scp049MovementModule.UpdateMovement () [0x00021] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-09 22:44:11.784 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FirstPersonMovementModule+<>c.<Init>b__109_0 () [0x0000e] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-09 22:44:11.785 -07:00] [STDOUT] at (wrapper delegate-invoke) <Module>.invoke_void()
[2025-05-09 22:44:11.785 -07:00] [STDOUT] at StaticUnityMethods.Update () [0x00009] in <cd0f416419d2407d959ea40b2a3b21c8>:0
9 mb of this spam
looks related yeah
p much started happening when the dummy stopped following me
after respawning a few times
agh
might be my fault, sec
my guess was going to be somewhere using destroy on the gameobject of the player
yeah faulty code on my end it seems
forgot changing role, even between two "alive" roles, re-creates your player
doesn't update the data on the gameobject

but good to know about the exceptions being in LocalAdminLog, ty
wouldn't have found that otherwise heh
Yep works perfectly with the fixes, have a good day
Added a request on GitHub as well for a Silent effect. Name can change but it'd basically be the equivalent of SilentWalk except it shuts up the player's role. 096 crying, 106 breathing and the sort. Any kind of noise they make just by existing.
Would be neat
could be usefull, will have to talk to beryl about it
If you get disconnected with the message "The server was forced to stop the connection.", Local Admin should display a message starting with Disconnecting connId={id} to prevent exploits from an Exception in MessageHandler. This is helpful if you've got 731654 more exceptions in the logs and need to track the kicking one.
do anyone have a snippet how to add velocity to grenade projectile ?
Scp018Projectile scp018Projectile = (Scp018Projectile)Scp018Projectile.SpawnActive(pickup.Position + (Vector3.up * 2), ItemType.SCP018, player, 5);
scp018Projectile.Velocity = new Vector3(URandom.Range(-5, 5), URandom.Range(-5, 5), URandom.Range(-5, 5));
or if no Velocity use Rigidbody.linearVelocity
I have a few recommendations (unsure if this is the correct place for feedback). I noticed that there seems to be quite a number of events involving player damage, and I believe it would be better if they were encapsulated into a single event, similar to this
public class PlayerDamagedEventArgs
{
public Player Receiver { get; }
public Player? Sender { get; }
public DamageHandlerBase DamageHandler { get; }
// other propertiess, etc
}
By doing so, you'll also need to add a damage type property to the DamageHandlerBase
[Flags]
enum DamageType
{
Bullet,
Explosive,
// etc.
}
Additionally, it would be nice if we could add/scale/subtract damage using the DamageHandler.
PlayerHurtEventArgs exist btw
no it doesn’t 
so are we serious
you’re just seeing things
no
😭
ur just seeing things
power of explosion
youre not #sigma
nvm still getting these kinds of issues
a little annoying
And when does this happen?
So far mostly after changing role a few times
the first role change or two work, but any more and it just breaks
debugging some more
yup
change role once, all good
change role twice, all good
third time? breaks
[2025-05-10 12:26:59.561 -07:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object.
[2025-05-10 12:26:59.561 -07:00] [STDOUT] at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00018] in <6869b1608d104370ab4484f8f699b3fc>:0
[2025-05-10 12:26:59.561 -07:00] [STDOUT] at UnityEngine.Transform.set_position (UnityEngine.Vector3 value) [0x00006] in <6869b1608d104370ab4484f8f699b3fc>:0
[2025-05-10 12:26:59.561 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FirstPersonMovementModule.set_Position (UnityEngine.Vector3 value) [0x00000] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-10 12:26:59.561 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FpcNoclip.UpdateNoclip () [0x000e7] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-10 12:26:59.562 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FirstPersonMovementModule.UpdateMovement () [0x0002a] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-10 12:26:59.562 -07:00] [STDOUT] at (wrapper delegate-invoke) <Module>.invoke_void()
[2025-05-10 12:26:59.562 -07:00] [STDOUT] at PlayerRoles.FirstPersonControl.FirstPersonMovementModule+<>c.<Init>b__109_0 () [0x0000e] in <cd0f416419d2407d959ea40b2a3b21c8>:0
[2025-05-10 12:26:59.562 -07:00] [STDOUT] at (wrapper delegate-invoke) <Module>.invoke_void()
[2025-05-10 12:26:59.562 -07:00] [STDOUT] at StaticUnityMethods.Update () [0x00009] in <cd0f416419d2407d959ea40b2a3b21c8>:0
// In my custom dummy destroying method
if (dummy.roleManager?.CurrentRole is IFpcRole { FpcModule: not null } fpcRole)
{
fpcRole.FpcModule.ResetObject();
}
this p much fixed it
That was close call
Anyone know why this would happen?
Disconnecting connId=0 to prevent exploits from an Exception in MessageHandler: NullReferenceException Object reference not set to an instance of an object.
at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Firearms.Attachments.AttachmentGameObjectGroup.SetActive (System.Boolean state) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Firearms.AnimatedFirearmViewmodel.UpdateAttachments (InventorySystem.Items.Firearms.Firearm fa) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Firearms.Attachments.AttachmentsUtils.ApplyAttachmentsCode (InventorySystem.Items.Firearms.Firearm firearm, System.UInt32 code, System.Boolean reValidate) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Autosync.ModularAutosyncItem.OnAdded (InventorySystem.Items.Pickups.ItemPickupBase pickup) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Inventory.UserCode_TargetRefreshItems__ItemIdentifier[] (InventorySystem.Items.ItemIdentifier[] ids) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkIdentity.HandleRemoteCall (System.Byte componentIndex, System.UInt16 functionHash, Mirror.RemoteCalls.RemoteCallType remoteCallType, Mirror.NetworkReader reader, Mirror.NetworkConnectionToClient senderConnection) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient.OnRPCMessage (Mirror.RpcMessage message) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient+<>c__DisplayClass56_0`1[T].<ReplaceHandler>b__0 (Mirror.NetworkConnection _, T value) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkMessages+<>c__DisplayClass9_0`2[T,C].<WrapHandler>g__Wrapped|0 (C conn, T msg, System.Int32 _) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkMessages+<>c__DisplayClass8_0`2[T,C].<WrapHandler>b__0 (Mirror.NetworkConnection conn, Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient.UnpackAndInvoke (Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient.OnTransportData (System.ArraySegment`1[T] data, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorClient.OnNetworkReceive (LiteNetLib.NetPeer peer, LiteNetLib.NetPacketReader reader, System.Byte channel, LiteNetLib.DeliveryMethod deliverymethod) [0x00000] in <00000000000000000000000000000000>:0
at LiteNetLib.NetManager.ProcessEvent (LiteNetLib.NetEvent evt) [0x00000] in <00000000000000000000000000000000>:0
at LiteNetLib.NetManager.PollEvents () [0x00000] in <00000000000000000000000000000000>:0
Sometimes get my client disconnected from the server on spawn
haven't seen this message before, but server commited unalive
server didn't, I just got "kicked" out
Are you by chance trying to update attachments on non-existing firearm item?
I can reconnect to the server but i'm in a softlocked "connected but not really" state on the client
hmmm that's a good start, I'll check our code
we seem to null check everything
any chance of NW just adding a null check in AttachmentGameObjectGroup.SetActive? 
Sooo was I right?
we null check everything from what I could see
So the answer issssss
unlikely? unless it somehow passes a null check and then we set attachments
this exception also doesn't always fire
sometimes I get it frequently, sometimes once every 20 spawns so idk
but also should you really get soft locked like this for a null attachment? The client checking on its side and just logging an error or something would be a lot better
Since I do not know what your exactly doing I cant really help yknow
never had this error thrown
idk what exactly is causing this issue since it's not reproduceable reliably :c
i'll let you know if I get more info
seems to be from System.Void InventorySystem.Inventory::TargetRefreshItems(InventorySystem.Items.ItemIdentifier[])
the RPC
so i'll hunt that one down
Do you know what fires this RPC? Having a hard time finding it nvm
Inventory.ServerSendItems()
Lads what do you all think about something like this: https://github.com/northwood-studios/LabAPI/issues/118
Now implement ingame and send code to mr devs
Even just a concept would be great (like idk programming one?)
https://github.com/northwood-studios/LabAPI/issues/39 cant believe this might not get approved
Goal Description The ability to hide a player in Tab (Maybe RA too / Player Count) to allow a player to be not counted, eg. to allow Overwatch to do their thing. Can also be used to hide NPCs, coul...
iirc the issue was with hiding players
Hiding as what context
something to consider would be pooled objects
you'd need to handle primitives on roles (character model) being put in the pool
how would that be handled?
Removing from RA list?
RA list player count and N
yeah
just remove the player 
then they are invis
and now pets are useless
💀
just make them out of primitives so they wont show on the list 

ngl I have no clue what pooling are we talking about
when a role is disabled it gets put in a pool so it doesn't have to be instantiated for later use
not sure but i think the character model is part of the role object
Destroy the object when model gets pool'd 
how do you detect that in a child though
you can add a component that checks for the pool object's state but that isn't very efficient
If player role is changed, send a destroy message or smth
someone at NW will figure it out 
is there a guarantee that clients pool objects in the same order as the server does? not sure
Correct
Would it be plausible to have an argument to check the object pool when sending a destroy message? Would something break if a game object that is a child of another object in pool is suddenly gone?
That could be a solution
if a game object that is a child of another object in pool is suddenly gone
if the server sends a message with the destroyed child's netID then the client basically dies
as you've stated in the issue there could be a way to tell the server about an object being destroyed
but if the round-trip isn't fast enough... you're cooked
Would it be plausible to have an argument to check the object pool when sending a destroy message?
i suppose so with a new destroy message
How would you know what object does that netid standa for?
i mean as a DestroyPotentiallyPooledObjectMessage or something
and not mirror's built-in one
since the client needs to handle the pool check itself
it would still send the netId because we can only destroy networked objects
The thing is we cant promise anything
is there a reason why it cant be ?
like i get not promising
but idk it feels doable
I think that the issue was with hiding player from player count
you mean to central servers?
That too yea
hmm
Player List (N)
RemoteAdmin
Centrals Player Count
Also hiding from RA/Playerlist would require additional stuff to be done
Playerlist.Remove(player)
troll
@unique crane would it be possible to potentionally attach a player id onto a speaker (not implemented but as an idea) to allow muting that player muting the speaker ?

you can use SSSS in the meantime, though not as straightforward for players ofc
make an issue ig
ah yes just make an setting for each player
not like the mute feature is already in the game, just the server doesn't get the details
in the meantime
until smth is made to make it possible
yea
you can also make volume customizable with SSSS
i mean sure, it's a stupid workaround, albeit the only one possible rn
commands (persist with files)
but yeah, it should be possible to check if someone has muted someone, or do what nameless said
me when i now have to add a database
death
that would be great indeed
issue made
what
are there any other use cases besides not sending specific voice messages to that player?
me when json
thats it
just voice checks
SQLite
me when just write a lines from a HashSet

i
WriteAllLines idk
rephrased it
YOU
yea and im providing the method
Hm?
hi davy
i know i just englishn't'ed
haiii
Is there a reason why CommandExecutingEventArgs.Arguments contain the command itself?
Or is that intended change from the PluginAPI's way?
i just checked and it doesnt look like it contains it, did you use index it with []
Considering this getter, it should contain
also my logging also fetches the first index
thats correct
Yup
Arguments.Array references to the original array
so all good
Arguments itself has only the arguments after the cmd name
hope this helps
Hmm I see
So it is something I'm doing wrong, thank you!
That answers a lot
time to dive in why
try ElementAt() instead of []
i think theres .At()
is there
Ah I found the reason:
During migration I falsely migrated the para mstring[] args to string[] args = ev.Arguments.Array!;
which caused the problem
yeah that would do it
sooo
who will make the website with keycard generating
for commands
someones gotta do it
its on you
me when no ItemAddReason
Hey, is there any known way to spawn these lights in?
hey guys, stupid question, how do i enable global intercom for a player? is it Player.isintercomMuted?
OnPlayerSendingVoiceMessage
Should work if you change the voice channel to Intercom
@warped prairie
Check how the intercom command works
item being null
Hi! How can I get the camera which I'm looking at. I'm trying it with raycast but if I look to the camera then it gives me the wall.
So I'm a D-class and I look at the camera which is at the Cells and I want to get that camera.
you might have to change the layer mask of the raycast to hit cameras see this for the full collision matrix #plugins-dev-chat message
cameras are on the CCTV layer iirc
also changing the layer should fix any issues of the raycast hitting the player
Thanks, I will give it a try
does anyone here know how item limits are assigned
like how the game determines which item is in which categories
item.Category
is that how the programmers decided it?
because thats the question I wanted to answer specifically
GD supervisor says its more complex than that so
Yes, we change ItemBase.Category
I assume you are referring to why we are not changing SCP-127 to be part of both the Special Weapons and SCP category
yeah its based on that convo
It is complex because ItemBase.Category (or ItemBase.ItemCategory, don't remember the name of the field) is a single-value enum
To do that change we would have to either change ItemCategory to be a [Flags] enum
Or make items have an array of categories
Both changes would require us to change any instance of us checking for a single category
oh thats what i assumed
To either use .Contains or .HasFlag
Pretty much
In either case, we just don't have enough time to make this change during this beta without crunching
also wouldnt it technically be better to make it a flag enum so it can use one 32 bit int instead of several 32 bit ints for each enum
thats probably not a healthy line of thinking but im just wondering
Either solution is fine, but I'd probably go with the flags as well
hi beryl
Only because it would be easier to write/read the values when sync-ing
that doesnt seem like something that needs to be synced
true actually
sooo when syncable CustomName 
😔 I'll give you a spoiler and say you (plugin devs) are getting one last treat this beta
Using tmp to make custom item icon
YAY
leak the entirety of 15.0 update rn
Not this though, but its a fun one
I don't make the rules 😔
||There will be an update||
Happy to help
aw
leaked too much
Bye Beryl
ggs
Its been fun 🫡
i just fired him
SL 2 is officially cancelled
beryl make literally everything have sync override
oh hell nah
😡 This is what the lazy SL devs are trying to prevent you from having
i gotta rewrite my customrole stuff at some point
why does one of them work
oh
event and the other is a pointer
😭
or whatever its called
i forgot
arrow
Property
why
do you mean lambda
yeah that is an arrow
ur so rihht
wait so are only fields syncable
yes
also note that syncvars only work on network behaviours which itemBase is not
Well I should try to do networking then
yeah
i did get a website about it from someone
sucks to suck
make everything a net behavior
real
trust
For every joke you make, there's been at least a dozen people make that statement seriously
😔
I do think it would be sick if it was possible to sync everything in the game
but obviously you have to choose some things over others
why not do it ?!?!?!?!
i cannot believe this
Working on this has made me appreciate multiplayer games so much
Well I did once unironically ask why NW can't make Roles procedurally generated client side based on a number of synced properties like translation key/name, playermodel key, color, team, etc
In theory, we could do something like that, and there were plans for it, but its a lot of work for something we don't have time for right now
But it is something we've said we would like to do at some point in the future
Plans are barely ever scrapped, just put on the backburner
wtf thats crazy
Networking is something i still barely understand
I applaud anyone willing to wrestle with that shit
Tbf we have been saying for years that we wanted to add custom keycards
beryl im gonna hire you to sit in a corner (-5 a day)
so youre saying youd add that same idea to roles
If possible? Can't say what it'd look like as we are not implementing it rn, so I'm unsure of any limitations we'd hit while working on it
But being able to customize roles a little bit more is not something we're against doing at all
Just need to find the right time to do it
wow thats actually kinda crazy
never really thought that was a thing thatd happen
as long as the intro text can be fucked with ill die happy
Or deleted
Yeah its lowkey annoying its one of the things i wanna get rid of for customroles
Please make some const non constant so in serverside we can change the cooldown and others 🙏
at least most other things im interested in can be mocked via custominfo or primitives
Amogus figure
Like wdym
If I go args.IsAllowed = false;
on PlayerPickingUpItemEvent, why can't I "pick it up" again
Or start the pickup
i feel like im the only one who's used it to the full potential
Since not only one plugin wants to set custom info
the regex is kinda limiting although i understand why it exists
Its mostly customrole plugins from what i can see
Ye and xp system
sounds like a labapi issue, can you open an issue here https://github.com/northwood-studios/LabAPI/issues so we dont forget
Contribute to northwood-studios/LabAPI development by creating an account on GitHub.
well for the most part i just say well just make custominfo features a toggle
and if needed have someone program a compatibility layer
Okay
SlejmUr
OWNER
Level 99 - BOSS
CI Terminator
Chaos Insurgency Maranduer
thats why i think exiled wrapper should have a custom rolename manager
i made my own using custominfo but its janky and doesnt work with other plugins
at least not well.
its messy but if you focus you can see the player has a white nickname and custom role name
i achieved that by using custominfo
1.5 units in unity engine
No i did some sort of multiplication im not sure what
heres the patch i added to the custominfo setter so other plugins can use it properly but not the same as mine.
https://github.com/icedchai/omni-plugins-pub/blob/main/Omni-Utils%2FPatches%2FNicknameSyncPatch.cs#L21
Omni-2 roleplay utilities, plus goggles plugin. Contribute to icedchai/omni-plugins-pub development by creating an account on GitHub.
its 1.6f * players y scale
its possible to spawn glass, because i've seen in the past someone do it
Nope
But I believe you can teleport existing one
somehow?
No copying wont do anything
what if it's just a semi-transparent primitive 
Thats easier
Hook onto player shoot event, check if it hit the primitive
send hitmat
last time i tried to teleport a breakable window (1+ year ago lol) the reflections didn't work so it was invisible from some angles
hitmark
Destroy if needed
custom window done
Or you might just give it component to detect hits
an IDestructible-implementing component perhaps
pretty sure that would work out of the box
yea
That don't violate VSR? https://discord.com/channels/330432627649544202/1371227450025050123
We patched stuff like that on our end
You can check Room.IsDestroyed which checks for validity
So we made Room.List only return valid rooms
idk why it doesn't already do that
¯_(ツ)_/¯
ok so
i cant for some reason figure out how to do this properly
CoinEffect? selectedEffect = null;
List<OutcomeType> fails = ListPool<OutcomeType>.Shared.Rent();
while (selectedEffect == null)
{
IEnumerable<OutcomeType> outcomes = EnumUtils<OutcomeType>.Values.Where(v => !fails.Contains(v));
OutcomeType? randomOutcome = outcomes.IsEmpty() ? null : outcomes.GetRandomValue();
if (randomOutcome == null)
goto breakPoint;
foreach (CoinEffect effect in Registered)
{
if (effect.Type == randomOutcome && effect.CanUse(player))
{
selectedEffect = effect;
break;
}
}
}
it just
feels horrendous
whatcha trying to do
public static void ActivateRandom(Player player)
{
CoinEffect? selectedEffect = null;
List<OutcomeType> fails = ListPool<OutcomeType>.Shared.Rent();
while (selectedEffect == null)
{
IEnumerable<OutcomeType> outcomes = EnumUtils<OutcomeType>.Values.Where(v => !fails.Contains(v));
OutcomeType? randomOutcome = outcomes.IsEmpty() ? null : outcomes.GetRandomValue();
if (randomOutcome == null)
goto nullCheck;
foreach (CoinEffect effect in Registered)
{
if (effect.Type == randomOutcome && effect.CanUse(player))
{
selectedEffect = effect;
break;
}
}
}
nullCheck:
if (selectedEffect == null)
{
Logger.Error($"{nameof(ActivateRandom)}: Could not find suitable effect for {player.DisplayName}");
goto breakPoint;
}
selectedEffect.Activate(player);
breakPoint:
ListPool<OutcomeType>.Shared.Return(fails);
}
basically
go through and find a suitable thing
i try and have it so all the outcomes are equal really
but if one isnt found for the outcome then it will go to next
if it fails on all outcomes it will return fully and not cause errors
Something like that?
public static void ActivateRandom(Player player)
{
List<OutcomeType> outcomes = ListPool<OutcomeType>.Shared.Rent(EnumUtils<OutcomeType>.Values);
CoinEffect selectedEffect = null;
do
{
OutcomeType randomOutcome = outcomes.GetRandomValue();
outcomes.Remove(randomOutcome);
foreach (CoinEffect effect in Registered)
{
if (effect.Type == randomOutcome && effect.CanUse(player))
{
selectedEffect = effect;
break;
}
}
}
while (selectedEffect == null && !outcomes.IsEmpty());
selectedEffect?.Activate(player);
ListPool<OutcomeType>.Shared.Return(outcomes);
}
Hi! How can I make custom keycards with plugin?
I would use LINQ to get all effects that the player can use first
Looping until you get a valid value is inefficient
i made my coin plugin completely differently
so i just wrote something that would work for EVE's implementation
not efficiently
cause the core idea is not efficient
Eh, doesn't mean it can't be a little more efficient
var filteredEffects = Registered.Where(e => e.CanUse(player));
public static void ActivateRandom(Player player)
{
var possibleEffects = Registered . Where(e => e.CanUse(player)) . ToList();
if (possibleEffects . Count != 0)
possibleEffects . RandomItem() . Activate(player);
}
if you're only trying to activate a random effect
spaces cuz automod doesn't like me
not sure why you'd need all those loop shenanigans
yeah nvm i see what the problem is
well, filtering the effects first would probably help at least
yeah this would be the first thing
with ListPool instead of ToList for maximum(?) efficiency
I don't get the whole fuss of using list pools for everything
If it's not a hot path why bother
less allocations, less "random" GC spikes
cuz the GC doesn't run immediately after the method call
if i'm calling something every frame sure, for one offs ehhh
fair
SL already does a pretty good job at being inefficient
you might be able to use inline arrays if you know the max effect count at compile-time
literally 0 heap allocations in that case

Hi not braining
In theory there shouldnt be any destroyed rooms in Room.List as we subscribe to an event from the base game that is raised inside OnDestroy of RoomIdentifier. just double checked and it seems everything looks to be ok, so i can only assume some error happened somewhere
^ this also applies to all other wrappers, since they all use the same pattern
Could be the case, I'd have to check
But oddly enough that patch fixed the issue
It no longer returns invalid rooms
very odd
was the patch just for rooms, or any wapper with a List property
iirc having destroyed components as keys in dictionaries can break them as GetHashCode will throw. so pretty bad if thats the case
Just for Room.List, I'll check if we did anything else
As for components as keys, p sure we don't do that
If we do I'll just make a stable key wrapper
im refering to what the labapi currently does
yeah any help is appreciated, just wanted to get some details to get an idea on whats going wrong
Yes Room.List takes from Room.Dictionary which is a Dictionary<RoomIdentifier, Room>
RoomIdentifier being a monobehaviour
yep
guessing either the Base or the GameObject was invalid or something
idk
since Base null check didn't fully fix it im guessing it's the GameObject

ahhh, good to know. im guessing its something weird going on where the roomIdentifier is destroyed without calling the labAPI event to remove it(or its already destroyed somehow so it fails to remove it)
but if you do encounter anything like this in other wrappers let us know
still would like to fix it ofc
Will do
I don't think we had any other weird issues so far with the other ones so that's good at least
Kudos to NW for the new dummies. Being able to use them for testing is awesome.
is
snake game still client-side?
I think it would be fun to make a snake game multiplayer
can i call third person keycard interaction animation and first person keycard interaction animation by server?
Third person absolutely
Not sure how about the 1st person
remained image toy
Basically you can make images with that
It supports text formatting
And it sends the string independetly from the base one
that'll be useful
i won't make gmod like spray.. i won't make gmod like spray..
any LabAPI update planned since the beta is getting an update?
What encoder did you use? The video doesn't play on mobile
¯_(ツ)_/¯
But yea people tell me its just black screen sometimes
unless they have hardware accerelation on
But heres screenshot
Let's go
-# is this gonna make it into 14.1
TMPro 💞
That means I can port my Vultron display to SL

Oh wait I need a graphic mask...
Eh, doable without it
This is in latest patch
Poggies
Does it contains fixes what made in pr?
How can I spawn firearm with full magazine? I tried using MagazineModule for that, but it didn't work...
get firearm component
IPrimary...
and you can set the ammo to any value (you can use to set max too)
Didnt make it in
I'm gonna make a gun that puts the word "gullible" on the ceiling
Don't suppose it'll have a client side billboarding option?
if (firearm.TryGetModule(out IPrimaryAmmoContainer container))
container.ServerModifyAmmo(container.AmmoMax);
This should work as far as my memory is concerned
Thanks, I appreciate your help.
Waiting for TextureToy😏
Does anyone know if any translatable hint are sent from the client?
the client doesn't send hints
if you were referring to creating translated segments, you can use hint parameters
the hint text is essentially string.Format
so if the text is ammo {0} then you can use an AmmoHintParameter to translate and replace {0}
there are many types of hint parameters
That's not what i meant. I know that i can send translatable hint with new TranslationHint(...) but for those which are in the base game like when you try to pickup an item but you already have the max on you, it says "You can't take more keycards (.." (for example) or smth like that, for this one (and a few others) i can't prevent them from being logged
I also have a patch on HintDisplay::Show(Hint hint) which adds a logger info at the beggining just for the test, and nothing is displayed but when i send a custom hint, my log info is displayed
those are also sent by the server so you'd need to patch it out
are you sure that you invoked PatchAll?
but when i send a custom hint, my log info is displayed
.
so yes i'm sure
This one is logged, and nothing is shown in-game when i prevent it to being displayed
this is the only one that works
what about ItemSearchCompletor::ValidateAny
also, how do you prevent it from showing? just a return false in a prefix?
client has its own checks before sending server request to server a lot of times
Yeah just a return false in a prefix atm (just to test it)
In the first video, the only hint shown is when i try to pick up an item when i already hit the limit (with preventing hint enabled)
Second video, preventing hint disabled, and when i hit the limit, a hint is shown which isn't the case in the first video
So there's only the hint when you hit the limit that is sent from the sever
Yeah, I knew that but i thought that all the translation hints were sent by the server and not from the client directly
I made a prefix to prevent hint from being sent through HintDisplay::Show and there is only one hint from the base game that i success to prevent
So ig that all others are sent in the client checks before sending the request to the server
most are yeah
It's very annoying, it means i can't prevent these hints from being shown to a player
how can i detect when a player makes visual contact with another player?
raycast
constantly just raycasting from my player's entire field of view?
oh oops i thought you meant direct contact
ill let someone else answer dis..but probably
i mean, are raycasts expensive? i assume theyre a bit expensive to justify doing several over and over again but
i could add a cone to the camera transform and add a monobehavior that sets the collider as a trigger and detects when another player enters
consider using VisionInformation instead
is that a namespace for unity
your ide should suggest it
i can't recall exactly which namespace but it's an SL thing
is it the same code used for 173 detection (and previously all scp detection)?
173, 096, you name it
oh okay cool
Ill see it when i get home

why are you sending 6 MB worth of text 
pixel-based hint screen?
you gotta scale it down for that
yea i did that and it works, but that 6 milion bytes sure look funny

Sorry to tell you buddy.. but your a bit 6MBs over the limit
Northwood and their arbitrary limits
What do you mean I can't send the entire script of the bee movie
(╯°□°)╯︵ ┻━┻
this is unfair
Lmaoo
(jokes aside wtf did you try to send lmao)
just a 900x689 image 

You just cant send UDP packer larger than 65535..
Yeah I know, was a joke
65534 characters for the base string
65534 chars for each argument
Yeah im sure you can fit in whole image?
Why bother with compressed image when I can place multiple smol images
When you implement multiple hints support, guess what becomes possible

could've been ?? sender.FullPermissions
I tried this just now, but it still spawns Firearm Pickup without ammo.. 😭
Use this
ty
Why I believed this...

i hate this
If i have when (ex is not OperationCanceledException) the code after won't execute...
Why do speakertoys synchronize with each other? Is it supposed to be this way, or am I doing something wrong?
https://youtu.be/GgPo4QZbAgQ
Ill check
The id of it
Make sure theyre different if you want them to be yk different
show your code please
Ok
i assume youre using audioplayerapi
public class SpatialPlayback : IAudioPlayback
{
public float Volume { get; set; } = 1;
public string SoundName { get; set; } = string.Empty;
public float Radius { get; set; } = 5;
public short PlayAt(Vector3 position, bool loop = false, bool queue = false)
{
AudioPlayer audioPlayer = new();
audioPlayer.CreateToy(position);
if (audioPlayer.SpeakerToy is null)
{
Log.Error("WTF");
return -1;
}
audioPlayer.Volume = Volume;
audioPlayer.IsSpatial = true;
audioPlayer.SpeakerToy.MinDistance = 1f;
audioPlayer.SpeakerToy.MaxDistance = Radius;
audioPlayer.LoadAudio(GetFilePath());
audioPlayer.Play(loop, queue);
return PlaybackRegistry.Register(audioPlayer, SoundName);
}
private string GetFilePath() => Path.Combine(AudioSystem.AudiosDirectoryPath, SoundName + ".ogg");
}
class AudioPlayer wrapper for Speakertoy
public void CreateToy(Vector3 position, Quaternion? rotation = null, Transform? parent = null, bool networkSpawn = true)
{
rotation ??= Quaternion.identity;
SpeakerToy = SpeakerToy.Create(position, rotation.Value, parent, networkSpawn);
}
public void Play(bool loop = false, bool queue = false)
{
if (_buffer is null || SpeakerToy is null)
{
Log.Error("Audio not loaded or toy not created.");
return;
}
SpeakerToy.Play(_buffer, queue, loop);
_coroutine = Timing.RunCoroutine(DestroyWhenFinished().CancelWith(Exiled.API.Features.Server.Host.GameObject));
}
fire
#labapi-logs message
Anyway yeah
Speakers have an id
When you send a voice to an id it will be all the ids




