#plugins-dev-chat

1 messages · Page 15 of 1

restive turret
#

Well if u already have it dld use that

white matrix
#

alrighty

#

When I'm on a server, is there a way I can spawn tickets in?

#

or do I just cope and shoot dummies

#

I think I'm going to look at this later

#

for the sake of my brain

#

but I've got something that's compiled

#

so.. maybe it'll work you never know

#

I think there's been some cooking in this project, but for next time I need to test if it truly works, and then I'll need to find out if 1. I want to split it between both sides or just for both sides 1 set of configs, 2. how to get the actual values into the patch

#

eh that last one will probably be quite easy

upper pike
white matrix
#

full of text or something

#

looked mostly like this

upper pike
white matrix
#

because I used the help command and there's just

#

so god damn much on the screen

upper pike
#

Why does this keep coming up?
Anything to be concerned about

white matrix
#

yeah saw it pop up earlier too

hearty shard
#

Its every round since micro spawns every round

upper pike
#

What if I was doing something with the door in HID

swift nexus
hearty shard
#

skill issue

odd hazel
#

what is com15 called

upper pike
#

GunCOM15 i believe

upper vapor
#

Try getting the list of milestones per faction and modifying the "Threshold" (or similar) field of the milestone

odd hazel
#

why does throwing only call Dropping

upper vapor
#

The beautiful language of Hungarian toomuchtrolling

upper vapor
unique crane
odd hazel
heady turret
#

Hi! How can i change name of keycard owner?

unique crane
#

Its not possible to change it afterwards

heady turret
#

thats shitty

white matrix
upper vapor
white matrix
# upper vapor Yeah

alright good to know, if I can do that I might not have to use Harmony then that'd be nice. I'll check it out laters.

odd hazel
# upper vapor I'm not sure I understand If you drop the item, it doesn't get thrown like the y...

public void dropping(PlayerDroppingItemEventArgs ev)
{
if (ev.Item.Type == ItemType.Coin)
{
ev.IsAllowed = false;
}
}

    public void Throwing(PlayerThrowingItemEventArgs ev)
    {
       Logger.Info("called"); 
    }

if i throw coin it will be denied and throwing wont be called
but anyother item i throw will have throwing called
theres no way to check if the item was throwed in dropping so if you want both you cant use both if dropping uses isallowed = false

white matrix
#

Does AvailableRespawnsLeft go up if a respawn token is aquired by a team?

#

I noticed on default settings, both teams get 1 token and there's 3 respawns in total

#

I wonder if that additional respawn accounts for token obtaining.

#

what is it with the C# compiler wanting me to throw var everywhere

#

I like sticking with my clearly defined typing thank you very much

upper vapor
upper vapor
#

Give me a bit

white matrix
upper pike
#

Like why would i want to make my code less clear

white matrix
#

idk maybe convenience

#

sometimes people like being lazy I guess

upper pike
#

But Rider is telling to actively put in more work to make it less clear

upper vapor
# odd hazel public void dropping(PlayerDroppingItemEventArgs ev) { if (e...

Seems like I was wrong with what I said earlier, the dropping item method has a throwing parameter
LabApi doesn't call the correct event though
I'd suggest opening an issue because ThrowingItem gives you a pickup and it only prevents the velocity change
It would be good to have a property in the DroppingEvent to determine if it's a throw action instead of a simple drop

upper vapor
#

It's not that difficult

#

If you don't like the default code style, change the configuration

upper pike
#

I did

#

But I never understood it in the first place

upper vapor
white matrix
upper vapor
# upper pike But I never understood it in the first place

Arguably it helps to make types as concrete as possible without the dev having to type it out
Like IEnumerator of a List has a public specific implementation, typing IEnumerator<T> allocates memory (boxing) while List<T>.Enumerator does not (it's a struct)

white matrix
upper vapor
upper vapor
#

Although many people outright ignore more obvious warnings let alone hints or suggestions

restive turret
#

Well i do not care about the English correction

upper vapor
#

Not just typo hints but also code quality suggestions

#

It's still in the game files but the mono font has been removed from TMPro assets

worthy rune
#

wtf i didnt get a ping for this

#

you can use Player.ReadList if you want all real players and dummies

unique crane
#

It was refering to the RpcParent

#

Well we solved it

worthy rune
#

ahh, i forgot already

restive turret
#

Riptide making public the rpcparent was his fatal that will hunt him here

upper vapor
#

Make it obsolete and #pragma warning it out maybe
Won't stop from compiling but hopefully devs won't use it

restive turret
#

Yknow that compiled stuff wont show #pragma warning

upper vapor
#

I know

restive turret
#

Or comments like
// Please dont use it, forgot to make it private

upper vapor
upper vapor
restive turret
#

Well making it private will resolve it

upper vapor
restive turret
#

Since whoever want to use it cant

restive turret
upper vapor
#

Bruh

hearty shard
#

@unique crane i found the issue

unique crane
#

What was it

hearty shard
#

scale

unique crane
#

of

hearty shard
unique crane
#

Mhm

#

well then dont use it

hearty shard
#

will make him invisible when disguised

#

and then permanently after

hearty shard
#

but like

#

tf ???

unique crane
#

Mhm

hearty shard
#

why

#

why does it

#

how

unique crane
#

I guess its fine server-side but the spawn message resets some stuff client-side I guess

hearty shard
#

i guess

#

its done on ChangedRole

unique crane
#

maybe

hearty shard
#

(because i prevent tiny custom role ppl fromreplacing scps and being small too)

hearty shard
unique crane
#

I know

#

but im doing something else now

hearty shard
#

rahhhh

#

crashing out

restive turret
hearty shard
#

then it breaks permanently

restive turret
#

Check the scale after disguise

#

Or reset the scale to that

hearty shard
#

ill just not reset scale

#

until nw adds it

#

fuck that

restive turret
#

Well ye i will disable on my end too idk what will be broken

#

Does fake scale work?

#

Like setting to idk 1.5 to others and you set back to default

upper vapor
#

David where's our scale message

restive turret
#

Well ye, that's why usually done it after spawned

#

So it doesn't break much

hearty shard
upper vapor
#

Well they made it so toomuchtrolling

hearty shard
#

yep

upper vapor
#

New player models

hearty shard
#

do be like that

#

the thing i dont understand is

#

why does it say disguised as None

#

because of scale?

#

like

#

what

#

😭

upper vapor
#

No idea

#

Probably not because of scale

hearty shard
#

well

upper vapor
#

But because mirror resets the object

hearty shard
#

maybe

#

so ig it resets the Identity thing

#

and it gets desynced

#

wait

#

wouldnt that mean client can cheat and make 3114 invisible ?

#

or maybe itd only be for the cheater

#

dunno anymore

harsh thorn
#

Or the client for itself locally

restive turret
heady turret
#

Is there any SCP proximity chat lab API plugin?

restive turret
#

¯_(ツ)_/¯

teal junco
upper vapor
#

It could now be done with speaker toys rather easily

restive turret
#

or just swap the Current Channel

upper vapor
#

Yeah but that's not that immersive

restive turret
#

well thats easier

teal junco
#

that's a shitass solution that was only used because speakertoys didnt exist

teal junco
restive turret
#

you think every old plugin has a day0 solution for labapi

upper vapor
teal junco
#

But I dont think it actually did have NwAPI version.

upper vapor
upper vapor
#

It was created much before LabApi was officially announced

#

Nevertheless, developing a plugin for one framework doesn't mean you will port it to another at all costs

teal junco
#

Does LabAPI have any popular custom item/custom role plugins?

restive turret
#

"popular"

#

well I do mine

#

wokring atleast

teal junco
#

Okay well I will definitely be aware about yours

teal junco
#

I wanted to make a api so LabAPI plugins can use certain EXILED plugins' features without requiring exiled to be loaded. I dont think its gonna have any practical uses (no reason not to just use exiled atp) but it can be a fun project to try.

restive turret
#

well something i would really like at basegame is command for tp to exact coords, getting my own coords

#

listing item ids in the inv too

limpid fjord
#

Is there a way to prevent the snake game or replace it with another scene?

teal junco
restive turret
teal junco
#

Inspecting has event args?

restive turret
#

idk

teal junco
restive turret
#

i mean

#

i doont seen exiled made one

limpid fjord
#

I need to play bad apple in server-side

teal junco
#

With reflection.

restive turret
restive turret
sinful bronze
#

yeeeeah

hearty shard
teal junco
hearty shard
sinful bronze
#

shelf is fully working

restive turret
sinful bronze
teal junco
#

Well actually there is one reason I would like to have this, even if it wont be used for that reason

#

Becsusr ProjectMER wont allow custom item spawns because its no longer exiled

#

But if theres a wrapper or something that soft-relies on it, then it could.

restive turret
#

make a change that it runs a command

#

as server

#

and you can change to any thing

teal junco
#

one thing i am afraid of is that michal will update SL customobjects to be a dropdown with only the existing itemtypes

#

instead of having a field somewhere to put a string.

teal junco
#

Does anyone have an example for how to network GameObject hierarchy?

restive turret
#

what

teal junco
#

14.1 has client side hierarchy right

#

How do I send the network message?

upper vapor
upper vapor
#

You just set the transform parent

teal junco
#

That's all I need to do?

upper vapor
#

Yup

teal junco
#

amazing

upper vapor
#

It'll sync automatically

teal junco
#

HitboxIdentities arent networkidentities right?

upper vapor
#

The parent transform does have to have a networkIdentity though

upper vapor
restive turret
#

i mean

upper vapor
#

It should

restive turret
#

their literal serial

#

i run pinv

teal junco
upper vapor
teal junco
#

I mean its fair because the client is held responsible for animating characters

#

I wish I could 0 ms parent objects to player bones though

restive turret
#

decompile the game

#

adn see it

teal junco
#

I'll test later today

restive turret
#

tbh

#

if you add hitbox to smoething and add it into the model should work

lethal cradle
#

greetings nerds

teal junco
#

like would that allow the client to parent stuff to the hitbox?

restive turret
#

i mean if you parent to the model

teal junco
#

sorry can you explain what you mean?

#

the model is not networked, right? the bones / hitboxes arent networked either

#

how should I parent something to the hitbox in that case?

soft depot
#

Slejm is schizo

#

We need more features before perfect cosmetics

restive turret
#

RoleBase.FpcModule.CharacterModelInstance
and you instanciate your custom primitve toys, you add the Collider to your object (I guess?)
you then parent your primitive to the model, then as last you add the hitbox as component to the primitive

#

you also need to add your own hitbox to the model too

upper vapor
#

A prefab has to be spawned

restive turret
#

hitbox isnt a net idnetity one

upper vapor
#

Oh you meant

#

Add hitbox identity

restive turret
#

ye

#

not net identity

upper vapor
#

Even then how would it work

restive turret
#

with power of magic and friendship

upper vapor
#

😭

restive turret
#

you might also need to call bunch of things

#

like adding it to the array

upper vapor
#

But if there's no net identity and you add a hitbox identity...

restive turret
#

the primitive has netid

#

you add hitbox to primitive

#

then reparent beforoe adding primitive to model

teal junco
restive turret
#

idk if would work or not

#

I just read how it done ingame

#

and inside the decompiled server

upper vapor
soft depot
#

It’s not gonna work

upper vapor
#

Okay

#

That makes sense

soft depot
#

We can’t do that to clients

teal junco
#

you cant just

upper vapor
#

But I'm not sure that's what icedchai wanted

restive turret
#

well

#

thats what he can do

teal junco
#

add a network identiry thats parented to a non network identity that isnt already spawned as netnidentity

teal junco
#

Which is an acceptable answer

upper vapor
restive turret
#

read how the game works guh

restive turret
#

i just reading how and what its doing

teal junco
#

if the hitboxidentity isnt a network identity there isnt anything I can do.

upper vapor
# teal junco Yeah, on client side

That's not possible unfortunately
Slejm wanted it the other way, like you'd create a primitive and attach a hitbox identity to it
Not the same thing lol

teal junco
#

wait why would I put a hitboxidentity on a primitive?

restive turret
#

wdym client side

teal junco
#

To extend the player's hitbox?

restive turret
#

ye?

teal junco
restive turret
#

there will be no client side

#

it will only visible to the server

#

if you didnt do it a right way

teal junco
#

yeah i know

#

because bones have no net id

icy knoll
#

Do pickups despawn when thrown into the void or an unreachable location? Or what happens? because I want to track items that are thrown in unreachable locations

upper vapor
#

they stay

icy knoll
#

damn

#

if they despawned i could have patched the method but blegh

upper vapor
#

iirc "void" locations have triggers which add the pitdeath effect

#

you could add a component with OnTriggerEnter and try get the pickup from the collider

icy knoll
#

how would I go about getting those void locations

upper vapor
#

GetComponentsInChildren<Collider> on the room identifier
and check if they're triggers

#

there aren't many rooms that have voids so you can limit the rooms to search through

icy knoll
#

yup

#

armoury

#

acroamatic abatement

#

uhhh, any else?

#

oh

#

test room

#

that's it

upper vapor
#

106 room

icy knoll
upper vapor
#

i think nuke room has some places you can throw items into without being able to get them back
or behind 914
for those scenarios you need to create the triggers relative to the room yourself

icy knoll
#

would the component have to be monobehaviour or networkbehaviour?

upper vapor
#

monobehavior

#

it's not possible to create custom network behaviors

icy knoll
#

ok thanks

icy knoll
upper vapor
#

i'm not sure

#

better check in unity

#

(i will have to do a full reimport)

icy knoll
#

i dont know how to check in unity so 😭

upper vapor
#

give me about 20 minutes lel

icy knoll
#

okie

#
List<Room> rooms = new()
            {
                Room.Get(RoomType.Hcz106),
                Room.Get(RoomType.HczCrossRoomWater),
                Room.Get(RoomType.HczTestRoom),
                Room.Get(RoomType.HczArmory)
            };

            foreach (Room room in rooms)
            {
                if (room == null) continue;
                foreach (Collider componentsInChild in room.GameObject.GetComponentsInChildren<Collider>())
                {
                    if (componentsInChild.isTrigger) componentsInChild.gameObject.AddComponent<CheckVoid>();
                }
            }```
#

this is current code

upper vapor
#

ya that looks good

#

(except for your nullable annotations)

icy knoll
#

what's wrong with that

upper vapor
#

i mean if you have nullable off it's fine ig

#

why did i think you were using nullable

icy knoll
#

getting a friend to test now

#

hopefully it's not all triggers tho

#

@upper vapor do i need to send the component updates to every client or? im adding the components when map is generated and nothing is logging

upper vapor
#

whar

icy knoll
#

i added a log to OnTriggerEnter

#

and the log aint appearing on the server

upper vapor
#

guh

#

interesting

#

my pc is dying rn cuz unity

#

check for PitKiller objects instead

icy knoll
#

sorry

upper vapor
#

ye

icy knoll
#

component

upper vapor
#

yea

#

my brain is fried currently

#

(i'm writing j*vascr*pt)

round vale
#

which dependencies do i need to start writing plugins cuz the documentation doesn't really say and if there are any, where do I get them from?

icy knoll
#

anyway

#

no output still

upper vapor
icy knoll
#
                {
                    Log.Info($"Pit Name: {pit.name}");
                    pit.gameObject.AddComponent<CheckVoid>();
                }```
#

it does log the pit name, just no logs when item thrown

#
    {
        public void OnTriggerEnter(Collider other)
        {
            Pickup pickup = Pickup.Get(other.gameObject);
            Log.Info($"Pickup {pickup.Type} has been dropped into the void");
        }
    }```
upper vapor
upper vapor
icy knoll
upper vapor
#

LA logs

#

should be spammed

icy knoll
#

checking now

#

why would it be spammed?

#

because pickup?

upper vapor
#

if you threw multiple items and neither of those could be mapped to a pickup

hearty shard
#

throw urself in it

upper vapor
#

make sure to check for null
also, use the root of the collider's transform, maybe that'll solve it

hearty shard
upper vapor
#

did you figure your shit out

hearty shard
#

setting scale on 3114 will cause the identity to have a spasm

#

it like breaks it and all ragdolls are considered none

upper vapor
#

yay...n't

upper vapor
icy knoll
#

why does it only log to localadminlogs

#

ugh

#

what is the method for sending logs as Log.Info from exiled does not log to LA console nor LocalAdminLogs here

upper vapor
#

whar

icy knoll
upper vapor
#

it should log to the server console

icy knoll
upper vapor
#

but if you have an exception in a unity method then it'll go to stdout (therefore, LA logs)

restive turret
#

exiled issue

unique crane
#

Average Tuesday tbh

hearty shard
#

hi david

#

when role wrappers

#

when player scale

#

when more admin toy wrappers

#

uh i ran out of things

upper vapor
upper vapor
icy knoll
#

what the hell

#

the trigger enter was being called because there was NREs

upper vapor
#

that's why you need the null check

icy knoll
#
        {
            if (other.gameObject == null) return;
            Pickup pickup = Pickup.Get(other.gameObject);
            if (pickup == null) return;
            Logger.Info("Pickup Found");
            pickup.PreviousOwner.ShowHint("You dropped your item in the void");
        }```
#

this is my new code

upper vapor
#

let's see

icy knoll
#

I did have a log at the start tho

#

and that didnt log either

upper vapor
icy knoll
#

hint doesnt show either

#

ima try a global broadcast just for test

upper vapor
upper vapor
#

that's weird

#

maybe uh

#

the collider has its layer set to only collide with players

icy knoll
#

any way to modify?

icy knoll
#

how do i set this?'

#

inside the component?

upper vapor
#

get the collider

#

set the property

icy knoll
#

like pit.GetComponent<Collider>?

upper vapor
#

ye

#

i'm not sure what tags it has by default

icy knoll
#

i dont see excludeLayers or includeLayers

upper vapor
#

do you have UnityEngine.PhysicsModule referenced?

icy knoll
#

yes

#

coremodule too

upper vapor
#

seems that there are no included or excluded layers specified so that isn't the issue

icy knoll
#

btw

#

it is players

#

threw myself into the pit

#

"Player"

#

no item

upper vapor
#

pain and suffering

icy knoll
#

yup

#

so what is missing here

untold raft
#

Maybe someone explain why when i use display hint, I'm not included on Player.List

Code:

{
    Logger.Info($"Player {player.Nickname} is on team {player.RoleBase.Team} and has role {player.RoleBase.RoleName}");
}```
Console: 
```Player Dedicated Server is on team Dead and has role None
Player Vretu is on team ClassD and has role Class-D Personnel```

Code:
```foreach (var player in Player.List)
{
    Logger.Info($"Player {player.Nickname} is on team {player.RoleBase.Team} and has role {player.RoleBase.RoleName}"); 
player.SendHint($"Just a Hint");
}```
Console:
```Player Dedicated Server is on team Dead and has role None```
static meteor
#

Sending a hint to the Dedicated server may be breaking it

#

Since its not a real player

untold raft
#

Yes it was causing the problem

#

Why is the dedicated server included in Player.List?

soft depot
#

NW moment ClassDTroll

icy knoll
untold raft
#

I use if (!player.IsHost)

#

but thx for solution

icy knoll
#

that works too ig

#

forgot about that one

restive turret
#

me when ServerDropItem doesnt trigger PlayerOnDropped

icy knoll
#

does anyone know the layer that a pickup is under?

#

I'm still working on this PitKiller thing for items and I want to see if selecting layers works

icy knoll
#

now I just have to hope that a pickup has a physics body collider

upper vapor
restive turret
#

has a Capsule Collider

upper vapor
#

why is there a Pickup tag then

upper vapor
restive turret
#

oh wait i might be on labapi 2 version not latest

icy knoll
#

hmm

#

now to figure out how to add stuff to the allowed layers

#

I can't figure it out other than doing a coroutine to check which id rather not do

upper vapor
restive turret
#

ye

upper vapor
#

we're both dumb

icy knoll
#

how do yall even get the project on unity what

upper vapor
#

AssetRipper

icy knoll
#

hmm

upper vapor
#

:3

icy knoll
#

im getting frustrated about why no pickups are triggering

lethal cradle
#

cuz ur banned

restive turret
#

i just blind af

icy knoll
#

ima install unity and see what the fuck is happening

restive turret
#

magic

warped prairie
#

hello squad

white matrix
#

Also how would I go about adding comments to my autogenerated config file, and is the order the things are listed inside of the class what it uses to determine the order of the items in the config file?

static meteor
#

If its like Exiled you just add

[Description("")]
white matrix
#

okay yeah that works thanks

#

Does anyone know that if I change the initial value of both side's respawn tokens, do I also need to update the AvailableRespawnsLeft or does it do that on it's own

white matrix
#

And lastly before I go sleep; how do I spawn in Tickets because I don't know anything about remote admin except click button in UI make thing go brrt

worthy rune
restive turret
#

well fuck

#

F for custom waves as would be in the game

#

wait then why does it show in the game in RA panel as custom wave

icy knoll
sinful bronze
restive turret
#

WaveManager.Waves.Add

#

but when it wants to sync

#

it cannot

sinful bronze
restive turret
#

i think

#

cus trying to get an index of it but it doesnt exists?

#

prob not exists in client side

restive turret
sinful bronze
#

Its strange what RA trying to find new waves

restive turret
#

ye i dont even know how RA panel got it

sinful bronze
#

Maybe RA try to add more indexes

unique crane
#

Cuz it gets created only on server xd

sinful bronze
#

But why client side

sinful bronze
#

Yeah

unique crane
#

You still need some client-side code

#

like for anims

#

and such

#

They do need the wave instance for that

#

Which doesn't exists on client

sinful bronze
#

And i think why RA try to add new wave in RA

#

For client

unique crane
#

Not sure

restive turret
#

ye, but when it updates it dc me

sinful bronze
#

Huh

restive turret
#

with the error msg about indexes not found

restive turret
#

ofc not exists cus in client it never willl

unique crane
#

Good idea to put on github tbh

#

Sometimes people do custom teams

restive turret
#

i even patched the Wave on labapi cus it would just return true

unique crane
#

like serpents or some stuff

#

So you could make your own spawn waves for it

restive turret
#

I have to try it so actually works

#

LMAO

#

okay, it spawned them

#

in nowhere

#

Mega spawnwave

unique crane
#

lol

#

Thats actually cool

#

didn't know it possible

#

But hey, you can make full-auto shotgun with just 2-3 properties set

restive turret
#

uh how the subtitles works?

acoustic cosmos
#

Why is NewRole PlayerRoleBase now

restive turret
#

because its already gain a role

acoustic cosmos
#

So true

restive turret
#

if you want to get the old things subscribe this
PlayerRoleManager.OnServerRoleSet
or
PlayerRoleManager.OnRoleChanged

acoustic cosmos
#

Ah no it's fine, thanks

#

It was just throwing errors as I updated the server files

restive turret
#

also because it already initialized and set things to it

restive turret
hearty shard
#

💔

restive turret
#

OnSpawned subsribe

#

<3

#

eve

#

I need a transpiler

hearty shard
#

it depends

#

wait actually

#

nvm

#

you can

#

i just know spawned was changed from exiled to only be called when setting a pos (so only fpc roles 💔 )

#

had to change my stuff to changedrole

#

smh

restive turret
#

i need one for OnPointsModified for able to get custom milestones

white matrix
#

I have an idea or two I'd like to try to figure ou t

#

but for now I'm just trying to type out stuff

#

because I'm typing poorly

#

me when red lines

#

and green lines

restive turret
#

If u want I can release the thing

#

I wanna support custom milestones so thats what I need too

agile oasis
#

how to spawn locker, because it is invisible ? Am I miss something ?

var lockerStructure = Object.Instantiate(NetworkClient.prefabs.Values.First(x => x.name == "LargeGunLockerStructure"));
lockerStructure.transform.position = surface.transform.TransformPoint(offset);
lockerStructure.transform.rotation = surface.transform.rotation;
NetworkServer.Spawn(lockerStructure.gameObject);
worthy rune
#

looks fine, maybe log the lockerStructure.transform.position after you set it? could be not where you think

rustic sparrow
white matrix
#

I think I have something but I don't know if I can test it

#

like I'd need to be able to give a team tokens but I can't find anything on that using an admin command

#

either that or I have my things set up incorrectly

#

but so far what I have iterates over every spawn wave and can customisably set the starting tokens of each wave depending on their team alignment

agile oasis
teal junco
white matrix
#

the only things I need to be finished with this is 1. know what event is called to update the DMS as I want to add a feature send out a notification if it would have triggered but was disabled, as well as actually changing the milestones because I think I have a working patch right now.

teal junco
#

UCT does, serpents and UIU does, omni does

teal junco
worthy rune
agile oasis
#

more correct code

var lockerStructure = Object.Instantiate(NetworkClient.prefabs.Values.First(x => x.name == "LargeGunLockerStructure"));
Log.Debug($"lockerStructure name : {lockerStructure.name}");
lockerStructure.transform.position = surface.transform.TransformPoint(offset);
lockerStructure.transform.rotation = surface.transform.rotation;
LabApi.Features.Wrappers.Locker locker = LabApi.Features.Wrappers.Locker.Get(lockerStructure.GetComponent<Locker>());
locker.Position = surface.transform.TransformPoint(offset);
locker.RotationY = surface.transform.rotation.y;```
worthy rune
#

ahh i see

#

i think you should be able to omit these lines, but idk

lockerStructure.transform.position = surface.transform.TransformPoint(offset);
lockerStructure.transform.rotation = surface.transform.rotation;
agile oasis
#

hm... need to check

upper vapor
# agile oasis thank you, working

Do the lockers appear if you spawn them after the round starts? It appears to me that lockers spawned while the player was connected don't render to that player

agile oasis
# upper vapor Do the lockers appear if you spawn them after the round starts? It appears to me...

I spawn manually after round started.

this code works

var lockerStructure = Object.Instantiate(NetworkClient.prefabs.Values.First(x => x.name == "LargeGunLockerStructure"));
LabApi.Features.Wrappers.Locker locker = LabApi.Features.Wrappers.Locker.Get(lockerStructure.GetComponent<Locker>());
locker.Position = surface.transform.TransformPoint(offset);
locker.RotationY = surface.transform.rotation.y;

NetworkServer.Spawn(lockerStructure.gameObject);

Now I am trying to understand how to call FillChambers with Items I want

upper vapor
#

And the locker is visible, right?

#

Not just the items

worthy rune
#

you should see the locker if you use the locker wrapper to set the posistion and rotation

upper vapor
#

😭

#

I'll have a look later

#

Nvm I'm gonna check LabApi source rn cuz I'm impatient

unique crane
#

That might be why

hearty shard
#

!vsr

regal lakeBOT
hearty shard
#

an npc cannot occupy a slot

#

as in when you go to the server list

unique crane
#

(which they dont)

hearty shard
hearty shard
#

cool

#

i still wish we had tools to remove them easily when clicking N

unique crane
#

They only fuck up Steam player count

hearty shard
#

cuz they shouldnt there

hearty shard
unique crane
#

I press shift + tab in game and I see steam friend being in a lobby

hearty shard
#

yeahhh

unique crane
#

437 players

hearty shard
#

dedicated server counts too

#

it stinks

#

there will always be +1 when looking on steam

unique crane
#

Mhm

#

I dont think that the client knows whats a player and whats npc

#

Or well...

#

dont know

hearty shard
#

it might not but still

#

bool IsNpc sync trolling

#

rn

#

well

#

that would still count dedicated server

unique crane
#

I guess best would be to sync the player type

#

if that isnt already in game

hearty shard
#

i dont believe it is

restive turret
restive turret
white matrix
hearty shard
#

wave

white matrix
#

that didn't work either

#

I'll retry it

#

but it said 'nuh uh' earlier

hearty shard
#

has to be in remote admin not the client console

restive turret
#

/wv list

#

In server console

white matrix
restive turret
#

😭

restive turret
#

U trying at client console not RA Console

white matrix
#

😭 cut me a bit of slack okay

#

I thought console = console

#

Ah well

#

here I go doing something stupid again clueless

restive turret
#

So when home is around+3 or 4 hour

white matrix
#

I've been home all day today

#

doing some stuff I'm supposed to be doing

#

and tinkering a little bit with what I'm doing here

#

I think the harmony patch works

white matrix
restive turret
#

i just memorized bc i used like 4 times today

white matrix
#

ah

#

eh I'll just get some by shooting a nut or something

upper vapor
white matrix
#

my patch did nothing

unique crane
#

hm

white matrix
#

this is annoying but it is what it is

soft depot
hearty shard
#

moment

soft depot
#

Monkey see, monkey do ClassDTroll

upper vapor
#

*still refuses to push to master*

restive turret
#

I always push to master

#

Because I aint the main

teal junco
lethal cradle
#

greetings nerds

teal junco
#

hi

white matrix
#

@restive turret if you figure out how to edit Milestones can you lmk? I'd love to look further into it but I can't find anything and I have a couple uni things I need to do for a little while so I don't have enough time to look into it for the time being

#

I might spend some time on it soon but you were working on changing them for your custom wave too rgith

restive turret
#

Well i going home rn

#

And ye

teal junco
#

does anyone here know any good invisible strings i can put into custominfo?

restive turret
#

\uE080

teal junco
restive turret
#

Idk

#

A square

grand flower
#

Hey! New to SL plugin development, had a quick question about async/await. Is it supported by SL's version of Unity, and is it possible to use for plugins?

static meteor
#

Use MEC instead

grand flower
#

Asking because of a TCP socket's async APIs

#

I could potentially use MEC to poll but it's... not ideal

grand flower
#

Need to receive/send messages with a TCP socket

#

I could Task#Run() it I suppose

upper vapor
#

you can just create a thread
that might be more fitting in a Unity context

#

make sure not to access Unity stuff from another thread though

hearty shard
#

but

#

as stated above

#

do NOT interact with unity within another thread

#

you will kill the server

grand flower
#

I know how that part works don't worry ^-^ If anything I'll probably just have the background thread read from a threadsafe queue and just push to it on the main thread

upper vapor
#

oh you're a networking specialist
i might see why you're doing TCP :3

grand flower
#

I actually rarely do TCP in game dev haha

#

Task#Run() it is

upper vapor
#

are you making some (crazy) custom protocol?

grand flower
#

No just comms between servers

#

Task#Run() will just run it on the threadpool so it should work as well as a thread

#

Assuming .NET Fx 4.8 is still that way, haven't touched that framework in years

upper vapor
#

yeah it should be like that

soft depot
grand flower
#

Oh sweet, can just use that instead of polling

restive turret
#

custom milestone works i guess

restive turret
#

nearly done but this

white matrix
restive turret
white matrix
#

buh it empty sobbers

restive turret
#

cus i uploading rn

white matrix
#

aah awesome

#

I'll take a peek in a moment

restive turret
#

LabApiOut is where the dlls

white matrix
#

alrighty

restive turret
#

have fun or smth

white matrix
#

I'll definitely take a good look at it

restive turret
#

I going to get my pizza

white matrix
#

have a nice meal

restive turret
#

and go to sleep

#

cus I woke up at 20:50-ish

#

(~1h nap time was since I last sent a dm to u)

white matrix
#

aye alright

#

I might ask a couple questions in dms laters

#

but I think I have a rough understanding of what you're doing here

restive turret
#

or u can do it here

#

i aint might

white matrix
#

the patching is mostly magic to me though

#

but I'll save that for tomorrow

restive turret
#

the transpiler me too

white matrix
restive turret
#

u can send it and will andser tmr

white matrix
#

you guessed it correctly

restive turret
#

i just chatgptd some of it

white matrix
#

yeah sure can do but I haven't read all of it

#

fair enough

restive turret
#

Basically only the part I did was checking what to do and the exact sequence

#

If you read some of the c# il codes you can usually guess what do what

#

OpCodes. Brtrue_S, label | This is same as the original except its a different label (I removed the original code that does the same! Except if its Not Null go to Label
OpCodes. Ret | same code doesnt changed
OpCodes. Ldloc_S, 0 | Load value from stack index 0.
OpCodes. Ldarg_1 | Load argument at index 1
OpCodes. Call | Call the method
OpCodes. Brfalse_S label | If return value is false just go into specified label

#

Otherwise will exit

#

Basically
..
// Code from above
if (ilimitedwave == null)
return;
// Here is what we want to add
if (CustomWaveSet(spawnableWaveBase, newValue)
return;
// Running original code here

restive turret
#

What if code changes, but ye good one

#

I will do

#

It was fast rls since I made it work

obtuse spruce
#

The order of RoleChange is

  1. ChangingRole & Changed
  2. ReceivingLoadout
  3. Spawning & Spawned

??

scenic trout
white matrix
#

Where was Timing.CallDelayed again?

#

in what file

#

because I don't have it included and I forgot

obtuse spruce
#

AssemblyCSharp Firstpass

#

using MEC;

white matrix
#

right thanks

#

Is there a list of things CASSIE can say or do I just wing it using the ingame tool

white matrix
#

What's the ideal Cassie announcement function to call (is it RespawnEffectsController.PlayCassieAnnouncement?) and what dependencies does it have because it no build.

restive turret
#

AssemblyCSharp

#

I think

white matrix
#

I'm just getting this build error, and that's a referenced file
0>CustomEventLoader.cs(51,34): Error CS0012 : The type 'NetworkBehaviour' is defined in an assembly that is not referenced. You must add a reference to assembly 'Mirror, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
0>------- Finished building project: RespawnTokenOverhaul. Succeeded: False. Errors: 1. Warnings: 0

RespawnEffectsController.PlayCassieAnnouncement("SURVIVE . FOR THERE IS ONLY YOU LEFT", true, false, true);

#

I'm also kind of wondering what the CustomSubtitle parameter does, it probably just overwrites the displayed text however

#

oh wait I cannot read

#

it says right there it needs mirror

restive turret
white matrix
#

😭 I'm running on such little sleep but it's so close to being done

#

istg

#

awesome it built

restive turret
#

Now build your path to the bed

white matrix
#

:( I wish

#

I gotta change the ip adress type of my server from static to dynamic because I typed in the wrong command

#

and they've only got time in about an hour

#

so I'll be awake for a bit longer

#

also why I'll have to test it tomorrow

#

because I'd rather not leave my pc on whilst I'm asleep; costs energy which is money

restive turret
#

I have static IP

#

But i don't wanna verify it cus probably against the rules having the RA password as 123

#

And have a great description

#

Which mine would be "Testing and abusing any players who join this hell hole"

white matrix
#

lmao

#

mine is much more tame

#

but the server name is Dipshit's Cave.. which if that's too much I'll change it

#

that's just the name of the Discord I host it for so why not

#

'host' I play with, it's not exactly permanently up

#

alright time to write a readme I guess.

restive turret
#

Oh ye it needs rules

white matrix
#

I have rules for it

#

had to make a pastebin for it

hearty shard
#

What are rules

restive turret
#

1, use common sense
2, search what it is really
3, use legendary sense
4, there is no gameplay rules
5, don't be dumb or something that usually be not great
6, please be over 13, otherwise reporting your steam account

white matrix
#

Is it safe to just throw a \n in a Description btw?

#

can it cope with that?

restive turret
#

Huh you can line break

white matrix
#

idk I wanted to try

#

for a multiliner

restive turret
#

Like with pastebin

white matrix
#

idk how else to add more text in there

restive turret
#

Enter?

white matrix
#

no I'm talking about Config Description

#

not Pastebin

#

sorry should have mentioned

restive turret
#

Oh uh

#

Ye should work

grand flower
#

What did TemporaryData get replaced with since it's deprecated

hearty shard
#

Was this a nwapi feature ?

grand flower
#

seems to be gone

hearty shard
#

Was it a nwapi feature

#

And what specifically did you use it for

grand flower
#

seems it was, and just storing arbitrary data on players

grand flower
#

ty

hearty shard
#

@stuck peak why use reflection there btw ?

#

im curious

grand flower
#

yeah looks like new TStore(player) would work

hearty shard
#

cool

grand flower
#

Might need the new() constraint on GetOrAdd, but im not even sure you would since it has the CustomDataStore constraint

stuck peak
hearty shard
#

Hm

#

oh...

#

like that

restive turret
#

Huh

hearty shard
#

Generic method

#

I feel like this could be changed to not use reflection but idk

restive turret
stuck peak
terse bone
#

Hi, I wanted to bring this suggestion back to light. Right now players have to set up the same SS-settings on multiple servers that come from one server host which for them is really confusing. Is there maybe a workaround for this problem?
#serverhost-suggestions message

stuck peak
hearty shard
#

was just wanting the reflection gone

stuck peak
worthy rune
worthy rune
#

also you can call unity related apis from them dont listen to eve

grand flower
#

Need Task#Run() to run in a background thread mostly

hearty shard
#

since when

#

i swear it wasnt like that

restive turret
#

Unity6?

worthy rune
#

with async await you can

#

no not unity6

#

its the unity syncronization context that allows you todo it

restive turret
#

Oh uh

hearty shard
#

oh

#

Just not in another thread ?

worthy rune
#

it always brings you back to the main thread after an await

hearty shard
#

thats cool

#

didnt know this

worthy rune
#

if you task.run then you are doing somthing else entierly

hearty shard
#

okay

restive turret
#

Well not like I gonna use it since I dont write async code

#

But nice one

languid temple
#

are you using magic?

worthy rune
#

task.run and async await are different concepts

#

async await is asynchrouns programming (which has nothing todo with threads), and the other task.run is about starting up a thread and running your code there

hearty shard
worthy rune
#

they are different and have nothing todo with eachother is what im saying

hearty shard
#

yeah

#

just always thought it was bad for async await since it blocks

worthy rune
#

it doesnt block, thats the point of it

hearty shard
worthy rune
#

it awaits

hearty shard
#

i have things i need to relearn

#

oh its task delay i was thinking of

#

that blocks

#

😭

#

or is it

grand flower
#

if you await something on the main thread it will block the main thread though

#

Unless Unity's doing some weird voodoo

worthy rune
#

when ever i refer to async await im refering to TAP or Task-based Asynchronous Pattern i suggest you read into it

worthy rune
#

oh i think your referring to what todo when calling async code, you can just fire the async code without an await like this _ = DoAsync() and it will run asynchrously on the main thread without blocking

hearty shard
#

oh

grand flower
#

Even outside of the Unity editor? That sounds crazy weird

#

What if my background thread awaits an async method

worthy rune
grand flower
#

Don't have access

stuck peak
#

copied message:

You can make an extension like this

/// <summary>
/// Log exceptions for any async task.
/// One of LogExceptions or IgnoreExceptions must always be used.
/// </summary>
/// <param name="task">The task to make the continue with.</param>
/// <returns>The resulting task.</returns>
public static Task LogExceptions(this Task task)
{
    task.ContinueWith(c => 
    {
        Log.Error(c.Exception.ToString());
    }, TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.ExecuteSynchronously);
    return task;
}

so you can do this instead everywhere

[PluginEvent(ServerEventType.PlayerReport)]
public void PlayerReport(PlayerReportEvent ev)
{
    Plugin.Instance.ReportPlayer(ev).LogExceptions();
}
stuck peak
grand flower
#

Unity's not going to start messing with my background stuff if I don't touch resources on its main thread

worthy rune
stuck peak
#

or !role

#

one of them lol

static meteor
#

!serverhost in your console if i remeber correctly

hearty shard
regal lakeBOT
#

Do it in your servers console, Most I will do is laugh at you

hearty shard
#

yes

#

im always right

worthy rune
stuck peak
grand flower
#

Now I remember why I've stopped using Unity all these years ago

worthy rune
#

lol

grand flower
#

I'll check if that's actually the case just to be sure but holy moly that's a pain in the ass

grand flower
#

Yeah it appears that's the case

#

Hope I can override that behaviour because that is stupid

#

I get why you'd want it but like, idk don't make it the default for everyone

#

thanks Unity

worthy rune
#

i believe you can create your own synchronization context and set it before you await(?) i dont know since i have never done it myself

grand flower
#

Might be able to tell it off by doing await MyFuncAsync().ConfigureAwait(false);

#

I'll have to try

worthy rune
#

could work

upper vapor
upper vapor
# worthy rune after the first await i believe you end back on the main thread even if you star...

Unless documented otherwise, all Awaitable instances returned by Unity APIs, as well as any user defined async Awaitable returning methods, have the following continuation scheduling behaviour:

If the method is called from the main thread, it resumes on the main frame.
Otherwise it resumes on a .NET ThreadPool thread.
using Tasks won't guarantee which thread you end up on, and you most likely won't end up on the main thread
and never use async void

grand flower
#

async void is fine for fire and forget behaviour, like event handlers, but that's pretty much it

upper vapor
grand flower
#

did some dumb testing to check what Unity does to my await calls and it seems okay?

grand flower
upper vapor
#

but then you need to make sure you try-catch everything

grand flower
#

Yep

#
[2025-04-30 22:57:03.128 -07:00] [WARN] [SLTestPlugin] NULL THREAD
[2025-04-30 22:57:03.142 -07:00] [WARN] [SLTestPlugin] NULL THREAD
[2025-04-30 22:57:03.238 -07:00] [WARN] [SLTestPlugin] Before: Thread Pool Worker.
[2025-04-30 22:57:03.910 -07:00] [WARN] [SLTestPlugin] After: Thread Pool Worker.
#

so I should pretty much be fine with what i'm doing

#

as long as I don't await anything from the main thread itself

upper vapor
#

so you're double fine lol

grand flower
#

Oh yeah I never said I'd use async void haha

upper vapor
#

you might wanna check out awaitables though
i haven't used them yet but they are pretty cool

grand flower
#

Yeah I took a look at them and idk if what I'm doing warrants using them

#

I'm really only going to start a connection in a background task, and then start another background task for outgoing messages inside it, using the first task for incoming messages

upper vapor
#

eh, fair

worthy rune
#

it "observes" the error so doesnt crash the app

restive turret
worthy rune
upper vapor
#

right

#

that works for fire-and-forget, yeah

icy knoll
#

btw @upper vapor after getting some help elsewhere, turns out the pitdeath collider was on a layer that couldnt interact with pickups at all. so i just changed the layer to something that would. sorted.

upper vapor
#

i'll save this info for later

hearty shard
#

no basegame call?

#

oh

#

cuz its

#

ok

upper vapor
#

bruh

hearty shard
#

xd

#

also found the actual cause of skeleton being invis

#

this is WITH scale code i had before

#

just ReadyList instead of List

upper vapor
#

whar

#

readylist?

hearty shard
#

foreach (Player target in Player.ReadyList)

upper vapor
#

ohhhh