#plugins-dev-chat

1 messages ยท Page 86 of 1

hearty shard
#

some events have it as nullable

slate flume
hearty shard
#

๐Ÿ˜ญ

upper vapor
#

im going to kill windows

hearty shard
#

anyway

#

i restarted and it fixed

#

no warning !!

upper vapor
upper vapor
hearty shard
#

just as life intended

slate flume
#

Bump

restive turret
slate flume
#

If I want to change Max Ammo and Bullet Inaccuracy for a weapon, what's the best way to do it?

ashen hornet
static meteor
# slate flume Bump
        public static Attachment GetAttachmentByName(this Firearm firearm, AttachmentName name)
        {
            foreach (Attachment attachment in firearm.Attachments)
            {
                if (attachment.Name == name)
                    return attachment;
            }

            return null;
        }
        
        public static bool TryApplyAttachment(this Firearm firearm, AttachmentName name)
        {
            Attachment targetAttachment = firearm.GetAttachmentByName(name);
            if (targetAttachment == null)
                return false;

            uint newCode = firearm.GetCurrentAttachmentsCode();

            for (int i = 0; i < firearm.Attachments.Length; i++)
            {
                Attachment attachment = firearm.Attachments[i];
                if (attachment.Slot == targetAttachment.Slot)
                {
                    uint bitToRemove = 1u << i;
                    newCode &= ~bitToRemove;
                }
            }

            for (int i = 0; i < firearm.Attachments.Length; i++)
            {
                if (firearm.Attachments[i] == targetAttachment)
                {
                    uint bitToAdd = 1u << i;
                    newCode |= bitToAdd;
                    break;
                }
            }

            firearm.ApplyAttachmentsCode(newCode, true);
            firearm.ServerResendAttachmentCode();

            return true;
        }
static meteor
slate flume
static meteor
#

Whats your goal?

slate flume
#

^

unique crane
#

I specifically made it like that XD

ashen hornet
#

good

unique crane
#

So you can do N jumps plugins

unique crane
#

Flappy Task Force

gilded thicket
#

you know i would enjoy marryhing you

unique crane
#

๐Ÿ’€

upper vapor
gilded thicket
#

why the assembly csharp not in nuget

slate flume
#

Also why the fuck did Rider suddenly stop looking at Assembly-Csharp

gilded thicket
#

this very foolish

slate flume
#

I never get it in the compiled list of items anymore

#

I can't find usages accurately anymore

hearty shard
#

nerd

slate flume
#

I'm gonna crash out extreme

slate flume
gilded thicket
hearty shard
#

what is collection id used for since it was specifically mentioned that we got an example of it

gilded thicket
#

thats better.

slate flume
unique crane
#

"Added a CollectionId property to settings that saves values on the client side. Settings with the same CollectionId are shared between servers with the same AccountID."

slate flume
#

I don't know what's happening

gilded thicket
#

v1.1.1 is for which game ver

gilded thicket
hearty shard
#

early-server-build

slate flume
#

And factory reset all settings

gilded thicket
#

lmao

gilded thicket
#

send ur csproj (make sure you dont have your real name in it lol)

hearty shard
gilded thicket
#

1.1.0?

#

wait. i have an idea. i will go look at release notes

hearty shard
upper vapor
#

omg

#

ah hell nawh

#

heeeellllllnawhhh

gilded thicket
slate flume
gilded thicket
#

you were referencing a publicized assembly csharp

slate flume
#

Yes

gilded thicket
#

is it still there

slate flume
#

Sure is

gilded thicket
#

in the publicized folder

slate flume
#

Yepp

upper vapor
#

go to file... invalidate caches

slate flume
#

I literally

#

Just did that

gilded thicket
#

he did

upper vapor
#

omg

#

did you surely republicize and copy it

slate flume
#

I did

#

I can try again

unique crane
#

multiple servers

#

shared SSS preferences

#

eg keybinds

#

I guess

#

SSFieldDemo has example

gilded thicket
#

so if you go to %USERPROFILE%\Desktop\SL Server\steamcmd\steamapps\common\SCP Secret Laboratory Dedicated Server\SCPSL_Data\Managed\Publicized\

#

its 100% there

#

๐Ÿ”ฅ

hearty shard
slate flume
gilded thicket
#

go to wherever your project is and do dotnet restore

#

in terminal

hearty shard
#

yes good example

unique crane
#

Yeah you just

#

Assign Keybind on Server A

slate flume
unique crane
#

and it stays on server B

slate flume
#

I'm crashing out

unique crane
#

if you have the exact same SSS ID and colleciton id

hearty shard
#

tldr i need to set the collection id for this to work

unique crane
#

yes

hearty shard
#

coolio

#

omw to break everyones preferences

gilded thicket
restive turret
#

it will arleady break

#

dont worry

gilded thicket
#

you know that right

slate flume
gilded thicket
#

wait whats the issue again i forgot

#

your plugin is compiling correct?

slate flume
#

Yes

#

The problem is I use FindUsages on an item

#

And it doesn't look into Assembly-CSharp

#

So like I look for usages of some event args and only get my own plugin and LabAPI

#

But I can't find where it's called in the assembly

gilded thicket
#

let me reproduce

#

wait

#

let me reproduce your issue

#

is what i meant

restive turret
gilded thicket
#

when u ctrl + click SendBroadacst in ev.Player.SendBroadcast

#

it decompiles the assembly?

slate flume
#

Yep

#

Takes me right there

gilded thicket
#

ok

#

narrows it down this is so awesome

slate flume
#

That's also LabAPI

#

Which is already working for find usages

gilded thicket
#

broadcastflags

#

do it for that

slate flume
#

Works

gilded thicket
# slate flume

if u right click broadcastflags and do find usages here it finds them?

slate flume
#

OMG yeah lol wtf

upper vapor
gilded thicket
#

in your project does it

#

do that

slate flume
#

But I try to get PlayerIdlingTeslaEventArgs and it doesn't

gilded thicket
#

delete .idea folder

#

close rider before^

slate flume
#

Dope

gilded thicket
#

when u restart

#

rider

#

does it still have the issue

slate flume
#

Still broken :(

#

๐Ÿ˜ญ

gilded thicket
#

u removed and readded the dep right

#

im thinking u have some strange perproject setting

slate flume
#

I have no fucking clue

gilded thicket
#

wait diagnose that

#

can u go on another project and see if it owrks there

slate flume
#

I'll create an entirely new project just to be safe

#

Same thiung

gilded thicket
#

is your resharper laced

slate flume
#

Probably

gilded thicket
#

rename assembly csharp publicized to smth and try that

slate flume
#

Same issue

#

Try finding usages for PlayerIdlingTeslaEventArgs

#

I wanna see if it's just me

#

Or if it's like

frail zinc
#

Use visual studio ClassDTroll

slate flume
#

It doesn't show up

slate flume
gilded thicket
#

my find usages doesnt work like yours does

slate flume
#

Fuck

gilded thicket
#

how did u get it to do that

slate flume
#

WHAT

gilded thicket
#

this is what i got after ctrl + click then find usages

slate flume
#

Broooo so it just

frail zinc
#

Yeah, maybe you should consider my offer ClassDTroll

slate flume
#

Isn't in the assembly?

gilded thicket
#

no

#

it is

#

wait

slate flume
#

Cause it's doing the same thing for you

gilded thicket
#

wait nvm i have the same thing

slate flume
#

Yeah

gilded thicket
#

let me dnspy

frail zinc
#

What are you trying to do

slate flume
#

The problem is that find usages for the event args is showing 0 results from the assembly

unique crane
#

Use dotpeek

#

if rider doesnt work

gilded thicket
#

dotpeek dnspy ilspy whatever

#

but fix rider

frail zinc
#

Idk why so many people around here use rider

slate flume
frail zinc
#

It is like specific to this community x)

upper vapor
slate flume
#

Rider > VS

upper vapor
frail zinc
slate flume
#

I used to use VS exclusively

upper vapor
gilded thicket
#

more lightweight also

slate flume
#

Crazy work

gilded thicket
#
        public bool DealDamage(DamageHandlerBase handler)
        {
            if (this._hub.characterClassManager.GodMode)
            {
                return false;
            }
            SpawnProtected spawnProtected;
            if (this._hub.playerEffectsController.TryGetEffect<SpawnProtected>(out spawnProtected) && spawnProtected.IsEnabled)
            {
                return false;
            }
            IDamageHandlerProcessingRole damageHandlerProcessingRole = this._hub.roleManager.CurrentRole as IDamageHandlerProcessingRole;
            if (damageHandlerProcessingRole != null)
            {
                handler = damageHandlerProcessingRole.ProcessDamageHandler(handler);
            }
            ReferenceHub attacker = null;
            AttackerDamageHandler attackerDamageHandler = handler as AttackerDamageHandler;
            if (attackerDamageHandler != null)
            {
                attacker = attackerDamageHandler.Attacker.Hub;
            }
            PlayerHurtingEventArgs playerHurtingEventArgs = new PlayerHurtingEventArgs(attacker, this._hub, handler);
            PlayerEvents.OnHurting(playerHurtingEventArgs);
            if (!playerHurtingEventArgs.IsAllowed)
            {
                return false;
            }
            DamageHandlerBase.HandlerOutput handlerOutput = handler.ApplyDamage(this._hub);
            PlayerEvents.OnHurt(new PlayerHurtEventArgs(attacker, this._hub, handler));
            if (handlerOutput == DamageHandlerBase.HandlerOutput.Nothing)
            {
                return false;
            }
            Action<ReferenceHub, DamageHandlerBase> onAnyPlayerDamaged = PlayerStats.OnAnyPlayerDamaged;
            if (onAnyPlayerDamaged != null)
            {
                onAnyPlayerDamaged(this._hub, handler);
            }
            Action<DamageHandlerBase> onThisPlayerDamaged = this.OnThisPlayerDamaged;
            if (onThisPlayerDamaged != null)
            {
                onThisPlayerDamaged(handler);
            }
            if (handlerOutput == DamageHandlerBase.HandlerOutput.Death)
            {
                PlayerDyingEventArgs playerDyingEventArgs = new PlayerDyingEventArgs(this._hub, attacker, handler);
                PlayerEvents.OnDying(playerDyingEventArgs);
                if (!playerDyingEventArgs.IsAllowed)
                {
                    return false;
                }
                RoleTypeId roleId = this._hub.GetRoleId();
                Vector3 position = this._hub.GetPosition();
                Vector3 velocity = this._hub.GetVelocity();
                Quaternion rotation = this._hub.PlayerCameraReference.rotation;
                Action<ReferenceHub, DamageHandlerBase> onAnyPlayerDied = PlayerStats.OnAnyPlayerDied;
                if (onAnyPlayerDied != null)
                {
                    onAnyPlayerDied(this._hub, handler);
                }
                Action<DamageHandlerBase> onThisPlayerDied = this.OnThisPlayerDied;
                if (onThisPlayerDied != null)
                {
                    onThisPlayerDied(handler);
                }
                this.KillPlayer(handler);
                PlayerEvents.OnDeath(new PlayerDeathEventArgs(this._hub, attacker, handler, roleId, position, velocity, rotation));
            }
            return true;
        }
upper vapor
gilded thicket
#

wall of text

frail zinc
gilded thicket
#

this is what you are looking for

gilded thicket
upper vapor
slate flume
upper vapor
#

are you running it on wine

gilded thicket
#

no even with wine u cant

restive turret
#

HOW

gilded thicket
#

idk what hes talking about

#

do you mean visual studio code

#

?

upper vapor
slate flume
#

Crazy that dotpeek didn't work

upper vapor
slate flume
#

I also have dnspy

#

Lemme try it

upper vapor
frail zinc
upper vapor
#

"the top pick for java and web developers"

frail zinc
#

Maybe its visual studio code

slate flume
upper vapor
#

yeah

slate flume
#

I do

#

That

#

I don't use dnSpy a lot

restive turret
slate flume
#

OHHH

#

Fuck

#

That's why isn't it

frail zinc
gilded thicket
#

vs is the most common ide

frail zinc
#

Yeah

gilded thicket
#

the spread of rider started with joker on exiled

#

i was there when it all started

upper vapor
#

"visual studio, visual studio code... same thing, just like java and javascript"

gilded thicket
frail zinc
#

Yeah

gilded thicket
#

guys whats the scp # of the fuckass goggles

#

1344?

slate flume
#

Yes

upper vapor
#

yes

gilded thicket
#

thanks

slate flume
#

So did Find Usages break because I updated LabAPI?

gilded thicket
unique crane
upper vapor
#

NO

#

NO

frail zinc
#

Real developers use notepad anyways ClassDTroll

gilded thicket
#

i had to use ts for work

unique crane
#

I ended up as last person in whole class

#

using eclipse

#

when we did java

#

and where did I get?

#

best programmer

#

correlation?

gilded thicket
unique crane
#

I think so

upper vapor
unique crane
gilded thicket
#

i genuinely just use vsc for everything

unique crane
#

We stayed as class the whole time

#

only like 3 people left

gilded thicket
#

i will not fall for your install 10000 jetbrains ide propaganda

unique crane
#

I only used pycharm

#

for python

#

because I didnt know anything else

upper vapor
#

Rider can do python and web anyway

unique crane
#

JavaScript?

upper vapor
unique crane
#

I sleep

upper vapor
#

xd

frail zinc
upper vapor
#

HUH

gilded thicket
#

hahaha my friend uses that

#

unironically

upper vapor
#

python hater spotted

#

opinion accepted

gilded thicket
#

didnt even go to school or anyhting just chose it out of their own volition

restive turret
#

how about you write your own lang

upper vapor
gilded thicket
#

golang rating???

#

am i the only one who uses ai for frontend

upper vapor
gilded thicket
#

i hate all frontend work

#

ai and cursor are a blessing

upper vapor
#

then don't frontend toomuchtrolling

frail zinc
#

Frontend need to be creative

#

It's very difficult

#

And with ai...

gilded thicket
#

no i have the creativity

#

i make the layout myself

#

i just hate making it

#

its repetitive and annoying work

frail zinc
#

Yeah totally

#

And backend is so much logical and easier

gilded thicket
#

yessss

#

i feel like frontend is just scripting

#

backend is so goated

frail zinc
#

x)

slate flume
#

My guess is that because Assembly-Csharp was built with the older LabAPI, find usages breaks when using the new LabAPI in my plugin

slate flume
#

Oh damn

#

So

#

Using the new LabAPI do I have to add it to my server dependencies or something?

#

I've noticed that my server is stalling on startup since updating my plugin's LabAPI

upper vapor
#

are you on early-server-build

restive turret
#

๐Ÿ˜ญ ๐Ÿ˜ข ๐Ÿ’€

slate flume
#

I realize now

#

I have no idea how to change that

gilded thicket
#

r we deaduzz

#

steamcmd?

#

-beta early-server-build

restive turret
#

Or if you are using steam
Properties, beta

gilded thicket
#

when u want to go back to default u dont remove the arg but change it to -beta public

slate flume
#

Thank you

#

The help is 100% appreciated haha

gilded thicket
#

dw dont be ashamed gangy

slate flume
#

Crazy that I learned how to casually do shit like reflection and yet I still need to ask help relating to adding a a bit to the command line

#

Lmao

gilded thicket
#

i struggled with this exact thing for like 1h

#

im goated

slate flume
#

I'm entirely self-taught

gilded thicket
#

same twin

#

im starting in 1 month

warped prairie
#

With SSS changing what will i need to change within existing things to make sure they work still?

gilded thicket
#

nothing

hearty shard
slate flume
gilded thicket
#

yess

#

u should learn random stuff

#

have u only made c# stuff

slate flume
#

I learned HTML and CSS, then Python, then C#

slate flume
#

Somewhere in there I learned Assembly

#

And ig by extension I learned a good bit of IL

gilded thicket
#

break your head

#

i dont know whats the proper way to say this in english

#

lmao this sounds like a threat wait

#

like complicate your life is what i mean

slate flume
#

I always am trying to learn new things

hearty shard
#

idk if i worded it right first time

gilded thicket
#

yesss

#

like make a plugin that has a web panel

#

realworld stuff ๐Ÿ”ฅ

#

FARM job experience

slate flume
gilded thicket
slate flume
#

I got flamed for the idea by other devs in here but I'm gonna do it anyways lmao

gilded thicket
#

is ts tuff

gilded thicket
slate flume
#

Having the know-how to do everything you want to and not relying on other people is kinda tuff

gilded thicket
#

real

#

be unreplaceable by ai ๐Ÿ”ฅ

slate flume
#

Literally

#

I AM the ai

slate flume
#

Now that I've updated Assembly-Csharp to the new public beta I've got my find usages back :)

#

You like my patch?

gilded thicket
#

what

#

is it to have more priority?

slate flume
#

It prevents PlayerHurting events from running for 079

gilded thicket
#

ah ok

slate flume
#

Fun fact: if you run ev.IsAllowed = false; for the RecontainmentDamageHandler in OnPlayerHurting, 079 becomes invincible GoodOne

#

So if you, for instance, have a custom item that isn't supposed to do damage

#

You get fucked over

slate flume
#

I hope you know I immediately reposted that in another channel as if I was the one who found it

gilded thicket
#

tuff

slate flume
#

Thanks for the meme

#

Lmao

gilded thicket
slate flume
#

What's even funnier is I just posted that in an announcements channel on like an 800 player server

slate flume
#

Lmao

#

The funny thing is I have a handful of debug commands that do this type of shit

slate flume
#

I made dummies and gave them aimbot

gilded thicket
#

tuff

slate flume
#

I like this @gilded thicket guy

gilded thicket
#

๐Ÿฅฐ

slate flume
#

You also can't set attachments

#

Luckily though all this means is I have to figure out how to add a subcomponent

slate flume
#

Okay

#

I have no clue what the fuck to do

gilded thicket
#

what r u trying to do

slate flume
hearty shard
#

I dont think thats how sl works

slate flume
hearty shard
slate flume
hearty shard
#

well idk what they made possible in the latest update

#

With firearms

#

but ik theres not a lot yoi could do before

slate flume
#

I just wanna modify bullet inaccuracy and shit

#

Why is that such a problem

hearty shard
slate flume
#

Yeah lmao

hearty shard
#

And if it is.. why attachment

slate flume
#

You can change it on attachments already

hearty shard
slate flume
#

And it syncs with the client

unique crane
#

I have never said it syncs.....

slate flume
#

Well like

#

It doesn't matter where the client thinks the bullet went

#

I'll kill the client

hearty shard
slate flume
#

How why

hearty shard
slate flume
hearty shard
#

If basegame would shoot then do your own raycast thing!!

slate flume
#

Does it really matter where the client thinks the bullet went

hearty shard
#

um

#

idk

slate flume
#

Because afaik shot trajectory, damage, bullet holes, and all that stuff is handled by the server anyways

#

The worst that happens is they like see a hitmarker when they shouldn't afaik

hearty shard
#

i mean

#

also lag lol

static meteor
# slate flume How <:why:974345880972984351>

Max ammo

    [HarmonyPatch(typeof(MagazineModule), nameof(MagazineModule.AmmoMax), MethodType.Getter)]
    internal static class MaxAmmoPatch
    {
        [HarmonyPrefix]
        public static bool Prefix(MagazineModule __instance, ref int __result)
        {
            if (!Utilities.TryGetSummonedCustomItem(__instance.Firearm.ItemSerial, out var customItem))
                return true;
                
            if (customItem.CustomItem.CustomItemType is CustomItemType.Weapon)
            {
                WeaponData weaponData = customItem.CustomItem.CustomData as WeaponData;
                __result = weaponData.MaxMagazineAmmo;
                __instance.ServerResyncData();
            }

                return false;
        }
    }
hearty shard
#

lag compensation is hard to do if you do server only ans dont adjust based on client responses

#

But idk if client needs to be correct

slate flume
#

Thank you mr baguette

#

What I care about is inaccuracy

static meteor
#

HitscanHitregModule::BaseBulletInaccuracy

slate flume
slate flume
#

Unless HitscanHitregModule is per weapon

static meteor
#

Thats not all

slate flume
#

What needs to be compensated for with lag

slate flume
slate flume
static meteor
# slate flume Sucks that these patches don't even work for revolver

Did you try this?

    // TODO: Test this.
    [HarmonyPatch(typeof(CylinderAmmoModule), nameof(CylinderAmmoModule.AmmoMax), MethodType.Getter)]
    internal static class RevolverCylinderPatch
    {
        [HarmonyPrefix]
        public static bool Prefix(CylinderAmmoModule __instance, ref int __result)
        {
            if (!Utilities.TryGetSummonedCustomItem(__instance.Firearm.ItemSerial, out var customItem))
                return true;
            if (customItem.CustomItem.CustomItemType is not CustomItemType.Weapon)
                return true;

            IWeaponData weaponData = customItem.CustomItem.CustomData as IWeaponData;
            __result = weaponData.MaxMagazineAmmo;
            __instance.ServerResync();
            return false;
        }
    }
slate flume
#

I have a working max ammo module

hearty shard
#

client says what it expects, server validates

#

its what most games do afaik

hearty shard
slate flume
#

My patch is sloppy

#

But it works

hearty shard
#

Also i dont think u need a server check when yk

#

That patch can only run on server

slate flume
#

Wait why did

#

I even

#

Do reflection for OnAmmoInserted

#

I forget my motivation for that

hearty shard
#

idk

#

if its event u can only call event from same class its created

#

But still

#

Yucky

slate flume
#

Oh that's why

#

Yeah

slate flume
#

I should be clear about my goal

#

What I want is to increase the spread of a shotgun

static meteor
slate flume
#

Baller

#

Thank you @static meteor

static meteor
slate flume
#

Question

#

Why switch-case

static meteor
#

copied it from exiled ยฏ_(ใƒ„)_/ยฏ

slate flume
#

Oh that's wild

static meteor
#

also theres more in it that i removed

slate flume
#

I'm just gonna

#

And work from there

#

Or actually

slate flume
#

WAIT WAIT WAIT

#

Do we no longer need FpcServerPositionDistributor patches?????

static meteor
slate flume
#

Wait nvm we do

#

:(

#

I thought there was hope

worthy rune
slate flume
worthy rune
#

that was implemented aswell

hearty shard
#

guh

worthy rune
#

it was apart of the waypoint refactor

slate flume
worthy rune
#

yes

slate flume
#

Oh type shit

#

I could give you a smooch rn

hearty shard
#

Guh

worthy rune
#

fun fact, that was implemented before i told anyone about it

#

was curious how much of a performance impact it had so told cyn about it since he was interested about server tps

slate flume
#

That's fire

#

Riptide you're the ๐Ÿ

#

Okay wait

#

So I just updated LabAPI for my plugin and the server

#

So I could test stuff

#

I try to go on my server and I need to change it to the beta so I can get on

slate flume
#

So I change to labapi-beta

hearty shard
#

There is no client beta

slate flume
#

Yeah

#

Fuck

hearty shard
#

you gotta wait

slate flume
#

Yeah I found that out

slate flume
signal steeple
#

Using the new RoleSyncEvent stuff for spoofing roles and I saw the changelog said this:
... we recommend subscribing to FpcServerPositionDistributor.RoleSyncEvent ... returning null will make it follow base-game behaviour

The event itself returns a non nullable RoleTypeId, then creates a new nullable RoleTypeId? with that value, then checks if that value is null, which it never will be.

Func<ReferenceHub, ReferenceHub, RoleTypeId, RoleTypeId> roleSyncEvent = FpcServerPositionDistributor._roleSyncEvent;
RoleTypeId? roleTypeId2 = ((roleSyncEvent != null) ? new RoleTypeId?(roleSyncEvent(referenceHub, receiver, roleTypeId)) : null);
if (roleTypeId2 != null)
{
    roleTypeId = roleTypeId2.Value;
}

So then how do we return null in the subscribed event as instructed by the changelog?

slate flume
#

What

signal steeple
# slate flume What

If there's something you're confused about or something I've made unclear, a question would be better than just saying "what"

slate flume
#

Yeah just one sec I'm playing 079 atm

#

The round started right as I was replying

slate flume
#

That was a really round-about way of saying you can't return null in the RoleSyncEvent

signal steeple
#

I wouldn't say it was a round-about way of saying that at all, I'm just providing enough detail and context

slate flume
#

Don't listen to the changelogs

#

The reason it checks if the roleSyncEvent is null is to see if it can run an action on it

signal steeple
#

Yea exactly, I'm pointing out the inconsistency in the change log

slate flume
#

Oh so you don't need help figuring out what to actually do

#

Got it

#

If you purely have a bug report add it to the LabAPI issues

signal steeple
#

I'm looking for clarification, either the change log is wrong or I'm misunderstanding something here

slate flume
#

It's telling you to return null

#

You can't return null

signal steeple
#

Thanks for the recap

slate flume
#

Np

#

Welcome to SCP: SL

#

They say it works one way but it doesn't

#

That's why there's like 100 open issues on the LabAPI github

#

No offense to anyone at NW I know they do their best I'm just pointing out the fact of the matter

#

Hi @worthy rune :)

worthy rune
#

a dedicated labapi event will be added as an alternative hopefully next update, reason it wasnt added this update was that code was a last second addition

signal steeple
#

Got it, thanks for the clarification

upper vapor
upper vapor
#

.OfType<T>().First()

slate flume
#

Attachments only has getter for getting all subcomponents

#

So I just need to AddComponent?

upper vapor
upper vapor
slate flume
#

I'll be honest

#

I don't know exactly what you mean

#

Because I'm a noob

upper vapor
#

You've decompiled attachments

slate flume
#

Yepper

upper vapor
#

You can see what the getter does

slate flume
#

Yessir

#

OH

#

Wait

#

Nvm

#

I see

#

I forgot about _attachments

#

I'll just set _attachments to null and update the Attachments by calling it

#

๐Ÿ˜

upper vapor
#

Why would...

#

Then you also need to update AllSubcomponents

#

You can just use a collection expression for _attachments

slate flume
#

๐Ÿ˜

#

Maybe?

#

Idk I'll test if it even syncs tomorrow once I can run a server with the new update

upper vapor
#

i guess

#

also override OnAttachmentsApplied and enable it

celest thorn
#

Hmmm i have a question

#

pistol shotgun

upper vapor
#

no neeed for that

#

SubcomponentBase has an OnAttachmentsApplied event

slate flume
#

Oh dope

#

I'll test if any of that worked tomorrow

unique crane
#

It surely is something I would like to do

#

but not sure how to approach it

#

Because final properties are combination of like 3 others

#

should I add another one to the mix?

#

Should I let you override one of them?

#

Should it override the final number?

slate flume
#

YEAH

#

Hype

#

Based david

celest thorn
unique crane
#

eepy

celest thorn
spare zodiac
#

is there no way to get keycard information out of pickup?

spare zodiac
# celest thorn yes

that's fucked how am I supposed to get that information then for saving pickups?

unique crane
#

As of now, you will have to deserialize KeycardDetailSynchronizer.Database

celest thorn
#

i was searching the class

#

david do you know if i can fake a player spinning like the player spins for everyone except himself

unique crane
#

Send the rotation message to specific players?

celest thorn
unique crane
#

You as server send data about other players

#

so just send them fake data

celest thorn
#

i mean couldn't this create problems

unique crane
#

Depends what you want to do

celest thorn
#

but he doesn't see it

unique crane
#

Yeah and then what happens

#

it shouldnt cause any problems tbh

#

just try it and see

celest thorn
#

ig i could try

spare zodiac
unique crane
#

Key is serial number

spare zodiac
#

and the value is what needs to be deserialized

#

but have no clue how

celest thorn
# spare zodiac but have no clue how
    private static void ClientApplyDetails(ArraySegment<byte> payload, KeycardItem template, KeycardGfx target)
    {
        using (PayloadReader = NetworkReaderPool.Get(payload))
        {
            DetailBase[] details = template.Details;
            foreach (DetailBase detailBase in details)
            {
                try
                {
                    detailBase.ApplyDetail(target, template);
                }
                catch (Exception exception)
                {
                    string arg = string.Concat(detailBase.GetType(), '@', template.name);
                    Debug.LogError($"Error applying detail: '{arg}' Payload: {PayloadReader}");
                    Debug.LogException(exception);
                }
            }
        }
        target.OnAllDetailsApplied();
    }
#

This is how the client does it

unique crane
#

I would probably cache them in some struct during KeycardDetailSynchronizer.ServerProcessPickup(pickup)

#

Not entirely sure how does this all work

celest thorn
#

and then figured out

#

oh wait i can use serial

#

im dumb

#

(all of this for custom items)

spare zodiac
spare zodiac
#

that's apply detail though

celest thorn
#

bruh

#

brain moment

#

this is how the client deserialize it

#

just copy how it does it

#

and boom

#

you can have info

#

Crazy i know

spare zodiac
#

no I get what you mean I can use this to deserialize just spoke too quick

spare zodiac
celest thorn
#

PayloadReader is a variable

spare zodiac
#

wait the client does it?

celest thorn
celest thorn
#

because you just read as david said from the database

#

in this same class

#

and then deserialize it like how the client does

spare zodiac
unique crane
#

Its not stripped

celest thorn
unique crane
#

same for keycard details

celest thorn
#

so sad

unique crane
#

you can just look at what it does

spare zodiac
#

stripped? Like it was not removed from source

unique crane
#

Mhm

celest thorn
#

and sometimes client code can be left

#

because its not critical

#

i don't think someone will ever exploit fucking keycards

#

(and i don't think there will be ever an exploit like that)

celest thorn
#

wtf are they going to exploit

spare zodiac
#

for what does NW use the target and template inside the method though?

unique crane
#

there is nothing to exploit

celest thorn
#

keycard saying skibid toiler?

unique crane
#

you just receive data

celest thorn
unique crane
#

You dont want them? ok

celest thorn
#

you know what

#

tell me what you need to find?

spare zodiac
#

the pickups information on keycard so I can delete it and recreate the exact replica

#

but like it's saved inside file and can be restored after restart

celest thorn
#

to the file

#

and read it back with the network reader

unique crane
#

At that point just save what you create

#

you dont need to save the created payload afterwards

celest thorn
#

idk what he wants to do

#

like if he is creating it

spare zodiac
unique crane
#

@spare zodiac What exactly are you doing

spare zodiac
#

I still have no clue where the DetailBase[] information got cretated

random scaffold
#

david moment

celest thorn
celest thorn
#

do what this does

#

only into the server

#

you don't need to apply

#

just read

unique crane
#

Okay so

#

Save the byte array

#

Add it back to the database on start

#

As the database is for both items and pickups

celest thorn
unique crane
#

Then force them to be the same

celest thorn
unique crane
#

If he uses the same seed

#

there will be the same amount of items and such

#

(I think?)

celest thorn
spare zodiac
celest thorn
#

midnights knows where stands are so i think yea

unique crane
#

Or you can just create the item/pickup

#

and then apply the data based on the new serial

#

Create item/pickup -> get the new serial -> set the database entry based on the new serial

spare zodiac
#

oh the database is readonly

unique crane
#

Property itself is readonly

#

you can still add /remove entries

#

that means you cannot do Database = new ()

#

you can, however, still do Database.Add(serial, payload)

spare zodiac
#

can I remove?

unique crane
#

ofc

spare zodiac
#

then I can remove the serial and load it with my data changing some keycard

#

or just rewrite it

spare zodiac
#

KeycardDetailSynchronizer.Database[5] = [];

#

this is really nice though didn't know this can be done, thank you

harsh thorn
#

Or patch FpcServerPositionDistributor::GetVisibleRole as that controls what it wants to fakesync people as

plain gazelle
#

waaaaaaaaaaaaaaaaa

undone bough
#

So, how CollectionId works?

unique crane
#

Multiple servers with same IP

#

collection id stays the same

#

if they have same SSS

#

no need to redo SSS on client on each server

undone bough
#

oh, got it, basically I put one number everywhere

unique crane
#

Mhm

#

Yea

undone bough
#

ty

celest thorn
#

i need to understand how it works

#

do i set a number on each SSS for each server that is the same or what?

hearty shard
#

it does not matter if it is a duplicate

#

0-20

#

anything else will default to how it works rn (no saving across server)

celest thorn
#

Lets make an example

#

i have a dropdown

#

and i set it to 0

#

then i go to the other server and i set the same dropdown to 0

#

this will sync?

undone bough
#

if I set all the settings (buttons, dropdowns and etc) to one number, it will sync?

#

or each setting should have uniq collectionId

celest thorn
#

i don't understand that

#

how it works

soft turtle
#

What is that?

south socket
celest thorn
#

Guys UPDATE IN AN HOUR

south socket
#

OH MY GAWD

celest thorn
#

ARE YOU ALL READY

#

TONIGHT NO SLEEP

#

UPDATE ONLY

#

AND BREAK THIS GAME

south socket
#

WHAT IS SLEEP

south socket
celest thorn
south socket
celest thorn
#

I want to break everything

south socket
#

want to break free from the ads?

celest thorn
#

but something spicy helped me

soft turtle
soft turtle
south socket
#

why

soft turtle
#

Constantly have to update plugins ๐Ÿ˜ญ

hearty shard
#

"constantly" but then its every 2 months

celest thorn
#

this update is peak

#

idc

#

i love this update only love for nw

hearty shard
#

and usually thats small changes that u dont rly need to update plugin for

restive turret
#

would love to actually have a client build so can test actually

celest thorn
#

we have it

#

im going to update everything instantly

#

idc

restive turret
#

and how would i use the FpcServerPositionDistributor.SendRole Hmm

soft turtle
undone bough
pallid galleon
celest thorn
undone bough
#

๐Ÿ˜ญ

celest thorn
#

I mean it would be helpful for alot of servers

pallid galleon
#

yep

#

I wonder if there's stats that show how many players play on official servers versus unofficial servers

celest thorn
#

mine for example top 10 changes

pallid galleon
#

Learning to make plugins for this game has truly been an experience

unique crane
#

-top gear intro music-

celest thorn
unique crane
#

Cullable parent

#

I mean it works you just have to fix the scale

#

and that error message spam

celest thorn
#

rn im playing to pass the time, a gamemode that is a mix of valorant with guns and some movement, gun system of csgo and gambling, omnimovement from bo6 and some guns from bo3

celest thorn
unique crane
#

You said that 50 times when we were testing it

celest thorn
unique crane
#

No it kept spamming silly

celest thorn
#

AHHHH

#

im going to cry

slate flume
#

14.1.3 drop in less than an hour

celest thorn
#

btw

#

@unique crane for the size problem i think i need to set the size of the cullable to 1,1,1

#

and that should fix it

unique crane
#

Yes

celest thorn
#

or do the opposite

#

set the cullable to the size

#

and the prim to 1,1,1

#

btw when sl will have omnimovement

#

great addition to the game

unique crane
#

What

celest thorn
unique crane
#

Ehhhh

#

whats that

celest thorn
#
Zen

๐Ÿš€ COD Black Ops 6: Omni-Movement Explained โ€“ Master the New Mechanics! ๐Ÿš€

Attention, operators! In today's video, we're diving deep into the innovative Omni-Movement system in Call of Duty Black Ops 6. Get ready to elevate your gameplay with this revolutionary feature that redefines how you navigate and engage in the battlefield.

๐Ÿ”ซ I...

โ–ถ Play video
slate flume
#

Oh it's a dumb buzz word

#

Gotcha

celest thorn
#

its max payne system copied

unique crane
#

Me when I can sprint backwards in PD2

#

XDD

celest thorn
unique crane
#

(crazy concept)

#

Guys we are adding new movement system

#

We are calling it

#

Capymovement

#

Its new innovation

slate flume
#

Calling a good movement system "Omnimovement" and acting like it's the next big thing is absolutely an Activision thing

celest thorn
slate flume
#

"Once you experience Omni-Movement there's no going back"

celest thorn
#

crazy client side waypoints

slate flume
#

So question

#

What's the point of waypoints

celest thorn
#

lets see how much i can break the game

celest thorn
#

ALOT

unique crane
#

you stupid

celest thorn
#

i can

unique crane
#

Waypoints are server side too

celest thorn
slate flume
celest thorn
#

but i want to see if i can break the game

unique crane
#

Your gonna cause desync

#

100%

celest thorn
slate flume
#

What about them?

celest thorn
#

Moving OOB

#

Doing all of the cool stuff

unique crane
slate flume
#

Oh dope

unique crane
#

Or rotating platforms

celest thorn
#

.

slate flume
#

That's baller

#

WAIT

#

I have a blackhole item

#

Can I use waypoints for it?

unique crane
#

what

slate flume
#

Like a black hole

celest thorn
slate flume
#

Sucks people in

#

And items

unique crane
#

No thats not how it works

celest thorn
#

its not like that

slate flume
#

Fuck

#

I have no understanding for this

hearty shard
#

waypoints are used for uhhh

#

yk what relative positioning is right

slate flume
#

Yeah

hearty shard
#

waypoints hook you onto them and then you become relative to them

#

so when you move left and right you're moving left and right relative to the eg box

slate flume
#

Yeah

celest thorn
slate flume
#

So why not have a platform underneath a player

celest thorn
#

only problem of relative position

#

is one AND massive

slate flume
#

And move them

celest thorn
#

you cannot create like big asf

hearty shard
celest thorn
#

because of float percision the futher you go out the more bugged it becomes

hearty shard
#

well if you're moving relative to world time not on the box youll just get thrown off

celest thorn
#

its just like you stand on it

#

without any type of physics applied to it

unique crane
#

(this system is used by elevators and was done literally for them)

#

with side effect of less network usage

#

and some downsides too yea..

unique crane
#

with it

slate flume
#

I'm watching players spinning and moving with it rn

unique crane
#

Yes cause that has the waypoint toy

celest thorn
slate flume
#

Yes

unique crane
#

on it

slate flume
#

I'm saying why not use that

unique crane
#

but without it, it wouldnt work

slate flume
#

Yes

#

WHAT ARE WE TALKING ABOUT BRO

hearty shard
#

being used

slate flume
#

I'm saying "Oh so I should use waypoints to sync players with like moving platforms to move them smoothly towards something"

hearty shard
#

which are used in that example

slate flume
#

And you're saying "Oh if you don't use waypoints it won't work"

#

I'M SAYING I WANT TO TRY USING WAYPOINTS WDYM ๐Ÿ˜ญ

unique crane
#

you started that talk about blackhole

slate flume
#

Yes

#

I have a black hole item

#

But players don't move smoothly towards it because it requires on server updates

#

So to sync better put them on a platform and move them towards it

#

And you're telling me that won't work?

unique crane
#

You can put them in air and set gravity towards it

slate flume
unique crane
#

Idk

#

Like 0.1f?

#

maybe less

slate flume
#

Because I don't want it to be noticeable to them that they're off the ground

unique crane
#

There sphere collision check for it

unique crane
#

that wont work then

slate flume
unique crane
#

It could

slate flume
#

I'm getting mixed messages bro

celest thorn
unique crane
#

Zero was talking about platform without the waypoint toy

celest thorn
#

Oh by setting x,z

#

yea

slate flume
#

I was talking about platform with waypoints

celest thorn
#

im stupid

unique crane
#

well he wasnt

#

anyways

celest thorn
unique crane
#

it could work

#

Try it and see

celest thorn
#

I will kiss riptide

#

for this update

slate flume
#

I'm gonna create little platforms for players and move them towards a black hole :)

celest thorn
#

because now i can sleep at night knowing that QA don't fall for spinners and complain that spinners aren't spinning the player

slate flume
#

So waypoints are just the servers way of lerping shit smoothly

celest thorn
#

all of that

celest thorn
#

its like the elevator

slate flume
#

I like it when the client handles shit

celest thorn
#

and they just talk

hearty shard
#

both client and server are getting the position relative to