#plugins-dev-chat

1 messages ยท Page 83 of 1

slate flume
#

So if I'm understanding right, Collider is a child of a child of a root object, and things like ReferenceHub and Door are one of the children of that root object

#

So you use GetComponentInParent to get the parent of the Collider, and check for adjascent components?

upper vapor
#

my arrows were meant to mean components on the same gameobject

slate flume
#

Oh okay gotcha

slate flume
#

That's so tough

#

RIP me

#

Okay I think I am doing the understanding

#

The collider is a component of a child of the root
GetComponentInParent takes that child, grabs the parent, and finds components of that

upper vapor
#

pretty much

#

though the collider is probably nested deeper than that

#

doesn't matter with GetComponentInParent

slate flume
#

Oh so it climbs up the hierarchy through every parent to get the component

upper vapor
#

yea

slate flume
#

That's kind of ill

#

Is there any easy way to know where a component will fall in that hierarchy?

upper vapor
#

log out the hierarchy Kek

slate flume
#

Damnnnn that's kind of tuff

#

Get every component on that level, then for every parent log their components

#

๐Ÿฅถ

#

Kind of icy

#

My takeaway from this is that it's all voodoo magic and that to get something from a collider do .GetComponentInParent();

#

Fire

upper vapor
#

you can transform.root.getcomponent too

#

ReferenceHub.TryGetHub(tranfsorm.root, out var hub)

slate flume
#

What the fuckkkk

upper vapor
#

for doors & stuff you should probably use GetComponentInParent

slate flume
#

Okay

#

W

upper vapor
#

well crap

#

.root.gameObject

#

also you're probably hitting a HitboxIdentity, right?

#

then just collider.GetComponent<HitboxIdentity>().Owner

slate flume
#

I'm in grenade.Base.OnCollided();

#

Dope

upper vapor
#

most likely yea

#

try it

slate flume
#

No output :(

upper vapor
#

oh well

#

root it is

slate flume
#

๐Ÿ˜

#

Wait what the hell

#

Is giving me nothing ๐Ÿ˜ญ

upper vapor
#

print out the collider

slate flume
#

Oh you know why

#

Grenades probably just don't call OnCollided when hitting a player

#

Different LayerMask

slate flume
#

I should just send out 26 raycasts every tick to determine collision with players

upper vapor
hearty shard
#

or or

#

change the layer mask Trol

slate flume
hearty shard
slate flume
#

That would be HEAT

#

I don't know how to

slate flume
#

So I was thinking right

#

I want to be able to "inspect" a seed when a spawns, determine if it's good or bad, and respawn the seed depending on what I find

#

What would this do for me

#

Cause when the round restarts, this shit is ran

slate flume
#

Nvm I don't think that did a damn thing

slate flume
upper vapor
#

you're better off replicating the map generation algorithm

slate flume
#

The map generation algorithm sucks

#

At least to try to work with

#

I tried a while back to do it but cut out all the network spawning shit but it didn't work

#

Probably because I barely understand what the code is doing

upper vapor
#

yeah you need to recreate it without messing with unity

slate flume
#

I had weird server-client desync and it spawned doors and clutter in places it wasn't supposed to

#

What if

#

I just

#

Destroy the seedsynchronizer and make a new one

upper vapor
#

remove the map and recreate it with primitives

upper vapor
slate flume
#

I mean

#

All the seed generation and stuff happens with seed sychronizer's awake

#

I could theoretically destroy it and redo it

upper vapor
#

you need to reload the whole scene

slate flume
#

Wdym

#

Oh yeah

#

Clutter

#

And doors

#

And shit

#

I mean ideally I can avoid recreating the map gen myself

#

I would love a way to just say "Hey guy, regenerate the map, this seed sucks"

#

Can I make my own seed synchronizer troll

upper vapor
#

that's what i've been saying

#

replicate it

slate flume
#

Replicating it is such a nightmare

#

Even Cyn gave up on it lmao

upper vapor
#

ctrl+c ctrl+v

slate flume
#

You need to get rid of the network spawning code

#

As each room generates, it runs network sync code

slate flume
#

Awake runs

#

Which runs GenerateLevel

#

Which runs GenerateFacility

#

Which calls these zone generators and the generate function

#

It passes through a System.Random

upper vapor
#

what network sync are you talking about

slate flume
#

AtlasZoneGenerator runs this type shit

upper vapor
#

the only network sync is the seed, then clutter

slate flume
upper vapor
#

and doors, yea

slate flume
#

It generates clutter and doors as each one is ran

#

The main problem is just that this code sucks

#

From the perspective of someone who knows very little about unity, I hate this because I have no idea what any of it means

#

It's probably fine

#

I just have no idea what I'm doing

worthy rune
#

networking is handled by mirror, which is kinda seperate from unity

slate flume
#

๐Ÿคท๐Ÿผ same difference to me

worthy rune
#

so you can get a good idea how it works from reading the docs/code for it since its open source

slate flume
#

Cool but I still need to remake the entire of seedsync

#

The main problem is not the doors and clutter spawning

#

Ignore that I even brought it up

#

Because I feel like that's quickly becoming the main focus

#

That's not the issue

slate flume
#

It's meaningless buzz words to me because I have no idea what it is

#

Cool we're registering identities and interpreting and randomizing atlases

#

What are these identities and atlases

#

I don't know I'm stupid bro

#

I have no way to learn how any of this works so I'm at a dead end

upper vapor
#

you read what the code does Smart

slate flume
#

I'll kill you

upper vapor
worthy rune
#

lol

slate flume
#

It wouldn't be such a problem if I didn't have to track down every little goddamn thing

#

Like okay we're screwing with AtlasInterpretation[] Interpreted
Oh look it's { get; set; }, now I need to find usages

#

Cool awesome now to look at all of these

#

I can't do this bro I barely understand unity

#

It just really shouldn't be this hard to regenerate the map

#

I have to simulate the entirety of the map gen?

#

Why?

#

Dumb

#

It passes one System.Random instance into every function

#

So if I miss even one call everything goes out the window

#

If I even do things in the wrong order it doesn't work

#

So I then need to figure out, for instance, okay when zone generators are added to the zone generators list, what order are they in?

#

Then this extends to each room, clutter generation, etc.

upper vapor
#

Logger.Debug toomuchtrolling

#

/srs

slate flume
#

I did that

#

It's just another problem on the pile

#

Another thing I have to figure out myself

#

All to do one goddamn thing

worthy rune
#

i would say map generation is something that is barely moddable, and would go as far to say that its been implemented in a way which is the least friendly to plugin devs

upper vapor
#

:3333

worthy rune
#

only thing i recommend, is that people make an issue on the github about it and make sure it gets upvotes

slate flume
#

All I want is to say "no I don't like this seed, generate another one"

worthy rune
#

so far no ones has made any complaints, so its unlikely to change

slate flume
upper vapor
#

map gen modding sounds like a nightmare on both sides

worthy rune
slate flume
#

I just want to be able to filter seeds

#

Modding it would be nice but that would require the system to be entirely changed

#

At least afaik

slate flume
#

Oh wait

#

I forgot

upper vapor
#

creative commons 0

slate flume
#

I opened an issue for this

#

Look ma that's me!

upper vapor
#

i'd imagine custom seed atlas support

#

it might be fun to rewrite the current map gen entirely but it's also painful

worthy rune
#

just making all map generated things networked, would allow the most possibilities. although would still be a hard problem to deal with for the issue posted above(you would probably have to do all the map gen yourself)

worthy rune
#

actually, maybe you would be able to just replace a random endroom (e.g. shelter) with a redroom if you needed it

slate flume
#

That would be dope

upper vapor
#

why restart

#

the whole server ๐Ÿ˜ญ

slate flume
#

Because I need the redroom

#

What the hell else am I gonna do lmao

upper vapor
#

doesn't that do a full server restart?

slate flume
#

Yes

upper vapor
#

idk the values of NextRoundAction

slate flume
#

Doing it without setting StopNextRound doesn't work :(

upper vapor
#

then why don't you restart the round after map gen

slate flume
#

I do

upper vapor
#

yeah but

#

doesn't the entire server do a full server restart?

slate flume
#

Yes

upper vapor
#

that is horrible

slate flume
#

Yes

upper vapor
#

you can just inspect the seed on waitingforplayers and restart

slate flume
#

Very

#

Inspect the seed how?

upper vapor
#

check if it's good or not

slate flume
#

Yes, how?

upper vapor
#

by that time you have the whole map

slate flume
#

I'd need to

#

Simulate map gen

upper vapor
#

you generate the map

#

you check if there is a shit room

#

and restart

slate flume
#

Yes

#

That's what I do

#

Lmao

upper vapor
#

but you restart the entire dam server

slate flume
#

Yes

#

What else am I to do

upper vapor
#

so just do your check in waitingforplayers and do a simple round restart

slate flume
#

Will that be faster

upper vapor
#

by a million* times
-# *as far as NOT RESTARTING THE WHOLE PROCESS goes

slate flume
#

Dope

upper vapor
#

~20s vs ~2s

slate flume
#

You right you right

#

It's much faster

#

I thought you meant like

#

Idek

#

I'm a little slow

#

Excuse me

upper vapor
#

it's okay

slate flume
#

Thank you @upper vapor very cool GoodOne

#

This is huge

upper vapor
#

np

celest thorn
#

Or else

#

You reverse it

#

And you understand

upper vapor
#

or else

#

uninstall the game

slate flume
#

In waitingforplayers GoodOne

upper vapor
#

you might cause some issues by not doing full round restarts

slate flume
#

This is the round restart code

#

When doing a soft restart like that the only things that happen are the OnRestartTriggered action, UptimeRounds increment and check, DestroyAllDummies, GC.Collect, _lastRestartTime update and ServerChangeScene

#

Afaik I need none of the other shit there to happen

#

I prefer that it doesn't increment round uptime or anything else

upper vapor
#

maybe a GC collect after you've found a good seed

slate flume
#

Actually

#

Good idea

#

Damn Axwabo you cook extreme sometimes

upper vapor
#

what if you find 100 bad seeds back-to-back toomuchtrolling

upper vapor
restive turret
#

What is a bad seed

slate flume
slate flume
barren pasture
#

Is it possible for me to make a broadcast clear when the next broadcast is received, without setting the next broadcast to clear previous?

slate flume
#

No doubt

barren pasture
#

Where people normally talk about plugin development

slate flume
barren pasture
#

Fair, but it's also very safe to assume someone is talking about plugin dev

restive turret
slate flume
restive turret
#

I on win12 pro ultra hd max

slate flume
#

So I had to double check

barren pasture
#

Well I'm not a relatively smart person, so

slate flume
#

Lol all good

restive turret
#

I think there is a thing when you send a broadcast that clear previous

barren pasture
restive turret
#

Make a system

#

Or patch

#

That's your options

slate flume
#

I mean

restive turret
#

Patch easier i guess

slate flume
#

If your goal is to make it default for all broadcasts that they clear previous then it's probably an easy patch

restive turret
#

Cus you just have to get the receive cmd and you run the clearbc method

#

Probably can be done inside 1 patch that's a prefix

slate flume
#

What even is the setting to clear previous on a broadcast?

restive turret
#

the 3rd param

#

I guess

#

player.SendBroadcast(string, float, bool (optional) )

slate flume
#

Oh dope

hearty shard
restive turret
slate flume
restive turret
hearty shard
#

no like

#

if you cant find good one after 10~ attempts
fallback to a known list and just get random value

slate flume
hearty shard
slate flume
restive turret
#

That's easy patch tbh

hearty shard
#

temp remove until list is empty
then just
reset the list

slate flume
restive turret
#

Patch
Broadcast.Singleton.TargetAddElement

Prefix
Get instance, connection param.

Run Broadcast.Singleton.TargetClearElements(connectin);

slate flume
#

At some point it'll find a good seed

hearty shard
#

if u say so

restive turret
#

At some point

slate flume
#

Bro you're acting like it's gonna be doomsday

restive turret
#

3 years later

hearty shard
#

im just saying to add fallbacks ๐Ÿ˜ญ

slate flume
#

I'd have to interface with files and check seeds

#

All that work for what

restive turret
#

Count if it's more than idk 30 wrong seed than just use a pre-approval list

slate flume
#

No shot it gets 30 wrong in a row

hearty shard
#

too much work

slate flume
#

Literally

restive turret
#

What if it does

#

You cant really predict that

hearty shard
slate flume
#

You guys just don't understand statistics

restive turret
#

The 52th restart el have good deed

slate flume
#

Let's say half of all seeds are bad

restive turret
slate flume
#

This is the odds of that happening

restive turret
slate flume
#

There is quite literally no point

hearty shard
restive turret
#

Can happen

slate flume
#

"But there's a 1 in 4 trillion possibility this would happen"

#

Sybau

#

You know what, the day 30 seeds fail in a row, I'll let you know

restive turret
#

Well if you hit that jackpot please send me a letter

slate flume
#

๐Ÿ‘๐Ÿผ

#

I would set up fallbacks if it like definitively failed after X seeds or something

#

But it will eventually give a seed

restive turret
#

Ye eventually

slate flume
#

And the odds of it failing a ton are so incredibly low

restive turret
#

And like 20 player waiting

slate flume
#

Lmao

#

It also makes it easier to update my code when I don't need to rely on a pre-approved fallback list

#

Unless

#

Hmm

#

I wonder if I can just automate it

restive turret
#

Automate what

slate flume
#

Save good seeds as the server runs

restive turret
#

I mean ye

#

That would help

slate flume
#

That's actually

#

Much better than a manual list

#

I think I'll do that

hearty shard
#

was it really that much effort kek

slate flume
#

An automatic list is much better

hearty shard
#

well yeah

slate flume
#

I still doubt I'll ever use the fallback

#

But eh whatever

#

It's cool to say I have it

hearty shard
#

just dont store EVERY good seed, i mean 500000 seeds stored seems like too much

slate flume
#

I'm gonna do a hashset and store 100

hearty shard
#

yeah

slate flume
#

Maybe less

restive turret
#

And with a stalin sort you only get 1

slate flume
#

Lmao

#

Whenever I need to sort a list I use BogoSort

hearty shard
#

my beloved .Sort()

restive turret
#

I use .Sort

hearty shard
#

i use Slejm.Kill()

slate flume
#

Is it bad that I use Json files to save and load data?

hearty shard
#

json is fine but you could also

#

txt

slate flume
#

What would that look like

hearty shard
#

well

#

what r u saving

slate flume
#

Like usernames

hearty shard
#

thats it?

slate flume
#

Yeah

#

I mean I have a few different classes that use different files for their data

hearty shard
#

File.ReadAllLines or smth

slate flume
#

Idk if I should centralize it or not

#

I feel like maybe I should centralize it

hearty shard
#

List<string> fileText = new();

File.WriteAllLines(path, fileText);

slate flume
#

Oh I also

#

Store dictionaries

hearty shard
#

oh.

#

write a custom parser

slate flume
#

Lmao peak

#

I feel like I should stop storing data in like 5 different files for my different classes

#

But I'm unsure how I want to centralize it

hearty shard
#

database !!!

slate flume
#

Oof time to learn how to database?

hearty shard
#

well idk

slate flume
#

What would be the base database shit to use

hearty shard
#

ced might know

#

hes a nerd with databases

slate flume
#

Do while loops check condition at the beginning of each loop?

slate flume
#

Damn

#

What would the best way to do this shit be

#

Cause if the light is destroyed part-way through the loop, I'll get an exception

hearty shard
#

Its different from a do while loop which checks conditions at end of loop

slate flume
#

Yeah

#

But that also doesn't help me

hearty shard
#

ur cooked

slate flume
#

FUCK

hearty shard
#

nah just try catch it

slate flume
#

Real shit

#
[2025-07-28 17:46:06.936 +00:00] [STDOUT]   at SecretAPI.Patches.Features.DamageAttackMultiplier.Postfix (PlayerStatsSystem.AttackerDamageHandler __instance, ReferenceHub ply) [0x00017] in <d3ebac98cb714e4799f0f7887366db01>:0
[2025-07-28 17:46:06.936 +00:00] [STDOUT]   at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.PlayerStatsSystem.AttackerDamageHandler.ProcessDamage_Patch1(PlayerStatsSystem.AttackerDamageHandler,ReferenceHub)
[2025-07-28 17:46:06.936 +00:00] [STDOUT]   at PlayerStatsSystem.StandardDamageHandler.ApplyDamage (ReferenceHub ply) [0x00092] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-28 17:46:06.936 +00:00] [STDOUT]   at PlayerStatsSystem.Scp049DamageHandler.ApplyDamage (ReferenceHub ply) [0x00000] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-28 17:46:06.937 +00:00] [STDOUT]   at PlayerStatsSystem.PlayerStats.DealDamage (PlayerStatsSystem.DamageHandlerBase handler) [0x0008b] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-28 17:46:06.937 +00:00] [STDOUT]   at CustomPlayerEffects.CardiacArrest.ServerUpdate () [0x0004f] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-28 17:46:06.937 +00:00] [STDOUT]   at CustomPlayerEffects.CardiacArrest.OnEffectUpdate () [0x00007] in <d9731e675e55453197cf28cd60eed3f2>:0
[2025-07-28 17:46:06.937 +00:00] [STDOUT]   at CustomPlayerEffects.StatusEffectBase.Update () [0x0000f] in <d9731e675e55453197cf28cd60eed3f2>:0```
@hearty shard
#

SecretAPI has an NRE

hearty shard
#

Tf

slate flume
hearty shard
#

Oh

#

Right

slate flume
#

Woops

#

Ez

hearty shard
#

wait

#

oh its cardiac arrest specific isnt it

slate flume
#

๐Ÿ˜

hearty shard
#

So attacker is null here

#

Despite being AttackerDamageHandler

hearty shard
#

r u on 2.x or 1.x

slate flume
hearty shard
#

do you use the iattacker thing

slate flume
#

Nah never

#

I only use the SSSS wrapper tbh

hearty shard
#

if you want you can go into ss on the branch and just delete the patch ngl

#

Temporarily for urself

slate flume
#

Eh just thought I'd point it out for ya

#

Not a big deal

hearty shard
#

ill remove it entirely myself probably

slate flume
#

Dope

hearty shard
#

will have to wait 12 ish hours for that to happen tho

#

For now bed comfy

slate flume
#

Real shit

#

I mean LabAPI and the game itself give 10x more errors than SecretAPI so I don't sweat it lmao

#

Just thought you'd wanna know

hearty shard
#

ill have forgotten tmrw ngl

slate flume
#

I'll forward it to the uh

#

Place

restive turret
hearty shard
#

But if middle of the loop it gets destroyed that condition isnt met and itll continue anyway

slate flume
#

So all you need is light.Base

#

Also cause light.Base has a built in life check or whatever

restive turret
#

lool no light can be null

slate flume
restive turret
#

Don't let them rider fool you

hearty shard
#

But basegame could!

restive turret
hearty shard
#

but thats not null thats destroyed

hearty shard
restive turret
#

Will

hearty shard
#

if you set to null krill issue

slate flume
#

if (!light.Base) break; is all you need

#

Because light.IsDestroyed does the same thing

#

And light is non-nullable

slate flume
#

Is it possible to speed up cooldowns and animations and shit

#

Like lower reload cooldown, speed up micro wind-up, etc?

pine parcel
#

does anyone know, is it possible to show 939-style pings for players who aren't 939? I want to create a tweak to make it so 106 gets pinged when a player is damaged to make it more lore accurate

slate flume
pine parcel
#

hmmm, I'm starting to wonder if I need to start learning how to client side mod

slate flume
#

Most people playing SL are not going to go out of their way to install client-side mods for one server

pine parcel
#

hmm, this is true

slate flume
pine parcel
#

hahaha I'm glad someone recognized it

slate flume
#

๐Ÿ”ฅ

slate flume
#

On the github

#

And then hope and pray they care enough to do it

#

I have probably 4 open issues atm

pine parcel
#

are these types of suggestions worth opening an issue for? I didn't wanna bother the devs with non-bugs

pine parcel
#

oh nice! alright, I'll open an issue for this and maybe some of the other ideas I've been thinking about!!

slate flume
#

Ong just put anything you want to see in there and then pray to our overlords at the LabAPI dev team

#

Lucky bastards ๐Ÿ™„

slate flume
#

Fuck can you not give a player the insufficient light effect?

restive turret
#

ยฏ_(ใƒ„)_/ยฏ

plain gazelle
#

I remember MER in 14.0 being able to spawn in stuff like Lockers and SCP Pedestals. In the new LabAPI ProjectMER not really anymore.
Would anyone have any idea how the process of spawning base game prefabs for everyone using LabApi works?

upper vapor
upper vapor
upper vapor
plain gazelle
#

Oh sick, yesterday xD

#

Thank you!

plain gazelle
celest thorn
upper vapor
#

idk what that is

celest thorn
#

there are spoilers

#

for the new serie

grave eagle
upper vapor
#

neverโ„ข

heady turret
#

is that possible disable pickup attached to interactable toys?

upper vapor
#

you can set islocked

#

ir set the interaction duration to 0

heady turret
#

i mean that

upper vapor
#

i'm not sure what exactly you mean

heady turret
upper vapor
#

do you want to hide them or make it so you can't pick them up

heady turret
#

I want the pickups not to get stuck on interactableToy but to fall and not touch it.

#

if you see keycard and radio is flying on interactable toy

upper vapor
#

it's not stuck on the interactable toy, it's stuck on the cube

#

you have to set the cube to not be collidable

heady turret
upper vapor
#

huh

heady turret
#

cube is just a preview of interactabletoy

upper vapor
#

uh

#

get the interactable toy's base, and set _collider.enabled to false

unique crane
heady turret
unique crane
#

As there is no way to tell what is a mod and what is a cheat

heady turret
#

so its so strange

upper vapor
#

does the pickup "glitch" and fall for the client?
and then it gets teleported back

pine parcel
unique crane
#

It is possible to do that ofc

celest thorn
#

so sad that cheaters ruin everything

pine parcel
#

I'll take ThatGuy's advice and put in a suggestion so it doesn't get forgotten about

heady turret
#

but for server yes

celest thorn
#

im rn making a scripting system and i have the basics done lol

#

if works

#

conditions do work for the if and events do work too

plain gazelle
#

Letting us place 079 pings/939 noise pings wherever we want and control who can see them would be so awesome
it would be s cool

upper vapor
pine parcel
slate flume
#

So @upper vapor running the code in the WaitingForPlayers caused desync issues

#

I will

#

Try to work around that

upper vapor
#

not surprised

#

what if you reload the scene in uh

#

SeedSynchronizer.GenerationFinished or whatever

#

GenerationStage isn't very useful cuz it's just a foreach loop on the enum's values before GenerationFinished is invoked xdd

slate flume
#

You're evil

slate flume
#

Wait

#

Sometimes map gen finishes after waitingforplayers?

#

Is there a way I can delay the CharacterClassManager.Start function?

celest thorn
#

or is it too hard?

upper vapor
#

i hate = true and = false

#

single equals for comparison is eeehhhhh

#

it reads fine but it's weird

#

you can understand it

celest thorn
#

and it has ! negative too

#

i can do this and it works

upper vapor
#

if not something equals true ๐Ÿ˜ญ

icy knoll
#

so ugly

celest thorn
upper vapor
#

or LuaLab that david started

celest thorn
#

I know it sounds dumb

upper vapor
#

it's nice that you're making an esolang basically
but then it won't be usable anywhere else

celest thorn
#

it won't be usable anywhere else?

upper vapor
#

a new language

#

bound to SL

celest thorn
#

I mean no

#

it has modules and stuff

#

this are connected to SL

#

but the basics is from an old java project that i was making

#

i can do whatever i want im making it bound to sl

#

but its easy to just migrate it

upper vapor
celest thorn
#

i just realized im a dumbass

restive turret
celest thorn
#

and it was already implemented

celest thorn
#

for someone

#

that is like plain english

#

as max as i can

#

this should work fine too lol

#

im just stupid and didn't think about it

restive turret
celest thorn
#

i don't make the rules lol

upper vapor
#

write it with chatgpt

#

SL tool calling

#

with claude

restive turret
#

ScriptExtension or whatever the thing called it

celest thorn
#

Why should i

#

its experience

upper vapor
#

trueing

#

write a good parser for it

celest thorn
#

it already parse some stuff

#

the actions just need to be coded

#

but some of them can be just made easier

#

set is just a set of reflection

worn gull
#

Hi! Sometimes 106 can't go through doors

#

What could be the problem

#

Only after I set him to another role and back to 106

upper vapor
#

yeah you have to do that unfortunately

worn gull
restive turret
#

Ye

#

Known game issue

#

Since like 13.x

upper pike
#

Is there any property or field I can check on a Scp2176Projectile to see if it broke on impact or cracked or will I just have to check the velocity which it hit the ground with

upper vapor
unique crane
upper vapor
#

^ check _hasTriggered in a prefix

plain gazelle
#

(These questions are not connected)

  1. What is the difference between a round restart and a soft restart? Does some data persist between rounds or whats different?

  2. Is there any way to forcefully prevent a round from ending/server being restarted (even through RA/commands)/extend it slightly just before restart actually happens?

hearty shard
upper vapor
#

subscrbe to Shutdown.OnQuit to do some cleanup

hearty shard
#

yea u cant rly stop the process ending tbh

#

you can prevent basegame stuff that handles doing that though

plain gazelle
#
  1. I believe for a new plugin a round restart isnt enough, but does plugin data like static variables get reset between rounds?

  2. Alright should be fine thanks ^^

upper vapor
#
  1. no
hearty shard
#

yeah no its just ROUND related stuff

#

like the map, deaths

#

plugins dont reset

plain gazelle
#

ooo interesting alright

hearty shard
#

thats a you thing to handle

plain gazelle
#

I may have been ignoring to clean up my data between rounds then

upper vapor
#

uh oh

hearty shard
#

memory leak 101

plain gazelle
#

xD

#

Should be easy fix, i know my plugins well enough

celest thorn
#

There's a way to subscribe to all events and get their EventArgs details

celest thorn
#

i figured it out myself :3

obtuse spruce
#

how the Transform Parent rpc on admintoys work ?

pallid galleon
#

Anyone know how I can get a roles base max HP? Like being able to get how much max HP scp106 has as a base

#

trying to get a HP modifier for something after I already have their max HP set to something else

hearty shard
#

or wdym

#
public uint ServerParentId(Transform parent)
    {
      NetworkIdentity component;
      return !((UnityEngine.Object) parent != (UnityEngine.Object) null) || !parent.TryGetComponent<NetworkIdentity>(out component) ? 0U : component.netId;
    }
upper vapor
upper vapor
unique crane
#

Not a bad idea to put it on github issues aswell

#

sounds like useful property

slate flume
#

That's what I use for my grenades

unique crane
#

It processes collision with other.. colliders

slate flume
#

Fire

#

Hi david :)

#

Question

#

Can I delay this code running?

#

Sometimes it runs before map gen finishes

#

And it fucks up everything

hearty shard
#

MapGenerated event no ?

hearty shard
#

yes but

#

why not use the other event

slate flume
#

I want to delay incoming connections and prevent people from joining

#

Because they join before the map is done loading

#

So seed sync happens

#

So I can't generate a new seed without desync

#

I want to delay the start for when the map is done generating

#

Then no more desync GoodOne

upper vapor
#

patch it out and timing.WaitUntilTrue or whatever

slate flume
upper vapor
#

or or or or

#

skip the method if the object's didStart is false
then delay a call to Start

slate flume
#

Fire

#

Love that

upper vapor
#

no ctrl+c ctrl+v required

random scaffold
#

how i can level up tps with 20+ players?

upper vapor
slate flume
#

Wait

#

Start isn't static

#

It's a public void

upper vapor
#

you have access to the instance

slate flume
#

yeah

#

Baller

hearty shard
#

its per player

#

but the log stuff is only called if its called on the dedicated server player

slate flume
#

๐Ÿ˜

upper vapor
#

noooooo

slate flume
#

Shoot

hearty shard
#

i dont think that works

#

tbh

slate flume
#

What do I

#

Need to do here

upper vapor
#

that is very wrong

hearty shard
#

coroutine kek

slate flume
#

Love that

upper vapor
#

let it pass through if not isLocalPlayer

hearty shard
#

oh yeah that too

slate flume
upper vapor
slate flume
#

Cool

#

What else do I need to fix

upper vapor
#

there's no coroutine

hearty shard
#

pretty sure WaitUntilTrue doesnt work in CallDelayed

upper vapor
#

"wait until true" can't give you an exact delay

hearty shard
#
private static IEnumerator<float> Handler(CharacterClassManager dedicated)
        {
            yield return Timing.WaitUntilTrue(() => generatedMap);
            dedicated.Start();
        }
slate flume
#

Okay sure

hearty shard
#

Timing.RunCoroutine(Handler(__instance));

slate flume
#

Yeah yeah I've got coroutines up the wazoo in this shit

#

Dope

#

It's working

upper vapor
obtuse spruce
hearty shard
#

you have to set it to a player

#

you cant really set it to the head transform

slate flume
obtuse spruce
hearty shard
#

also youd have to set the offset (position) to othe offset to adjust it to be at head

obtuse spruce
#

localpos ?

slate flume
#

I kinda like this

hearty shard
hearty shard
#

LightSourceToy light = LightSourceToy.Create(pickup.Transform);

#

thats rly all you need to do but then add the offset after (and this is pickup not player)

obtuse spruce
#

oh ok that easy

upper vapor
random scaffold
slate flume
# slate flume I kinda like this

@grand flower if you were interested in doing seed filtering to get red room back, this is the code I'm running and it appears to work really fast

upper vapor
#

could be faster toomuchtrolling

restive turret
grand flower
#

But that works

#

I don't do SL modding anymore anyway heh

celest meadow
#

sup lads

teal junco
#

sup

celest meadow
#

where does one find frameworks for custom guns?

teal junco
#

custom item api

celest meadow
#

thanks g

obtuse glade
#

recently noticed new logs in the server console with a prefix "[STDOUT]" any clue as to why they appear and how they can be disabled?

upper vapor
upper vapor
#

np

slate flume
#

Each generation of the online scene generates a new map

slate flume
#

Makes sense, bro has a j*b

obtuse glade
#

Is there any way to access the whole item list in the game, not only cached items (like Item.List)

upper vapor
#

you mean the templates?

#

InventoryItemLoader

obtuse glade
#

Yes, thank you

plain gazelle
#

Does ThrowingProjectile also get called when a player holding a pinless grenade dies?

slate flume
#

This is where the event is called

#

So my base assumption is no

#

But I can test it rq

plain gazelle
#

hmmm

#

Do thrown nades also call ServerEvents.PickupCreated, or any other server event?

upper vapor
#

they should

slate flume
plain gazelle
#

hmmm

#

will try the pickup method then

#

thankies

slate flume
plain gazelle
#

:(

#

I just want to modify the grenades timer, no matter if thrown or live-dropped
(idc about chain explosions)

#

Any ideas?

slate flume
# plain gazelle :(

Well regular grenades don't call PickupCreated, grenades dropped by dying people do

plain gazelle
#

oo

slate flume
#

But it doesn't cover all of them

plain gazelle
#

So i gotta use both methods

slate flume
#

Or another method potentially

#

I'm guessing there's a general method like TimedGrenade.SpawnActive() you could tie onto

#

Where if you patch that it will have to catch every single grenade, even if they don't call an event

plain gazelle
#

I guess, but i have yet to patch anything myself so id rather not try .w.

slate flume
plain gazelle
#

Maybe i can just try deleting the nade and spawning my own instant one instead xD

worthy rune
#

might be something going on since the projectile might have the same serial

upper vapor
#

it's not created using ServerCreatePickup

#

just instantiates the projectile prefab

worthy rune
#

the wrapper handles the pickup created event, and its instantiated in Start or Awake of the ItemPickupBase iirc

slate flume
#

Hmm appears the fuse time isn't as I wanted it to be

plain gazelle
#

Oh so i have to set TargetTime instead of fuseTime since its already created?

slate flume
#

Set remainingFuseTime to be safe

plain gazelle
slate flume
#

Literally yeah

#

That'll cause grenades to explode in your face but yeah

plain gazelle
#

Wellllll thats what i am after xD

#

Still working on more code ofc

slate flume
#

Throw a separate thing on pickups for dying and it'll work

plain gazelle
#

Does the ev.Projectile.Serial have same serial as the item it was before?

#

i would hope s o

slate flume
#

I'm like

#

80% sure

#

I can check

#

They do

#

Yo check this gangster shit

#
[HarmonyPatch(typeof(TimeGrenade), nameof(TimeGrenade.ServerActivate))]
public class Testing
{
    public static void Prefix(TimeGrenade __instance) => __instance._fuseTime = 0;
}
upper vapor
#

: CustomEventsHandler

slate flume
#

That will apply to any grenade ever made

upper vapor
slate flume
#

Shut it

#

I was testing shit

#

So I had both

#

๐Ÿคซ

#

Never happened

barren pasture
#

(Already tried to consult the MER discord) I try to import the SL-CustomItems thing into Unity (granted it's a slightly later version), and I get this error. How do I fix this?

slate flume
#

I'm gonna tack on another question

#

What causes players to stop be able to send voice messages after really loud noises?

slate flume
barren pasture
slate flume
#

You could try adding the dependency

barren pasture
#

No idea how to add dependencies to Unity projects

slate flume
#

Me neither

upper pike
slate flume
#

That's how it does the collision

upper pike
#

I can't find that

slate flume
#

Let me uh

#

One sec

upper pike
#

Yeah its not in the LabAPI wrapper or base

upper pike
slate flume
#
using InventorySystem.Items.Pickups;
using LabApi.Features.Console;
using Scp2176Projectile = InventorySystem.Items.ThrowableProjectiles.Scp2176Projectile;
namespace Test;
[HarmonyPatch(typeof(Scp2176Projectile), nameof(Scp2176Projectile.ProcessCollision))]
public class Testing
{
    public static void Prefix(Scp2176Projectile __instance)
    {
        Logger.Info((__instance.PhysicsModule as PickupStandardPhysics)!.Rb.linearVelocity);
    }
}
#

That should give you the velocity of the 2176 on collision

#

I'm pretty sure it works idk I'm a little blazed

pine parcel
#

Unless this is a mobile bug...

barren pasture
#

Probably a mobile bug bc idk what you mean

slate flume
#

Or actually

#

You'd want to run it on ServerFuseEnd prob

#
using InventorySystem.Items.Pickups;
using LabApi.Features.Console;
using Scp2176Projectile = InventorySystem.Items.ThrowableProjectiles.Scp2176Projectile;
namespace Test;
[HarmonyPatch(typeof(Scp2176Projectile), nameof(Scp2176Projectile.ServerEndFuse))]
public class Testing
{
    public static void Prefix(Scp2176Projectile __instance)
    {
        Logger.Info((__instance.PhysicsModule as PickupStandardPhysics)!.Rb.linearVelocity);
    }
}
#

Not sure if that works but it most likely does

barren pasture
#

Is the snake engine ran client side or server side?

#

I assume server side

slate flume
barren pasture
#

Fuck

slate flume
#

You can look at the data and modify map and certain game stats and shit but you can't actually modify the game itself

celest thorn
#

dead chat

restive turret
#

Ok, and?

naive charm
#

yo guys

#
[2025-07-30 12:24:18.129 +03:00] [STDOUT] ArgumentException: An item with the same key has already been added. Key: ReferenceHub (Name='Player [connId=21]', NetID='9316', PlayerID='39')
[2025-07-30 12:24:18.130 +03:00] [STDOUT]   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x0015a] in <069d7b80a3914a08b6825aa362b07f5e>:0
[2025-07-30 12:24:18.130 +03:00] [STDOUT]   at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <069d7b80a3914a08b6825aa362b07f5e>:0
[2025-07-30 12:24:18.130 +03:00] [STDOUT]   at LabApi.Features.Wrappers.Player..ctor (ReferenceHub referenceHub) [0x0000b] in <ed207da941d64f12942f0c5cc79632fc>:0
[2025-07-30 12:24:18.130 +03:00] [STDOUT]   at LabApi.Features.Wrappers.Player.AddPlayer (ReferenceHub referenceHub) [0x00008] in <ed207da941d64f12942f0c5cc79632fc>:0
[2025-07-30 12:24:18.130 +03:00] [STDOUT]   at (wrapper delegate-invoke) System.Action`1[ReferenceHub].invoke_void_T(ReferenceHub)
[2025-07-30 12:24:18.130 +03:00] [STDOUT]   at (wrapper dynamic-method) ReferenceHub.ReferenceHub.Start_Patch2(ReferenceHub)

Da hell is that

#

And also, can such type of errors crash servers?

south socket
# naive charm yo guys
[HarmonyPriority(Priority.VeryLow)]
[HarmonyPatch(typeof(Player), nameof(Player.AddPlayer))]
internal static class AddPlayerPatch
{
    private static bool Prefix(ReferenceHub referenceHub)
    {
        if (referenceHub.isLocalPlayer)
            return false;

        if (Player.Dictionary.ContainsKey(referenceHub))
            return false;

        _ = new Player(referenceHub);
        return false;
    }
}
#

here the patch for it but idk when it will be fixed

south socket
# naive charm anyway, what's this?
    private static void AddPlayer(ReferenceHub referenceHub)
    {
      if (referenceHub.isLocalPlayer)
        return;
      Player player = new Player(referenceHub);
    }

AddPlayer has no check in it if the player is already registered so if ReferenceHub.OnPlayerAdded is called again for what ever reason LabAPI doesnt like it.

naive charm
south socket
#

i dont think so. never happened to me.

celest thorn
#

i heard you got shot

south socket
#

wha

celest thorn
#

bruh

#

have you watched dexter?

south socket
#

omg

#

i was so confused

celest thorn
#

๐Ÿ˜ญ

#

so sad

restive turret
#

Dexter's laboratory

celest thorn
#

bruh i just bugged a modpack

#

and lost everything an hour of progress

restive turret
#

Skill issue

#

What modpack

celest thorn
restive turret
#

1.6.4?

celest thorn
#

but the modpack is bugged

#

crashed my game

#

2 times

#

i uninstall it

restive turret
#

F

celest thorn
#

lets try Project Overpowered

#

skyblock

#

so

#

1.12.2

restive turret
#

Try Terrafirmacraft

celest thorn
#

with a friend

#

we ace modpacks togheter but idk sometimes i wanna play alone

restive turret
#

Atm 10

celest thorn
#

i played atm 9

#

10 changes something?

#

other than version and some new mods?

restive turret
#

Isn't that the Skyblock one

celest thorn
#

i played it alot of time ago

#

im searching a good modpack

#

but all copy and paste

restive turret
restive turret
#

Ye

celest thorn
#

honestly let me give it a try

restive turret
#

Iir 8 was that too

#

I don't like magic mods do

celest thorn
#

2 mods i hate the most

#

Botania and fucking Create

restive turret
#

Real the second

#

I kinda hate and love botania

celest thorn
#

is

#

boring

restive turret
#

Fight the gaia

#

That's not boring

celest thorn
#

its that mod when you see it you know you are going to spend 20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 hours to craft a flower that gives you 2 minutes of burn

#

and then you need to do the process 20 times over

#

to just get a bit of mana

restive turret
#

That's skill issue

celest thorn
#

i know

#

and i refuse

#

so i let my friend do it

#

while i do some other mod

#

its boring i find it useless

restive turret
#

I hate blood magic

celest thorn
#

I kinda like it

#

i don't remember there was a mod with chalk and shit

restive turret
#

And many other magic with that

celest thorn
#

i found it in one modpack and it was complicated

restive turret
celest thorn
#

there are quite alot

#

Occultism

#

is the one i was referring

restive turret
#

Ye

celest thorn
#

i don't understand why magic needs to be so much a pain in the ass

restive turret
#

Bc its magic

celest thorn
#

look at magic arena

#

i scream BALLS

restive turret
#

Tech mods just repeat until you fot it automated

celest thorn
#

and it throws balls

restive turret
#

Hehe balls

celest thorn
#

i scream DEEZ nuts

#

and the game crashes

#

(idk i don't have the game i wanted to make a joke)

celest thorn
#

and spawned near a warden

#

how unlucky can i be?

#

and it doesn't have the skyblock

restive turret
#

Then it must be 11

#

Wait

#

Did you install 10 to the sky?

celest thorn
royal mica
#

Never used MER and I'm 100% this has been asked and answered but: #plugins-discussion message
Does client side only primitive means that it is spawned both sides but are "disconnected" since will receive no updates? (like static objects)

#

What I know so far, if it is only spawned on client, it would result in falling through

celest thorn
#

But no they donโ€™t updates updates or anything

spare zodiac
#

I just tried to attach schematic to player and wtf. I didn't know it's so smooth now it's absulutely ๐Ÿ”ฅ

restive turret
celest thorn
#

Still better and more reliable for me

celest thorn
royal mica
celest thorn
spare zodiac
celest thorn
#

Manually

royal mica
#

ah found it

celest thorn
#

By hand it leaves less headaches

spare zodiac
#

I never used that and I think it's not as good

celest thorn
#

But honestly less headache for me

spare zodiac
#

setting it's parent is much easier

celest thorn
#

Building meow with that in mind too would be hard

spare zodiac
#

but everyone has preferences

celest thorn
#

Meow has already alot of stuff to make it look smooth and nice on the client so they look fine

#

Honestly parenting destroys my primitives alot

#

And i would need a rewrite on how the fundamentals works

royal mica
celest thorn
#

Its not complicated at all

#

If you look meow you start crying

royal mica
#

It is absurdly simple

spare zodiac
#

simple is in most cases better

#

trust the process

restive turret
pallid galleon
#

Anyone know how I can make a dummy 939 enter focus/pounce state?

#

setting focusState to 1 doesn't seem to work so I assume there's something I need to call?

hearty shard
#

you can check what dummies do