#plugins-dev-chat
1 messages ยท Page 217 of 1
new product by tim apple?
yes
lmao
eScps.Scp079.Scp079InteractableBase x) cannot be patched. Reason: Invalid IL code in (wrapper dynamic-method) PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync/<>c:PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync+c.<TryGetDefaultCamera>b__42_0_Patch0 (PlayerRoles.PlayableScps.Scp079.Cameras.Scp079CurrentCameraSync/<>c,PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase): IL_0047: ret
yooo
pop where
.Insert(new CodeInstruction(OpCodes.Dup), new CodeInstruction(OpCodes.Brfalse, skip));
guh?
declarelocal
no mention of Local
rhttps://harmony.pardeike.net/api/HarmonyLib.CodeMatcher.html#HarmonyLib_CodeMatcher_DeclareLocal_System_Type_System_Reflection_Emit_LocalBuilder__
A CodeInstruction matcher
so
var local =
then .LocalIndex
store it
check for null
get room
dup
stloc
null check
brfalse
ldloc
what actually is the op_Implicit
actually
IL check time
it literally is just op_Implicit
ye
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(UObject), "op_Implicit")),
wouldnt this work?
with new CodeInstruction(OpCodes.Ldloca_S, local), before it

it didnt
IL_001c: call 0x00000005
fail
thats why im askin
omfg
i see why
yep
๐ญ
oops
loaded address of var instead of var
cfbruh emoji
it didnt actually fix null ref tho
omfg
ax
can we
just never let me cook again
yes we can
im 99% sure its cuz i was calling stloc etc w local instead of the index

this is what happens when i wake up at 7
as a wise hungarian said
just let me sleep til 1pm
"fรบรบ more"
might be a skill issue
(it wasnt)
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
LocalBuilder local = generator.DeclareLocal(typeof(Scp079InteractableBase));
int localIndex = local.LocalIndex;
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.Stloc, localIndex),
new CodeInstruction(OpCodes.Ldloc, localIndex),
new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(UObject), "op_Implicit")),
new CodeInstruction(OpCodes.Brfalse, skip),
new CodeInstruction(OpCodes.Ldloc, localIndex));
return matcher.InstructionEnumeration();
}
null ref
unreal engine reference?
it's not real
what the fucky
you can also write prefix 
nuh uh
no more
ONLY transpilers here
okay good
i dont see why it wouldnt work
but im also stupid
tbf i could make it a prefix, test it, then make transpiler after lmao
but
might as well just do funky transpilers
for fun!
Uhhhhhh
shouldn't it be .InsertAfter?
just guessing, idk what are you patching
it should already end after with pos being correct
[2026-05-04 19:45:01.770 +02:00] [DEBUG] [SecretAPI] Instruction: callvirt System.UInt16 PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_SyncId()
[2026-05-04 19:45:01.786 +02:00] [DEBUG] [SecretAPI] Instruction: brfalse.s Label1
[2026-05-04 19:45:01.802 +02:00] [DEBUG] [SecretAPI] Instruction: ldloc.0 NULL
[2026-05-04 19:45:01.816 +02:00] [DEBUG] [SecretAPI] Instruction: stloc 1
[2026-05-04 19:45:01.831 +02:00] [DEBUG] [SecretAPI] Instruction: ldloc 1
[2026-05-04 19:45:01.847 +02:00] [DEBUG] [SecretAPI] Instruction: call static System.Boolean UnityEngine.Object::op_Implicit(UnityEngine.Object exists)
[2026-05-04 19:45:01.862 +02:00] [DEBUG] [SecretAPI] Instruction: brfalse Label3
[2026-05-04 19:45:01.878 +02:00] [DEBUG] [SecretAPI] Instruction: ldloc 1
[2026-05-04 19:45:01.893 +02:00] [DEBUG] [SecretAPI] Instruction: callvirt virtual MapGeneration.RoomIdentifier PlayerRoles.PlayableScps.Scp079.Scp079InteractableBase::get_Room()
[2026-05-04 19:45:01.909 +02:00] [DEBUG] [SecretAPI] Instruction: ldfld MapGeneration.RoomName MapGeneration.RoomIdentifier::Name
[2026-05-04 19:45:01.924 +02:00] [DEBUG] [SecretAPI] Instruction: ldc.i4.s 18
[2026-05-04 19:45:01.940 +02:00] [DEBUG] [SecretAPI] Instruction: bne.un.s Label2
[2026-05-04 19:45:01.955 +02:00] [DEBUG] [SecretAPI] Instruction: ldloc.0 NULL
[2026-05-04 19:45:01.971 +02:00] [DEBUG] [SecretAPI] Instruction: ldfld System.String PlayerRoles.PlayableScps.Scp079.Cameras.Scp079Camera::Label
it is wrong though
oh wait a minute....
oh my gosh
wait no it should still work
Matches forward and advances position to ending of matching sequence
its not doing that though in this case
it patches successfully right?
yes
but the issue is
its setting instructions to be before get_Room
not after
but it should set it after get_Room call
its fine ill just .Advance(1)
i think the reason could be machendforward since if you are matching one instruciton
this is what InsertAfter is for
it does not matter if its matchstart or matchend
doesnt exist btw
MatchEnd will always match to last instruction so it's at Scp079InteractableBase::get_Room()
yeah, you'll have to advance(1) in that case
[2026-05-04 19:54:02.550 +02:00] [STDOUT] at PlayerRoles.PlayableScps.Scp079.Scp079BlackoutZoneAbility.Update () [0x0000c] in <69208f83d7754673a3350a7c8052e26b>:0
[2026-05-04 19:54:02.566 +02:00] [STDOUT] NullReferenceException: Object reference not set to an instance of an object
funny lmao
@upper vapor yep cant be fixed
client side update
afaik
it matches to the first one start and end tells the codematcher when to end it on the start or at the end of the matching sequence
lmfao
wait
ax
public override void Update()
{
base.Update();
if (!this.Owner.isLocalPlayer)
return;
this._syncZone = ZoneBlackoutIcon.HighlightedZone;
}
null ref here lmao
i think you are referncing backwards and forwards

the same goes for TryGetSpeaker in 079 speaker
but isn't backwards and forwards like only for setting the direction of matching?
yeah i see, i made a mind shortcut
try MatchEndForward will:
Move towards and match until it finds the match
Then it will stay at the end position
If you then Insert, you are adding it to the position at the end(in this case get_Room call)
last instruction
i was thinking about last instruction in sequence to be matched
causing that call to get pushed further
exactly
anyway
doesnt matter cuz its broken client side no matter what
ig
wait
TECHNICALLY
spawn candy room 
true
quick question how do i lock the round
Round.IsLocked or smth
Round.IsLocked
= true;
brain explosion emoji
hmm ok ok

why is the emoji named that
i do not know
also technically source gen for secretapi
does nothing
since patches are usually expensive but
im keeping it in
its funnier to save 0.0001ns
um
so
funny enough.....
while (this.IsValid)
{
if (this.MatchSequence(this.Pos, matches))
{
if (useEnd)
{
this.Pos += matches.Length - 1;
break;
}
break;
}
this.Pos += direction;
}
useEnd is whether its End or Start
so exactly it doesnt matter if you are matching one instruction
that would be correct it seems yes
how to exclude this guy ๐ญ
i'm doing foreach (var player in Player.List)
use ReadyList
ty
The amount of mr beasts today is crazy
@unique crane whats up sigma
david hates me ๐
Damnit why is the automod filter so violent
I can't even mention the certain rich prince scam because the name of the country is automodded because people use it as an nword bypass
Then mention scammers form India
What are the limitations for instantiating objects using labapi?
i may be blind and cant find it in the documentation
What objects
gameobjects my bad
because i dont think ive ever seen a server have custom meshes
everything's made of cubes
do you have a link for this in the doc? i cant find any reference to this
Doc? We dont have these yet
ohhhhh
Is it possible to access the meshfilter in any way?
No
oh ty
sad
You have basic unity shapes
I recommend using map editors like MER
For bigger structures
Use quads
oh thats a lot better
Too many Indian scammers in my inbox
Doesn't play as well
Hm
Can we hide the voice chat pop-ups of players speaking that appear at the end of the match at the right part of the screen?
Or its... sobs ... its the client part?
It's client-side
so step 1
crash the client
and uh yeah thats it
theres no pop up if theres no client

One day I will have enough of client-side
And crash it fr ๐
But what if we could use triangles
You can always find and use a remote code execution exploit. After that, a client patch should be trivial.
Unless SL-AC doesn't approve
and your players will get banned
Just ban everyone in the server
No players = no problems

Wild Fasmatus has appeared
Ofc ๐ ๐ ๐
DNT serves the purpose of notifying the server your data is more valuable to steal 
real and true
this is the DNT?
You forgot the try-catch {collect()} part
Hello! Do you know setgravity basic values?
do you mean the default?
if so, you can just get it from: FpcGravityController.DefaultGravity
FpcGravityController has DefaultGravity property
I would like to know which language translates "default" as "basic"
Oh right
Hungarian is one of them
https://github.com/northwood-studios/LabAPI/issues/367
Is this in the works or smth cuz i like my tps high
Fps high tps low
How do I change the role name of the players displayed on spectator?
Or is it only editing the game files?
Oh ok ty
What is this, the modern web
Why, if I assign an admin role via ReferenceHub.serverRoles.SetGroup(group), the permissions from permissions.yaml are not assigned?
prob cus setgroup is temp or something
And how to issue the permissions? 
how would I know

I set permission as normally ,search up
I have an idea :D
Look into PermissionsManager / default permission manager of LabAPI
Huh
Yeah itโd be nice if LabAPI fixed its permissions for this
Exiled doesnโt have this issue with its permissions
Is there way to set a players face emotion
Player::Emotion
Does Exiled provide a way to custom implement perm checker?
wdym?
you can write your own perm checkers
but you'd have to patch other commands if you want them to use said perm checker
how do you check what type of hazard a hazard is
type check
if(hazard is EnvironmentalHazard envHazard)
as an example
(i forgot the hazard types, dont flame me)
yeah thats what im tryna figure out ๐ญ
me when Expression actually has validation (pls microsot i dont want validation)
i can either reflection call microsoft code
or i can publicize it

just rewrite mscorlib from scratch smh
or better yet
use UnsafeUtility from Unity to just write the bits lil bro
uh
idk about that one
i mean
another solution is to
not use Expression
and generate a new method
at runtime
with IL
IL doesnt have this issue soo
david
YOU do this
Optimization such as these is something we are looking onto for 15.X, but we do have to test it carefully to make sure nothing else is broken by this
What are you even trying to do
basically
optimize reflection into just basic delegates
it prob works for non readonly but
because MS has validation for readonly checks it kindaaa doesnt.
me when
don't use Expression
you do it for me 
Expression?
Provides the base class from which the classes that represent expression tree nodes are derived. It also contains static (Shared in Visual Basic) factory methods to create the various node types. This is an abstract class
you can generate access so like bool value = someClass.someField;
but
it still has validation
which STINKS
obsolete
Is there way to toggle this UI on not spectator role?
thats client sided
thanks
if he disconect
Player left
also do not use 'GameObject is null' always do 'GameObject == null'
then should the reference hub be null too?
It doesnt really delete the script if saved
nope
Well if something deletes it maybe ye
ik about it
following the logic of the GameObject being nullable then ReferenceHub should be also nullable
or just add some <remakrs>
@restive turret
i guess
Can we exclude a specific player from 079's breach scanner?
Nop
Sorry
Or uh
Maybe
patch?
Also does the window on the button in SCP-079's containment have a specific identifier or sth?
yes
Scp079Recontainer::_activatorGlass
I havent found one tho, mb Im checking the wrong part of code, but I only got NetworkId of BreakableWindow
K, ty, Ill try
and how?
Kinda worked
My idea is to prevent decontam if a specific player tries to attack the button
I do this via PlayerEvents::PlayerDamagingWindow event (or sth like that)
The funniest thing is it works but only when a player shoots the button
If uses meleee
If he throws an item at the window
If he tries to nade
this event doesnt activate
I suppose
isnt the breaking of it is server code
custom info is so weird
Works: <size=10>test</size>Text here
Doesn't: Text here<size=10>test</size>
Yes bc you must surround the whole text if you want RT tags
could you give me example? I don't really understand this
Wait what
I thought you could only have rich text tags only around the text, not somewhere in between
I believe you can only at the start of the text or when surrounded around
wait but this works
<size=10>Test</size><size=30>Test</size>
This is crazy
yeah no clue who wanted the custom info to be so limited or just made issue
this is so fucking dumb, but I've figured this out with sizes finally 
๐
Also I don't think that you can have RT tags in custom info
They get sanitized
You can
Just put a <color=something></color> at the beginning of the custom info and it will work
This way it works for me

When badge rework xd
wait that bypasses it?
When rework ax
I'm not gonna be reworked
any way to make the red dot of the last player not dissapear because of tutorials?
I would look for the class but gitlab search is one of the most awful things ever created
Patch LastHumanTracker.TryGetLastTarget
thanks
Np
Yes, if you start with a tag it works
wtf
My theory is that the checker is wrong about that xd
my theory is that it was made by NW
"but it's just a theory"
a gaming theory
Same as with the names thing, do not be disappointed if its gonna be fixed one day
why do we need to limit custom info tags that much again?
i remember some discussions about that
I think it is all about not allowing to fake global badges
What's the point of this constructor if it's not called? I put a Logger there, but it's never called
it getting called dw
could be called clientside
When? Only ShotBacktrackData(NetworkReader) is called
Ahh, this is client code. I'm confused..
AutoActionModule.ServerProcessCmd
Where is the check that the Target is correct?
Yes, I'm already there, I'm trying to find the code that will check that the Target is valid
ShotBacktrackData.ProcessShot
It doesn't check for validity. It just calls Action<ReferenceHub>. I looked at which Action is called, but I can't find a check there either
HasPrimaryTarget
But HasPrimaryTarget is taken from NetworkReader
So how does the server check that the player actually hit the enemy?
Does the server really trust the client completely?

ยฏ_(ใ)_/ยฏ
it does backtrack
and idk, never really checked anything for firearm stuff

In a raycast that the server does
This is just
"hey, I shot from this position, with this rotation at this time and I myself shot this person at this position at that time"
and server validates that
Where the hint sent by networkConnection.Send(new HintMessage(hint)); is processed? (I found this line in HintDisplay)
HintMessageParametrFunctions.Deserialize
Probably client sided
Parameters are replaced on the client so yeah
hi, quick or not quick question, is it possible to change the item name in the inventory for only 1 player and only 1 item, like if i want to make customitem with custom name
Only custom keycards iirc
you wrote that faster
hah, thanks guys
tbh i have 1 more question in mind, if i wanted to spawn the firearm pickup with ammo in it how can i possibly do that
uh oh
after spawning the pickup:
get the firearm template from InventoryItemLoader, then get its MagazineModule, call ServerSetInstanceAmmo with the serial
this only works for automatic firearms tho (not for the revolver or shotgun or disruptor)
thanks, i'll definitely try that
I think this also works
firearmPickup.OnDistributed();```
that can work too, but doesn't that apply random attachments? (may or may not be desired)
it tries to apply them only if it doesn't find code for that serial in attachmentsync
so it will be fine if he sets attachments before calling this method
works like a charm
{
if (firearm.Modules.FirstOrDefault(m => m is MagazineModule) is MagazineModule magazineModule)
{
magazineModule.ServerSetInstanceAmmo(pickup.Serial, 25);
}
}```
i could have overcomplicated that tbh
firearm.TryGetModule
also, you can do InventoryItemLoader.TryGetTemplate(Type, out Firearm? firearm)
that one
{
mag.ServerSetInstanceAmmo(pickup.Serial, 30);
}```
yep (i changed it to 20)
many thanks
np
yo, does anybody know how to change firearm pickup's attachments and firearm item's attachments e.g. when i spawn pickup i want it with custom fixed attachments and when i give custom weapon to player via command i want it to have fixed attachments
for pickups cast Pickup instance to FirearmPickup and then you can set AttachmentsCode property to your fixed attachment's code
for items it's the same, cast Item instance to FirearmItem and set the exact same property
you can get attachments code of firearm your currently holding by using forceatt command
discord outage my beloved
oh, that's interesting, I'll try that tomorrow, thanks
public static bool TryApplyAttachment(this Firearm firearm, AttachmentName name)
{
Attachment targetAttachment = firearm.GetAttachmentByName(name);
if (targetAttachment == null)
return false;
uint newCode = firearm.GetCurrentAttachmentsCode();
for (int i = 0; i < firearm.Attachments.Length; i++)
{
Attachment attachment = firearm.Attachments[i];
if (attachment.Slot == targetAttachment.Slot)
{
uint bitToRemove = 1u << i;
newCode &= ~bitToRemove;
}
}
for (int i = 0; i < firearm.Attachments.Length; i++)
{
if (firearm.Attachments[i] == targetAttachment)
{
uint bitToAdd = 1u << i;
newCode |= bitToAdd;
break;
}
}
firearm.ApplyAttachmentsCode(newCode, true);
firearm.ServerResendAttachmentCode();
return true;
}
public static bool TryApplyAttachment(this FirearmPickup firearmPickup, AttachmentName name)
{
firearmPickup.Info.ItemId.TryGetTemplate<Firearm>(out var firearm);
if (firearm == null)
return false;
firearm.ItemSerial = firearmPickup.Info.Serial;
AttachmentCodeSync.ServerSetCode(firearmPickup.Info.Serial, AttachmentsUtils.GetRandomAttachmentsCode(firearmPickup.Info.ItemId));
bool success = TryApplyAttachment(firearm, name);
if (success && firearm.WorldModel != null)
{
firearm.WorldModel.Setup(firearm.ItemId, firearm.WorldModel.WorldmodelType, firearm.GetCurrentAttachmentsCode());
return true;
}
else
return false;
}
public static uint GetCodeFromAttachmentNamesRaw(this Firearm firearm, AttachmentName[] attachments)
{
uint attachmentNamesRaw = 0;
uint num = 1;
foreach (Attachment attachment in firearm.Attachments)
{
if (attachments.Contains(attachment.Name))
attachmentNamesRaw += num;
num *= 2U;
}
return attachmentNamesRaw;
}
public static Attachment GetAttachmentByName(this Firearm firearm, AttachmentName name)
{
foreach (Attachment attachment in firearm.Attachments)
{
if (attachment.Name == name)
return attachment;
}
return null;
}
yoo, that's so helpful, thank you, would you mind if I implemented part of it in my code
anyone has any idea what algorithm scpsl uses for its layout generation
gambling
if you want to see how Exiled checks seeds for layouts for the Map.Generating event, you can start here: https://github.com/ExMod-Team/EXILED/blob/c274dba5aed9a7f8c621de3aedbe4d090b97ad8e/EXILED/Exiled.Events/Patches/Events/Map/Generating.cs#L52
Otherwise, just look at the source code
the general idea though is just pick a random layout and populate it with rooms randomly
here's a zip of a bunch of layouts, the Hcz ones might be wrong though due to NW changing them last christmas I think
thanks
Is GPU skinning still set to cpu in current SL?
what the fuck
an algorithm
Oh cool its probably not BSP
About gpu skinning does current SL still use cpu skinning the image i took is from version 8.0.1
No
It's literally
Random.next
Choose layout
Random.next
Choose room
Random.next
Choose items
Random has the seed in ctor
+the rooms spawn connectors
In heavy
Cool thanks for letting me know i'll make sure to note it down for later use
you can just decompile the code and see it for yourself 
Yea sure i just dont find time for it sadly
crazy
could we have ScpContainer / weapon container / Generator and Props also be using this seed based random
I believe it is?
nope
u sure?
i use to play on Server that have a set seed
the only container that are keep in place are the one spawn by plugin
probably miss
it's use @unique crane UnityEngine.Random.Range
also do you know what the reason to implemented StructurePositionSync
nope it's wasn't there before LabAPI
ยฏ_(ใ)_/ยฏ
i remind spawning generator with any rotation value
now impossible with the new implementation
and still work for object that do not have this NetworkBehaviours
https://cdn.discordapp.com/attachments/1470165711795261451/1470171118924201984/image.png?ex=6a00514d&is=69feffcd&hm=319b06969d0296ac689b77b6a8f71cd63680cb548880a9267764d56cd7b8f510&
https://cdn.discordapp.com/attachments/1470165711795261451/1470176732781740244/image.png?ex=6a005687&is=69ff0507&hm=85d37e4d1dd7aea0c0e43f7253284224d87ebd7670d1563ad1128d6892f7fd0e&
an example for Door not having it and generator having it
(the White line is the server side collision of it)
that would never be a basegame bug since obvisouly Generator is never spawn on ground or on a not flat wall
but i would love this to be fixed :3 as how it's was before
Subscribe to FpcServerPositionDistributor.RoleSyncEvent
Return the role you want (or the original)
ty
Np
when a player dies does the spoof get reset to their new role
Nope you have to handle that
eggs
the event is called every frame i believe
so the spoof stays as long as you keep returning the role of choice
For some reason spoofing a dummy Scientist to D-Class works fine, but when I spoof a Chaos Conscript dummy to Ntf private it kicks me from the game
there are some roles that require additional data to be sent
ah
all foundation military roles require sending 1 byte of unitid
Check how LabApiExtension do it
wtf does this mean? LOL
@restive turret @upper vapor what about this :3333
i would just nuke SPS tbh
please do
game work perfectly fine without it
and nested hierarchies
can you try and see what happen ?
i don't remember any issue about hierarchies even if i have been told a lot about that
ยฏ_(ใ)_/ยฏ
we see nest hierarchie with Primitive ?
ye but it is runtime
i miss a word
not build time
oh so the problem is there only at runtime
but so that fine
since they are spawn after ?
except for very few locker like HID / Scp127
that arent spawnable
tbh SPS can be removed but idk, need to change some spawning code for able to do stuff with it
solution: kill mirror
mirror already sending rotation btw so
Destroy Scripts folder
whoever did that was an absolute genuis
i still hate that
jokes on you, there is no such folder
only y rotation 
that's what the script does, not what mirror does
that why we blaming the script
yes 
jokes on you, Destroy() is not valid on files
since its same folder name does it mean GPU skinning is still set to CPU
oh man i meant like just delete
@upper vapor i have very simple fix
you self destroy the component
after it's get spawn
so we can unspawn and respawn it safely
that would be the most broken way of doing it
not at this very moment but i was planning to do that today
waiting for the Division engine to drop ๐ฅ
ah i see i just wanted to know if scpsl still uses CPU skinning
what is that
Should be using GPU batched
opposite of Unity
awesome i thought why the game lags because its using CPU skinning in older versions of the game
better and no ai slop๐ฅน ๐
we should be skinning some unity engineers 

yeah i saw the fricking ai beta thing
fun fact: unity hub disappeared from my system today after an upgrade
(at least the shortcut did)
unity could be anything tbh ๐ญ
its own upgrade scriptlet does a separate upgrade
kinda sus ngl
gonna be pretty difficult on linux
i was looking forward to s&box but after they revoked my access i just gave up on it
it doesn't even appear on my steam search list
yeah the license :(
i kinda prefer this
no 300 fps :((
do you know when it's was added ?
any minute now
"preview size limit exceeded"
this has been a thing ever since spawnable structures have existed
whne the file was created ?
2021
hallucinations? 
the engine called Snowdrop
Could someone tell me why Sever Specific Settings won't register?
public static void Register()
{
ServerSpecificSettingsSync.ServerOnSettingValueReceived += OnValueReceived;
}
public static void Unregister()
{
ServerSpecificSettingsSync.ServerOnSettingValueReceived -= OnValueReceived;
}
private static void OnValueReceived(ReferenceHub referenceHub, ServerSpecificSettingBase settingBase)
{
if (!Player.TryGet(referenceHub.gameObject, out Player player))
return;
if (settingBase is SSKeybindSetting keybindSetting && keybindSetting.SettingId == 30 && keybindSetting.SyncIsPressed)
{
if(player.Role != PlayerRoles.RoleTypeId.ClassD)
{
player.SetRole(PlayerRoles.RoleTypeId.ClassD);
}
else
{
player.SendHint("You're already Class-D!", 3f);
}
}
}
did you.. add them to the list?
btw i'd recommend using SecretAPI for SSSS, a lot easier to deal with
wait what is that
hold on let me try then
#1339704289291141130 if you haven't found it yet
is there any way to set friendly fire on only for tutorials?
You will have to enable FF and make your own FF logic using Hurting event
how is functionHashCode being set?
is there some code that is being compiled or is it const?
its used in network behaviour
sendrpcinternal
RpcMessage
im thinkig its mirrors extension getstablehashcode
yes
Yes
and its called on nameof?
Damn didn't know i had that many
is there some example on how SL does that?
like officail code
or they are just typing it by hand
Auto generated

its unity only?
Nope
You can use fody for it in not unity project
And source generators works in unity now too
Server doesn't have any audio lol
its a clientrpc
Ye
my point is that the writer is just taken from pool
end then given back
That's why the server send and rpc "hey, okay voice"
couldnt it be just ArraySegment<byte<.Empty?
Send patches to mirror
It's auto generated so go there create prs however you like it
it also probably fdoesnt matter
Itโs not good.
Exiled have a way to log all of the FunctionHashCode
if that what you need
Can you check my pr
give leak
!leak
#821
Thanks, I did it this way and it works
99% of my playtime 
ahahah
what do you mean ?
maximum value are kinda float.infinity
you're cooking yourself if you go above 10K
if you have no map, you can have up to 254 waypoints
can you remind me how big is the square of a waypoint in metric ?
I tried placing my map away from the facility, but players don't seem to be able to teleport there
no clue how the unity measurement system works ngl
However big you want
but should be 128 units
1 unit = 1 meter
32512 meter the maximum Cube playable size with no maps
you have bigger problems if you need a map that has an area larger than 320 square kilometers
only about 200x100x200 size in the unity editor, using MER
make it smaller
๐ญ
you know you can scale things down
smaller player and map scale?
yeeeees
you have to spawn WaypointToy
you can have technically bigger one
but it's required unspawn and respawn Waypoint and making sure Ragdoll // item are correctly sync


So I have these solutions:
- scale down the entire map and the player's proportions
- use waypoints to teleport the player
||3. tell NW to change back the surface Y position back to the original 1000||
right?
- isn't possible
you can't scale down a Room
(except HczTestRoom and Ez330 but these are exception)
- use waypoint as regular not teleport
- they won't it's was to fix flickering bug on MTF clothes
why do you need it back to Y level 1000
I may not have fully explained my question 
- What I want to place is an extra map that I created in MER. If possible, I can delete the entire facility since I won't be using any of the rooms within it
- I tried using OnServerMapGenerating and then setting seed = -1 to delete the map, but it seems to cause a desync error that prevents players from moving normally / noclip. This issue also occurs when exceeding a certain area beyond the world boundary
This is why I asked, "Does the base game limit the maximum value of world coordinates?"
just cancel the event
but yeah it's a bit funky sometimes
and if you have no waypoints, ofc the player won't be able to move
Is it possible to play sounds through the voice chat on behalf of a player? Like making it seem as if the player is speaking through the intercom
just send a VoiceMessage
and.. May I ask what a waypoint is?
The thumbnail is 10/10
Do I just need to implement a struct and send it to all ClientConnections?
what am i looking at ๐ญ
you can use SecretLabNAudio to play audio, even as players
Probably C# code 
if you already have your own API, just send a VoiceMessage instead of an AudioMessage
drake laptop
๐๏ธ ๐ ๐๏ธ
why would you "implement" structs that already exist
just new VoiceMessage it
no need to copypaste it (also wouldnt work)
approved perfect
sad, I never really looked into what a waypoint is
๐ญ
it's very simple
RelativePosition is just your position from an other object
it's made like this in SL for Elevator system
and they put it everywhere because they found they use less ressource for sync player position
as it's 4 byte value
- 8 Id
- 16 x
- 16 y
- 16 z
16 x 3 + 8 = 56
instead of 3 float - 32bits x
- 32bits y
- 32bits z
32 x 3 = 96
@carmine prawn
x, y, and z are shorts
๐ฉณ
oups

just put Waypoint arround your map kinda
and that enough
yep, I think that covers it. Thanks 
I previously thought that Waypoint *only *worked with elevators
8 byte data vs 12 byte data, crazy difference
and additional cpu overhead in already cpu bound game
i don't think they use less resources by doing that
but if they have said that somewhere, i trust them as they have the tools to confirm that statement
it just makes things a lot worse
it's about networking but yeah it's use a lot more ressource
they sent less data through network
waypoint purge at some point hopefully
Waypoint is very good but should be limited to Elevator / moving object
@upper vapor do you know micro optimisation i would have an question
float num = this.Priority * this.Priority * Mathf.Sign(this.Priority);
or
float num = this.Priority * Mathf.Abs(this.Priority);
what the best
most likely the latter one
i just chech Math.Abs
and yeah
2nd one is better
but i didn't expect int.MinValue would OverflowException on Math.Abs
How to remove dummy from the player list?
set ReferenceHub.serverRoles.NetworkHideFromPlayerList
Thx
np
Is it possible to simply send empty dummies to ClientConnection, or does it necessarily have a ReferenceHub, etc.?
I just need the Ragdolls to stand
Just fake the existence of the dummies client side (bad idea) 

Just spawn a dummy
you wont get it any cheaper
:(
Someone exited the pocket dimension, and teleported him to a custom zone i have close to surface, how can i avoid this? is there any way to patch the TP?
(I circled where it teleported him)
Easiest patch is to move your custom structure away from surface
between surface and light would work?
I mean moving it a bit to the left would do the trick
because there is a point horizontally that players stop moving and items dont appear
oh ok, thanks
is there an event where a location is selected for teleport?
maybe could hook into that and override when it is in range
(though that is way harder and nuanced)
exitingpocket or something
but you can patch Scp106TeleportLocationFinder or something
locationfinder
would be an interesting patch to MER (or whichever map thing ppl use) to create marker zones (like in Source engine) for blocking OR including zones
use a waypoint
how?
spawn a WaypointToy or use the map editor of your choice to create one
would that also avoid the nuke killing all the players there?
not really..?
i thought that bug has been fixed already
i didnt test the waypoint but if you are far enough in surface not yet where it bugs but you cant see the skybox it does
you guys should probably not kill player that are in Unknown area
or make a check of Y level in case of it
It really was that simple but someone decided to remove that hard-coded value
whoes that ?
was it made when Surface zone level got changed ?
14.0.3-release-beta-a5da2001
14.0 changed it
I honestly
kinda dont care
14.0 it was
probably incremeneted during patreon/public beta
yeah third public beta
instead of modifying the const
they changed code
noice
oh yeah that was the missing roundend field
round couldn't end
It isn't really matter tbh
was a the first release for LabAPI
no i am just curious
i have a friend that got angry at me because i read some dm we have with her today
i found that funny nostalgia
but she really didn't like it
anyone knows possible causes of the server restarting at the end of a round after like 4 rounds?
You set it inside gameplay or LA
Then check your LA logs
ohh it's a plugin of mine sending hints just when the round fully ends
Could someone help me because I made Raycast and it detects only one Schematic but it doesn't detect others and I'm confused
check if the raycast can hit the layer that the schematic is on
I mean the raycast detects only one schematic not more or actually the name of gameobject that it hits
im confused then, as this message doesnt specify exactly what you want
Transform transform = player.ReferenceHub.PlayerCameraReference.transform;
Ray ray = new(transform.position, transform.forward * 0.1f);
int layerMask = 1 << 9;
if (!Physics.Raycast(ray, out RaycastHit hit, 7f, layerMask))
{
Logger.Debug("Nothing found");
return;
}
That's the part of code I'm talking about because it checks for the name of hit.collider?.transform.parent?.gameObject.name
and later must do something if the name is in Config
Yea i wrote it wrong before
use transform.root maybe
instead of parent
okay I will try
Uhh so it now doesn't do any action so I don't really know what to do after all
yoo, this is exactly what I had a few hours ago, areas too far from facilities don't have waypoints, you'll need to add them manually
Players can only move normally within waypoint coverage
And update MER, that bug was fixed ages ago
But I will add the waypoint myself I think
hmmm
what does it hit rn?
also you shouldn't hardcode the layermask, use LayerMask.GetMask
MER has an unfixed bug with waypoints
skill issue 
should i create the waypoint when the plugin enables or at the round start?
on waitingforplayers
ok
It hits the GameObject and it's not like a seperate schematic
ummmm
could you log the components on the hit object and the name of the object?
string.Join("\n", hit.collider.gameObject.GetComponents<Component>().Select(e => e.GetType().FullName))
omg axwabo recommending poor performing code?????? /j
no it's still going
this chat is now in debug mode

and who said they will build in release
You'd probably kill them if they didn't build release versions in release
You threatened my life when I forgot to change to release mode
/j
a lot of people don't even know that release mode exists ๐ญ
You are not referencing assembly csharp
i cant find it in the reference manager
thats why im confused
did i mess up the project setup
i swear if it is because im using .net 8.0 instead of 4.8 im gonna lose my mind
You need to target net48
expected it'd work with 8 because newer but it still doesn't work when i set it to 48
wait
"Because newer" what ๐ญ
8 was released like 4 years after 4.8 so i assumed everything in 4.8 would also work
That's not how unity does stuff unfortunately
Did you... add the reference?
still cant find it
SCPSL_Data/Managed
ty
Yeah you have to set the langversion property
Np
where can i do that ive never had to do that before
Edit the csproj
Put <LangVersion>12</LangVersion> in a property group
wait uh where is this exactly
tysm
Dedicated server's folder
ty
Np
why not newest?
Embedding the runtime is also way different
dotnet also has better support for embedding compared to framework
huh
Cuz they have .net 8
i was so confused because it didnt let me make the project in 4.8
so i didnt expect just swapping the versions to work
never had to do it before either tbh
good to know tho
also didnt help that the doc didnt mention that i had to get the assembly from the files
wiki will be updated with a proper setup guide at some pointโข
๐
misleading things:
- a lot of phrasing
- visual studio
- visual studio being "easy to use and intuitive"
- you must install .net frameowrk 4.8

