#plugins-dev-chat

1 messages · Page 19 of 1

unique crane
#

nor the keycard name

lucid oxide
# unique crane

Are there any plans on changing LabAPI-Beta directory name?

unique crane
#

Good question

restive turret
#

prob if not be in beta

lucid oxide
unique crane
#

It will be changed

lucid oxide
unique crane
#

Well in that case I am sorry

terse bone
#

move paths to a config file

upper vapor
#

check all subdirectories of the SL folder and check if it contains LabAPI

restive turret
#

creating a folder labapi-trap

upper vapor
#

prefix it with an underscore so windows finds it first

unique crane
upper vapor
restive turret
#

or a .

unique crane
#

?

lucid oxide
upper vapor
#

capybara collisions don't work

restive turret
#

and hide it

unique crane
upper vapor
#

disabling them keeps the colliders

#

also why is there a collisionsenabled property

#

networkcollisionsenabled does the same thing

#

extra call to setcollidersstate

unique crane
#

because you have to disable/enable them both client and server-side

#

and thats what that property does

restive turret
#

me when mirror isnt mirroring

upper vapor
#

Network_collisionsEnabled does that, too
if the syncvar changes, it invokes SetCollidersState

#

so the non-network property is redundant

unique crane
#

But hook is client-side

#

So what you did is disabled colliders client-side only

#

and kept them on server

upper vapor
#

but they don't get disabled 😭

unique crane
#

they do

lucid oxide
unique crane
#

With 14.1 release

upper vapor
#

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

unique crane
#

then why is it typed like that

upper vapor
#

good question

#

the implementation invokes the changed handler on the server though

restive turret
#

sue mirror

unique crane
#

Use the CollisionsEnabled

#

Network_collisionsEnabled wont work

#

properly

upper vapor
#

i did

#

but the colliders stay

unique crane
#

Oh

upper vapor
#

yyyyyyyeeeeeaaaaa

#

should i make an issue on labapi github

#

-# probably

unique crane
#

pc crashed when starting unity gg

icy knoll
restive turret
#

lel

#

thats so true

upper vapor
unique crane
#

Half time of game dev is waiting for unity

restive turret
#

best worst engine

icy knoll
#

unity is so fun to make games in

restive turret
#

98% crashes

icy knoll
#

just the 10 hours it takes to load is the least fun part

restive turret
#

*most

unique crane
#

No that is the fastest part

upper vapor
#

script compilation: running backend

unique crane
#

😭

upper vapor
#

hold on...
application.enterplaymode

unique crane
#

Switching from dedicated server profile back to normal one is funny

#

I have to restart unity

#

Oh and close VS

#

otherwise it doesnt build

restive turret
#

can i say that as Unity issue

#

switch to unreal ClassDTroll

upper vapor
unique crane
#

Yeah VS locks the source files or whatever

#

And then build fails

#

Maybe I just need to close it in the IDE?

#

dont know

upper vapor
#

why does it lock...

#

what

unique crane
#

¯_(ツ)_/¯

upper vapor
#

yeah try closing vs

#

and never open it again

unique crane
#

I am about to try rider cause

#

VS doesnt like the big project at all

upper vapor
#

poggies

restive turret
#

i think same issue about rider

unique crane
#

I have to restart it usually every 15 minutes

#

It slows down like hell

restive turret
upper vapor
#

give me source and i'll test

restive turret
#

thats simply skill issue

unique crane
upper vapor
#

eve would say that

unique crane
#

I can imagine

upper vapor
#

-# new freedom unit unlocked

#

well well well
looks like the _collisionsEnabled field is ticked in the inspector
this works

unique crane
#

Assembly-CSharp

worthy rune
#

i wonder how many the labapi is now

restive turret
#

where can I see mine?

unique crane
restive turret
#

where do you see that

#

what buttons did you pressed

upper vapor
unique crane
worthy rune
#

6 lines left

unique crane
upper vapor
#

right

#

ugh

restive turret
#

ah well

worthy rune
#

lmao

#

also did it show the other metrics for you, i never actually used them so idk what good values are xD

restive turret
#

had to unselect my things

worthy rune
restive turret
#

I would check my game porject but i split it to nuget packages

unique crane
upper vapor
#

ye

#

i made an issue :3

unique crane
#

wait

upper vapor
#

you just have to tick a box

unique crane
#

I know why...

#

yea lol

#

done

upper vapor
#

why did i think it was serialized

unique crane
#

Oh this also reminds me to add it to spawn command

upper vapor
languid temple
unique crane
#

" Indicates the number of different classes that inherit from one another, all the way back to the base class."

languid temple
#

oh

#

73 maintainability is criminal

unique crane
tulip kiln
restive turret
#

3 miéliion

languid temple
#

20-100

languid temple
#

redo it

restive turret
#

damn

#

unity

languid temple
#

until it reaches 100

tulip kiln
unique crane
#

SNake has 83

languid temple
#

What has the best

#

Which has a reasonable length

acoustic cosmos
#

Hello world

restive turret
#

prob an empty porject

languid temple
#

obv empty projects or codes below like 200 lines does not count

acoustic cosmos
#

100 times hello world

#

Console.WriteLine("Hello world!");

#

I mean no

#

Pasting it a 100 times is not maintainable

unique crane
#

I mean its just rough average of what the maintainability is...

languid temple
#

ye

#

put it in a for loop

acoustic cosmos
#

Yeah

worthy rune
#

i wonder what it takes to get under 20

molten lark
#

5 years later, the nightmares about QueryProcessor.cs has finally stopped

upper vapor
upper vapor
#

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?"

restive turret
#

no pőlz

upper vapor
#

pőlz

restive turret
#

p iz next to ő

#

so

wheat flower
celest thorn
#

ghost hand

teal junco
#

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.

teal junco
#

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

unique crane
#

so to make cool looking graphs

teal junco
#

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 :)"

teal junco
unique crane
#

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

teal junco
teal junco
teal junco
static osprey
#

keep it anonymous unless people sign up on the site and link their accs

static osprey
teal junco
#

and yeah another guy did

static osprey
teal junco
#

joseph fallen although that's for exiled

static osprey
#

and better!!

teal junco
static osprey
#

nahh its shrimple

unique crane
#

Yea

static osprey
#

frontend will be the hard part

#

have fun

unique crane
#

Solution: tostring in console

teal junco
#

I probably wont make a stats plugin

unique crane
teal junco
#

since nobody will use anyways

static osprey
#

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

teal junco
#

yeah

#

I wonder if it breaks eula to track how many seconds people talk for

#

oh thats a good stat

static osprey
#

aslong as its anonymous its fine

teal junco
#

Time spent on radio
Time spent on intercom
Time spent talking

wheat flower
#

time spent talking: astronomical

hearty shard
#

honestly

teal junco
#

Average time spent as spectator

hearty shard
#

its smth i wanted to do

#

but i cba to make a website

#

nor do i feel like paying to store allat

teal junco
unique crane
#

Radio experience:

restive turret
#

AAAAAAAAAA

teal junco
unique crane
#

Pick up -> press alt voice chat -> play single soundboard -> drop it

teal junco
#

like probably a $5 per month vps would cover that

teal junco
#

record all voice chat

#

run it thru ai

#

and track the frequency of words

unique crane
#

One time I tried to do like voice recognizer

#

didnt work

teal junco
static osprey
unique crane
#

Yea like directly in game it aint possible (as far as I know

static osprey
#

speech to text of course

unique crane
#

you would have to send it to newer .NET app

#

or some other

#

Python ass script

teal junco
unique crane
#

Thats what I tried

#

none of them worked for 4.8

restive turret
#

same as discord apis

teal junco
restive turret
#

all of them is newer than 4x

teal junco
#

including sending data from 4.8 app to a dotnet core app

unique crane
restive turret
#

same on ai

unique crane
#

discord is just HTTPS

restive turret
#

do zou reallz want that<

#

no

teal junco
#

Fuck (and variations thereof)

#

second most frequent word

#

N word

hearty shard
#

i dont have a job

#

😭

teal junco
#

Gamble in cs

hearty shard
#

Wahh

unique crane
#

Just show the stats in game

#

or discord

#

thats free

teal junco
#

although there are several ways to do that for free

unique crane
#

If your doing global stats plugin then you pay for it XD

teal junco
#

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

undone bough
harsh thorn
undone bough
#

yes

harsh thorn
#

and monomod

#

and could you post the stracktrace without those

#

so its just pure labapi

undone bough
#

give me a moment PepeCoffee

upper vapor
#

just don't pass null to subtitles shrug

#

right

#

base-game

restive turret
#

Left

#

this-server

#

Also why there is a monomod there

hearty shard
restive turret
#

Oh

hearty shard
#

harmony no longer includes monomod in its assembly

#

or smth i forgot what the exact change was

ashen hornet
#

Camera toys can't be accessed by SCP-079 sometimes, even tho the room is assigned, does someone know why?

#

it happens randomly

worthy rune
#

any errors in server/player logs?

grand flower
#

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

worthy rune
#

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

grand flower
#

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 thonkong

worthy rune
#

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

grand flower
#

okay might've just been a bug

#

seems to be randomly working now heh

worthy rune
#

ahh

#

well if you are able to reproduce it i can look into it if needed

grand flower
#

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
worthy rune
#

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

crimson dune
grand flower
#

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

odd hazel
worthy rune
#

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

grand flower
#

oof

#

well if I have it happen again and I manage to figure out why i'll let you know

#

odd

grand flower
#

How does one enable verbose logging?

worthy rune
#

havnt heard of it for sl plugins

grand flower
#

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

worthy rune
#

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

grand flower
#

where can I access it?

worthy rune
#

they should be in a folder named LocalAdminLogs i think next to where the root plugin folder is

grand flower
#

ay ty

#

yeah nothing special, oh well

#

if it happens again i'll hunt it down

worthy rune
#

strange

grand flower
#

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

worthy rune
#

looks related yeah

grand flower
#

p much started happening when the dummy stopped following me

#

after respawning a few times

#

agh

#

might be my fault, sec

worthy rune
#

my guess was going to be somewhere using destroy on the gameobject of the player

grand flower
#

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

worthy rune
#

ahh

#

no worries then

grand flower
#

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

worthy rune
#

could be usefull, will have to talk to beryl about it

tulip kiln
# grand flower but good to know about the exceptions being in LocalAdminLog, ty

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.

agile oasis
#

do anyone have a snippet how to add velocity to grenade projectile ?

restive turret
#

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

pseudo hawk
#

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.

hearty shard
icy knoll
hearty shard
icy knoll
hearty shard
#

so we're lying

#

so we're blind

icy knoll
#

no

hearty shard
#

😭

icy knoll
#

ur just seeing things

hearty shard
#

power of explosion

icy knoll
#

smh

#

kaboom

gleaming fossil
#

youre not #sigma

grand flower
#

a little annoying

unique crane
grand flower
#

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
grand flower
#
    // In my custom dummy destroying method
    if (dummy.roleManager?.CurrentRole is IFpcRole { FpcModule: not null } fpcRole)
    {
        fpcRole.FpcModule.ResetObject();
    }
#

this p much fixed it

teal junco
unique crane
#

That was close call

grand flower
#

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

terse bone
#

haven't seen this message before, but server commited unalive

grand flower
#

server didn't, I just got "kicked" out

unique crane
grand flower
#

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? DogKek

grand flower
unique crane
#

So the answer issssss

grand flower
#

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

unique crane
#

Since I do not know what your exactly doing I cant really help yknow

#

never had this error thrown

grand flower
#

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()

tulip kiln
restive turret
#

Now implement ingame and send code to mr devs

#

Even just a concept would be great (like idk programming one?)

hearty shard
worthy rune
#

iirc the issue was with hiding players

restive turret
#

Hiding as what context

upper vapor
restive turret
#

Removing from RA list?

worthy rune
#

RA list player count and N

hearty shard
upper vapor
hearty shard
#

and now pets are useless

#

💀

worthy rune
#

just make them out of primitives so they wont show on the list ClassDTroll

upper vapor
tulip kiln
upper vapor
#

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

tulip kiln
#

Destroy the object when model gets pool'd CoolEmoji

upper vapor
#

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

tulip kiln
#

If player role is changed, send a destroy message or smth

#

someone at NW will figure it out trolling

upper vapor
#

is there a guarantee that clients pool objects in the same order as the server does? not sure

tulip kiln
#

That could be a solution

restive turret
#

On destroying sends netid so

#

Does it?

#

Mirror screw you

upper vapor
#

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

restive turret
#

How would you know what object does that netid standa for?

upper vapor
#

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

unique crane
hearty shard
#

like i get not promising

#

but idk it feels doable

unique crane
#

I think that the issue was with hiding player from player count

hearty shard
unique crane
#

That too yea

hearty shard
#

hmm

unique crane
#

or thats how I understand this sentence

#

To hide it from player count

hearty shard
#

Player List (N)
RemoteAdmin
Centrals Player Count

unique crane
#

Also hiding from RA/Playerlist would require additional stuff to be done

restive turret
#

Playerlist.Remove(player)

hearty shard
#

troll

hearty shard
#

@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 ?

upper vapor
#

you can use SSSS in the meantime, though not as straightforward for players ofc

#

make an issue ig

icy knoll
#

not like the mute feature is already in the game, just the server doesn't get the details

hearty shard
#

until smth is made to make it possible

upper vapor
#

yea

icy knoll
#

i know

#

i read it

#

it wasnt a thing to say "stupid idea"

upper vapor
#

you can also make volume customizable with SSSS

icy knoll
#

i mean sure, it's a stupid workaround, albeit the only one possible rn

upper vapor
icy knoll
#

but yeah, it should be possible to check if someone has muted someone, or do what nameless said

icy knoll
upper vapor
#

death

hearty shard
#

issue made

hearty shard
upper vapor
hearty shard
#

me when json

unique crane
upper vapor
unique crane
hearty shard
#

or smth

upper vapor
#

i

hearty shard
#

WriteAllLines idk

upper vapor
#

rephrased it

hearty shard
hearty shard
unique crane
#

Hm?

hearty shard
#

hi davy

upper vapor
hearty shard
#

do you like my suggestion

#

yes u do its amazing

unique crane
royal mica
#

Is there a reason why CommandExecutingEventArgs.Arguments contain the command itself?

#

Or is that intended change from the PluginAPI's way?

worthy rune
#

i just checked and it doesnt look like it contains it, did you use index it with []

royal mica
#

Considering this getter, it should contain

#

also my logging also fetches the first index

worthy rune
#

thats correct

unique crane
#

Arguments is a ArraySegment

#

no?

royal mica
#

Yup

unique crane
#

so all good

#

Arguments itself has only the arguments after the cmd name

worthy rune
#

hope this helps

royal mica
#

Hmm I see

#

So it is something I'm doing wrong, thank you!

#

That answers a lot

#

time to dive in why

worthy rune
#

try ElementAt() instead of []

terse bone
#

i think theres .At()

worthy rune
#

is there

royal mica
#

Ah I found the reason:
During migration I falsely migrated the para mstring[] args to string[] args = ev.Arguments.Array!;

#

which caused the problem

worthy rune
#

yeah that would do it

hearty shard
#

sooo

#

who will make the website with keycard generating

#

for commands

#

someones gotta do it

restive turret
hearty shard
#

flip you

hearty shard
#

me when no ItemAddReason

hollow peak
#

Hey, is there any known way to spawn these lights in?

warped prairie
#

hey guys, stupid question, how do i enable global intercom for a player? is it Player.isintercomMuted?

grand flower
#

OnPlayerSendingVoiceMessage

#

Should work if you change the voice channel to Intercom

#

@warped prairie

warped prairie
#

ohh ok, didnt know it was that

#

ill give that a try ty

upper vapor
teal junco
#

the answer is always check the command

#

its a fair answer

hearty shard
#

good code trust

#

(my code for giving customroles their items)

terse bone
#

i love condition errors trolling

#

wait, what's wrong?

hearty shard
#

💀

restive turret
hearty shard
#

thats incredible ngl

#

idk why nw did this

#

but oh well

worn gull
#

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.

restive turret
#

As 079?

#

Or you look at 079 camera?
Or player camera?

worn gull
#

So I'm a D-class and I look at the camera which is at the Cells and I want to get that camera.

worthy rune
#

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

worn gull
#

Thanks, I will give it a try

teal junco
#

does anyone here know how item limits are assigned

#

like how the game determines which item is in which categories

hearty shard
#

item.Category

teal junco
#

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

hearty shard
marble cobalt
marble cobalt
teal junco
#

yeah its based on that convo

marble cobalt
#

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

marble cobalt
#

To either use .Contains or .HasFlag

teal junco
#

yup

#

its probably not hard but not worth it either.

marble cobalt
#

Pretty much

#

In either case, we just don't have enough time to make this change during this beta without crunching

teal junco
#

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

marble cobalt
#

Either solution is fine, but I'd probably go with the flags as well

hearty shard
#

hi beryl

marble cobalt
#

Only because it would be easier to write/read the values when sync-ing

marble cobalt
#

👋

teal junco
hearty shard
#

but it could

#

(slightly more control for custom items)

teal junco
#

true actually

hearty shard
#

sooo when syncable CustomName trolling

marble cobalt
#

😔 I'll give you a spoiler and say you (plugin devs) are getting one last treat this beta

teal junco
hearty shard
marble cobalt
hearty shard
#

💔

#

let me be dev so i can add it

#

trust

marble cobalt
#

I don't make the rules 😔

modern lark
hearty shard
#

thank you fox

#

i appreciate it

modern lark
#

Happy to help

hearty shard
#

although

#

ur fired.

modern lark
#

aw

hearty shard
#

leaked too much

modern lark
#

Bye Beryl

hearty shard
#

ggs

marble cobalt
#

Its been fun 🫡

hearty shard
#

i just fired him

marble cobalt
#

SL 2 is officially cancelled

teal junco
#

beryl make literally everything have sync override

hearty shard
#

oh hell nah

teal junco
#

Role Name override

#

Playermodel override

#

dll override

#

OS overide.

marble cobalt
#

😡 This is what the lazy SL devs are trying to prevent you from having

hearty shard
#

i gotta rewrite my customrole stuff at some point

hearty shard
#

oh

#

event and the other is a pointer

#

😭

#

or whatever its called

#

i forgot

#

arrow

marble cobalt
#

Property

teal junco
hearty shard
#

yes

#

that

teal junco
#

yeah that is an arrow

hearty shard
#

yes

teal junco
#

ur so rihht

hearty shard
#

i dont like it

#

thats my reason

teal junco
#

wait so are only fields syncable

hearty shard
#

yes

teal junco
#

?

hearty shard
#

well

#

property ig too

worthy rune
#

also note that syncvars only work on network behaviours which itemBase is not

teal junco
#

Well I should try to do networking then

teal junco
#

i did get a website about it from someone

teal junco
#

make everything a net behavior

hearty shard
#

real

teal junco
#

trust

marble cobalt
#

For every joke you make, there's been at least a dozen people make that statement seriously

#

😔

teal junco
#

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

hearty shard
#

i cannot believe this

marble cobalt
teal junco
marble cobalt
#

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

teal junco
#

wtf thats crazy

teal junco
#

I applaud anyone willing to wrestle with that shit

marble cobalt
hearty shard
#

beryl im gonna hire you to sit in a corner (-5 a day)

teal junco
marble cobalt
#

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

teal junco
#

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

restive turret
#

Or deleted

teal junco
restive turret
teal junco
#

at least most other things im interested in can be mocked via custominfo or primitives

restive turret
#

Amogus figure

teal junco
#

custominfo is gods gift to earth

#

by the way

restive turret
#

Ye its good

#

Sadly not many plugins handle it right

teal junco
acoustic cosmos
#

If I go args.IsAllowed = false;
on PlayerPickingUpItemEvent, why can't I "pick it up" again

#

Or start the pickup

teal junco
restive turret
teal junco
#

the regex is kinda limiting although i understand why it exists

teal junco
restive turret
#

Ye and xp system

worthy rune
teal junco
#

well for the most part i just say well just make custominfo features a toggle

#

and if needed have someone program a compatibility layer

acoustic cosmos
#

Okay

restive turret
#

SlejmUr
OWNER
Level 99 - BOSS
CI Terminator
Chaos Insurgency Maranduer

teal junco
#

i made my own using custominfo but its janky and doesnt work with other plugins

#

at least not well.

restive turret
#

I think mine does

#

I think

teal junco
#

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

acoustic cosmos
#

1.5 meters

#

What did he do to you

restive turret
#

1.5 units in unity engine

teal junco
teal junco
# teal junco <https://github.com/icedchai/omni-plugins-pub/blob/main/Omni-Utils%2Fextensions%...

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

GitHub

Omni-2 roleplay utilities, plus goggles plugin. Contribute to icedchai/omni-plugins-pub development by creating an account on GitHub.

teal junco
celest thorn
#

its possible to spawn glass, because i've seen in the past someone do it

unique crane
#

But I believe you can teleport existing one

#

somehow?

celest thorn
#

like if i copy the gameobject

unique crane
#

No copying wont do anything

upper vapor
unique crane
#

Thats easier

#

Hook onto player shoot event, check if it hit the primitive

#

send hitmat

upper vapor
#

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

unique crane
#

hitmark

#

Destroy if needed

#

custom window done

#

Or you might just give it component to detect hits

upper vapor
#

an IDestructible-implementing component perhaps

#

pretty sure that would work out of the box

unique crane
#

yea

heady turret
hearty shard
#

😭

#

transform on a room being null is crazy

grand flower
#

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

#

¯_(ツ)_/¯

hearty shard
#

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

grand flower
#

whatcha trying to do

hearty shard
# grand flower 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

terse bone
#

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);
}
worn gull
#

Hi! How can I make custom keycards with plugin?

grand flower
#

Looping until you get a valid value is inefficient

terse bone
#

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

grand flower
#

Eh, doesn't mean it can't be a little more efficient

#
var filteredEffects = Registered.Where(e => e.CanUse(player));
upper vapor
#
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

grand flower
#

yeah nvm i see what the problem is

#

well, filtering the effects first would probably help at least

upper vapor
#

with ListPool instead of ToList for maximum(?) efficiency

grand flower
#

I don't get the whole fuss of using list pools for everything

#

If it's not a hot path why bother

upper vapor
#

less allocations, less "random" GC spikes

#

cuz the GC doesn't run immediately after the method call

grand flower
#

if i'm calling something every frame sure, for one offs ehhh

upper vapor
#

fair

grand flower
#

SL already does a pretty good job at being inefficient

upper vapor
#

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

grand flower
upper vapor
#

heap

#

not stack

#

i'm not braining

restive turret
#

Hi not braining

worthy rune
# grand flower So we made Room.List only return valid rooms

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

grand flower
#

Could be the case, I'd have to check

#

But oddly enough that patch fixed the issue

#

It no longer returns invalid rooms

worthy rune
#

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

grand flower
#

As for components as keys, p sure we don't do that

#

If we do I'll just make a stable key wrapper

worthy rune
grand flower
#

Ahhhh

#

Unsure, will check

worthy rune
#

yeah any help is appreciated, just wanted to get some details to get an idea on whats going wrong

grand flower
#

All I know is null checking Room.Base wasnt enough

#

Room.IsDestroyed solved it

grand flower
#

RoomIdentifier being a monobehaviour

worthy rune
#

yep

grand flower
#

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

worthy rune
grand flower
#

checking our patches for more

#

nop, seems like Room.List is the only one

worthy rune
#

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

grand flower
#

Will do

#

I don't think we had any other weird issues so far with the other ones so that's good at least

grand flower
#

Kudos to NW for the new dummies. Being able to use them for testing is awesome.

teal junco
#

the dummies are awesome

#

i also like using them as a proxy for my violent actions

carmine prawn
#

💀

#

KeycardChaosInsurgency is not KeycardItem

limpid fjord
#

is

#

snake game still client-side?

#

I think it would be fun to make a snake game multiplayer

heady turret
#

can i call third person keycard interaction animation and first person keycard interaction animation by server?

unique crane
#

Not sure how about the 1st person

random scaffold
#

game started in unity

#

lol

unique crane
#

Basically you can make images with that

#

It supports text formatting

#

And it sends the string independetly from the base one

random scaffold
#

but it hards for gpu

#

better format image by base64

unique crane
#

So you can make like {0}\n{1}\n{2}\n....

#

And then send the individual lines

grand flower
#

that'll be useful

terse bone
grand flower
#

any LabAPI update planned since the beta is getting an update?

upper vapor
unique crane
#

¯_(ツ)_/¯

#

But yea people tell me its just black screen sometimes

#

unless they have hardware accerelation on

#

But heres screenshot

upper vapor
#

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

unique crane
upper vapor
#

Poggies

restive turret
#

Does it contains fixes what made in pr?

crimson nova
#

How can I spawn firearm with full magazine? I tried using MagazineModule for that, but it didn't work...

restive turret
#

get firearm component

#

IPrimary...

#

and you can set the ammo to any value (you can use to set max too)

unique crane
restive turret
#

sob and cry

#

the clear items will not be fixed while we in beta

frank flicker
# unique crane

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?

upper vapor
crimson nova
#

Thanks, I appreciate your help.

heady turret
scenic trout
#

Does anyone know if any translatable hint are sent from the client?

upper vapor
scenic trout
#

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

upper vapor
#

those are also sent by the server so you'd need to patch it out
are you sure that you invoked PatchAll?

scenic trout
#

but when i send a custom hint, my log info is displayed
.

upper vapor
#

oh

#

i misread

scenic trout
#

so yes i'm sure

upper vapor
#

this is in ItemSearchCompletor

#

not sure why you're not getting the log for that

scenic trout
#

This one is logged, and nothing is shown in-game when i prevent it to being displayed

#

this is the only one that works

upper vapor
#

what about ItemSearchCompletor::ValidateAny

#

also, how do you prevent it from showing? just a return false in a prefix?

hearty shard
#

client has its own checks before sending server request to server a lot of times

scenic trout
#

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

scenic trout
hearty shard
#

wdym

#

im pretty sure server just tells client a fail reason

#

idk

scenic trout
# hearty shard wdym

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

hearty shard
#

most are yeah

scenic trout
#

It's very annoying, it means i can't prevent these hints from being shown to a player

teal junco
#

how can i detect when a player makes visual contact with another player?

teal junco
#

constantly just raycasting from my player's entire field of view?

static osprey
#

oh oops i thought you meant direct contact

static osprey
teal junco
#

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

upper vapor
teal junco
upper vapor
#

your ide should suggest it

#

i can't recall exactly which namespace but it's an SL thing

teal junco
#

is it the same code used for 173 detection (and previously all scp detection)?

upper vapor
#

173, 096, you name it

teal junco
#

oh okay cool

teal junco
terse bone
upper vapor
#

why are you sending 6 MB worth of text ClassD_Hollow

#

pixel-based hint screen?

#

you gotta scale it down for that

terse bone
upper vapor
unique crane
grand flower
#

Northwood and their arbitrary limits

#

What do you mean I can't send the entire script of the bee movie

#

(╯°□°)╯︵ ┻━┻

#

this is unfair

terse bone
#

Lmaoo

grand flower
#

(jokes aside wtf did you try to send lmao)

terse bone
#

just a 900x689 image clueless

carmine prawn
unique crane
grand flower
#

Yeah I know, was a joke

carmine prawn
#

Can't wait to use TextToy player the VIDEO

#

what is its limit?

unique crane
#

65534 characters for the base string

#

65534 chars for each argument

#

Yeah im sure you can fit in whole image?

tulip kiln
tulip kiln
terse bone
#

why not create 7 milion primitives

carmine prawn
#

TWO and MORE TextToy

upper vapor
#

could've been ?? sender.FullPermissions

crimson nova
teal junco
#

ty

unique crane
terse bone
#

i hate this
If i have when (ex is not OperationCanceledException) the code after won't execute...

brisk matrix
unique crane
#

There is like a field for that no?

#

Pretty sure

brisk matrix
#

Ill check

hearty shard
#

Make sure theyre different if you want them to be yk different

brisk matrix
#

I need to set them?

#

Ok ill try

brisk matrix
#

Ok

teal junco
#

i assume youre using audioplayerapi

brisk matrix
#

No

#

Speakertyos from labapi

teal junco
#

Oh idk

#

still show code

brisk matrix
#
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));
    }
restive turret
hearty shard
#

Speakers have an id

#

When you send a voice to an id it will be all the ids