#plugins-dev-chat
1 messages · Page 186 of 1
[2026-02-13 03:50:37.187 -06:00] True | False
[2026-02-13 03:50:37.203 -06:00] True | False
[2026-02-13 03:50:37.218 -06:00] True | False
[2026-02-13 03:50:37.233 -06:00] True | False
[2026-02-13 03:50:37.277 -06:00] True | False
[2026-02-13 03:50:37.303 -06:00] True | False
[2026-02-13 03:50:37.327 -06:00] True | False
[2026-02-13 03:50:37.340 -06:00] True | False
[2026-02-13 03:50:37.366 -06:00] True | False
[2026-02-13 03:50:37.402 -06:00] True | False
[2026-02-13 03:50:37.415 -06:00] True | False
[2026-02-13 03:50:37.430 -06:00] True | False
[2026-02-13 03:50:37.459 -06:00] False | False
[2026-02-13 03:50:37.478 -06:00] False | False
[2026-02-13 03:50:37.491 -06:00] False | True
[2026-02-13 03:50:37.506 -06:00] False | True
hmph
Two in a row
Not boding well
Can someone answer my prayers and fix this 🙏🏻 I'm going insane
I don't know why it's this difficult to figure out if someone is continuously firing
Worst-case scenario I do a five-frame buffer for players and check if a majority is firing, but that's a much more intensive and less convenient version
what is the problem?
Revolver
Lmao
i know what you are talking about
Real
IM NOT DEALING WITH THAT AGAIN
Tuffff
the fix
Did you ever find a solution?
not doing it
Could you tell me what it is at least 🙏🏻
I'll do crazy shit if it means I can solve this in an efficient way
i didn't do it and asked maro to please spare my soul from going to therapy for a revolver
i tried everything
its so client side
🔥🔥🔥🔥🔥🔥
that guns are so coded badly for server
no don't do that seriously
Okay!
I'm trying to make an effective IsShooting extension to Player
To figure out if the revolver is shooting I use
Dunno if thats possible
But I want this to work continuously (e.g. if a player holds M1, it returns true while the player is holding M1)
I think the firing is just handled as requests from the player
Yes I know
You cant 100% say they are holding down the LMB
Yea
It's an IsShooting variable
or just click
tbh i think its way impossible
Not an IsHoldingM1 variable
You guys are misinterpreting my point
David
My point with saying this is if a player is continuously firing, IsShooting should never return false because they're shooting at every available frame
It works with everything except Revolver cause it's dogshit
It occasionally has 1/2 frames where the server says this is false in-between shots, but not all the time
Yes
I want my code to be accurate
great mystery
there are alot of mysterys in the sl source code
that i do wonder if it evolves by itself
or real humans type it
but yea wait for david
maybe he could save your soul
tbh we need an event like that it would be really cool
yeah this is client side
What is
your only getting the "oh hey im starting to pull the trigger"
you got your answer
"i want to shoot pls"
server only checks if its in timely manner
maybe a suggestion to make it an event
I hate that every other gun works except revolver
could be cool
The only time you can control this is when you have dummy
A PlayerRequestedShotEvent?
More on the shooting event
something like
"Held or no"
like idk how to explain it
but something specific for the revolver holding
I mean I can already essentially check that for everything except revolver
Revolver is just bad
idk how the revolver pull really works
So why is the start of the trigger pull happening sometimes 1/2 frames after the server says they should be allowed to start a trigger pull
Is it a client lag thing
Latency-type stuff?
maybe
idk
At nw please make better internet by inventing light speed internet
eletricity kinda do be fast
Well ig I'll roll with this and that'll have to do
Iirc electrons are actually relatively slow, it's just they're incredibly light so it's easy to push a ton of them
rewrite physics
Universe update 3
Buffed electricity
Nerfed neutron stars
Fixed bug where stars would randomly explode after a while
Uh oh
This is actually really interesting cause it means that if a power line loses its electrons, it takes a while for the connection to be restored because electrons are slow, but the signal itself is super fast once it's connected because the electron pushing movement is fast
Muh electrons 
average developer working on the Universe
imagine if thats true
and we are actually just a bug

btw does anyone know when i click round restart on the RA will it do the command round restart?
or what
Yea
ok because exiled has a lovely problem ig
on handling that
im gonna patch it and make it trigger it
Whats thats not my problem then XD
the emergence of life was an edge case noone accounted for

i want to know
how much time we need for next version
and allow me change SubtitleCategory._speakerName
my server s players hate Emergency Door Button so i made this [HarmonyPatch(typeof(EmergencyDoorRelease))] public static class EmergencyDoorReleasePatch { [HarmonyPatch("ServerInteract")] [HarmonyPrefix] public static bool Prefix() { return false; } }
good question, no ETA on it
you gotta use TMPro magic (for now at least)
or else
make a client and your own sl centrals
(probably would get taken down for eula violation)
That's client sided my friend
And also there is a issue/idea on git and it got imported
I HATE REVOLVERSSSS

I made this whole shooting cache thing before realizing that the only way to know if a revolver is in the middle of a dry fire is to log the chamber state before firing and store that, which means I need to rewrite this again
you're cooked
Did Hubert code Revolver?
Whoever did was smoking something dude
I'm ultra-cooked
Everything works so nice except revolver
Okay but I did finally get it cause I'm awesome
Revolver shenanigans mean guns register as firing for like 2 frames after they're done firing, but I figure that's fine because it also means lag compensation is accounted for
I was just reminded
That there's GeneralDamageHandler, StandardDamageHandler, UniversalDamageHandler, and DamageHandlerBase
Why?
Uhhhhhhhhh
...
brilliant question
I had it mislabelled as GenericDamageHandler, had to fix it
but like the good or bad stuff?
what next? NormalDamageHandler?
just to be used by a single weapon
Bad stuff man it took me over an hour to get a working IsShooting extension
It took me like 5 minutes to make it for every gun in the game besides Revolver
Revolver is what made me take over an hour
sounds about right
Here's the really wild thing
One of those isn't a DamageHandler
No fucking lie
-# what
GeneralDamageHandler handles achievements lmao
I mean you can see why it was named that
But also shitty name choice
that me:)(when is next updateeeeeeeeee)
Imported does not mean it is done or is in the next release
You can read the labels description btw
It should give more info
nooooooooo
@serene vine
@serene vine banish this guy
Mods, kill this man
Atleast a bit better than showing logan paul 💀
im gonna 100% send you my last money
AHHAHAHAHHAHAHAHAHAH
How tf people fall for this shit
is so funny
Fun fact
Imported only means it got added to our imported suggestions.
When the idea got accepted or denied u get a new label
That's wild
I'm guessing they probably hard-coded the malware to send those images and can't even update it lmao
AHAHAHAHHAHAHAH
Gon
Sorry, discord no noti
I have a lot of channels on hidden
I literally had the same scam post happen in my server earlier today

Also in #plugins-discussion
Okay, so the softban thing works the way I thought
Should've pinged Hubert to take care of it
All gone, in one message.
Hubert would've sent the hitsquad
(That would take years)
(hubert trying to find in @ lucid username)
(fail)
Every month I see the fast inverse square root quake 3 video pop-up in my yt feed
float Q_rsqrt( float number )
{
long i;
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y = number;
i = * ( long * ) &y; // evil floating point bit level hacking
i = 0x5f3759df - ( i >> 1 ); // what the fuck?
y = * ( float * ) &i;
y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration
// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
return y;
}
nooooooooooooooooooooooooooooooooooooooooooooooooooo
Popped up for me as well. Obligated yearly rewatch
Why you don't use the event ?
I love damagehandmer system lol
This is lovely
because it doesnt have event when i made this is
exiled dont have it and i dont want to use labapi(long long namespace)
Exiled does have a event for this iirc
but it doesnt while i make it
i made it in 2 hours after update
Weirdest excuse I've ever heard
Oh okay that fair i was going to said we made the event pretty rapidly after the release
But not 2hours
I just check the event was there at first release
Of the update
Labapi still don't have event for it ?
I believe
if it have i still dont use
because
long long namespacw
LabApi.Events.Handlers.PlayerEvents.
It's not that bad
Also
Using statement
like your IDE can't auto-import or something?
exiled is the same length btw
ok its 6 letters more 😭
no its +6 letters
since Exiled is Player.cs and not PlayerEvents.cs
idk why we're complaining about 6 letters though
You don't even have to do anything
complaining about 6 letters is crazy
atleast you not coding on paper
wait
Type "PlayerEv" then enter
thats the class
Boom
not even the namespace
Plus
+6 letters for class not namespace, lumi was correct about it being same
CustomEventsHandler exists
You should be a detective fr
DetectEve
Lmao
people complain about anything
i genuinely thought it was 6 letter complaint, but its 0 letter complaint
Low quality rage bait
Trueing
atp dont write code cus you will refactor 1 minute later
I have done this before
I'm much faster typing than I am writing so it was painful whenever I had to do it
It's nice when my hands can somewhat keep up with what my brain is thinking
i code in notepad
yeah it's exactly same number of letter
clearly namespace are fine for LabAPI
and even if it's was 10 letter more i wouldn't care
Program in morse code 💀
would you care if the namespace was 79 chars 
Lab.Api.LabApi.Northwood.SecretLaboratory.SecretLab.PluginFramework.OfficialPluginFramework.OfficialSecretLaboratoryApplicationProgrammingInterface.Events.LabApiEvents.SecretLabEvents
not sure if that's >= 255 chars
More
guh
I can say by looking at it
183 chars only :(
you can speak with your eyes?
now thats a unique trait
Nvm ye
i regret going outside :(
Get hugs from yo gf then

theres an ocean in the middle
Moshes
can we make that an alias
if you use underscores instead of dots then ye
why r u like this
im a kbitty :3
ALMOST VALENTINESSSSS
5 hours
or 6 if ur british
or like
11-14 if ur in the US
KDE Bit..?
idk the other timezones and thus i dont acknowledge them
It is Valentine’s already for me

Happy Valentines to every single person out there
oh...

"who is your valentine?"
"my valentine? i'm a mekanik"
"I'm an SL Dev"
don't care if it's needed but probably never the case lol
huh
The floptrix
what
yes
chats
Is it true that you are reopening the servers for version 11.0?
me?
si
si può parlare in italiano? comunque è solamente la versione 11.0?
no ma si leggi #serverhost-announcements message
So all the old versions?
yes
Is there a better one in your opinion?
idk
okk thank you
@restive turret remember the BarrelTipExtension and how it sometimes fails?
Apparently, it's possible that occasionally a weapon doesn't register its world model to FirearmWorldmodel.Instances
Not sure why that can happen
Also why isn't the cooldown in the LabAPI ChangingSubmersionEvent
Guess I'm making another transpiler
cant you just trigger a cooldown from the event or no?
I would have to do that in PlayerSubmerged, and it would cause a double triggering of the ability cooldown, which is inefficient
I would have to do some BS like
((Scp106Role)ev.Player.RoleBase)._sinkholeCtrl._submergeCooldown.Trigger(10);
When they could just include it as a variable in the event like they do with SCP-096 Scp096EnragingEvent
isn't the worldmodel for pickups only?
No
It's the world model for players holding guns
That's the point of the firearmworldmodel and barreltipextension lmao
You know bullet tracers? How else are they going to find where to start the tracer
right
can you subscribe to InventorySubcontroller.OnSwapThirdpersonItem and log out the instance?
also to FirearmWorldmodel.OnSetup
I did this and I'm hoping it won't be a problem for the future
I pointed it out to SlejmUr because it's a bug and we had discussed it prior
Now, again, I'm not sure exactly why, but I'm pretty sure it has something to do with the conditional required to update the Instances
It could be that in certain cases, the Identifier already matches, so that initial setup never runs
All Unlink does is make sure the current identifier is removed
Probably made before i made those send cooldown
Also IF you able to do some reproduction steps for the bug report I will be glad
Im surprised but i think i found a bug quite strange, i have a command that removes coins from my inventory
player.RemoveItem(ItemType.Coin, n);
What happens is that when i have 2 coins and only 2 coins in my inventory then the plugin will just remove 1 coin and not the other
n = 2
but if i have 3 coins it works fine
it says my inventory is full
but my inventory is empty
amazing
i quite need a fix lol
that is all i can say
lmao

BY SERIAL???
and me kicking sl ac
bro who tf you think I AM
this is so
zer0two
what
this statement is very obscure
player.RemoveItem(ItemType.Coin, n);
ItemType randomShopItem = itemTypes[UnityEngine.Random.Range(0, itemTypes.Count)];
if (!player.IsInventoryFull)
player.AddItem(randomShopItem);
else
Pickup.Create(randomShopItem, player.Position);
This is the full code maybe for something strange??
i will try to check
okay then remove by instance
crazy
okay who wrote that RemoveItem method

Git blame
tryna git blame but github is fucking stupid
make an issue ig
Ax will fix it
yea but bro i need to remove them lol
bruh
have no eyes iog
Itnore
can't see the big yellow highlighted message
Optimize deez nuts
ok bro
Wait
but does player.Items have a set?
player.Items.Where(x => x.Type == ItemType.Coin).Take(n).ToArray();
what set
If you take items and then the items aren't cleaned??
idk what you mean by this
The Items is an IEnumerator
you have to store the items you want to remove
and then loop over it
loop over an array
remove each one from the inventory
foreach (Item item in player.Items.Where(x => x.Type == ItemType.Coin).Take(n).ToArray())
{
player.RemoveItem(item);
}

so like this
i forgot lol
yes
You can also add listpool if u wanna optimize it more 
idk the guy isn't paying me enough for doing it with list pool
a bit of ram
usage
will not be bad
he has A SHIT TON of ram
so a bit of killobytes more wouldn't be a problem
Nah atoh doesn't eat ram
mega troll
starves instead
Cus atoh is offline
wait i forgot now its COokies tower of hell
nope its online
Cross and midnightcooxies are hosting it 
they liked it alot ig
if you search on the list Towers
its the first one
yea btw it works
for the next developer who will see this obscene line of code i wrote
https://i.e-z.host/🐀/w7kh8csu.png
Tbh I would just copy paste this to labapi
Static
exactly
i might not do that tbh
we have to see some benchmarks
benchmarking one method is crazy
as if
Awwwww
bug we have a developer
Not like you make mistakes
im a mistake and i know that
reviews don't exist 
Is there a way to check if a Firearm is being reloaded?
event
without looking at the animation state
you probably have to look at the animation state
Ehhh. I'd have to track everything
yeah. I did and SOME firearms have it on layer 0, some on 1, and the name isn't EVER the same. Names include: reload, Reload, unload, load
U r crazy

how does the game now whether you can reload mid animation? like the validation checker doesn't reference this
just out of curiosity
i just closed the solutoin
okay
there should be an IsBusy property on modules
which use IsReloadingOrUnloading
Let me check
I love decompiledSL
AnimatorReloaderModuleBase.ServerProcessCmd
checks the validators, then checks if any modules are busy
shouldn't the labapi FirearmItem.CanReload check for this too then?
(it doesn't rn)
yeah it probably should
should I bug report + suggestion to add Firearm.IsReloading?
ye feel free to do taht
theoretically, are we allowed to PR? cos Firearm.IsReloading shouldn't be too bad
yes ofc
I shouldn't have targeted master should have I?
is there a dev branch?
there is no dev branch so yes you should target master
you or me has no permission to merge
shouldn't it still try to compile it or something?
or do you guys not have that set up
They probably dont have actions since they use internal git
no cus it would need to pull branch & sometimes we work on branches that isnt released
and since the master is protected only a few plp can push into it
I just never saw Mergining is blocked is all.
as david/beryl/ced who can as i think
I forgot but can the person merging the PR change which commits are actually added?
usually squassed
since I kinda did 2 changes where 1 might be unwanted
well worst case someone will tell me to open one with just 1 commit ig
thats up to whoever merging it , im fine with it tbh
is there a way to force player to start using e.g medkit
and also i have seen smth like RightHandIK in thirdperson and is there a way to set players hand to x position
No
Am I going to have to download and learn the Unity Editor in order to figure out NavMeshes cause I'm getting pissed off trying to figure out how to bake them with the API
SL map is generally not compatible with nav meshes
don't use navmeshes 
call UsableItemsController.ServerReceivedStatus
How to check if player is continue shooting without coroutines?
@slate flume
enlighten them 
🐀
I done the translating and config fixing, sorry for being late because I had other projects :)
You generally don't

If you want to reliably check if a player is continuously shooting, the only way is to use a component/coroutine
At least for some weapons
Some weapons work fine, but might fail if you don't compensate for lag
I personally use a five-frame buffer and check if an ActionModule is attached to the current item and if that ActionModule is busy
Then if 3/5 frames are busy, the player is continuously shooting
This means it takes 2 frames to register a shot, and the end of the shooting lags by two frames, but it works
Related follow-up, if anyone knows
How would one prevent a player from shooting
Is there a way to stop client prediction that you will shoot
Cause cancelling the ShootingWeapon event still plays the animation on the client
idk it seems the client tells the server when it starts shooting, as well as when each bullet is fired
so it seems like the denying the Shooting event should stop the client from shooting
I guess if that doesn't work it's not possible (unless you disable the gun or something idk)
It doesn't
At least not last time I tried
I doubt they updated it since then
That's what I'm looking for
The only way I could prevent a client from shooting was fooling it that it has 0 available ammo

I think
no I'm just stupid
you can try ServerSendRejection in AutomaticActionModule though, idk
I've seen servers implement charge rifles
Holding down M1 with an E11
I know it's possible, I just don't know how
There's gotta be a way to block firing for the client
My guess is nothing like that is possible, the client predicts and shoots before the handshake with the server afaik
¯_(ツ)_/¯
I need to figure out how to block primary actions or firing
I'm looking into making a patch rn
But also then would a charge rifle be possible? The server wouldn't get start firing messages
I'm intrigued
maybe SSS, idk
Never
I'm going to bump my original ask because we've talked for so long and had no progress
this?
How do you prevent a player from shooting on the client?
The idea is for a charge rifle, last I checked disallowing Shooting event doesn't cause the client to not shoot, it just prevents the server from registering the shot
You will have to disable it before the player even attempts to shoot
It is not possible to cancel the shooting event on client as it is done so you dont need to wait for your ping to see the effects
he does not have ammo in his gun
or the round is not chamberd
Okay so it's a dry firing thing
You can hear the dry fire sound
yea I could've easily found this for you 😭
Well I didn't know man I was going off memory
I found the clip literally a minute ago
would not chambaring the round work for this?
I would have to assume so, I'll give it a test once I'm home
I told you it was a charge rifle 😭
No shot you have to use SSSS
I thought you were talking like you tried it in person lol
if you said "I saw a clip of a charge rifle" I woulda known
anyways
My bad homie
cuz no SSS
I'm stealing the charge rifle idea cause it's goated
ive seen cooler custom guns stuff
P90?
no
have you ever seen the british gun 
didnt sss had to be used to tell when the mouse 1 is held?
isnt the event only called once when the gun clicks?
true...
it looks like super duper harmony transpiler time if no sss
I love super duper harmony transpiler time
I LOVE TRANSPILERS
i love harmony il code error
Eh.. Thats kinda pizdec (head-hurting) tbh..

<3
<3
The only red thing after some transpiler patching are eyes
i use logger.error instead of logger.debug cuz im too lazy to enable debug in config
true me too
Ngl the only thing i can love are your rats
they are SOOOO CUTEEEE
I could send you my code later if you'd like
YOU
I already have it working and everything, it adds an extension to the Player to check IsShooting boolean
It's me
hello!!!
Hi!
I got custom recoil thing and i think its gonna be too hurtful for server..
How so?
Checking if a player is shooting is not an intensive task
The modules are cached on the firearm so there's no expensive components calls or anything
guys can we perchance get a check on whether the parent of cachedTransform is a network identity here? (cuz without it, if you parent your admin toys to non-net identity game objects, your position sync will be messed up)
can't you just check if they have the component NetworkIdentity?
I got dictionary which updates on player shooting event and i just wanted clear it if player stop shooting. If i will place this extension in event it will create 2 many coroutines i think..
I guess I can transpile that in
not even a need to transpile
a lovely prefix
works too
The extension doesn't create any coroutines
It would replace your need for coroutines
they would do the same exact thing
It allows you to check if a player IsShooting like you do with your current method, except better
Dont u just said that u checking module for 5 frames..?
Yes
It's a component on the player
It caches the last 4 frames (+current) to see if a player is continuously firing
I cache those components and check them when needed
No coroutines
Oh.. I get it now.. im just kinda dizzy rn cause it 3am and cant really focus
gn hope a rat hugs you
we all love rats

here's the patch I cooked up for anyone curious:
[HarmonyPatch]
public class UpdatePositionServerImprovement
{
private static readonly HashSet<AdminToyBase> HasNetParent = [];
[HarmonyPatch(typeof(AdminToyBase), nameof(AdminToyBase.UpdatePositionServer))]
public static bool Prefix(AdminToyBase __instance)
{
Transform cachedTransform = __instance.CachedTransform;
Vector3 pos;
Quaternion rot;
if (HasNetParent.Contains(__instance))
cachedTransform.GetLocalPositionAndRotation(out pos, out rot);
else
cachedTransform.GetPositionAndRotation(out pos, out rot);
__instance.NetworkPosition = pos;
__instance.NetworkRotation = rot;
__instance.NetworkScale = cachedTransform.localScale;
return false;
}
[HarmonyPatch(typeof(AdminToyBase), nameof(AdminToyBase.ServerParentId))]
public static void Postfix(AdminToyBase __instance, uint __result)
{
if (__result != 0)
HasNetParent.Add(__instance);
else
HasNetParent.Remove(__instance);
}
}
why no trasnpiler?
too lazy
im kidding
it would probably take twice this long
or maybe more
and more thinking
hey isnt this literally the same as a List<int> because it's a reference type?
It is not
Ref is kinda a pointer wrapper in c#
What's the alternative
Passing ref List<int> into a method and then assigning it to another list will change the original one aswell
I know pathfinding is possible, I'm just hoping I don't have to make a manual grid/nodes
custom solution, or astar
map isnt built for automated navigation mesh generation
Barotrauma-ish solution would be the best
navmesh can work, i did it before
but it requires knowing exactly how navmesh work so you know what parameters for generation to tweak
with predefined paths for each room
and then also doing a bunch of workarounds for rooms that have some collider navmesh doesnt like
I got NavMeshes to work for 80% of the facility
Took a lot of tweaking and some filtering
Afaik if you want to use navmesh
you gotta scale down the agents
A lot
There is thread in NWAPI discord somewhere 
iirc i ended up patching some unity method to change agent settings
Luckily I'm still in that
as you couldnt do it at runtime
and some agent size changing (not the object, but the setting)
So is the best method repurposing navmesh or should I make my own system
well, idk if you have this issue
but i had an issue where some classes were somehow unable to move through doors (except 173)
but im not sure if this is even navmesh related or not
Depends what you want to do
Do you want complex NPCs that can use doors and elevators and such?
or just temporary path finding
Yes
Generally speaking
tbf this you can just achieve with either navmesh or point based pathfinding
cuz itd be separate from the actual navigation
if you can get an NPC to move from A to B then thats already a lot of the work done
fair
^
elevator/door logic you'd just do using some kind of statemachine
eg move to elevator, call it, wait, go inside, etc
I mean so far for doors I've just been raycasting and if it's in the way, open and delay
yeah thats what i did
It's worked fine enough so far
just see whats infront of the npc and do something with it
Sounds good
But I need to figure out the actual pathfinding for NPCs
NavMeshes almost worked but fail in like 50% of heavy, and some other misc rooms
but movement is tricky
navmesh is simple but it only works in a specific part and idk how to make that work, ididnt bother figuring it out as i got distracted with other projects
its hard to make navmesh work as its typically designed to be used in the editor where you can.. change the objects and such
I mean I could wing it with my own system but that might take a while
If that's the best option tho I don't mind doing it
so you could either try to export the rooms and spin up a unity project, and use the visual tools unity gives you to see what the issues are, and try some navmesh component tools or manual collider creation to fix issues with it
or just map out a grid of dots in each room, and pathfind between these dots
Generally what I remember what were the issues:
- Ignore doors during baking
- Make agent scale much smaller as otherwise they wont be able to walk through doors
- Somehow get rid of the inactive room connectors in HCZ as all of them are accounted into the navmesh
Probably the latter tbh I never want to install Unity Editor
theres some colliders in the game it didnt like too
I solved all those problems with manual baking instead of CollectSources
navmesh actually sees colliders set as trigger but on the default layer as obstacle
atleast from when i used it on a different project
I collected sources manually so this wasn't a problem for me
yeah that works
i think you might be able to dynamically build the navigation grid some way
(or you want to place them throught rooms lol)
but multifloor rooms may be more complicated
I pretty much solved every problem by carefully choosing colliders/meshes
Got essentially all of LCZ working
The problem is that no matter what settings or tweaks I made, it didn't work in every room
My tests failed in about 1/5 of rooms
What tests
I test every room to see if it has a proper NavMesh
I summon points and see if it detects a navmesh within a certain distance
Worked 100% of the time for me to detect if a room was broken or not
Broken as like its a seperate area they cant walk into or..
Broken as in you can't pathfind in that room
Oh well
As in the navmesh doesn't work or didn't bake properly
Because the points can't find a navmesh in the room
The test isn't that complicated but it tells you all you need to know
This is it
It means the navmesh is broken
Idk how else I'm supposed to state it
Doesn't detect navmesh = broken
Yeah man I get it now
tbh idk why navmesh was broken in some rooms
the only way to actually find it is putting the room into the unity editor with the navmesh tools on it, so you can actually use the navmesh tools 
Fire
Yeah, that's what I feared
Thanks for your guys' help
I'll look into some alternatives later
I've implemented A* before, the hard part is just going to be getting the data for it
easiest may be something like a* (point based nav) yeah
getting the data, idk tbh
maybe try getting the names of all the floor colliders and use that 
but that doenst solve multifloored rooms
Worst comes to worse. I've got some items I use to log position data, so I can repurpose that to make manual pathing
i mean what you could do is generate each point automatically and just "remove" all the invalid dots and save the rest
but that seems tedious outside of unity
unless you wanna go around the game shooting primitives with a "toolgun"
I'm not afraid of a little manual labor
I'll probably be doing some combination manual and automatic systems
Like getting a basic path for a room and then just deviating off of that path to get to different areas
That kind of thing
@hearty shard
is there any reason why BoxCollider OnTrigger thingy can work perfectly on PrimitiveType.Plane primitive but at the same time not work at all on PrimitiveType.Cube one
How do I make a player shit their pants?
Spawn a trantum on their position
you could use the brown candy prefab
Isn't that available or shown only at holidays
Guh.
i think nw needs to hire janitors
@restive turret you
Ur a janitor now
Get to mopping
Nuh uh
I think even peanut snow shit is in the netserver prefabd
🔥
though the effect is non existent so it does nothing
What the fuck
rainbow tower :)
cause its the prismatic cloud prefab
Damn I'll have to go through the prefabs sometime that is mad cool
PrismaticCloud
SnowPoop – TantrumObj
TantrumObj (Brown Candy)
those are the holiday exclusive ones that are still in the game year round
do I win weirdest bug of the year for this? https://github.com/northwood-studios/LabAPI/issues/360
that would be insanely inefficient
we could use the OnTransformParentChanged unity event though
Add an instance bool that’s set by the parent thing
That’s what I basically did with my patches
probably involves some animator BS
it could be easily solved by removing waypoints

lets remove the problem from the core
nah i meant like waypoint toys
Is there any way to reduce the time in ObjectiveCompletionMessage?
wdym by reduce the time?
and btw you cannot create your own
they need to be synced to the client
This is actually true
Wow I forgot I was scrolling through old chat logs
My bad
That's like 3 months old
lol
I want to reduce the time this is displayed, but that’s impossible, right?
its impossible handled client side
the only thing the server sends is an Int related to the index of that message
Yeah you can
We Objective completing event
With setters
Oh
Time it displays
Nop not that
Though you mean time it reduces
yes
btw you cannot create them even if you wanted
to change the text
the ObjectiveCompleteMessage has just an Index
yea
btw david
how is the skybox handled?
like the skybox is a Fogtype?
or just a dome
You can but you need to fake sending three wrong one to display
The sphere
oh thats so sad
it would've been cool asf
to have a skybox effect or something
the great void on atoh makes me sad
You can in server but for client you need to send the one that is already existing
yea thats what im saying
crazy place for skiing
i have a crazy question
nah nvm
i forgot mirror is safe asf and wouldn't allow for something like that
(un)fortunately it doesn't allow you to overthrow the governmeownt
nah i wanted to make something crazy
i wanted to make that when it sends the message for redirecting
then the client would send back a message where it said like "plz teleport to this"
and internally on the server handled
for doing something specific like a sort of additional message
Sorry to bother you but what does your SerializeObject function look like?
static ArraySegment<byte> SerializeObject(NetworkBehaviour nb, Action<NetworkWriter> syncvarSerialize)
{
using (NetworkWriterPooled writer = NetworkWriterPool.Get())
{
ulong objectDirtyBit = 0;
ulong behaviorBit = 1UL << (nb.ComponentIndex & 31);
objectDirtyBit |= behaviorBit;
if (objectDirtyBit != 0)
Compression.CompressVarUInt(writer, objectDirtyBit);
using (NetworkWriterPooled writerTemp = NetworkWriterPool.Get())
{
SerializeComponent(writerTemp, nb, syncvarSerialize);
ArraySegment<byte> segment = writerTemp.ToArraySegment();
writer.WriteBytes(segment.Array, segment.Offset, segment.Count);
}
return writer.ToArraySegment();
}
}
static void SerializeComponent(NetworkWriter writer, NetworkBehaviour nb, Action<NetworkWriter> syncvarSerialize)
{
int headerPosition = writer.Position;
writer.WriteByte(0);
int contentPosition = writer.Position;
try
{
writer.WriteULong(0);
syncvarSerialize?.Invoke(writer);
}
catch (Exception e)
{
Logger.Error($"OnSerialize failed\n{e}");
}
int endPosition = writer.Position;
writer.Position = headerPosition;
int size = endPosition - contentPosition;
byte safety = (byte)(size & 0xFF);
writer.WriteByte(safety);
writer.Position = endPosition;
}```
this could have serious issues bc you're returning a pooled writer's data
Using keyword should generate a Dispose call the end of it
yes, the problem is that they're using data from a writer that's been disposed
so if I change it to return the writer and dispose afterwards?
can we normalise not returning pooled classes
^^^^^^^^^
same thing
you should send the data before the writer is disposed
what really happens it wont get GC but only after send is done
that's what I meant
pooled writers will never get GCd btw
idk wheres issue when Im creating new ToArraySegment from it soo networkWritePool is returned to pool
ToArraySegment just references the backing array
so mirror named it wrong
it should be AsArraySegment cuz it's not creating a copy
public static void SendTextToyRotation(this TextToy toy, Player player, Quaternion rotation)
{
var pooledWriter = ObjectSerializer.SerializeObject(toy.Base, (writer) =>
{
// Dirty Bit
// Rotation = 2
ulong dirtyBit = 2;
writer.WriteULong(dirtyBit);
writer.WriteQuaternion(rotation);
});
var message = new EntityStateMessage()
{
netId = toy.Base.netId,
payload = pooledWriter.ToArraySegment()
};
player.Connection.Send(message);
pooledWriter.Dispose();
}
/// <summary>
/// All credit for this method goes to Killers0998.
/// </summary>
public static NetworkWriterPooled SerializeObject(NetworkBehaviour nb, Action<NetworkWriter> syncvarSerialize)
{
NetworkWriterPooled writer = NetworkWriterPool.Get();
ulong objectDirtyBit = 0;
ulong behaviorBit = 1UL << (nb.ComponentIndex & 31);
objectDirtyBit |= behaviorBit;
if (objectDirtyBit != 0)
Compression.CompressVarUInt(writer, objectDirtyBit);
using (NetworkWriterPooled writerTemp = NetworkWriterPool.Get())
{
SerializeComponent(writerTemp, nb, syncvarSerialize);
ArraySegment<byte> segment = writerTemp.ToArraySegment();
writer.WriteBytes(segment.Array, segment.Offset, segment.Count);
}
return writer;
}
no need for dispose, use the using keyword
alr ig
but yeah other than that it looks fine
PlayerItemUsageEffectsApplyingEventArgs ev.IsAllowed = false;does not work for adrenaline / painkillers
throw it into a gh issue if it doesn't exist already
How can i bypass the Idle mode for a specific coroutine
Just turn idle mode off 
nuh uh
FixedUpdate
or RealtimeUpdate
(the segment to run the coroutine in)
I have a fix for you
That I think I posted earlier
Okay never mind I might not have posted it
The problem is that ItemUsageEffectsApplying event is in the wrong place
I made some harmony transpilers to move it
[HarmonyPatch]
public class MigrateItemUsageEffectsApplying
{
[HarmonyPatch(typeof(UsableItemsController), nameof(UsableItemsController.Update))]
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
var codeMatcher = new CodeMatcher(instructions, generator);
codeMatcher.MatchStartForward(CodeMatch.WithOpcodes([OpCodes.Newobj], typeof(PlayerItemUsageEffectsApplyingEventArgs).GetConstructor([typeof(ReferenceHub), typeof(UsableItem)])))
.MatchStartBackwards(CodeMatch.Calls(typeof(KeyValuePair<ReferenceHub, PlayerHandler>).PropertyGetter("Key")))
.Advance(-1);
int start = codeMatcher.Pos;
codeMatcher.MatchStartForward(CodeMatch.Calls(typeof(UsableItem).Method(nameof(UsableItem.ServerOnUsingCompleted))))
.Advance(-2)
.RemoveInstructionsInRange(start, codeMatcher.Pos - 1);
return codeMatcher.Instructions();
}
[HarmonyPatch(typeof(Consumable), nameof(Consumable.ActivateEffects))]
public static bool Prefix(Consumable __instance)
{
PlayerItemUsageEffectsApplyingEventArgs ev = new PlayerItemUsageEffectsApplyingEventArgs(__instance.Owner, __instance);
LabApi.Events.Handlers.PlayerEvents.OnItemUsageEffectsApplying(ev);
if (ev.IsAllowed) return true;
__instance._alreadyActivated = true;
return false;
}
}
Paste this somewhere in your codebase and it'll be working again
It kind of really sucks, it's not how I normally make transpilers, but I was losing my mind when I had to make this
Iirc it was literally the third LabAPI event I had to make a patch for that day
The gist of it is some shit about how the UsableItemsController is what is responsible for items completing their effect, but some items already have extra code that run for detection (e.g. if you holster the item and the effects haven't been applied, apply the effects)
I moved the event to the actual application of effects for Consumables (as it should be) and I've had no issues since
If you encounter a problem with that code lmk cause I'd want to fix my stuff too
heartbeatHandle = Timing.RunCoroutine(HeartbeatLoop(), Segment.FixedUpdate);
tbh i did this but nope
mods
can we pin this guy
i mean
that guy
just fix it atp
wait 5 years
and then it will be done

btw the #triangleupdate movement is growing
I kept having consumable custom items where, if interrupted, they would give the base effects and not the custom effects I wanted
I went down a rabbit hole and figured all this stuff out as a result
It's really some odd stuff, and I'm not sure why it wasn't implemented like this in the first place
Like I had painkillers that make you blow up and they would get used, 3114 would strangle the player right before it ends, and it would cause the base painkillers to work and not the explosion
@upper vapor btw the Segment.UpdateFix doesn't work
Timing.RunCoroutine(HeartbeatLoop(), Segment.FixedUpdate);
still gets lowered
Fix it 
Im not disabling the idle mode
try RealtimeUpdate
yeah it'll probably take a bunch of time for the fix to get released
i have no idea when the next patch comes out
Wait it's a problem with IdleMode?
yea
Didn't Paisley come out with a plugin fixing that?
just fucking restart
im pretty sure
if 7779 says Status
im crying
YESSS
IT SAID IT
what version of harmony are you using?
yea it was really annoying to fix this for exiled too 😭
there were even plugins that wanted the old functionality of being able to skip the Exiled UsedItem event by holstering an item so I had to add a bool to the event args to indicate what called the event



