#plugins-dev-chat

1 messages ยท Page 49 of 1

hearty shard
#

๐Ÿ˜ญ

restive turret
#

Extend deez

#

Nice so where impl

#

I will totally not steal it

grand flower
#

Or a bulkhead door that can close and kill the player

hearty shard
#

๐Ÿ’”

grand flower
#

Had to do it for our server

#

An extensive list of things that prevents reviving other players

restive turret
#

Also add that player must not be in the room too

grand flower
#

Because they'd just revive them to instantly kill them via environment

grand flower
restive turret
#

You won't end up like me

#

.

hearty shard
#

thats lowk a u issue trolling

grand flower
#

Ah that

#

Heh

#

Yeah

restive turret
#

Like it could have put me anywhere

#

And choose next to scp

hearty shard
#

well yeah

#

it puts u near where you got captured

#
 public static Vector3 GetBestExitPosition(IFpcRole role)
    {
      if (!NetworkServer.active)
        throw new InvalidOperationException("Scp106PocketExitFinder.GetBestExitPosition is a server-side only method!");
      ReferenceHub hub;
      if (!(role is PlayerRoleBase playerRoleBase) || !playerRoleBase.TryGetOwner(out hub))
        throw new InvalidOperationException("Scp106PocketExitFinder.GetBestExitPosition provided with non-compatible role!");
      Vector3 position = hub.playerEffectsController.GetEffect<PocketCorroding>().CapturePosition.Position;
      RoomIdentifier room;
      if (!position.TryGetRoom(out room))
        return position;
      Pose[] posesForZone = Scp106PocketExitFinder.GetPosesForZone(room.Zone);
      return posesForZone.Length != 0 ? SafeLocationFinder.GetSafePositionForPose(Scp106PocketExitFinder.GetRandomPose(posesForZone), room.Zone == FacilityZone.Surface ? 45f : 11f, role.FpcModule.CharController) : position;
    }
restive turret
#

Oh ye

#

If u got captured in elev you still gonna be in elev

#

๐Ÿ’”

hearty shard
#

if it doesnt find safe spot it throws u back where u came from

restive turret
#

Just aaaaaaaaaaaaaaaaaaaaaaaaaa

hearty shard
#

lis ten

#

dont

#

get captured in an elevator

#

and u wont show up back in the elevator!

mild ice
#

Or at all....

hearty shard
#

that also helps

restive turret
#

That was mean!!

hearty shard
#

@unique crane what is bro testing

unique crane
#

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

hearty shard
#

transport layer security

restive turret
#

Download client

#

And see

#

Decompol

hearty shard
#

you do that

restive turret
#

I'm at work

#

U should do it

hearty shard
#

its prob just auto security updates

#

lol

unique crane
#

Oh you know what it might be

hearty shard
#

you tell me

restive turret
#

Fix for many gamebugs???

unique crane
#

russia apparently blocks some security protocols or whatever

restive turret
#

TLS1.2

unique crane
#

Well no one from russia and shit couldnt play or whatever

upper vapor
unique crane
#

But they do make not small part of the player base

restive turret
#

As in MITM

upper vapor
#

๐Ÿ˜ญ

restive turret
#

RINM Fear

upper vapor
#

i was about to say that lol

harsh thorn
# hearty shard <@282125275930820608> what is bro testing

certain providers blocked tls 1.3 (and ECH, but i guess some resorted to blocking 1.3)
so this build it will try using tls1.2 with a special arg so russians are able to play the game
although some providers just outright block cloudflare ips, so not much we can do about that one

icy knoll
#

how do people put their plugins inside of buildinfo, im surprised labapi doesnt automatically do it

upper vapor
#

what's buildinfo?

icy knoll
upper vapor
#

ohhhh

#

patch

restive turret
#

Deez

upper vapor
#

exiled is real smart about this

#

go get inspired

icy knoll
#

raaaaaaah

restive turret
#

Add your own mod description

icy knoll
#

gotta find which thing triggers this tho because Exiled.Loader.dll doesnt have access to harmony :3

restive turret
#

Fart : Poop

upper vapor
restive turret
#

@icy knoll it is exiled loader

#
BuildInfoCommand.ModDescription = string.Join(
                "\n",
                AppDomain.CurrentDomain.GetAssemblies()
                    .Where(a => a.FullName.StartsWith("Exiled.", StringComparison.OrdinalIgnoreCase))
                    .Select(a => $"{a.GetName().Name} - Version {a.GetName().Version.ToString(3)}"));

icy knoll
#

how bruh, it doesnt have access to harmony tho ๐Ÿ˜ญ

restive turret
#

BuildInfoCommand

upper vapor
#

you don't need harmony for that

restive turret
#

CommandSystem.Commands.Shared.BuildInfoCommand.ModDescription

icy knoll
#

me when you said patch ax smh

upper vapor
#

cuz i'm stupid

restive turret
#

Hi stupid, I'm SlejmUr

icy knoll
#

also, is there any way to log smth to LocalAdminLogs but not the LA console?

upper vapor
#

ServerConsole.AddLog

#

i think

icy knoll
#

you can set a colour with that

#

so i think it's probably not

plain gazelle
#

When i set a TextToy's Base.NetworkScale to something, it instantly goes back to Scale 1 :c

royal mica
#

cause that is not logged, but is in LocalAdminLog

#

wait wrong error

hearty shard
#

oh

restive turret
plain gazelle
# hearty shard why not just

Problem is, i somewhat kinda need the NetworkScale, because i am using @restive turret's SetFakeSyncVar to change the scale of the TextToy per-person

hearty shard
hearty shard
restive turret
hearty shard
hearty shard
#

well

#

yes

#

but it edits

#

transform scale

#

which updates the network scale

#

to transform scale

restive turret
#

Ah fuck

#

Ye

#

It goes back after faking it

#

Cinema

hearty shard
#

yeah cuz

restive turret
#

Well ye you need to patch it

hearty shard
#

resync

#

!!!

restive turret
#

Resync deez

#

Well yeah thats fucked up

plain gazelle
#

I suppose it wouldnt be possible to fake the TextFormat content, since that is not part of the .Base class?

hearty shard
restive turret
#

I think you can but dont remember the TextToy's properties

hearty shard
#

looks like it is

restive turret
#

A ye then Network_textFormat

#

So ye possible to FakeSync the text format

plain gazelle
#

maybe faking it to be empty would work instead of scale 0

#

will try firMine

restive turret
#

Have fun

upper vapor
#

then it won't sync unnecessarily

plain gazelle
#

Its position needs to update

upper vapor
#

is it parented to something?

plain gazelle
#

ye

upper vapor
#

then you can make it static as it moves with the player anway

plain gazelle
#

:O

#

Thank you ^^

upper vapor
#

np

restive turret
#

Me when my parents are now static

upper vapor
#

๐Ÿ˜ญ๐Ÿ˜ญ๐Ÿ˜ญ

plain gazelle
#

But yeah, before i throw this code out, just wanted to show off this issue

#

:x

restive turret
#

Ye bc when the game update happens it resync the scale, position, rotation

#

Basically just nullifying what u done

hearty shard
#

ur first call delayed is on the Update() and iirc it updates pos and stuff in FixedUpdate()

celest thorn
#

yo i have a stupid idea

#

if i attach a player to a primitive

#

that spins

#

will the player move with the spinner and actually be able to stand like on top of it and still move?

grand flower
#

You'll make them puke

#

Probably

slender lynx
#

i already do that

grand flower
#

(don't think so)

upper vapor
plain gazelle
#

Clearly just Player.GameObject.transform.SetParent() smh

celest thorn
#

attached

upper vapor
#

@unique crane position delta and rotation delta messages when :3
rotation used to be additive but since 14.0(?) they just override

slender lynx
slender lynx
#

this is how it works now

unique crane
#

Player has Rotate method no?

upper vapor
#

yeah but

celest thorn
#

yes

upper vapor
#

flickering

#

with a delta message the player could still move (both position and camera) while the server pushes them

unique crane
#

Maybe later

#

I would like to see pending PRs be merged first

upper vapor
slender lynx
#

honestly its better to give the player a seizure

#

they dont need the rotation help

plain gazelle
upper vapor
#

but no smooth animations

slate flume
#

Imagine the lagback ๐Ÿ˜ญ

#

Rubberbanding goes crazy

upper vapor
slender lynx
slate flume
slender lynx
#

desync happens when movement is greater than 2m/tick

slate flume
#

Share please ๐Ÿ™๐Ÿผ

plain gazelle
slender lynx
#

all our stuff is client side

upper vapor
slate flume
#

Oh why

upper vapor
#

or, at least, should be

slate flume
#

I've been looking for a cure for rubberbanding

slender lynx
slate flume
#

15000 primitives is crazy

slender lynx
#

thats not even the best part

upper vapor
plain gazelle
slender lynx
slate flume
#

DAMN

#

So you did client-side shit to prevent rubber banding?

slender lynx
#

peak debug menu

slender lynx
#

i LOVE having to fix mirror

restive turret
#

Because mirror doesn't made for that

#

Guuuh

upper vapor
slender lynx
#

im just tryna optimize everything the best we can

#

my fps is >100 until like 100k primitives

#

at around 500k its 60

slate flume
plain gazelle
hearty shard
#

which means

slate flume
#

Oh I see

hearty shard
#

more performance!!

restive turret
#

Yipppeee

plain gazelle
restive turret
#

1

upper vapor
slate flume
#

I've been complaining about the rubber-banding in this game for so long

#

I would love to do a fix like that but sadly I'm avoiding client-side patches

slender lynx
#

but the client only shows the one they're supposed to be in

restive turret
#

I should really add that performance stuff into my stuffSteamHappy

slender lynx
#

same with colliders

slate flume
#

That's smart

#

I do similar stuff for some things in my plugin

restive turret
#

I don't ๐Ÿ”ฅ

slate flume
#

Just some colliders and lights I only want admins to see

#

Not for performance

slate flume
#

I don't have a lot of colliders in the server

slender lynx
#

im gonna warn you right now

#

be VERY CAREFUL

#

messing with client side stuff has some wierd side effects

#

think my biggest log file was almost 200gb

#

@celest thorn can attest to that Trolley

celest thorn
#

thats the magic of them

#

they could spawn

slate flume
celest thorn
#

or not

slate flume
#

I spawn some colliders

#

Just not a lot

slender lynx
#

honestly even now

#

but it dosent spam logs

#

so its fine

celest thorn
slender lynx
#

"normal" by our standards

celest thorn
upper vapor
#

just make the scale positive

slate flume
#

^

slender lynx
celest thorn
slender lynx
#

nor do i care enough

celest thorn
#

scale is positive

upper vapor
#

Mathf.Abs all coords for scale

slate flume
slender lynx
#

yeah thats like

upper vapor
slender lynx
#

actually a good point

slate flume
upper vapor
celest thorn
upper vapor
#

you wanted to flip some things?

celest thorn
slender lynx
celest thorn
#

honestly

slender lynx
#

im lazy

#

and i just do

#

transform the other way

#

ususally gives a negative

upper vapor
#

๐Ÿ˜ญ

celest thorn
#

ok so math.abs fixes it trollfancy

plain gazelle
slender lynx
#

plus would break a ton of the jumps

upper vapor
celest thorn
slender lynx
#

i mean in the editor

#

@celest thorn go do

#

thx

celest thorn
#

and thats it

#

no wait

upper vapor
slate flume
#

If you abs it it'll slightly move the boxes

slender lynx
#

-0.788 X

slate flume
slender lynx
#

some of these jumps are frame perfect

#

adjusting scale at all fucks everything up

upper vapor
slate flume
#

You could write a function that takes the box scale, makes it positive, and then adjusts position accordingly

celest thorn
slate flume
#

No more errors

celest thorn
#

I can just do

#

Mathf.Abs

#

and thats the same thing

upper vapor
#

that's what i'm talking bout

slender lynx
#

@celest thorn honestly just leave it, dont do anything that changes position

celest thorn
slender lynx
#

my client log is 100mb and sl has been open for hours

upper vapor
slender lynx
#

then go for it ig

upper vapor
#

flipping a cube's scale from neg to pos doesn't do anything

upper vapor
#

besides getting rid of the log statement lol

slate flume
#

OH SHIT

#

You're right

upper vapor
#

if you have other objects in the cube...
well crap

slender lynx
#

oh shit

#

right

#

i forgot how math works

upper vapor
#

lmao

slate flume
#

I forgot scale was around the box center

upper vapor
#

yep

slender lynx
#

i just spent a month straight looking at cubes

#

my brain is shot

upper vapor
#

SLCraft

#

-# has that been done already?

slender lynx
#

im just waiting for someone to fail the last jump of a 2 hour citadel

slate flume
#

I thought it'd do this

slender lynx
#

not the pos

slate flume
#

Yeah I know

#

It's around the center

slender lynx
#

all it does is just flip it on itself

celest thorn
#

primitiveInstance.NetworkScale = new Vector3(Mathf.Abs(primitive.Scale.x), Mathf.Abs(primitive.Scale.y), Mathf.Abs(primitive.Scale.z));

#

and fixed it

slender lynx
#

5m is the max possible but you have to do a lagjump

slate flume
#

๐Ÿ‘๐Ÿผ

slender lynx
upper vapor
upper vapor
slender lynx
slate flume
#

Hell yeah

upper vapor
#

wait...
so you're saying that it's all clientside
then why do yuo have a primitive instance

slate flume
slender lynx
#

eg spinners

#

moving blocks

#

etc

grand flower
upper vapor
#

right

#

but then don't you need to set the transform scale, too?

slender lynx
celest thorn
upper vapor
celest thorn
#

and im not even joking

slender lynx
#

first it was almost killed by a door

#

then colliders

celest thorn
#

btw this entire project

slender lynx
#

yeah thats pretty much our structure

celest thorn
#

one class is doing the heavy lifting for everything

celest thorn
upper vapor
#

meownu

slender lynx
#

the fact that this project went from breaking my windows installation with a 200gb log file to this

celest thorn
#

or "Metrics Monitoring Menu :3"

celest thorn
upper vapor
#

mmm

#

nice

celest thorn
#

yea it evolved

#

and in 5 days i have finals too

#

and im still working

upper vapor
#

make it marvelous metrics monitoring menu

#

mmmm

celest thorn
#

yesterday i took 2 of the most hardest exams

celest thorn
slate flume
#

So when doing client-side changes, what do you have users do to get that implemented?

#

Also can someone please fix NW movement code I rubberband multiple times every day when doing skill jumps and it gets me killed ๐Ÿ™๐Ÿผ

unique crane
restive turret
#

What does it test

celest thorn
celest thorn
unique crane
#

wdym

celest thorn
#

Like should i add something else

#

For base game to actually verify movement

#

Speedometer could be cool

unique crane
#

I dont know

#

Sure.. I guess

celest thorn
#

Nw needs to leak internal stuff for testing the game

#

Im curious how you guys test the game

unique crane
#

We built via pipeline and send it to QA

#

they approve

celest thorn
#

No i mean

#

When you decide to add an item

#

A room

#

You like pop it in a debug scene or what

slate flume
unique crane
#

You can do that but its easier for artists to just add it to the map gen

celest thorn
#

So

#

I mean that wouldnโ€™t be bad

#

For testing collisions

#

And how the room fits in the game

unique crane
#

And connectors

#

Like they outline in the editor

#

But still you need to check it

restive turret
#

I see multiple in same room

#

I mean in same position

plain gazelle
worthy rune
#

client wont update its transform when its static

#

only "transform" related thing you can do is change the parent

upper vapor
#

wait...

#

that doesn't work for new players

#

i guess make it non-static

upper vapor
#

break a pasta ig

celest thorn
upper vapor
#

then fail the exam

celest thorn
#

even if i don't go there i will pass

#

because of how high my grades are in 3 years

#

like if i go there and don't do anything i can pass with 70 / 110

#

if i show up i could get 90 / 110 and honestly i just wanna have a 90

slate flume
#

Is there a list around of colors we can use for badges? I wanna make sure I don't break VSR lmao

slate flume
#

Gotcha

#

Thank you SunglassesThumbsUp

upper vapor
#

np

celest thorn
#

NorthwoodApprovedColorCodes

#

And NorthwoodNotApprovedColorCodes where they are at?

upper vapor
#

Enumerable.Range(0, int.MaxValue).Select(e => "#" + e.ToString("X").ToUpper()).Except(NorthwoodApprovedColorCodes.Values)

upper vapor
#

not sure if int tostring with format X gives what you want

celest thorn
#

btw nw should allow any color we want

#

so we can become fake nw staffer

slate flume
#

^

#

W

royal mica
#

Does someone has a quick list of colors roles are using?

upper vapor
#

starting

#

server

royal mica
#

hueh

upper vapor
#

nvm i don't have it

royal mica
#

can't even start a server with the plugin as I'M middle of it

#

fuk

plain gazelle
upper vapor
#

maybe put the static setters outside the loop

#

if you have a loop

random scaffold
plain gazelle
#

Does LabAPI or the such have an update event i can subscribe to?

#

I dont want to make my script MonoBehaviour

upper vapor
#

like a per-froame update?
StaticUnityMethods

plain gazelle
#

Thank you ^^

icy knoll
#

just make a component that calls your method, or use that yeah

upper vapor
#

it might be better to use monobehavior though
cuz that gets destroyed on round restart automatically

upper vapor
# plain gazelle Thank you ^^

also, make sure you don't have anything that throws an exception in the subscribed method
otherwise you'll see... uh... weird things

icy knoll
#

just try catch the whole mf

plain gazelle
#

@restive turret Trying to set the rotation of my TextToy but it doesnt work with FakeSyncVar
I tried other methods and only this way worked
Do you, or anyone else here, have any idea how i could set the rotation with the FakeSyncVar method?
But i think it uses the .Base.NetworkRotation, and i am not sure why setting that directly doesnt work....

upper vapor
#

oh i know

plain gazelle
#

:o

upper vapor
#

toy.Base.enabled = false

plain gazelle
#

o.O

upper vapor
plain gazelle
#

:(

upper vapor
#

prevents server updates but not client updates

plain gazelle
#

I dont think im following

upper vapor
hearty shard
#

you can also harmony patch

#

but thats more effort

#

1st 2 get overwritten by server side updates

#

3rd doesnt because it sets what is meant to be set by server updates

plain gazelle
#

Will try ^^

restive turret
plain gazelle
#

Ahhhh alright

#

So even if i do enabled = false, i can still send the fake TextFormat and Rotation values? Huh, interesting

restive turret
#

TexFromat should work tbh

plain gazelle
#

Alright, with the textToy enabled = false, it now looks like this

#

Now im just hoping the SendFakeSyncVar is still possible to do

upper vapor
#

can you show your fake sync var code?

plain gazelle
#

It works with 64uL and sending a string
But not with 2uL and sending a Quaternion
to textToy.Base

upper vapor
#

yeah cuz slejmur did a funny

#

dirtybits, transforms are written, then and then dirty bits again with derived props

plain gazelle
upper vapor
#

so for transform properties the writeulong(0) has to be after the sync var writing

upper vapor
#

can you link the code again

plain gazelle
#
public static void SendFakeSyncVar<T>(this LabApi.Features.Wrappers.Player target, NetworkBehaviour networkBehaviour, ulong dirtyBit, T syncVar)
{
    //if (!target.IsConnected)
    //    return;

    if (!target.Connection.isReady)
        return;

    NetworkWriterPooled writer = NetworkWriterPool.Get();
    // always writing 1?
    Compression.CompressVarUInt(writer, 1);

    // placeholder length
    int headerPosition = writer.Position;
    writer.WriteByte(0);
    int contentPosition = writer.Position;

    // Serialize stuff. we dont want to ser objects only sync data
    writer.WriteULong(0);

    foreach (var item in SubClassWriteExtra)
    {
        if (networkBehaviour.GetType().IsSubclassOf(item))
        {
            writer.WriteULong(dirtyBit);
        }
    }

    writer.WriteULong(dirtyBit);

    if (WriterExtensions.TryGetValue(typeof(T), out var method))
    {
        method.Invoke(null, [writer, syncVar]);
    }
    else
    {
        Log.Error($"Not found ser for type {typeof(T)}");
        return;
    }

    // end position safety write
    int endPosition = writer.Position;
    writer.Position = headerPosition;
    int size = endPosition - contentPosition;
    byte safety = (byte)(size & 0xFF);
    writer.WriteByte(safety);
    writer.Position = endPosition;

    // Copy owner to observer
    if (networkBehaviour.syncMode != SyncMode.Observers)
        Log.Warn("Well snyc mode is not observers, sucks to be you I guess.");

    target.Connection.Send(new EntityStateMessage
    {
        netId = networkBehaviour.netId,
        payload = writer.ToArraySegment(),
    });
}
restive turret
#

AH becaise labapi doesnt use SyncVars for these

#

it just using Tranform

#

im gonna die

upper vapor
#

    private static readonly List<Type> SubClassWriteExtra = [typeof(AdminToyBase)];

    // Easier syncVar
    public static void SendFakeSyncVar<T>(this Player target, NetworkBehaviour networkBehaviour, ulong dirtyBit, T syncVar)
    {
        if (target.Connection == null)
            return;
        NetworkWriterPooled writer = NetworkWriterPool.Get();
        // always writing 1 because we only change 1 value!
        Compression.CompressVarUInt(writer, 1);

        // placeholder length
        int headerPosition = writer.Position;
        writer.WriteByte(0);
        int contentPosition = writer.Position;

        // Serialize Object Sync Data.
        writer.WriteULong(0);
        
        // some class write this stuff twice.
        var isDerived = SubClassWriteExtra.Any(e => e.IsAssignableFrom(networkBehaviour.GetType());
        writer.WriteULong(dirtyBit);
if(isDerived && dirtyBit > 16UL) // if not admintoybase prop

        writer.WriteULong(dirtyBit);
        if (!MirrorWriterExtension.Write(syncVar, writer))
        {
            CL.Error($"Not found NetworkWriter for type {typeof(T)}");
            return;
        }
if (!isDerived || dirtyBit > 16UL)
        writer.WriteULong(dirtyBit);
        // end position safety write
        int endPosition = writer.Position;
        writer.Position = headerPosition;
        int size = endPosition - contentPosition;
        byte safety = (byte)(size & 0xFF);
        writer.WriteByte(safety);
        writer.Position = endPosition;

        // Copy owner to observer
        if (networkBehaviour.syncMode != SyncMode.Observers)
            CL.Warn("Well snyc mode is not observers, sucks to be you I guess.");

        target.Connection.Send(new EntityStateMessage
        {
            netId = networkBehaviour.netId,
            payload = writer.ToArraySegment(),
        });

    }
}
restive turret
#

well try it then report back i guess

plain gazelle
#

So i should replace my FakeSync method with this one?

restive turret
#

ye

plain gazelle
#

ah i dont have that

restive turret
#

wait

#

you can replace that with

#

writer.Write<T>(syncVar)

#

@upper vapor why does mirror write another dirtybit after syncvar val

plain gazelle
upper vapor
#

cuz it's derived

#

base class and subclass also need to know what the dirty bits are

restive turret
restive turret
#

I HATE MIRROR

#

BURN IT DOWN

#

WHYY????

#

writer.WriteULong(base.syncVarDirtyBits);
writer.WriteVector3(this.Scale);
writer.WriteULong(base.syncVarDirtyBits);

#

ye

#

this shit

plain gazelle
restive turret
#

Im at my point sending them a letter why

upper vapor
#

auto-generated code

grand flower
#

Mostly because it's autogenerated

restive turret
#

like they didnt need to write twice

upper vapor
grand flower
#

And you're not meant to do this by hand

restive turret
#

generate my ass

upper vapor
restive turret
#

im patching out

upper vapor
#

public static ulong LastDirtyBits

plain gazelle
restive turret
#

thats it

#

i burning down sl

royal mica
#

ok wtf

#

Is this intentional?

hearty shard
#

actually

royal mica
#

Ragdolls all have 0 serial, cause of the default value parameter

hearty shard
#

yeah should be null default

#

smh

#

nw moment

royal mica
#

I can use hashcode for identification instead of serial, but funny oversight

hearty shard
royal mica
#

connsidering all of the ragdolls have 0 serial, it doesn't not work

hearty shard
#

oh...

#

make your own serial trolling

#

@unique crane fix!!

royal mica
#

yeah about that

hearty shard
grand flower
#

Patch the ctor

hearty shard
#

that

#

or just

grand flower
#

Also readonly is compile time

hearty shard
#

yeah

#

you can use reflection

royal mica
#

I am just going to use hashcode

hearty shard
#

damn

royal mica
#

it uses creationtime as well so lol

hearty shard
#

i mean

#

== works too

#

wouldnt it

royal mica
#

no cause I want to store primitive not the whole rigidbody

#

Storing disarm data in a list and need to save which rigidbody was cuffed when

lethal cradle
#

Hey so I started to play SCP:SL sometime ago and I know some basics to C# but is there like some sort of hard down way to learn? ive tried ot understand the LabAPI tutorials but is there like advice any of you guys can give me. I know that the game uses c# and unity and I just want to do a simple plugin for gods sake

upper vapor
#

C# tutorial beginners full course (C# for Unity)
#C# #tutorial #Unity
โญ๏ธTime Stampsโญ๏ธ
#1 (00:00:00) C# tutorial for beginners ๐Ÿš€
#2 (00:06:30) output ๐Ÿ’ฌ
#3 (00:10:48) variables โœ–๏ธ
#4 (00:19:32) constants ฯ€
#5 (00:20:35) type casting ๐Ÿ’ฑ
#6 (00:27:49) user input โŒจ๏ธ
#7 (00:31:24) arithmetic operators ๐Ÿงฎ
#8 (...

โ–ถ Play video
lethal cradle
#

--t+hank

#

woah what

#

thank you

white badge
upper vapor
#

see y'all in about 4h

white badge
#

lofi hip hop tutorials to sleep to

celest thorn
upper vapor
#

lolll

restive turret
upper vapor
true cedar
#

might cry

#

i cant use fusedmultiplyadd

white badge
#

the ultimate way to learn to code is to fuck around and find out

restive turret
#

@icy knoll i believe in u

icy knoll
#

rotation and all

#

just i now need a queue system and then hint based messages

restive turret
true cedar
icy knoll
true cedar
#

wait thats SICK

#

is it with text toys?

icy knoll
#

ye

#

but ty

true cedar
#

that's genius

#

fuck

icy knoll
#

yeah i plan on making it a public plugin

#

i really wanted to add TTS for it too but everything was paid

pallid galleon
# icy knoll

I was literally thinking if someone had made something like this the other day lmaoo

#

great work!

icy knoll
#

thank you! it should be out probably this weekend as a public plugin!

pallid galleon
#

That's pretty slick

hearty shard
pallid galleon
#

I started making something like it, then realised very quickly that I don't have the expertise nor patience to make it lmao

hearty shard
#

Hi kadava

lethal cradle
#

im one hour into this video and its so brain dead

#

im learning things i already know

#

i can make a calculator

#

thats it

true cedar
hearty shard
lethal cradle
#

There is Dr Brights Mayhem server and out of what i learnt so far in c# and an idea, i thought about this simple formula that could calculate the chances of you exploding because the pills are unsafe, one of the developers said that its calculated when you pick the item and i thought there was another factor that can make the chances of boom higher. any tips GoodOne

true cedar
#

um

lethal cradle
#

is that good or bad

lethal cradle
severe cave
#

an plugin or smth else?

lethal cradle
#

it says above

#

js a test

#

for mysekf

#

in a terminal and later when I can make a plugin yeah ill try

severe cave
#

oh

slate flume
#

Day 2 of waiting for NW to fix their movement code

#

๐Ÿ™๐Ÿผ

slate flume
#

@grand flower what changes did you make to increase TPS

#

I did the FPC Distributor patch but I'm curious if you have any other tricks

#

I wanna get a consistent 60 tps with 32 players

#

It tends to be pretty good with distributor patch + ragdoll and item cleaning but I get dips when a lot of players are alive

#

I don't think it ever really gets under like 45-50 tps but I'd like to improve it as much as possible

grand flower
#

Mostly

#

Those are the ones that give the most

#

The rest is on NW's side

slate flume
grand flower
#

You already do ragdolls and items so that's good

slate flume
#

I've heard of that from my time doing speech but I wonder how the concept applies here

#

If you can illuminate that for me @grand flower

slate flume
#

Oh interesting so you do odd players one tick and even players the next?

grand flower
#

yes

slate flume
#

I like that idea

#

My current cache checks netId instead of playerId but I'll change that

grand flower
#

Mfw red rooms dont always generate

#

Lovely

slate flume
#

I made a custom item framework and one of the room spawns was going to be red room

grand flower
#

P5 on the issue tracker so I'll abandon hope

slate flume
#

Lmao

grand flower
#

Yeah we have mini waves/40% of spawn wave players spawn in red room

#

Because another amazing thing about SL is the fact gate A and gate B can be right next to each other

#

So SCPs can just lock down the facility

#

So we have mini waves and 40% of regular waves spawn in red rooms

#

Surprise surprise, red rooms isnt guaranteed anymore

slate flume
#

So peak

#

I love NW

grand flower
#

I wonder if I can patch map gen

slate flume
#

Do it

grand flower
#

Does SL send the map to clients or are they expected to generate the same map with the same seed

slate flume
#

Good question

slate flume
#

So you'd have to use only seeds that generate the red room

grand flower
#

Great

slate flume
#

Yeah :/

grand flower
#

Makes sense, but limiting

slate flume
#

If not, generate a new seed

grand flower
#

That would be smart

#

Assuming it's not expensive

slate flume
#

Hopefully

grand flower
#

The issue is we'd have to generate the map regardless

#

Because if we skip any random calls it'll throw off generation

slate flume
#

Yeah...

#

I โค๏ธ NW

ionic prawn
#

how do i get a player steamid from a plugin?

restive turret
#

Player.UserId but that can be using northwoods one so.

string steamid = string.Empty;
if (player.UserId.Contains("steam")
  steamid = player.UserId.Split("@")[0];
restive turret
#

For TTS have you tried using System.Speech? It's an MS Package

upper vapor
#

If you wanna use the terminal for editing, please use neovim

#

Notepad engineering as a beginner will be insanely painful

#

Though you might learn a bit more

restive turret
upper vapor
#

If you plan on adding TTS I suggest creating a separate plugin (in the same solution) so people don't need to have TTS installed

teal junco
#

maybe i should have written my plugin for LabApi so I could ask for help here

#

or I can just ask everyone to imagine I used the LabApi wrappers instead of the Exiled ones

teal junco
#

I have to add it to my cassie plugin

upper vapor
#

I found it on Reddit lol
".net text to speech cross platform"

celest thorn
#

Bro i know its stephen hawking tts but we know it for scp-079 trollfancy

teal junco
upper vapor
#

The doors to Gate B are now open.

teal junco
#

Hahahahahah I remember finding the Microsoft SAM generator online and I scoured the internet finding a way to use it from code

#

I found a program I could use in order to export audio

celest thorn
#

crazy

#

the original one is done .NET

upper vapor
#

Wha

teal junco
celest thorn
#

the stephen hawking original tts system done by intel

#

is done in winform

teal junco
#

for personal use

celest thorn
#

IT HAS BUILT IN LANGUAGE SYSTEM?

#

Crazy

teal junco
#

I might be placing a bit too much on my plate at the moment

celest thorn
icy knoll
icy knoll
icy knoll
#

me when nuget is crashing out or smth and not giving me access to kokoro

upper vapor
#

what

icy knoll
#

i cant use anything from kokoro

#

it's in the csproj

#

but nothing ๐Ÿ˜ญ

upper vapor
icy knoll
#

yes

#

fr

#

maybe it doesn't run on 4.8? idk

#

it does target 8.0

#

so idk

upper vapor
#

that's

#

unfortunate

icy knoll
#

this one targets 4.6 lol

#

4 years old

#

lets hope it still works

#

oh wait

#

this requires an executable to be open...

#

blegh

celest thorn
#

Hiiiii lumi

#

you need tts?

icy knoll
#

dont need, just would be v useful

upper vapor
#

just have a staff member narrating on demand toomuchtrolling

celest thorn
#

because you need to convert audio

#

i would say do a python endpoint

#

and just get the byte

#

and then send them to a speakertoy

#

I know it sounds boring and alot of work but directly on SL is a bit impossible

#

if you aren't hosting it on windows

#

else you can use built in speech function

icy knoll
#

id rather not deal with all that ๐Ÿ˜ญ

celest thorn
#

but thats the best solution i can find

#

:3

icy knoll
#

im not doing that so ig no tts unless i use one of those paid unity things but ya

celest thorn
icy knoll
#

im not going to

celest thorn
icy knoll
#

anyway... does anyone know how to add stroke to rich text?

#

the website i use isnt working rn

#

blegh

icy knoll
#

yeah

#

like a border for text

celest thorn
icy knoll
#

rip

celest thorn
#

this are all of the tags you can use

icy knoll
#

rip

celest thorn
#

ok dev chat

#

tell me a number from 1-8

celest thorn
#

nice 7

icy knoll
#

@true cedar sorry for the ping but did you ever work out how to put a hint on the far right of the screen?

restive turret
celest thorn
#

crazy

#

you came in clutch

restive turret
#

So why did you needed those numbers

celest thorn
#

so im just asking for random numbers, google ones just prefers alot 3,8,9

#

so thats why

main zenith
#

does its possible to make the SSDropDownSettings options for each player diffrent like i want to make cosmetics plugin and i want that normal players have some cosmetics and "Vips" had more of them and etc.?

unique crane
#

Or you can use Eve's secret API which already handles this

#

i think

main zenith
#

damn

worthy rune
#

easiest method would be to create a new option setting per player (all go in defined settings) and only send the setting for that player and not the ones for others. this is the way its intended to work from what i can see

hearty shard
#

Im making a release soon though

hearty shard
#

@main zenith if you want i can give you a secretapi build later with it

unique crane
hearty shard
#

im not home for a few hours though

unique crane
#

So it kinda is desync since the default implementation syncs everything to every player

hearty shard
#

You can also compile it yourself from the PR

main zenith
worthy rune
unique crane
#

oh

hearty shard
worthy rune
#

let me find it

unique crane
#

i have sl source open

#

one sec

hearty shard
#

@main zenith

unique crane
#

SendToPlayersConditionally

#

yea

worthy rune
#

you have todo two things, one is disable the send to all by setting the filter to send non iirc, then you just handle the sending with that

#

so its pretty easy imo

hearty shard
unique crane
#

Or just

#

SendToPlayer

unique crane
hearty shard
#

You cant use the dropdown settings actual property

unique crane
#

I would just make invidual instances for each player

#

in a array to send them

hearty shard
unique crane
#

Cool

hearty shard
#

Which has the SecretAPI.dll

hearty shard
#

Btw this is untested

#

so it might not work, but ill make fixes to anything not working

main zenith
hearty shard
#

Set your values

unique crane
#

ServerSpecificSettingsSync.SendToPlayer(ReferenceHub hub, ServerSpecificSettingBase[] collection, int? versionOverride = null)

hearty shard
#

Send the player specific instances

unique crane
#

With the collection being per-player

hearty shard
#

This is what secretapi does

main zenith
hearty shard
#

@unique crane when do you make the game bugfree

#

I cant believe you havent fixed all the bugs yer

#

Yet

main zenith
#

what im doing wrong?



  public void CreateListOfCosmetics(Player player)
   {
       CosmeticOptions.Clear();

       CosmeticOptions.Add("Default1");
       CosmeticOptions.Add("Default2");



       if (player.HasAnyPermission("MothCosmeticsVIP"))
       {
           CosmeticOptions.Add("Vip");
       }


   }


   public override void Activate(Player player)
   {
      
       

           CreateListOfCosmetics(player);

           ServerSpecificSettingBase[] _settings = new ServerSpecificSettingBase[]
{
           new SSGroupHeader("MothCosmetics"),
           new SSDropdownSetting(AbilityId.DropDownSetting,"Kosmetyk:",CosmeticOptions.ToArray()),
           new SSTwoButtonsSetting(AbilityId.TwoButtonSetting,"Zawsze: ","Tak","Nie",defaultIsB:true)

    };
       var Holder = (ServerSpecificSettingsSync.DefinedSettings ?? Array.Empty<ServerSpecificSettingBase>()).ToList();

       foreach (var setting in _settings)
       {
           Holder.Add(setting);
       }

       ServerSpecificSettingsSync.DefinedSettings = Holder.ToArray();
           ServerSpecificSettingsSync.SendToPlayer(player.ReferenceHub);

       ServerSpecificSettingsSync.ServerOnSettingValueReceived += ProcessUserInput;

   }

i think its a "var Holder = (ServerSpecificSettingsSync.DefinedSettings ?? Array.Empty<ServerSpecificSettingBase>()).ToList();" but how can i get ServerSpecificSettingsSync.DefinedSettings for each player?

#

the problem is that everyone has the same CosmeticOptions despite not having "MothCosmeticsVIP" Permissions (its not the permission problem)

royal mica
#

DefinedSettings needs to contain ALL of the available options, that is not per user

#

that is the list of settings the server handles

#

Is this an SecretAPI implementation?

hearty shard
royal mica
#

Then I have no idea what I am looking at.
What does Activate override

hearty shard
#

my SecretAPI will be working with this soon hopefully

royal mica
#

Which class in it

hearty shard
#

idk

royal mica
# hearty shard this is not SecretAPI

Just a random guess cause override and class level variables, but I highly suspect this won't be the way SecretAPI does it, cause it smells like a lot of bugs

royal mica
#

Oh you patched it out?

hearty shard
#

I patch what requires it

main zenith
royal mica
#

or when this class is inited

hearty shard
#
GitHub

Contribute to Misfiy/SecretAPI development by creating an account on GitHub.

GitHub

Contribute to Misfiy/SecretAPI development by creating an account on GitHub.

#

@royal mica if ur interested in how secretapi does

#

its 4 patches

#

this is the untested version tho

main zenith
royal mica
#

I guess it is a instance level variable, but which class is it part of

#

When is this class created

#

Cause if you are editing the same List, then you are editing it for EVERYONE

main zenith
royal mica
#

My advice is to learn to always have functions get an input and have an output and not edit a variable

#

Cause that way you do not have side effect functions

#

and you reduce the bugs by a large margin

#

so instead of editing CosmeticOptions, you can just return an array with those

main zenith
upper vapor
#

@hearty shard what if we had SSS templates and SSS instances

upper vapor
#

Like

#

The setting would be created per player based on a template

#

Similar to how it is now

#

But it would have a different type

hearty shard
#

i dont want to have 20 classes

#

Just 1 per setting preferably

upper vapor
#

Well

#

Then add an interface for creating a copy for another player

frail pilot
#

How should I parse the contents of UserIdBans.txt to get the player's ban time and ban duration? I can't understand the contents of UserIdBans.txt

static osprey
frail pilot
#

ty๏ผ

static osprey
#

no probleymo

icy knoll
#

what would you guys recommend i do for my specific use case?

i have a hint that seperates a list by /n, but i want the last item in the list to always exist at the same position on the screen and have the messages before the last get pushed up... i cant think about a good solution for this...

#

maybe voffset?

#

lemme try that first

static osprey
hearty shard
icy knoll
#

๐Ÿ™

hearty shard
#

there'll be 3 options iirc

#

Up
Middle
Down

icy knoll
#

nice

#

im so excited for ruei v3

#

bruh voffset isn't working today :c

#

oh... ruei removes it...

#

using string builder extensions now and it works fine lol

true cedar
true cedar
icy knoll
#

then why is there AddVOffset()?

hearty shard
true cedar
#
  1. completion's sake
icy knoll
#

which is hella weird but ye lol

true cedar
#

oh

#

i dee kay

icy knoll
#

anyway

#

i did the perfect math for my issue

#

list.Count*1.17f

#

that's how the bottom part of the text stays in place

#

use ems

true cedar
#

im trying to get the parser made

icy knoll
#

nice

#

how close are we after that point?

#

so i can finally retire my HSM stuff because im not dealing with that shit anymore

true cedar
#

well

#

once i get parser done

#

it should be pretty easy sailing

#

parser is gonna take a while tho bc i need to support animated value parameters

unique crane
#

Its not that big of a deal

restive turret
#

Everytime i see this i thank myself i don't touch hint system SteamHappy

true cedar
#

NO.

hearty shard
#

Paislee

true cedar
#

im gonna support it even if it kills me

hearty shard
#

Ur lowk insane in the head

icy knoll
#

just make regex to get all {int} stuff and then modify the indexes depending on how far down in the tree they show and then send the hints with the parameters, super easy.

restive turret
unique crane
true cedar
icy knoll
hearty shard
hearty shard
icy knoll
#

idk where the source of this stuff is so /shrug

true cedar
#

the problem is not animated hint parameters alone

#

its shit like

restive turret
true cedar
#

<line-height={0}>

#

animated hint parameters in tags

icy knoll
#

and replace values from there

#

lol

unique crane
#

Ngl I expected people to use it for color changing

#

not for offsets and such

true cedar
#

i mean ruei will support that too

hearty shard
#

!!!

true cedar
unique crane
#

Why would you do that

restive turret
#

Just fine

#

*don't