#plugins-dev-chat

1 messages · Page 43 of 1

ionic prawn
#

i know how to get many people on your server

#

just wait untill scp sl updates and update your server the fastest

hearty shard
#

yeah

ionic prawn
#

we got 14 players because of it

restive turret
#

We got like 15 or 20

ionic prawn
#

nice

restive turret
#

But many plugin stuff was broken

#

So had to quickfix it

ionic prawn
#

i didnt have to fix anything really

#

cause cedmod auto updates

restive turret
#

Exiled broke many stuff

ionic prawn
#

kill exiled

restive turret
#

And also the SSSS change also broke many stuff

ionic prawn
#

use exiled become exiled

restive turret
#

Will become obsolete

ionic prawn
#

labapi will win

hearty shard
#

i got 20

#

then it crashed from scale changes Fear

restive turret
#

lmao kind of same

ionic prawn
#

my server had peformence issues 😭 cause my friend forgot to fix performence issues on the laptop

#

cause he owns the laptop

#

and im using parsec to connect to it

#

so i had to fix peformence issues

restive turret
#

server on laptop?

ionic prawn
#

yes

restive turret
harsh thorn
#

ok it made certain things fucking fast and reduced the cpu 👍

restive turret
#

nice

ionic prawn
hearty shard
#

well

ionic prawn
hearty shard
#

not as much as youd think on older hardware

ionic prawn
#

other stuff

hearty shard
#

true

#

i meant like the big performance hits to CPU SL has

ionic prawn
#

uh oh... cedmod said fialed to vertify cedmod verification token... ignore message if the server is not verified

#

uh ohh

#

my keyboard is buggy today idk why 😭

ionic prawn
harsh thorn
#

if your server is not listed it will say it

#

if your server just started (or dissapeared of the list for a little bit and then came back) it can also say it

ionic prawn
#

my server is public btw

harsh thorn
#

well i listed why it can happen

#

if it happens a few times you need to ignore it

ionic prawn
#

k

#

im working on a pluginlist rn lol

harsh thorn
#

thats just the delay between your server registering itself on the list, the sl api updating the list
and cedmod pulling the list

ionic prawn
#

k

upper vapor
untold raft
ionic prawn
upper vapor
untold raft
ionic prawn
#

does someone know why this dosent work?

public static void Process914PickupFully(
    Scp914ProcessingPickupEventArgs ev,
    Scp914KnobSetting targetKnob,
    ItemType oldItem,
    ItemType newItem)
{
    if (ev.KnobSetting == targetKnob && ev.Pickup.Type == oldItem)
    {
        ev.IsAllowed = false;

        Vector3 position = ev.Pickup.Position;
        Quaternion rotation = ev.Pickup.Rotation;

        ev.Pickup.Destroy();

        Pickup.Create(newItem, position, rotation);
    }
}
#

nvm

#

found out why

slate flume
#

This is so peak

soft turtle
slate flume
#

You heard me

soft turtle
slate flume
#

It means it's amazing code that I love

slate flume
#

Calling something "peak" means it's like "on top" as in "the best"

ionic prawn
#

Hippity hoppity your code is now my property

grand flower
#

Can't send the code though

frail pilot
#

Bugs that can only be reproduced using the RA panel should not be reported

grand flower
#

Nothing on my issue says it only happens in RA

#

10/10 Northwood moment and if that's really the case, they could at least have the respect of taking 5 seconds to copy the reason in that list instead of letting us figure it out

hearty shard
#

does that not remove and readd ?

grand flower
#

That was basegame escape

hearty shard
#

oh

grand flower
#

I took the video on a vanilla server

#

Either way, still a dick move lol

#

Just a bit tilted sorry, sucks to take the time to give them specific info about where the bug happens just for them to be like "screw what the issue says, you used RA to repro it means it's only in RA" lol

frail pilot
#

I noticed that the report did not mention that this bug occurs after the player escapes, which seems likely to cause misunderstanding

grand flower
#

After any role change

#

Whatever, I've told them about them closing it for no reason, they can do whatever they want with the info

swift nexus
#

Hi @grand flower, your video did not seem to upload right for this report. Given the report only mentioned reproduction steps through RA, it was closed. If you have reproduction steps of this occurring in vanilla gameplay (such as above), It would be great if you could make a new bug report detailing that.

#

Next time, feel free to reach out to QA Management or contact us on the QA Community discord if you have any questions or concerns regarding a bug report

slender lynx
#

cyn fumbling the bag

plain gazelle
#

Is it possible to manually log something into the Server Log file?

grand flower
noble oasis
#

Honestly, closing bug reports just because they’re “RA Only” is such a weird stance in my opinion. Especially considering there’s official plugin/modding support via LabAPI, and issues like this one can definitely be triggered by a plugin. And if problems like this are ignored you eventually end up with a buggy mess of a plugin API nobody really wants to touch.

swift nexus
hearty shard
#

on LabAPI repo (or here)

swift nexus
#

^

icy knoll
#

does anyone know how ~ClassName () {} works?

#

I know static ClassName() does stuff when the method is first mentioned, but idk how ~ClassName() works

unique crane
icy knoll
hearty shard
icy knoll
#

ah

#

is there like any reverse to static ClassName() then?

hearty shard
#

that is the reverse

unique crane
#

No, destructor is opposite of constructor

#

not static constructor

icy knoll
#

yeah

hearty shard
#

my bad

#

whoops

icy knoll
#

i need the inverse of static constructor

hearty shard
#

uh

icy knoll
#

because I wanna register events and unregister in the inverse

hearty shard
#

public static void Destroy()
{
}

and call ur code trolling

unique crane
#

Or just... make static method that is called when you want it to be unregistered?

hearty shard
#

yeah

#

you cant really have it called automatically

#

because theres no object to destroy

#

so it cant finalize the object

icy knoll
#

looks weird not calling a method for start and then finish then but fair enough

hearty shard
#

then call a method to start trolling

icy knoll
#

yeah

unique crane
#

Well you have plugin enabled and disabled methods

icy knoll
#

omg i can add IRegister to CustomSetting

#

lets go

hearty shard
#

yes

#

is this

#

news

noble oasis
hearty shard
#

it can be added to anything that isnt static

#

well other than unity objects

icy knoll
# hearty shard news

i didnt really think it would work considering it's a CustomSetting, idk if it would break or smth

hearty shard
#

erm

#

well

#

thing is

#

it DOES need empty constructor

#

so whatever ur doing make the constructors empty

icy knoll
#

yeah then im cooked

hearty shard
#

!!!!

icy knoll
#

oh wait

#

ye no params

#

nice

#

hm

hearty shard
#

thats not that hard

#

unless ur configing values

#

all my settings are parameter less

icy knoll
#

it's just i wanna use events that specifically interact with a custom setting

#

so

hearty shard
#

well

#

you can do it in the uhhh

#

either constructor

#

register eventtt

#

or you could

#

idk

#

i forgot

icy knoll
#

if i do constructor then it will create a new event for every player

#

lol

hearty shard
#

true

#

i love my [CallOnLoad] attribute

icy knoll
hearty shard
#

i havent bothered ngl

icy knoll
#

:c

hearty shard
#

busy being SICK

random scaffold
#

Probably the most useless thing in the world

#

lol

violet basin
#

your IDE background would throw me off everytime i tried to look at it

violet basin
#

however

#

the colours are nice

#

ill give you that

random scaffold
violet basin
#

can you get the colours without the background

#

i like my background plain and boring SteamHappy

random scaffold
#

idk how

ionic prawn
#

those who know

unique crane
ionic prawn
#

bruh

unique crane
#

And there is some internal thing going on that slows it down a bit

ionic prawn
#

bruuhhhh

brisk matrix
#

How to disable 939's claw and lunge AoE damage

hearty shard
brisk matrix
#

I need raycast or smth?

hearty shard
#

ev.DamageHandler

#

check if its 938

#

939

#

I forgot how tbh

#

But i think it has its own damags handler

brisk matrix
#

ev.DamageHandler is 939DamageHandler?

#

Thanks!

slate flume
grand flower
#

Hello NW

#

new in 14.1.1

[log] NullReferenceException: Object reference not set to an instance of an object
[log] at MapGeneration.Decoration.EnvironmentalAlarm.OnDestroy () [0x00017] in <d9731e675e55453197cf28cd60eed3f2>:0
#

14.1.0, still active in 14.1.1

[log] ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds
[log] Parameter name: destinationArray
[log] at System.Array.Copy (System.Array sourceArray, System.Int32 sourceIndex, System.Array destinationArray, System.Int32 destinationIndex, System.Int32 length) [0x000cb] in <069d7b80a3914a08b6825aa362b07f5e>:0
[log] at System.Array.Copy (System.Array sourceArray, System.Array destinationArray, System.Int32 length) [0x0002c] in <069d7b80a3914a08b6825aa362b07f5e>:0
[log] at InventorySystem.Items.Autosync.AutosyncMessage..ctor (Mirror.NetworkWriter writer, InventorySystem.Items.ItemIdentifier itemId) [0x0004e] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Autosync.AutosyncWriterBase.Send () [0x00010] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Autosync.AutosyncWriterBase.Dispose () [0x00000] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Autosync.AutosyncItem.ServerSendTargetRpc (ReferenceHub receiver, System.Action`1[T] extraData) [0x00020] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Keycards.ChaosKeycardItem.ServerOnNewPlayerConnected (ReferenceHub hub) [0x00007] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Keycards.KeycardItem.<OnTemplateReloaded>b__46_0 (ReferenceHub hub) [0x00008] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at (wrapper delegate-invoke) System.Action`1[ReferenceHub].invoke_void_T(ReferenceHub)
[log] at ReferenceHub.Start () [0x00009] in <d9731e675e55453197cf28cd60eed3f2>:0
#

I'll open issues for those later once I'm done with work, but hey if you wanna snatch them now, hf

wheat flower
#

life would be much better if AudioMessage were this:

public uint[] SpeakerNetIds;
public byte[] Data;
public int DataLength;
#

having to make sure you dont create duplicate controllerids is fucking annoying as all hell

grand flower
#

It's not hard

#

@wheat flower

public static IEnumerable<int> GetOccupiedIdentifiers() => SpeakerToy.List
    .Select(s => s.IsDestroyed ? -1 : s.ControllerId);

public static byte? GetAvailableIdentifier()
{
    unchecked
    {
        var available = Enumerable.Range(byte.MinValue, byte.MaxValue)
            .Except(GetOccupiedIdentifiers());

        // ReSharper disable PossibleMultipleEnumeration
        if (available.Any())
        {
            return (byte?)available.First();
        }
        // ReSharper restore PossibleMultipleEnumeration

        return null;
    }
}
wheat flower
#

easily jebaited you for free code

grand flower
wheat flower
#

thanks for the inspiration

grand flower
#

It's just two LINQ snippets, hardly revolutionary

wheat flower
#

nah but fr

#

its just annoying having to do something like that

grand flower
#

fair, but it's cheaper on net traffic i suppose

#

somewhat

wheat flower
#

its barely anything compared to the actual audio data 💀

#

me when i have more than 255 places i potentially want to play audio

#

(not actually)

worthy rune
#

even then it might only double or tripple the networking if you have that many

grand flower
#

If you somehow reach that number, ask yourself, what are you doing

worthy rune
#

i mean i have seen that where people place one per room

grand flower
#

with separate audio tracks?

worthy rune
#

which i can understand, and the current system works nicely with

#

i mean for playing the same audio

grand flower
#

yeah

wheat flower
#

i get that it works well

#

but it just annoys me

#

id rather just send to a speaker directly

#

not have funky business

grand flower
wheat flower
#

even better, have a 2nd audio message that works that way

#

so there are more options

grand flower
#

@worthy rune You could just integrate that into the SpeakerToy wrapper

#

SpeakerToy.NextAvailableIdentifier

wheat flower
#

being forced to use controllerid kinda sucks

worthy rune
#

maybe

wheat flower
#

not that its bad, just annoying

worthy rune
#

like assign on contructor, or just a method to auto assign the id?

grand flower
#

Static method that gets the first available identifier it can find

grand flower
#

I could PR it ig

worthy rune
#

yeah you can do that if you want

#

i dont see any issues with it

grand flower
#

when's the LabApi repo going to be updated?

worthy rune
#

is it outdated?

grand flower
#

seems so

#

master and dev are both a month old

worthy rune
#

@harsh thorn

worthy rune
grand flower
#

sounds good

#

The reason it's a nullable btw is in case there's no free controller id

#

(somehow)

worthy rune
#

oh yeah thats true

#

could make a Try version too

#

so devs can log an error

grand flower
#

yeah I'll probably just go with that instead

#

cleaner

#

and I'll make Assign just throw if there's no free controller id

teal junco
#

ControllerID should be a ushort smh

upper vapor
teal junco
#

thatll teach em!

upper vapor
#

me when Int128ű

teal junco
upper vapor
teal junco
#

Holy shit

#

this is what ive been missing my whole life

#

anyways

#

i know one byte is more than enough 99.99% of the time

#

but Holy shit it feels so clausterphobic to me

#

like if i wanted to have multiple different sounds across the map and the unique environmental sounds somehow number more than 250 or so then everything gets fucked and I'll have to write a custom controller id management system. That isn't gonna happen but still.

soft turtle
#

How to spawn doors and GunLockers without MER?

upper vapor
#

find the prefab from NetworkClient.prefabs
spawn

soft turtle
upper vapor
#

NetworkClient.prefabs

#

also, use TryGetComponent for type safety

#

iterate through the dictionary's values

soft turtle
upper vapor
#

BreakableDoor or such

#

if you want a "regular door"

#

you still need the name check for which zone's door you want

soft turtle
upper vapor
#

yes

#

also, you should do this in the waitingforplayers event

upper vapor
#

spawning a door creates a waypoint which causes the server to lag

#

for seconds

soft turtle
upper vapor
#

how did you spawn it?

soft turtle
# upper vapor how did you spawn it?
            var doorPrefab = NetworkClient.prefabs.Where(x => x.Value.name.ToLower().Contains("door")).FirstOrDefault();
            if (doorPrefab.Value != null)
            {
                Log.Info(doorPrefab.Value.name);
                GameObject doorObj = Object.Instantiate(doorPrefab.Value, new Vector3(0f, 320f, 0f), Quaternion.Euler(0, 90, 0));
                doorObj.transform.localScale = new Vector3(10, 10, 10);
                NetworkServer.Spawn(doorObj);
            }
upper vapor
#

is the door prefab actually a door?

#

wait

#

yeah that's what you logged

soft turtle
upper vapor
soft turtle
heady turret
#

@unique crane how can i get player current item in third person position if it is possible?

unique crane
#

Im not sure I understand what you mean

heady turret
unique crane
#

Ah

#

Hmmm well if you do try get component in children on the player gameobject

#

For the firearm

#

It shoooould give you the firearm component

#

And then just .transform

icy knoll
#

How can I tell if a DamageHandler comes from passive damage like cardiac arrest or whatever 106s effect is?

upper vapor
icy knoll
hearty shard
#

doesnt 049 have its own damage handler

icy knoll
#

not via cardiac arrest

upper vapor
hearty shard
#

its all 3

upper vapor
hearty shard
#

and the damage handler gives it

#

so

icy knoll
#

okie time to use 049 dmg handler then

#

i forgot how to get translation from translation id blegh

upper vapor
#

DeathTranslations

icy knoll
#

thanks

#

and i also forgot what the effect name is for 106 passive dmg

#

😭

unique crane
#

Corroded

icy knoll
#

tyvm!

unique crane
#

or ing

#

idk

icy knoll
#

no death translation for corroded or corroding :c

hearty shard
#

this.Hub.playerStats.DealDamage((DamageHandlerBase) new ScpDamageHandler(this.AttackerHub, 2.1f, DeathTranslations.PocketDecay));

icy knoll
#

passive dmg

#

not pocket dmg

hearty shard
#

"corroding"

icy knoll
#

the dmg he does after first attack

upper vapor
#

oh

#

Scp106DamageHandler

icy knoll
upper vapor
#

no?

icy knoll
hearty shard
icy knoll
#

i cant see one, so im testing now

hearty shard
#

yea 106 doesnt have one

icy knoll
#

rip

hearty shard
#

it should

#

but it doesnt

icy knoll
#

now how am i gunna check if dmg is via corroding 😭

upper vapor
#

check the 106 attack subroutine

hearty shard
#

corroding no ?

icy knoll
#

ye

hearty shard
#

public override void OnTick()
{
if (!NetworkServer.active || this.AttackerHub == (ReferenceHub) null || Vitality.CheckPlayer(this.Hub))
return;
this.Hub.playerStats.DealDamage((DamageHandlerBase) new ScpDamageHandler(this.AttackerHub, 2.1f, DeathTranslations.PocketDecay));
if ((double) Corroding.StaminaDrainPercentage <= 0.0)
return;
this.Hub.playerStats.GetModule<StaminaStat>().CurValue -= Corroding.StaminaDrainPercentage * 0.01f;
}

#

😭

#

thats the damage for it

icy knoll
#

i need to know if a dmg handler is caused by corroding

hearty shard
#

ScpDamageHandler check for PocketDecay

icy knoll
#

and idk how to do that 😭

#

im not looking for pocket decay

#

bruh

hearty shard
#

THAT IS

#

R U

#

RAHHHHHH

upper vapor
#

106 direct attack

#

eve

hearty shard
#

Ok

#

so

icy knoll
#

yeah

upper vapor
#

first hit

hearty shard
#

then use AttackerDamageHandler

#

.Attacker

icy knoll
#

and do what with it 😭

hearty shard
#

if lumi wants the passive damage thats done when hit (Corroding)
Then they check ScpDamageHandler for PocketDecay

icy knoll
#

pocket decay and corroding are the same?

hearty shard
#

If you want to check for pocket dimension kill then its UniversalDamageHandler with PocketDecay

upper vapor
#

no

hearty shard
#

well

#

same translation id

#

but different damage handlers

icy knoll
#

why are they named the same thing yet do different things 😭

hearty shard
#

because

#

its just

#

meant to be used for

#

translations

#

on client

upper vapor
#

scpdamagehandler pocketdecay

#

and check if the effect is disabled

#

so eve you were almost there

hearty shard
#

oh yeah

icy knoll
#

how 😭

hearty shard
#

i forgot to say that

upper vapor
#

get effect

#

check if enabled

icy knoll
#

me when ScpDamageHandler doesn't have effects

upper vapor
#

player

hearty shard
#

player

upper vapor
#

the player being hurt

hearty shard
#

yea

#

honestly

#

@unique crane heyyy

#

awesome guyyy

icy knoll
#

damage handler doesn't have player husk

hearty shard
#

can you rework 106 damage handler to be its own

hearty shard
#

where tf r u checking for damage handler

#

r u storing it?

upper vapor
#

bru

icy knoll
#

yes

#

im storing it

#

damage logs

upper vapor
#

then store the player too

hearty shard
#

then store a dictionary!!!!!!

icy knoll
upper vapor
#

then have some sort of record

hearty shard
#

store what was happening

upper vapor
#

do you have structured logs?
or is it just string

hearty shard
#

and then send the stored logs

#

me when

#

public struct DamageData
{
}

upper vapor
#

me when record struct

#

also if you're storing it then structs are probably worse

#

you could have a hierarchy with classes/records for different damage scenarios

icy knoll
#

ive just done the player checks using the Hurt event now

#

lol

upper vapor
#

how do you log

icy knoll
#

i have to queue the logs

#

because rate limit

upper vapor
#

so you send strings?

icy knoll
#

embed

hearty shard
#

then store the embeds Fear

worthy rune
upper vapor
#

yea

hearty shard
#

pls

upper vapor
hearty shard
#

thanks

icy knoll
worthy rune
#

i know

icy knoll
#

but actually thinking about it, it's probably better to save the entry...

worthy rune
#

just explaining why it doesnt contain the player by default

icy knoll
#

shud upppp ax!!!

icy knoll
#

does anyone see an issue with this code? sometimes the id isn't remove from the list 😭

upper vapor
#

exception in action?

icy knoll
#

i dont think so but good shout, ill add a try catch

upper vapor
#

put the removeid call first shrug

icy knoll
#

yeah actually

hearty shard
#

errrrr

icy knoll
#

til about List<T>.Aggregate()

#

useful method

upper vapor
#

have you tried

#

string.Join

icy knoll
#

i should use that tho

#

ty

upper vapor
#

then try it :3

icy knoll
#

that looks much better

harsh thorn
icy wraith
#

How do you use animated hints ?

icy wraith
#

Thanks. 👌

grave eagle
#

animated hints??? wow

hearty shard
#

Surely id never

languid temple
#

liar

hearty shard
#

Ok maybe i did

solid mica
#

can any viewmodels be disabled?

random scaffold
#

someone who have -1 iq

#

It makes sense to make asynchronous modules if it uses a delay when enabled anyway?

upper vapor
upper vapor
upper vapor
#

this doesn't make much sense

solid mica
random scaffold
random scaffold
upper vapor
#

you're blocking anyway

upper vapor
random scaffold
#

does it even make sense to make asynchronous modules?

random scaffold
#

planned make other system for enable separately module from game

upper vapor
upper vapor
#

i assume you don't need each module to wait for the other to load

upper vapor
#

depends on your use case

random scaffold
#

what might it be needed for?

#

@upper vapor

#

I want to know that I didn't waste 6 hours in vain

#

...

upper vapor
upper vapor
# random scaffold example?

in ASP.NET Core for example, we have background services that are long-running
i haven't worked with modules that can be enabled or disabled spontaneously

#

for example, a server status updater

#

something that does some work every x seconds

#

very basic but that's what i could say off the top of my head

unique crane
upper vapor
#

for fun :3

#

i do that too

#

"minor refactorings"

random scaffold
random scaffold
upper vapor
#

the backlog fills up toomuchtrolling

random scaffold
#

which do one thing

#

each times i rewrite from scratch

#

because something wrong

#

-_-

upper vapor
#

how about you refactor a little bit instead of rewriting the whole thing

random scaffold
upper vapor
#

The point of refactoring is to make code cleaner

icy knoll
solid mica
#

can the invisibility effect overlay be removed?

hearty shard
#

make them invisible a different way

#

(scale 0, or by making them invisible by sending their position as something else)

solid mica
#

mmmmmHmmNoted

true cedar
#

you can try not telling the client its invisible

hearty shard
#

oh

true cedar
#

by desyncing the effect sync list

hearty shard
#

Fake sync the effect Fear

true cedar
#

yea

icy knoll
#

what are you trying to do even? just explain it

random scaffold
#

modules system

icy knoll
#

that's not an explanation

random scaffold
#

each module is a micro plugin

#

auto broadcast, xp rewards and something

#

all it separately module

upper vapor
#

why do you need asynchrony for that?

random scaffold
#

idk

#

...

upper vapor
#

separate customeventshandler per module
conditionally enable them

#

boom

random scaffold
#

but also will be module for works with sqlite

upper vapor
#

so if you reuse a connection, it'll still work, right?

random scaffold
#

sqlite it sqlite

#

it just open file

#

and save file

upper vapor
#

oh sqlite

#

then why have enable and disable for those...

random scaffold
#

mods

#

fastest game

#

random item

#

and soemthing

upper vapor
#

yeah but what async thing are you doing in those methods

#

plus if you're blocking anyway, you might as well make them sync

random scaffold
#

and save file

upper vapor
#

on enable/disable??

random scaffold
#

open on enable

#

save each round

upper vapor
#

again, you enable the modules and wait, you don't let the server start until your modules are loaded

#

no need for tasks here

random scaffold
#

but if i need async task / thing in module

#

how realize it?

upper vapor
#

you're waiting for the modules to set up before starting the server

#

you don't make it async

random scaffold
#

but if will be any processing each 2-5 seconds

upper vapor
#

if you don't wanna rewrite it, just wait for the enableall task

random scaffold
upper vapor
#

...

#

git

#

revert

random scaffold
#

it dont have git

upper vapor
random scaffold
#

im dont wanna redoing the code

#

starting from scratch is easier

upper vapor
#

visual studio users...

upper vapor
random scaffold
#

why need to support a plugin at all if I can make a new one?

upper vapor
#

if you rewrite your codebase every month then maybe the issue lies elsewhere

upper vapor
#

we don't have hot reload in SL, we have to wait to restart the server every time we want to test
imagine how much better it would be if the single line you changed in the code reflected immediately
blazor, vue etc. have hot reload and the experience is much better not having to hit build and restart
metaphor for rewriting the codebase
change the relevant things if possible instead of dumping everything and deleting it forever

#

you might even learn more by refactoring instead of rewriting
sure, rewriting when you know all the requirements is nice
but often it's not worth it, whether that's because the change is not significant, or because you don't actually know the requirements

plain gazelle
#

I want to temporarily 'store' items/pickups to be used later.
So delete them from the world as pickups, or from player inventoriers as items.
But if they are weapons, they carry information like ammo and attachments, so i cant just save their itemtype and create a replica later.

Does anyone have any idea how i could "despawn" a pickup and spawn it in again later?
(I could make an Item in an inventory a Pickup by forcing it to be dropped)

upper vapor
#

You'd have to create snapshots of each item or pickup and re-apply that

#

Some firearm module data are stored based on serials, you don't have to save that (I think)

unique crane
upper vapor
#

I tried and failed despair

unique crane
#

Calling your method to unscribe and clean up stuff

#

And then load the assembly under a different name

#

like with guid postfix

#

But it wont work on everything

upper vapor
unique crane
#

like static classes

unique crane
#

like events

#

why not

upper vapor
#

I tried harmony patching

unique crane
#

You cant unfortunely unload assemblies

#

from the domain

upper vapor
#

I didn't unload them
I loaded a new domain and tried to get the IL from there

unique crane
#

hmm

upper vapor
#

It was the same IL CFbruh

unique crane
#

Eh

#

Guess its something we can look at in future

#

but now

#

role set fix

upper vapor
# unique crane why not

I guess for debug I can add a guid to the assembly name
But the csproj or props file will look ugly

upper vapor
unique crane
#

Apparently you can just change the assembly name

#

No need for csproj changes

upper vapor
#

At runtime?

unique crane
#

No like

#

Get the new dll

#

change its name

upper vapor
#

Omg...

#

That's

#

Smart

#

But weird

unique crane
#

Apparently

#

I havent tried it

#

But well

#

Easiest solution would be to move to a scripting language trolling

#

Since you can fully control these

#

and just destroy the virtual environment and load it again

royal mica
#

LUALabApi xdx

#

LabAPI but LUA

unique crane
#

And I want to get it to labapi

#

soon

royal mica
#

Is it a Plugin you can drop in and start a scripting engine?

unique crane
#

Yep

#

and load .lua files

royal mica
#

daamn

unique crane
#

or run lua in RA

#

I still wouldnt do full on plugins with it

#

Its just for like

#

"Haha funny event script"

random scaffold
#

where lua

upper vapor
plain gazelle
#

Does Player.UserId return just the steamid or does it also have that @steam in it?

upper vapor
#

It includes the auth type like steam or discord or Northwood

random scaffold
#

with @northwood you can immediately ban them

#

but the server will lose verification

plain gazelle
#

sir yes sir

random scaffold
#

bit with discord im guesss you too can ban

plain gazelle
#

So if its somehow discord or northwood, i cant get their SteamID?

random scaffold
#

only the owner decides who is allowed on the server

random scaffold
#

you can play in scp sl by discord

plain gazelle
#

lol

random scaffold
#

and your steam will not be linked to the session

plain gazelle
#

Alr, hopefully a non-issue for me since neither NW or discord players would have access to my command anyway clueless

soft turtle
#

How to spawn LargeGunLockerStructure?

upper vapor
#

before spawning it

soft turtle
upper vapor
#

get the StructurePositionSync component and start it

soft turtle
random scaffold
upper vapor
#

should be on the root

#

so

#

just TryGetComponent

#

or GetComponent

soft turtle
#

Thx

upper vapor
random scaffold
#

when wrapper for lockers

upper vapor
#

they already exist

random scaffold
upper vapor
#

just no spawn method

random scaffold
upper vapor
#

Locker

#

LargeGunLocker

random scaffold
#

then

upper vapor
#

well

#

PR it toomuchtrolling

random scaffold
#

pull nw easier

random scaffold
upper vapor
random scaffold
#

serverhost-suggestions

#

./host

upper vapor
#

still no access 😭

#

i don't have a public server

random scaffold
#

it works without verkey

#

im guess

languid temple
#

just ask them

upper vapor
#

too much effort

#

not worth it

random scaffold
#

@soft turtle why no if you wanna spawn it

languid temple
#

I mean if you have access to the VPS you can also run !hostrole

random scaffold
#

lol

languid temple
#

and just use polaris

upper vapor
#

my friending

#

i don'd need it

languid temple
#

okie

upper vapor
#

thanks though

soft turtle
upper vapor
#

enable unsafe code in your project settings

#

remember this when you create a new project, i've fallen for this many times 😭

soft turtle
random scaffold
random scaffold
upper vapor
random scaffold
upper vapor
random scaffold
#

stupid unity

soft turtle
upper vapor
upper vapor
random scaffold
#

because its not async

upper vapor
#

why would it be async

#

the engine is single-threaded

#

what?????

random scaffold
upper vapor
#

yeah

#

not unity

#

are you mad about the naming convention or what?
i don't understand the complaint

random scaffold
#

so stupid unity

random scaffold
#

and processing fucking cancellation token

upper vapor
#

_ = AsyncMethod()

#

Riptide has explained this before

#

task.run doesn't necessarily put you on another thread

random scaffold
upper vapor
#

also you should use awaitables now

upper vapor
random scaffold
#

a _ = not

upper vapor
#

chance 😭

random scaffold
#

yes

upper vapor
#

you randomly make requests on the main thread and separate threads?

#

maybe it's okay in startup

#

but in events you're cooked

#

we've had this conversation before

random scaffold
#

when will quantum computers be available in every home

#

then you won't have to think about fucking asynchronously

upper vapor
#

you will have many more problems with quantum computers

random scaffold
#

and AI Lang

#
do fucking thing while you printing fucking numbers from 0 to 10
upper vapor
#

also, good luck getting your program to run on a quantum computer

random scaffold
#

im guess

#

but in 100 years

upper vapor
#

(luckily) i won't be around by that time

random scaffold
#

If World War III doesn't start

#

lol

upper vapor
#

honestly i don't even know if i care about that xd

random scaffold
upper vapor
#

ok and

#

i'll just combust

random scaffold
#

🤖

upper vapor
#

OH

#

you mean

#

-# i'm not gonna send a furry meme but

#

one day i'll be a protogen and you can't do NOTHING to stop me blehhh

#

and i'll be able to Microsoft Excel

soft turtle
random scaffold
soft turtle
upper vapor
#

Set its loot to an empty array

soft turtle
upper vapor
upper vapor
#

Np

hearty shard
#

i like how it checks round started & locked twice

icy knoll
#

ev.IsAllowed doesn't override whether the person is allowed to open a generator using PlayingUnlockingGeneratorEventArgs, what is the solution to this as CanOpen doesn't exist?

#

actually ig i could just do ev.Generator.IsUnlocked = ...

grand flower
#

You can just stop them from activating the generator

hearty shard
#

its locked

#

and they want to change its unlock requirements

#

(eg remote keycard)

icy knoll
#

yeah

#

CanOpen exists for lockers and doors

#

but not generator

#

so i now have to just set IsUnlocked for the generator instead as IsAllowed doesn't change anything

grand flower
#

Ah

#

Just patch it in for now I guess

#

Make your own custom event

icy knoll
#

nah

#

setting Generator.IsUnlocked works fine for the event lol

random scaffold
#

line indent changes the position relative to the center of the text, but the text can change and because of this, the position also changes, what should I do to start from a certain position?

#

someone know?

plain gazelle
#

Is it possible to access the chambers of a revolver individually? Like a way to set their ChamberState manually?

icy knoll
#

then you can modify that stuff ig

plain gazelle
restive turret
#

@icy knoll ReadOnlySpan doesnt exists in normal net48

icy knoll
#

i know

#

the getter converts the array into a ReadOnlySpan

#

lol

#

just get the getter code

#

CylinderAmmoModule.GetChambersArrayForSerial(revolver.ItemSerial, revolver._cylinderModule.AmmoMax)

restive turret
#

ah ye just GetChambersArrayForSerial(base.ItemSerial, ammoMax)

icy knoll
#

that's the getter code

restive turret
#

reference deez

icy knoll
#

reference the air around us

plain gazelle
#

Hmmm, whats the difference between Chamber.ContextState and .PredictedState firT

icy knoll
#

one ig is what it actually is and the other is what the game predicts

#

?

#

idk

plain gazelle
#

Seems like ContextState also reads/writes to PredictedState if the NetworkServer isnt active. And if it is, it reads/writes to a "ServerSyncState", so i should probably use ContextState

#

or ill just use ServerSyncState directly

#

So basically i want to make my own custom reload method for ... reasons
For this i would love a way to play the reloading animation out, but prevent any actual loading of bullets. Not just instantly unload the gun and refund the ammo. No ammo transfer should happen at all.
And would it be possible to allow the reloading process of the revolver to start, even if no valid ammo is in the inventory?

unique crane
#

before sending cmd

plain gazelle
#

bummer

#

but thank you

plain gazelle
# unique crane I believe there is client side check too

hm, do you think it would be possible to set the AmmoType to the Revolver item? Could the game try to load the gun itself into the gun?
And then in the reloading event change the ammotype to something impossible, so nothing would be reloaded?

unique crane
#

You can set that on server

#

but client will still require the normal ammo

#

type

plain gazelle
#

Ohh

#

bummer

icy knoll
#

Is there any method to get a random point of which a person may get teleported to when they escape pocket dimension?

hearty shard
#

oh wait

#

Scp106PocketExitFinder.GetBestExitPosition

#

however

#

otherwise GetPosesForZone

icy knoll
#

but if GetPosesForZone works then cool

hearty shard
#

idk Fear

icy knoll
#

is there like a footprint or smth that dictates which zone the person even came from or nah?

icy knoll
#

ah ye mb

hearty shard
#

im going to stab u

icy knoll
#

nooooo

hearty shard
#

TryGetRoomAtPosition

#

GetRoomAtPosition

icy knoll
#

OH

#

right

#

ok

#

exiled has a property in Player called Side where it gets what side a player is on, what is the labapi equivilent? i looked for faction and i dont see it on player

grand flower
icy knoll
hearty shard
#

Copypasting exiled smh

icy knoll
#

i did not 😭

#

sure the idea comes from exiled

#

but i did this properly 😭

hearty shard
#

anyway

#

What does this add

#

Other than just

#

Faction 2.0

icy knoll
#

me when labapi doesnt have faction on player

hearty shard
#

and its easier to make a new enum?

icy knoll
#

it just makes it so if people wanna check if friendly fire is possible or not really, that's the point ig

hearty shard
#

feel like faction is basegame

hearty shard
#

I am genuinely curious

icy knoll
#

idk, never used it

hearty shard
icy knoll
#

omg my allergies are killing me wtf

hearty shard
#

Im checking exiled

#

nvm exiled has no docs for that

hearty shard
#

Get good..

#

[0] = SCP
[1] = FoundationStaff
[2] = FoundationEnemy
[3] = Unclassified
[4] = Flamingos

icy knoll
#

yeah ill just use that then

#

is there a method to get faction or will i have to do similar stuff?

flat vine
hearty shard
#

Idk

#

damn

flat vine
icy knoll
#

ah ye

#

ofc

#

done

#

that's much better lol

#

and changed pr

grand flower
#

@worthy rune sorry for the ping, but I have a question about a potentially important bug I just found: is ServerPickupCreated not supposed to be called when a player drops an item?

#

I get ServerPickupDestroyed when I pick it back up, but not created

worthy rune
#

hmmm i would of thought it would be called

#

i can take a look now if you want

grand flower
#

That would be much appreciated thank you

#

Just realised our optimization stuff is just half broken, items never get cleaned up -_-

#

or well, items dropped by players

worthy rune
#

ooh, yeah i looked at this along time ago. The AddPickup method should look like this instead

if (!Dictionary.TryGetValue(pickup, out Pickup wrapper))
    wrapper = CreateItemWrapper(pickup);

ServerEvents.OnPickupCreated(new PickupCreatedEventArgs(wrapper));
grand flower
#

Lemme patch that in and try

worthy rune
#

there is an internal PR for it, so the fix will come eventually

#

the reason the old method failed was because something likely an event was getting the wrapper with Pickup.Get before the AddPickup method was called

#

and the old method didnt account for that

grand flower
#

ahhhh

#

i see

#

Yep it works, thank you!

#

That just solved a lot of migraines we were having

covert flame
#

I don't know if I'm stupid or something but where is the new labapi?

teal junco
covert flame
#

That's what I though, so how come the labapi that I grab from the files is the exact same?

worthy rune
#

are you comparing the sizes? or using a tool todo a diff.

covert flame
#

I am loading it into my project as a reference and it is the same O.o

worthy rune
#

there was some updates from 14.1 to 14.1.1 but they were small additions so didnt increase the size(i think dlls are padded alittle so sometimes small changes dont increase the size of the dll)

#

you can tell if its the new one if theres a Player.Size property

covert flame
#

Yeah there is no Player.Size property

worthy rune
#

if you startup your dedicated server and type version does it print out 14.1.1

covert flame
#

It does not :/

#

".\steamcmd.exe" +login anonymous +force_install_dir ".\Local Admin Server" +app_update 996560 +quit Should this not update it?

worthy rune
#

i think you need to throw in a validate somewhere

#

i dont really use steamcmd tho

covert flame
#

".\steamcmd.exe" +login anonymous +force_install_dir ".\Local Admin Server" +app_update 996560 validate +quit
You were most certainly right

#

so wise

summer mural
#

what is the alternative to this nwapi method in labapi?

grand flower
#
Disconnecting connId=0 to prevent exploits from an Exception in MessageHandler: NullReferenceException Object reference not set to an instance of an object.
  at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00000] in <00000000000000000000000000000000>:0 
  at InventorySystem.Items.Firearms.Attachments.AttachmentGameObjectGroup.SetActive (System.Boolean state) [0x00000] in <00000000000000000000000000000000>:0 
  at InventorySystem.Items.Firearms.AnimatedFirearmViewmodel.UpdateAttachments (InventorySystem.Items.Firearms.Firearm fa) [0x00000] in <00000000000000000000000000000000>:0 
  at InventorySystem.Items.Firearms.Attachments.AttachmentsUtils.ApplyAttachmentsCode (InventorySystem.Items.Firearms.Firearm firearm, System.UInt32 code, System.Boolean reValidate) [0x00000] in <00000000000000000000000000000000>:0 
  at InventorySystem.Items.Autosync.ModularAutosyncItem.OnAdded (InventorySystem.Items.Pickups.ItemPickupBase pickup) [0x00000] in <00000000000000000000000000000000>:0 
  at InventorySystem.Inventory.UserCode_TargetRefreshItems__ItemIdentifier[] (InventorySystem.Items.ItemIdentifier[] ids) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.NetworkIdentity.HandleRemoteCall (System.Byte componentIndex, System.UInt16 functionHash, Mirror.RemoteCalls.RemoteCallType remoteCallType, Mirror.NetworkReader reader, Mirror.NetworkConnectionToClient senderConnection) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.NetworkClient.OnRPCMessage (Mirror.RpcMessage message) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.NetworkClient+<>c__DisplayClass54_0`1[T].<RegisterHandler>g__HandlerWrapped|0 (Mirror.NetworkConnection _, T value) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.NetworkMessages+<>c__DisplayClass9_0`2[T,C].<WrapHandler>g__Wrapped|0 (C conn, T msg, System.Int32 _) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.NetworkMessages+<>c__DisplayClass8_0`2[T,C].<WrapHandler>b__0 (Mirror.NetworkConnection conn, Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.NetworkClient.UnpackAndInvoke (Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.NetworkClient.OnTransportData (System.ArraySegment`1[T] data, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0 
  at Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorClient.OnNetworkReceive (LiteNetLib.NetPeer peer, LiteNetLib.NetPacketReader reader, System.Byte channel, LiteNetLib.DeliveryMethod deliverymethod) [0x00000] in <00000000000000000000000000000000>:0 
  at LiteNetLib.NetManager.ProcessEvent (LiteNetLib.NetEvent evt) [0x00000] in <00000000000000000000000000000000>:0 
  at LiteNetLib.NetManager.PollEvents () [0x00000] in <00000000000000000000000000000000>:0 

clientside

#

picking up an item with an invalid attachment or something?

grand flower
summer mural
#

thanks

worthy rune
#

connId=0 means it was the host, which is strange as the exception seems to be one from adding an item. do you mess with the host at all anywhere

grand flower
#

I'm guessing connId=0 is always the local client

worthy rune
#

yeah

grand flower
#

On the server's side of things we made it impossible to disconnect the host

#

got tired of it

worthy rune
#

fair

#

does this happen on round restarts

grand flower
#

switched my role to mtf captain, dropped the captain gun, tried to pick it back up

#

doesn't always happen, seems pretty rare

#

actualy think it might be the first time it's happened to me

worthy rune
#

oh thats interesting

grand flower
#

I could see it dropped, but right after picking it up I get soft disconnected

worthy rune
#

you should be able to report this one the normal way (dont quote me on that)

grand flower
#

will do

#

also gonna suggest SCP-127 events

#

for like, preventing exp gain and all

#

made my own and it's useful

#

How early can I spawn camera toys?

#

Is OnServerMapGenerated() ok?

static osprey
grand flower
#

Does LabApi provide any tools to make placing them in the world easy or nah

worthy rune
#

i think thats too early, 1 frame after waiting for players is where i end up doing it

#

^ for all admin toys that is

carmine prawn
grand flower
#

sounds good

grand flower
#

and like, yeah setting the role multiple times a frame kinda breaks stuff

#

that maybe they could fix

#

would be nice

#

i'd just expect a "you're doing funky things, won't happen in base game" response

upper vapor
#

Not too early, not too late

grand flower
#

noted

upper vapor
#

I hate it when schematics are spawned on

#

Round start

grand flower
#

this time on an actual server

#

gonna try to repro it

#

but so far it seems to be "drop a gun, pick it up too fast"

#

YUP

#

exactly that

covert flame
worthy rune
#

could be just a steam moment, sometimes it wont update for whatever reason

grand flower
#

it's actually pretty elaborate

#
  • You must spawn, or have your role set as, SCP-079.
    OR

  • You must be dead, and spectate a player that is SCP-079.

    • SCP-079 must then be your current spectated player as you spawn.
    • Spectating a human class after spectating SCP-079, before spawning in, prevents the bug from happening.
  • You must then respawn as a human class with a gun, without spectating a human player in between.

  • If you equip the gun before dropping it (doesn't matter if you unequip it, you just gotta equip it first), it doesn't happen.

  • If, after spawning, you drop the gun from your inventory (without equipping it first), and then attempt to pick it up, you get soft disconnected

  • Once you get soft disconnected, the bug does not happen again if you reconnect and try to cause it.

  • Round restart allows it to happen again, as well as a server restart.

  • Restarting the game, and reconnecting, does not allow it to happen again.

#

Like

#

what the fuck

#

trying to see if round restart allows it to happen again

#

yep

worthy rune
#

could you also try restarting your game aswell