#plugins-dev-chat

1 messages ยท Page 7 of 1

thin shuttle
#

(was bigger than surface map)

main zenith
#

btw how can i access SSPlaintextSetting text?

#

do i need to first apply it or something because DebugValue just kick player from the server

unique crane
restive turret
#

yup

thin shuttle
#

Why there no translation on this

upper vapor
#

Btw the hint text of the use suggested SS keybind button is "Badge Preferences"

#

Not sure if that would qualify in big reporting as it's triggered by a modification

languid temple
restive turret
#

But at least you can give everyone a moment thinking it's dead man switch ClassDPlushie

thin shuttle
#

Instead of making exactly like all other announcements

upper pike
#

Either because of time constraints, i imagine passing along stuff to the translation team is hard
Or because they plan to replace it at some point, they dont want some temporary text line being permanently part of the files

#

I dunno

unique crane
carmine prawn
#

will LabAPI have any logo?

#

yep

#

so

still notch
#

why <font="Consolas"> doesn't work it's just hard to make a table

worthy rune
#

you can use the mspace tag instead for tables

still notch
#

wait i show you

still notch
worthy rune
#

use font units e.g. <mspace=0.8em>

still notch
#

oh yeah i forgot

#

my game took a very long time to start

worthy rune
#

try using mspace with <font=RobotoMono> it might look less weird, if you can send a ss if it works i would like to see

still notch
#

hmmmm with <mpsace=0.5em> it's look like this (but the caracter length is still the same)

worthy rune
#

looks like it only works with broadcasts

still notch
worthy rune
#

on my end it works

still notch
worthy rune
#

looks better imo

still notch
#

yea!

#

and for the space it's my fault

worthy rune
#

i think you can ommit the <mspace> since the font itself is monospaced

still notch
#

i changed the wrong variable

worthy rune
#

all good

still notch
worthy rune
#

first one?

#

the 17/10?

still notch
#

it was because of <mspace>

unique crane
carmine prawn
thin shuttle
#

@unique crane i found probem on generator event

unique crane
#

Hm?

thin shuttle
#

this never say to player

#

than he can't interact

#

like there

#

also why named UnlockCooldownTime ? when it's also used for other thing

#

just call it CooldownInteractTime

#

or idk

thin shuttle
#

(that how exiled did it)

worn gull
#

Hello! If I put 0Harmony.dll to the dependency folder than the server starts but it will be really really slow, I can't even join

#

Is there a fix for it?

thin shuttle
#

check Console or LocalAdminLogs

#

see what spam it

unique crane
restive turret
# thin shuttle see what spam it

[STDOUT] Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
[STDOUT] The referenced script (Discord.Elements.DiscordGameStateElement) on this Behaviour is missing!
[STDOUT] [T8] The referenced script on this Behaviour (Game Object '<null>') is missing!

this but the script is so many

hollow peak
#

Not meaning to rush anyone or anything, but any updates on when the next version with datastores is coming? That's basically the only thing at this point stopping me from porting my plugins

unique crane
#

Check for any exceptions

restive turret
#

shader stuff?

#

ERROR: Shader Hidden/HDRP/MaterialError shader is not supported on this GPU (none of subshaders/fallbacks are suitable)

harsh thorn
#

the next build is waiting on some other things

hollow peak
#

I tried that the other day, and it just refuse to recognise the references when trying to build Kek PeepoShrug

thin shuttle
unique crane
#

well github

thin shuttle
#

it's open ?

#

i wasn't able to make PR

#

for example

unique crane
#

did you target dev

restive turret
thin shuttle
#

was before public release

hearty shard
hearty shard
#

@unique crane yap yap commit

unique crane
#

?

hearty shard
#

wasnt expecting +1200

thin shuttle
#

+1200 what ?

unique crane
#

80% of those are comments xd

hearty shard
thin shuttle
#

when can i join LabAPI team

#

:trolling:

#

i work for free

unique crane
#

im gonna go back to rebuilding same branch for 5th time like a retard cause unity isnt able to save the prefab on github properly

hearty shard
unique crane
#

Yeah make labapi PR trolling

thin shuttle
#

i need AssemblyCSharp

#

to contribute

unique crane
#

Yeah I cant exactly give you that

icy knoll
restive turret
#

get it from ds

thin shuttle
hearty shard
icy knoll
#

blocked

#

ur blocked

#

get out!!

hearty shard
#

yap yap

unique crane
#

says you and your pocket dimension casting

hearty shard
#

i blame u

#

shouldve seen it

unique crane
hearty shard
#

ALWAYS blame someone else

unique crane
#

hm

#

but you see git has this feature

#

git blame

hearty shard
#

ate it

hearty shard
#

i will injure you

#

fuck

#

i quit

icy knoll
hearty shard
#

WILL be killing you

icy knoll
#

can we ban this person please mods

unique crane
#

I agree

hearty shard
#

banning you both

tulip kiln
#

Has anyone seen 106 not regenerate HS?

restive turret
#

no

hearty shard
#

i didnt even reply to that

#

ok

stable shore
hearty shard
#

turn u into a car

icy knoll
#

Does anyone know the system for checking whether a mini wave should spawn after a wave?

icy knoll
# upper vapor

code doesnโ€™t explain much, which part is doing the calculation and whatโ€™s it doing?

unique crane
#

Mini waves spawns if your team gets X influence after a wave spawns

upper vapor
#

so if a main wave spawns, the mini wave is unlucked
then they spawn after 3 minutes apparently
there was more detail in the post/changelog

unique crane
#

its not determinated when wave itself spawns

upper vapor
#

nvm there isn't much detail in the beta changelog

#

ok i'm dumb

#

Mini-Waves
A set of smaller reinforcement waves that come after primary waves, designed to compensate players who die early, or didn't have a chance to spawn.
Mini-waves can be earned by a faction obtaining 10 Influence after its primary wave spawns.
This is only available for 2 minutes after the primary wave spawns.
For example, after the Chaos Insurgency wave spawns, they must obtain 10 influence in 2 minutes to unlock their mini-wave.

#

For every player that didn't spawn in the primary wave, the "10 influence points" requirement will be lowered by 2.
Due to the increased wave sizes, this scenario will very rarely occur in practicality. Some examples of this:
Chaos Insurgency Wave spawned and 3 players didn't get to spawn. Chaos now only need 4 influence points to unlock the mini-wave.
Nine Tailed Fox Wave spawned and 5 players didn't get to spawn. MTF have automatically unlocked the mini-wave.
If a mini-wave spawns, its team's primary wave will be delayed by 1 minute.
Additionally, every player who dies, who is a part of the mini-wave's faction, will lower the mini-wave's timers by 5 seconds.
The mini-wave timer cannot be reduced below 1 minute and 30 seconds using this method.

icy knoll
#

also does anyone know if 14.1 will have config options for waves working or no?

tulip kiln
hearty shard
#

on labapi branch ?

tulip kiln
#

Actually it seems like no SCPs are regenerating it

tulip kiln
hearty shard
#

ill check it

#

ik they changed the HS stuff

#

sooo

tulip kiln
#

That's what I suspected as well

hearty shard
#

well

#

i see it

#

but no like code for actually increasing

#

oh

#

im stupid

#

its in player stats ๐Ÿ˜ญ

#
public override void Update()
    {
      base.Update();
      HumeShieldModuleBase controller;
      if (!NetworkServer.active || !this.TryGetHsModule(out controller) || (double) controller.HsRegeneration == 0.0)
        return;
      float hsCurrent = controller.HsCurrent;
      float maxDelta = controller.HsRegeneration * Time.deltaTime;
      float target = (double) this._maxValueOverride != -1.0 ? this._maxValueOverride : controller.HsMax;
      if ((double) maxDelta > 0.0)
      {
        if ((double) hsCurrent >= (double) target)
          return;
        this.CurValue = Mathf.MoveTowards(hsCurrent, target, maxDelta);
      }
      else
      {
        if ((double) hsCurrent <= 0.0)
          return;
        this.CurValue = hsCurrent + maxDelta;
      }
    }
hearty shard
#

im goated

hearty shard
#

@unique crane humeshield is broken like crazy

unique crane
#

elaborate

hearty shard
#

erm

#

it says 0 humeshield in game

#

but i have 350 according to logging

#

also

#

wait

#

maybe thats why i wasnt regening humeshield either

#

at the minimum its visually bugged

#

Oh

#

im stupid

#

i didnt sync it

#

cuz im patching but still

#

regen wasnt working without patch either

#

so

#

Okay

#

@unique crane

marble rock
hearty shard
#

this part of the code is broken

#

i destroyed my entire shield, waited a bit and then it spammed htat

#

[2025-02-22 15:39:55.472 +01:00] [INFO] [SecretAPI] [0] Delta is above 0 stinker: 0.54901
[2025-02-22 15:39:55.489 +01:00] [INFO] [SecretAPI] [1] Stupid stupid 350 above target: -3.402823E+38

float hsCurrent = controller.HsCurrent;
            float maxDelta = controller.HsRegeneration * Time.deltaTime;
            float target = __instance._maxValueOverride != -1.0 ? __instance._maxValueOverride : controller.HsMax;
            if (maxDelta > 0)
            {
                Logger.Info("[0] Delta is above 0 stinker: " + maxDelta);
                if (hsCurrent >= target)
                {
                    Logger.Info($"[1] Stupid stupid {hsCurrent} above target: " + target);
                    return false;
                }
#

it changed to that now

#

which is weird

#

cuz it implies im at max shield, but i never receive it

unique crane
hearty shard
#

oh

#

...

#

okay

hearty shard
#

wait PitDeath effect prevents all other damage than fall damage? nvm literally does the opposite

worn gull
#

If I set ev.IsAllowed to false at pickingupitem then I can't pick up that item again

carmine prawn
#

on OnPlayerSearchingPickup?

#

๐Ÿ’€

worthy rune
#

the item might be still locked, you might have to do something like this for now. ill try and get it fixed in the api

Timing.CallDelayed(0.0f, () => ev.Pickup.IsLocked = false);
carmine prawn
#

Can I force the player to sprint forward?

hearty shard
carmine prawn
#

๐Ÿ’€

hearty shard
carmine prawn
#

but if player step on the ground, this doesn't work

hearty shard
#

just teleport them to the moon

carmine prawn
#

can't wait to get into the air at Site02

upper vapor
#

oh the horrors hollow

#

player scaling is a little buggy, not sure if there's an "official" way that isn't through sending a spawn message

upper vapor
#

lessgooo

unique crane
#

ah yes culling

restive turret
#

Please cull the whole map for meClassDTroll

carmine prawn
carmine prawn
#

How do I know if a Pickup has been pick up?

#

Pickup::IsDestroyed doesn't seem to work

#

and give me a empty exception

worthy rune
#

i see, it probably should be checking if the component is null first

carmine prawn
#

ok, I'm trying keep track of the items drop by the player

#

so I have a loop, a list store Pickup

#

and boom
if (pickup== null || pickup.GameObject == null)

#

yep

#

if (Pickup.Base == null)

#

๐Ÿ’€

covert flame
#

So I'm tryna make a remote keycard feature and this is what I have for lockers right```csharp
private static void OnPlayerInteractingLocker(PlayerInteractingLockerEventArgs ev)
{
if (Plugin.Config.RemoteKeycardFeature)
{
if (Utils.DoorUtils.HasKeycardPermission(ev.Chamber, ev.Player))
{
ev.IsAllowed = true;
ev.CanOpen = false;

        ev.Chamber.Base.SetDoor(!ev.Chamber.IsOpen, ev.Locker.Base._grantedBeep);
        ev.Locker.Base.RefreshOpenedSyncvar();
    }
}

}```So basically everything works but when opening it plays both the granted and denied beep sound effect and also displays it on the button thing, also, for some reason ev.CanOpen specifically needs to be false for it to work with both your hand and the card

unique crane
#

Base game code does that for you based on the CanOpen property

#

Your basically calling it twice

restive turret
#

That's why you have the two sound

covert flame
#

Uh huhhh

unique crane
#
private static void OnPlayerInteractingLocker(PlayerInteractingLockerEventArgs ev)
{
    if (Plugin.Config.RemoteKeycardFeature && Utils.DoorUtils.HasKeycardPermission(ev.Chamber, ev.Player))
    {
        ev.CanOpen = true;
    }
}
#

This should do the job

covert flame
#

Hm, I didn't know changing canopen acuatlly opens it lol, I though it just decided whether the player could open then locker or not

unique crane
#

If it has setter then it propagates back to the base game code

#

And this is run after the base game check whether you can open it or not

#

allowing you to modify the result

worn gull
#

Hey, I'm trying to make a plugin where if I take out a candy it shows a hint that you took out a [candyname] candy but I can't get what candy did the player take.

worthy rune
#

try

if(ev.Item is Scp330Item scp330 && scp330.Base.IsCandySelected)
    scp330.Base.Candies[scp330.Base.SelectedCandyId]...

currently theres no implementation for derived items(thats coming very soon)

worn gull
#

Thanks

carmine prawn
#

LabAPI would have a more complete FirearmItem, right?

#

annoying firearm module is still chasing me

worn gull
worthy rune
carmine prawn
worthy rune
#

i guess the candy is missing from the event, i dont see why it shouldnt be added. ill look into adding it

worn gull
worthy rune
#

i cant tell you since idk when that is, but most likely before

worn gull
#

Okay, thanks

carmine prawn
#

Player, Attacker, Target

#

can we unify this names on event?

restive turret
#

You can make a pr

upper vapor
#

It would be nice to clarify those

worthy rune
#

yeah please make an issue if you can

#

we can forget if theres to many things todo

upper vapor
#

I'll do that once I get home and Iif I don't forget skullbutreal

vivid cove
#

guys is it wanted that peanut can tp on top of the railings in the new room

main zenith
#

Is there a way to make player who has role of SCP-049 Be seen by others players as SCP-106 and how to turn off SCP-049 abilities? Like for example "Good Sense of The Doctor", "Resurrection", etc.

restive turret
#

Exiled show the appearance code use that (or use exiled for it)
Turning off ability is I think there is a Spc049_doThething_ingEvent and using that just set IsAllowed = false

upper pike
#

Anyone else getting up there is getting up there using illegitimate unintentional ways

odd hazel
upper pike
#

Nope

carmine prawn
upper pike
#

To get there as human or dog, you have to do really weird parkour and quirks with collision to get up there, which is obviously not intentional

#

173 can straight up teleport there

still notch
#

Hey ๐Ÿ‘‹
What is the font of the badge, please ?

#

(When you look at the player and when you look at the player list)

restive turret
brazen forge
#

yo guys im new in the plugins stuff and really want to know if someone can send me a plugin where you dont need to have the card in hand to open doors

main zenith
#

is there a way to make a SCP-106 wasnt able to come through doors,gates etc.?

hearty shard
#

= false

#

i cant remember what its actually called

main zenith
hearty shard
#

Then no

main zenith
restive turret
#

If you set 106 again to 106 he will not able to move

thin shuttle
#

@worthy rune@unique crane is it know bug the crash when ending round and being Scp079 ?

unique crane
#

I dont know about that

#

Or well

#

Im just fixing some exception related to 079

thin shuttle
#

vanilla

#

(i was thinking it's was exiled but no)

unique crane
#

YEP

#

thats the one

#

Funny

thin shuttle
#

Scp079 do not get disconect (reconnect) when end round

main zenith
restive turret
#

ye, just wait a bit

#

player.SetRole(RoleTypeId.Scp106);
Timing. stuff_that_wait(1f, () => { player.SetRole(RoleTypeId.Scp106); } );

main zenith
restive turret
#

cant move tru doors

#

its a funny game bug

main zenith
hearty shard
#

feature until NW fixes it

main zenith
unique crane
#

Well then simply dont change the role too quickly trolling

icy knoll
#

no time limit

#

lol

unique crane
#

oh

icy knoll
#

yeah

upper vapor
#

pooling system YIPPEE

unique crane
#

Pooling system my beloved

upper vapor
#

when "lockdown cooldown: 13550s"

unique crane
#

wha

hearty shard
hearty shard
upper vapor
#

that was caused by a missing 079 subroutine reset

hearty shard
#

you can make 079 have infinite cooldown

#

i made a plugin ages ago that made it so you could spam teslas

#

and every 079 after that round would just have infinite cooldowns

unique crane
carmine prawn
hearty shard
#

#unknown Sad

carmine prawn
#

QA Communiyt

#

I need a link

swift nexus
#

@carmine prawn

#

ah sorry didn't realize you posted it already (discord didn't load it)

normal pawn
#

What are advantages of using source generators?

restive turret
#

Generating code

upper vapor
# normal pawn What are advantages of using source generators?

Devs need to write less code
They also help make sure things aren't missing
CustomEventsHandler is source-generated meaning if a new event is implemented, it will automatically be added to that class
Same for InitializeWrappers, they just add an attribute to a method and it'll be called when LabAPI inits

normal pawn
#

Fair enough

thin shuttle
restive turret
upper vapor
# thin shuttle What is source generator ?

Weโ€™re pleased to introduce the first preview of Source Generators, a new C# compiler feature that lets C# developers inspect user code and generate new C# source files that can be added to a compilation. This is done via a new kind of component that weโ€™re calling a Source Generator. To get started with Source [โ€ฆ]

thin shuttle
#

so it's like what mirror does

#

for most of it's stuff

restive turret
#

Ye

#

Except mirror using Cecil

#

And other stuff to inject its code

#

But its kind of that

unique crane
#

Mirror weaves the assembly after compilation if I remember it correctly

#

Source gen generates the source and then it gets all compiled at once

#

Really cool and nice stuff

#

Especially for partial classes

upper vapor
upper vapor
restive turret
hearty shard
#

hello slej

restive turret
#

Hi

hearty shard
restive turret
#

So how is maintaining

#

Did you successfully upgrade all projs to labapi

hearty shard
#

idk

#

i do a little

#

and then i get bored

#

and go do smth else

#

still waiting for david to rework candy

hearty shard
restive turret
#

Hopefully labapi-beta will be updated for latest stuff if they done w/it

hearty shard
#

hope

#

pray

#

murder

unique crane
#

How do you want Vector3 serialization

#

just

#

X Y Z

#

?

untold raft
#

I can't install normal server version of sl

#

Still beta 14.0.3

hearty shard
unique crane
#

and then installing this specificaly

hearty shard
untold raft
#

Always install Game version: 14.0.3-labapi-publicbeta-5bf276ee after completly delete appdata and install directory

#

'-beta none' doesn't work

stable shore
#

there was a conversation in teaser discussion talking about how new map generation can control the chances of certain rooms spawning next to another room type, and people were asking if it was possible for plugins to be able to control this. Is it possible?

restive turret
#

steam using public branch not none

restive turret
#

as float ofc

unique crane
#

I think of just making it hex

#

So like it matches with rich text stuff

wheat flower
unique crane
unique crane
#

Skill issue

ashen hornet
hearty shard
#

Damn

stable shore
#

This might be big...

plush walrus
hearty shard
plush walrus
restive turret
#

That reminds me of the portal big ass door but inside it shows a smaller one

restive turret
restive turret
# ashen hornet

If you would have drastic decrease the time of the anim would be 10/10 but its 7/10

plush walrus
#

Big ass containment bulkhead door protecting the nuke start room

restive turret
#

Well you can definitely alter the speed but idk if its shared across all clients

unique crane
ashen hornet
hearty shard
thin shuttle
#

you spawn Scale 0 BulkDoor ?

#

to make sound

ashen hornet
#

Not sure what you are asking about

#

You can scale bulk door like any other door

thin shuttle
#

i just ask how you made the sound appears

ashen hornet
#

what sound

#

sound is a part of bulk door

carmine prawn
#

can I make hint appear on the far right of the screen?

#

far left is <align=left><pos=-360>abcabc

#

but <align=right><pos=360>abcabc unable to reach the far right

icy knoll
#

it can't reach the edge of the screen sadly

carmine prawn
#

sad

spring swan
thin shuttle
#

without door or door Scale to 0

ashen hornet
#

what sound

#

are we on the same page here

upper vapor
main zenith
#

is there a way to make SCP-106 Hume shield Regen. like for others SCPs?

sacred sierra
thin shuttle
#

Xhy making two event for idle and triggering tesla

#

Just make one

#

And have property for it

icy knoll
#

Is it possible to see if a player has someone muted or no?

true cedar
true cedar
#

one sec

#

line height isn't necessary iirc

#

i think if u want to push it to the right u do basically the same thing but put the ts before and have space be positive

limpid fjord
#

Is there a way to disable server-side movement correction?

#

Sometimes my server lags so much that players get teleported back to their previous positions

worthy rune
#

i dont think theres a trivial way todo that without patching, you can use noclip since that has a graceperiod after turning it off where it disables the AC checks

[HarmonyPatch(typeof(FpcNoclip), nameof(FpcNoclip.RecentlyActive), MethodType.Getter)]
public class FpcNoclipRecentlyActivePatch
{
    public static bool Prefix(FpcNoclip __instance, ref bool __result)
    {
        // dont remember why i did it like this, probably stops you from falling through the floor
        __result = __instance._fpmm.Motor._lastOverrideTime.Elapsed.TotalSeconds > 1.0f;
        return false;
    }
}
hazy kelp
ashen hornet
#

as another build to ProjectMER once out of beta base MapEditorReborn

hazy kelp
icy knoll
still notch
marble rock
icy knoll
#

How do I get the players integer ID via reference hub?

#

i dont want to use Player.Get if possible, lol

#

nvm, im using NetworkBehaviour not ReferenceHub

#

ignore me, apparently ReferenceHub.GetHub() is the only solution

tulip kiln
#

Has anyone seen this happen? I only have one event attached to PlayerInteractingElevatorEventArgs and I'm 100% sure that it doesn't disallow (since disallowing it sends a broadcast and that works correctly)

(@unique crane you seem to like these sort of bugs so here's a ping for you Trollface4k)

#

Nice mkv discord

#

ahhh

#

give me a second

#

Also this doesn't happen with no plugins

unique crane
#

I think that issue is gonna be somewhere else... Probably in initial elevator floor

unique crane
#

And is it random or happens only with first interaction

tulip kiln
#

It's random

#

or at least it appers to be

#

Sometimes it will stay, other times it will go

unique crane
#

Truly weird

#

Guess we've got a new scp in game trolling

#

(will look at it if I finish the stuff I wanted to do today)

tulip kiln
#

@unique crane
I found reproduction steps. The button that is inside the elevator will trigger the event at any point of the journey. Spamming the button from the inside will effectively lock the elevator in place until you stop pressing the button.

The reason it doesn't happen without plugins may be because I'm overriding IsAllowed with true due to my restriction system reporting that D-Class can use elevators.

#

Is this intended?

#

The button outside will not trigger if the elevator is not ready

unique crane
#

I'm surprised it works mid way

#

But well it isn't intended

tulip kiln
unique crane
#

Yeah that seems like more of base game issue

#

Or placement of the event

main zenith
#

But interaction is made

#

Like maybe in the 3-4 hours from now(im in school rn) i can show u video what i mean

main zenith
restive turret
unique crane
unique crane
#

Would be more cool if it had more than 2 floors

upper vapor
#

Indeed

unique crane
#

So you could like keep going

upper vapor
#

I kinda doubt that we could change floors with plugins but I'll do some experiments anyway

unique crane
#

Um i think you can?

#

Floor is just elevator door

#

And the are in a list

upper vapor
#

Yeah but is it possible to change the groups?

#

They are enum-based to my knowledge

unique crane
#

Group is enum based yea

restive turret
#

Patch the enums to add more

unique crane
#

Idk what are the enums even for

#

I think they are only used for initial spawning and decontamination?

restive turret
#

Well you have the full source code for the game not me SteamHappy

unique crane
#

Well am on phone so

#

Although gitlab works on phone it's pretty bad experience

restive turret
#

Ah well yeah

carmine prawn
#

How should I display lowercase letters on hint?

hearty shard
carmine prawn
#

๐Ÿ’€

inner citrus
carmine prawn
#

but that would make all letters lowercase

inner citrus
hearty shard
#

you can close tags yk

carmine prawn
hearty shard
#

i still like my suggestion more

#

clearly a better idea

carmine prawn
hearty shard
carmine prawn
#

mod client

hearty shard
#

yeah but

#

whats a joke

carmine prawn
#

nvm

#

aBcAbC = <lowercase>a</lowercase>B<lowercase>c</lowercase>A<lowercase>b</lowercase>C

hearty shard
#

yeah

carmine prawn
#

this does work but...

#

Is this the only way?

hearty shard
#

i gave another way

inner citrus
#

You can create an extension method or something if you want it to be easier

hearty shard
#

just create a method that checks if its lowercase and adds the tag if it is etc

#

yea

carmine prawn
#

like Regex?

#

I'll try

upper vapor
hearty shard
#

"hello" does not work in hint

#

because its all uppercase

upper vapor
#

riight

#

okay

#

i forgor

hearty shard
#
public static string DoLowercaseTags(this string str)
        {
            StringBuilder result = new();

            foreach (char c in str)
            {
                if (char.IsLower(c))
                {
                    result.Append("<lowercase>");
                    result.Append(c);
                    result.Append("</lowercase>");
                }
                else
                {
                    result.Append(c);
                }
            }

            return result.ToString();
        }

@carmine prawn

#

you might need to handle the </lowercase> differently tho

#
/// <summary>
        /// Adds the lowercase tag before all lowercase characters.
        /// </summary>
        /// <param name="str">The string to use.</param>
        /// <returns>The newly created string with the tags.</returns>
        public static string DoLowercaseTags(this string str)
        {
            StringBuilder result = StringBuilderPool.Shared.Rent();
            bool wasLower = false;

            foreach (char c in str)
            {
                if (char.IsLower(c))
                {
                    wasLower = true;

                    result.Append("<lowercase>");
                }
                else
                {
                    if (wasLower)
                        result.Append("</lowercase>");

                    wasLower = false;
                }

                result.Append(c);
            }

            return StringBuilderPool.Shared.ToStringReturn(result);
        }
#

Like that ?

#

idk

upper vapor
#

ublic toomuchtrolling

hearty shard
#

i didnt copy the whole thing

#

whoops

#

anyway

#

yeah

#

should work in theory

upper vapor
#

it should work, ye

upper vapor
carmine prawn
#

๐Ÿ’€

carmine prawn
hearty shard
#

it loops through the characters

#

adds to a new string

#

LowercaseTags shouldnt be saved unless its a constant

#

okay so

#

if ur sending a hint to a player

carmine prawn
hearty shard
#

Server.Host.SendHint("hello".AddLowercaseTags());

#

it wont modify the original string

tulip kiln
#

such as <color>

hearty shard
#

ohh

#

thats what u meant

#

๐Ÿ˜ญ

#

yea probably then

#

im not fixing it im lazy

carmine prawn
#

sorry, my English

hearty shard
#

@unique crane how does mirror load the prefabs btw ?

#

oh

upper vapor
hearty shard
hearty shard
unique crane
#

^

hearty shard
upper vapor
#

somehow that's not all prefabs though

unique crane
#

NetworkManager iterates over prefabs you assigned it to it

#

And calls NetworkClient.RegisterPrefab

#

which is then stored as (uint, GameObject)

hearty shard
#

with actually means prefabs wont ever be empty (at least not NetworkManager ones)

unique crane
#

where uint is asset ID

hearty shard
#

once the object exists

hearty shard
upper vapor
#

that's set by mirror in the editor

hearty shard
#

interesting

unique crane
#

Yea

#

Its based off path to the asset

#

probably hash or something

hearty shard
#

interesting

unique crane
#

And yea you can call the RegisterPrefab on both client and server

#

at any time tbh

hearty shard
#

yeah

unique crane
#

And then immidiately call NetworkServer.Spawn

hearty shard
#

i saw SL does it

unique crane
#

Yea

#

HolidaySpawner does it

hearty shard
unique crane
#

And this happens for every spawnable prefab

hearty shard
#

do you mean spawner

#

๐Ÿ˜ญ

#

gj

hearty shard
unique crane
#

Well thats how you spawn it over network XD

#

Ofc you can also make NetworkMessages and spawn it on both server and client as MonoBehaviour

hearty shard
#

yea but do you have to create it ?

unique crane
#

WHat no

hearty shard
unique crane
#

Thats just the code

hearty shard
#

that was my question

#

mb

#

anyway

upper vapor
hearty shard
upper vapor
#

imagine if we could spawn any component

hearty shard
#

but i was referring to having to create an object after registering prefab

unique crane
hearty shard
#

:c

#

exiled was crazy last night ๐Ÿ˜ญ

unique crane
#

huh

#

I was eeping last night so idk what happened

tulip kiln
hearty shard
#

then a few bans happened and they raided

#

๐Ÿ˜ญ

worthy rune
#

most prefabs are not in NetworkManager, they are registered manually to NetworkClient usually by subscribing to CustomNetworkManager.OnClientStarted and doing it there

unique crane
#

_i said that ๐Ÿ˜ญ _

worthy rune
#

oh you did?

unique crane
hearty shard
#

i mean

#

yes kinda

unique crane
#

not full story

#

but partial

hearty shard
#

but i wasnt expeciting most

unique crane
#

XD

hearty shard
unique crane
#

But fair I didnt say that most are added via code

#

whatever

hearty shard
#

so sad ๐Ÿ’”

#

i actually wish there was ability to know when all prefabs had fully loaded

#

but when its done like that it doesnt seem doable

#

well

#

does client ever restart ?

worthy rune
#

also, note that not all prefab instances are in NetworkClient.prefabs either, a good example are RoomObjects and ragdolls. Instead they are registered with handlers instead. The server still has to use a prefab to network spawn them but the client does not require a prefab in the dict(as its apart of the handler)

upper vapor
unique crane
#

^

hearty shard
#

but yea

#

waiting is probably the best bet

upper vapor
#

run a script every frame and check the number of prefabs against a constant toomuchtrolling

unique crane
#

I mean thats when you want to do most of spawning stuff anyways so

unique crane
hearty shard
#

๐Ÿ’”

unique crane
#

And then check it

hearty shard
#

holidays ๐Ÿ’”

#

could work but still

#

๐Ÿ˜ญ

unique crane
#

//TODO: Update on christmas

hearty shard
#

i was gonna look into a prefab manager thing, but i realized i literally cant do it any different from what i did on exiled really

hearty shard
hearty shard
#

actually

#

add to SL rn

marble rock
#

erm, no

#

delayed to 21.0

main zenith
tulip kiln
#

Anyone here changed the Player's scale?

#

Whenever I send a spawn message to change the scale, the entire weapon Reload-Unload system breaks for everyone

unique crane
#

Ill also probably absolutely add a way to scale without using the spawn message

tulip kiln
#

I can record a sample of what happens if yall want

upper vapor
#

Haven't tried scaled players with weapons yet

upper vapor
unique crane
#

what

#

Why would you do that

upper vapor
#

Funny

#

Rotating player models on the x & z axes

unique crane
#

Me on my way to make player models walk on walls

upper vapor
#

Yeah

#

Combine that with custom gravity and you can make players walk on walls

tulip kiln
unique crane
#

so you can just spam it

tulip kiln
#

And it won't reload

unique crane
#

hmmm

tulip kiln
#

As in, will not modify ammo

#

And I know the scaling does it since removing it fixes it

upper vapor
#

The firearm animators probably don't like custom scale

tulip kiln
unique crane
#

ofc

upper vapor
#

I guess you could work around this by setting the items in the inventory to have a lossyScale of 1
Though I don't think it would solve the client-side animation issue

tulip kiln
#

should have specified

tulip kiln
#

So I'm not sure if the animators are complaining about the new scale

unique crane
#

Might be something with sync then

#

idk

#

Or well considering that you can infinitely reload

#

and ammo doesnt change

#

It gets allowed only on the client

#

but server denies the request

tulip kiln
#

it gets approved

unique crane
#

every time

#

?

tulip kiln
#

Yes

unique crane
#

gg

tulip kiln
#

Hold on, let me get the log

#

what

#

I just got automodded

#

I'll dm you the logs

mild ice
#

It's just mistakenly catching a blacklisted tld

tulip kiln
#
[2025-02-27 16:15:11.648 +01:00] [DEBUG] [RoleplayPack] Player GBN sent a request!
[2025-02-27 16:15:11.664 +01:00] [DEBUG] [RoleplayPack] The request is of type Reload
[2025-02-27 16:15:11.679 +01:00] [DEBUG] [RoleplayPack] Validating reload!
[2025-02-27 16:15:11.695 +01:00] [DEBUG] [RoleplayPack] Are any modules busy? False
[2025-02-27 16:15:11.710 +01:00] [DEBUG] [RoleplayPack] Module count: 17
[2025-02-27 16:15:11.725 +01:00] [DEBUG] [RoleplayPack] IsReloading: False
                                 IsUnloading: False
                                 IsBusy: False
[2025-02-27 16:15:11.741 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.AutomaticActionModule
[2025-02-27 16:15:11.756 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.AnimationTriggerReloaderModule
[2025-02-27 16:15:11.772 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.AnimatorSpectatorSyncModule
[2025-02-27 16:15:11.787 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.AnimatorStateSetterModule
[2025-02-27 16:15:11.802 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.AudioModule
[2025-02-27 16:15:11.817 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.EventBasedEquipperModule
[2025-02-27 16:15:11.833 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.EventManagerModule
[2025-02-27 16:15:11.848 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.GripControllerModule
[2025-02-27 16:15:11.864 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.ImpactEffectsModule
[2025-02-27 16:15:11.879 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.LinearAdsModule
[2025-02-27 16:15:11.894 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.MagazineModule
[2025-02-27 16:15:11.910 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.MovementInaccuracyModule
[2025-02-27 16:15:11.926 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.RecoilPatternModule
[2025-02-27 16:15:11.941 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.SimpleInspectorModule
[2025-02-27 16:15:11.956 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.SimpleTriggerModule
[2025-02-27 16:15:11.972 +01:00] [DEBUG] [RoleplayPack] Module of type: InventorySystem.Items.Firearms.Modules.SingleBulletHitscan
[2025-02-27 16:15:11.986 +01:00] [DEBUG] [RoleplayPack] Module of type: AUTOMOD TOLD ME TO GET RID OF THIS ONE
[2025-02-27 16:15:12.002 +01:00] [DEBUG] [RoleplayPack] Is flag true? True
[2025-02-27 16:15:12.017 +01:00] [DEBUG] [RoleplayPack] flag is true! Approving...
#

Huh

#

Thank you ๐Ÿ’œ

restive turret
#

nice module

hearty shard
#

erm

#

why

#

@unique crane :

#

why ๐Ÿ’€

unique crane
#

?

hearty shard
#

creating a new list for it

unique crane
#

Have you heard of this thing called "ConcurrentModificationException"

hearty shard
#

oh

#

rightt...

#

i forgot

unique crane
#

silly

hearty shard
#

still stinks

#

now get to reworking 330

restive turret
#

Cant wait to get all existing exception

unique crane
#

How is it named in c# again

restive turret
#

idk

upper vapor
#

It's named the same iirc

tulip kiln
#

Isn't it just InvalidOperationException?

hearty shard
#

InvalidOperationException

#

yea

tulip kiln
#

InvalidOperationException: Collection was modified; enumeration operation may not execute.

mild ice
mild ice
#

I prefer blind responses

hearty shard
#

real

shrewd surge
#

got a question. it's not labAPi specific but it is modding. will we ever have the ability to make custom menus or pop up boxes

unique crane
#

Well you can make custom menu using SSS

shrewd surge
#

yeah. i want to but my boss just wanted something different

#

i meant like RA or pop up menus. there is OpenReportMenu, may be exiled specific, have no idea, but the button does nothing so it's impossible to close

shrewd surge
#

also, is labapi going to replace exiled or...

rain crag
#

i mean its up to the person hosting the server

#

if they want to use labapi or exiled

shrewd surge
#

i meant like will one day exiled just be no more or will exiled still be used

rain crag
#

ask the people who make exiled

#

it probably will

#

still be up

shrewd surge
#

interesting. so is labapi being made to be better than exiled or just a better NwAPI

rain crag
#

i mean its the official api

#

so its just bound to be better

#

(it also is way more understandable to me)

shrewd surge
icy knoll
#

exiled is much more understandable and the namespace layout is that much better

rain crag
#

i worded it terribly

#

ITS BOUND TO BE BETTER in my opinion.

shrewd surge
#

i think both will coexist together

marble cobalt
#

Things like Exiled's Custom Items & Roles framework is not something we have any current plans to offer within the LabAPI

#

Obviously we would like to provide more customization features base-game, if it were a simple change we'd allow you to modify firerate, name and stuff like that

#

But the reality is that such things take time, and are difficult to implement without compromising maintainability of the project on the long-term

shrewd surge
#

understandable

marble cobalt
#

So the goal is to provide a good base framework, and Exiled can continue doing what they do best

#

Which is providing very advanced frameworks for advanced systems

#

But if you have a very important security plugin, or your server has a patreon to continue existing, and you can't provide your patreons with cool exclusive features

ashen hound
#

no one prevents you to make custom items/roles as a plugin using labapi code, I mean I want to do this but again its my thing nothing official

marble cobalt
marble cobalt
#

So we hope to provide good base functionality, and let the community create libraries, frameworks and APIs for the more specific features they need

#

I'd like to think we're in good terms with most folks at Exiled, after all most of us have been a part of its community for a long while

#

And we have actively communicated and helped them when we could

restive turret
#

Items would ve soon but idk if I want to do that

ashen hound
#

my main problem is I want to create everything adv but because of this it takes too much time to make it and finish lol

#

most times people don't know how to use it lol

wheat flower
ashen hound
#

ngl from my side audio api is not that adv heh

wheat flower
#

well ive never done encoding n shit

#

so its new for me

#

quite fun

ashen hound
#

its not much atm in case of encoding or doing stuff manually

wheat flower
#

i do especially like bypassing the speaker limit using message magic

#

although not that you want 256 audios playing at once LUL

#

(networking go brrr)

ashen hound
#

my audio api thing takes free controller id when you make each audioplayer thing

#

soo its reusing if id its free

wheat flower
#

ye

#

very shrimple

#

pools are great...

main zenith
#

How can i make one Plugin dont overwrite another Plugin Server-Specific Settings?

main zenith
# main zenith How can i make one Plugin dont overwrite another Plugin Server-Specific Settings...

using UserSettings.ServerSpecific;

namespace SCP372LabApi
{
    public abstract class AbilitysLoader
    {
        private static AbilitysLoader _activeExample;

        public static readonly AbilitysLoader[] AllAbilitys =
        {
           new Ability()

        };
 public abstract string Name { get; }
        public abstract void Activate();
        public abstract void Deactivate();

        public static bool TryActivateAbilitys(int index, out string message)
        {
            if(!AllAbilitys.TryGet(index,out AbilitysLoader loader))
            {
                message = $"Index {index} out of range.";
                return false;
            }
            if (_activeExample == loader)
            {
                message = $"Ability is already active";
                return false;
            }
            TryDeactivateAbility(out _);
            _activeExample = loader;
            _activeExample.Activate();
          
            message = loader.Name + " Activated.";
            return true;
        }
        public static bool TryDeactivateAbility(out string disabledName)
        {
            if (_activeExample == null)
            {
                disabledName = null;
                return false;
            }
            disabledName = _activeExample.Name;
            _activeExample.Deactivate();
            _activeExample = null;
            ServerSpecificSettingsSync.DefinedSettings = null;
            ServerSpecificSettingsSync.SendToAll();
            
            return true;
        }
    }
   

}
#

i missing something?

unique crane
unique crane
#

Well if you dont want to override existing settings

#

then you just.. create a new list.. copy the existing ones and append the new ones

main zenith
unique crane
#

Yeah if you are reaaaaly lazy you could theoretically do ServerSpecificSettingsSync.DefinedSettings = ServerSpecificSettingsSync.DefinedSettings.ToList().Add(yourSettings).ToArray() trolling

main zenith
#

but still thanks for help

hearty shard
#

can you make DefinedSettings a list already

unique crane
#

Im thinking of making it like observable list or something

#

So you dont even need to make a new one when you edit it

hearty shard
#

wtf is ObservableCollection

wheat flower
#

me when you used add instead of addrange

unique crane
#

Collection that has event when it is modified

wheat flower
#

rookie mistake

hearty shard
unique crane
hearty shard
#

do it rn

#

oh

#

valid

#

but still

wheat flower
#

observable list is a W

hearty shard
#

i want freedom

#

i didnt even know it existed

unique crane
#

Now you do

hearty shard
#

๐Ÿ’”

unique crane
#

I dont think the base one has AddRange tho

hearty shard
unique crane
#

Might need to make custom one

hearty shard
#

do it

#

or an extension method

#

but yk

unique crane
#

Weeeel right now im doign the damm Vector3 serialization

hearty shard
#

yap yap

#

work faster

unique crane
#

But the damm yaml is like "hmm lets visit each read-only property"

hearty shard
#

oh yeah

#

do only XYZ

unique crane
#

Thats what im doing ๐Ÿ˜ญ

hearty shard
#

figure it out better

restive turret
restive turret
upper vapor
upper vapor
worthy rune
#

im going to try and include some audio stuff on the speaker toy wrapper, so it doesnt require an external api just to be able to use it btw

upper vapor
#

Good luck

#

I mean yeah a built-in PlaybackBuffer and encoding would be nice

worthy rune
#

potential example usage

string path = Path.Combine(PathManager.Configs.FullName, "Test Plugin", arguments.At(1)) + ".wav";
path = "file://" + path.Split("://").Last();
var webrequest = UnityWebRequestMultimedia.GetAudioClip(path, AudioType.WAV);
var request = webrequest.SendWebRequest();
request.completed += (asyncOperation) =>
{
    if (webrequest.result == UnityWebRequest.Result.ConnectionError)
        Log.Error(webrequest.error);
    else
    {
        AudioClip clip = DownloadHandlerAudioClip.GetContent(webrequest);
        speaker.Play(clip);
    }

    webrequest.Dispose();
};

not sure how you feel about something like this, ngl i dont like using UWR for this but it seems like the easiest way

#

note, its not final, or may never get added

upper vapor
#

Could you make it a separate object so we can use the playback encoder elsewhere? (Tying it to the wrapper is not be ideal imo)

upper vapor
worthy rune
#

yeah the encoder is separate, you are able to access which ever one it tied to the current ControllerId of the speaker for convenience

upper vapor
#

Epic

worthy rune
#

audio clip, or just raw samples if you load it another way yeah

upper vapor
#

Poggies

restive turret
shrewd surge
#

are spawn points vectors or game objects?

#

like i get it's a vector but are they just a list of vectors or objects placed around the map

upper vapor
shrewd surge
#

i mean like if i wanted to get a list of all spawn points or a list of spawn points for each team or something, is it just vectors or actual game objects

upper vapor
#

Those are stored on the role
IFpcRole.SpawnpointHandler

#

Some aren't as simple as a vector

#

Instead, some spawnpoints rely on the room and preset bounds

#

You can call TryGetSpawnpoint on the handler to get a position

shrewd surge
#

alright. thanks!

carmine prawn
#

How he did it???

worthy rune
#

do what

upper vapor
#

That's interesting

#

Not sure how you could alter the camera position

#

I call hax!!1!1!!!!

worthy rune
#

probably modded client, i dont know a way todo it through mirror

restive turret
#

get camera, move around -3 in z and vola

ashen hound
#

you need to know that what he is doing is not possible normally

#

your character model is not even visible

#

just arms

#

and you cant bypass this thru serverside

restive turret
upper vapor
#

what if they changed the player scale and mirrored the movement and actions with a dummy

covert flame
#

Hey, quick question, how do I make a command usable from the ingame console?

hearty shard
#

iirc

covert flame
#

Interesting, because I have it as that

hearty shard
#

well

#

ingame as in RA or the normal one

#

and do you have it as an ICommand

covert flame
#

The console you access with the tilde key

hearty shard
#

then yeah thats it

#

it has to be ICommand tho

covert flame
#

That explains it, thank you

#

Oh wait, nevermind, I was thinking the wrong thing, it works now :]

tulip kiln
main zenith
#

does anyone have idea how can i properly spawn Empyt object with Box collider and Rigidbody? i was trying this but result were "funny"

  GameObject Magma = new GameObject("Magma");
       Magma.GetComponent<BoxCollider>().isTrigger = false;
       Magma.GetComponent<BoxCollider>().enabled = true;
       Magma.GetComponent<BoxCollider>().size = new Vector3(2,2,2);
       Magma.GetComponent<Rigidbody>().useGravity = false;
       Magma.GetComponent<Rigidbody>().isKinematic = true;
       NetworkServer.Spawn(Magma.gameObject);
hearty shard
#

from Unity (not NW)

#

or

#

wait 2sec

#

actually

main zenith
hearty shard
#

what r u trying to do

#

specifically

hearty shard
#

what r u using it for tho

#

this is my code

#

only works on server side tho

#

doesnt spawn it client side

#

for that youd need to use nws primitives

main zenith
hearty shard
#

if u dont need the player to see it then yea use the above

main zenith
main zenith
# hearty shard

EscapeComponent is not necessary right? ( i want to be sure)

hearty shard
#

it is not no

#

its my own custom handler that handles a player walking into the object

main zenith
#

alright

gilded thicket
#

also why are you getting component like 3 times just store it in a variable once

main zenith
main zenith
unique crane
#

This good?

inner citrus
unique crane
#

Im thinking if I should seperate each vector component by line

worthy rune
unique crane
#

Color

worthy rune
#

hmmm

#

i feel like hex should be reserved for color32

#

sometimes you want to set colors with values outside the normal 0-1 range e.g. for glowing primitives

unique crane
#

mmmm

#

Oki

restive turret