#plugins-dev-chat

1 messages ยท Page 20 of 1

brisk matrix
#

So i need to do smth like SpeakerToy.ControllerId = Id + 1?

teal junco
#

have an internal id system

teal junco
teal junco
grand flower
#

is it not executing after an OperationCanceledException?

#

Cause you're kinda telling it not to catch that one

brisk matrix
#

Thanks it works

terse bone
#

but if i remove that check then it works

#

this works

grand flower
terse bone
#

oh, i didn't change method name

grand flower
#

love the automod

terse bone
#

lmao

grand flower
#

but yeah that should work

#

Unless I'm mistaken when in that scenario won't catch OperationCanceledException and you'll end up halting your code

#

and since it's an awaitable i'm guessing you got hit with a silent exception

worthy rune
#

@mild ice any idea whats going wrong with auto mod here, seeing this alot again

grand flower
#

wonder if it's the dollar sign

#

$interpolation is cool

#

hmm

#

.Error

#

it's dotToken

mild ice
worthy rune
#

maybe, although i thought stuff inside ``` should be excluded mostly

#

anyway to exluded it inside code blocks

mild ice
#

To be honest, Automod is in a bit of a state right now and I currently lack the access to fix it
Once some things are sorted out behind the scenes I'll definitely look at making sure false detections are properly addressed, in the meantime I apologise for the inconvenience!

worthy rune
#

No worries, thanks for looking into it either way

terse bone
#

silly me

rose bridge
#

does anyone know what the branch is? i put in Labapi-beta but its not showing my server

static meteor
#

Try early server build

grand flower
#

anything like this in the server logs?
[2025-05-13 14:04:48.493 -07:00] Your server won't be visible on the public server list -

unique crane
rose bridge
rose bridge
hearty shard
#

On client

#

Or just server

#

Both have to be same version

rose bridge
#

i think my steam has been on the public beta since it released. unless if it updated today

rose bridge
#

i think i was still on my server

#

i had Labapi-beta in before then i switched to early-server-build

unique crane
#

You have early=server-build

#

not early-server-build

rose bridge
icy knoll
rose bridge
#

let me do that

icy knoll
#

yeah it wont do anything without reinstalling

#

bruh

rose bridge
#

that was it dogobruh

snow ruin
#

isnt the texttoy in the assembly ?

#

i cant find it for some reason

restive turret
# unique crane

Me when I can no longer update my plugins cus the update release at 11 pm

#

๐Ÿ˜ญ

restive turret
snow ruin
#

i hate

#

why does it send as a file

#

its not there

icy knoll
snow ruin
#

smh discord

restive turret
#

Search via DnSpyEx

#

Idk

#

I literally in bed

hearty shard
#

Images dont load

hearty shard
#

Discord moment

#

(its discord)

snow ruin
#

thank god

icy knoll
#

it is discord

#

yeah

#

i just found that out

#

everyone started sending images

#

and having the issue

#

but the encoding part is a factor!

snow ruin
#

wouhou found texttoy

terse bone
#

why doesn't it work

#

it's just a ss

snow ruin
celest thorn
#

There's a way that i could actually make the reload force without having any ammo, so you drain still the ammo but on reload you don't need any ammo

teal junco
#

does anyone have a screenshot of the text toy

terse bone
idle lion
#

oh god

faint sparrow
#

why

restive turret
#

๐Ÿ˜ญ

#

Wait

#

Does it can read and use urls as pics too?

terse bone
#

something broke i think

restive turret
#

I rather use this pic than the above

terse bone
#

i remade that top one in higher resolution :3

idle lion
#

show them

restive turret
#

No pls

#

It should belong to the server hosts group

grand flower
#

are you spawning a shit ton of primitives to make an image

terse bone
#

nope, TextToy

grand flower
#

how

terse bone
restive turret
#

<img url=linkhere/> ?

#

Or smth idk

terse bone
restive turret
#

Its a TMPText thing

grand flower
#

huh

#

interesting

#

now give us the option to render images in hints NW mmLul

terse bone
#

each individual pixel row in the image is a separate argument for TextToy and Format contains all these arguments/lines with newline's in between

restive turret
#

Line count?

#

*string len

terse bone
#

wdym?

teal junco
#

also can you upload it as a .txt just for demonstration purposes

#

either one will do

terse bone
teal junco
terse bone
#

not even the biggest file

terse bone
#

I did some tests and going above 99k pixels causes some distortion to image

wheat flower
#

how do you convert image to text again?

#

i forgor

terse bone
wheat flower
#

wasnt there like a website or something

terse bone
terse bone
upper vapor
#

Oh you're spawning a pickup, I missed that
You need call ServerSetInstanceAmmo with the serial of the pickup

unique crane
heady turret
unique crane
#

Wdym

heady turret
unique crane
#

Have you updated the dlo

#

Dll

#

To the newest one?

heady turret
unique crane
#

No, you need to do it via assembly csharp

#

Wrapper is not released yet

heady turret
unique crane
#

Well download the newest server branch

#

And put the assembly into your dependency

heady turret
#

thx

heady turret
unique crane
#

I dont speak russian

#

or whatever is that

#

Have you publicized the assembly by chance?

heady turret
unique crane
#

Ahaaa

#

Use different publicized

#

for the assembly

grand flower
#

Any chance of dummies getting unique ids instead of just ID_Dummy

#

Kinda screws with existing code

#

To the point where I have an extension method that returns $"{dummyHub.connectionToClient.connectionId}@dummy" as an id

unique crane
#

They have unique player ids

#

like those in brackets after the name

grand flower
#

Yes but any code using UserId breaks with them

#

Which is what is used for 99% of code anyway

unique crane
#

Then assign them unique id

grand flower
#

I guess, but the idea was to avoid writing dummy-specific checks when they pretty much are full fledged players in all other respects

#

Which would make them even better for QA testing

unique crane
grand flower
#

Storing data using the userid as the key

#

Works fine for players, dummies break because they all have the same id

random scaffold
random scaffold
#

you can make 999 id

grand flower
#

You mean PlayerId?

random scaffold
#

yes

grand flower
#

Bad idea

random scaffold
#

just spawn dummy with specific id

#

its easy

grand flower
#

yes, but I don't want to have different code between players and dummies, that's the point heh

random scaffold
#

you can how i know

grand flower
#

that would break the rest of the game

#

since it expects ID_Dummy for some checks

#

it's why I'm asking NW if they can fix it :^)

#

bit of an oversight imo

unique crane
#

Well but you arent storing it in a file or something, arent you?

#

Wouldnt make sense for dummy

grand flower
#

I'm not no

#

But even if I was dummies really shouldn't break it

#

Considering it seems you meant for them to basically just be players since they can do everything a player can

unique crane
#

That is not true

#

They are not players

grand flower
#

Which is great for QA, the UserId issue is pretty much the only grievance I have with them

unique crane
#

Yeah but they are meant for QA

#

Not to store data about them

grand flower
#

I'm not storing data about them

#

Not long term, just while they're alive, I need to attach things by UserId

unique crane
#

Use the ReferenceHub then

grand flower
#

Using the Reference Hub as a key is a bad idea

unique crane
#

Why?

grand flower
#

If it gets destroyed, or if I have to hold data regarding a player even if they reconnect

#

Which while it won't happen with dummies obviously, the point of my request is to not have to write code that's different between dummies and players

#

Right now I have to either do dummy checks or just make my own userid for dummies

#

which means more code to write for dummies that won't exist in normal gameplay anyway heh

#

(and while I could patch it, I'd prefer not to since the more patches I have the bigger the risk of things exploding between updates)

random scaffold
#

shooting / picking up items or just for scps

unique crane
#

Use Debug version to keep in dummies

#

and use Release to ignore them

grand flower
#

I guess, wouldn't change the fact I'd have to write more code to differentiate them

unique crane
#

if(Player.IsDummy)?

#

Sorry, but they are different from a player

grand flower
#

The only thing really making them different from players atp is the UserId, because otherwise they don't differ

#

they'll trigger the same events and all, which is great for QA testing, just that being forced to differentiate them purely because of the UserId is a bit of a pain point

unique crane
#

Assign them a new one on spawn

#

No patches required

grand flower
#

Them not having the ID_Dummy UserId is fine?

unique crane
#

I doubt its used somewhere else in the code

#

They have unique network connection object too

grand flower
#

sounds good then, ty

unique crane
#

Yeah every base game code uses IsDummy property

#

Feel free to change the id as you wish

#

I guess

heady turret
unique crane
#

65534 chars for the base string

#

And 65534 for each argument

#

Maybe few chars less for the args as they are wrapped by the synclist stuff

brisk matrix
#

Is there a proper way to remove a SpeakerToy once it has finished playing sound? I didn't seem to find any events

agile oasis
#

is it possible to have a different panel for keycard access for pedestals ?
If I put different DoorPermissionFlags visually it won't be recognizable.

hearty shard
#

to change the permissions

#

oh

#

you mean change the pedestals required permissions

#

uhh

#

not possible i dont think

agile oasis
#

yeah, it visually shows predefined in prefab

#

well, I will workaround with hint then

upper vapor
unique crane
#

ive got code somewhere

#

idk where

#

Maybe I can find it

terse bone
upper vapor
#

File.ReadAllBytes

#

and done

#

hopefully it has a stream overload but i'm not sure

#

and then you can resize the image in-memory without modifying the "uploaded" image

terse bone
upper vapor
#

rip

terse bone
#

but it is a nice feature

worn gull
#

The TextToy which category?

upper vapor
worn gull
#

Not really ๐Ÿ˜„

upper vapor
#

huh

unique crane
#

Default

#

for client

#

Viewmodel for server

worn gull
#

Thanks

unique crane
#

Unless server got updated which I doubt

#

I had this issue during testing where the text disappeared when looking at sky

#

So I changed it to different layer and it worked fine

#

But then it got merged and skybox has changed meanwhile

worn gull
#
    public static bool Raycast(Player player, out RaycastHit hit) => Raycast(player.Camera.position, player.Camera.forward, out hit);

    public static bool Raycast(Vector3 origin, Vector3 direction, out RaycastHit hit) => Physics.Raycast(origin, direction, out hit, 100f, ToolGunMask.Mask);

    private static readonly CachedLayerMask ToolGunMask = new("Default", "Door", "CCTV", "Viewmodel", "UI", "Phantom");```
Still can't detect it bruh, Am I doing something wrong?
upper vapor
#

UI can't be raycasted

worn gull
#

Sad

#

So I can't detect it with raycast

unique crane
#

It can?

#

You just have to enable it on the UI

upper vapor
#

you mean GraphicRaycaster?

#

in that case, ye

unique crane
#

I guess

upper vapor
#

actually no

#

that would be for the client

#

does the text actually get created as a TMPro object on the server?

#

try adding an Image to the canvas instead

#

the text might not get raycasted if you hit outside of the actual text mesh

carmine prawn
#

๐Ÿ’€

carmine prawn
#

rendering video frames to TextToy in real time is challenging

#

having multiple TextToys rendering video frames at the same time can have a lot of stuttering

brisk matrix
upper vapor
teal junco
#

I said I wouldnt switch to LabAPI but thinking about how similar they are I might at least make half my plugins in it.

#

and just make the exiled version use the exiled entrypoint or something

icy knoll
#

the plugin entry point just has an exiled check, and then it uses labapi events

teal junco
#

what is an exiled check

#

does that mean you can use the same dll for both

hearty shard
#

no

#

not same dll

teal junco
hearty shard
#

just compiler processing to remove exiled from non exiled dll

#

to prevent load error

teal junco
#

i dont like having to manually change the references but its alright

hearty shard
#

well

#

its literally the same as swapping from debug to release

#

and back

#

its 2 clicks

teal junco
#

i heard theres a way to make it conditional too but i couldnt be assed to figure that out

hearty shard
#

just this

teal junco
#

oh awesome

#

I'll take a deeper look at the differences between labapi and exiled later

#

theres probably some events exiled has labapi doesnt.

restive turret
#

I set those in .props so doesn't need to actually edit and .csproj file

teal junco
#

cant wait for ucr labapi port

plush walrus
teal junco
#

no

#

its not

#

that would be cool tho idk

#

the biggest issue i have with labapi rn is no customrole/customitem

restive turret
#

Im gonna send u to the edge of the game

teal junco
#

my hope is only one or two people make such a thing for labapi and there isnt like 3 frameworks of the same thing

restive turret
#

Hey I did my Own custom item, kinda custom roles too

teal junco
#

I'll look at your repo and see if theres any PRs I wanna make

restive turret
#

Have fun I accept those if I see benefits or something

#

Since I only used for my server isn't much

#

My issue currently is the Ondropped runs twice but that can be changed

#

Because it doesn't run the labapis one

#

If you drop it while in inventory or by throwing (which should be)

teal junco
#

The structure looks a bit confusing but I think I understand it

#

my only problem really is that there isnt a one file solution for custom event subscriptions

#

but your solution you have is pretty good

restive turret
teal junco
teal junco
restive turret
#

I tried it and ehhh

#

Didn't really liked it

crimson nova
teal junco
upper vapor
teal junco
#

IScp096Item is fire

restive turret
teal junco
#

Yeah

#

i mean itll be nice to be able to support every event in labapi

#

wouldnt it

restive turret
#

Eh might do it

crimson nova
teal junco
#

Dude i swear some people are so ignorant

#

I hope labapi never gets dumbasses asking for help in it.

hearty shard
#

there is 0 way to avoid it

teal junco
#

I hope they'll at least be respectful and literate and even try to read the material people give them

teal junco
hearty shard
#

it wont happen

hearty shard
#

omw to get gated off ๐Ÿ’”

teal junco
#

๐Ÿ’”

#

add a special exception for eve

hearty shard
#

my below average iq begs for an exception ๐Ÿ’”

teal junco
#

anyways i dont really care that much about dumb people as long as they dont bother anybody. i mean i kind of used to be the same way in exiled

hearty shard
teal junco
#

before i had an arc and came back in 2024

teal junco
pallid shell
#

Guys its better Linux or windows for plugin development?

#

@cedar jungle non hai diritti

teal junco
#

Use whichever one you want, windows from what i can see has visual studio ide and also can run scp sl natively

pallid shell
#

Dont look at my pfp please

hearty shard
teal junco
#

Its kind of the first thing i saw

#

I dont know anything abt linux pros and cons

#

if a linux user sees please say them

crimson nova
upper vapor
# pallid shell Guys its better Linux or windows for plugin development?

not a linux user myself but
pros of linux:

  • overall far better customizability
  • usually faster compile times
    cons:
  • a bit more difficult to install .NET for SL development (you need Mono to develop for .NET Framework)
  • can be less user-friendly
    Rider works on linux, too, no need for VS
    if you're familiar with windows, consider trying out WSL (windows subsystem for linux)
upper vapor
crimson nova
#

yeah...

ashen hornet
#

at least I did in a past

unique crane
cedar jungle
crimson nova
upper vapor
#

WineHQ has been maintaining it recently

crimson nova
#

seems I have been blessed with brand new knowledge

#

thanks

restive turret
#

If u have net8+ installed you can compile into net4x

#

How do i know?

#

Cus I tested it

crimson nova
#

I am stupid

restive turret
#

Tested under manjaro but should work whatever platform u want

#

If your main platfrom is win then easy choise

royal mica
#

You can literally compile plugins just fine on Linux

#

via dotnet8 or dotnet9 package

#

don't even need mono

tulip kiln
#

Is every keycard an IDoorPermissionProvider?

I'm doing an if like this: ev.Player.CurrentItem != null && ev.Player.CurrentItem is IDoorPermissionProvider permissionProvider and it returns false when holding a keycard

tulip kiln
hearty shard
#

ye ye

tulip kiln
#

I opened the solution for the first time since 14.0

hearty shard
#

idk they should be

#

KeycardItem inherits it iirc

tulip kiln
#

okay so

#

CurrentItem returns a wrapper

#

And I'm comparing against a wrapper it seems

hearty shard
#

oh...............

#

yeah

#

i forgot about that

#

yeah

#

CurrentItem?.Base is ()

tulip kiln
#

ye ye

#

Gonna check

#

It works

hearty shard
#

wait

#
/// <summary>
        /// Checks whether a player has permission to access a <see cref="IDoorPermissionRequester"/>.
        /// </summary>
        /// <param name="player">The player to check.</param>
        /// <param name="requester">The requester to check the player for permissions on.</param>
        /// <returns>Whether a valid permission was found.</returns>
        public static bool HasDoorPermission(this Player player, IDoorPermissionRequester requester)
        {
            if (player.IsBypassEnabled)
                return true;

            if (player.RoleBase is IDoorPermissionProvider roleProvider && requester.PermissionsPolicy.CheckPermissions(roleProvider.GetPermissions(requester)))
                return true;

            foreach (Item? item in player.Items)
            {
                if (item?.Base is IDoorPermissionProvider itemProvider && requester.PermissionsPolicy.CheckPermissions(itemProvider.GetPermissions(requester)))
                    return true;
            }

            return false;
        }
#

well

#

for you only check the current item

tulip kiln
#

In this case I'm 049, so this method would override my "Plague Doctor needs keycard" mod

#

but good to know it exists ig

hearty shard
#

Ohh....

#

Yeah

#

makes sense

icy knoll
#

@unique crane when Scp3114Events TrollDespair (sowwy for ping)

#

also why is the documentation for PlayerEffectUpdated whenever a player has recieved an effect, does it also include effect removals because of the name of the event args?

grand flower
#

Should be iirc

icy knoll
restive turret
#

I always forgot lumi doesn't have the src

icy knoll
#

but no

#

it's labapi

#

so i didnt apply

#

i should have tho

teal junco
#

applications to develop labapi?

icy knoll
#

yes

#

api maintainer

teal junco
#

Youre probably capable

#

youre a web dev for nw right

scenic trout
teal junco
#

wait how old do you have to be

#

18+?

icy knoll
#

18

restive turret
#

Ye 18

teal junco
#

how old is bolton

scenic trout
#

17

teal junco
#

๐Ÿ˜ญ

scenic trout
#

yeah

#

:(

teal junco
#

im gonna be a crazy programmer by the time im 18

restive turret
teal junco
#

scp sl beter be around by then

restive turret
#

Why does discord suggest random emotes from server

#

I dont have a nitro

teal junco
#

to make u wanna use them

#

n ur like dam. i coulda used that emote

#

I should make a game in unity to get familiar with it more

#

I only just understood components/monobehavior thing after programming for ProjectMER

restive turret
#

I dislike unity

teal junco
#

I know some people dislike unity for political, technical, performance reasons

#

my brain is too small to really understand most of that

restive turret
#

I mostly just hate the ui

#

and the long ass building

#

like guh I chanign 1 file with NOTHGIN inside it and I have to wait ~5 min to actually able to do something?

teal junco
#

i think i heard people in MER say Unity is a bad company

restive turret
#

I not saying anything about their political / financtial view

teal junco
#

their politics directly affect their build times

restive turret
#

slow af even in Ryzen 5?

teal junco
#

if the unity ceo was more socialist unity would compile instantly trust trust

restive turret
celest thorn
#

Someone knows a similar way to do the IsInvisble/InvisibleFor of Exiled (FPCRole) on LabAPI

worthy rune
#

there should be a player checking visibility event

celest thorn
#

If you can tell me more precisily that could be really good

#

because i didn't know nw actually added it

worthy rune
#

PlayerValidatedVisibility

slender lynx
#

this is the most peak thing since megapatch 2

celest thorn
#

lol

#

I was loosing hope

worthy rune
#

lol is it

#

in the past i just used a patch

slender lynx
#

we were trying different patches for almost an entire day

#

nothing worked on the beta

worthy rune
#

strange

static meteor
#

Can you make a player invisible and have a object parented not be invisible?

worthy rune
#

nope

grand flower
#

Sucks that the invisible effect stops you from networking to other players

static meteor
#

I tried it

grand flower
#

Just have a component on the object always sets its position to the player without actually parenting it

celest thorn
# worthy rune in the past i just used a patch
public static void OnPlayerVisibility(PlayerValidatedVisibilityEventArgs ev)
        {
            ExPlayer p = ExPlayer.Get(ev.Player);
            ExPlayer t = ExPlayer.Get(ev.Target);
            
            var spawn = Spawn.Instance;
            if (spawn != null && spawn.Players.Contains(p) && spawn.Players.Contains(t))
            {
                ev.IsVisible = true;
                return;
            }
            var aim = Aimlab.Instance;
            if (aim != null && aim.Players.Contains(p) && aim.Players.Contains(t))
            {
                ev.IsVisible = true;
                return;
            }

            foreach (var va in VirtualArena.Instances)
            {
                if ((va.TeamA.Contains(p) && va.TeamA.Contains(t)) ||
                    (va.TeamB.Contains(p) && va.TeamB.Contains(t)) ||
                    (va.Spectator.Contains(p) && va.Spectator.Contains(t)))
                {
                    ev.IsVisible = true;
                    return;
                }
            }

            foreach (var arena in Arena.arenas)
            {
                foreach (var fight in arena.Fights)
                {
                    var participants = fight.Team1.Concat(fight.Team2).Concat(fight.Spectators);
                    if (participants.Contains(p) && participants.Contains(t))
                    {
                        ev.IsVisible = true;
                        return;
                    }
                }
            }
            ev.IsVisible = false;
        }
celest thorn
#

should i force it?

grand flower
#

uhhh

worthy rune
#

force?

grand flower
#

I don't think it does what you're trying to do?

celest thorn
grand flower
#

You're trying to make players only visible to certain players right

grand flower
#

I think that even is just to check if player A can see player B. As in "if B was 173, would A affect B"

#

alongside all of the other "you see a player" buffs like zombies seeing humans

#

I don't think SL provides any way to hide players from others other than by faking their role for the other players

celest thorn
#

This gets called tho everytime a player gets the fpc update

#

so it doesn't make any sense

grand flower
#

yeah because when a player moves it might change the visibility of other players

celest thorn
#

and should affect the Bloodlust or any other scp

grand flower
#

Think of it as having line of sight with another player

#

not being able to see the player as a toggle

#

yeah

celest thorn
#

So its just for the abilities lol?

grand flower
#

p much

worthy rune
#

shouldnt be

grand flower
#

no?

celest thorn
#

because i know for a fact it should work

worthy rune
#

you can override the result, it does check beforehand if a player would of been visible from any other reason like abilities/range

worthy rune
grand flower
#

does setting it to false make the player invisible for the other

#

interesting

worthy rune
#

yes

grand flower
#

i stand corrected, i'll try it out

celest thorn
grand flower
#

(could we get an event to force networking of player A to player B)

#

(I don't want invisible players to stop being networked in some cases)

celest thorn
#

it doesn't work amazing

slender lynx
#

forcing false dosent work so

#

๐Ÿฅ€

celest thorn
#
            LabApi.Events.Handlers.PlayerEvents.ValidatedVisibility += OnPlayerVisibility;
            LabApi.Events.Handlers.PlayerEvents.ValidatedVisibility -= OnPlayerVisibility;

        public static void OnPlayerVisibility(PlayerValidatedVisibilityEventArgs ev)
        {
            ExPlayer p = ExPlayer.Get(ev.Player);
            ExPlayer t = ExPlayer.Get(ev.Target);

            ev.IsVisible = false;
        }
#

like this are all of the stuff im doing now

grand flower
#

uh

#
            LabApi.Events.Handlers.PlayerEvents.ValidatedVisibility += OnPlayerVisibility;
            LabApi.Events.Handlers.PlayerEvents.ValidatedVisibility -= OnPlayerVisibility;
#

is that actual code you're running

worthy rune
grand flower
#

okay just making sure hah

celest thorn
#

its not the code im actually running

grand flower
#

would help with some of the hacky workarounds I had to do for some plugins

celest thorn
#

so yea

#

how can i pull this off?

grand flower
#

If that doesn't work and you're certain it runs through debugging, transmitting fake role data

worthy rune
#

in theory that should work, btw you dont have EXILED installed or any other plugins that effect visibility?

celest thorn
#

and nothing else

grand flower
#

try without exiled perhaps

worthy rune
#

right because of ExPlayer

celest thorn
#

let me check for any error

worthy rune
#

btw i did test it with dummies and it did work for me

grand flower
#

also need a way to hide players from the spectator list pepebeg

celest thorn
#

No errors

worthy rune
#

i think david is working on that one

grand flower
#

having to send fake spectator role data is kinda hacky and not very polished

#

hell yeah

celest thorn
#

so yea exiled, maybe?

worthy rune
#

exiled definitely patches it, so probably

celest thorn
grand flower
#

I'll also open an issue for a custom event that gets fired when RoundSummary wants to end the round, so you can block it

#

because I'll be honest, RoundSummary._ProcessServerSideCode() is the bane of my existance

#

patching that is hell ;-;

celest thorn
#

they do

#

i will patch over it to disable it

worthy rune
grand flower
#

wait sec

#

did i miss that

worthy rune
#

actually where is restarting

grand flower
#

....

#

i did

#

yeah i missed it

#

fuck me

#

was about to spend an hour or two figuring out the IL needed to add a check

#

nvm then

worthy rune
#

oh its named differently now

#

nah no worries

celest thorn
#
[HarmonyPatch("GhostModePatch", "Transpiler")]
public class DisableGhost
{
    public static bool Prefix() => false;
}

I just think this will be enough (its internal, i just don't wanna pull up the publicizer)

grand flower
#

this is like, the third time I start writing a patch to find out LabAPI has an event now

static meteor
#

Can we get a player activating workstation event or player changing attachments event in LabApi?

static meteor
celest thorn
restive turret
celest thorn
#

Oh yea i can

#

lol

#

i forgot

restive turret
#

Skull

#

You can publicize a whole package

worthy rune
restive turret
#

Forgor

teal junco
grand flower
# teal junco is something wrong
            LabApi.Events.Handlers.PlayerEvents.ValidatedVisibility += OnPlayerVisibility;
            LabApi.Events.Handlers.PlayerEvents.ValidatedVisibility -= OnPlayerVisibility;

this would subscribe and unsubscribe the handler, but it's not the code they're running

#

so it's fine

teal junco
#

Oh oh

#

okay yeah

grand flower
#

One of the big issues I have with LabAPI right now is handler execution order

#

Can't always guarantee it so sometimes you get conflicts

#

Could maybe have a Priority attribute for the CustomEventHandlers, but that wouldn't solve it for the static version of the events

teal junco
#

how so

#

like if you subscribe two events in a row, its not clear which comes first?

grand flower
#

If you have lots of plugins, I don't like to assume plugin A loads before plugin B

#

or vice versa

#

they might not

#

If you make that assumption and you're wrong, you p much get race condition related bugs

#

that might not always happen and are hard to debug

worthy rune
#

also c# events dont garuntee an order even when you can garuntee the order they were subscribed in

restive turret
#

Yup

#

Just pray and see

grand flower
#

yeah

#

that's why having more events helps reduce that

#

but if NW ever adds some sort of priority code, even just for the CustomEventHandlers based events, it'd be awesome

#
[Priority(1)] // Higher priority = executes first
public class MyHandlers : CustomEventHandlers
{
  // Or
  public override int GetPriority() => 1;
}
restive turret
#

Attribute would be easier

grand flower
#

Since it's compile time and can't change yeah

#

that way NW can just re-order registered handlers whenever one gets added

restive turret
#

Or even can get priority for the subbed event

celest thorn
#

Im switching my entire project and i was trying to update when i do

        <Reference Include="Assembly-CSharp" publicize="true" Condition="'$(Configuration)' != 'EDITOR'">
            <HintPath>$(SL_REFERENCES)\Assembly-CSharp.dll</HintPath>
        </Reference>

its the only things that never loads
SL_REFERENCES:
"C:\Program Files (x86)\Steam\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed"

I tried everything

restive turret
#

Remove condition?
Publicize must start with big P

celest thorn
#

Nope still it doesn't load

restive turret
#

If u use the bepin msbuild one you will see warn icon on the file

#

U can ignore it

#

Try building the project

celest thorn
#

of the missing references

restive turret
#

Error?

celest thorn
#

0>TestClass.cs(26,20): Error CS0246 : The type or namespace name 'PrimitiveFlags' could not be found (are you missing a using directive or an assembly reference?)

restive turret
#

Try using smth directly from the acs

celest thorn
restive turret
#

Isn't primitiveflags under AdminToys namespace?

celest thorn
#

yes

restive turret
#

Are you using it?

celest thorn
restive turret
#

How would i know

#

I'm in bed

#

Open dnspy and check

celest thorn
restive turret
#

Ye but what namespace is under it

#

No namespace, AdminToys or some other? Who knows

celest thorn
#

i already have using AdminToys btw

#

the Assembly-CSharp is not totally loading because ReferenceHub either is loading

restive turret
#

And that line isn't throwing any error

celest thorn
#

yes it is

#

0>TestClass.cs(26,20): Error CS0246 : The type or namespace name 'PrimitiveFlags' could not be found (are you missing a using directive or an assembly reference?)

restive turret
#

Are you see the acs in the references/deoendencies panel?

#

If you not using VS well

celest thorn
#

Ok this is funny

#

CS is trying to load it in another folder

#

that now doesn't exist

#

like what?

restive turret
#

Idk what's on your side so

celest thorn
#

Oh wait

#

probably i should close entirely Rider

restive turret
#

If you editing csproj or props ye

#

Should be good to close and reopen

celest thorn
#

yep it works

#

the env wasn't updating

restive turret
#

Aaaaaaaaaa

#

Well

#

Glad you found it

#

I may now rest

celest thorn
#

Good night

upper vapor
#

execution order is not guaranteed in delegates

#

plus, as Cyn has stated, you might not know which plugin subscribes first

grand flower
restive turret
#

Cyn making suggestions day by day

unique crane
#

This isnt exactly hard to do, all thats needed is to sync who to make appear on the map

#

As all players are iterated either way

#

and filtered by SCP team

grand flower
restive turret
#

Thank you David for implementing it

grand flower
#

The latter this time

unique crane
#

Didnt promise anything xd

grand flower
#

Maybe just having a string syncvar that if isn't null:

  • Overrides the default label for SCPs
  • Displays the player with that label for other roles.
hearty shard
#

also hiding a player from 079s map / being counted in the total

hushed ember
#

Hello ๐Ÿ‘‹ Ive got a technical question on a vanilla server
i heard that u are able to embed images with the new spawntoy text command or something like that to display images
but i couldnt figure out how to so i wanted to ask in here
cause stuff like <color=red> works so i imagined putting a image in there would be something like <img src"">
apart from are there any other cool features to test like <color=> or <size=> cause more then that i wasnt able to figure out yet?

hearty shard
#

you need to convert an image to text

#

search for TMPro tags

hushed ember
#

And that is possible on a vanilla server?

static meteor
#

You'd have to manually spawn it every time

hushed ember
#

Yea i know that, its nothing to stay permanently more as a cool joke to show off

hearty shard
hushed ember
#

stuff like <color=red> works without plugins, and someone else told me it is possible to do stuff like images too but he left before i could ask him how it was done

hearty shard
#

you need to use an image converter

static meteor
#

I have a python script that converts images into tmp tags I might be able to share

hushed ember
#

that would be kind, cause i cant seem to find what eve says about an image converter for that

static meteor
#

Give me like 20 minutes

hushed ember
#

sure np

hushed ember
#

Ive found out that there is a method using <sprite> but it requires for the image file to be in a specific folder of the game so that doesnt work on vanilla

icy knoll
#

How do I force 3114 to let go? Like if I disable the effect, it keeps them hanging on, but the player is free to leave?

unique crane
#

this is what the code does when 3114 takes damage while strangling

icy knoll
#

What class is that under?

unique crane
#

well

#

Scp3114Strangle

icy knoll
#

me when exiled doesn't have that method

restive turret
#

in the game asm?

#

PlayerRoles.PlayableScps.Scp3114.Scp3114Strangle

#

ye u can just parse null and should work

restive turret
#

so sad this version of .net not support interface basic implementation

grand flower
#

Because yesterday we've spotted issues where players reconnecting would get their old data stores back for some reason

#

Dunno if it's a LabAPI bug or just on our end, could be but it was pretty weird

#

Question for everyone else, is there any event for when an item is removed from a player's inventory via code

#

Not dropping, not throwing, just removed

#

Doesn't seem to be the case?

terse bone
#

removing via code means destroying the item instance

grand flower
#

hmmmmm

#

is that called before the item is removed from the inventory or after

#

cause I need to have the player it got removed from as well

terse bone
#

this is called before it is removed

#

there is also another event

#

and there is the item and a player

#

this one's better ig

hearty shard
#

what can be null here?

#

ev.Pickup also appears to be null here

#

i mean

#

if they are spectator

#

but without a synced id then yeah ig

celest thorn
hearty shard
#

thats an attacker

#

not pickup or from a spectator

celest thorn
#

not Destroying

hearty shard
#

yeah but

#

theres Pickup PI_Shrug

celest thorn
#

thats true

hearty shard
#

there is also no Destroying

celest thorn
#

yea idk

hearty shard
celest thorn
#

no idea

hearty shard
#

like the the thing should still exist no ?

#

the instance at least

#

sure the stuff in it wont work

#

but i just need dictionary lookup

#

this patch i still gotta fix

#

i have no clue why it wont patch it

#

the other patches work fine

#

only this one doesnt

#

๐Ÿ’”

grand flower
#

Internal?

hearty shard
#

so is this

#

that one works fine

#

this too

#

and some others

grand flower
#

Does it not run

hearty shard
#

it doesnt last i checked

#

it just does default game

grand flower
#

Added logging?

hearty shard
#

thats what i did last time and it didnt do anything

#

i can double check ig

grand flower
#

No patch error when loading it in logs

hearty shard
#

nope

#

all is fine

#

just doesnt patch it

#

and patches in same category patch just fine

terse bone
hearty shard
#

[EveLabs] CustomRAUtilsPatch was called!!?!!?

#

oh

#

its called now

#

just broken code now

#

so i somehow fixed it

#

cuz it didnt work last week

terse bone
#

nice

hearty shard
#

wait

#

it works entirely on my local server

#

OH MY GOD
NOT AGAIN

#

ITS CEDMOD

#

im killing c ed

#

i hate cedmod

#

๐Ÿ’”

terse bone
#

lmao, only reason why i avoid third party plugins ^

#

call me sisyphus

grand flower
#

Hmmm can you make it possible to cuff friendlies with LabAPI?

#

i.e. mtf cuffing mtf

#

or is that blocked clientside

terse bone
#

correct me if i'm wrong, checked the code and it seems that it's still blocked clientside

#

at least we have keybinds so you can "override" this behaviour

#

it would be cool to have player disarming working like pickup searching so it can be cancelled and verified serverside

hearty shard
#

this doesnt seem to work Hmm

grand flower
#

Hey so anyone ever get a bug where reloading animations play but the server doesn't reload, or players are fully desynced movement wise? Can't see each other move but we're defo still connected since the server responds to certain events

#

shooting shows tracers coming out from nowher

#

can't shoot each other either

terse bone
grand flower
#

Where the other player sees me vs where I am (mtf), and I can't even see them in the right spot either

hearty shard
terse bone
#

that & maybe why

hearty shard
#

the issue

terse bone
#

and setting player.CustomInfo doesn't add PlayerInfoArea.CustomInfo to these flags

hearty shard
#

is that its removing customrole on role change

#

but i techhnically add a player to the role before they fully spawn in

#

so when they fully spawn it removes it

#

๐Ÿ’”

#

ill just

grand flower
#

Anyone know what message id 16484 is

unique crane
#

That is some mirror generated stuff

#

no clue

grand flower
#

getting a weird bug where it sends this in logs and then reloading breaks

#

is connection(0) the dedicated server?

#
[2025-05-15 13:19:24.386 -07:00] [STDOUT] Unknown message id: 16484 for connection: connection(0). This can happen if no handler was registered for this message.
[2025-05-15 13:19:24.386 -07:00] [STDOUT] NetworkServer: failed to unpack and invoke message. Disconnecting 0.
terse bone
#

yes

grand flower
#

bruh

#

any way to check what's sending this

#

guessing something's making the host disconnect and then things just break

#

we're still connected but like, reloading doesn't work, sometimes we don't even see each other move

#

we can still do server actions though which is weird

#

okay found it

#

just had to output all message types

#

16484 is Mirror.SpawnMessage

unique crane
#

Use ReadyList instead of List

#

(unless its been fixed already?)

grand flower
#

I think List probably has the host, oops

#

yep found the issue ouch

#

3 instances of us doing that fixed, ty

royal mica
#

Is it normal that I'M stuck at 0,0,0 when I prevent world gen via OnServerMapGenerating -> ev.IsAllowed = false;?

#

I'm assuming I need to spawn some sort of skybox of sorts for the game so it doesn't freak out

unique crane
#

No facility is generated

royal mica
#

The thing is, nothing is generated

#

also cannot move while in noclip either

unique crane
#

And when you tp to surface?

royal mica
#

cannot TP

#

no surface

unique crane
#

hmm

#

Any errors in console/localadminlogs/player logs?

royal mica
#

I made a custom command to teleport to coords

royal mica
unique crane
#

And when you set your role to tutorial?

#

with spawnpoint enabled

royal mica
#

tried to abomination to replicate generating the skybox but I gave up

royal mica
unique crane
#

Because like surface and pocket dimension is pretty much hardcoded into the scene

#

Its not generated during map gen

royal mica
#

I think I broke the game icant

unique crane
#

Eh

royal mica
#

OH WIAT

unique crane
#

Hm?

royal mica
#
  • My custom cube spawns at 0 100 0
  • I can teleport to coords just fine via custom position setting
  • Enabling noclip snaps me to 0,0,0
  • Tutorial forceclass just puts me at 0,0,0
#

I have no idea what is going on

#

also world is pitch black

#

I just got the Tutorial tower coords, will check if that works

unique crane
#

Well if it didnt spawn you there normally

royal mica
#

Yeah, surface is just GONE

unique crane
#

breh

#

There were some zone changes...

#

maybe thats why

royal mica
#

Very possible

unique crane
#

Try spawning a door

#

and cube near it

#

like below it

#

maybe you will be able to see it

royal mica
#

Doors are not in the spawntoy cmd, one sec

#

I already spawn a cube at 0 100 0 btw and that works

#

will spawn a door on that actually

unique crane
#

You will have to do that via plugin

royal mica
#

yeye

unique crane
#

Aaaaah

#

Surface & pocket now have their zone generators too

royal mica
#

Funny cause those are not refering to AtlasZoneGenerator

#

nor other Generator actually

#

so either Rider decomp lying to me, or that is generated in a roundabout way

marble cobalt
#

They do, believe its called SingleRoomZoneGenerator or something like that

royal mica
#

OH

unique crane
#

Yep

royal mica
#

I need to remove something from the Assemblies tab so the decomp in Rider refreshes so I can open classes icant

#

I love this software

#

So I have all System. added to the disassembler so I can reload the decomp

#

Wait, how do you spawn a door with LabAPI now

#

I assume you no longer iterate through Prefabs and init from there

#

But looking at code all of the Get and DoorVariant assumes they exists ingame, which in my case they don't THONK

#

wait how do you even spawn a door? It is not part of the prefabs anymore

unique crane
#

Ofc it is...

hearty shard
unique crane
#

Yeah

royal mica
#

Not when nothing generated I guess icant

#

these are all the prefabs available

hearty shard
#

Are doors in the initial list or added slightly after?

#

i cant remember

unique crane
#

They are added via code

#

somewhere...

#

idk where

#

They might be in the zone gens...

hearty shard
#

troll

unique crane
#

which doesnt run if you cancel the event

hearty shard
#

david ur trolling

royal mica
#

I'm doing that

#

they are not in it

unique crane
ashen hornet
#

idk, I don't use LabAPI wrappers

unique crane
#

dont cancel the event

royal mica
#

Will check

#

1 sec

grand flower
#

Does OnPlayerValidatedVisibility not work for SCP-939? I set it to true but the 939 can't see the player at all until they get close enough

royal mica
# unique crane What if you generate the facility?

Ok not even then

[2025-05-15 23:17:16.340 +02:00] [INFO] [LabBreak] Pf: sportTargetPrefab
[2025-05-15 23:17:16.351 +02:00] [INFO] [LabBreak] Pf: dboyTargetPrefab
[2025-05-15 23:17:16.362 +02:00] [INFO] [LabBreak] Pf: binaryTargetPrefab
[2025-05-15 23:17:16.373 +02:00] [INFO] [LabBreak] Pf: TantrumObj
[2025-05-15 23:17:16.383 +02:00] [INFO] [LabBreak] Pf: PrimitiveObjectToy
[2025-05-15 23:17:16.394 +02:00] [INFO] [LabBreak] Pf: LightSourceToy
[2025-05-15 23:17:16.405 +02:00] [INFO] [LabBreak] Pf: SpeakerToy
[2025-05-15 23:17:16.415 +02:00] [INFO] [LabBreak] Pf: Sinkhole
[2025-05-15 23:17:16.426 +02:00] [INFO] [LabBreak] Pf: CapybaraToy
[2025-05-15 23:17:16.436 +02:00] [INFO] [LabBreak] Pf: InvisibleInteractableToy
[2025-05-15 23:17:16.446 +02:00] [INFO] [LabBreak] Pf: EzArmCameraToy
[2025-05-15 23:17:16.457 +02:00] [INFO] [LabBreak] Pf: EzCameraToy
[2025-05-15 23:17:16.467 +02:00] [INFO] [LabBreak] Pf: HczCameraToy
[2025-05-15 23:17:16.477 +02:00] [INFO] [LabBreak] Pf: LczCameraToy
[2025-05-15 23:17:16.487 +02:00] [INFO] [LabBreak] Pf: SzCameraToy
[2025-05-15 23:17:16.498 +02:00] [INFO] [LabBreak] Pf: TextToy
[2025-05-15 23:17:16.508 +02:00] [ERROR] [LabApi] 'ArgumentException' occured while invoking 'OnServerRoundStarting' on 'LabBreak.MapGen.DisableMapGen': 'The Object you want to instantiate is null.', stack trace:
#

I assume this is too early for it

unique crane
#

Uhhhh

#

Try printing it after OnWaitingForPlayers

royal mica
#

Interesting cause I'M using OnServerRoundStarting to access these

unique crane
#

Uhuh

#

Can you show me the code?

royal mica
#

Sure

    public override void OnServerRoundStarting(RoundStartingEventArgs ev)
    {
        base.OnServerRoundStarting(ev);
        
        var platform = PrimitiveObjectToy.Create(
            new Vector3(0, 100, 0),
            Quaternion.identity,
            new Vector3(10, 1, 10)
        );
        platform.Type = PrimitiveType.Cube;
        platform.Color = Color.blue;
        platform.Flags = PrimitiveFlags.Collidable | PrimitiveFlags.Visible;
        
        LightSourceToy.Create(new Vector3(0, 102, 0));

        SpawnUtil.JustFuckingSpawnADoor(new Vector3(0, 102, 0));
        
        Logger.Info("Spawned toy at " + platform.Position);
            
            
        foreach (var player in Player.ReadyList)
        {
            player.Position = new Vector3(0, 102, 0);
            
            player.SendHint("Sending to 0, 104, 0", 10);
        }
    }
#

JustFuckingSpawnADoor is

    public static GameObject JustFuckingSpawnADoor(
        Vector3 pos,
        Vector3? pRot = null,
        Vector3? pScale = null,
        bool isOpenable = false,
        bool isAlmostIndestructable = true
    )
    {
        Vector3 rotation = pRot ?? new Vector3(0, 0, 0);
        Vector3 scale = pScale ?? new Vector3(1f, 1f, 1f);

        foreach (var singletonSpawnPrefab in NetworkManager.singleton.spawnPrefabs)
        {
            Logger.Info($"Pf: {singletonSpawnPrefab.name}");
        }
        var prefab = NetworkManager.singleton.spawnPrefabs.Find(p => p.gameObject.name == "HCZ BreakableDoor");
        //https://www.youtube.com/watch?v=ZLiN2Js1UtQ
        var door = Object.Instantiate(prefab);

        door.transform.localPosition = pos;
        door.transform.localRotation = Quaternion.Euler(rotation);
        door.transform.localScale = scale;

        var doorVariant = door.GetComponent<BreakableDoor>();

        if (!isOpenable) doorVariant.Lock(DoorLockReason.AdminCommand, true);
        if (isAlmostIndestructable) doorVariant.TryDamage(float.MinValue + 80f);

        //door.UpdatePlayers();

        NetworkServer.Spawn(door);
        return door;
    }
#

(HCZ BreakableDoor is maybe wrong , but the foreach should list the correct name for it)

unique crane
#

Aaah

#

Use NetworkClient.prefabs.Values

royal mica
#

ah

hearty shard
#

Moment

royal mica
#

yeah

#

now it works

#

also it has a lot more prefabs

#

idk why its migreated to NetworkClient from that

#

but there must be internal reasons

#

Anyway. I have a door now.

#

But I still cannot move, nothing works

unique crane
#

Welp then

#

Sorry, you will have to wait for a fix

royal mica
#

it is fine, I'M glad I noticed a problem

unique crane
#

Yeah thanks

royal mica
#

Will help further developing a very custom gamemode

#

Is there a way to spawn a skybox?

unique crane
#

No

royal mica
#

Ah

#

very strange that I see nothing and cannot move

#

I wonder, can I somehow get the zone generator instances and generate surface to check?

unique crane
#

@royal mica Try spawning the door when the map generating even runs?

#

Not after round starts

#

That might work

royal mica
#

Can check it

#

moved the spawn code to before IsAllowed

royal mica
#

Only these 4, so I strongly assume either these are prefilled or async

#

will restart and see if it changes

#

wait, if you round restart, the server generates the map?!

#

huh?!

hearty shard
#

Huh

royal mica
#

WAIT WHAT

unique crane
#

Eh

royal mica
#

Spawning a DOOR MAKES IT WORK?!

unique crane
#

Yea

#

Welcome to world of relative positioning

royal mica
#

Okay.
So prefab is not filled during cold start
Fast restart keeps prefab filled.
In this way the game works?

unique crane
#

Try uhh

#

OnWaitingForPlayers

royal mica
#

I assume the door spawning

unique crane
#

Yea

royal mica
#

It works?!

#

trying a cold start rn

#

Oh is event order wrong in my head?
Does map gen happen BEFORE wait for players?

unique crane
#

Yes

#

But this is independent

#

But you have to spawn them before player joins

carmine prawn
unique crane
#

Which is OnWaitingForPlayers

carmine prawn
#

boom

restive turret
#

Lmao

royal mica
#

The answer is yes

#

Very strange behaviour.
I'm in Noclip. Door is at (1000, 1000, 1000)
I get snapped back to (872,872,872)

grand flower
grand flower
#

seriously, did NW change this between 14.0 and 14.1???

hearty shard
#

i remember doing 939 events

#

on exiled

#

it nono work

grand flower
#

god fucking dammit

#

alright must've broken sometime ago because i'm porting code that used to work apparently

#

ah well

restive turret
#

"apparently"

grand flower
#

?

#

was a working feature in the past, just guess that nobody noticed or reported it breaking between now and then

#

I'll open an issue

carmine prawn
teal junco
#

make everything client side
the unit gen is client side
the reloading is client side
the entire map is client side
the other people are client side
its just you

grand flower
grand flower
#

Reloading needs to be predicted or it'll feel like crap with latency/server lag

#

Don't need to let people attempt to cuff their teammates if the base game doesn't need it

#

etc etc