#plugins-dev-chat
1 messages Β· Page 216 of 1
I hope you atleast join competitive server
Nothing wrong with that, don't get me wrong
i do not know any competetive servers
Actually this could be easily solved by having tags for servers
there are a few
i just play the most popular polish vanila no ff servers
vanilla sometimes makes me screech
strawberry sometimes
you probably play the horrible modded servers then
i used to play dr brights
Go play eSports titles or something if you wanna be competitive
i do
Hey. Class TemperatureTrackerModuleonly work for A7?
Yes
if servers acctually ban for tryharding then holy shit is someone not allowed to be better than othersππ
You my good sir need to stop playing the bigger servers like Brights and Chaos Theory... there are good servers out there that aren't massive communities but it's hard trying to find originals that don't plugin stack 30 plugins for an experience
You can't change the modules
i only play if theres 20+ people on a server so
small communities arent it
is that from yevz?
yevz got banned for the same reason
You're missing the good servers then
What
alot of times lol
Idk
you got it from Scp-discussion?
Someone posted this gif
yea i'm pretty sure that's one of his bans lol
im not in it for the community
hell nah
more than 25
is too much
"small" : 158 player
Halloween 2023 was crazy for playcounts

25 players is the base line set by NW, and sometimes I understand why servers raise the cap
more than 25 gets too chaotic
Just causal JavaScript stuff
Simple solution... don't join servers with over a 32 player slot limit
I actually laughed histerically at this
do take the quiz
it is actually hilarious
I'm not doing anything js related stuff if it's not necessary
boo
just make it run doom atp
I legit could 
Should I?
Yes
Hmmmm
Local admin is too boring
Itβs probably gonna take me a while tbh
They just act like that when you're nearby
And I'm not joking, sweats online casue this effect 
With the decompiled version of an human model. How am i supposed to deal with hand not affected by animator. Im working on something but hand are not affected by the animator and the transform are ticky
You cant modify the animations
They are client sided
Not on SL, im talking about unity :
i wanna make hand affected by animator
or find what is touching it
In that case your the server you wanna ask abt is unity / sl modding
That not for modding the game itself
bro omg π
is it this RainbowLogs that appeared on my home page?
Mh mh, yeah
You've just found out
?
Can I prevent zombie from getting a bloodlust if he chases a specific player?
I didn't see the event in LabAPI
probably
ZombieBloodlustAbility:
public bool AnyTargets(ReferenceHub owner, Transform camera)
{
foreach (ReferenceHub allHub in ReferenceHub.AllHubs)
{
if (allHub.IsHuman() && !allHub.playerEffectsController.GetEffect<Invisible>().IsEnabled && allHub.roleManager.CurrentRole is IFpcRole currentRole && VisionInformation.GetVisionInformation(owner, camera, currentRole.FpcModule.Position, currentRole.FpcModule.CharacterControllerSettings.Radius, this._maxViewDistance, checkInDarkness: false).IsLooking)
return true;
}
return false;
}
patch this
eve can you add a bloodlust event to secretapi
should i though
can't you just you know patch it
instead of relying on someone else
π§
I can but I have to bother eve since she hates firefox
what the scallops?!
Who needs APIs anyways
Is there a way to get this to deal damage to nobody
var grenade = ExplosiveGrenadeProjectile.SpawnActive(ev.OldPosition, ItemType.GrenadeHE, null, 0.01);
Check the event
OnDamage
well if you just want particles there is another way
aight
^^^
Pretty sure ExplosionUtils has something
im torn because i kind of want to blow people up ngl
holy fucking shit
?
hello ax
i genuinely thought there was an event for this already
no
There was a suggestion or something i believe
Where is the event which runs when every player spawned at round start
RoleChanged 
bruh
use RoleAssigner.OnPlayersSpawned
i know exiled has something like Map.PlayExplosionEffect
ExplosionUtils.SpawnEffect or something
ExplosionUtils::ServerSpawnEffect
not an instance property
so it's . instead of ::
I forgor
frogot
what was the way of getting someones name without the color tags again
For some reason if i do textToy.Text.Network_textFormat = player.DisplayName it then shows some parentheses after it or sth
im limiting the length atm but yeah, they got colors after them or sth
Its sth about that * if the player has a custom set name
.Replace("*<color ....>", string.Empty)
hm
I personally used ev.Player.ReferenceHub.nicknameSync.Network_displayName when I came up with this issue - worth a try
I personally have patched it
Hey, guys!
Could u help, can I make a specific player see as an SCP during PC's blackout?
night vision effect
It is an effect?
Ye
omg free π
π₯
,
This is so peak ngl
napoli scp....
@celest thorn those who remember
Avevo ragione lol che era il tuo
Only reasons that can cause turning lights off/on are:
- SCP-079
- SCP-079 recontam
- Lightbulb
- RA command
Didnt I miss sth
?
Is there anyone here who knows why is there a check for role's active time in PitDeath effect?
Is it a fix for some unusual bug?
prob to ensure youve fully spawned in
hmm, okay
When you spawn your position is set after your role get changed
It's could be reduced to 0.1f
I remember us patching it a ton on Bright's
1f is making the possibility for Scp0492 to spawn without getting killed by pit effect
it's so janky
Set ActiveTime kinda
Don't remind if you can but probably?
The fact role init takes multiple frames is awful
Yeah my bad lol
it just sucks, had to write so much garbage code to handle that
But it's was a lot worse before lol that why i am happy kinda
You can use dnSpy to analyze what uses FlickerLights()
that should get you everything
He have all of them

You miss microHid overcharged
I consider you don't take in count candy from Halloween
It AfFeCtS tHe LiGhTs? 0-0
Okaaaaay
Thanks β€οΈ
Just charge your microHid without stopping
It's kinda a not very know features
Isnt it like 2 frame or something?
Mostly bc of pooling and waiting for the packets to be send/read
There some Awake or OnStart method
I don't remind exactly
Just yeah some property are null
First tick
Awake => Start => Networked stuff
Yeah
That's unity stuff can't do much
But if you do
Player.SetRole
Player.Role.Dothing
You could get some nre
In the same tick
I remember fixing some bug but it made 3 other bc of network syncvar not being read in awake
I don't remind for what i get this issue but was probably about some subroutines stuff
something like that, still sucks
should be on the frame you set the role
Cant really change that much ngl
Yeah I knew it blows up
But turning off the lights...
Never noticed
Thanks a lot β€οΈ
Cus no one prob ended up blowing up
It's flash light and destroy door
Yeah xD
I think it's too generous
And so mostly nobody hit the limit
yeah, I patched the effect and made custom PitKiller component that also handles OnTriggerExit
now i can't get stuck in void no matter what
Why not, you make the game lol
Well i have to study more on this unity and networking behavior so.
But i believe it is one frame away to call Awake then Start
Or it's after it? I don't know that so
Plus maybe pooling related? One frame to get it? Or is it multiple? Idk
Awake is on instantiation
Start is right after if the game object is enabled
So it shouldnt be an issue
But it is after awake or have 1 frame delay between that
Gentlemen
Stupid question
Do we have Overcharge event or sth similar in LabAPI?
To detect if the lights went off due to overcharge?
I coudnt find that, but Im dumb, mb missing sth
J think there is something
There's the 079 recontained/recontaining events but idk if that triggers if 079 dosent exist
/// <summary>
/// Gets called when SCP-079 is being recontained.
/// </summary>
public static event LabEventHandler<Scp079RecontainingEventArgs>? Recontaining;
/// <summary>
/// Gets called when SCP-079 has been recontained.
/// </summary>
public static event LabEventHandler<Scp079RecontainedEventArgs>? Recontained;
Yeah I saw that too
Not kinda what I want
In CSharpAssembly I saw that full logic is in Scp079Recontainer
right after Awake
same frame
Ah
that's incorrect
OnEnable is called immediately when the gameobject is enabled
Start is called on the first frame when the object is enabled
Awake -> OnEnable -> next frame -> Start (if enabled)
for 1 make sure to have both room blackout and zone blackout
Its kinda just foreach blackout over zone rooms
So technically its covered
yeah but there are two labapu events, no?
Is there an universal event for when items get dropped after a player dies/player drops an item/player throws an item?
InventoryExtensions.ItemRemoved i think
Doesnt it also get called when a player unselects their item?
no
but the pickup might be null
the item doesn't get removed if you change to a different item, does it? 
Dunno, once tried to use it and it instantly fired after I unselected my medkit.
um
I think no
It gets destroyed when changed to a pickup
And when removed by ra
yeeeeees
Does using remote admin send a request to ra?
good question
curse of remote admin
curse of david
ππππππππππ πππππππππππππππππππππππππππ π‘π’π£π€π₯π¦π§π¨π©πͺπ«π¬π»πΌπ½πΎπΏππππππ ππππππππππ πππππππππππππππππππππππππππ π‘π’π£π€π₯π¦π§π¨π©πͺπ«π¬π»πΌπ½πΎπΏππππππ ππππππππππ πππππππππππππ
oh.
Why has this remained in the LabApi repository for 7 months 
fun
squash merge
I actually didn't noticed it multiple times and still Forgot it's there
excuses π
glad we don't rely on github for that 
Squad merge
no
yes!
no
:(
Is this how we are supposed to dispose of items?
item.CurrentOwner?.Inventory.ServerRemoveItem(item.Serial, null);
or ig this is the labapi way (runs the above):
item.CurrentOwner?.RemoveItem(item);
if ur trying to fully delete the item yes
i do believe thats how
why isn't there a method for this? this feels a bit awkward (it would literally call that)
it's not that bad. I was thinking about making a PR but I'm too lazy for that
extension(Item item) { public void Destroy() => item.CurrentOwner?.RemoveItem(item); }

is there a way to apply force to Player or change his velocity(somehow) or the only possible solution is to apply position change every tick?
set pos
most plugin implementations of player velocity / pushing tend to recreate it server side with adding the velocity to the player's position incrementally and the such, as I don't believe there's any method to apply force to a player unfortunately (could be wrong though)
Are pickup and item serials related?
Can I expect pickup serial equal item serial if I throw it?
oh thats great
How can I get the items a player drops when he dies? It's for cleaning them after 15s for a PvP mode
Like an individual timer for each item?
Maybe
You can make just coroutine that runs every 1 second, iterating over all spawned pickups
increasing their number in some dictionary by 1 every loop
and deleting them on 15
But how do I compare it with actual map loot?
Oh hm
(There is a custom pvp zone)
Use the Dying event and drop all of their stuff in that event
You can get the Pickups objects from there
Hm will try, thanks!
!softban 693966678266085476 Account compromised; change your password.
God I hate free money so much
Done. Enough chaos.
cheese
No
what crimes
war crimes
I havent pushed that lol
How can I manually register a command?
[CommandHandler(typeof(ClientCommandHandler))]
This registers the command automatically
i'm gonna commit several ||lines of code||
look for the handler in CommandLoader and call RegisterCommand on the instance
ok
QueryProcessor.DotCommandHandler.RegisterCommand(command);
CommandProcessor.RemoteAdminCommandHandler.RegisterCommand(command);
GameCore.Console.singleton.ConsoleCommandHandler.RegisterCommand(command);
or this
ig
why does sl can give deafult interface and i have a skillissue Instance property in interface cannot have initializer
C# version
Not sure what the issue might be on your end sadly, but we do use some tricks to force a newer C# version on our current Unity version
also maybe bc of unity edited mscorlib
skill issue ig
That's a framework-dependent feature
Disable implicit framework references, and use mscorlib, System & System.Core from the game assemblies
should i do that to all of my projects if i have one referencing another?
You don't have to
But if you have multiple projects in a folder, I'd suggest using Directory.Build.props (if you can be assed with customizing MSBuild)
never used it tbh
just had a template
That can work, too
Hopefully we'll get an official plugin template at some point ([0, βΎοΈ[)
didnt work unfortunately
Huh
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<Reference Include="mscorlib">
<HintPath>$(SL_REFERENCES)/mscorlib.dll</HintPath>
</Reference>
<Reference Include="System" HintPath="$(SL_REFERENCES)\System.dll" />
<Reference Include="System.Core" HintPath="$(SL_REFERENCES)\System.Core.dll" />
<Reference Include="netstandard" HintPath="$(SL_REFERENCES)\netstandard.dll" />
IFoo.cs:77 Instance property in interface cannot have initializer
Code?
i have some kind of skill issue my bad

Approximate (~100km)
then flat the entire neighboorhood
Please nuke hungary π
var pickups = ev.GetType().GetProperty("Pickups")?.GetValue(ev) as IEnumerable<Pickup>;
What the fuck?
how should i do it then?
only david and gpt could cook like this
i coudn't get it to work so i just asked chat gpt
there are humans to ask
what do you want to do
get the items that a player automatically droped because of his death
i can only get ammo to dissapear
i tried using
private void OnPlayerDying(PlayerDyingEventArgs ev)
var Items = ev.Player.Items;
foreach (var Item in Items) {
ScheduleItemDespawnOnce(Item, PvpDropDespawnSeconds);
}
}
...
item.MoveTo(Server.Host); //I found this doing a search this discord server
but it's still there
A small question, what part of the game uses Scp079CameraRotationSync?
CameraRotationAxis
its just what syncs where the camera is looking so players can see the 079 move
Where? I already searched that class countless times and I still couldn't find it
what is this even for
To manually move 079's cameras in random directions
on client:
Scp079CameraRotationSync -> goes into ClientProcessRpc -> Scp079Camera::ApplyAxes
So which gameobject is Scp079CameraRotationSync attached to?
Scp079Role
its a subroutine
but uh
i do believe you need an 079 to fake it
Doesnt the local instance count as an 079?
wat
technically
you still need an 079 tho
you need OnRoleChanged with an Scp079Role
that needs to be a LOCAL player
aka the server host in this case
its null in any other case
dear nw staff could we get offical pdf of usage stripdown command since Hubert shown it on the stream but in shitty quality
and it also seems like a good development tool
@unique crane pretty please
anyone knows how to have 2 hints at the same time?
use hsm or ruei
hm ok
OR wait for 15.0 release
I'm gonna use ruei for now
thats cool, like making menus?
but you can see what the community has made with only tex
but non clickable
oh ok
I love the enthusiasm but some servers need two hints before 2027 
oops
hey um where do i even get all these??
[2026-05-02 22:05:52.727 -05:00] [ERROR] [LabApi] [LOADER] Missing dependencies:
- LabApi v1.1.6.1
- 0Harmony v2.4.2.0
- SecretLabNAudio.Core v2.0.0.0
- System.Text.Json v10.0.0.5
- System.Net.Http v4.2.0.0
- System.IO.Compression v4.2.0.0
- System.Memory v4.0.5.0
- LabApiExtensions v0.1.7.0
- CedModV3 v1.0.0.0
- System.IO.Compression.FileSystem v4.0.0.0
all of those except cedmod can be found in the dedicated servers files
Oh? Where would i find because im self hosting a private server rn
you can download it in steam, its already in your library hidden under tools
I am not seeing them i could be dumb/blind here
make sure tools is marked as visible
make sure you get the version you want
by that i mean exiled or labapi
read up on what the plugin does so you know what youre downloading
where the heck is SecretLabNAudio.Core.dll
that would be here https://github.com/Axwabo/SecretLabNAudio/releases/tag/v2.0.0
honest question if anyone knows why are schematics not being found
New government -> "please nuke"
So you're one of those oranges 
player.DropAllAmmo()
player.DropAllItems()
What uses all of these dependencies at the same time π
autoevent or whatever but that's the weird thing because on the install it doesn't even mention half of these.
Bruh
like im more confused because the plugin seems to not even work???
hes given a beta version that idek if it was tested with labapi
i alrdy will lmfao
like it seems it was tested with exiled and nobody was given info???
What is SSGroupHeader commonly used for?
The public version should work with labapi only, not sure about the beta
that's the thing.
To create a header which lets you distinguish between sections
Ah
version of sl it was made on was 14.2.4
thats the last public one we ever got until this one.
so it doesn't work anymore.
A game update doesn't automatically break every single plugin completely
Broke almost all of this one
So I honestly don't know.
That's unfortunate
No it's fine
I wanted to nuke it before too
Right
Just you and slejm move out before that pls
was me being dumb one plugin was being dumb so caused everything else

Um no
Happens
@upper vapor
I have no idea what it is ngl
I mean
If you provide housing right now somewhere then you can nuke Hungary at midnight
Cuz I don't wanna take my finals

XD
Quality indeed
10/10
Stripdown files
The stripdown files aren't real
But I want to delete the dropped items of their death 15s later
Yeah these methods will return the pickups for you
But absolutely all ones or only of their last death?
If you do that in the dying event then it'll include everything
Yeah, and I can't still get it to work π
You told them to do some weird coroutine shit π
and what would you do??
Yeah a coroutine π
coroutine that just increments the time for each time
and destroys it on 15 seconds?
I mean like you can attach component but..
yea
Sobbing
Though you did also suggest what I said now so uhhh
Yeah
So did you drop all items and then remove the existing pickups 15s later?
Add .ToArray() after the drop calls to make sure it drops everything
What I did yesterday was I got all the pickups on OnPlayerDying then I supposed the game drops them, and then I wait 15s and I destroy them
-# I'm on the phone I don't remember if it was exactly called OnPlayerDying, but it wasn't OnPlayerDied
So I should do instead of that, I should like you said player.DropAllItems() and get the pickups from there?
DropAllAmmo then DropAllItems
If you have gameplay perms then yea
Otherwise it will print 0 4000 0 if they are out of range
lol
It's been a few days. How has voice chat been doing?
Twice as more issues

You're not a cat

You can do a funny bit, but Alex gonna screenshit it
ServersDropEverything ?
That doesn't return anything tho
Why does it need it ?
To delete the items
I'm not becoming a furry bro π
Regardless of my wishes, my budget wouldn't allow it anyway
I didn't say you have to be a "furry bro"
I only said furry

Your budget has nothing to do with coming up with a character for yourself

free π
Is it possible to change the permissions on the keycard?
Custom keycards yes
But not on default ones?
server-side yes
Client aint gonna see any change
You can create a copy of a vanilla keycard and give a custom keycard based on that
I have some code for it
maybe mscorlib is the friends we made along the way?
disable implicit frameowrk references
wow thx
it would be great if that worked
yea
im not even gonna question how that works
Can you download the file and tell me when you do so? I have seen servers competing with me steal the code I share here, so I'd rather not feed them another useful thing 
prioritizes your SL_REFERENCES
np
You can delete the code.
I only needed the code to create a custom card. I usually use pre-defined parameters from Northwoods for checks, instead of saving them myself
@tulip kiln
Done 
Thanks
I was just about to mention this to you its actually going well
Based on what Ive been told, its happened once in a period of two hours. That a improvement. And I still dont know if the staff member in question really got this issue. Iβm going to tell my whole team to report any issues like this
woah
skill issue
Wgat reason did you put in
cheating but it didn't count it in for some reason
Might have misspelled it or something
maybe does it count for "Aim Lock" as cheating?
i think aimbot would been a correct term instead of aim lock
Better to include the word cheating
Or cheats
okay, thanks ced have a good evening
Thank you! it worked
Np
@modern lark you could prob patch this to fix it
Well, I guess we can patch all the game at this point, but this is not the main issue
true
but
temp fix
ohactually
it does this by default already, checking if theres another camera to use
Well, I have 100+ cameras in the map, yet, it still disconnects the player with this error
oh
is it room issue
public bool TryGetDefaultCamera(out Scp079Camera cam)
{
if (this._defaultCamId == (ushort) 0)
{
Scp079InteractableBase first1;
if (Scp079InteractableBase.AllInstances.TryGetFirst<Scp079InteractableBase>((Func<Scp079InteractableBase, bool>) (x => x is Scp079Camera scp079Camera && x.SyncId != (ushort) 0 && scp079Camera.Room.Name == RoomName.Hcz079 && scp079Camera.Label.Equals("079 CONT CHAMBER", StringComparison.InvariantCultureIgnoreCase)), out first1))
{
cam = first1 as Scp079Camera;
this._defaultCamId = cam.SyncId;
return true;
}
Scp079InteractableBase first2;
if (Scp079InteractableBase.AllInstances.TryGetFirst<Scp079InteractableBase>((Func<Scp079InteractableBase, bool>) (x => x is Scp079Camera), out first2))
{
cam = first2 as Scp079Camera;
this._defaultCamId = cam.SyncId;
return true;
}
cam = (Scp079Camera) null;
return false;
}
Scp079Camera result;
if (Scp079InteractableBase.TryGetInteractable<Scp079Camera>(this._defaultCamId, out result))
{
cam = result;
return true;
}
cam = (Scp079Camera) null;
return false;
}
its failing here
theres no room checks here
I'm going to propose a way to spawn rooms then 
Disconnecting connection: connection(0). This can happen if the other side accidentally (or an attacker intentionally) sent invalid data. Reason: System.NullReferenceException: Object reference not set to an instance of an object.
at PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync+<>c.b__42_0 (PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase x) [0x00000] in <00000000000000000000000000000000>:0
at Utils.NonAllocLINQ.HashsetExtensions.TryGetFirst[T] (System.Collections.Generic.HashSet1[T] target, System.Func2[T,TResult] condition, T& first) [0x00000] in <00000000000000000000000000000000>:0
where actually is that occuring
You mean after setting the role ?
.method assembly hidebysig instance bool
'<TryGetDefaultCamera>b__42_0'(
class PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase x
) cil managed
{
.maxstack 3
.locals init (
[0] class PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera scp079Camera
)
// [136 126 - 136 321]
IL_0000: ldarg.1 // x
IL_0001: isinst PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera
IL_0006: stloc.0 // scp079Camera
IL_0007: ldloc.0 // scp079Camera
IL_0008: brfalse.s IL_0033
IL_000a: ldarg.1 // x
IL_000b: callvirt instance unsigned int16 PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_SyncId()
IL_0010: brfalse.s IL_0033
IL_0012: ldloc.0 // scp079Camera
IL_0013: callvirt instance class MapGeneration.RoomIdentifier PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_Room()
IL_0018: ldfld valuetype MapGeneration.RoomName MapGeneration.RoomIdentifier::Name
IL_001d: ldc.i4.s 18 // 0x12
IL_001f: bne.un.s IL_0033
IL_0021: ldloc.0 // scp079Camera
IL_0022: ldfld string PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera::Label
IL_0027: ldstr "079 CONT CHAMBER"
IL_002c: ldc.i4.3
IL_002d: callvirt instance bool [mscorlib]System.String::Equals(string, valuetype [mscorlib]System.StringComparison)
IL_0032: ret
IL_0033: ldc.i4.0
IL_0034: ret
} // end of method '<>c'::'<TryGetDefaultCamera>b__42_0'
oh lmao
so yes its a null room issue
it was mostly where was it failing with null
but yeah no i see it in the IL lmao
ah yeah, so no solution I guess 
like why is the IL for the TryGetDefaultCamera doing get_Room when i feel like thats not smth its doing in the C#
Idk i dont get it
{
if (player == null) return;
string hint = "'Ey, I'm walkin' 'ere!";
//var hint = GetPlayerHint(player);
if (!string.IsNullOrEmpty(hint))
player.SendHint(hint);
}```
This snippet of code has been causing an issue. Players are getting dc'd with 0 message, and the server isn't procuring any errors. The only error I can find is client-side, saying some network message is missing an ID. Help would be appreciated.
I would have to replicate the error to paste it
what's the message ID
@upper vapor do yk why its doing that?
How am I supposed to know?
How am I supposed to get the ID tho?
Again, I'll have to replicate the error, give me like 20 minutes
wait what?
Not the same, lemme replicate the error
well i said it before
if there is no room assigned
then it poopies itself
i didnt notice the first line
instead of 2nd
my bad
whoops
so it is fixable server side
theoretically?
@modern lark do you use secretapi
i forgot
It might be fucking with me at this point, because I swear it previously said no message id, but now it is just an unknown message id
60287
Nope
using System;
using HarmonyLib;
using MapGeneration;
using PlayerRoles.PlayableScps.Scp079;
using PlayerRoles.PlayableScps.Scp079.Cameras;
using Utils.NonAllocLINQ;
/// <summary>
/// Fixes <see cref="Scp079CurrentCameraSync.TryGetDefaultCamera"/> causing null reference.
/// </summary>
[HarmonyPatch(typeof(Scp079CurrentCameraSync), nameof(Scp079CurrentCameraSync.TryGetDefaultCamera))]
internal static class FixScp079Sync
{
#pragma warning disable SA1313
private static bool Prefix(Scp079CurrentCameraSync __instance, ref Scp079Camera cam, ref bool __result)
#pragma warning restore SA1313
{
cam = null!;
__result = false;
if (__instance._defaultCamId == 0)
{
if (Scp079InteractableBase.AllInstances.TryGetFirst(x => x is Scp079Camera scp079Camera && x.SyncId != 0 && scp079Camera.Room?.Name == RoomName.Hcz079 && scp079Camera.Label.Equals("079 CONT CHAMBER", StringComparison.InvariantCultureIgnoreCase), out Scp079InteractableBase first1))
{
cam = (first1 as Scp079Camera)!;
__instance._defaultCamId = cam.SyncId;
__result = true;
return false;
}
if (Scp079InteractableBase.AllInstances.TryGetFirst(x => x is Scp079Camera, out Scp079InteractableBase first2))
{
cam = (first2 as Scp079Camera)!;
__instance._defaultCamId = cam.SyncId;
__result = true;
return true;
}
cam = null!;
__result = false;
return false;
}
if (Scp079InteractableBase.TryGetInteractable(__instance._defaultCamId, out Scp079Camera result))
{
cam = result;
__result = true;
}
return false;
}
}
well heres ur fix
theoretically
what the fuck
Oh wow, ty, I'll try this
true
i did just say i cba to do IL rn
although
i dont rly need to
i just need to get the nested method
but
do i care rn?
no
its just a temp anyway til stink nw fix
(pls fix)
It's already kind enough to help me with such a thing 
@wary gust do you have the snippet to quickly check message IDs?
bruh
π
var badMessage = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(t => t.GetTypes())
.Where(t => typeof(NetworkMessage).IsAssignableFrom(t))
.FirstOrDefault(t => t.FullName.GetStableHashCode() == 21154);
Logger.Error($"Bad message is: {badMessage?.FullName ?? "NULL"}");
I was sent this
wait ax
private static MethodInfo TargetMethod()
{
return typeof(Scp079CurrentCameraSync).GetNestedMethod(StateMachine, Method)
?? throw new Exception($"Could not locate state machine for {StateMachine} | {Method}");
}
#pragma warning disable SA1313
private static bool Prefix(Scp079CurrentCameraSync __instance, Scp079InteractableBase x, ref bool __result)
the Scp079InteractableBase x is how you get it right
you can't use the instance here but yeah
i dont remember getting the param
ye ye
/// <summary>
/// Fixes <see cref="Scp079CurrentCameraSync.TryGetDefaultCamera"/> causing null reference.
/// </summary>
[HarmonyPatch(typeof(Scp079CurrentCameraSync), nameof(Scp079CurrentCameraSync.TryGetDefaultCamera))]
internal static class FixScp079Sync
{
private const string StateMachine = "<>c.b__42";
private const string Method = "TryGetDefaultCamera";
private static MethodInfo TargetMethod()
{
return typeof(Scp079CurrentCameraSync).GetNestedMethod(StateMachine, Method)
?? throw new Exception($"Could not locate state machine for {StateMachine} | {Method}");
}
#pragma warning disable SA1313
private static bool Prefix(Scp079InteractableBase x, ref bool __result)
#pragma warning restore SA1313
{
__result = false;
if (x is not Scp079Camera scp079Camera)
return false;
if (x.SyncId == 0)
return false;
if (!scp079Camera.Room || scp079Camera.Room.Name != RoomName.Hcz079)
return false;
if (!scp079Camera.Label.Equals(Scp079CurrentCameraSync.DefaultCameraName, StringComparison.InvariantCultureIgnoreCase))
return false;
__result = true;
return true;
}
}
gg ez
transpiler would be shorter tho
why do you return true at the end
Silly Eve
i lowk got distracted as i was typing
silly david
IL_000b: callvirt instance unsigned int16 PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_SyncId()
IL_0010: brfalse.s IL_0033
IL_0012: ldloc.0 // scp079Camera
IL_0013: callvirt instance class MapGeneration.RoomIdentifier PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_Room()
IL_0018: ldfld valuetype MapGeneration.RoomName MapGeneration.RoomIdentifier::Name
IL_001d: ldc.i4.s 18 // 0x12
i mean
insert a brfalse after get_Room would work
prob
dup brfalse
why dup?
because otherwise you need to get it again
Yo david, any help you could give on my issue?
idk if david is even in chat still lol
@barren pasture fixed my script:
ushort code = 60287;
var badMessage = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(t => t.GetTypes())
.Where(t => typeof(NetworkMessage).IsAssignableFrom(t))
.FirstOrDefault(t => (ushort)t.FullName.GetStableHashCode() == code);
Logger.Error($"Bad message is: {badMessage?.FullName ?? "NULL"}");
or well snippet or whatever
Where would I put this?
where you want
but it didn't find anything anyway so idk
it does find stuff if you put in the ID for roundRestartedMessage
I have it in onEnabled.
idk if you made that just for this but it will fail in some cases since you are not casting the stable hash codes to a ushort. See my message above
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
CodeMatcher matcher = new CodeMatcher(instructions, generator)
.End()
.Advance(-2)
.CreateLabel(out Label skip)
.Start()
.MatchEndForward(new CodeMatch(OpCodes.Callvirt, AccessTools.Method(typeof(Scp079InteractableBase), "get_Room")))
.Insert(new CodeInstruction(OpCodes.Dup), new CodeInstruction(OpCodes.Brfalse, skip));
return matcher.InstructionEnumeration();
}
@upper vapor is there a nicer way to create label at end - 2
ill just do this then
well actually itd be -1
i mean
no errors
soooo
probably fine!!!
surely
good to know ty
How should I RegisterEvents?
I did CustomHandlersManager.RegisterEventsHandler(Handler);
and it doesn't work π
I mean there's alot things but basically I want atleast for
public void PlayerJoined(PlayerJoinedEventArgs ev)
{
ev.Player.SendHint("JeΕli to widzisz to rejestracja eventΓ³w dziaΕa", 3f);
}```
to work
And I register it in ` public class SnaksHunt : Plugin<Config>`
check the example in labapi
Yea i checked but I don't understand what I did wrong tho
How is the handler class looking
hello, there's a way to highlight a player with 1344 orb to players without giving them the 1344 black glasses sides effect?
or just to highlight just a specific player with the orb?
thx
Nop
sad, thx for the response, hope it'll be added in the future as this could give us a lot of new ideas
How can i make an standalone program that can read / write to my local admin on my pc. Is there a way to communicate easily or i would need to inject into the process?
Should be a tcp connection tho
you could try using the "query server" feature
but its pretty undocumented aside from https://github.com/zabszk/SCP-SL-Remote-Query-Admin
though the server code might also show some more insight on how it works
Can it also read console output?
i believe it outputs console output there yeah
and you can send commands to it aswel
And also is there some example usage
?
the project i sent
The scpsl remote query admin csproj?
Cuz there is 3 over there
One i think is the lib
the lib would be what you need
as that contains the logic for actually using it
Would having Player::SendHint in an async task on a separate thread mess with it?
Probably not advisable
you cant do that you have send it back main thread
you can do MainThreadDispatcher
Is that a class or what?
yes
it will take a frame tho
A frame?
it dispatches onto Update, which is every frame
Oh right
so itll dispatch on the next frame after being added
So just a 1/60 second difference
yes
Is there a parameter in the KeycardItem class that can change the name on the default card?
probably
im not on pc to check rn
Same xd
Add Triangles
await Awaitable.MainThreadAsync
Or as eve said, post a callback to the main thread dispatcher
I know that you can change it but I don't know how
Its a component iirc
???
Something like INameKeycard?
is there some kind of a downside in performence in using monobehaviours instead of "fake components" (class that has a static dictionary of <ReferenceHub, TSelf>)?
i dunno how to explain
you can have either monobehaviour
which is attached directly to players gameObject
or you can have an class
wait
public class ExampleClass
{
private static readonly Dictionary<ReferenceHub, ExampleClass> ByReferenceHub = new();
public ReferenceHub ReferenceHub {get; private set;} = null!;
public ExmapleClass(ReferenceHub hub)
{
ByReferenceHub[hub] = this;
}
public void Destroy()
{
ByReferenceHub.Remove(ReferenceHub);
}
public static bool TryGet(ReferenceHub hub, [NotNullWhen(true)] out ExmapleClass? exampleClass) => ByReferenceHub.TryGet(hub, out ExmapleClass? exampleClass);
}
could be some syntax errors but you get the idea
why not use the data store one?
idk
so is there a perforemnce cost of adding a component instead of keeping it in a dictioanry
wdym?
cuz rn i only use monobehaviours when i need to use the base unity events like Update or OnDestroyy
ye thats what I meant
StaticUnityMethods my beloved
One exception and you're gone
Also you get automatic exception logging from monobehavior
good
keep it gone
no server for you
Keep you gone yeah
oh.
denied
This isnt really about performance but rather on what are you doing
@modern lark did the fix work btw
Sorry, forgot to tell the outcome
I couldn't manage to stop the disconnection with the patch sadly :c
We're testing something today, we'll see
lemme know :)
Aye aye
errr
@modern lark is the error the issue still
wait maybe i did smth wrong in my test actually
Oh
yea
[2026-05-04 18:55:36.939 +02:00] [STDOUT] OnSerialize failed for: object=SzCameraToy(Clone) component=AdminToys.Scp079CameraToy sceneId=0
[2026-05-04 18:55:36.939 +02:00] [STDOUT] System.NullReferenceException: Object reference not set to an instance of an object
[2026-05-04 18:55:36.940 +02:00] [STDOUT] at AdminToys.RoomReaderWriters.WriteRoomIdentifier (Mirror.NetworkWriter writer, MapGeneration.RoomIdentifier room) [0x00000] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 18:55:36.940 +02:00] [STDOUT] at AdminToys.Scp079CameraToy.SerializeSyncVars (Mirror.NetworkWriter writer, System.Boolean forceAll) [0x0001a] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 18:55:36.940 +02:00] [STDOUT] at Mirror.NetworkBehaviour.OnSerialize (Mirror.NetworkWriter writer, System.Boolean initialState) [0x00008] in <1bebde0895f14b11be97fb0c4e2cabe4>:0
[2026-05-04 18:55:36.940 +02:00] [STDOUT] at AdminToys.AdminToyBase.OnSerialize (Mirror.NetworkWriter writer, System.Boolean initialState) [0x00000] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 18:55:36.941 +02:00] [STDOUT] at AdminToys.Scp079CameraToy.OnSerialize (Mirror.NetworkWriter writer, System.Boolean initialState) [0x00000] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 18:55:36.941 +02:00] [STDOUT] at Mirror.NetworkBehaviour.Serialize (Mirror.NetworkWriter writer, System.Boolean initialState) [0x00015] in <1bebde0895f14b11be97fb0c4e2cabe4>:0
[2026-05-04 18:55:36.941 +02:00] [STDOUT] OnSerialize failed for: object=SzCameraToy(Clone) component=AdminToys.Scp079CameraToy sceneId=0
lmao
public override void SerializeSyncVars(NetworkWriter writer, bool forceAll)
{
base.SerializeSyncVars(writer, forceAll);
if (forceAll)
{
writer.WriteString(this.Label);
writer.WriteRoomIdentifier(this.Room);
writer.WriteVector2(this.VerticalConstraint);
writer.WriteVector2(this.HorizontalConstraint);
writer.WriteVector2(this.ZoomConstraint);
}
@upper vapor who decided that this is how it should be π
well
cuz WriteRoomIdentifier requires Room to exist, yall dont have anything for the case of "theres no room"
</3
this cant even be fixed then lmao
at least not til nw decides to
lmao
Don't worry, we're on it, though, thanks a lot for the explanation of how to read all this
the real fix is to not destroy the map
me when
but that kinda defeats the point of what you wanted
you can just patch WriteRoomIdentifier
i assume at least lel
but isnt there a caveat to this
the error will just be on client trying to deserialize
though i don't think camera switching is gonna work
you can check the code
but from what i can tell, it won't error
thats what im tryin rn
where would this error
not being able to switch cameras is a different topic 
i meant like
or fail
no room

overcon will probably work tho
xd
wait
[2026-05-04 19:08:00.111 +02:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object
[2026-05-04 19:08:00.112 +02:00] [STDOUT] at PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync+<>c.<TryGetDefaultCamera>b__42_0 (PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase x) [0x00018] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 19:08:00.112 +02:00] [STDOUT] at Utils.NonAllocLINQ.HashsetExtensions.TryGetFirst[T] (System.Collections.Generic.HashSet1[T] target, System.Func2[T,TResult] condition, T& first) [0x00011] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 19:08:00.113 +02:00] [STDOUT] at PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync.TryGetDefaultCamera (PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera& cam) [0x0000b] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 19:08:00.113 +02:00] [STDOUT] at PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync.TryGetCurrentCamera (PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera& cam) [0x00024] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 19:08:00.113 +02:00] [STDOUT] at PlayerRoles.PlayableScps.Scp079.Scp079Role.get_IsAFK () [0x00000] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 19:08:00.114 +02:00] [STDOUT] at AFK.AFKManager.OnUpdate () [0x00043] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 19:08:00.114 +02:00] [STDOUT] at (wrapper delegate-invoke) <Module>.invoke_void()
uhhhhhh
afk
ahh

.method assembly hidebysig instance bool
'<TryGetDefaultCamera>b__42_0'(
class PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase x
) cil managed
{
.maxstack 3
.locals init (
[0] class PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera scp079Camera
)
// [136 126 - 136 321]
IL_0000: ldarg.1 // x
IL_0001: isinst PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera
IL_0006: stloc.0 // scp079Camera
IL_0007: ldloc.0 // scp079Camera
IL_0008: brfalse.s IL_0033
IL_000a: ldarg.1 // x
IL_000b: callvirt instance unsigned int16 PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_SyncId()
IL_0010: brfalse.s IL_0033
IL_0012: ldloc.0 // scp079Camera
IL_0013: callvirt instance class MapGeneration.RoomIdentifier PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_Room()
IL_0018: ldfld valuetype MapGeneration.RoomName MapGeneration.RoomIdentifier::Name
IL_001d: ldc.i4.s 18 // 0x12
IL_001f: bne.un.s IL_0033
IL_0021: ldloc.0 // scp079Camera
IL_0022: ldfld string PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera::Label
IL_0027: ldstr "079 CONT CHAMBER"
IL_002c: ldc.i4.3
IL_002d: callvirt instance bool [mscorlib]System.String::Equals(string, valuetype [mscorlib]System.StringComparison)
IL_0032: ret
IL_0033: ldc.i4.0
IL_0034: ret
} // end of method '<>c'::'<TryGetDefaultCamera>b__42_0'
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
CodeMatcher matcher = new CodeMatcher(instructions, generator)
.End()
.Advance(-BacktrackCount)
.CreateLabel(out Label skip)
.Start()
.MatchEndForward(new CodeMatch(OpCodes.Callvirt, AccessTools.Method(typeof(Scp079InteractableBase), "get_Room")))
.Insert(new CodeInstruction(OpCodes.Dup), new CodeInstruction(OpCodes.Brfalse, skip));
return matcher.InstructionEnumeration();
}
would this not work?
maybe i fucked up the transpiler
yea i forgot to patch the non categorized
[2026-05-04 19:11:44.572 +02:00] [ERROR] [SecretAPI] [HarmonyExtensions] failed to safely patch SecretAPI5/4/2026 7:11:44 PM (SecretAPI.Patches.FixRoomIdWriter): HarmonyLib.HarmonyException: Patching exception in method static MapGeneration.RoomIdentifier AdminToys.RoomReaderWriters::ReadRoomIdentifier(Mirror.NetworkReader reader) ---> System.Exception: Parameter "writer" not found in method static MapGeneration.RoomIdentifier AdminToys.RoomReaderWriters::ReadRoomIdentifier(Mirror.NetworkReader reader)
wait
oh
thats just cuz im dumb and put the wrong patch method

ok now the real error is
m.Reflection.MethodInfo SecretAPI.Patches.FixScp079DefaultCamSync::TargetMethod() ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Could not locate state machine for <>c.b__42 | TryGetDefaultCamera
at SecretAPI.Patches.FixScp079DefaultCamSync.TargetMethod () [0x0001d] in <dd20e58ec4c54674a907e1a051672dbe>:0
i c why
i b
@hearty shard this is client sided too btw
where
the writer isn't
even if your ass patch on server it is likely not gonna work
directional camera switching will poopy itself
overcon might work
just make sure the Scp079InteractableBase Room is not null
they have no map
krill issue
[2026-05-04 19:14:22.825 +02:00] [ERROR] [SecretAPI] [HarmonyExtensions] failed to safely patch SecretAPI5/4/2026 7:14:22 PM (SecretAPI.Patches.FixScp079DefaultCamSync): HarmonyLib.HarmonyException: Patching exception in method System.Boolean PlayerRoles.PlayableScps.Scp079.Cameras.<>c::<TryGetDefaultCamera>b__42_0(PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase x) ---> System.ArgumentException: You cannot combine TargetMethod, TargetMethods or [HarmonyPatchAll] with individual annotations [TryGetDefaultCamera]
wtf is this error
OH




