#plugins-dev-chat

1 messages · Page 40 of 1

celest thorn
#

thats my best guess

#

else none knows why tf they sync back everytime

#

try if you want

hearty shard
#

well then client would have to send and server would have to receive

#

and then resend

#

but

upper vapor
#

so
you disable the collidable flag
and enable it for clients that don't have the effect

hearty shard
#

i dont see that in server code

celest thorn
#

client side code is another

hearty shard
#

but

#

server HAS to send the correct flag

#

client cant know the correct flag if server doesnt tell 😭

unique crane
#

Soo uh what exactly you looking for

hearty shard
#

that causes it to be unable to fake sync

celest thorn
hearty shard
#

other than Start() method of primitive

celest thorn
#

because most likely what someone did is checking

slender lynx
#

we've already fucked with how the game components work so far by now half the shit we do breaks with normal code

hearty shard
#

no server side code is resyncing it

celest thorn
hearty shard
#

it has to be mirror code

celest thorn
#

sometimes i ask myself

#

if you have a brain

#

or not

hearty shard
#

zero

#

ik ur stupid

upper vapor
#

zero

hearty shard
#

but fun fact

upper vapor
#

i agree with eve here

hearty shard
#

client cant know a servers values

upper vapor
#

-# impossible

hearty shard
#

unless server tells client it

#

and that means server has to code it

#

to resync

celest thorn
#

EntityStateMessage

#

i could argue this exist

slender lynx
#

90% of our project isnt server synced

#

so

hearty shard
#

so either

#

its NOT

slender lynx
#

idk what ur on abt

hearty shard
#

nws fault

celest thorn
#

and this GETS CALLED 100 times

hearty shard
#

its mirrors

celest thorn
#

mirror is better coded than 90% of sl

hearty shard
#

it has to be either mirror or ur schizo

#

surely

upper vapor
#

do you prevent it from setting the dirty bits to 0?

celest thorn
#

it before me

upper vapor
#

otherwise it wouldn't resync

celest thorn
#

there was even a REPORT YOU ANSWERED ABOUT IT

hearty shard
#

Start()

#

updates it

#

and resyncs

celest thorn
slender lynx
#

holy shit

hearty shard
#

thats called once

celest thorn
#

START GETS CALLED AT START

slender lynx
#

we arent getting anywhere

hearty shard
#

i said this

hearty shard
slender lynx
#

start is not what we need

hearty shard
#

thats... the point

slender lynx
#

thats the whole thing we're avoiding

hearty shard
slender lynx
#

we arent touching the start

hearty shard
#

im saying its mirror or ur fake syncing wrong

inner citrus
#

skill issue

celest thorn
hearty shard
#

and im saying thats the place it syncs

celest thorn
#

Exiled then is wrong

hearty shard
#

then fix exiled

#

but

celest thorn
#

test it now

hearty shard
#

i dont see server code sending it

celest thorn
#

with your API

#

if i win

unique crane
#

IIII dont see any client specific code that you couldnt see?

celest thorn
#

you fucking shut up

hearty shard
upper vapor
#

do you have your primitives on the server now?

hearty shard
celest thorn
hearty shard
slender lynx
#

alright alright zero enough

hearty shard
#

😭

slender lynx
#

leave it here

celest thorn
#

nah

slender lynx
#

fml

upper vapor
#

zero get in here

celest thorn
upper vapor
#

bruh

hearty shard
#

david says client isnt resyncing

#

forcefully at least

#

and server has no code for it either

#

so its MIRRORRRRRR

#

or the fake sync makes it dirty

#

and it resyncs

teal junco
unique crane
#

Only time it force changes itself is on

#

Start

#

And when you SetPrimitive

upper vapor
#

yes

celest thorn
#

@hearty shard go fix the code for exiled

#

that is broken trollfancy

hearty shard
celest thorn
#

im not going to

#

i don't get paid enough

hearty shard
#

its not me using the code

celest thorn
#

to do that

hearty shard
#

idc

celest thorn
teal junco
celest thorn
unique crane
#

Pay with a good feeling

celest thorn
teal junco
#

join Northwood and make 10 dollars to fulfill a bounty

celest thorn
#

they don't do anything for you

#

but you do alot for it

teal junco
upper vapor
unique crane
#

pliers

teal junco
celest thorn
#

...

teal junco
#

No I have nothing worth providing

unique crane
#

Your soul

teal junco
slender lynx
#

exiled is like paying child support

#

best way to describe it

hearty shard
#

@celest thorn so was i right about it not being SL issue

celest thorn
hearty shard
celest thorn
#

and i don't want to check

#

so

#

idc

#

if you want test it yourself

teal junco
#

Someone should make Libre SL

hearty shard
teal junco
#

either its way worse or its way better

hearty shard
#

rather make my own api

#

but

celest thorn
hearty shard
#

i cba to find shit on the sync vars

celest thorn
#

you are stupid asf

hearty shard
#

wat

celest thorn
#

you cannot do it

teal junco
hearty shard
celest thorn
#

no transpilers

#

prefix

slender lynx
celest thorn
#

cedmod 2.0

hearty shard
#

ive written 2 transpilers

teal junco
celest thorn
hearty shard
#

soo PI_Shrug

teal junco
#

where a transpiler wouldve done

upper vapor
celest thorn
#

i've wrote 49 probably

upper vapor
#

c*dmod

hearty shard
#

zero r u done calling me stupid

celest thorn
hearty shard
#

good

slender lynx
#

until tommorow

teal junco
#

causes infinite pain

upper vapor
#

it yes

celest thorn
#

Cedmod is cool

#

but it breaks alot

teal junco
#

I just dont bother with it, I never have a discord for my servers

celest thorn
teal junco
#

but it breaks shit sometimes

teal junco
#

it has a bunch of other stuff but i dont care about that

#

It helps competitive SL players keep track of how shit each other are

#

and it has an anticheat for some rudimentary hacks (based)

upper vapor
#

.

teal junco
#

He probably had to buy midnight to test it lel

#

i wonder how this works

#

does cedmod have any signatures?

#

I dont pay attention so i dont know

hearty shard
#

lol

teal junco
hearty shard
#

its hidden like exiled

teal junco
#

like invisinble track?

hearty shard
#

it uses it for server verification

#

yea

teal junco
#

yea

#

so i just have to add cedmod to my server name

hearty shard
#

to have them detect ur server as cedmod yeah

#

assuming thats what they actually do but

#

its probably the easiest

hearty shard
unique crane
hearty shard
#

WHAT!

teal junco
#

but honestly its good enough

#

i dont think it interacts much with other wrappers

unique crane
#

Well there isnt much you can add there

#

Its just floating text

#

What do you expect?

teal junco
#

Everything

unique crane
#

That gave me 0 clue what you want

teal junco
#

ill just copy and paste the wrapper in my personal exiled version Trolley

unique crane
#

send link

#

Or make PR

grand flower
#

Shot in the dark but is the whole priority stuff for event handlers being worked on/looked into for the near future?

#

Starting to get into territory that would really make use of that to avoid race conditions heh

hearty shard
#

i solved this by loading stuff in my own priority

#

it works for me

#

idk if thats like universal tho

grand flower
#

Potentially but considering the size of the codebase, having to keep track of that would be mentally taxing

hearty shard
#

mines this

#

and then just loading stuff using that

grand flower
#

Hmmm I could potentially handle that myself yeah

#

if I unregister event handlers let's say in the middle of the list, it's not gonna screw with the ordering right

hearty shard
#

uh

#

uh

#

idk i dont unregister a lot of my stuff Fear

#

sr my beloved

#

it shouldnt tho

plain gazelle
#

LabAPI.Events.Handlers.PlayerEvents.SearchToyAborted fires when you hold E on an interactable toy and then stop holding E
InteractableToy.OnSearchAborted fires after completing a search, specifically after OnSearched fired
And never when i stop holding E.....

Am i doing something wrong? xd

grand flower
# hearty shard mines this

Looked into LabAPI, I'm just gonna patch the methods that register handlers to also do some sorting based on an attribute like this one yeah

plain gazelle
#

hm

slate flume
#

Well well well I guess I'm back again

#

I have a grenade thrown by a player, that then explodes and damages other players
Say I want to modify the amount of damage this specific grenade does, how would I do so?
It doesn't appear that the ExplosionDamageHandler I can get from OnPlayerHurting has relevant information as to the origin of the explosion outside of the ExplosionType, but I could be wrong

hearty shard
#

_damageForDistance or smth i forgot what its called

slate flume
hearty shard
#

you have to change that tho

slate flume
#

I was hoping to avoid that but a'ight

#

Cause I have no fucking clue how to work with AnimationCurves lmao

teal junco
hearty shard
#

i dont rememeber whats needed

slate flume
wheat flower
#

get it

slate flume
#

Gross

teal junco
#

do you have an objection to unity

#

ive seen all sorts of reasons for it

teal junco
#

Jams are defined with a delay value and a stutter value.

The delay appears to approximately correlate to centi-seconds, and defines the delay before the jam effect happens. The stutter value is how many times to replay an exactly 0.13 second section of the word before allowing the word to finish. When the jamming is finished, and the rest of the word is read out, it is read out simultaneously to the next word in the queue.

slate flume
#

I moreso just don't want to learn how to use a whole damn game engine to do one thing

teal junco
slate flume
#

Yes, at least depending on how extensive you mean

#

I made my own SunglassesThumbsUp

grand flower
#

are scp-079's pings just not visible to non-scp players?

#

tried patching Scp079PingAbility.ServerCheckReceiver to always return true as a test but humans just never see it

#

ah fuck nvm

#

Scp079PingInstance.IsVisible also checks for SCP

#

(╯°□°)╯︵ ┻━┻

#

why though, server already does the checks before sending

unique crane
#

I believe they are send to everyone

#

But non scps just ignore it

grand flower
#

Any chance of that check being removed considering the server already filters?

unique crane
#

Maybe

restive turret
#

Mayhaps

upper vapor
#

Cuz if you modify the original curve then you're gonna end up in a funny situation

#

Also it's literally new AnimationCurve(new Keyframe(t, v), new Keyframe(t, v,))

#

For two curve control points

#

Iirc time is distance from Grenade mapped to value which is damage

upper vapor
upper vapor
grand flower
#

just mildly annoyed at the client side of things sabotaging me

true cedar
#

welcome to sl dev

grand flower
#

eh, already used to it

random scaffold
#

kl97t8s

upper vapor
grand flower
#

How does one change the height of a hint to the lowest possible part of the screen

unique crane
unique crane
#

you can just spam \n

#

Or use line-height

#

or voffset

grand flower
#

noted ty

upper vapor
unique crane
#

Oh

upper vapor
unique crane
#

Putting the respawn timer here makes it feel so natural

#

love it

grand flower
#

nice

icy knoll
unique crane
#

(thats plugin too lumi)

icy knoll
#

how did you do the icon with a plugin? 😭

unique crane
#

Emoji

#

just like everywhere else in SL

#

That fist is emoji too

icy knoll
#

those are emojis?

unique crane
#

XD

#

RA icons are emojis

#

yep

icy knoll
#

fair enough

#

i thought you were making that base game

unique crane
#

I... wouldnt show you that here

icy knoll
#

true

#

anyway i need to move my timers plugin away from exiled now

upper vapor
#

Bruh

#

Fun fact you can overlap emojis with some trickery

restive turret
# unique crane RA icons are emojis

Is there a list or the font name for these icons?
Since the one linked by someone doesn't include proper ones (like pc icon, overwatch, ra , staff, etc)

upper vapor
#

Someone has a list of those

#

Oh

#

That's

#

I didn't read xd

restive turret
#

Just

unique crane
#

most of them works

upper vapor
#

Isn't the font LiberationSans?

upper vapor
restive turret
#

What if no error

upper vapor
#

Then

#

Nice

unique crane
restive turret
#

U have the src!!

restive turret
#

Is player attached to the primitive that has a trigger for players is more performant or check every 5/10 sec if the player is in distance

grand flower
#

Less transform updates are probably better

#

Distance check using the player list is probably cheap

restive turret
#

Kk

unique crane
#

Sqrt distance is cheap

#

Use the cached position for fpc roles

random scaffold
#

d0orl13

upper vapor
#

Maybe because of the - operator toomuchtrolling

restive turret
unique crane
#

It literally has sqrt

upper vapor
#

Benchmark it

unique crane
#

It is possible that there is black magic behind the sqrt

terse bone
#

It depends on hardware ig

hearty shard
#

DAVID

unique crane
#

Well of course if you have good cpu it wont matter XD

unique crane
hearty shard
#

hi!

unique crane
#

haiii

terse bone
unique crane
#

I know

hearty shard
#

david r u good at math

unique crane
#

I would say so yea

upper vapor
unique crane
#

a lot

#

2^63 - 1

upper vapor
#

In Roman numerals pls toomuchtrolling

unique crane
hearty shard
#

well you could do XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

upper vapor
#

Kek

hearty shard
#

well M is better

#

idk whats bigger than M here

#

I
V
X
L
C
D
M

upper vapor
#

MMMMMMMMMMMMMM

hearty shard
#

real tbh

upper vapor
restive turret
heady turret
#

how can i clean up blood decals in distance or specify decal?

heady turret
flat vine
#

and NetworkMessage

#

DecalCleanupMessage

unique crane
#

Yeah that is possible but he asked whether he can clean specific decals

heady turret
unique crane
#

Well its just a poll of decals

#

rotating

#

It was not intended to clean specific decals

flat vine
#

It would be possible, of course, to track the positions of all decals through the event on their appearance, but I don't see much point in it, as players may have different settings

#

Yes, and you can only clear a certain number of decals and in the list everything goes in the order of time of their existence

#

* time of spawn

unique crane
#

Yea

soft turtle
#

How to get FpcStandardScp._roomSpawnpoint from SCP-3114?

soft turtle
# flat vine

I mean what class is he in. I want to make a patch to change his spawn room

flat vine
#

or try to patch _cachedSpawnpoint

soft turtle
hearty shard
#

you can just teleport on changed role

tulip kiln
#

You can also just subscribe to PlayerSpawningEvent

#

has ev.SpawnLocation

flat vine
soft turtle
soft turtle
hearty shard
#

and spawn it myself trolling

soft turtle
soft turtle
hearty shard
#

by unity

#

SerializeField means its set in the unity editor

soft turtle
flat vine
hearty shard
#

it really is easier

#

you only need 1 patch (to disable the ragdolls spawning)

flat vine
#

it allows you to change the SpawnLocation in the event

soft turtle
unique crane
#

@hearty shard Here is your Scale property!!!

#

It will be 50€

hearty shard
#

oh hey

#

i can finally ban you

#

dont need u anymore!

jaunty arch
#

:3

unique crane
#

I secretly added hardcoded ban for your SID

grand flower
#

Sweet changelog

#

Thanks for the additions, gonna be able to get rid of patches and hacky stuff

#

Love the new scale stuff too

random scaffold
#

it take 2 years

grand flower
#

Also question, player stores staying between rounds is a bug right?

hearty shard
#

@unique crane wait

#

scale will reset on role change now

#

right

unique crane
#

I... believe so

#

Its been a while

hearty shard
#

i mean

#

its part of fpc module motor

#
if (!(this.ReferenceHub.roleManager.CurrentRole is IFpcRole currentRole))
          return;
        currentRole.FpcModule.Motor.ScaleController.Scale = value;
#

so i feel like

#

itd reset

#

which means i dont need to do that anymore

ionic prawn
#

why dosent CI Keycard work in my remote keycard but every card else works

hearty shard
#

also gotta love

ionic prawn
hearty shard
#

xd

ionic prawn
#

yes im stupid

#

and i only started like this year

ionic prawn
unique crane
hearty shard
#

since theres a new param

unique crane
#

Oh its your stuff

hearty shard
#

yeah

#

not labapi

#

just 💔

#

me when optional stuff

ionic prawn
#

how do i even add custom keybinds 😭

hearty shard
#

greatest SSSS wrappers

ionic prawn
hearty shard
ionic prawn
#

k

hearty shard
unique crane
#

That doesnt say much

hearty shard
#

theres this for how to actually create it

unique crane
#

like what does it do

hearty shard
#

I CANT FOR THE LIFE OF ME WRITE STUFF LIKE THAT

#

u fix!!!

#

i gotta fix readme at some point

#

but

grand flower
#

love the new keybind stuff

hearty shard
#

id rather have someone else write it cuz i cant

upper vapor
#

What did i just wake up to

grand flower
#

started playing around with it yesterday

#

gonna be so much fun

hearty shard
#

LETS GO

upper vapor
#

Now?????

ionic prawn
#

but can someone answer my question too why dosent CI keycard work in my remote keycard?

hearty shard
#

2 days away

#

14.1.1

upper vapor
#

Uh

grand flower
#

for some reason

upper vapor
#

Okay

grand flower
#

:[

ionic prawn
hearty shard
#

AXWABO

#

IVE NOTICED

grand flower
#

iirc it's known and will be fixed

hearty shard
#

SPELLING MISTAKE NOOO

ionic prawn
#

how should i add CI then?

public static bool HasPlayerPermission(Player player, IDoorPermissionRequester requester)
{
    DoorPermissionFlags flags = DoorPermissionFlags.None;

    if (player.IsBypassEnabled)
        return true;

    if (player.RoleBase is IDoorPermissionProvider doorPermissionProvider)
        flags |= doorPermissionProvider.GetPermissions(requester);
    foreach (Item item in player.Items)
        if (item is KeycardItem keycardItem)
            flags |= keycardItem.Base.GetPermissions(requester);

    return requester.PermissionsPolicy.CheckPermissions(flags);
}
hearty shard
#

well

#

chaos card is a keycard item

grand flower
#

is it though

hearty shard
#

yes!

grand flower
#

wasn't there a known issue with CI keycard being different

hearty shard
#

i dont know!

ionic prawn
#

why dosent it work with CI card then

hearty shard
#

but it looks like a keycard item to me

hearty shard
#
public static bool HasDoorPermission(this Player player, IDoorPermissionRequester requester, DoorPermissionCheck checkFlags = DoorPermissionCheck.Default)
        {
            if (checkFlags.HasFlag(DoorPermissionCheck.Bypass) && player.IsBypassEnabled)
                return true;

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

            foreach (Item item in player.Items)
            {
                bool isCurrent = item == player.CurrentItem;
                if (!checkFlags.HasFlag(DoorPermissionCheck.CurrentItem) && isCurrent)
                    continue;

                if (!checkFlags.HasFlag(DoorPermissionCheck.InventoryExcludingCurrent) && !isCurrent)
                    continue;

                if (item.Base is IDoorPermissionProvider itemProvider && requester.PermissionsPolicy.CheckPermissions(itemProvider.GetPermissions(requester)))
                    return true;
            }

            return false;
        }
#

me when

ionic prawn
#

my server be like :

ionic prawn
# hearty shard ```cs public static bool HasDoorPermission(this Player player, IDoorPermissionRe...

no door 😠

public static bool HasKeycardPermissionD(Door door, Player player) =>
    HasPlayerPermission(player, door.Base);
public static bool HasKeycardPermissionL(LabApi.Features.Wrappers.LockerChamber chamber, Player player) =>
    HasPlayerPermission(player, chamber.Base);
public static bool HasKeycardPermissionG(Scp079Generator generator, Player player) =>
    HasPlayerPermission(player, generator);

public static bool HasPlayerPermission(Player player, IDoorPermissionRequester requester)
{
    DoorPermissionFlags flags = DoorPermissionFlags.None;

    if (player.IsBypassEnabled)
        return true;

    if (player.RoleBase is IDoorPermissionProvider doorPermissionProvider)
        flags |= doorPermissionProvider.GetPermissions(requester);
 
    foreach (Item item in player.Items)
        if (item is KeycardItem keycardItem)
            flags |= keycardItem.Base.GetPermissions(requester);

    return requester.PermissionsPolicy.CheckPermissions(flags);
}
upper vapor
upper vapor
#

I wonder if I can replicate that with audio clips

teal junco
#

i wish northowod open source cassie :(

#

fully

heady turret
teal junco
#

that is me!

#

I have pitch slightly working, the integration with basegame cassie is still weird

#

i am doing jam next

#

This is going on my portfolio Trolley

upper vapor
#

oh the jam is

#

in percentage

upper vapor
#

the painful part was getting the phrases set

teal junco
teal junco
upper vapor
#

uh

teal junco
#

holy shit

upper vapor
#

ye

teal junco
#

am i a dumbass

teal junco
#

well i dont know how i could have figured that out.......

#

thank you axwabo

upper vapor
#

np

teal junco
#

it is not centiseconds 😭

restive turret
hearty shard
#

only for me

restive turret
#

Nuh uh

#

Just came back from vacation

ionic prawn
#

is there even a working scp proximity chat

hearty shard
#

idk about labapi

#

excluding private plugins

#

cuz mine works but is private

restive turret
#

Exclude yo

hearty shard
#

shut up!!

ionic prawn
restive turret
#

Nuh uh

icy knoll
#

me when i can make a pr to make it work with labapi, just depends if bolton accepts

restive turret
#

I don't think much work tbh

icy knoll
#

yeah probably not

random scaffold
#

just make proximity chat yourself

hearty shard
random scaffold
#

yes

#

and it fully works

ionic prawn
#

why does no one make a public one ):

random scaffold
hearty shard
#

lol

ionic prawn
ionic prawn
hearty shard
#

CustomEscapes, CandyUtils, SecretAPI, my server

#

Thats enough for me

hearty shard
#

I used to have like 10 total maintaining + exiled but nah no more

unique crane
hearty shard
#

U make it

ionic prawn
#

like jesus-qc hasnt updated it in like 1 year 😭

teal junco
#

does the 14.0 version work on LabAPI?

#

i thought it did

restive turret
hearty shard
#

I hate u!!

hearty shard
teal junco
#

anyways, it shouldnt be hard to port.... i think

hearty shard
#

exiled works

#

but exiled is exiled

teal junco
#

oh wait

#

it was made in nwapi days LOL

#

well porting still shouldnt be hard

restive turret
#

Replacing 3-5 stuff maybe

teal junco
#

yeah

#

its just kinda weird and broken, ive had issues with it using controller IDs without regard for AudioPlayerApi

#

I may fix it if I find the time

#

I do have all the time in the world, its just a matter of me caring enough

#

I have my cassie plugin to make Trolley

ionic prawn
hearty shard
#

or no deal

ionic prawn
#

💀 that is like 5000 in my currency

unique crane
#

Then convert it to currency where it looks less

hearty shard
random scaffold
#

eve moment

ionic prawn
random scaffold
hearty shard
ionic prawn
#

no i meant $-1

upper vapor
random scaffold
#

sll

unique crane
upper vapor
teal junco
#

awesome

#

is this via audioplayerapi?

upper vapor
#

nope

teal junco
#

what did you do?

upper vapor
#

secret toomuchtrolling

teal junco
#

oke

#

hold on

#

should this alg work?

upper vapor
#

it's probably simpler to just recalculate the clip and give it to labapi speaker

upper vapor
#

that's eve simpler

#

wait, don't you have to set this on the speaker? Position

#

or does ReadPosition on the clip work too

teal junco
#

ReadPosition should work I think.... idk though

#

im not super familiar with this API

upper vapor
#

time to test it

upper vapor
#

you have multiple clips?

teal junco
#

its multiple playbacks to support multiple speakers, to be specific

upper vapor
#

wait this is audioplayerapi

#

right

teal junco
#

yes

upper vapor
#

ohhhhhh

teal junco
#

AudioPlayerApi outputs an AudioClipPlayback object

#

i use that to mess with the playback

upper vapor
teal junco
teal junco
#

so its one single announcer that uses multiple ControllerIds

#

one for global (non-spatial) and one for spatial (at speakers)

upper vapor
#

you can just have one controller id

teal junco
upper vapor
#

i mean if you're playing the same audio in multiple speakers, you can have one audioplayer and multiple speakers with the same controller id

#

if that's what you're looking for

#

audioplayerapi lets you do that to my knowledge

teal junco
#

but I have one global controller ID for when you arent in range of a speaker

#

and one spatial one for speakers

upper vapor
#

aha

teal junco
#

this system works okay, its not ideal and I would rather not but i dunno how else to achieve it

upper vapor
#

i mean that works

teal junco
upper vapor
#

poggies

teal junco
#

yep

#

im very proud of this work!

upper vapor
teal junco
#
((!text.EndsWith("TED", StringComparison.OrdinalIgnoreCase) && !text.EndsWith("DED", StringComparison.OrdinalIgnoreCase)) ? (text.EndsWith("D", StringComparison.OrdinalIgnoreCase) ? suffixPastStandard : (text.EndsWith("ING", StringComparison.OrdinalIgnoreCase) ? suffixContinuous : ((!voiceLine2.apiName.EndsWith("S") && !voiceLine2.apiName.EndsWith("SH") && !voiceLine2.apiName.EndsWith("CH") && !voiceLine2.apiName.EndsWith("X") && !voiceLine2.apiName.EndsWith("Z")) ? suffixPluralStandard : suffixPluralException))) : suffixPastException);```
![Fear](https://cdn.discordapp.com/emojis/1172595228193067138.webp?size=128 "Fear")
hearty shard
#

GUH

hearty shard
#

you having considered a list????

#

or array??

teal junco
upper vapor
#

oh

#

phew

hearty shard
#

WHAT

teal junco
#

so it was probably cleaner in its original state

#

still doesnt make it easier for me 😭

hearty shard
#

It wont let me ping david

#

He doesnt show up in my @ lol

teal junco
#

Are you going to ping david about CASSIE post-past-continuous-plural processor?

hearty shard
#

or you can chatgpt it

#

chatgpt "pls make this code clean"

teal junco
#

I wont chatGPT it i am a big boy

hearty shard
#

usually does the job

upper vapor
#

what decompiler did you use

teal junco
#

whatever that one uses

hearty shard
#

VS has a decompiler??

upper vapor
#

okay i'm not suprised now xd

upper vapor
#

it's

#

poo

teal junco
hearty shard
upper vapor
#

i have never ever seen it create a 201323-case ternary operator

hearty shard
#

Idk

teal junco
#

thats not that many casesss

#

but yeah

upper vapor
#

dramatic exaggeration

teal junco
#

maybe i should let chatgpt take care of this one

upper vapor
#

doesn't visual studio have a refactoring to convert a ternary operator to if-else?

hearty shard
#

Never mind dont trust chatgpt

#

holy bool heaven

upper vapor
teal junco
#

mine was slightly better

hearty shard
upper vapor
#

how about you regex it

teal junco
upper vapor
#

me

hearty shard
upper vapor
#

compiled, maybe

#

but it's much more readable

#

(.+?)(TED|DED|D|ING|S|SH|CH|X|Z)? to extract the word and suffix
then you can switch on the suffix

#

gotta do this per word

hearty shard
#

i forgot you could just do that

hearty shard
hearty shard
#

I am so happy that i dont deal with custom teams other than serpents rn

teal junco
#

but i assume it doesnt he same thign

hearty shard
teal junco
hearty shard
#

But still

teal junco
upper vapor
#

This regex is designed to identify and separate a base word from an optional suffix, assuming an ignore-case matching environment. Let's break it down:

  • ( and ): These create capturing groups. Whatever matches inside these parentheses will be captured and can be referred to later.

  • V (.): This matches any character except a newline.

  • +: This is a quantifier that means "one or more" of the preceding character. So, .+ means "one or more of any character."

  • ? (after +): This is another quantifier, but when placed after + (or *), it makes the preceding quantifier "lazy" or "non-greedy."

    • Greedy (.+): It would try to match as much as it possibly can while still allowing the rest of the regex to match.
    • Lazy (.+?): It tries to match as little as possible while still allowing the rest of the regex to match.
      In this context, (.+?) will match the shortest possible string of characters until it encounters one of the suffixes in the next group. This is crucial for correctly identifying the base word.
  • ( and ) (second set): This creates another capturing group for the suffixes.

  • TED|DED|D|ING|S|SH|CH|X|Z: This is a list of alternatives separated by the | (OR) operator. It will match any of these specific sequences of characters.

    • TED: Matches "TED"
    • DED: Matches "DED"
    • D: Matches "D"
    • ING: Matches "ING"
    • S: Matches "S"
    • SH: Matches "SH"
    • CH: Matches "CH"
    • X: Matches "X"
    • Z: Matches "Z"
  • ? (after the second group): This quantifier means "zero or one" of the preceding element. In this case, it makes the entire suffix group optional. This means the regex will still match even if none of the specified suffixes are present at the end of the string.

How it works with ignore-case:

With the ignore-case flag enabled, the regex will match the specified suffixes regardless of their casing. For example:

  • TED will match ted, Ted, tEd, teD, etc.
  • D will match d, D.
  • ING will match ing, ING, iNg, etc.

Examples:

Let's see how this regex would parse different strings (with ignore-case):

  • "JUMPING"

    • (.+?) would lazily match "JUMP"
    • (TED|DED|D|ING|S|SH|CH|X|Z)? would match "ING"
    • Group 1: "JUMP"
    • Group 2: "ING"
  • "BOXES"

    • (.+?) would lazily match "BOX"
    • (TED|DED|D|ING|S|SH|CH|X|Z)? would match "ES" (as S is matched, the engine moves on, assuming "E" is part of the base word)
    • Group 1: "BOXE"
    • Group 2: "S"
  • "WALKED"

    • (.+?) would lazily match "WALK"
    • (TED|DED|D|ING|S|SH|CH|X|Z)? would match "ED" (as D is matched)
    • Group 1: "WALKE"
    • Group 2: "D"
  • "TEACH"

    • (.+?) would lazily match "TEA"
    • (TED|DED|D|ING|S|SH|CH|X|Z)? would match "CH"
    • Group 1: "TEA"
    • Group 2: "CH"
  • "RUN"

    • (.+?) would match "RUN"
    • (TED|DED|D|ING|S|SH|CH|X|Z)? would match nothing (because none of the suffixes are present).
    • Group 1: "RUN"
    • Group 2: null or undefined (depending on the regex engine)

In summary:

This regex aims to split a word into a base part and an optional ending, specifically looking for common English suffixes. The (.+?) (lazy matching) is key to ensuring that the base word is as short as possible before a recognized suffix is found. The ? at the end makes the suffix optional, allowing the regex to match words with or without these endings. The ignore-case flag ensures that the matching is case-insensitive.

#

thanks gemini

#

i could improve it to handle e endings but i'm lazy

grand flower
#

gippity

upper vapor
#

cuz gpt was dumb

#

regex would probably still be slower than manually doing endswith

teal junco
#

so could I just do a function that takes the string and processes it with a few if-else?

#

okay that would probably kinda suck but thats all I would understand

upper vapor
#

maybe make an extension method to check multiple suffixes in one call

teal junco
upper vapor
#

ye

#

if (text.EndsWithAny("ted", "ded"))

#

make it a static array cuz params is expensive

teal junco
#

Oh i see

upper vapor
#

insanity

slate flume
grand flower
#

anyone else get issues where the pickup created event doesn't get called when a player drops an item?

#

or ammo

teal junco
#

but someone already provided a constructor

slate flume
slate flume
#

I won't lie I'm just confused as to how and why they use an animation curve for damage

#

I''m gonna look into it

grand flower
#

time is distance

#

value is damage

#

@slate flume

#

kinda makes sense if Unity doesn't have any other curve class

slate flume
#

Unity doesn't have other curve classes?!

#

Insane

grand flower
#

no idea

#

I don't use Unity professionally

slate flume
#

I don't use unity lol

grand flower
#

seems like it doesn't yeah

slate flume
#

I'll just modify the curve myself then evilwoody

#

Values/2

#

Half the damage

#

Ez pz

grand flower
#

tbf animation curves would act like any other curves anyway

grand flower
slate flume
#

If it's really that easy I just make my own curve with half the values

grand flower
#

just make sure not to modify the prefab

slate flume
#

Ez

grand flower
#

or you'll modify the damage for every grenade that gets thrown

slate flume
#

Yeah lmao

grand flower
#

and if you do it over and over again your grenades will do no damage

#

(funny 14.1 bug we had when porting, jk not funny ripped my hair out figuring that one out)

slate flume
#

I'm probably just gonna initialize my own copy on the first throw and apply it to any grenades I need half damage on

grand flower
#

except we did the opposite

#

so like

slate flume
#

INFINITE DAMAGE

grand flower
#

grenades would one shot 10000 hp SCPs from 3 meters away

#

yep

#

or make players immortal

slate flume
#

Cyn you're my hero you explain so much shit to me

grand flower
#

if you did enough damage through one

#

Happy to help

slate flume
#

🙏🏼

grand flower
#

I just track the grenade serial, and before the damage gets applied I modify the curve on the instance

slate flume
#

Hell yeah

grand flower
#

that way zero chance of modifying a prefab

slate flume
#

I'm using ExplosionSpawned event so I should be able to avoid it too

grand flower
#

should do it in spawning

#

spawned might be too late

#

spawning exposes ExplosionGrenade Settings {get; set;}

#

that's what you'll want to modify

slate flume
#

👍🏼

#

Simple code

#

Also! Is there a way I can create a primitive that only shows for specific players?

upper vapor
#

You're trying to mutate structs

slate flume
#

Huh

upper vapor
#

Plus, the keys property returns a copy, you need to set it back

#

And, you must create a new animation curve

slate flume
upper vapor
#

The keyframes are structs

#

Setting their value does nothing

#

They're not reference types, they're value types

#

-# Side note, avoid the ForEach method

slate flume
upper vapor
#

Degrades performance

#

Just use foreach if applicable

upper vapor
slate flume
#

Gotcha gotcha

#

I have idea

#

Ez pz

#

@upper vapor check it out I did it lmao

slate flume
#

I haven't so I've just been waiting for other people to mention it

worthy rune
upper vapor
#

But you're still footing yourself in the shoot

slate flume
#

But it works

slate flume
#

I tested it in-game

upper vapor
slate flume
#

Yes

upper vapor
#

So other grenades will also have these settings

slate flume
#

OH

#

I see

#

Okay

#

I thought it was something that was made per-instance haha I didn't think it used the same reference

upper vapor
#

Each Grenade has a reference to the original

#

Yeah

#

Copying the curve for each instance would be pretty inefficient

#

The bane of reference types

slate flume
#

Makes sense

#

I thought I could get around making my own animation curve 😦

#

That's alright it shouldn't be hard

upper vapor
#

You're gonna allocate a few bytes once

slate flume
#

Yeah it's alright lol

#

Wait

#

What

#

My original code works

#

????

#

It doesn't affect regular grenades

#

🤯

#

This is all I do

#

And it only effects the grenades I shot

#

It doesn't affect regular grenades

upper vapor
slate flume
#

I guess I don't have to make my own after all

#

I'm so cool rn

#

I'm doing shit that shouldn't even work

#

But it does!

upper vapor
#

Yeah that should not work

slate flume
#

But it does cause I'm cool and awesome

upper vapor
#

Throw a Grenade at your foot and see how much it damages

#

Set your HP to 1000 or something

slate flume
#

I'll get a clip real quick

upper vapor
#

Humans with no armor should take 240 damage

slate flume
#

Let me get back on my server lol

grand flower
upper vapor
#

They do that

#

But no cooked

slate flume
#

I took 300 damage

#

I was originally at 1000

#

This is what I get with the 0.01f scaling with my item

grand flower
#

oh right yeah that's fine actually

slate flume
grand flower
#

because grenades are instantiated from the prefab

slate flume
#

Teehee

grand flower
#

so the animation curve is a copy

slate flume
#

I'm the goat

grand flower
#

since you're not modifying the prefab you're okay

slate flume
#

😎

#

I'm so fucking awesome

upper vapor
slate flume
#

❤️

#

I love it when I'm right

grand flower
#

tbf that's standard for most engines

slate flume
#

I rarely ever am

restive turret
slate flume
upper vapor
slate flume
#

I never should have gotten it to work this way haha

#

But I did

#

🙂

upper vapor
#

Maybe I only thought that cuz I set the animation curve reference myself for subcomponents

slate flume
#

Hey it's entirely fair

upper vapor
slate flume
#

I pulled a dumb move and it worked

restive turret
#

How long is the dmg curve

slate flume
#

It's beginner's luck

#

If we don't have people to try dumb shit how will we ever innovate

slate flume
#

I can check

grand flower
#

should be like

#

5/6 meters iirc

restive turret
#

Poloso

slate flume
#

I logged the times listed for all the keyframes

grand flower
#

huh

slate flume
#

So 9 is where you fully stop taking damage

restive turret
#

Wierd

grand flower
#

9 meter hit radius, cool

slate flume
#

It probably does like .2 damage between 5.7-9 but still exists

limber silo
#

boom

restive turret
#

Boom

#

Anyway back to what I do perfectly, sleep

upper vapor
#

this.Sleep(TimeSpan.FromHours(8));

upper vapor
#

Xd

limber silo
upper vapor
#

How did you decode frames

#

Did you convert the video to raw color data?

limber silo
upper vapor
#

No access

#

:(

limber silo
#

Aren't you a serverhost nerd wow

limber silo
#

iirc I did use ffmpeg to extract frames individually

#

but I don't remember it was over 2 years ago

upper vapor
#

Lol that's so good

limber silo
#

but look at this

#

it was pretty unusable

upper vapor
#

Oofff

limber silo
#

iirc this was around when primitives were released

upper vapor
#

Batching limit I assume

#

You couldn't write enough data per frame

limber silo
#

yeah it was bad, I guess the best way to render images rn is with the text toys you have available

#

I was going to try with broadcasts once but I forgot

#

since they dont have ratelimit

upper vapor
#

Broadcasts

#

Bruh

#

3 lines max

#

In em

upper vapor
#

Uh

#

Less throughput

limber silo
#

2fps videos go wild

limber silo
#

You could make a funny global tv

#

plugin development is beautiful

#

In my mind we had a golden age of plugin development which was really awesome and it was when pint first released the images plugin, iopietro released audioplayer and steven advanced subclasses in the same months, plus lots of cool plugins that were awesome

#

Exiled's tinybrain sanctum was on its best

#

it is kind of nostalgic it was beautiful times

restive turret
upper vapor
#

the

#

actuakl

upper vapor
upper vapor
#

3 lines high though

#

no?

limpid fjord
unique crane
upper vapor
unique crane
#

I'll take a look when I get out of bed

#

Wait I have gitlab on phone

upper vapor
#

good luck checking the scene file

unique crane
#

Eh

#

Oh broadcast area

upper vapor
#

yep