#plugins-dev-chat

1 messages ยท Page 41 of 1

unique crane
#

Very well then

slate flume
#

Can I make a primitive that's only visible/collidable to certain players?

grand flower
#

visible, potentially

#

collidable, very unlikely

upper vapor
#

fake sync vars

#

you will have to disable collisions on the server

#

and send enabled collider flags to the clients that should have collisions enabled

grand flower
#

that'd still cause rubberbanding on the clients

#

because the server won't agree, and will phase through

limber silo
#

that shouldn't cause rubberbanding

#

but cheaters will be able to bypass it

#

but if you dont care about that, thats the best way

#

you could technically also add a collider with another layer to rhe ones you want to collide and avoid cheaters but well I personally dont think it is worth it

grand flower
limber silo
grand flower
#

so the server doesn't simulate the same inputs?

limber silo
#

not really the inputs

#

like you are not sending the key W to the server

#

however this system wouldnt work with stuff like elevators

#

because the server does simulate movement

#

(which you could disable but it is altering the anticheat and it is disallowed in the VSR)

grand flower
#

I get that you don't send the keys, when I say inputs I'm talking about the acceleration vector, player's rotation etc

limber silo
#

yes but the client wont send any acceleration as it isnt moving

#

so the server wouldnt simulate it

grand flower
#

ah i see

#

somewhat odd but I guess it works in huh's favour in this scenario

limber silo
#

yeah it would also not really work if a player is standing on top of a primitive

unique crane
#

Oh I was right

upper vapor
#

yeah

#

but the height is fixed

#

you can put more content with a smaller font size but it will still be 4rem high then

unique crane
#

Yep

limber silo
#

im waiting for someone to do a hologram with the text toy

#

hologram of a 3d model

grand flower
#

maybe i should get more ram

#

getting too close to max

unique crane
#

Well they will absolute push its limits

#

images ehm

limber silo
#

what you beed 100gb of ram for

grand flower
#

packaging a game

#

it's cooking all the assets

#

the more ram the more responsive my pc stays and the faster it cooks, so i'm happy with it DogKek

#

was expensive though

unique crane
#

I was a bit confused until I looked into your bio

#

Makes sense for UE..

limber silo
#

can someone buy me this

#

thanks, I appreciate it

#

wait it is only 7k

#

I thought it was like 50k

hearty shard
#

๐Ÿ˜ญ

grand flower
#

ouch

limber silo
#

oh

#

the 7k build is not the maxed one

#

if you max 1tb of ram + cpus + gpus etc it is over 40k

grand flower
#

ouch

random scaffold
#

xeon per 5000$

#

nice

celest thorn
#

the value for FpcScaleController the default one is 1,1,1? or is different?

celest thorn
unique crane
#

1,1,1

celest thorn
#

ok nice

#

thank you didn't want to log it out

#

and spawn a dummy

icy knoll
#

i love reading through northwood code because i find stuff like this:

return !(rawString == "default") ? rawString : def;

random scaffold
#

how i can make hints in multiple places by 1 hint?

icy knoll
#

<voffset>

#

<pos>

random scaffold
#

they affect each other

icy knoll
#

wdym

#

oh

upper vapor
#

set line height to 0

icy knoll
#

seperate each thing with

#

<line-height=0%>\n</line-height>

#

simple

random scaffold
#

b doesnt exists

#

@icy knoll ?

icy knoll
#

i dont know

#

works for me

true cedar
#

i imagine it just looks like rawString ?? def

upper vapor
#

it compares the string literal default

true cedar
#

oh

unique crane
#

Where is that

true cedar
#

in that case then its probably rawString != "default" ? rawString : def

true cedar
upper vapor
random scaffold
#

or send the link to example dynamic

true cedar
#

wdym

unique crane
#

Oh its probably this one

true cedar
#

ruei v3 soon eventually

upper vapor
#

@teal junco btw, when checking for the range of speakers, did you account for spectators' targets?

random scaffold
hearty shard
true cedar
#

that um

#

doesnt work

#

ruei v3 eventually !!!!!!!!!!

hearty shard
#

well yeah AutoElement.Create doesnt exist

#

new AutoElement(// options) does

true cedar
#

teehee

icy knoll
#

that makes sense

true cedar
#

i need to finish the parser for ruei

random scaffold
#

so it works or not

#

...

true cedar
#

it works

#

just

#

the examples need some changes

#

u can also wait for ruei v3 which will be, at least, 35% better

hearty shard
#

"50% better"

true cedar
#

look

#

at LEAST 35% better

upper vapor
#

how do you measure that Hmm

true cedar
#

you dont

upper vapor
#

ohhhh

true cedar
#

but trust me it will be soooo cooool

unique crane
#

Their measurement is that he made it up

upper vapor
#

:3

hearty shard
#

david ur BANNED

unique crane
#

Eve your exiled to remote island

hearty shard
#

EXILED ?!

#

hell nah

#

not again

true cedar
untold raft
#

Player velocity is read only?

grand flower
#

Considering how player movement works in SL you're better off just changing the player's position

#

Even if you had access to velocity it'd be overridden by the player immediately since they have full air control & friction on the ground

flat vine
grand flower
#

If you're trying to change movement speed, yeah

untold raft
#

I must save player velocity and after forceclass restore previous velocity

flat vine
unique crane
#

and save their states before changing roles

#

reapply after it has changed

grand flower
#

base game effect saving as a role spawn flag when

untold raft
#

What I mean is that when the player is in motion and the role is changed, the player velocity resets and it is not a smooth transition

grand flower
#

Nothing you can do for that unfortunately

flat vine
untold raft
#

Just make Player.Velocity not only readable or this is impossible because desync etc?

grand flower
#

Even if you were to re-apply the velocity on role change it wouldn't change anything for the player

#

It would probably just feel worse

grand flower
#

What layers do players use when raycasting to pickup an item

slate flume
#

Yay! I found a bug GoodOne

#

Time to make a github issue

grand flower
#

whats the bug

slate flume
#

When the duration of an effect changes, it doesn't call the LabAPI events OnPlayerUpdatingEffect and OnPlayerUpdatedEffect

#

Those only get called when intensity changes

grand flower
#

more like oversight ig

#

unless there's code that calls the event

slate flume
grand flower
#

what i said DogKek

slate flume
#

Yeah lol

grand flower
#

wrong word

slate flume
#

I knew what you meant I meant in replying to say I agree

#

But I wanna point it out so it can be fixed cause it kind of fucks with my effects handler

#

Not like a large amount but it can screw up in niche side-cases

worthy rune
#

if you want you can make an issue for it on the github

unique crane
#

@grand flower

#

Items themself are on InteractableNoPlayerCollision

grand flower
#

Sweet thank you

#

Gonna add some additional checks when a player attempts to pickup an item

#

i.e. through walls

unique crane
#

We added prevention for this in 14.1

#

So you can no longer pickup stuff through walls

grand flower
#

Distance based right

unique crane
#

No it raycast checks on the server too

grand flower
#

That's what we saw in code

unique crane
#

I think

grand flower
#

Didn't see code for that, and we just got one doing it today ^^'

#

Through 079's wall to grab the guns inside its armory

#

Seemed to be some kind of free cam considering the POV of spectators

unique crane
#

Yeah I though we fixed that in 14.1?

grand flower
#

Maybe it didn't make it in

#

Or they found another way

#

But I didn't see anything but a distance check in SearchProcessor or whatever it was called

worn gull
#

How can I use this? - Added a new hint parameter that allows plugin devs to animate hints by inserting animatable values in tags.

worthy rune
#

something like this player.SendHint("<pos={0}>Test</pos>", [new AnimationCurveHintParameter(...)]);

worn gull
#

Thanks!

solid mica
#

What are the ways to scale the player?

hearty shard
#

at least on 14.1.1

#

otherwise youll have to set transform.localScale and then resync the player

icy knoll
#

anyone know how to spin the barrel of a revolver?

icy knoll
#

yeah

hearty shard
#

that reminds me

true cedar
#

i know

#

im working on it

#

but

#

it might be REALLY hard to get working

icy knoll
unique crane
icy knoll
unique crane
#

Oh well

icy knoll
#

atleast i couldnt find it

unique crane
#

RevolverRouletteModule

icy knoll
#

yeah that's what i used

#

now i just dont know how to shoot

#

let alone a fake shot

#

like the noise goes off but bullet doesnt leave

unique crane
#

Problem with shooting is that you cant force fire a weapon in first person

#

Thats handled client-sided when you press the trigger button

icy knoll
#

fuck sake man

unique crane
#

But other than that

#

DoubleActionModile.Fire()

icy knoll
#

will that play the sound for everyone or actually fire the bullet?

unique crane
#

Yes

#

But

icy knoll
#

youve got to be fucking with me

#

there has got to be a way to fire a weapon so that everyone hears the fire go off

#

that's really all i want

#

lol

hearty shard
unique crane
#

Its backtracking data

hearty shard
#

oh

unique crane
#
SendRpc
(
    condition: hub => hub != Firearm.Owner && !hub.isLocalPlayer,
    writerFunc: x => x.WriteSubheader(MessageType.RpcFire)
);
icy knoll
#

SendRpc on what tho?

unique crane
#

On the double action module

icy knoll
#

okie

unique crane
#

This sends message that someone fired from a weapon

icy knoll
#

thanks david

#

also

#

make the labapi firearm stuff better

#

legit have to rely on FirearmItem::Base

#

smh

unique crane
#

And if you want to fire and make a hole

#
new ShotBacktrackData(Firearm).ProcessShot(Firearm, target => _hitregModule.Fire(target, shotEvent));
#

In context for DoubleActionModule

icy knoll
#

nah i think i got it

#

does SendRpc remove the bullet from the chamber or nah?

unique crane
#

Nope it just plays the anims

icy knoll
#

time to try figure out how to clear the chamber then

unique crane
#

chamber.ContextState = CylinderAmmoModule.ChamberState.Discharged;

icy knoll
#

me when there is no way to get current chamber furisob

#

unless im dumb

unique crane
#

CylinderAmmoModule.Chamber chamber = _cylinderModule.Chambers[0];

#

Its always the 0th index

#

Even if you rotate it

icy knoll
#

oh damn

unique crane
#

It readjusts itself

#

Then you go to the CylinderAmmoModule and resync it

icy knoll
unique crane
#

Yeah well thats very much the base game one

random scaffold
#

fk20sq4

random scaffold
#

@true cedar how i can change height?

#

vertical pos

icy knoll
#

for example

#

done

random scaffold
#

in ruei

icy knoll
#

yes

#

voffset

#

works in everything?

random scaffold
#

it dont have ready property?

random scaffold
#

@true cedar what wrong?

icy knoll
random scaffold
#

but not for vertical position

icy knoll
#

huh?

icy knoll
#

you sending that doesnt answer my confusion

unique crane
#

Didnt Paislee said that the hint framework doesnt work right now?

icy knoll
#

just poorly

#

they are making v3

unique crane
#

oh

#

Okay

random scaffold
#

oh

#

pos it vertical

hearty shard
#

but i use ruei on my server

random scaffold
#

@true cedar how i can temporally show hint?

#

to 10 or 20 seconds

ionic prawn
#

is there a tutorial or a api that helps to make custom items?

#

i can use pluginapi or labapi

random scaffold
hearty shard
#

or something

true cedar
#

raaaahh

icy knoll
#

didnt work for me properly

#

idk

#

wait no

#

nvm

#

that was different thing

true cedar
#

im gonna scream

random scaffold
#

what are the boundaries of zIndex?

ionic prawn
#

if (ev.KnobSetting == Scp914KnobSetting.VeryFine)
{
if (ev.Item.Type == ItemType.KeycardO5)
{
ev.Player.RemoveItem(ev.Item);

            ev.Player.AddItem(ItemType.Jailbird, ItemAddReason.Scp914Upgrade);
        }
    }

i dont understand why it dosent remove the item

icy knoll
random scaffold
ionic prawn
#

where should i put it?

random scaffold
#

where you remove item

ionic prawn
#

ok

#

so replace it?

true cedar
unique crane
ionic prawn
restive turret
#

like exact event

#

On914Upgraded or upgrading

#

etc

ionic prawn
#

i dont see a 914upgraded or upgrading

static meteor
#

Is it UpgradingInventoryItemEventArgs

ionic prawn
#

im using labapi and i dont find it

#

public override void OnScp914ProcessingInventoryItem(Scp914ProcessingInventoryItemEventArgs ev)
{
if (ev.KnobSetting == Scp914KnobSetting.Fine)
{
if (ev.Item.Type == ItemType.Coin)
{
ev.IsAllowed = false;

            ev.Player.AddItem(ItemType.KeycardJanitor, ItemAddReason.Scp914Upgrade);
        }
    }

    if (ev.KnobSetting == Scp914KnobSetting.VeryFine)
    {
        if (ev.Item.Type == ItemType.KeycardO5)
        {
            ev.IsAllowed = false;

            ev.Player.AddItem(ItemType.Jailbird, ItemAddReason.Scp914Upgrade);
        }
    }
}
static meteor
#

This is what i do

        public void OnItemUpgrade(Scp914ProcessingInventoryItemEventArgs ev)
        {
            if (ev.Item.IsCustomItem())
                ev.IsAllowed = false;

            foreach (CustomItem customItem in CustomItem.List)
            {
                if (customItem.HasModule(CustomFlags.Craftable))
                {
                    foreach (CraftableSettings craftableSettings in customItem.FlagSettings.CraftableSettings)
                    {
                        if (UnityEngine.Random.Range(0, 100) <= craftableSettings.Chance)
                        {
                            if (ev.Player.CurrentItem.Type == craftableSettings.OriginalItem && ev.KnobSetting == craftableSettings.KnobSetting)
                            {
                                ev.Player.RemoveItem(ev.Item);
                                new SummonedCustomItem(customItem, ev.Player);
                                LogManager.Debug($"{nameof(OnItemUpgrade)}: Gave {customItem.Name} to {ev.Player.Nickname}");
                            }
                        }
                    }
                }
            }
        }
random scaffold
ionic prawn
static meteor
#

Pickup

ionic prawn
#

oh ok

static meteor
#

Scp914ProcessingPickupEventArgs

icy knoll
#

@hearty shard please add UnregisterAll to IRegister ๐Ÿ™

hearty shard
#

imagine unregistering

icy knoll
#

grrrrr

#

fine

icy knoll
#

@unique crane sorry to ping but why doesn't PrimitiveObjectToy.Create allow you to set a primitive type?

restive turret
#

make a pr

icy knoll
#

just curious

#

is default cube anyway?

restive turret
#

i guess

#

what is 0

unique crane
icy knoll
#

do you know if cube is default tho?

upper vapor
#

sphere is default

icy knoll
#

how to spawn cube ๐Ÿ˜ญ

upper vapor
#

set the primitive type

#

set networkSpawn to false, set the Type then spawn

#

or wait for the update that hopefully adds this

restive turret
icy knoll
#

now to figure out how to make a Quaternion with vector3

#

ugh

icy knoll
upper vapor
icy knoll
#

please

upper vapor
#

-# look at quaternion methods

#

Quaternion.Euler

hearty shard
#

btw

#

lumi

icy knoll
#

thanks

hearty shard
#

if you call it twice

#

it will fail on .Add

upper vapor
icy knoll
#

okie

#

gimme 2s

hearty shard
#

Register()
Unregister()
Register()

= issue

upper vapor
#

just don't call it twice

hearty shard
#

TryAdd or smth

upper vapor
#

how about

hearty shard
#

reload the plugin

#

then it will still break

#

xd

upper vapor
#

registerables[assembly]

icy knoll
#

lol

#

but if someone doesnt call the unregister method

#

kaput

upper vapor
upper vapor
hearty shard
#

well theres Disable feature in LabAPI

#

soo PI_Shrug

upper vapor
#

no command though

upper vapor
restive turret
icy knoll
upper vapor
#

return false

icy knoll
#

also when the hell does RoomType get added to labapi, RoomName sucks

hearty shard
#

never

icy knoll
#

currently in the process of migrating my exiled plugin to labapi so ima have some questions

is there an event for using item but it's called after the animation has ended but before the item is used?

random scaffold
#

no

#

add yourself to labapi

#

what here can be wrong?

#

its show each second

#

lol

#

@true cedar

true cedar
#

i don't provide support for ruei v2 anymore

#

im gonna be honesy

random scaffold
#

....

true cedar
#

you've pinged me 4 times

unique crane
#

Perhaps

icy knoll
unique crane
#

Oh after the animation has ended

#

cant read

icy knoll
#

smh

unique crane
#

no

icy knoll
#

:c

#

also time to make a suggestion for adding escape time to PlayerEscapedEventArgs

hearty shard
#

@icy knoll i hate you!!!

#

breaking changess!!!!

icy knoll
#

wdym breaking changes what

hearty shard
#

i realized

#

IRegister will be a breaking change

#

i mean ill fix it to not be

icy knoll
#

how will it be breaking

#

smh

hearty shard
#

if you have IRegister

#

and TryUnregister is called

#

but you havent updated

icy knoll
#

ohhhhhh

#

yeah rip

hearty shard
#

same reason why NW added default to interface

#

for ICommand

icy knoll
unique crane
#

with adding that

icy knoll
#

ah

random scaffold
#

which <size> by default in hint?

#

<size=25> - less

icy knoll
#

*god why are some things so complicated, why is checking if the damage type is pocket dimension on death so hard ๐Ÿ˜ญ

icy knoll
#

yeah

#

cant figure it out

hearty shard
#

rly easy last i checked

icy knoll
#

ive gotten to as far as checking if the dmg handler is a UniversalDamageHandler as i cant see one specific to pocket dimension

hearty shard
#

cuz its universal

#

thats correct

#

however

#

check the translation!

icy knoll
#

that's what im doing next

hearty shard
#
if (ev.DamageHandler is not UniversalDamageHandler universalDamageHandler ||
                universalDamageHandler.TranslationId != DeathTranslations.PocketDecay.Id)
                return;
#

ez

icy knoll
#

tyvm :3

icy knoll
#

final question me thinks? does swinging the jailbird come under using item?

random scaffold
#

bybygaga

ionic prawn
#

how should i add chaos keycard to my remote keycard in a good way

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);
}
true cedar
unique crane
#

Or just.. use %

ionic prawn
#

why isnt chaos keycard in KeycardItem?

unique crane
ionic prawn
#

how should i fix it

unique crane
#

There is a PR that fixes it but it didnt make it into 14.1.1

ionic prawn
#

bruhh

unique crane
#

for it

#

sorry

ionic prawn
#

i have tried but it dosent work ):

ionic prawn
#

@unique crane how should i fix it even cause i when i try to add another check it just beocmes and error

unique crane
#

foreach (Item item in player.Items)

        if(item is ChaosKeycardItem chaosKeycard)
              ................
        if (item is KeycardItem keycardItem)
            flags |= keycardItem.Base.GetPermissions(requester);
#

like that I assume

ionic prawn
#

ok

random scaffold
#

@true cedar 5 ping, when will be next ruei version?

true cedar
#

oh my fucking god

#

I DONT KNOW

random scaffold
#

paislee moment

unique crane
random scaffold
#

5 ping per day it low a count

ionic prawn
#

Severity Code Description Project File Line Suppression State Details
Error (active) CS8121 An expression of type 'Item' cannot be handled by a pattern of type 'ChaosKeycardItem'. NoKeycardHold C:\Users\Admin\source\repos\NoKeycardHold\PluginFunctions.cs 33

#

foreach (Item item in player.Items)
{
if (item is KeycardItem keycardItem)
flags |= keycardItem.Base.GetPermissions(requester);
if (item is ChaosKeycardItem chaosKeycard)
flags |= chaosKeycard.GetPermissions(requester);

    }
true cedar
unique crane
#

them..

hearty shard
true cedar
#

and that means i have to like

soft turtle
#

How to get the amount of damage?

hearty shard
#

.Damage

#

cast to it

rose bridge
#

cedmod is down and i dont have permissions. Where do i put .* at for all permissions

soft turtle
rose bridge
hearty shard
harsh thorn
hearty shard
#

works for me

#

so fix ur cast

ionic prawn
#

cedmod works for me too

true cedar
#

hey eve

ionic prawn
#

i just updated like minutes ago

soft turtle
#

Thx

harsh thorn
#

it also works without updating

rose bridge
#

never mind i found it

harsh thorn
#

itl just spam errors when people try to pick up an item

true cedar
#

can you check what the animated hint parameter takes @hearty shard

#

is it an Animation

ionic prawn
harsh thorn
#

figured

ionic prawn
#

i didnt have to do any commands

#

i hate that they forgot to add the chaoskeycarditem in Keycarditem instead

#

it wont work for me ):

hearty shard
ionic prawn
#

keep getting this error
Severity Code Description Project File Line Suppression State Details
Error (active) CS8121 An expression of type 'Item' cannot be handled by a pattern of type 'ChaosKeycardItem'. NoKeycardHold C:\Users\Admin\source\repos\NoKeycardHold\PluginFunctions.cs 33

true cedar
hearty shard
# true cedar yea
public AnimationCurveHintParameter(
      double offset,
      AnimationCurve curve,
      string format,
      bool integral)
    {
      this._offset = offset;
      this._curve = curve;
      this._format = format;
      this._integral = integral;
    }
unique crane
#

Check that

ionic prawn
#

InventorySystem its refering too

upper vapor
true cedar
#

cumulative

hearty shard
#
public override string UpdateState(float progress)
    {
      float f = this._curve.Evaluate((float) (NetworkTime.time - this._offset));
      return this._integral ? Mathf.RoundToInt(f).ToString(this._format, (IFormatProvider) CultureInfo.InvariantCulture) : f.ToString(this._format, (IFormatProvider) CultureInfo.InvariantCulture);
    }
#

it rounds to int

#

thats it

true cedar
#

screams

soft turtle
ionic prawn
#

is ChaosKeycardItem supposed to refer from InventorySystem?

hearty shard
#

what r u checking for

#

some have dedicated damage handlers

#

others you can use UniversalDamageHandler and check its id

soft turtle
hearty shard
#

doesnt exist

soft turtle
hearty shard
#

so

#

what r u actually checking

#

for

#

207?

#

pocket dimension?

true cedar
ionic prawn
unique crane
#

The one from LabApi.Wrappers

ionic prawn
#

k

true cedar
#

because now i need to make every single position thing one of those blehhh

ionic prawn
soft turtle
hearty shard
#

other stuff like Warhead & Scp018 has its own

ionic prawn
#

@unique crane cant find it in LabApi.Wrappers

soft turtle
hearty shard
#

ig

soft turtle
ionic prawn
restive turret
#

bc it doesnt exists?

ionic prawn
#

but davidsebesta said it did?

#

where should i get ChaosKeycardItem then @restive turret ?

restive turret
#

.Base
and InventorySystem.Items.Keycards.ChaosKeycardItem

ionic prawn
#

Severity Code Description Project File Line Suppression State Details
Error (active) CS8121 An expression of type 'Item' cannot be handled by a pattern of type 'ChaosKeycardItem'. NoKeycardHold C:\Users\Admin\source\repos\NoKeycardHold\PluginFunctions.cs 34

still same error
using KeycardItem = LabApi.Features.Wrappers.KeycardItem;
using ChaosKeycardItem = InventorySystem.Items.Keycards.ChaosKeycardItem;

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);
        if (item is ChaosKeycardItem chaosKeycard)
            flags |= chaosKeycard.GetPermissions(requester);
           
    }

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

@restive turret

restive turret
#

item.Base is Chaos...

#

or just literally steal from any of the thing

ionic prawn
#

i dont understand ๐Ÿ˜ญ

hearty shard
ionic prawn
hearty shard
#

check item.Base for IDoorPermissionProvider instead of item

upper vapor
#

just use secretapi shrug

ionic prawn
hearty shard
#

GUH?

true cedar
#

so true

#

it doesnt have a license that means you're free to steal it

ionic prawn
true cedar
#

(source: i'm a lawyer)

upper vapor
true cedar
#

yea 100%

ionic prawn
#

my brain dosent understand anything with the problem i am having rn and even if someone tells me the solution

#

):

random scaffold
hearty shard
ionic prawn
hearty shard
#

I blame pai for everything

ionic prawn
#

also my brain is on fire

#

can someone just tell me what to change with what to make it work in -24 iq

#

@hearty shard can you just show me what to change ๐Ÿ˜ญ

namespace NoKeycardHold;

using Interactables.Interobjects.DoorUtils;
using InventorySystem.Items.Keycards;
using LabApi.Features.Wrappers;

using MapGeneration.Distributors;
using KeycardItem = LabApi.Features.Wrappers.KeycardItem;
using ChaosKeycardItem = InventorySystem.Items.Keycards.ChaosKeycardItem;

public class PluginFunctions
{
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);
        if (item is ChaosKeycardItem chaosKeycard)
            flags |= chaosKeycard.GetPermissions(requester);
           
    }

    return requester.PermissionsPolicy.CheckPermissions(flags);
}

}

hearty shard
#

im on phone rn

ionic prawn
#

okie

ionic prawn
#

in the secretapi

hearty shard
#

extensions

#

player extensions

#

probably

ionic prawn
#

ty

#

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

if (player.IsBypassEnabled)
    return true;

if (player.RoleBase is IDoorPermissionProvider roleProvider)
    flags |= roleProvider.GetPermissions(requester);

foreach (Item item in player.Items)
{
    // Unified way to handle KeycardItem, ChaosKeycardItem, or any other future items
    if (item?.Base is IDoorPermissionProvider provider)
        flags |= provider.GetPermissions(requester);
}

return requester.PermissionsPolicy.CheckPermissions(flags);

}

#

no errors ๐Ÿ˜„

#

just a question..

#

does keycard add themself up in my code

#

cause if it does i want to keep it

#

if it dosent i want to fix it

#

is there a force equip in labapi so like it force holds the item?

#

oo nvm i found it

#

i think so

hearty shard
#

Probably

ionic prawn
#

does setting currentitem also add it

hearty shard
#

should?

ionic prawn
#

set

#

should it be itemtype?

hearty shard
#

Item

#

Labapi item

ionic prawn
#

k

#

Severity Code Description Project File Line Suppression State Details
Error (active) CS0119 'JailbirdItem' is a type, which is not valid in the given context NoKeycardHold C:\Users\Admin\source\repos\NoKeycardHold\EventsHandler.cs 106

#

ev.Player.CurrentItem = LabApi.Features.Wrappers.JailbirdItem;

hearty shard
#

it has to be an actual item

#

Which exists

ionic prawn
#

jailbird exists?

hearty shard
#

Not just to the namespace it lives in

hearty shard
#

You need to have a jailbird

ionic prawn
#

ev.IsAllowed = false;
ev.Player.RemoveItem(ev.Item);

            ev.Player.AddItem(ItemType.Jailbird, ItemAddReason.Scp914Upgrade);
            ev.Player.CurrentItem = LabApi.Features.Wrappers.JailbirdItem;
hearty shard
#

Or you cant set a player to have a jailbird because jailbird doesnt work

hearty shard
#

you add

#

and make it that

ionic prawn
#

var jailbird = ev.Player.AddItem(ItemType.Jailbird, ItemAddReason.Scp914Upgrade);
ev.Player.CurrentItem = jailbird;

#

easy?

hearty shard
#

try that

ionic prawn
#

and also how does pickup in 914 even work

#

cause im trying to detect what item it is

icy knoll
#

and just get the pickup

grand flower
#

is the new scaling stuff broken or am I having a skill issue

unique crane
#

It has been tested ๐Ÿ˜ญ

grand flower
#

Nah probs just on our side

unique crane
#

Tell me

grand flower
#

Trying to port our manual scaling stuff to the new system

unique crane
#

Ahhh

grand flower
#

And now the server is just dying with no exception, no logs, just instant death

#

gonna be fun to debug

harsh thorn
#

i love those crashes

#

(i dont)

grand flower
#

I like how easy the new scale stuff

#

i just wish I could see it work mmLul dunno which part of my code's doing this

#

no clue how i'm going to debug this ugh

hearty shard
#

Uh

#

2025-06-12 22:54:37.560 +02:00] Game server has not sent a heartbeat in 30 seconds. Restarting the server in 10 seconds! Type "hbc" command to abort!

#

We love to see it...

#

No errors..

grand flower
#

wait

#

you too?

hearty shard
#

Round start i believe

grand flower
#

did you do scale stuff

hearty shard
#

idk

grand flower
#

idk i just started playing with scale on a dummy and this happened

#

unsure if it's my code or the scale stuff

hearty shard
#

player.Scale = new Vector3(0.8f, 0.8f, 0.8f);
player.EnableEffect<InfiniteStamina>();

#

This was called before crash

#

Idk if its why it crashed tho

grand flower
#

@unique crane

#

considering I started crashing right after using the new scale stuff

hearty shard
random scaffold
#

even the working code crashes the server

grand flower
#

more like potential nw moment?

#

not sure

#

but there's defo something fucky atm

unique crane
#

Uhhh

#

Ill try soon

hearty shard
#

idk!

#

But the last known debug statement was custom role add

grand flower
#

Same thing here, got a special component on a dummy that applies a scale on role change

grand flower
#

once the dummy spawns, changes role to an FpcRole and gets scale applied, the server dies

icy knoll
#

how are labapi events invoked? .Invoke()? or is there a better way

#

just repurposing them in my own plugin

grand flower
#

.Invoke()

icy knoll
#

okie

grand flower
#

although

#

no

#

uh

icy knoll
#

i know exiled uses InvokeSafely so was unsure

hearty shard
#

Uh

grand flower
#

PlayerEvents.OnX(theArgs)

#

will call the underlying event

hearty shard
#

yeah

#

C# events can only be called from the class it was created in

#

(hence why LabAPI has methods to call the event)

grand flower
#

I keep forgetting that's a thing

icy knoll
#

me when i dont see the methods inside the file

#

unless im missing smth

grand flower
hearty shard
#

cuz github has auto generated stuff missing

#

Since thats not part of source

icy knoll
icy knoll
hearty shard
icy knoll
hearty shard
#

get out!

icy knoll
#

no u!!

hearty shard
#

the entirety of uhh CustomEventHandler

#

Is source generated

unique crane
#

Okay so the base game scale command works

#

without crashing the server

#

thats a good sign

hearty shard
unique crane
#

Works on a dummy too

hearty shard
#

idk tf happened

unique crane
#

Lets try the LabAPI code

hearty shard
#

i also have no clue if its scale for me

unique crane
#

But it would be weird if it was only labapi

#

it just directs to the base game one

hearty shard
#

Idk

#

But thats the only log i saw

#

Was that someone got added to dwarf

#

And the only change that has occured between 14.1 and 14.1.1 for me in that regard isssssss

#

Scale!

unique crane
#

Uhh one thing I can think of....

#

Add 0.1s delay?

#

Try that

hearty shard
#

WHAT.

unique crane
#

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

#

Give it a try

hearty shard
#

i cant

#

in bed

unique crane
#

Whats the worst that can happen

#

Oh

grand flower
#

I'll try

#

just... not ideal if that's the fix hah

unique crane
#

Im gonna go haunt you in your dreams

unique crane
#

I dont say thats the fix

#

But it has unique ability to solve some of the role related issues to be honest XDDDD

grand flower
#

true

#

lemme just uncomment everything DogKek

#

had to update our servers because our dummies were full size and confusing players

unique crane
#

Trying to change scale via labapi now

#

Nope works too

grand flower
#

the crash for us occurs after changing the dummy's role, in the player role changed event

hearty shard
unique crane
#

Just SSS

hearty shard
#

Og

#

Oh

grand flower
#
private void HandleRoleChanged(PlayerChangedRoleEventArgs args)
{
    // ... 

    // Update the scale of the player.
    UpdateScale();
    // ...
}
hearty shard
#

yeah mines also in ChangedRole

grand flower
#
private void UpdateScale()
{
    if (_owningDummy.roleManager.CurrentRole is not IFpcRole fpcRole)
    {
        return;
    }
    
    var scaleController = fpcRole.FpcModule.Motor.ScaleController;
    scaleController.Scale = _scale;
}
#

in this scenario scale is Vector3.one * 0.2f

hearty shard
grand flower
#

just the way I usually do it when I want a vector3 with components of the same value

#

testing with a delay of 0.1 seconds

#

yep that worked @unique crane

hearty shard
#

a single frame

unique crane
#

Oh so something isnt initalized yet

#

fuck

hearty shard
#

nw fix?

grand flower
#

14.1.2 today confirmed

#

(I make the assertion for you)

#

(hotfix or guillotine /s)

hearty shard
#

14.1.1.1

grand flower
hearty shard
#

๐Ÿ’”

grand flower
#

like

#

the scale isn't right

#

guessing race condition with the spawn message

#

the spawn message should probably contain the scale of the scale controller if that's the case

hearty shard
#

actually

#

scale is force updated

#

by server to client

grand flower
#

why doesn't it work then

hearty shard
#

When new player joins

hearty shard
grand flower
#

ah

#

fair enough

#

should be done to all players then or something

unique crane
#

Unless it got changed

grand flower
#

roles override scale?

hearty shard
#

Oh wait

unique crane
#

Because it isnt initialized then

hearty shard
#

It doesnt when its initlaized

#

Nvm my bad

unique crane
#

On the server

hearty shard
#

Yeah

#

I understandd...

hearty shard
#

New fpc role new scale

#

Its stored in fpc motor

grand flower
#

yeah but

#

hmm

#

right yeah

hearty shard
#

nw fix pls

grand flower
#

so 2 frame delay would guarantee it to work

hearty shard
#

i hate this!!!

hearty shard
grand flower
#

even with latency for clients?

hearty shard
#

but thats timing.CallDelayed into a Timing.CallDelayed

grand flower
#

dunno if mirror does reliable ordering

hearty shard
#

Hm

#

Idk!

grand flower
#

this just makes me hate unity so much more

#

yeah two frames work

hearty shard
grand flower
#

the downside is

#

i'm assuming fake role sync will override the scale for players receiving it

#

right

hearty shard
#

errrr

#

who knows

grand flower
#

tbh the only fake role sync I do is like, to hide them from specs

#

so specs wouldn't see it anyway

#

although if a spectator changes role...

#

into a living one

unique crane
grand flower
#

that might fuck up the scale again

grand flower
#

is the scale message guaranteed to be received after the role change message

#

which brings me to the following questions (if the above is answered with no):

  • Do sync vars get ack'd by players, and re-sent until ack'd
  • If yes to the above: why isn't scale a sync var
#

and yeah this breaks fake role sync in a way

#

because if you send fake role sync data scale will reset

#

and outside of chaining delayed calls there's no fix for this

#

outside of potentially sending it on the reliable sequenced/ordered channel

#

which since the rest of the game doesn't, would also break things if you do it at the wrong time

icy knoll
#

is there any examples of custom data stores?

grand flower
grand flower
#

Then you can do

var store = player.GetDataStore<MyStore>();
#

it'll create it if it doesn't exist

icy knoll
#

but like

#

how do I get the player that goes in base?

#

do I just add a param to the data store constructor?

grand flower
#
public class MyClass(Player owner) : CustomDataStore(Owner)
{
  
}
icy knoll
#

yeah thought so

grand flower
#

yep

icy knoll
#

now im going to crash out because wtf

Error CS0518 : Predefined type 'System.ReadOnlySpan``1' is not defined or imported

#

i don't even use ReadOnlySpan

grand flower
#

never had that happen

icy knoll
#

it is linking to the part where I get and access a readonlyspan

grand flower
#

@hearty shard yeah so my "solution" is going to be manually sending the scale message to authenticated players every X frames/seconds. Literally the only "clean" and stable way I see for doing this, unless NW makes it a sync var outside of roles

icy knoll
#

i just dont know how to fix the error at all

icy knoll
# grand flower show code

this is where it's coming from

CylinderAmmoModule.Chamber chamber = revolver._cylinderModule.Chambers[0];

#

Chambers is a readonlyspan

grand flower
#

ah yeah had the same issue

#

don't remember how I solved it

#

I remember

#

just do what the getter does

#

you gotta bypass that, idk why ReadOnlySpan isn't valid for us

#

CylinderAmmoModule.GetChambersArrayForSerial(this.ItemSerial, ammoMax)

icy knoll
#

yeah

#

doing that now

#

works

#

lol

true cedar
#

and see if that fixes it

icy knoll
#

changed the code now tho

true cedar
#

try mscorlib

#

oh

grand flower
hearty shard
#

hi cyn

grand flower
#

hi EVE

#

im dead inside

hearty shard
#

me too

grand flower
#

do hope my issue gets taken into account

#

the workaround works but it's just... dirty

#

and looks worse for players compared to how scale "worked" before 14.1.1

#

since now players see a split second of the scale being wrong

grand flower
#

Hi, new death alarm trigger breaks if the attacker is invalid

#

likely the hub got destroyed

#

considering that's what the exception is complaining about

#

DeathAlarmTrigger.HandlePlayerDied

undone jacinth
#

Do we know when we'll get a new NuGet pckg?

#

Also, maybe a dumb question. I noticed that OnPlayerUsingItem is still broken for Scp330Item? Unless I'm missing something?

worthy rune
#

are you using EXILED

undone jacinth
#

No

worthy rune
#

it should fire when you eat a candy

undone jacinth
#

It fires, but the selectedCandyIndex is always -1

worthy rune
#

Using or Used?

undone jacinth
#

either

worthy rune
#

i think i see the issue

#

selectedCandyIndex is not set before the using event

undone jacinth
#

Even if it is, the bag only contains the candies that are available post eating one

#

so you won't know which one you just ate

worthy rune
#

thats expected

#

there should be a ItemEffectsApplying event coming eventually, which might work for something like that

undone jacinth
#

So what is the point of even having the SelectedCandyIndex if you can't use it?

#

^not trying to be rude, just curious

worthy rune
#

im only saying it makes sense for it not to work after the candy has been used, the other cases it should be made to work

#

^ and if it doesnt work thats a bug

undone jacinth
#

I would expect the bag to be -1 when handling OnPlayerUsedItem, but would expect the bag to be in it's original state for the OnPlayerUsingItem imo

worthy rune
#

yeah

grand flower
#

Is Elevator.WorldspaceBounds the bounds of the full elevator shaft, or is it the bounds of the elevator itself

worthy rune
#

elevator itself + extra around the side when rotated

grand flower
#

i see

#

trying to detect a player being inside an elevator shaft (more specifically, under an elevator)

#

it can only happen in server rooms and warhead room so I know those don't rotate

#

Is there a way to get the room the elevator is in?

worthy rune
#

i dont think theres a direct way

grand flower
#

since warhead doesn't have doors at the bottom, does it still have "invisible" elevator doors?

#

for the destination

#

Same for server room actually

unique crane
#

By the elevator sequence

grand flower
#

Oh wait actually

#

Is there a way to check if the elevator is one of the funky ones in nuke/server?

unique crane
#

But it should work yea

carmine prawn
#

๐Ÿ’€

#

bro forgetting RespawnTokens again on 14.1.1

worthy rune
upper vapor
#

you could get the waypoint and check if it's an ElevatorWaypoint for more precise measurements

grand flower
upper vapor
#

i think yea

grand flower
#

if so yeah that's even better

unique crane
#

You can detect if it's the doorless one just by this component if you want

grand flower
#

yep, doing so

#

basically grabbing the elevator chamber's bounds and extending the Y axis to englobe HCZ and Warhead

#

that way I can easily tell if the player is under it

soft turtle
#

What version of LabApi is it now? 1.0.3?

vast canopy
#

Added a new hint parameter that allows plugin devs to animate hints by inserting animatable values in tags.

There are any examples?

worthy rune
vast canopy
#

i mean like

#

in game look

slate flume
#
public override void OnPlayerJoined(PlayerJoinedEventArgs ev)
{
   ev.Player.Kick("Idiot");
}

Peak code

soft turtle
#

It will crush client. Crashed on 13.1. I don't know about 14.1.

slate flume
soft turtle
slate flume
#

I'm going to make a command that allows you to crash specific players' clients

#

Just cause

#

I don't know why I said any of that

#

I'm feeling rather evil

#

For legal reasons, I'm joking

soft turtle
# slate flume I'm going to make a command that allows you to crash specific players' clients
Player player = sender is PlayerCommandSender playerCommandSender
    ? Player.Get(playerCommandSender)
    : Server.Host;

if (!player.CheckPermission("crash"))
{
    response = "You don`t have permissions";
    return false;
}

if (arguments.Count != 1)
{
    response = $"Usage: {Command} (target id)";
    return false;
}

Player target = arguments.At(0).ToLower() == "me"
    ? player
    : Player.Get(arguments.At(0));

if (target == null)
{
    response = "Target not founded!";
    return false;
}

target.Connection.Send(new FpcNoclipToggleMessage());

response = "Succesfully crashed!";
return true;
icy knoll
#

is it against vsr to purposefully crash people? ๐Ÿ˜ญ

#

also is it just me or does labapi permissions not work? im assigning permissions to the default group as a test and it is saying i dont have any of the permissions

grand flower
#

probably not good

icy knoll
#

wdym

grand flower
#

to crash people intentionally

icy knoll
#

oh right i thought you were replying to my under message

random scaffold
#

System.MissingMethodException: Method not found: void UserSettings.ServerSpecific.SSKeybindSetting..ctor(System.Nullable`1<int>,string,UnityEngine.KeyCode,bool,string) why?

grand flower
#

Update your assemblies

random scaffold
#

who can send last publiziced assembly csharp

grand flower
#

Why not just get it from the server directory instead of trusting random dlls online

upper vapor
#

I should really migrate to this lol

icy knoll
#

i would send the exiled references but apparently automod

grand flower
#

literally take 45 seconds to find the assembly, copy it, and run a publicizer on it