#plugins-dev-chat

1 messages · Page 18 of 1

celest thorn
#

So yea thank you i think i will use this solution most likely

#

because i spawn them under a gameobject

upper vapor
#

Np

#

Classic toomuchtrolling

grand flower
#

agh

#

ah well good ending, don't have to wait for a fix DogKek

upper vapor
#

If you wanna avoid manually copying the DLL, you can create a target in your csproj

<Target Name="CopyDll" AfterTargets="AfterBuild">
    <Copy SourceFiles="$(OutDir)$(AssemblyName).dll" DestinationFolder="plugins/dir/here"/>
</Target>

Make sure to put this at top-level, outside of a property or item group

marsh minnow
#

Hello so I found out how to get player location but Round start is not working

#

[2025-05-05 21:34:37.033 +02:00] [ERROR] [LabApi] 'NullReferenceException' occured while invoking 'Round_start' on 'plugin.HelloWorldPlugin': 'Object reference not set to an instance of an object', stack trace:
at plugin.HelloWorldPlugin.Round_start () [0x00006] in <64cf384ed375447fbc95899719ad32be>:0
at LabApi.Events.EventManager.InvokeEvent (LabApi.Events.LabEventHandler eventHandler) [0x0001d] in <d2a3c666310742d89f4500799b727b29>:0

upper vapor
#

Could you post your round start code?

#

Surround it with
```csharp
code
```
For easier reading here if you copy it

marsh minnow
#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LabApi.Features;

using LabApi.Loader.Features.Plugins;
using LabApi;
using LabApi.Features.Console;
using LabApi.Events.Arguments.ServerEvents;
using LabApi.Events.Handlers;
using Unity;
using UnityEngine;
using LabApi.Features.Wrappers;
namespace plugin
{
internal class HelloWorldPlugin : Plugin
{
"
plugin setup
"

    public override void Enable()
    {
        ServerEvents.RoundStarted += Round_start;
    }

    public override void Disable()
    {
        ServerEvents.RoundStarted -= Round_start;
    }
   "
   c# code
    "

    private void Round_start()
    {
       "
       c# code
       "
    }
}

}

grand flower
#

what's the code in Round_start

marsh minnow
#

Gets Player Position and prints it

grand flower
#

Your error is at line Gets Player Position and prints it

#

Jokes aside if you don't show the code we can't help much

marsh minnow
#

Error is in roundstarted

#

Oh

#

Vector3 Position = player.Position; this is the code

#

it doesn't print anything yet

grand flower
#

Again, if you don't show code we can't help

#

All we could say is player is probably null

marsh minnow
#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LabApi.Features;

using LabApi.Loader.Features.Plugins;
using LabApi;
using LabApi.Features.Console;
using LabApi.Events.Arguments.ServerEvents;
using LabApi.Events.Handlers;
using Unity;
using UnityEngine;
using LabApi.Features.Wrappers;
namespace plugin
{
internal class HelloWorldPlugin : Plugin
{
public override string Name { get; } = "Hello World";

    public override string Description { get; } = "Simple example plugin that demonstrates showing a broadcast to players when they join. Using 'Legacy' (C#) events.";

    public override string Author { get; } = "Northwood";

    public override Version Version { get; } = new Version(1, 0, 0, 0);

    public static Player player { get; }
    public override Version RequiredApiVersion { get; } = new Version(LabApiProperties.CompiledVersion);

    public override void Enable()
    {
        ServerEvents.RoundStarted += Round_start;
    }

    public override void Disable()
    {
        ServerEvents.RoundStarted -= Round_start;
    }

    private void Round_start()
    {
        Vector3 Position = player.Position;
grand flower
#

player is never set

#

so it'll always be null

marsh minnow
#

How can i set it?

static meteor
#

You can't do public static Player player { get; }
You'll have to do a foreach loop of Player.List

teal junco
marsh minnow
#

Yeah I just realised

teal junco
#

and then do player = Player.List.FirstOrDefault()

#

assuming youre doing like

#

testing

teal junco
restive turret
#

if you want to get the player you either need an event that has a Player or get a specific player

#

learn C# first

terse bone
#

LabAPI doesn't set Modded flag automatically?

static meteor
#

Installing a plugin should enable it

terse bone
#

i use only private plugins

static meteor
#

The server should automatically enable the modded tag if any plugin is loaded

terse bone
#

it should, but it doesn't

royal mica
#

Can confirm it is a bug

#

Which I only noticed now

#

I think NWPlugin did it

terse bone
#

yup, it did

idle lion
#

Oof

royal mica
low edge
royal mica
#

going to fix that manually in our plugin then

#

thank you Xname

terse bone
#

now my vanilla server with transparently modded config options set to true is a modded server
and server with heavy gameplay changes is a vanilla lmao

royal mica
#

atleast one of the officials is now modded as well (when new round happens) 😄

#

well, "modded"

terse bone
#

now i know how many players really pay attention at the "modded" flag ||no one||

teal junco
#

Why are UnitNames still not customisable

#

its very sad

teal junco
idle lion
#

so now delist all servers that are spoofing modded flag :tf:

grand flower
#

Is there an event called when 079 pings something?

marsh minnow
#

error

#

Because problem is in Round_start and I don't know how to fix it

terse bone
marsh minnow
grand flower
#

made a suggestion issue on github

grand flower
#

In PlayerEvents.Death, are the player's effects still active?

royal mica
#

Can someone tell my why UserGroup's toString was changed?

#

like, previously in 14.0 it was Name but in 14.1 it is "UserGroup"

#

wha

hearty shard
#

huh?

royal mica
#

Yeah

#

This is SCPSL internal stuff

#

not even LabAPI

hearty shard
#

can you show

#

i dont have the decompiler version of 14.1

royal mica
#

Not decompiled, but rather basegame

hearty shard
#

yes?

royal mica
#

Left: 14.0
Right: 14.1

hearty shard
#

Which is required to read basegame code without asking for source code

royal mica
#

Sorry, just assuming 3 layers of knowers: Plugin Devs (nosauce), LabAPI (labapi sauce) and SCPSL devs ( full sauce)

#

And UserGroup is basegame sauce

#

so they have git history for why ToString was changed

#

(or rather absent)

hearty shard
#

labapi devs have sl source

#

btw

royal mica
#

Oh

#

TIL thanks

hearty shard
#

at least maintainers

#

otherwise they cant rly add basegame feature like events

royal mica
#

One of my mods were part of the Windows 7 network group for few weeks instead of Moderator icant

hearty shard
#

Um

#

UserGroup doesnt look like it ever had a ToString() override

royal mica
#

That is strange, in 14.0 it went to the BadgeText

hearty shard
#

At least in 14.0 it doesnt as of rn

#

That i can see

royal mica
#

Intereeeesting

#

Did I discover an unintended feature

hearty shard
#
using System;

[Serializable]
public class UserGroup
{
        public UserGroup Clone()
        {
                return new UserGroup
                {
                        BadgeColor = this.BadgeColor,
                        BadgeText = this.BadgeText,
                        Permissions = this.Permissions,
                        Cover = this.Cover,
                        HiddenByDefault = this.HiddenByDefault,
                        Shared = this.Shared,
                        KickPower = this.KickPower,
                        RequiredKickPower = this.RequiredKickPower
                };
        }

        public string BadgeColor;

        public string BadgeText;

        public ulong Permissions;

        public bool Cover;

        public bool HiddenByDefault;

        public bool Shared;

        public byte KickPower;

        public byte RequiredKickPower;
}
royal mica
#

That is the same for 14.1

hearty shard
#

yep

royal mica
#

huh...

hearty shard
#

i cant check 14.1 decompile only labapi beta

royal mica
#
// Decompiled with JetBrains decompiler
// Type: UserGroup
// Assembly: Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 156569EC-C726-4212-AB3F-E7F73EAB7F55
// Assembly location: /mnt/ssd-storage/Dev/MemeSCP/MemePlugin/libs/Assembly-CSharp.dll

using System;

#nullable disable
[Serializable]
public class UserGroup
{
  public string Name;
  public string BadgeColor;
  public string BadgeText;
  public ulong Permissions;
  public bool Cover;
  public bool HiddenByDefault;
  public bool Shared;
  public byte KickPower;
  public byte RequiredKickPower;

  public UserGroup Clone()
  {
    return new UserGroup()
    {
      Name = this.Name,
      BadgeColor = this.BadgeColor,
      BadgeText = this.BadgeText,
      Permissions = this.Permissions,
      Cover = this.Cover,
      HiddenByDefault = this.HiddenByDefault,
      Shared = this.Shared,
      KickPower = this.KickPower,
      RequiredKickPower = this.RequiredKickPower
    };
  }
}
hearty shard
#

yeahh

#

so yeah nothing

royal mica
#

I wonder why it worked in 14.0 but not in 14.1

#

anyway fixed, so it doesnt matter

languid temple
hearty shard
languid temple
#

no

hearty shard
#

Awh

languid temple
#

maybe

#

gently

hearty shard
#

woo

worn gull
royal mica
hearty shard
unique crane
#

Doubtful

languid temple
unique crane
#

But you can try it and see

royal mica
#

(yes, they quoted the C# event itself and I did the override name in CustomEventHandler)

grand flower
#

I'll try it

grand flower
royal mica
#

Based on source, they should be dead by the time that is called

grand flower
#

kinda figured, unfortunate

royal mica
#

Try OnDying

grand flower
#

yeah that's what i'm using atm

#

just not ideal since another handler can say "nah"

#

i'll probably just save some state between Dying/Death to bridge the gap

royal mica
#

Wouldn't lower lib prio would solve that?

#

Thinking from a LIB perspespctive that forcefully applying event to a Dying + Death would cause unforseen consequences like "why did this run while I prevented it"

grand flower
#

within same lib

#

is the issue

royal mica
#

Aaah

grand flower
#

I don't control the order of each event handler being added/removed either since they're only added when necessary

#

attempting to would probably lead to some disgusting code anyway

restive turret
grand flower
#

Does the OnServerProjectileExploded get called when a projectile explodes or also when the fuze starts?

#

nvm only when it explodes, agh

#

is there any event I can get for when a timed grenade starts ticking? outside of being thrown by players

#

i.e. explosion starting another grenade's timer

restive turret
#

Idk check game code

#

TimedGrenade or ExplosionGrenade

grand flower
#

yeah neither of them fire an event when they start ticking

#

i'll just handle it with OnServerProjectileExploded then

restive turret
#

You can patch it

#

Awake ?

royal mica
#

ok

#

14.1 HANGS when ban file is invalid

grand flower
#

The event should be fine

worthy rune
#

player.Camera doesnt have a NetworkIdentity, so its not pareted client side

teal junco
#

Wait why isnt it a net identity

worthy rune
#

net id is usually only on the root object

teal junco
#

oh okay

#

bump, not important

worthy rune
#

i have heard of using a string path todo it, although not sure how to generate them

teal junco
#

and to find the path to the non NetIdentity object relative to its ultimate NetIdentity parent

teal junco
#

so nevermind.

#

I think I'm actually double wrong but

#

my excuse is its 11:30

worthy rune
#

its interesting

grand flower
#

But yeah using the path would probably work fine

teal junco
#

Im fairly sure... i misread the docs?

#

I dont know

grand flower
#

Can use the root's NetworkId and pair it with a string path so it works on clients

teal junco
#

I found a simple script online to derive a path name from a gameobject

grand flower
#

the unreal way (almost)

teal junco
upper vapor
#
public static string GetPathToNetIdParent(this Transform transform)
{
    var stack = new Stack<string>();
    while (!transform.TryGetComponent(out NetworkIdentity _))
    {
        stack.Push(transform.name); // maybe GameObject.name?
        transform = transform.parent;
        if (transform == null)
            throw new InvalidOperationException("Object is not part of a networkable object");
    }
    return string.Join("/", stack);
}

public static Transform FindChildRecursively(this Transform transform, string path)
{
    var names = path.Split('/'); // urge to use spans ughhh
    foreach (var name in names)
    {
        transform = transform.Find(name);
        if (transform == null)
            throw new InvalidOperationException("Couldn't find child transform");
    }
    return transform;
}

haven't tested but it might work

grand flower
#

Unreal generates its equivalent of a network id the first time it sends the path to a client

#

So it sends "hey, so the object at path X.Y.Z, I'm assigning it network id XXX for you"

grand flower
#

client goes "okay, I will now refer to X.Y.Z as network id XXX"

#

and now then can reference it over the network for cheaper

#

dynamic net guids like these are per player, not one guid for everyone

upper vapor
grand flower
#

same as Unity you can't

upper vapor
#

um

#

you can do that in unity

grand flower
#

then not the same as Unity because you can't in Unreal

upper vapor
grand flower
#

paths are unique, can't have two objects with the same path

#

so World.SomeObject can't have World.SomeObject

#

World.SomeObject and OtherWorld.SomeObject can coexist though, different paths

upper vapor
#

that's nice

grand flower
#

but yeah NW can probably implement that, hell they can look at UE's source code if they want

#

all open

#

unreal's net guids are 8 bytes so once clients ack the dynamic guids they'll just be cheap to reference over the net

teal junco
#

so it kinda caches an object that isnt synced?

#

with its own net id?

grand flower
#

There's different types of net objects in Unreal:

  • Name Stable For Networking: the name is always the same on server and client. This is generally for objects loaded in the map, but you can manually mark an object as stable for networking if you MAKE SURE to name them the same on server and client and you know what you're doing. Even non-networked objects loaded from the map are considered stable for networking and can be referenced over the net. Default components of an actor (think child gameobjects in a gameobjects) that are constructed during class construction are considered stable for networking too (they're not created at runtime but rather exist in the "prefab" equivalent of Unreal).

  • Dynamic/unstable: the name isn't guaranteed to be the same on server and client. Can't refer to it over the net by name. If the object is networked & created on the server, it will get a netguid assigned to it per player and each player will receive that guid alongside the object. If an object only exists on client or server, it cannot be referenced at all. If it isn't networked, it cannot be referenced (not networked = none of its parents up the chain are networked, otherwise you can reference it somewhat)

#

UPackageMapClient handles mapping net guids to objects. Each connected client has one created for them so you can easily map references both ways.

#

In SL's scenario for the discussion above, it'd be considered stable I'd say. Since it's part of the player prefab. Would get a net guid assigned once networked from server to client.

upper vapor
teal junco
#

what happens when the player is killed and respawns and now has a new prefab?

grand flower
#

new netguid because new actor

teal junco
#

anyways if someone could put this in the github discuss, im not comfortable putting it there myself.

teal junco
#

thanks for explaining

grand flower
#

my pleasure

marsh minnow
celest thorn
#

And local admin logs

upper pike
#

The dedicated server terminal

restive turret
#

Well rather than following unreal try follow mirrors thing

grand flower
#

Does Mirror have a way to reference children

#

Because otherwise Unreal's way of doing it is a good fit for that here

#

and Mirror already does part of the job with the NetworkIdentity component

worthy rune
#

i think mirror is kinda light in comparison, it doesnt really support parenting directly it had to be coded to allow it

grand flower
#

Looking at Mirror's API I feel like you could create a NetworkChildManager component to handle the logic I described

#

Mirror's cool, if it existed back in the days I might've stayed on Unity heh

restive turret
#

Eh

#

Isn't really performant

#

And the trillion waving, dirty writing individually isn't great

grand flower
#

wonder if it could use source generators

#

to automate some of that

#

probably could honestly, with source gens you could probs reproduce Unreal's networking API 1:1 and it is quite sweet

#

just dunno why Unity's always been having issues getting a good, stable official networking API :/

worthy rune
#

some of it is generated using weaver

#

like the sync var stuff

grand flower
#

ah i see

restive turret
#

Their networking solution is experiment for over years at this point

#

Many 3rd party exist bc of it

#

Fishnet, mirror, and the SaaS solutions (playfab, photon)

grand flower
#

fair

#

if Player.UserId their SteamID?

worthy rune
#

not garunteed to be, depends on what authentication provider they used, can be discord/steam/northwood and maybe pateron?

grand flower
#

oof

#

oki

#

is there a way to check what auth provider was used

worthy rune
#

the id should be postfixed with the provider e.g. 123122343123@steam or 43824342390@discord safhkajdf@northwood

grand flower
#

noted ty

crimson nova
#

Is there ItemType for Scp127?

restive turret
restive turret
#

Gun127 or GunScp127

#

It's the last or around that

crimson nova
#

none

upper vapor
#

GunSCP127

#

the IDE should suggest it if you start typing

crimson nova
upper vapor
#

make sure to update your references

restive turret
#

R u sure you are on 14.1

crimson nova
#

I am not sure

restive turret
#

:sob

upper vapor
crimson nova
#

Okay I'll try

#

thanks in advance

terse bone
terse bone
#

it just doesn't seem to work no matter what i do

worthy rune
#

do light.transform.localPosition = Vector3.zero instead of light.NetworkPosition which doesnt do anything

#

if your using the LabAPI i recommend using the wrappers instead

terse bone
worthy rune
#

Hmm it works for me

hearty shard
terse bone
#

i figured it out, problem was that the light wasn't static

worthy rune
#

something else is going on, should be no difference between static/non static

#

actually its because of the delay probably

hearty shard
#

why is there a delay actually

worthy rune
#

this should work, even with a delay or isStatic: false

var light = Toys.SpawnLightSource(Vector3.zero, Color.White, 100f, 100f, isStatic: true);
light.transform.SetParent(player.GameObject.transform, false);
terse bone
#

hmm, is this how it would look like with LabAPI wrappers?

worthy rune
#

you should be able to set the parent in the Create command

hearty shard
#

you can just make .Create(player.GameObject.transform)

terse bone
#

you know what? i did that and the light just went to abyss

#

lmao

hearty shard
#

for position

#

thats now local

#

not world position

worthy rune
#

what eve said should really work, atleast from my testing is spawns it right at the player

hearty shard
#

i just realized

#

i dont need to have this as a component anymore

worthy rune
terse bone
#

this is the code, light just doesn't exist

#

even tried to set position once again to 0,0,0

#

nothing changed

worthy rune
#

strange, ill try testing it again later

worthy rune
terse bone
#

I thought the same, this doesn't work either

worthy rune
#

just to make sure, you dont have any other code that manipulates the light like setting its position

terse bone
#

no, there is only code i've shown and for unspawning it for player's that joined during round

worthy rune
#

not sure then

upper vapor
#

how do you respawn the light?

terse bone
#

i don't, after player died i destory the object

upper vapor
#

nvm my question is irrelevant

terse bone
#

i will also check one plugin that might do something to primitives

terse bone
#

MapForge

#

oh yeah, that would have never worked

upper vapor
#

oops

worthy rune
#

ahh

hearty shard
#

😭

#

yea that would do it

worthy rune
#

i guess killer never updated it for client side parenting

upper vapor
#

looks like you need to unpatch the patch

hearty shard
terse bone
#

i will disable the patch and see what happens

upper vapor
#

open an issue on mapforge's github

upper vapor
terse bone
unique crane
#

yipee

worthy rune
#

very nice

hearty shard
unique crane
#

Well

#

):

terse bone
#

just one hour of my life wasted, could've been worse

unique crane
#

Average programming experience

hearty shard
terse bone
#

Idk if killers will continue to develop MapForge because of ProjectMER

#

but i made an issue

restive turret
terse bone
#

this player is invisible to others that's why

restive turret
#

Ah

terse bone
#

having a floating light that's visible to all players is not ideal

worthy rune
#

invisible with the hat effect or by fake scaling the player?

restive turret
#

Fake destroying message

terse bone
#

It's still unchanged from NWAPI

#

I see there's an event for that

worthy rune
#

you shouldnt need to destroy the light if your patching FpcServerPositionDistributor.WriteAll to hide the player as that should be similar to using the hat effect.

#

if i understand it correctly the server sends players to the void when they are considered invisible to the observer

#

and yes that visibility event should do the same thing

terse bone
worthy rune
#

ahhh, yeah your solution would be the way to go

terse bone
#

the lights would also be visible to other "ghosts" and i know some players have bad pcs

#

so yea

rose bridge
#

Did the Y axis change for surface?

#

In 14.1

upper vapor
#

yes

#

it's 300 now

#

but you shouldn't rely on hardcoded values

rose bridge
#

Alright thanks

restive turret
crimson nova
unique crane
#

And are you updating them at the correct place?

#

You might be referencing completely different ones...

crimson nova
#

I tried labapi from git and from the dedicated server, I have no option to do ItemType for scp127

worthy rune
#

ItemType isnt from the LabAPI dll its from the AssemblyCSharp.dll

crimson nova
#

oh my bad

worthy rune
#

i would check what assemblyCSharp you are referencing, make sure its the one for 14.1

hearty shard
#

hi riptide

worthy rune
#

hi

crimson nova
#

I think it is from 14.0

#

Thanks!

restive turret
#

2 times now

terse bone
#

hey
is there a way to know what key has player assigned to Keybind setting in SS settings?

unique crane
#

You can use the SSKeybindHintParameter to replace it client-side

#

For hints

terse bone
#

nooo why

#

i want to use that for hints but now i need to touch my Menu system

#

or maybe not, i made like a milion overloads

terse bone
#

aaaaa

#

there is not overload for SendHint that accepts both hinteffects and hintparameters CatSad

unique crane
terse bone
#

can't wait to delete these extensions

upper vapor
#

1 minute of silence for those extension methods

terse bone
icy knoll
grand flower
icy knoll
#

but there is seperate ones

terse bone
#

yup

icy knoll
#

why is StringHintParameter needed?

spring swan
#

hello dev people

icy knoll
unique crane
#

It isnt

icy knoll
#

why lol

terse bone
#

i had to make some changes to menu system but now i can do that

restive turret
crimson nova
#

Is there a way to spawn specific candy pickup?

unique crane
#

This should do the trick

crimson nova
#

Thank you

unique crane
hearty shard
#

unless you did already

next oracle
#

Y’all think I should bring an exiled plugin over to this? It’s a global stat tracker

upper pike
#

Make one yourself ClassDTroll

next oracle
#

I did

restive turret
#

No way

teal junco
#

less work Trolley

next oracle
#

So it would be making it for labapi

grand flower
#

Unable to PR a fix atm but if any NW dev sees this, Player.ClearItems() has erroneous logic, you're removing items while iterating forward

#
  public void ClearItems()
  {
    foreach (Item obj in this.Items)
      this.RemoveItem(obj);
  }
#

doesn't work

icy knoll
#

hahahaha

terse bone
#

^

hearty shard
#

you just need to wait for a new release

grand flower
#

oh ok

#

cool

grand flower
#

is that fixed? don't see it on the repo

#

nvm found it

icy knoll
#

Is there an event for cancelling inspects in labapi? i can’t find anything for it

#

like when the i key is clicked on an item

#

or is that client side?

grand flower
#

doesn't seem to be the case

#

would be cool to have

#

working on something that needs a lot of keybinds that i'll map to custom actions

#

shame we can't make custom things like that

unique crane
#

but I dont remember why

icy knoll
#

would be great if you could try work on it again or smth

#

or maybe just smth specifically for chaos radio stuff

unique crane
#

aha thats what you want

#

Disable snake

#

Dont you

grand flower
#

any chance in the future to like, allow a few custom keybinds on the server that clients can change

#

which would fire events on the server when pressed?

unique crane
#

Server Specific Settings has custom keybinds fields

hearty shard
grand flower
#

oh shit really?

#

got any docs/link to a source file I can look at on how to set these up?

#

that would be awesome

unique crane
grand flower
#

ty, looks sweet

hearty shard
grand flower
#

will check ty

restive turret
hearty shard
restive turret
hearty shard
#

Im gonna kill u

restive turret
#

Why

hearty shard
#

Why not

unique crane
#

Eve wants to kill everyone

hearty shard
teal junco
#

Actually curious on peoples thoughts on this. How would you feel if somebody copied your server's internal plugins? Like not literally copied and pasted the code/dlls but made a feature recreation essentially 1:1? Would you care? Would you feel upset? Would you think it was wrong? Would you think it's their right?

wheat flower
#

if its a 1:1 perfect replica or damn near it, then thats sus

#

but if its just abstract the same way, then idc

grand flower
#

they'd be allowed to be upset but like, it is what it is

teal junco
#

Back when I had less projects I wanted to copy Chaos Theory as one plugin using the wiki and my friends who play CT for reference but I thought it would be kind of disrespectful since I dont know tttt and I didn't ask her for permission. But I did think i would have had the right to if I wanted.

restive turret
#

Many server copies it, creating new stuff based on those is hard than just literally copy mechanic

grand flower
#

Does LabAPI have a way to spawn a dummy that doesn't show up in the player list?

hearty shard
#

check cedmod

#

it has working code iirc

grand flower
#

checking it out

restive turret
#

Oh 0.7.0 soon

grand flower
#

I see, cool

rugged laurel
teal junco
#

Its not very stimulating

rugged laurel
#

Using the wiki tho to make a copy tho is a bruh moment lol

teal junco
#

Is the wiki of

#

questionable quality?

restive turret
#

I use the wiki to learn what NOT to do as respect whoever came up with the idea and implementation

rugged laurel
#

If we talking about the ct wiki its just funny the idea of ppl using the resources we put out there to help navigate the server to copy stuff.

teal junco
#

Oh yeah that's fair

#

I wouldn't've used or published it if I did make such a thing if that makes it better.

#

I thought of it like an exercise. But copying another plugin is kinda boring? Especially a creatively inclined one like CT.

rugged laurel
#

Ya theres a lot of untapped ideas out there

grand flower
#

Making a ripoff server generally doesnt last long anyway

#

Peeps will prefer the original having played on it longer

#

Server died and isn't coming back? Sure. Active server? Bleh

terse bone
#
  • Added new Drawable Lines on both the client and server.
    pog, easier raycast, linecast debugging
terse bone
#

serverhost annoucement

restive turret
#

Oh uh

#

Oh wait 7.0 will be still buggy item clear because x3rt pr isnt merged?Fear

stuck peak
#

yeah Erm

terse bone
restive turret
#

F

#

7.1? Fear

#

Seems like was a fast push choice ClassDPlushie

teal junco
#

not just for raycasts....

grand flower
#

Any event to override the danger level from 1853?

#

i.e. I want dummies not to trigger that

grand drum
#

I have a custom status effect that implements IMovementSpeedModifier but instead of making the player move slowly it just rubberbands them the correct amount so their overall displacement is the same as if they moved slower.

Is it just a desync issue or am I doing something wrong?

#

the values in question.

solar monolith
#

I wanna start doing C#, any video recommendations?

#

I saw something on code ____

static osprey
#

dw, was joking

#

idk any youtube videos but if you wanna learn C# for SL plugins i recommend thinking up a plugin you want and work on that

#

rather than following a YT tutorial on how to make a calculator

solar monolith
#

I want to make a gamble coin

#

With the gamblecore guy audio api

static osprey
#

like, if you flip it and it lands on heads it has a 25% chance to blow you up or something?

solar monolith
static osprey
#

nah, but making a plugin like that should be quite shirmple

#

you can combine the example logging plugin with a bit of googling on "c# 25% chance math example" or something and do a bit of messing about

solar monolith
static osprey
#

hell yeah those sound like good starter projects

static osprey
solar monolith
#

I’ll just have to wait till 14.1 comes out fully (dedicated servers doesn’t update)

static osprey
#

i recommend getting in touch with tech support if you're having issues with updating your server :P

solar monolith
#

Nah it’ll just need to be waited

#

But yea I’m making a server (it’s a funny)
Think chaos theory, on steroids

Hell I’m thinking on making 173-B, on breakneck speed it’ll squish players making them slow

upper pike
solar monolith
#

My ideas on what to make

•Gamble coin

•173-B

•A-train jailbird;
Can’t slow down, speed up to 255 slowly, on contact it’ll explode

teal junco
#

use slowness effect instead since its client side too

#

any other modification will cause desync

grand flower
#

Sucks that we have to use multiple effects

#

Maybe NW can get that implemented or something

worthy rune
grand flower
#

Ay ay

unique crane
#

So you move at the same speed no matter the status effect

grand flower
hearty shard
hearty shard
#

but like

#

its kinda difficult

grand flower
#

yeah, would still be a nice addition

hearty shard
#

theyd have to rework how effects are synced

grand flower
#

they can always network additional data for modded effects

#

makes em more heavy but it'd work

grand flower
#

weird

hearty shard
grand flower
#

@harsh thorn poke, trying to make a fake player that doesn't show up on the player list but is still able to do player stuff (exist, talk etc)

#

any ideas? would be much appreciated ^^'

#

tried ClientInstanceMode.Host and ClientInstanceMode.DedicatedServer to no effect

#

the latter just hides the player in RA but not in the player list

#

hell, even Unverified has them appear in the player list wtf

lucid oxide
grand flower
#

are you allowed to have multiple players with the same userid

#

either way - doesn't work

#

it still shows up in the player list

lucid oxide
grand flower
#

null did it

#

ty

#

where would one override round victory behaviour (through event or patch) to ignore certain players when checking if the round should end

hearty shard
grand flower
#

hmmm

#

yeah seems like the only way

#

annoying that there's no event for that tbh

hearty shard
#

it should be a List<Player> property

grand flower
#

either that or an event fired to check if a player should be counted for round summary purposes

hearty shard
#

well

#

you might be able to redo the RoundEnding logic with that event

grand flower
#

ig

#

wonder if I could prefix/postfix RoundSummary._ProcessServerSideCode

hearty shard
#

well ig you could prefix the entire thing

#

idk

#

i dont remember

grand flower
#

prefix -> set bool "about to run that coroutine"

#

post -> remove bool

hearty shard
#

i know what prefix postfix is

grand flower
#

another patch for ReferenceHub.GetTeam() to return spectator for select players if that bool is true

#

i know you know

#

just slow at typing my logic

hearty shard
#

could cause other issues

grand flower
#

yeah ik it's bad

#

i'll go the transpiler route

#

and by that i mean

#

i'll throw it at another dev on the project that's good at that

restive turret
#

Eve is good at that

hearty shard
grand flower
#

How does one make a damage handler disintegrate bodies like the disruptor

#

Tried to implement the interface its damage handler does and it still doesn't work

hearty shard
#

not a custom one

grand flower
#

Shucks, can we derive from it and override the damage at least

#

Or will that also break

hearty shard
#

i wouldnt know

grand flower
#

Try it and see moment for tomorrow

#

Ty

restive turret
#

you can set the dmg

#

yes

#

if you publicize the ASM otherwise not

hearty shard
restive turret
static meteor
#

Is the dryfiring event fixed in the 0.7.0 version of Labapi?

unique crane
plain gazelle
#

Does not fire

teal junco
#

doesnt fire

#

You could say that it...

unique crane
#

NO

plain gazelle
#

I went through all weapons, including SCP-127. None call it

unique crane
#

Lets see

#

its literally there

hearty shard
teal junco
#

It...

#

Dry-fired

hearty shard
#

im proud

teal junco
#

thank you everybody.

unique crane
#

You are getting 50 credits

#

(they dont do anything)

hearty shard
#

david

unique crane
#

Aha

hearty shard
#

can you give me 50 dollars

unique crane
#

You know what the issue is

hearty shard
#

thanks

hearty shard
unique crane
#

Nothin

#

It fires only once, which makes sense

#

It cannot dry-fire if it aint cocked

plain gazelle
#

ah so i need to cock my weapon per code first?

teal junco
unique crane
#

Yep

#

you just click

teal junco
#

which i guess doesnt have qn event.

unique crane
#

Unfortunely no

teal junco
plain gazelle
#

So non-revolver weapons would need to be cocked per code to then use the Dryfire event?
Alright

unique crane
#

It would work fine

#

Its synced

teal junco
#

i didnt say theres a desync just that it may look weird sometimes.

unique crane
#

There wont be any animation

#

If you just Cocked = true

teal junco
#

rlly

#

huh

unique crane
#

But the barrel will go forward

teal junco
unique crane
#

slide*

teal junco
#

Okay yeah probably

unique crane
#

Ill record it one sec

restive turret
#

WeaponClicking

#

WeaponNotFiringAndNotDryFiriring

teal junco
#

should be allowed to cock any gun manually

#

smh

unique crane
#

Inserting magazine and reequipping should trigger the animation

teal junco
#

I bet so yeah

#

and if you reload then he cocks right after too

unique crane
#

Yeah

#

And these are seperate

#

as you can insert magazine and then unequip the gun

teal junco
#

i wonder if i can empty a chamber and mag from code?

unique crane
#

Absolutely

teal junco
unique crane
#

Hubert made them very much simulated

hearty shard
#

simulated?

unique crane
#

well like

#

It acts like a real firearm

#

mechanic wise

hearty shard
#

oh

#

like that

unique crane
#

There is actual bool if it is cocked

#

for each barrel in multi-barrel weapons

teal junco
unique crane
#

(just a number of cocked)

teal junco
#

and the client wont desync

unique crane
#

Yeah thats done automatically

#

You can actually change the amount of chambers

#

and it works just fine lol

#

Up to 16

#

Even synced

teal junco
#

wait

unique crane
#

In the inventory

teal junco
#

I can change the number of chambers

unique crane
#

Yep

teal junco
#

in any firearm??

#

What does that even entail

unique crane
#

Uhh every that uses AutomaticActionModule or PumpActionModule

#

havent tested with revolver

#

and surely not for disruptor

plain gazelle
#

Gonna change the shotgun to have 3 barrels to have a TF2 equivalent Loch n' Load :p

unique crane
#

You can change it to 16 even in current version

teal junco
unique crane
#

Eg

#

Automatic Action Module, Pump Action Module, Magazine Module

teal junco
#

what does automatic action mean

#

Is that a revolver?

hearty shard
#

you hold down

#

it shoots

#

probably

unique crane
#

Yeah

hearty shard
#

iirc

#

yeah

#

so E11

unique crane
#

Its the most used one

hearty shard
#

crossvec

unique crane
#

Yep

hearty shard
#

etc

teal junco
#

Oh okay

#

so it means full auto

#

Makes sense

#

what happens if i give it more than one chamber?

unique crane
#

Only Revolver, Shotgun, Disruptor uses different ones

hearty shard
#

pistols ?

unique crane
teal junco
unique crane
#

Yep

teal junco
#

does the gun handle any differently, like does it shoot more bullets or does it run out faster or is it just a glorified magazine extension

unique crane
#

Then it just iterates over each barrel and does the shoot logic

plain gazelle
#

Could i switch out the Pump Module for a Full auto module on a shotgun? :o

unique crane
#

Or whatever you want

#

below that

#

Shotgun doesnt cycle unless all barrels are empty

teal junco
unique crane
#

Yep

#

Also turns out you can just hold the trigger for shotgun lol

#

(didnt know that)

teal junco
unique crane
#

Yes

#

Like

teal junco
#

at once...

unique crane
#

No

#

Like normally

teal junco
#

okay

hearty shard
#

nuh uh

plain gazelle
unique crane
#

Well you just dont hold the mouse button?

restive turret
#

you can uncock the revolver after each shooting

teal junco
unique crane
#

Yeah for rifles it shoots all 16 at once

#

and other

#

Like com45

#

Com45 is just com15 but 3 barrels and more firerate

plain gazelle
unique crane
#

Never happened to me

restive turret
#

make game go boom

#

i know you can swap modules I did it but idk if actually works as supposed to

unique crane
#

Nop

#

Its gonna break

restive turret
#

then I had luck with micro that it worked

unique crane
#

What did you do

restive turret
#

lmao

#

removed Charge Firing

teal junco
#

what happens if i set a chamber and mag to empty, the player uncocks it by firing and i reset the chamber and mag to loaded?

plain gazelle
#

-# im still new to LabAPI, only used Exiled so far and cant find this there either
How do i cock a gun per code?

restive turret
#

made a new that does the same except louder and much more damage

teal junco
unique crane
#

This is what happens when you do 16 chambers

restive turret
#

Firearm::Base::TryGetModule(out AutomaticActionModule action)
action.Cocked = true;

or
Firearm::Base::TryGetModule(out DoubleActionModule action)
action.Cocked = true;

unique crane
#

And for automatic actions

#

Note: you have to set it each time player equips it

restive turret
#

sob

unique crane
#

No

hearty shard
#

💔

unique crane
#

Now I forgot what I wanted to do after showing this cool thing

#

oh

#

i know

plain gazelle
#

Linking a message in another channel gets blocked by automod, rip

plain gazelle
unique crane
#

Maybe when there will be time

restive turret
#

you have time

#

aint?

#

you talking here

unique crane
#

There isnt that much time before 14.1 yknow

restive turret
#

F for labapi

plain gazelle
unique crane
#

You can just patch the method

restive turret
unique crane
#

Oh also it might not fire even when you patch it since it checks shot request queue

#

and there might be client-side checks too

#

but idk about that

unique crane
restive turret
#

AutomaticActionModule.UpdateServer

if (!this.Cocked)
{
// PATCH HERE
this.ServerSendRejection(AutomaticActionModule.RejectionReason.NotCocked, 0);
return;
}
upper vapor
# teal junco I thought of it like an exercise. But copying another plugin is kinda boring? Es...

remaking everything by only knowing the "requirements" (how it works based on your and others' observations) is really fun imo
if you remake someone else's plugin that's impressive, if you remake a whole game in SL that's brilliant
we should remake every game in SL (including SL toomuchtrolling)
sure, a remake doesn't play the same way, but it can be fun for players if the game is hosted as an event from time to time instead of being constantly available (people have said that it gets boring, i agree)

unique crane
#

How do you remake SL in SL

upper vapor
#

idk lol

restive turret
#

easy

#

display

plain gazelle
#

-# Is there a way to disable the first-time equip animation on a weapon?

upper vapor
#

or, well, load a bullet into the chamber

unique crane
#

Yeah

upper vapor
#

cca47f7 SteamHappy

#

oh god, delegates

restive turret
#

sadly there is no c0ac2d9

restive turret
upper vapor
#

the InteractableToy wrapper

#

combining delegates is funny

#

but Riptide did it well

restive turret
#

oh on action

upper vapor
#

yyyeeeeaaaaa

teal junco
upper vapor
#

yes

#

we make SL using primitives

#

and use SSSS for every action

unique crane
#

Theoretically possible

#

But like

#

I wanna make Payday in SL

#

XD

untold raft
#

14.1 release with stable LabAPI?

static meteor
#

Yes

restive turret
#

how does the permission.yml works ?

static meteor
#

Nwapi is completely removed in 14.1

#

I'd assume it's like Exileds but idk since I can't remote connect to my server rn

upper vapor
upper vapor
static meteor
#

Basically Exileds permissions setup

restive turret
#

tried doing kind of same thing as on exiled

owner:
  inherited_groups:
  - moderator
  permissions: []
moderator:
  inherited_groups:
  - default
  permissions:
  - ca.showhidden
  - ca.earn
default:
  inherited_groups: []
  permissions: []

but didnt see it works so

upper vapor
#

uhh

#

um

#

inherited perms should work too

#

are you invoking sender.HasAnyPermission("ca.earn") for example?

restive turret
#

sender.HasPermissions("ca.showhidden")

#

ye

#

pp resulting nothing

upper vapor
#

weird

restive turret
upper vapor
#

your server role is owner i suppose

#

try un-recusivifying it

#

-# yes i made that a word

restive turret
#

huh

upper vapor
#

just copy the moderator perms

restive turret
#

laugh at this guy

#

still not

upper vapor
#

did you restart the server

#

😭

restive turret
#

ye

#

I restarting the server every time I do change my dlls

upper vapor
#

all i can say is

restive turret
#

even if tis offline mode and i grant myself owner at RA console should have that permission

grand flower
# restive turret

Need to override ApplyDamage so that I can bypass some stuff but that should be possible anyway, ty

brazen dune
#

@restive turret wrong file

#

edit perms at config folder not individual server

#

or vice versa

#

maybe it'll work

restive turret
#

what file like

brazen dune
#

permissions.yml

#

at LabAPI-Beta\configs or LabAPI-Beta\configs\<port>

restive turret
brazen dune
#

try using both

restive turret
#

no there is only one

brazen dune
restive turret
#

C:\Users\matec\AppData\Roaming\SCP Secret Laboratory\LabAPI-Beta\configs\permissions.yml

royal mica
#

The changelog does not include the auto Modded flag, but looks like it is implemented

#

Thank you!

restive turret
#

cca47f7 Set modded flag - ced777ric

royal mica
#

Well the full one yeah

spice hatch
#

@marble cobalt When is the next northwood studios development stream?!?!

tulip kiln
#

Hoping for an official SSSS wrapper

icy knoll
tulip kiln
#

I didn't put up with NWAPI for 3 years to just come back to a 3rd party library again snap

icy knoll
#

hey it’s probably a better solution than what anyone else has made

tulip kiln
hearty shard
#

my api is lovely

#

(i dont use it)

#

i gotta make a release on it tmrw

#

if i dont forget

tulip kiln
#

I'm sure Xname's code will be easier to maintain by myself, should he stop development. I can't imagine porting a framework just to keep my plugins working 😭

hearty shard
#

look at secretapi

#

it has a few extensions, ssss wrapper and custom effect w basegame

#

Thats rly it

#

(also if you wanna copy paste it im not too opposed)

hearty shard
terse bone
terse bone
#

so just take it yourself trolling

icy knoll
grand flower
#

Wonder if there's a way to do so through patching atm

rugged laurel
#

Prob not the answer you want but you can fake someone’s appearance as a spectator to spectators to accomplish this

grand flower
#

In the context I'm thinking of, it would break other stuff

#

I need to check if that's even an issue rn since they are setup as a fake dedicated server player atm

#

Just forgot to test it

grand flower
rugged laurel
#

ya it would make them invisible to spectators seeing through other players eyes

grand flower
#

yeah not ideal

#

just don't want them to be things you can spectate

#

Doesn't seem like there's any other way to hide them atm

#

That's unfortunate

#

Unless there's a mirror message to delete a component on the client?

#

yeah no

#

rip

#

fake role appearance it is

spice hatch
#

we get a good api when beryl is in charge

upper vapor
#

@unique crane could you show us how 079 camera constraints are handled on the client?
are they specified in angles or what? for the values i set are either too small or make the camera go wild (rotates continuously because of the constraints)

unique crane
#

Uhhhh @worthy rune

upper vapor
#

:3

unique crane
#

(he made camera toy so he knows better than me)

worthy rune
#

all angle constraints should be in degrees with x < y iirc

upper vapor
#

that's what i did but it just flickers
i'll see with different values
this is for the EZ camera

#

zooming out doesn't work

worthy rune
#

zoom can only go from 0 to 1 so if you want to lock zoom at 100% you can do x = 1 y = 1

upper vapor
#

oh 0 to 1

#

aight

worthy rune
#

the angles look fine to me, do you have a video of whats happening

upper vapor
worthy rune
# upper vapor

i just tried out those constraints and they worked, are you sure the constraints you set are being applied properly

upper vapor
#

i used the NetworkConstraint properties when spawning, i'll print out what i get

worthy rune
#

my guess is somehow the x and y were switched

upper vapor
#

okay so negative vertical rotation is up, that might have been the issue

worthy rune
upper vapor
#

good point

#

okay yeah that's informative

#

i didn't notice the docs

#

thx

worthy rune
#

no worries

worn gull
upper vapor
#

sloc

#

ProjectMER has them afaik

#

nvm

restive turret
#

via code

worn gull
heady turret
#

how to change name of admin toy camera (default is LczCameraToy)

upper vapor
worn gull
upper vapor
#

AssetRipper

restive turret
#

Lmao

#

If you want to see thing inside unity you need shitton of editing the .cs files to be shown in editor

upper vapor
#

no

#

you just delete the missing scripts

restive turret
#

All scripts ye

upper vapor
#

you don't even have to remove them

restive turret
#

Half of them errored when I ripped

upper vapor
#

also i meant as from the components

upper vapor
restive turret
#

I ripped from DS

upper vapor
#

what exporter did you use

restive turret
#

Not client

#

Little same AR

upper vapor
#

yeah that's uh

#

not very useful

restive turret
#

Latest version

upper vapor
#

it doesn't know how to handle non-script classes

restive turret
#

It was unity monobehv one

#

Especially something that used backingfields

upper vapor
restive turret
#

Spent 2 hours of fixing it

upper vapor
#

all of the scripts?

#

dam

restive turret
#

Ye

upper vapor
#

you're probably better off using dnspy to export the project and putting that into unity

restive turret
#

Ye i did end up doing that

worn gull
restive turret
#

It was like around ~1000 error

#

And its 2 version behind

heady turret
#

is that bug with all? (customkeycard in inventory dont show perms and name)

unique crane
#

Name should be fixed in the latest version?

#

The perms are still broken yea

heady turret
heady turret
unique crane
#

Bruh I tested them..

unique crane
heady turret
unique crane
#

Will look at it soon

icy knoll
#

i did report it in the qa test that it is the case but everyone shrugged it off

#

probably didnt see it idk

unique crane
#

No issues on my side