#plugins-dev-chat

1 messages · Page 82 of 1

true cedar
#

nope

#

wait

#

are you talking about v2 or v3

barren pasture
#

3

#

Sorry

true cedar
#

no

#

it updates on an interval tho

#

so as long as you provide an UpdateInterval

barren pasture
#

I'm not getting a hint with this

true cedar
barren pasture
true cedar
#

Display.Get(hub).Show(new Tag(), DE)

barren pasture
#

Works for my use case

true cedar
#

thumbs up emoji

barren pasture
#

tbh my CustomHintService probably needs more fixing than RueI v3

celest thorn
#

lol

#

btw HIII

late trellis
#

Okay, I have a problem.
I have seen in other plugins from #1336031121699377213 , functions that should always be executed like endless loop, without any handlers, can be called in Enable, in the main plugin file.
But, neither my function nor my logs are being called. I'm work on LapAPI only, without Exiled. How do I get the function to be called all the time?

late trellis
# celest thorn can you show full class?
using GasChamber.Service;
using LabApi.Events.CustomHandlers;
using LabApi.Features.Console;
using LabApi.Loader.Features.Plugins;
using System;

namespace GasChamber
{
    public class PluginMain : Plugin<Config>
    {
        public override string Name => "Gas";

        public override string Description => "yup";

        public override string Author => "Meisner";

        public override Version Version => new Version(1, 0, 0);

        public override Version RequiredApiVersion => new Version();

        public static PluginMain Configuration { get; set; } = null;

        public Handlers Startup { get; set; }

        public override void Enable()
        {
            Configuration = this;
            Startup = new Handlers();

            GasService.Auto();
            Logger.Warn("Before");
            CustomHandlersManager.RegisterEventsHandler(Startup);
            Logger.Warn("After");
        }

        public override void Disable()
        {
            Configuration = null;
            CustomHandlersManager.UnregisterEventsHandler(Startup);
        }
    }
}
celest thorn
#

but i don't see any problems

#

Oh wait

#

its the Instance

#

that one

#

ok nvm

#

Check if there are any error in LA or in the console

#

because it could be that GasService.Auto(); is throwing error

late trellis
#

I tried to comment out all the config declarations, but in any case, there are no errors in the console

celest thorn
#

where are you putting the plugin?

late trellis
late trellis
celest thorn
#

if im understading

#

but GasService.Auto(); has no exception

#

is it like blocking the console?

late trellis
#

In my console I see output, from the OnServerRoundStarted handler, where the Logger output is running.
However, everything in Enable is dead.

celest thorn
#

Im confused

#

Like i don't see any issues

#

if there aren't any issues anywhere

late trellis
#

Thanks for time

celest thorn
#

no problem

random scaffold
#

how i can do http get / post from the plugin? (to it didnt stop the thread)

celest thorn
#

I have a stupid question i need to unpatch a method from our lovely c*dm*d (the censorship just for axwabo)

restive turret
#

I immediately replaced with othe wovels and was confused

celest thorn
#

I need to unpatch this method of cedmod how can i do it?

#

like i don't want to add cedmod as a dependency

restive turret
#

Just check for losded assembly

#

I did it with exiledfixer

celest thorn
celest thorn
restive turret
#

Bruh

celest thorn
#

like you are just patching them

restive turret
#

When you load an assembly it runs that event

celest thorn
#

Ok i know

#

that

restive turret
#

I patch after exiled being loaded

celest thorn
#

but the problem is i don't want to unpatch entirely cedmod

#

just one patch

restive turret
#

I didn't unpatch all exiled either

#

I only have 1 patch

celest thorn
#

Im confused

#

OH

#

i do understand now

restive turret
celest thorn
#

yea i now see

restive turret
#

You can now do the same for cedmod

celest thorn
#

I mean i need to add cedmod as a dependency

#

so sad

restive turret
#

Well to build

celest thorn
#

i know

restive turret
#

But after building you don't really need it

#

For example I have this on my server whihc doesn't do anything since i dont have exiled but I put it into server which has exiled

celest thorn
#

Something like this should work

#

lol

restive turret
#

I guess

#

Should be

#

Why is harmony null there

celest thorn
restive turret
#

Also change the priority to he higher than ced

celest thorn
#

obv mine is Highest

#

so

restive turret
#

👍

celest thorn
#

?

#

oh

celest thorn
restive turret
#

I guess

celest thorn
#

adios cedmod

#

i fucking hate when its a prefix

#

some of my patches are prefix but not destructive as cedmod

#

You could argue yes you can disable it in the config but i want to do it dynamically

celest thorn
#

cedmod is not detected

#

It seems labapi is doing some magic

#

DMDASM.E420685B.Cecil, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

I see this spammed

restive turret
#

ah might be bc cedmod packs itself<

celest thorn
#

No every plugins is doing it

#

even plugin non related to cedmod

restive turret
#

how do you subscibe to it?
what do you printM

celest thorn
#
    private void CedModDestructor69(object sender, AssemblyLoadEventArgs args)
    {
        Logger.Info(args.LoadedAssembly.FullName);
        
        if (!args.LoadedAssembly.FullName.Contains("CedMod"))
            return;
        
        Main.Harmony?.PatchCategory("cedmod");
        Logger.Info("Cedmod Destroyed :3");
    }
#

this is in one of the module

restive turret
#

lol

#

idk then works on my machine

restive turret
#

?

celest thorn
#

labapi

#

loads the plugin and then enables them

#

Yep

#
        if (PluginLoader.Plugins.Any(x => x.Key.Name.ToLower() == "cedmod"))
        {
            Logger.Info("Cedmod Detected");
        }
upper vapor
upper vapor
celest thorn
#

why would someone have sloc and Mer?

upper vapor
celest thorn
upper vapor
#

Yeah

celest thorn
#

Does sloc work with Meow???

#

(Most likely yes)

upper vapor
#

Probably, at least your client-side objects won't be affected

worn gull
#

What does IsLocked is in Interactable toy

celest thorn
celest thorn
worn gull
#

Ahhh

#

okay thanks

celest thorn
#

But hey that was bombed

upper vapor
celest thorn
#

Like it still exist

#

Just not really used

#

Because client offer pretty much more control

#

But both of them are really optimized

#

So you have same performance

unique crane
#

Then search it up in the Unity docs

#

There are some

random scaffold
#

there hard

unique crane
random scaffold
#

in coroutine

unique crane
#

Yeah it uses coroutines

#

instead of async

random scaffold
#

david moment

unique crane
#

???

#

This is standard Unity way to use webrequest

upper vapor
#

Logic_gun trying to use logic

celest thorn
icy knoll
#

if smth takes time, then coroutine

unique crane
#

Yea

celest thorn
#

Hiii

tulip kiln
#

I put an infinite loop in a coroutine because I forgot they weren't threads

#

I was a bit surprised when the server just hang up

icy knoll
#

and this is why we shouldn’t use infinite coroutines

celest thorn
#

I mean i use them not alot

#

But they have stuff

#

And hiiiii

icy knoll
#

one thing i find weird is that loads of plugin devs seem to hate making components 😭

icy knoll
celest thorn
#

:3

tulip kiln
icy knoll
#

hot… i also cut my finger…

tulip kiln
#

I only have like one component in my plugin

celest thorn
#

You cut your finger?

#

Apply something to it

#

Before it gets infected

#

And yes its hot asf

icy knoll
tulip kiln
#

What's the point of this

celest thorn
icy knoll
#

make a component 😭

tulip kiln
#

Nah it can't have its lifetime attached to an object

celest thorn
#

Sadly

tulip kiln
#

I need it

celest thorn
#

i would like to have a profiler

#

so i can see performance and stuff

#

it would be fantastic

#

Someone knows how can i get the collider the player is interacting when opening a door?

celest thorn
#

so sad

#

i need to patch

upper vapor
#

Wait

#

Check InterCoordinator

#

Or whatever

celest thorn
#

What?

#

this.IsAllowed = true;
this.Player = Player.Get(player);
this.Door = Door.Get(door);
this.CanOpen = canOpen;

#

the even has only this

upper vapor
#

I'm not sure if the client sends the jnteracted door or the collider, probably the former

celest thorn
#

yes

upper vapor
#

Well crap

#

Print the collider id

#

Maybe it has different id for a different knob

#

Might be th3 case for generators only

celest thorn
#

yes it is

#

i need to get that

tulip kiln
#

InteractionCoordinator::OnClientInteracted

#

InteractableCollider.TryGetCollider

celest thorn
tulip kiln
#

an event that doesn't even fire

#

my bad

celest thorn
#

lol

upper vapor
#

OnClientInteracted

celest thorn
#

like its so sad i need to patch

upper vapor
celest thorn
#

i think i will do a patch

#

that checks everything

tulip kiln
celest thorn
#

PlayerEvents.OnInteractedDoor

#

before this

#

or else

#

i can do

#

a prefix

#

and inside a dictionary

#

put the collider and referencehub

#

and then remove

#

🧠

unique crane
#

The only component I ever did was for impact grenade

celest thorn
#

crazy

unique crane
#

Like

celest thorn
#

so sad i need to patch

unique crane
#

normal objects do enough

#

Also zero your gonna love the next update for your tower thingy

#

:3

unique crane
#

source: trust me

celest thorn
#

its not mine but

#

made by maro

#

lol

unique crane
#

oh wait

celest thorn
#

i contributed nothing to it

unique crane
#

whatever

#

gg

#

wrong person

celest thorn
#

(like i did only the plugins)

#

and the hub

unique crane
#

Well then you did quite a lot?

celest thorn
#

i did far worse thing

unique crane
#

percent wise

celest thorn
#

like 70%

unique crane
#

yea

#

thats more than half XD

celest thorn
#

for me its nothing

#

i work on projects and stuff because i like that

#

and i don't wanna get paid anything

upper vapor
celest thorn
#

but im scared to now

celest thorn
celest thorn
#

it could be new toy

#

or the toys that huber showed

#

idk

restive turret
#

i mean thanks for teasing but

celest thorn
#

0.000000001$ for the info

#

(im joking)

#

I found out

#

that doors

#

door itself is 0

#

the thingy button is 10

#

why

#

10

unique crane
#

What

#

what is 0

celest thorn
#

collider

#

it CHANGES FOR EACH DOOR

#

im gonna cry

#

what?

slate flume
#

How can I get the door that a raycast collides with

slow delta
#

Hello, is it possible to have a role with different colored letters? If it cannot be done naturally, can it be done using plugins? Thank you

owner_badge: '<color=#5bc0eb><b>C</b></color><color=#f4d35e><b>R</b></color><color=#f5f5f5><b>E</b></color><color=#5bc0eb><b>A</b></color><color=#f4d35e><b>D</b></color><color=#f5f5f5><b>O</b></color><color=#5bc0eb><b>R</b></color>'
owner_color: blue
owner_cover: true
owner_hidden: false
owner_kick_power: 255
owner_required_kick_power: 255
❤️

upper vapor
upper vapor
#

You can make it change colors with a plugin but you can't color different letters

slow delta
slow delta
#

the Plugin?

upper vapor
#

Check RainbowTags

slow delta
#

OO

#

YEAA

#

okey bro

upper vapor
#

The SL wiki has the list of the available colors if you can't find it in the plugin's readme

slow delta
upper vapor
#

Np

slow delta
#

I can't find the section on the scp sl wiki, could you please send it to me?

carmine prawn
#

here

slow delta
#

Lol

#

the real support

#

tahnsk

#

thanks

carmine prawn
slow delta
#

So, it's not possible to assign a label color only to these, right? I'm asking to confirm and put my mind at ease.

upper vapor
#

Why is it in the tech support wiki 😭

upper vapor
slow delta
#

Sorry for the inconvenience.

upper vapor
#

Yeah

slow delta
#

Thank you, ¡have a nice day everyone!

carmine prawn
slow delta
#

I'm new to all this server and programming stuff, so I'll probably ask some obvious questions. Sorry about that, I don't know anything and I'm not very familiar with how to use some things on Discord or how to ask questions.

upper vapor
carmine prawn
plain gazelle
#

Ive heard about fake role syncing before, how does it work?

upper vapor
restive turret
#

Basically

#

You lie that this role is an ntf

hearty shard
#

or look at exiled

plain gazelle
hearty shard
#

ur a bully

mild ice
hearty shard
#

scary lucy...

true cedar
unique crane
#

I love abusing local fauna and flora

true cedar
#

explodes

unique crane
#

It is

#

my conveyor belts go through solid ground and other buildings

slate flume
true cedar
#

chat

#

i need a new name for something

#

i have a Display class which u use to send hints to players in ruei

#

but the problem is that unity has a Display class too so that creates an ambiguous reference

#

and i dont want that

unique crane
#

Well then rename it...

hearty shard
#

made a HintDisplay

#

in SL

#

and its BAD

unique crane
#

Or just tell people to use alias

hearty shard
#

yuck

unique crane
#

I did not

hearty shard
#

i know

#

but i blame you

#

ur nw

#

you couldve changed it

true cedar
#

THATS THE QUESTIOn

#

ElementDisplay is too long

unique crane
#

hintdisplay

true cedar
#

NO.

unique crane
#

Hmmm

#

RuelDisplay

hearty shard
#

david when do you make ruei basegame

true cedar
#

its RueI

#

not Ruel

#

NOBODY GETS THE PUN

#

but i was thinking of naming it ruedisplay

hearty shard
#

UIDisplay

true cedar
#

ni

#

no

#

thats dumb

hearty shard
#

damn...

true cedar
#

i might have to go with ruedisplay

#

but that sounds ugly

icy knoll
#

why would there be an ambiguous reference when they aren’t even in the same namespace tho?

hearty shard
#

using unity

#

using ruei

#

uh oh ambigious!!!

#

you need to using Display = Ruei.Display;

icy knoll
#

rider does that for you lol

#

but i get it

hearty shard
#

and yet its still ambious unless you do that

#

i know that IDEs tend to just let you pick and itll auto do it

#

but PI_Shrug

true cedar
#

i dont wanna make it confusing

random scaffold
#

typical nw moment

little zenith
#

com-18 powered by 25 cents

random scaffold
teal junco
cyan crown
celest thorn
slate flume
#

Then spectate someone with an FSP

teal junco
#

interesting how that wasnt some peoples immediate thought

restive turret
#

Skill fucking issue

true cedar
slate flume
#

Or just

#

PlayerDisplay

true cedar
#

too long

slate flume
#

PlayerHints

#

HintDisplay is taken right?

#

DisplayHints

#

HintsDisplay

#

Literally any of those last 4

#

Fuck your constraints suck it up

true cedar
#

they're elemnets

plain gazelle
hearty shard
#

You dont gotta decompile for exiled

#

Theres repo

plain gazelle
#

oooo that makes sense
-# now to learn how to browse through github repos for lines of code...

hearty shard
#

Probably easier ways of it

#

Idk!

plain gazelle
#

Thank you ^^

#

From the looks of it, it prevents players to be fake synced as a dead role? hm

slate flume
slate flume
#

Afaik

hearty shard
#

if u receive a network message about a dead player doing smth they shouldnt

hearty shard
hearty shard
#

ask exiled lol

slate flume
#

You have these weird arbitrary requirements for what your class name should be

#

PlayerDisplay being too long is crazy

#

No clue why Elements as a class name is confusing

#

Not calling it hints even though it uses the hint system is a choice you can make ig

#

But that cuts a majority of your options for like 0 reason

#

If you're really insistent about these things you can do like SLDisplay

#

Or DisplaySL

#

Or Screen

#

Or like Visuals idk

true cedar
#

im just gonna with RueDisplay

slate flume
#

Go for it

true cedar
#

Elements is confusing because i already have an Element class

slate flume
#

Oh

#

Well then that makes sense

true cedar
#

and it doesn't make it clear that it's used to show stuff to the player

slate flume
#

At the end of the day it's your code that you're writing

#

Whatever makes you happy is whatever you should go with

#

Because it's not gonna matter to a single other living soul on the planet

#

If RueDisplay is what you wanna do then do it GoodOne

#

I mean I have handler classes called shit like SodaPersonnelHandler because it's descriptive on its purpose and length doesn't matter that much

plain gazelle
hearty shard
#

Making them invisible?

#

Well check cedmod they do smth on it

plain gazelle
#

Invisible for all but one player
Including voice chat only with that one player, etc

hearty shard
#

Oh

#

You can fake their position

#

same thing 939 does

plain gazelle
#

939? o.O

hearty shard
#

The scp

plain gazelle
#

How does it fake positio- oh the voice placing thing?

hearty shard
#

Makes u invisible

plain gazelle
hearty shard
plain gazelle
#

uh

#

bless you

hearty shard
#

am i going crazy

worthy rune
#

ValidatedVisibility

hearty shard
#

Validating?

worthy rune
#

no Validated

hearty shard
#

I thought that was 939 specific ngl

hearty shard
#

can u show it

worthy rune
#

it happens after validation

plain gazelle
# worthy rune ValidatedVisibility

oh dear northwood™ staff please bless me with your knowledge on how i could go about making one player basically non-existant to everyone but one player

worthy rune
worthy rune
plain gazelle
#

Can i call that thing myself? Like how could i change the visibility of a player during a round?

worthy rune
# hearty shard guh

also considering how much you talk in here and how much the validated visibility event gets talked about im confused on how you dont know about it

worthy rune
worthy rune
hearty shard
#

Omfg

#

Its cuz i use the 939 specific event

#

😭

#

explains it

untold raft
#

How can i send fake destroy message for all?

#

patch probably

hearty shard
#

With a net id of the object ur destroying

plain gazelle
#

This feels too easy to work

worthy rune
hearty shard
#

ev.IsVisible = ...Contains

#

oh yea

plain gazelle
#

ohhh thank you

worthy rune
#

e.g. hat effect

plain gazelle
#

two lines off, even smaller code

#

lol

hearty shard
#

Idk!

worthy rune
#

fair

plain gazelle
#

Feature for a roleplay server ^^

slate flume
plain gazelle
#

Partially for moderation, to only talk to someone OOC without others being able to perceive staff
And partially for Schizo storylines of literally having a real, imaginary friend i guess

plain gazelle
worthy rune
#

yeah

plain gazelle
#

neat

slate flume
#

Never even thought about that

#

this me stealing your idea

plain gazelle
#

x3c

#

Not my idea to begin with

teal junco
ionic prawn
#

is it possible to have your own print color in the server console?

static meteor
#

Yes

ionic prawn
#

how can i do it?

static meteor
#

Logger.Raw($"TEXT", ConsoleColor);

ionic prawn
#

ty

ionic prawn
#

how do i add icons on the screen with HintServiceMeow?

random scaffold
#

it overwatch mode

random scaffold
celest thorn
#

how tf sl is coded

celest thorn
#

hello chat

upbeat coyote
#

Hi

upper vapor
#

-# wpf moment

#

thatguy had a point

#

HintScreen

restive turret
#

Real

#

I would rename it to

#

IBob

upper vapor
restive turret
#

Thats not faie

upper vapor
upper vapor
upper vapor
# icy knoll java esque class name

Parameter­Collection­Configuration­Error­Facade­Connection­Mapper­Importer­Wrapper­Parameter­Mapping­Service­Method­Identifier­Callback­Info­Error­Mapping­Authentication­Thread­Annotation­Template­Annotation­Tests­Getter­Clone­Principal­Utils­Comparator

upper vapor
keen berry
#

I once remember making a harmony patch so bad it froze the server and made the tps 300/60

#

Dunno what it was exactly patching but ik it was cola related

tepid sluice
#

Why i cant set specialweapon limit to 8

plain gazelle
#

Is it possible to prevent the spawning of a ragdoll for certain players but some specific players can still see it?

unique crane
#

Send the spawn message to only specific players

plain gazelle
celest thorn
#

im wondering something crazy

#

can you make conveyor belts

#

but where the player can move on top of them?

upper vapor
#

should be pretty simple

celest thorn
#

i mean on sl

#

but the player can move

upper vapor
#

yea

celest thorn
#

because i don't think you can do it

upper vapor
#

until we get player parenting, you won't be able to move the player while they are able to move on their end

#

alternative: position delta message

#

-# probably never happening

celest thorn
#

crazy

plain gazelle
#

oo what are those

unique crane
#

Ragdoll classes

#

You need to use Mirror's spawn message

#

As ragdolls are spawned via NetworkServer.Spawn

plain gazelle
#

So i would need to make my own RagdollManager.ServerCreateRagdoll since that has the NetworkServer.Spawn method?

trying this rn. currently searching for a client-only spawning equivalent of networkserver.spawn

worthy rune
upper vapor
#

just send a SpawnMessage to select clients

celest thorn
plain gazelle
#

no clue what a "SpawnMessage" even is x.x

hearty shard
#

HCZ_EZ_Checkpoint Part(Clone) | HczCheckpointToEntranceZone | HeavyContainment | Straight

HCZ_ChkpA(Clone) | HczCheckpointA | HeavyContainment | Endroom
HCZ_ChkpB(Clone) | HczCheckpointB | HeavyContainment | Endroom

What actually is the difference between these rooms?

#

well more specific, which parts of the checkpoints do they each refer to

#

HCZ_ChkpA the check point, but then HCZ_EZ_Checkpoint Part is from the big gate to the first entrance door?

#

or what

plain gazelle
#

HczCheckpointToEntranceZone is this room i think

#

Between the Gate and first EZ door

upper vapor
plain gazelle
#

to lcz

upper vapor
#

yea

hearty shard
#

Oh

#

oh

#

i thought that when you went down the elevator

#

you were in lighn

#

wait

upper vapor
#

you go up to LCZ from HCZ

hearty shard
#

did they really name the heavy elevator room HCZ_ChkpA

upper vapor
#

yes

unique crane
#

yes

hearty shard
#

😭

unique crane
#

And there is also Hcz_ChkpB

hearty shard
#

yes

alpine wadi
#

hi guys, is it possible to run a remote admin command through labapi?

hearty shard
#

yea but why ?

alpine wadi
#

cause i did a funny and want to make a workaround my problem rather than solving it

upper vapor
#

Server.RunCommand

alpine wadi
#

thanks chief

upper vapor
#

np

plain gazelle
# plain gazelle no clue what a "SpawnMessage" even is x.x

copy pasted the ServerCreateRagdoll method but yeah no clue about how to only tell select clients about the object, or whatever "SpawnMessage" is qwq

Wish i could just search up solutions here but also seems im the first to ask questions about it or sth

upper vapor
#

the ragdoll is already created when you call instantiate

plain gazelle
#

heck

upper vapor
#

look into how networkserver.spawn works, create the spawn message yourself and send it to players

#

p.Connection.Send

alpine wadi
hearty shard
#

for RA

upper vapor
#

ye

alpine wadi
#

omg thx

hearty shard
#

we love this

upper vapor
#

are you calling file.create and not disposing the handle

hearty shard
upper vapor
#

what

hearty shard
#

what

upper vapor
#

you get a stream from File.Create

#

you should dispose that

#

otherwise you lock the file until the server stops

hearty shard
#

i dont actually

upper vapor
#

??

hearty shard
#

this works fine

upper vapor
#

dam

hearty shard
#

i mean yeah i fixed the dispose now but

#

it worked kek

upper vapor
#

why do you even create the file in the first place

hearty shard
#

pretty sure it needs to exist

upper vapor
#

if you call WriteAllLines

#

no

plain gazelle
hearty shard
#

oh well

#

didnt really matter

#

when i just needed testing kek

plain gazelle
upper vapor
#

right

#

you can actually use

#

Networkerver.SendSpawnMessage

hearty shard
#

you need to publicize mirror

upper vapor
#

then

#

ShowForConnection

hearty shard
#

but identity is what ur sending
and conn is who ur sending to

hearty shard
#

internal

upper vapor
#

though it's a bit more performant if you create the payload once and send it to each client

upper vapor
hearty shard
#

just publicize

#

rly not that hard kek

plain gazelle
#

so just this ?w?

#

me no understand

#

too many big words

hearty shard
#

yeah

upper vapor
#

no need for .ToList when using foreach

icy knoll
plain gazelle
plain gazelle
icy knoll
#

probably decompiler then

plain gazelle
#

xD

upper vapor
#

lmfao

plain gazelle
#

yes

#

silly decompiler

hearty shard
#

well

#

actually

upper vapor
#

i was gonna blame vs but JB does this too

plain gazelle
#

ohhh that also explains the (!(bla == null)) ive been seeing x.x

hearty shard
#

sl is from before this was a thing

#

apparently

hearty shard
#

afaik

plain gazelle
#

a oki

hearty shard
#

heres a commit where i change david using (!(x is something))

upper vapor
#

operator precedence ClassD_Hollow

plain gazelle
#

when i started developing for my community i got told/taught to not use "is" and "is not" as they dont work, like for null checks or sth
Is it still like that? Was it ever like that?

upper vapor
#

that is a fat lie to force you to conform to their coding standards

#

is null doesn't work for unity objects

hearty shard
#

yeah

plain gazelle
#

ahhhh that makes sense alright

hearty shard
#

== null for unity objects

upper vapor
#

same for null-coalescing and null conditionals ??= and ?.

upper vapor
hearty shard
#

or that yea

plain gazelle
plain gazelle
#

damn

upper vapor
#

yeah, gameobject, monobehaviour etc

hearty shard
#

yeah

upper vapor
#

anything deriving from UnityEngine.Object

hearty shard
#

ya

upper vapor
#

can this stupid freaking app work

#

finally

hearty shard
#

kills u

upper vapor
plain gazelle
#

anyway, straight onto the next topic
Can i stop bullet impacts being synced

#

:3

#

i suppose thats where i can cancel it, but how could i spawn them in manually for specific clients Thonk

hearty shard
plain gazelle
#

pain

#

bad nw devs

#

hmm maybe someone tell specific clients to Decal.OnVisibilityChanged(false) ?

hearty shard
#

server just tells them where to place them

#

and ofc can now (since 14.1) clear them

upper vapor
hearty shard
#

ImpactEffectsModule.ServerSendImpactDecal

upper vapor
#

i blame it on nuget

hearty shard
#

well yeah

upper vapor
#

wtf am i looking at

hearty shard
#

where

icy knoll
upper vapor
#

this was in a blog i read

#

or post

#

or whatever

#

"if false is false"

#

ahh

#

can discord stop FREEZING when i wanna type a "

plain gazelle
#

"""""""""""""""""""""""""""""""""

plain gazelle
#

oh, all of those values are 0/null

random scaffold
#

how i can level up tps with 20+ players?

#

now around 40

plain gazelle
#

So this is my code for trying to spawn in ragdolls for only select players.
It works with preventing the default ragdoll from spawning, and the foreach executes fine with a seemingly fine basicRagdoll.

But they dont appear for players.
Any thoughts? :(

random scaffold
#

just use Ragdoll.Create

#

;\

plain gazelle
#

That doesnt even exist firRly

plain gazelle
#

??

#

I know the Ragdoll clas exists

plain gazelle
plain gazelle
upper vapor
plain gazelle
#

huh o.O

upper vapor
#

the netIdentity of the ragdoll

#

nvm

plain gazelle
upper vapor
#

ah

#

invoke the ragdoll's start method..?

#

wait

#

i remember there was an issue with the uh

#

labapi event

#

you gotta supply null to the RagdollData constructor

#

or just don't set it

#

new RagdollData(hub, handler, position, rotation, null)

#

idk why it's nullable and has the default parameter as 0

#

lovely

plain gazelle
#

Ah so switch out my 0 to a null, i wil ltry

#

Ohh with me setting it as 0 it would make all ragdolls i create have the serial 0, i see

#

yeah why is it default 0 xD

#

No ragdoll and no error ,_,

upper vapor
#

LA logs mayeb?

unique crane
#

Okay how about this solution:

#

Spawn it for everyone

#

send destroy message to selected players who shouldnt see it

plain gazelle
# upper vapor LA logs mayeb?
[2025-07-27 17:44:24.394 +00:00] [STDOUT] OnSerialize failed for: object=AutoRagdoll(Clone)(Clone) component=PlayerRoles.Ragdolls.AutoHumanRagdoll sceneId=0
[2025-07-27 17:44:24.394 +00:00] [STDOUT] System.NullReferenceException: Object reference not set to an instance of an object
[2025-07-27 17:44:24.394 +00:00] [STDOUT]   at PlayerStatsSystem.DamageHandlerReaderWriter.WriteDamageHandler (Mirror.NetworkWriter writer, PlayerStatsSystem.DamageHandlerBase info) [0x00000] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-27 17:44:24.394 +00:00] [STDOUT]   at PlayerRoles.Ragdolls.RagdollDataReaderWriter.WriteRagdollData (Mirror.NetworkWriter writer, PlayerRoles.Ragdolls.RagdollData info) [0x00019] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-27 17:44:24.394 +00:00] [STDOUT]   at PlayerRoles.Ragdolls.BasicRagdoll.SerializeSyncVars (Mirror.NetworkWriter writer, System.Boolean forceAll) [0x0000e] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-27 17:44:24.394 +00:00] [STDOUT]   at Mirror.NetworkBehaviour.OnSerialize (Mirror.NetworkWriter writer, System.Boolean initialState) [0x00008] in <ae599454e38d4008a675271403de09db>:0
[2025-07-27 17:44:24.394 +00:00] [STDOUT]   at Mirror.NetworkBehaviour.Serialize (Mirror.NetworkWriter writer, System.Boolean initialState) [0x00015] in <ae599454e38d4008a675271403de09db>:0
[2025-07-27 17:44:24.396 +00:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object
[2025-07-27 17:44:24.396 +00:00] [STDOUT]   at PlayerRoles.Ragdolls.BasicRagdoll.Start () [0x00021] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-27 17:44:24.396 +00:00] [STDOUT]   at PlayerRoles.Ragdolls.AutoHumanRagdoll.Start () [0x00000] in <d9731e675e55453197cf28cd60eed3f2>:0
unique crane
#

Thats easier in my opinion

upper vapor
#

you didn't give it a damage handler

plain gazelle
unique crane
#

Messages are sent the same frame

#

no

#

And if you see it for 1-2

#

at 60 fps

#

Who cares

plain gazelle
#

Will try it :3

#

Like this?

unique crane
#

Try it and seee

#

I cant run code in my head

upper vapor
#

yeah that should work

#

though you still need a damage handler, no?

plain gazelle
#

im doing it in the PlayerEvents.SpawnedRagdoll

plain gazelle
#

didnt work

upper vapor
plain gazelle
upper vapor
#

try with a frame delay

unique crane
#

^

terse bone
#

hasn't this event had wrong argument passed as Ragdoll?

#

yeah, insted of basicRagdoll there is ragdollRole.Ragdoll

unique crane
#

Yea fixed in the next update

plain gazelle
upper vapor
plain gazelle
#

also in the meantime ill try spawning in ragdolls again, for learning purposes i guess
How would i make a new "valid" DamageHandler? firT

#

Or maybe UniversalDamageHandler?

#

There are so many Handlers, idk what RagdollData expects x.x

terse bone
# terse bone yeah, insted of basicRagdoll there is ragdollRole.Ragdoll

A fix for this

namespace Xname.API.Patches.Fixes;

using LabApi.Events.Arguments.PlayerEvents;
using PlayerRoles.Ragdolls;

[HarmonyPatch(typeof(RagdollManager), nameof(RagdollManager.ServerSpawnRagdoll))]
internal static class OnRagdollSpawnedPatch
{
    [HarmonyTranspiler]
    private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
    {
        var matcher = new CodeMatcher(instructions)
            .MatchStartForward(
                CodeMatch.LoadsArgument(),
                CodeMatch.LoadsLocal(),
                CodeMatch.Calls(AccessTools.PropertyGetter(typeof(IRagdollRole), nameof(IRagdollRole.Ragdoll))),
                CodeMatch.LoadsArgument(),
                new CodeMatch(OpCodes.Newobj, AccessTools.GetDeclaredConstructors(typeof(PlayerSpawnedRagdollEventArgs))[0])
            )
            .Advance(1)
            .RemoveInstructions(2)
            .Insert(new CodeInstruction(OpCodes.Ldloc_1));

        return matcher.InstructionEnumeration();
    }
}
plain gazelle
#

And instantly jumping onto another topic
Why does RA cuffing not call Cuffing, nor Cuffed?
I understand no Cuffing to always allow admins to cuff people i guess and not have any script interfere, but Cuffed shouldnt be of issue? :o

unique crane
#

Might want to report that as a bug

abstract stone
#

IS there some documentation about spawning objects? Like I want spawn Cube that IS that long and...?

abstract stone
#

Thank you just got in to Labapi

plain gazelle
#

Is there a way to get the item type from an ItemPickupBase?

#

Or like, check if its ammo?

#

Would this work?

hearty shard
plain gazelle
#

Category? What is that :o

hearty shard
plain gazelle
#

I dont find that anywhere

#

I found pickupBase.NetworkInfo.ItemId but now im interested in whatever "Category" is :o

hearty shard
#

Its used for item limits

plain gazelle
#

How do i send a RA message to someone again?
I couldve sworn it was via
player.ReferenceHub.queryProcessor.SendToClient("Message", true, true, ""); but it doesnt work (anymore?)

#

Yeah it did work a while ago, i learnt it from Eve

upper vapor
#

Append "command#" to the beginning of the message

#

The text before the hash will be wrapped with brackets on the client

slender lynx
celest thorn
#

fr too many people in this world

restive turret
#

The hope dies last, but I might be the first

spark galleonBOT
#
Role granted

You have been granted Server Host role.

teal junco
#

thanks

celest thorn
#

WHY HERE?

#

#bot-commands

#

this exist

teal junco
#

i like it here

celest thorn
#

so triggering

teal junco
#

plugin dev chat is my home

celest thorn
#

if something exist why NOT USE IT

icy knoll
#

zero is angy

celest thorn
teal junco
upper vapor
#

all these server hosts, smh

celest thorn
teal junco
#

i decided to use my favorite channel :3

celest thorn
#

if something exist

#

USE IT FOR THAT REASON

teal junco
restive turret
#

Bc you are a something special too

spare zodiac
#

doesn't this look cleaner?

restive turret
#

Than?

unique crane
#

Empty room so nice yes yes (why)

severe cave
#

Is there a way to get a players ragdoll when it dies?

upper vapor
#

RagdollSpawned event

restive turret
#

It's client sided

#

So moving doesn't sync

upper vapor
royal mica
#

Keep in mind that all Ragdolls have Serial 0 (if it is not fixed already)

celest thorn
#

So sad

celest thorn
upper vapor
celest thorn
upper vapor
#

i said "so many" and not "too many"

celest thorn
#

wtf that even means

upper vapor
#

stating that i said something i never said

#

A: "i like waffles"
B: "oh so you hate pancakes? go after this guy!"

hearty shard
#

zero cant read

celest thorn
#

it wasn't my intention

celest thorn
celest thorn
#

i changed it

upper vapor
#

bruh

celest thorn
#

as soon as you made me see the mistake

#

and im sorry

upper vapor
hearty shard
restive turret
severe cave
#

Why is that when I try to destroy a ragdoll it wont disappear

restive turret
#

Send msg to client

upper vapor
#

ragdoll.Destroy?

slate flume
#

Question: is it possible to spawn lockers?

hearty shard
#

err

#

yes

upper vapor
#

yes

hearty shard
#

get the prefab

#

create a new one

#

get the StructurePositionSync component and set the details

upper vapor
hearty shard
#

oh

worthy rune
upper vapor
#

the issue is that the transform position is only set in start, which is too late

#

so if you call Instantiate with the position, you still need to set it (grrr)

worthy rune
#

doesnt the wrapper handle that?

upper vapor
#

it does not work after spawning Kek

upper vapor
#

but there's no create locker or such method

#

or am i blind?

worthy rune
worthy rune
upper vapor
worthy rune
#

i think its between 0 and 128

upper vapor
#

😭

#

the one on the left is the default unity value (36)

#

seems like it's one

slate flume
#

Okay I'll look into it

worthy rune
#

18 maybe?

upper vapor
#

uh

#

then the canvas must be scaled down compared to default unity

#

maybe it's cuz i'm on 2022?

worthy rune
#

yeah there could be other things going on

#

not sure if this helps, first is the Canvas object, Second is the Text (TMP) one

upper vapor
#

oh it's

#

oh

#

okay

#

0.05x

#

that explains the 36x size difference

#

i wonder why the canvas is 100x100 but the text is 200x50

unique crane
#

Yeah I had to scale it a loooooooot

#

World space text is big

slate flume
#

I won't lie, I hard code my primitives and objects

#

It's a pain in the ass

slate flume
#

I don't use unity editor or anything

upper vapor
slate flume
#

Literally

#

The upside is I spawn like 5 objects so it doesn't really matter

upper vapor
#

how to end yourself step numero 1

slate flume
#

I have a method

upper vapor
#

PHEW

#

alright

slate flume
#

Though I manually find offsets for a lot of shit

#

Item spawns, spawn points, etc.

upper vapor
#

there we go

slate flume
upper vapor
slate flume
#

That is so much work

upper vapor
#

and place a cube yourself in unity

upper vapor
#

AssetRipper exists

#

waiting for unity to load is a lot of work

slate flume
#

It's so much work cause I don't use unity

#

I've never used unity

#

I have no idea how to use unity

#

I'd have to learn

#

And that's a lot of work

upper vapor
#

yeah, fair

#

how about you make a gun that you shoot and it outputs the room offset upon impact

slate flume
#

That's what I did :)

upper vapor
slate flume
#

It logs room, room rotation, and player position

#

After doing it enough I realized I can have it automatically output relative positions

#

So it does the calculation behind the scenes and spits out relative position

#

So it's as simple as
Find spot
Shoot
Put coords in plugin
Rotate at runtime

slate flume
#

So peak

upper vapor
#

TransformPoint and InverseTransformPoint 💞💞

slate flume
#

Literally

#

I won't lie just learned about transform point
I made my own function to rotate a point given the quaternion lmao

#

Time to update my codebase

upper vapor
#

hollow emoji

fathom charm
#

Hello. Is it possible to increase the visibility range of players when using FogControl.Intensity 1? For example, with a patch. Removing the OutOfRange flag does not help. Does it depend on FogController?

upper vapor
fathom charm
#

Or in this ?

upper vapor
#

you should patch the property

fathom charm
#

how?

upper vapor
fathom charm
#

ok

slate flume
#

I want to learn when I should be using GetComponent vs GetComponentInParent vs whatever else

#

Like would I do the same thing for a ReferenceHub? I want to know how I can learn to find the answer

#

Teach a man to fish-type shit

upper vapor
#

basically

#

if you have a component on the root, use getcomponent for another component on the same object

#

GetComponentInParent for objects higher in the hierarchy
GetComponent(s)InChildren for child objects

#

GetComponent(s)InChildren checks for the current object too, not sure if Parent does that, too

slate flume
#

Interesting