#plugins-dev-chat
1 messages · Page 43 of 1
yeah
we got 14 players because of it
We got like 15 or 20
nice
Exiled broke many stuff
kill exiled
And also the SSSS change also broke many stuff
use exiled become exiled
Will become obsolete
labapi will win
lmao kind of same
my server had peformence issues 😭 cause my friend forgot to fix performence issues on the laptop
cause he owns the laptop
and im using parsec to connect to it
so i had to fix peformence issues
server on laptop?
yes
what about it 😠
ok it made certain things fucking fast and reduced the cpu 👍
nice
is there any good peformence plugins?
performance cant be fixed by plugins
well
yuh uh... clean corpses
not as much as youd think on older hardware
other stuff
uh oh... cedmod said fialed to vertify cedmod verification token... ignore message if the server is not verified
uh ohh
my keyboard is buggy today idk why 😭
Failed to verify cedmod verification token ):
ignore it
if your server is not listed it will say it
if your server just started (or dissapeared of the list for a little bit and then came back) it can also say it
my server is public btw
thats just the delay between your server registering itself on the list, the sl api updating the list
and cedmod pulling the list
k
what do you guys think about my pluginlist
https://docs.google.com/document/d/1QlTBUIjm_crgsyvQdeD2XeF6NAYhWQes5dEmwj6b154/edit?usp=sharing
Dinos Lab - Plugin List Server Plugin Remote Keycard - Doors/Gates, SCP Lockers, Generators - Only Custom Map 914 Recipes Coin -> Janitor Keycard - Fine 05 Keycard -> Jailbird - Very Fine Player-> Random Teleport / !SCP 25% death - Coarse Player -> !SCP 50% Death, 49% Become Zombie, 1% Live Cus...
At Cyn 
You must discover Exiled for good plugins

nuh uh
Shitty plugins are everywhere (not limited to exiled)
no

does someone know why this dosent work?
public static void Process914PickupFully(
Scp914ProcessingPickupEventArgs ev,
Scp914KnobSetting targetKnob,
ItemType oldItem,
ItemType newItem)
{
if (ev.KnobSetting == targetKnob && ev.Pickup.Type == oldItem)
{
ev.IsAllowed = false;
Vector3 position = ev.Pickup.Position;
Quaternion rotation = ev.Pickup.Rotation;
ev.Pickup.Destroy();
Pickup.Create(newItem, position, rotation);
}
}
nvm
found out why
What?
I don't know English slangs
Oh I thought you were just taking the piss lmao
It means it's amazing code that I love

Calling something "peak" means it's like "on top" as in "the best"
Hippity hoppity your code is now my property
I gave all the info you need to remake them 
Can't send the code though
Next time I'll ask a player to join me on my PC after opening my ports so I can record a video of them escaping and losing their visible wearables
Nothing on my issue says it only happens in RA
10/10 Northwood moment and if that's really the case, they could at least have the respect of taking 5 seconds to copy the reason in that list instead of letting us figure it out
idk if its reproducable in basegame escape
does that not remove and readd ?
That was basegame escape
oh
I took the video on a vanilla server
Either way, still a dick move lol
Just a bit tilted sorry, sucks to take the time to give them specific info about where the bug happens just for them to be like "screw what the issue says, you used RA to repro it means it's only in RA" lol
I noticed that the report did not mention that this bug occurs after the player escapes, which seems likely to cause misunderstanding
After any role change
Whatever, I've told them about them closing it for no reason, they can do whatever they want with the info
Hi @grand flower, your video did not seem to upload right for this report. Given the report only mentioned reproduction steps through RA, it was closed. If you have reproduction steps of this occurring in vanilla gameplay (such as above), It would be great if you could make a new bug report detailing that.
Next time, feel free to reach out to QA Management or contact us on the QA Community discord if you have any questions or concerns regarding a bug report
cyn fumbling the bag
Is it possible to manually log something into the Server Log file?
That's weird, I swore it would open on my end. I'll make a new video and send it later in the day then.
Honestly, closing bug reports just because they’re “RA Only” is such a weird stance in my opinion. Especially considering there’s official plugin/modding support via LabAPI, and issues like this one can definitely be triggered by a plugin. And if problems like this are ignored you eventually end up with a buggy mess of a plugin API nobody really wants to touch.
Lab API bugs are reported elsewhere, and this was the standard policy from the Programming team
on LabAPI repo (or here)
^
does anyone know how ~ClassName () {} works?
I know static ClassName() does stuff when the method is first mentioned, but idk how ~ClassName() works
Deconstructor, it is called when object is being destroyed
and how do I destroy? 😭
garbage collector does
that is the reverse
yeah
i need the inverse of static constructor
uh
because I wanna register events and unregister in the inverse
public static void Destroy()
{
}
and call ur code 
Or just... make static method that is called when you want it to be unregistered?
yeah
you cant really have it called automatically
because theres no object to destroy
so it cant finalize the object
looks weird not calling a method for start and then finish then but fair enough
then call a method to start 
yeah
Well you have plugin enabled and disabled methods
Yeah of course I get that. But in this case this seems to be a base-game issue that you can also trigger through LabAPI, not exclusively. That's what I meant, sorry if I wasn't too clear
i didnt really think it would work considering it's a CustomSetting, idk if it would break or smth
erm
well
thing is
it DOES need empty constructor
so whatever ur doing make the constructors empty
yeah then im cooked
!!!!
thats not that hard
unless ur configing values
all my settings are parameter less

well
you can do it in the uhhh
either constructor
register eventtt
or you could
idk
i forgot
did you add to secretapi yet or nah 😭
:c
busy being SICK
can you get the colours without the background
i like my background plain and boring 
idk how
those who know
We do not control what is and what isnt added to the next build.
bruh
And there is some internal thing going on that slows it down a bit
bruuhhhh
How to disable 939's claw and lunge AoE damage
Hurting event
I need raycast or smth?
no
ev.DamageHandler
check if its 938
939
I forgot how tbh
But i think it has its own damags handler
No fucking way, is ChaosKeycardItem not a KeycardItem?
Hello NW
new in 14.1.1
[log] NullReferenceException: Object reference not set to an instance of an object
[log] at MapGeneration.Decoration.EnvironmentalAlarm.OnDestroy () [0x00017] in <d9731e675e55453197cf28cd60eed3f2>:0
14.1.0, still active in 14.1.1
[log] ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds
[log] Parameter name: destinationArray
[log] at System.Array.Copy (System.Array sourceArray, System.Int32 sourceIndex, System.Array destinationArray, System.Int32 destinationIndex, System.Int32 length) [0x000cb] in <069d7b80a3914a08b6825aa362b07f5e>:0
[log] at System.Array.Copy (System.Array sourceArray, System.Array destinationArray, System.Int32 length) [0x0002c] in <069d7b80a3914a08b6825aa362b07f5e>:0
[log] at InventorySystem.Items.Autosync.AutosyncMessage..ctor (Mirror.NetworkWriter writer, InventorySystem.Items.ItemIdentifier itemId) [0x0004e] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Autosync.AutosyncWriterBase.Send () [0x00010] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Autosync.AutosyncWriterBase.Dispose () [0x00000] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Autosync.AutosyncItem.ServerSendTargetRpc (ReferenceHub receiver, System.Action`1[T] extraData) [0x00020] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Keycards.ChaosKeycardItem.ServerOnNewPlayerConnected (ReferenceHub hub) [0x00007] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at InventorySystem.Items.Keycards.KeycardItem.<OnTemplateReloaded>b__46_0 (ReferenceHub hub) [0x00008] in <d9731e675e55453197cf28cd60eed3f2>:0
[log] at (wrapper delegate-invoke) System.Action`1[ReferenceHub].invoke_void_T(ReferenceHub)
[log] at ReferenceHub.Start () [0x00009] in <d9731e675e55453197cf28cd60eed3f2>:0
I'll open issues for those later once I'm done with work, but hey if you wanna snatch them now, hf
life would be much better if AudioMessage were this:
public uint[] SpeakerNetIds;
public byte[] Data;
public int DataLength;
having to make sure you dont create duplicate controllerids is fucking annoying as all hell
It's not hard
@wheat flower
public static IEnumerable<int> GetOccupiedIdentifiers() => SpeakerToy.List
.Select(s => s.IsDestroyed ? -1 : s.ControllerId);
public static byte? GetAvailableIdentifier()
{
unchecked
{
var available = Enumerable.Range(byte.MinValue, byte.MaxValue)
.Except(GetOccupiedIdentifiers());
// ReSharper disable PossibleMultipleEnumeration
if (available.Any())
{
return (byte?)available.First();
}
// ReSharper restore PossibleMultipleEnumeration
return null;
}
}
easily jebaited you for free code

It's just two LINQ snippets, hardly revolutionary
its barely anything compared to the actual audio data 💀
me when i have more than 255 places i potentially want to play audio

(not actually)
even then it might only double or tripple the networking if you have that many
If you somehow reach that number, ask yourself, what are you doing
i mean i have seen that where people place one per room
with separate audio tracks?
which i can understand, and the current system works nicely with
i mean for playing the same audio
yeah
i get that it works well
but it just annoys me
id rather just send to a speaker directly
not have funky business
This pretty much solves your issue
even better, have a 2nd audio message that works that way
so there are more options
@worthy rune You could just integrate that into the SpeakerToy wrapper
SpeakerToy.NextAvailableIdentifier
being forced to use controllerid kinda sucks
maybe
not that its bad, just annoying
like assign on contructor, or just a method to auto assign the id?
Static method that gets the first available identifier it can find
Just like this
I could PR it ig
when's the LabApi repo going to be updated?
is it outdated?
@harsh thorn
only thing if you do a PR, i recommend the name byte SpeakerToy.GetNextFreeControllerId() or void SpeakerToy.AssignNextFreeControllerId() ControllerId so its alittle clearer whats being assigned
sounds good
The reason it's a nullable btw is in case there's no free controller id
(somehow)
yeah I'll probably just go with that instead
cleaner
and I'll make Assign just throw if there's no free controller id
ControllerID should be a ushort smh
one more networked byte 
you know what? They should be represented using 2 int64s
thatll teach em!
is that even a thing
Holy shit
this is what ive been missing my whole life
anyways
i know one byte is more than enough 99.99% of the time
but Holy shit it feels so clausterphobic to me
like if i wanted to have multiple different sounds across the map and the unique environmental sounds somehow number more than 250 or so then everything gets fucked and I'll have to write a custom controller id management system. That isn't gonna happen but still.
How to spawn doors and GunLockers without MER?
find the prefab from NetworkClient.prefabs
spawn
Prefab is null
NetworkClient.prefabs
also, use TryGetComponent for type safety
iterate through the dictionary's values
Door component?
BreakableDoor or such
if you want a "regular door"
you still need the name check for which zone's door you want
I think I spawned him wrong. He didn't spawn on the map XD
I need to use NetworkServer.Spawn(), right?
Why?
The problem is that the door didn't even spawn
how did you spawn it?
var doorPrefab = NetworkClient.prefabs.Where(x => x.Value.name.ToLower().Contains("door")).FirstOrDefault();
if (doorPrefab.Value != null)
{
Log.Info(doorPrefab.Value.name);
GameObject doorObj = Object.Instantiate(doorPrefab.Value, new Vector3(0f, 320f, 0f), Quaternion.Euler(0, 90, 0));
doorObj.transform.localScale = new Vector3(10, 10, 10);
NetworkServer.Spawn(doorObj);
}
EZ BreakableDoor
this should work though
😭
@unique crane how can i get player current item in third person position if it is possible?
Im not sure I understand what you mean
how can i get this revolver transform?
Ah
Hmmm well if you do try get component in children on the player gameobject
For the firearm
It shoooould give you the firearm component
And then just .transform
How can I tell if a DamageHandler comes from passive damage like cardiac arrest or whatever 106s effect is?
universaldamagehandler translation id
thanks
doesnt 049 have its own damage handler
that's probably also triggered when they actually kill someone
not via cardiac arrest
i think that's direct attack

okie time to use 049 dmg handler then
i forgot how to get translation from translation id blegh
DeathTranslations
Corroded
tyvm!
no death translation for corroded or corroding :c
its ScpDamageHandler
this.Hub.playerStats.DealDamage((DamageHandlerBase) new ScpDamageHandler(this.AttackerHub, 2.1f, DeathTranslations.PocketDecay));
"corroding"
the dmg he does after first attack
you dont use corroding there
no?
doesnt exist
no death translation for corroded or corroding :c
i cant see one, so im testing now
yea 106 doesnt have one
rip
now how am i gunna check if dmg is via corroding 😭
check the 106 attack subroutine
ye
public override void OnTick()
{
if (!NetworkServer.active || this.AttackerHub == (ReferenceHub) null || Vitality.CheckPlayer(this.Hub))
return;
this.Hub.playerStats.DealDamage((DamageHandlerBase) new ScpDamageHandler(this.AttackerHub, 2.1f, DeathTranslations.PocketDecay));
if ((double) Corroding.StaminaDrainPercentage <= 0.0)
return;
this.Hub.playerStats.GetModule<StaminaStat>().CurValue -= Corroding.StaminaDrainPercentage * 0.01f;
}
😭
thats the damage for it
i need to know if a dmg handler is caused by corroding
ScpDamageHandler check for PocketDecay
yeah
first hit
and do what with it 😭
if lumi wants the passive damage thats done when hit (Corroding)
Then they check ScpDamageHandler for PocketDecay
pocket decay and corroding are the same?
If you want to check for pocket dimension kill then its UniversalDamageHandler with PocketDecay
no
Not same !
well
same translation id
but different damage handlers
why are they named the same thing yet do different things 😭
scpdamagehandler pocketdecay
and check if the effect is disabled
so eve you were almost there
oh yeah
how 😭
i forgot to say that
me when ScpDamageHandler doesn't have effects
player
player
the player being hurt
damage handler doesn't have player 
can you rework 106 damage handler to be its own
no but Hurting event does ?
where tf r u checking for damage handler
r u storing it?
bru
then store the player too
then store a dictionary!!!!!!
me when the effect is probably over by the time i send the logs
then have some sort of record
store what was happening
do you have structured logs?
or is it just string
me when record struct
also if you're storing it then structs are probably worse
you could have a hierarchy with classes/records for different damage scenarios
how do you log
so you send strings?
embed
then store the embeds 
damage can be applied to anything with the IDamageable interface
yea
riptide....
she needed the player being damaged
thanks
no i store the logs, and then make the embed after
i know
but actually thinking about it, it's probably better to save the entry...
just explaining why it doesnt contain the player by default
shud upppp ax!!!
does anyone see an issue with this code? sometimes the id isn't remove from the list 😭
exception in action?
i dont think so but good shout, ill add a try catch
put the removeid call first 
yeah actually
errrrr
I already pinged beryl
How do you use animated hints ?
Thanks. 👌
animated hints??? wow
You stole this from me
liar
Ok maybe i did
can any viewmodels be disabled?
someone who have -1 iq
It makes sense to make asynchronous modules if it uses a delay when enabled anyway?
do you mean hiding the item from the player's hand?
what do DefaultState and CurrentState mean?
where are you calling this
this doesn't make much sense
Players hands
default state if false it didnt call enable
_moduleManager.EnableAll(...).Wait() would be sufficient, no?
you're blocking anyway
i'm very confused
does it even make sense to make asynchronous modules?
planned make other system for enable separately module from game
i mean you can select the item on the server and not sync the current item
you should extract the loop body and use Task.WhenAll
i assume you don't need each module to wait for the other to load
depends on your use case
example?
what might it be needed for?
@upper vapor
I want to know that I didn't waste 6 hours in vain
...
did you ask yourself "what will i need this for?" when you started? 😭😭
in ASP.NET Core for example, we have background services that are long-running
i haven't worked with modules that can be enabled or disabled spontaneously
for example, a server status updater
something that does some work every x seconds
very basic but that's what i could say off the top of my head
Then why do you do stuff you dont even need
It's more interesting to ask at the end
because
the backlog fills up 
its already 5-10 project
which do one thing
each times i rewrite from scratch
because something wrong
-_-
how about you refactor a little bit instead of rewriting the whole thing
then the code is dirty
The point of refactoring is to make code cleaner
me when if this task goes on forever, the server will be stuck 
just request cancellation 
can the invisibility effect overlay be removed?
no
make them invisible a different way
(scale 0, or by making them invisible by sending their position as something else)
mmmmm
you can try not telling the client its invisible
oh
by desyncing the effect sync list
Fake sync the effect 
yea
then how
what are you trying to do even? just explain it
modules system
that's not an explanation
each module is a micro plugin
auto broadcast, xp rewards and something
all it separately module
why do you need asynchrony for that?
but also will be module for works with sqlite
so if you reuse a connection, it'll still work, right?
yeah but what async thing are you doing in those methods
plus if you're blocking anyway, you might as well make them sync
open file
and save file
on enable/disable??
again, you enable the modules and wait, you don't let the server start until your modules are loaded
no need for tasks here
you're waiting for the modules to set up before starting the server
you don't make it async
but if will be any processing each 2-5 seconds
if you don't wanna rewrite it, just wait for the enableall task
i already deleted it

it dont have git

visual studio users...
no it isn't, not in every situation
why need to support a plugin at all if I can make a new one?
if you rewrite your codebase every month then maybe the issue lies elsewhere
each day*
how minimum last 10 days to one thing
because if you refactor, it'll take less time than rewriting every single aspect (even completely working ones)
if the problem becomes so bad that refactoring takes more time than rebuilding the whole thing, then rebuild it
we don't have hot reload in SL, we have to wait to restart the server every time we want to test
imagine how much better it would be if the single line you changed in the code reflected immediately
blazor, vue etc. have hot reload and the experience is much better not having to hit build and restart
metaphor for rewriting the codebase
change the relevant things if possible instead of dumping everything and deleting it forever
you might even learn more by refactoring instead of rewriting
sure, rewriting when you know all the requirements is nice
but often it's not worth it, whether that's because the change is not significant, or because you don't actually know the requirements
I want to temporarily 'store' items/pickups to be used later.
So delete them from the world as pickups, or from player inventoriers as items.
But if they are weapons, they carry information like ammo and attachments, so i cant just save their itemtype and create a replica later.
Does anyone have any idea how i could "despawn" a pickup and spawn it in again later?
(I could make an Item in an inventory a Pickup by forcing it to be dropped)
https://github.com/Axwabo/SCPSL-Helpers
I have item info implementations here
You'd have to create snapshots of each item or pickup and re-apply that
Some firearm module data are stored based on serials, you don't have to save that (I think)
From what ive looked at... partial hot reloading would be possible
I tried and failed 
Calling your method to unscribe and clean up stuff
And then load the assembly under a different name
like with guid postfix
But it wont work on everything
That I don't want
like static classes
Well for reloading at least something
like events
why not
I tried harmony patching
I didn't unload them
I loaded a new domain and tried to get the IL from there
hmm
It was the same IL 
I guess for debug I can add a guid to the assembly name
But the csproj or props file will look ugly

At runtime?
Apparently
I havent tried it
But well
Easiest solution would be to move to a scripting language 
Since you can fully control these
and just destroy the virtual environment and load it again
I have NWAPI Lua version
And I want to get it to labapi
soon
Is it a Plugin you can drop in and start a scripting engine?
daamn
or run lua in RA
I still wouldnt do full on plugins with it
Its just for like
"Haha funny event script"
where lua
Does Player.UserId return just the steamid or does it also have that @steam in it?
It includes the auth type like steam or discord or Northwood
id@steam
id@discord
string@northwood
with @northwood you can immediately ban them
but the server will lose verification
bit with discord im guesss you too can ban
So if its somehow discord or northwood, i cant get their SteamID?
only the owner decides who is allowed on the server
yes
you can play in scp sl by discord
lol
and your steam will not be linked to the session
Alr, hopefully a non-issue for me since neither NW or discord players would have access to my command anyway 
How to spawn LargeGunLockerStructure?
call its start method
before spawning it
How?
get the StructurePositionSync component and start it
In children?
angel moment
they already exist
?
just no spawn method
...
pull nw easier
#serverhost-suggestions message press yes
you dont need it
it works without verkey
im guess
The owner can give you serverhost role
just ask them
@soft turtle why no if you wanna spawn it
I mean if you have access to the VPS you can also run !hostrole
lol
and just use polaris
i don'd
my friending
i don'd need it
okie
thanks though
System.MethodAccessException: Method MapGeneration.Distributors.StructurePositionSync.Start() is inaccessible
I can`t call Start method
enable unsafe code in your project settings
remember this when you create a new project, i've fallen for this many times 😭

Unity itself calls Start when creating an object, doesn't it?
reflection better
its call when script has been added
start is invoked on the first frame when an object is active

awake is called immediately

since you're spawning it before the next frame, the position isn't set so the sync var goes "hmmmm... zero" and the client never changes the position if you set the sync var later
why are you blaming unity 😭🙏
because its not async
unreal engine?
yeah
not unity
are you mad about the naming convention or what?
i don't understand the complaint
so stupid unity
I don't want to do the task run manually

and processing fucking cancellation token
_ = AsyncMethod()
Riptide has explained this before
task.run doesn't necessarily put you on another thread
its call in the same thread
also you should use awaitables now
create an extension method like FireAndForget
but it give chance
a _ = not
chance 😭
yes
you randomly make requests on the main thread and separate threads?
maybe it's okay in startup
but in events you're cooked
we've had this conversation before
when will quantum computers be available in every home
then you won't have to think about fucking asynchronously
you will have many more problems with quantum computers
smart people will make everything easier for development

and AI Lang
do fucking thing while you printing fucking numbers from 0 to 10
english is fundamentally flawed for programming
also, good luck getting your program to run on a quantum computer
it will be possible
im guess
but in 100 years
(luckily) i won't be around by that time
honestly i don't even know if i care about that xd
I don't think it will be easy to write code when nuclear warheads explode outside the window
what
OH
you mean
-# i'm not gonna send a furry meme but
one day i'll be a protogen and you can't do NOTHING to stop me 
and i'll be able to Microsoft Excel
lol
angel moment
How to spawn LargeGunLockerStructure without items inside?
Set its loot to an empty array
I need to get the component and clear the list?
Kinda yeah
Wow
Thx
Np
ev.IsAllowed doesn't override whether the person is allowed to open a generator using PlayingUnlockingGeneratorEventArgs, what is the solution to this as CanOpen doesn't exist?
actually ig i could just do ev.Generator.IsUnlocked = ...
I mean if it's unlocked it wont matter atp
You can just stop them from activating the generator
the issue theyre having is
its locked
and they want to change its unlock requirements
(eg remote keycard)
yeah
CanOpen exists for lockers and doors
but not generator
so i now have to just set IsUnlocked for the generator instead as IsAllowed doesn't change anything
line indent changes the position relative to the center of the text, but the text can change and because of this, the position also changes, what should I do to start from a certain position?
someone know?
Is it possible to access the chambers of a revolver individually? Like a way to set their ChamberState manually?
look at how chambers is gotten, it's a get method, and just copy that code
then you can modify that stuff ig
Never worked with "ReadOnlySpan"s before, not sure what im supposed to do :x
@icy knoll ReadOnlySpan doesnt exists in normal net48
i know
the getter converts the array into a ReadOnlySpan
lol
just get the getter code
CylinderAmmoModule.GetChambersArrayForSerial(revolver.ItemSerial, revolver._cylinderModule.AmmoMax)
ah ye just GetChambersArrayForSerial(base.ItemSerial, ammoMax)
that's the getter code
reference mscorlib.dll
reference deez
reference the air around us
Thank you!!
Hmmm, whats the difference between Chamber.ContextState and .PredictedState 
Seems like ContextState also reads/writes to PredictedState if the NetworkServer isnt active. And if it is, it reads/writes to a "ServerSyncState", so i should probably use ContextState
or ill just use ServerSyncState directly
So basically i want to make my own custom reload method for ... reasons
For this i would love a way to play the reloading animation out, but prevent any actual loading of bullets. Not just instantly unload the gun and refund the ammo. No ammo transfer should happen at all.
And would it be possible to allow the reloading process of the revolver to start, even if no valid ammo is in the inventory?
I believe there is client side check too
before sending cmd
hm, do you think it would be possible to set the AmmoType to the Revolver item? Could the game try to load the gun itself into the gun?
And then in the reloading event change the ammotype to something impossible, so nothing would be reloaded?
Is there any method to get a random point of which a person may get teleported to when they escape pocket dimension?
check pd 
oh wait
Scp106PocketExitFinder.GetBestExitPosition
however
otherwise GetPosesForZone
problem is, i have a suggestion to make it so you cant come out in the same room or close to an enemy or anything, and this wouldn't really avoid it
but if GetPosesForZone works then cool
idk 
is there like a footprint or smth that dictates which zone the person even came from or nah?
Room.Get().Zone
im going to stab u
nooooo
OH
right
ok
exiled has a property in Player called Side where it gets what side a player is on, what is the labapi equivilent? i looked for faction and i dont see it on player
We technically already talked about it here but I made it an issue for tracking https://github.com/northwood-studios/LabAPI/issues/183
i just made a pr to add sides, probably will get denied but it's whatever:
Copypasting exiled smh
me when labapi doesnt have faction on player
and its easier to make a new enum?
it just makes it so if people wanna check if friendly fire is possible or not really, that's the point ig
feel like faction is basegame
Does faction fail to do this?
I am genuinely curious
idk, never used it

omg my allergies are killing me wtf
Moment
Get good..
[0] = SCP
[1] = FoundationStaff
[2] = FoundationEnemy
[3] = Unclassified
[4] = Flamingos
yeah ill just use that then
is there a method to get faction or will i have to do similar stuff?
Player.Role.GetFaction()
or Player.Team.GetFaction()
@worthy rune sorry for the ping, but I have a question about a potentially important bug I just found: is ServerPickupCreated not supposed to be called when a player drops an item?
I get ServerPickupDestroyed when I pick it back up, but not created
That would be much appreciated thank you
Just realised our optimization stuff is just half broken, items never get cleaned up -_-
or well, items dropped by players
ooh, yeah i looked at this along time ago. The AddPickup method should look like this instead
if (!Dictionary.TryGetValue(pickup, out Pickup wrapper))
wrapper = CreateItemWrapper(pickup);
ServerEvents.OnPickupCreated(new PickupCreatedEventArgs(wrapper));
Lemme patch that in and try
there is an internal PR for it, so the fix will come eventually
the reason the old method failed was because something likely an event was getting the wrapper with Pickup.Get before the AddPickup method was called
and the old method didnt account for that
ahhhh
i see
Yep it works, thank you!
That just solved a lot of migraines we were having
I don't know if I'm stupid or something but where is the new labapi?
labapi updates with the base game
That's what I though, so how come the labapi that I grab from the files is the exact same?
are you comparing the sizes? or using a tool todo a diff.
I am loading it into my project as a reference and it is the same O.o
there was some updates from 14.1 to 14.1.1 but they were small additions so didnt increase the size(i think dlls are padded alittle so sometimes small changes dont increase the size of the dll)
you can tell if its the new one if theres a Player.Size property
Yeah there is no Player.Size property
if you startup your dedicated server and type version does it print out 14.1.1
It does not :/
".\steamcmd.exe" +login anonymous +force_install_dir ".\Local Admin Server" +app_update 996560 +quit Should this not update it?
".\steamcmd.exe" +login anonymous +force_install_dir ".\Local Admin Server" +app_update 996560 validate +quit
You were most certainly right
so wise
Try <indent> maybe
what is the alternative to this nwapi method in labapi?
Disconnecting connId=0 to prevent exploits from an Exception in MessageHandler: NullReferenceException Object reference not set to an instance of an object.
at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Firearms.Attachments.AttachmentGameObjectGroup.SetActive (System.Boolean state) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Firearms.AnimatedFirearmViewmodel.UpdateAttachments (InventorySystem.Items.Firearms.Firearm fa) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Firearms.Attachments.AttachmentsUtils.ApplyAttachmentsCode (InventorySystem.Items.Firearms.Firearm firearm, System.UInt32 code, System.Boolean reValidate) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Items.Autosync.ModularAutosyncItem.OnAdded (InventorySystem.Items.Pickups.ItemPickupBase pickup) [0x00000] in <00000000000000000000000000000000>:0
at InventorySystem.Inventory.UserCode_TargetRefreshItems__ItemIdentifier[] (InventorySystem.Items.ItemIdentifier[] ids) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkIdentity.HandleRemoteCall (System.Byte componentIndex, System.UInt16 functionHash, Mirror.RemoteCalls.RemoteCallType remoteCallType, Mirror.NetworkReader reader, Mirror.NetworkConnectionToClient senderConnection) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient.OnRPCMessage (Mirror.RpcMessage message) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient+<>c__DisplayClass54_0`1[T].<RegisterHandler>g__HandlerWrapped|0 (Mirror.NetworkConnection _, T value) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkMessages+<>c__DisplayClass9_0`2[T,C].<WrapHandler>g__Wrapped|0 (C conn, T msg, System.Int32 _) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkMessages+<>c__DisplayClass8_0`2[T,C].<WrapHandler>b__0 (Mirror.NetworkConnection conn, Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient.UnpackAndInvoke (Mirror.NetworkReader reader, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.NetworkClient.OnTransportData (System.ArraySegment`1[T] data, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0
at Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorClient.OnNetworkReceive (LiteNetLib.NetPeer peer, LiteNetLib.NetPacketReader reader, System.Byte channel, LiteNetLib.DeliveryMethod deliverymethod) [0x00000] in <00000000000000000000000000000000>:0
at LiteNetLib.NetManager.ProcessEvent (LiteNetLib.NetEvent evt) [0x00000] in <00000000000000000000000000000000>:0
at LiteNetLib.NetManager.PollEvents () [0x00000] in <00000000000000000000000000000000>:0
clientside
picking up an item with an invalid attachment or something?
InventoryLimits.GetAmmoLimit
thanks
connId=0 means it was the host, which is strange as the exception seems to be one from adding an item. do you mess with the host at all anywhere
this is on the client log
I'm guessing connId=0 is always the local client
yeah
On the server's side of things we made it impossible to disconnect the host
got tired of it

switched my role to mtf captain, dropped the captain gun, tried to pick it back up
doesn't always happen, seems pretty rare
actualy think it might be the first time it's happened to me
oh thats interesting
I could see it dropped, but right after picking it up I get soft disconnected
you should be able to report this one the normal way (dont quote me on that)
will do
also gonna suggest SCP-127 events
for like, preventing exp gain and all
made my own and it's useful
How early can I spawn camera toys?
Is OnServerMapGenerated() ok?
id assume after map loads
Does LabApi provide any tools to make placing them in the world easy or nah
i think thats too early, 1 frame after waiting for players is where i end up doing it
^ for all admin toys that is
sounds good
Pretty sure RA bugs aren't fixed
and like, yeah setting the role multiple times a frame kinda breaks stuff
that maybe they could fix
would be nice
i'd just expect a "you're doing funky things, won't happen in base game" response
I usually do that WaitingForPlayers
Not too early, not too late
noted
i got this again, great
this time on an actual server
gonna try to repro it
but so far it seems to be "drop a gun, pick it up too fast"
YUP
exactly that
And now we've decided not to work again even with validate
could be just a steam moment, sometimes it wont update for whatever reason
nvm so
it's actually pretty elaborate
-
You must spawn, or have your role set as, SCP-079.
OR -
You must be dead, and spectate a player that is SCP-079.
- SCP-079 must then be your current spectated player as you spawn.
- Spectating a human class after spectating SCP-079, before spawning in, prevents the bug from happening.
-
You must then respawn as a human class with a gun, without spectating a human player in between.
-
If you equip the gun before dropping it (doesn't matter if you unequip it, you just gotta equip it first), it doesn't happen.
-
If, after spawning, you drop the gun from your inventory (without equipping it first), and then attempt to pick it up, you get soft disconnected
-
Once you get soft disconnected, the bug does not happen again if you reconnect and try to cause it.
-
Round restart allows it to happen again, as well as a server restart.
-
Restarting the game, and reconnecting, does not allow it to happen again.
Like
what the fuck
trying to see if round restart allows it to happen again
yep
could you also try restarting your game aswell







