#plugins-dev-chat

1 messages ยท Page 108 of 1

warped prairie
#

REAL lmao

hearty shard
#

50 for loops my beloved

grand flower
#

There's no premature optimization for SL whatever you do will likely have a positive impact

slate flume
#

There's a point where premature optimization is all well and good but you guys take it way too far sometimes

grand flower
#

Especially on limited hardware like you'd have running multiple servers on one machine

slate flume
#

Telling people to shave off nanoseconds when they don't need to

true cedar
#

some of us just like optimizing lol

restive turret
#

Spawning 100_000 item in every room ๐Ÿ”ฅ in same tick

true cedar
#

i like spans

grand flower
#

It's a big part of my skillset DogKek

warped prairie
#

john if statement

slate flume
#

You guys are the case in point of "...the true issue is that programmers have worried about efficiency much too much, in the wrong places, and at the wrong times."

true cedar
hearty shard
warped prairie
#

yea ik lel

grand flower
#

No I optimize aggressively because I work on games that wanna target 64-100 players per server

warped prairie
#

just found that hella funny seeing it

grand flower
#

And I apply those optimizations to everything I do, even SL

#

And it pays off

slate flume
true cedar
#

funny monster game

grand flower
#

Doesn't mean it's a bad thing

slate flume
grand flower
#

Good habits and good skills to have

warped prairie
hearty shard
#

A website doesnt need to send every single page at once

restive turret
slate flume
#

All I did was tell one person the optimization set forth is unnecessary and you guys wanted to start talking about how "important micro-optimizations are" and I think you all are fucking crazy

hearty shard
restive turret
#

With the full DB dump

warped prairie
grand flower
#

SL makes you crazy

slate flume
#

You guys are all likely victims of the fallacy of always needing premature optimization

grand flower
#

No I'm just a good programmer

#

Arguably

#

Okay I'm kinda trolling now sorry

restive turret
#

Error driven programming is how I work

slate flume
#

There are whole books written about why premature optimization isn't always a good thing

grand flower
#

I get your point but I don't think it was overkill in this case

#

Not with SL's bs with RPCs

warped prairie
true cedar
restive turret
#

Just in nature

slate flume
true cedar
#

no ?

grand flower
#

Honestly it probably would at higher player counts

slate flume
slate flume
#

If you optimize something and it has no impact on performance then it's not a good optimization to include

grand flower
#

Again SL runs on hopes and dreams I've done stuff that looked minuscule and somehow improved performance

slate flume
true cedar
#

what if you didnt do 5 optimizations that "didn't improve performance"

grand flower
slate flume
warped prairie
#

just make a todo list and optimise it later

#

ezz

slate flume
#

That's my entire fucking point

grand flower
#

That's how you get tiny things that suddenly eat milliseconds later down the line

restive turret
#

I think I remember the + and - Vector3 patch, or something, it was not a huge but a noticable impact

slate flume
#

You guys keep thinking "everyone needs to optimize everything"
Not everyone is hogging resources with 1500 primitives

slate flume
#

There's 0 point

#

That's what I've been saying the whole time and it's gone over all of your guys' heads

grand flower
#

Who doesn't need the performance in SL???

slate flume
#

I don't understand how this is a complicated point of view

restive turret
#

My optimalization on my Custom Items was literally dont create new classes

grand flower
#

Like okay sure but who's gonna go "fuck yeah ruining my server's tps and idc"

grand flower
#

I give up

hearty shard
#

hey cyn

slate flume
#

If you're ruining the server TPS then you need the optimization

grand flower
#

Hi eve

slate flume
#

If you don't need the performance you don't need to optimize

#

How is that a hot take

grand flower
#

Okay and my tiny piece of code that could be done better doesn't affect tps

#

100 of these later I lost 20 tps

slate flume
grand flower
#

And nothing screams out at me about what's eating performance

#

How? No idea where to start I can't profile the game mmLul

#

Oops should've dealt with it earlier

slate flume
#

That's entirely a skill issue

restive turret
#

Deal with in the root

grand flower
#

Hahahahahahahahahahahahaha

#

Come on

restive turret
#

Dont make plugins

hearty shard
#

"skill issue that you did smth w no noticeable tps drop a few times and now there's drop"

restive turret
hearty shard
#

๐Ÿ˜ญ

warped prairie
slate flume
#

If you use it 100 times it should be pretty fucking obvious why you're losing TPS

warped prairie
#

gg

grand flower
#

I'm getting brainrot

slate flume
#

Just don't be stupid

restive turret
hearty shard
grand flower
#

You say optimizing bad and then it's a skill issue if it piles up

slate flume
grand flower
#

Like, hello?

slate flume
#

Premature optimizing is sometimes bad

restive turret
#

hellom

true cedar
#

omfg

slate flume
#

You're, again, missing the point

grand flower
#

Good luck finding the performance hog in 45 plugins when it's tiny things that pile up

#

You have no profiler, again

hearty shard
#

this entire started based on "pls make distance check to avoid giving someone 60 network msgs a second that they cant see because theyre on the other side of the planet"

#

Im going to bed

grand flower
#

Which is why I aggressively optimize else you fall into that pitfall

hearty shard
#

Well sleep

warped prairie
#

my profiler is disabling everything untill it works better POG

slate flume
grand flower
#

No I mean if you write 100 different pieces of code that gradually add up

#

You didnt optimize them because it's tiny

slate flume
grand flower
#

And now you're fucked

restive turret
slate flume
#

You're acting like everyone has 45 plugins and a large codebase

grand flower
#

Right so all you've said is only valid for small communities?

restive turret
#

Goodnight eve

hearty shard
#

Please feed my pet raccoon for me

warped prairie
slate flume
restive turret
#

Be evil in your dreams like a devil

slate flume
#

If you have a large plugin, sure, you may need the optimization

#

But if you're spawning one or two primitives, why bother

#

My whole point is when people come in here asking for help, you guys act like they 100% need to optimize the shit out of it
It's okay to have slightly unoptimized code when working small-scale

glad pagoda
restive turret
warped prairie
#

lel

slate flume
#

I could take the time to look at every little nook and cranny of my plugin and hyper-optimize it, but I have no need for it because I don't need the performance

hearty shard
slate flume
#

Because my server runs steady 60 tps

#

And I don't do a crazy amount of stuff in my plugin

restive turret
#

(its a switch but IL decided to be if)

restive turret
warped prairie
#

i got the ryzen 1

#

its the #1 which is best

slate flume
#

Lmao

restive turret
#

I dont host shit, I playing with my own pc

feral haven
restive turret
#

So if I having issues with the server on my home pc, then definitely it will be fucked when it goes to public.
I have a lot of shit open and when I test my plugins I firstly write code that "should be good, fix later". Yes indeed for testing you dont need to write a 0 alloc , clean whatever code, but later on when you have a full solution for it then it is good to make your own code not a mess, and somewhat optimize it

#

Making your future self better to less time to rewrite shit. ofc you also doesn't need to write code like the unsafe iterator in list to be optimized

#

There is also many cases where in SL itself could be optimized in such ways that it requires less network packets, more friendly api, easy access to things.

warped prairie
#

tldr;

  • Make whatever
  • Write //todo on shit thats not amazing
  • if its bad when working, fix that stuff
  • if still bad, blame northwood via cope seeth and mald and move on
restive turret
#

Mirror also have some solution for those, well not for all.
Some code in the game is old af so, and probably not been touched since. (ie: 096)

#

Anyway sleepy time

grand flower
feral haven
true cedar
#

ngl i got so burned out

slate flume
#

I like this Fallout guy

warped prairie
#

๐Ÿ”ฅ

random scaffold
#

dead chat

celest thorn
#

now its dead

restive turret
#

Because someone sleep at this time

upper vapor
upper vapor
upper vapor
upper vapor
#

hey

#

what about my 200 moving objects

restive turret
#

That's on you

upper vapor
#

oh you meant the where extension method

#

bru

restive turret
#

Ye

icy knoll
restive turret
upper vapor
#

you think?

celest thorn
#

I think, therefore I am

random scaffold
#

1 mini plugin can crash the server

#

almost add while (true) Round.Restart();

slate flume
#

That means nothing

#

At least not for the point I'm making

random scaffold
#

@harsh thorn when will auto register the handlers

#

in the plugin class

random scaffold
#

its already

#

but it lazy for support

#

also why

#

if exists nw

grand flower
#

Consider that some devs don't want that LULLLLLL

slate flume
#

I don't want it

harsh thorn
grand flower
#

and also yeah it takes a minute to write a base class to do it for you

#

if it's really what you want

slate flume
#

Making your own also lets you control the order in which you register them

#

Which is something I'm actually doing right now

upper vapor
#

also, looking at you, func event

celest thorn
#

The Big Locker is the old mid one?

#

This one?

#

because i totally have the old model and i don't wanna update it but just doing some stuff

upper vapor
celest thorn
#

which one is it?

upper vapor
#

idk what you mean by big locker

celest thorn
#

The black big one

upper vapor
#

what

#

the experimental weapon locker?

upper vapor
#

then

unique crane
#

Yea

upper vapor
#

what's the issue ๐Ÿ˜ญ

celest thorn
#

Because the 3D model on SL is called BasicLockerMid

unique crane
#

The 3 locker replaced by this one

celest thorn
#

and i still have that name on the prefab

#

lol

#

and the old model

upper vapor
#

gotta love windows search

celest thorn
#

Love how i replace everything with basic colors just because i didn't want to import full model

upper vapor
#

MiscLocker?

celest thorn
#

It does still exist this one?

upper vapor
celest thorn
#

wasn't it replaced with the normal one

upper vapor
#

i guess they didn't rename the prefab

celest thorn
#

ig

#

I like it alot that it doesn't have texture

#

and you can see the colors

#

idk why at the time i did it like this

#

its almost 8 months ago i did this

royal mica
celest thorn
#

@unique crane do you know if the like size changed so in a way like is it longer?

#

or smaller

unique crane
#

0 clue

celest thorn
#

sad

#

hope its not

#

else i need to change it

celest thorn
worn gull
#

Where can I changed SCP1576's cooldown?

celest thorn
#

but you can change it

#

by transpilers or by prefixing ig

#

Scp1576Item::ServerStopTransmitting contains it

worn gull
#

Thanks I will try to do it ๐Ÿ˜…

modern lark
#

I noticed that based on height, you cannot spawn primitives and things starts to glitch out concerning colliders / desync

celest thorn
#

but primitives do spawn fine

#

and im still inside the lovely Waypoint

modern lark
celest thorn
#

x: 0
y: 352
z: -42

This is where they spawn

celest thorn
#

for alot of reasons :3

#

but yea i need to find a fix

royal mica
#

by normal I mean expected surface location

celest thorn
#

then the issue still happens

royal mica
#

interesting

celest thorn
#

I think i should bug report it?

royal mica
#

does it happen with other prefabs?

celest thorn
#

im waiting for david to respond or another dev

royal mica
#

wait is this prefab at all

celest thorn
celest thorn
royal mica
#

very interesting

celest thorn
#

Lockers are prefabs

royal mica
#

I assume this is the older locker right?

celest thorn
#

no

#

the new one

#

the standard locker

royal mica
#

I would assume that older locker is not using the waypoint system, but newer one?!

#

Sounds like a bug

celest thorn
#

Standard locker got updated

#

like all of the others

#

so its still technically old one but with a new model

royal mica
#

ah

celest thorn
#

which makes me think that the server is doing something different

unique crane
#

When are you spawning the structure

languid temple
celest thorn
celest thorn
languid temple
#

ah

#

ic

unique crane
#

Do it after OnWaitingForPlayers

languid temple
#

Is that still inv only?

celest thorn
#

the player is already spawned

#

and everything

#

its in a select screen

unique crane
#

weird

celest thorn
#

because yea this is a big issue, and probably need to delay the stuff i was doing :3 (until this gets fixed)

unique crane
#

I guess

celest thorn
unique crane
#

Labapi

celest thorn
#

i did spawn it with base game

unique crane
#

Well you do spawn stuff manually

#

its not the vanilla server isnt it

celest thorn
unique crane
#

Well then

celest thorn
#

LabAPI

#

ok

unique crane
#

Yea

celest thorn
#

let me write down the report

#

with details and how i spawn them

upper vapor
celest thorn
#

im 100% sure

upper vapor
#

Well

celest thorn
#

check the screenshot attached

#

it spawns for the server fine

#

and spawning it anywhere else works fine

#

just on surface

upper vapor
#

Huh

celest thorn
#

just not on the client

worthy rune
#

hmm, could you try using the labapi wrappers to spawn it on surface?

upper vapor
celest thorn
upper vapor
#

let me see

celest thorn
#

not really labapi

upper vapor
#

if it works with sloc, it's zero's fault

celest thorn
#

because i can spawn them everywhere else

#

but NOT in surface

upper vapor
#

send exact spawn pos

celest thorn
#

(0, 356 / 352, -42)

Here's the coordinate

celest thorn
upper vapor
#

right

celest thorn
#

but here's

upper vapor
#

forgor already

celest thorn
#

the spawn location for the map is 352 but locker is 356

#

but in any case both of them don't work

#

so

celest thorn
#

if its client side

upper vapor
celest thorn
#

Wtf?

upper vapor
#

you forgot to write the StructurePositionSync stuff

celest thorn
#

No?

worthy rune
unique crane
#

So its Zero moment isnt it

celest thorn
#

I spawn them on the server?

upper vapor
worthy rune
#

can you try with labapi

upper vapor
celest thorn
#

i 100000000000000000% spawn them on the server

worthy rune
#

or does sloc use labapi

upper vapor
worthy rune
#

yeah

upper vapor
#

since when

worthy rune
#

it should handle it correctly iirc

celest thorn
unique crane
#

Doors are still pending pr ๐Ÿ˜ญ

upper vapor
#

call StructurePositionSync.Start

celest thorn
#

THAT is NOT me

#

let me try

unique crane
#

Show us the code then

upper vapor
#

am i blind

worthy rune
#

oh

upper vapor
#

there's no create method for structures

worthy rune
#

i guess its still not merged

upper vapor
#

xddd

celest thorn
#

thats it

upper vapor
#

bruh

celest thorn
#

I think this is honestly stupid

#

because Start is 100% called

#

else how the server does have it

upper vapor
#

but you've spawned it already

celest thorn
upper vapor
#

instantiate

#

networkserver.spawn

#

on the next frame, start gets called which sets network props

#

but it's too late

celest thorn
#

bruh

#

Ngl

#

this game behaves so strange

#

Love this game EVERY day

unique crane
#

What pending spawning things pR does

#

@celest thorn

celest thorn
#

idk who's the smart pants at nw

#

but the solution was just Start that Component

#

because IT NEVER starts

#

๐Ÿคฆโ€โ™€๏ธ

upper vapor
#

i told you 3 times

celest thorn
#

btw closed it myself

#

with the solution

upper vapor
#

but that's not how unity works
and nw did not think through unity

#

when writing this

celest thorn
#

ngl i spent 3 hours

#

that i could've finished everything

#

for just one line

#

;(

upper vapor
#

GetComponnet

#

what component ๐Ÿ˜ญ

#

people are not gonna know

slate flume
restive turret
#

GetThisComponentOrCrash

celest thorn
#

OH LOL

celest thorn
#

Locker.Loot is never called ;(

#

when im spawning them they spawn with default items

#

even tho i change them

slate flume
#

Check the BetterLockers plugin

#

There's a page for it here somewhere

restive turret
#

Discord search sucks so good luck

slate flume
slate flume
upper vapor
#

me when i set Loot to an empty array and it just works

celest thorn
#

because im doing it for just one plugin

#

not for meow

upper vapor
#

what patch where

celest thorn
#
[HarmonyPatch(typeof(Locker), nameof(Locker.Loot), MethodType.Getter)]
public class ChambersOverride
{
    public static bool Prefix(Locker  __instance, ref LockerLoot[] __result)
    {
        if (!LockerLoot.Instance.Config.Loot.TryGetValue(__instance.StructureType, out List<ConfigLockerLoot> loots))
            return true;
        
        __result = loots.Select(x => x.ToLockerLoot()).ToArray();
        return false;
    }
}

Its just the same as Config LockerLoot but that works for Yaml

upper vapor
#

Loot is a field

celest thorn
#

Ok and?

#

i can modify fields?

upper vapor
#

there's no getter

celest thorn
#

;(

upper vapor
#

did you get a big error when patching?

celest thorn
upper vapor
#

did you

#

patch

#

labapi

celest thorn
#

no

upper vapor
#

uh

celest thorn
#

that probably makes sense

#

on why

#

i didn't patch

upper vapor
#

how about you patch ServerFillChambers and set Loot there

celest thorn
#

I unpatch but never patch

upper vapor
slate flume
#

Ffs

#

The source code is literally right there bro

#

Making your life harder by doing everything except for looking at something that already works

worn gull
#

How can I make a pickup's model invisible?

upper vapor
#

you can't

worn gull
hearty shard
worn gull
celest thorn
upper vapor
#

then you can't pick it up Kek

celest thorn
upper vapor
#

but no physics BOOM

celest thorn
#

Explode

feral haven
worn gull
#

If I set IsAllowed to false on usingitem then it brokes the item and can't be used anymore PepeHands~1

worn gull
#

Bruuuuuuh

upper vapor
#

XD

celest thorn
icy knoll
celest thorn
#

and i think i still have the src of the Counter strike event done by maro and made by Riptide

#

so

#

that one sadly is impossible to bring back

#

code has changed tooooo much

restive turret
celest thorn
#

still haven't decided

#

but neither excluded it

restive turret
#

I have some basics

#

like i made kind of it

celest thorn
celest thorn
#

i would say remove some weapons

#

and it could be cool

#

as an FFA type of gamemode

restive turret
#

i still have no idea how to make the line effect like from the discruptor

#

without need to fire the actual one

celest thorn
#

i've never played unreal tournament so i don't know the guns

restive turret
#

are you free?

#

join vc and can show u

celest thorn
#

yea

#

i can

#

im just finishing off the tourney

#

i need to do Ui

upper vapor
blissful pike
#

Hey, how would I go about adding a custom keycard item within my plugin code?

blissful pike
#

I got to this but I don't know how to add my options onto it

unique crane
#

or something like that

restive turret
blissful pike
#

yeah that's what I'm up to right now

#

thanks

#

but as for color?

random scaffold
#

david helping david

#

lol

#

david community

hearty shard
#

new Color()

blissful pike
#

thanks david

restive turret
#

or Color.red

hearty shard
#

yea

restive turret
#

or
Color.FromHex

random scaffold
#

just read it

blissful pike
#

I guarantee

#

you have not read that

random scaffold
#

yes

#

but so i lost 5 years for c# lol

#

you need only it

#

you not need learn asp net or something

icy knoll
#

i learnt so much about c# in 6 months, you can do the same in 5 years smh

blissful pike
#

there's no option to do it from a hex code ๐Ÿ˜ญ

random scaffold
hearty shard
random scaffold
#

or all

#

lol

#

idk

blissful pike
random scaffold
#

it other

blissful pike
#

OHHHH

#

what the fuck am i being asked for

restive turret
#

new

hearty shard
#

what

#

you need a new instance of it

#

the permission

blissful pike
#

๐Ÿ’€

hearty shard
#

also theres ColorUtility.TryParseHtmlString

upper vapor
#

blud is gonna learn to put new in front of everything

hearty shard
restive turret
#

ye exactly

hearty shard
#

im always right

restive turret
#

me when my enemy is a search engine

icy knoll
blissful pike
#

like this? ๐Ÿ˜ญ

#

didn't do anything in game

random scaffold
#

show types of the arguments

blissful pike
random scaffold
#

keycardlevels is enum?

blissful pike
#

huh?

restive turret
#

its a struct

random scaffold
#

nw moment

upper vapor
blissful pike
#

oh

#

ohhh

#

wait im cooking

hearty shard
random scaffold
#

im guess

#

its null

#

or something

upper vapor
#

clear keycard toomuchtrolling

tepid sluice
#

HSVToRGB

#

wtf is that

blissful pike
#

idk

restive turret
upper vapor
#

converts an hsv color to rgb

#

๐Ÿคฏ

unique crane
#

or yknow

#

Color.black

upper vapor
unique crane
#

Wait hsv

#

so

#

Color.red

icy knoll
#

many people like hex colours instead

#

rather than de-coded rgb values

unique crane
#

HSV is good when your changing color over time

upper vapor
#

that's black

unique crane
#

hm

#

yea

#

Color.black

upper vapor
blissful pike
tepid sluice
unique crane
#

tf is this

icy knoll
unique crane
#

Mountain range picker

upper vapor
blissful pike
#

idk who lucid is ๐Ÿ‘€

upper vapor
#

perception

icy knoll
ashen hound
unique crane
#

Fire

icy knoll
upper vapor
#

please increase the hint duration

icy knoll
#

i was gunna ping paw...

ashen hound
upper vapor
#

interesting

hearty shard
#

guh

ashen hound
#

I can just apply any animation per line mostly

#

any time

hearty shard
#

is it brainrot time

icy knoll
#

@ discord moderators

ashen hound
#

When I use my method like that one
_animPlayer.OverrideLine(0, $"Starts in {Countdown} seconds", (oldText, newText) => new DecryptAnimation(newText, 0.2f));

It will only apply animation on text which changes

hearty shard
#

oh cool

true cedar
icy knoll
#

ok good ur alive

#

just couldnt ping

#

discord crazy

unique crane
#

Paw is alive

#

Yey

celest thorn
#

No alive

#

rock no alive

#

rock sad

sinful bronze
#

When i start make "typing" animation i wanted to use hint animations

#

But it looks some weird

#

:(

restive turret
#

how can i make a player can fly but not actually able to go tru objects?

upper vapor
#

waypoint Kek

sinful bronze
#

yea

restive turret
#

fuck

sinful bronze
#

OR U CAN UPDATE PLAYER POSITION EVERY FRAME

upper vapor
#

or you can add the ensnared effect and ServerOverridePosition every frame

#

yes

#

SSSS for movement

restive turret
#

ensared?

sinful bronze
upper vapor
#

ensnared

#

ensharted

sinful bronze
#

173 effect when someone looks at it

#

Ensruude

upper vapor
restive turret
#

but it still dropping me to the floor

upper vapor
#

gravity 0

restive turret
#

ah

sinful bronze
upper vapor
#

smarty farty

restive turret
#

i am blind af

sinful bronze
#

Gravity -1

#

FpcJumping

restive turret
#

I already TP the player every frame so

sinful bronze
#

All types of madness

restive turret
upper vapor
#

is the Jump method affected by gravity?

restive turret
#

there is a effect for that

sinful bronze
#

I think yes

upper vapor
#

sideways gravity

#

or

#

forward gravity

restive turret
#

up gravity

upper vapor
#

random gravity

sinful bronze
#

hi gravity

restive turret
#

Vector3.random

sinful bronze
#

Nooo

restive turret
#

yes

sinful bronze
#

When i used vector3.random for spawn robots vacuum cleaner it was my biggest mistake of life

soft turtle
#

How does it work? Why don't configs want to appear?

hearty shard
soft turtle
hearty shard
#

it might not be able to properly serialize it?

#

although thered prob be an error

sinful bronze
#

This is strange

hearty shard
#

how are you loading it?

upper vapor
hearty shard
#

is it Plugin<Config>

soft turtle
soft turtle
upper vapor
#

any errors in the console on startup?

soft turtle
upper vapor
#

show your DonatSetting and GroupSettings classes

#

DonutSetting

#

DonรกtSetting

#

-# at slejm

upper vapor
#

they're readonly

#

you can't deserialize readonly properties

#

*get-only properties

soft turtle
upper vapor
#

at this point just remove the constructors and use object initializers

hearty shard
#

oh

#

lel

upper vapor
#

arrays are mutable anyway

hearty shard
#

{ get; set; }

upper vapor
soft turtle
celest thorn
#

chat is so dead that none speaks

upper vapor
#

you have just spoken

warped prairie
pulsar charm
#

Is there a way to keep a coroutine alive even while the server is in idle?

unique crane
pulsar charm
#

I'm pinging uptime kuma to track uptime information but when the server goes idle my coroutine also stops

pulsar charm
unique crane
#

RunCoroutine should take 2 args

hearty shard
unique crane
#

oh

restive turret
#

hey if I use the template item to get the Particle Disruptor ImpactEffectsModule and I send a ServerSendTracer, the client doesnt seem to have those tracers :(

pulsar charm
# hearty shard Real time *

figured it out, it was realtime thx!
for everyone else here's my example:

Timing.RunCoroutine(PingLoopCoroutine(), Segment.RealtimeUpdate);
#

it took a long time to figure out it was the segment I had to change, not the layer integer ๐Ÿคฆโ€โ™‚๏ธ couldn't find any meaningful documentation on mec

#

if you guys do have a usable documentation could you link it here?

restive turret
#

the newest doc for it is fucked

#

like there is nothing in there

celest thorn
restive turret
#

origin is the camera position

#

fixed

#

by sending it to the position of to just the player

unique crane
#

You can get the barrel end position

#
 Vector3 origin;
 if (BarrelTipExtension.TryFindWorldmodelBarrelTip(serial, out BarrelTipExtension ext))
     origin = ext.WorldspacePosition;
 else
     origin = _lastArgs.Player.Camera.position;
restive turret
#

but as you see I using other weapon for it and i dont hink it parses the origin for it

#

OH you mean

unique crane
#

Just the barrel tip

#

Every gun should have it

#

Works alright even in first person

#

from my testing

restive turret
#

well I do stuff like this

unique crane
#

Wait you can send the tracers on any gun?

#

thats crazy

restive turret
#

if you have the tracer and the template, and the data

#

didnt worked before cus it was required the _templateShotData

unique crane
#

oh

#

Epic

restive turret
#

ye, but idk why it doesnt go to the things position

#

nor why it go to the head

unique crane
#

Yeah I think that tracers above your head is known issue

#

thats been here for a while

restive turret
#

:(

unique crane
#

Just move it to half of the player height

restive turret
#

me when no Player.Height

unique crane
#

And if aiming then like 0.65

unique crane
#

I think

#

So like yea

#

Or you can get it from base game

slate flume
restive turret
#

even as scp'S?

slate flume
#

Player Position is .96u in height

slate flume
#

I haven't looked into that one

unique crane
#

FpcModule.CharController.height

slate flume
#

Tuff

restive turret
celest thorn
#

PP ray

restive turret
#

finally

#

fucked up fix

celest thorn
restive turret
#

would be cool if could make this particle slower

unique crane
#

Laser guns are back

celest thorn
restive turret
celest thorn
#

YO FUCKING BOT

unique crane
#

Make it fire it constantly

#

XD

celest thorn
#

LET ME SEND CRAZY

#

Crazy

#

FINALLY

celest thorn
#

CurrentInaccuracy can be manipulated?

static meteor
unique crane
#

maybe on server

#

Like you can make the gun super accurate

celest thorn
unique crane
#

but the cursor will still be normal on the client

celest thorn
unique crane
#

Bro you ask something and then say "idc"

celest thorn
#

desync is not what i care

#

if i change that

#

will the weapon not hit for sure

unique crane
#

Fuck around and find out

celest thorn
#

if i crank it up

celest thorn
#

but there's a place where it can be manipulated or should i do a patch?

unique crane
#

Well.. does it have a setter?

celest thorn
unique crane
#

Guess then

celest thorn
#

;(

#

thats so sad

unique crane
#

Or you can edit the inaccuracy of some specific component

#

as they add/multiply each other

#

You will have to check that however

restive turret
static meteor
#

It works

celest thorn
#

because i don't wanna set

restive turret
#

Out of 16 gun "modes" (secondary and prim)
I made 5

slate flume
#

Just it doesn't modify client expectations so cursors or things aren't changed

restive turret
#

Those that not really client dependent or client checks you can

slate flume
#

None of them are afaik, bullets are always validated by the server

restive turret
#

Many are [Serializable] so

#

For example A7 burning is server related

slate flume
#

Bullets being shot is validated by the server

#

You can always change inaccuracy/spread to the best of my knowledge

restive turret
#

Max ammo and ammo type you can't

slate flume
#

Those aren't bullets being shot

restive turret
#

(idk about max ammo sadly)

slate flume
#

You can change max ammo

#

I do it

restive turret
#

Ah

#

Nice

slate flume
#

Not sure about ammotype because that's niche

static meteor
slate flume
#

I wouldn't mention it if it wasn't synced

restive turret
#

I think i remember ammotype is validated on client too

slate flume
#

You're not able to modify client expectations based on the attachments (eg. it'll still display the max in the inventory as being 31) but the clip size can be shown to be well over that

slate flume
restive turret
static meteor
#

Closest thing you can get to differnet ammo types from my experience is fucking around with the reloading event

restive turret
#

So you can reload

slate flume
# slate flume You can always change inaccuracy/spread to the best of my knowledge

Like I did

[HarmonyPostfix]
[HarmonyPatch(typeof(BuckshotHitreg), nameof(BuckshotHitreg.BuckshotScale), MethodType.Getter)]
public static void BuckshotScalePrefix(BuckshotHitreg __instance, ref float __result)
{
  if (CustomItemData.ContainsKey(__instance.ItemSerial)) __result *= 2;
}

And even though the client doesn't recognize that the spread is increased, it will affect how the server validates the spread

#

Bullets have to be validated by the server, so inaccuracy and spread can always be changed one way or another

restive turret
#

Tbh I would happily see the item stuff getting reworked

restive turret
slate flume
#

I have to do like 4 patches to get max ammo to work

#

Every other gun: 1 patch
Revolver: 2/3 patches

#

Luckily the revolver validation system makes it sync max ammo the best out of any of them

restive turret
#

Maybe I should rewrite it and send it to david

slate flume
#

That'd be heat

restive turret
#

The sad part is

#

No experience in unity

#

๐Ÿ˜ญ

#

And no in mirror

#

Well ferb I know what I gonna do after my SecretTournament project

obtuse spruce
#

is there any XML comments on RageState enum ?

restive turret
#

David

slate flume
restive turret
#

None,
Raging,
Crying,
Sobbing,
PissingOnTheFloor,

slate flume
#

You don't need XML comments

obtuse spruce
#

Ok perfect i was curious about Distressed

restive turret
#

I love the Enranged, // enranged one

hearty shard
obtuse spruce
#

tRUE

slate flume
#

It just sends me to my own plugin

obtuse spruce
#

No event when the rage stop ?

restive turret
slate flume
obtuse spruce
slate flume
restive turret
#

Calming => Dociled (idle)

slate flume
obtuse spruce
slate flume
#

It is

#

When rage ends you go from Calming to Docile

slate flume
#

OnRageUpdate in the 096RageController and check for docile

hearty shard
#

Stopped working in the last month

slate flume
hearty shard
#

some random ahh update broke it

restive turret
hearty shard
#

but im also not on latest rn afaik

slate flume
#

@obtuse spruce

hearty shard
#

So it might be fixed

#

Its raining and thundering like crazy rn

#

โšกโšกโšก

restive turret
hearty shard
#

๐ŸŒง๏ธ๐ŸŒง๏ธ๐ŸŒง๏ธ

obtuse spruce
hearty shard
slate flume
#

You don't need the previous state because you don't go straight from Docile -> Enraged

restive turret
#

What if you do

slate flume
#

It's always Docile -> Distressed -> Enraged -> Calming -> Docile

restive turret
#

With plugin

slate flume
#

Then uh

#

Tough luck

#

I doubt it'll sync anyways

restive turret
#

sync deez

spare zodiac
#

@restive turret u sleepin?

#

is GetComponent same slow as TryGetComponent?

glad pagoda
#

as long as you don't do it 50000 times per frame, it won't matter

spare zodiac
glad pagoda
#

well you're doing something wrong then

#

it's about 2x the cost of a dictionary lookup

#

which is pretty fast

spare zodiac
#

tbh might be that

slate flume
#

Why the fuck are you using GetComponent every frame

#

I don't think I can imagine a single case in which that's a good idea

spare zodiac
slate flume
spare zodiac
slate flume
#

Then why are you checking if it has the component

spare zodiac
#

now I just do it with my ToItem()/ToPickup()

spare zodiac
#

just that I was doing that

slate flume
spare zodiac
#

it's Item to Pickup method and opposite

slate flume
#

Yes, why are you checking for your WalkComponent in those methods

#

What is the purpose

spare zodiac
#

to get the walking component of Npc

slate flume
#

I mean why do you need to get the walking component

#

You're doing a lot of work with using GetComponent when you could just save the component to a variable and reference that variable

spare zodiac
#

I don't want to give dumb answers to you, but I don't have anything else to say

slate flume
#

Wdym bro

#

There are like 50 billion questions

#

Why do you have ToItem / ToPickup? What are the express purposes of these methods?
Why in the methods are you getting the walking component? Why is it important that you have that component in those methods?

warped prairie
#

when she component on my method

#

till I pickup

slate flume
#

Fax

#

I dread the day I'm forced to make a pathfinding algorithm

true cedar
#

just use a*

teal junco
spare zodiac
teal junco
restive turret
#

What i would do is create a hashlist of monobeh/ your BotComponent / components and when you add into it you call a method with the param of the component and you add into the list

restive turret
upper vapor
upper vapor
upper vapor
glad pagoda
#

yeah ReferenceHub vs GetComponent

#

100000 lookup of getcomponent took iirc 1.8x the time

upper vapor
#

hm

celest thorn
teal junco
#

easily fixed :D

celest thorn
#

I love the reference

#

But i know not many know postal

teal junco
#

OH MY GOD THATS WHERE I GOT IT FROM

#

i was thinking about a game the entire time, i couldnt place my finger on what

celest thorn
teal junco
#

yeah

teal junco
#

pretty sure its just postal i was thinking of

celest thorn
#

If you piss on them

tepid sluice
#

So i could have 60/60 tps with MEROptimizer?

#

ive just seen that

celest thorn
#

You can use a cat as a surpressor

celest thorn
#

And there are some stuff

#

But give it a try

#

But still you cannot host a big amount of schrmatics because else the client goes behind

tepid sluice
#

Are there some bugs?

celest thorn
#

I donโ€™t use that

teal junco
#

just be careful with it and youll be fine

upper vapor
celest thorn
#

Like this crazy

teal junco
restive turret
tepid sluice
upper vapor
celest thorn