#plugins-dev-chat

1 messages · Page 142 of 1

subtle ravine
#

Easier to ask her @icy knoll

cyan crown
#

anyways CCM script is already 2000 lines

#

i'm not refactoring that shit😼

upper vapor
unique crane
#

I cant wait to incinerate children players in the new hcz room

icy knoll
#

i never outed myself as a trial until david said smth

celest thorn
#

and kids

#

on SL

subtle ravine
celest thorn
#

SO WE CAN DROP KICK CHILDREN

upper vapor
#

just

#

player.Scale = Vector3.one * 0.5f

cyan crown
#

this looks so cool

unique crane
#

for the cake scp

#

Then you can throw them in

upper vapor
#

too much waiting

cyan crown
#

i hope they used it for nuke room since 096 can fall ofc and his fall looks static :'(

cyan crown
#

eww AI gif

#

blocked

celest thorn
#

look how satisfying it is

upper vapor
#

what ai gif

hearty shard
upper vapor
#

"eww ai gif"
-# -the ai bro himself

subtle ravine
#

Cant wait to jump in the lava as 049-2

celest thorn
restive turret
hearty shard
cyan crown
#

woah wtf

upper vapor
unique crane
#

TRUE

upper vapor
#

offical source

unique crane
#

My friend keeps sending me SL tiktok leaks

cyan crown
#

yeah that shit is 100% AI you can't brainwash me RAHHH

upper vapor
#

i hate tiktok but like

unique crane
#

to like report them

upper vapor
#

this is literally from her

celest thorn
upper vapor
#

😭😭

cyan crown
upper vapor
celest thorn
upper vapor
#

can we

#

not

unique crane
#

😐

#

What

celest thorn
#

Because it was like wtf???

subtle ravine
#

You what

celest thorn
#

its NW official tiktok account?

#

or what

unique crane
#

NW doesnt have official tiktok

restive turret
#

there is no official tiktok acc

subtle ravine
celest thorn
upper vapor
#

"bro this shit is so disgusting now i gotta share it with the marketing manager"

celest thorn
#

but else i would've thought that was official

subtle ravine
#

Ppl

celest thorn
#

like

unique crane
celest thorn
#

good number of following

#

big videos

#

normal videos

#

until that

cyan crown
#

chat is this correct?

upper vapor
idle depot
cyan crown
#

oh shit dino is typing

#

i'm getting banned :'(

celest thorn
celest thorn
upper vapor
celest thorn
#

the reaction was tho confused

idle depot
celest thorn
#

by both of us

#

so

cyan crown
celest thorn
#

the video i hope is now down

restive turret
#

tiktok is slow af

upper vapor
#

you don't have to post about it in this channel or any channel though 😭

restive turret
#

with the reports and impersonation

upper vapor
#

"i don't think i just post" ahh

#

hello slejm

#

perfect timing

restive turret
#

known by most people in YT did it and waited more and more time

celest thorn
upper vapor
celest thorn
#

from now

#

lol

#

i hope it was taken down

upper vapor
#

that's not a reason to tell everyone about it 😭😭

restive turret
cyan crown
#

so many gameobjects

#

so spooky

unique crane
#

Man I told you already

#

thats NOT unity

cyan crown
#

if it was unity it wouldn't work

upper vapor
#

"some very bad thing happened x years ago or something, therefore it's safe to post about it"

cyan crown
unique crane
#

Its multithreaded custom engine in cpp

celest thorn
#

something else

unique crane
#

Which is like crazy

celest thorn
#

that maybe shouldn't be told

cyan crown
upper vapor
upper vapor
unique crane
#

Here is the code btw

celest thorn
cyan crown
#

if only unity was open source

cyan crown
#

👻

upper vapor
celest thorn
restive turret
restive turret
cyan crown
#

anyways i'm gonna use bools instead of enums

unique crane
celest thorn
cyan crown
#

and i'll spam around 50k if statements

celest thorn
#

wait

cyan crown
celest thorn
#

make a super state with enums

upper vapor
#

use strings

subtle ravine
restive turret
#

use objects

celest thorn
#

like

upper vapor
#

use threads to represent state

celest thorn
#

guys lets make a super computer in SL

celest thorn
unique crane
#

Make SL in C# in computer in redstone in minecraft

sinful bronze
#

5 mins

upper vapor
#

@MattBatWings

subtle ravine
#

I still don't know how did they Minecraft or chatgpt with redstone

#

Like how tf do blocks can do that

unique crane
#

you just do the computer again

#

from wires

#

to circuits

#

to bits

#

to bytes

#

to instructions

subtle ravine
#

He's either a genius or some insane level of autism

#

That's a compliment tho

restive turret
#

to circuits

unique crane
#

No I mean im sure its just copied PC structure

cyan crown
#

this is the animator i made for 096

#

any feedback on it

subtle ravine
restive turret
#

StartingRage, StartedRage, Raging StoppingRage, StoppedRage, StartingDocile, StartedDocile, Docile, StoppingDocile, StoppedDocile

upper vapor
cyan crown
upper vapor
#

other than that, approved

#

transition conditions

#

?

subtle ravine
cyan crown
#

Docile to Start Rage

#

Start rage to Rage

#

Rage to end rage

#

End Rage to Docile

upper vapor
#

wait why do we even have a rage bool param

cyan crown
#

Rage and docile are blend tree's

subtle ravine
#

True or false

upper vapor
#

it should transition from startrage to rage automatically, no?

#

ah

cyan crown
#

i haven't wrote the code for them yet i'm just checking if this is correct for now

upper vapor
#

do you want the code to control the rage transition duration or do you want the animator to control it

cyan crown
#

SCP 106 animator is so easy

subtle ravine
#

I'm sure someone will actually think that it's SCP SL code

cyan crown
upper vapor
# cyan crown code

but then you must sync the animation duration in the code
actually you might just be able to inspect the current time lmfao

subtle ravine
#

Translator team doing coding

#

World is healing

upper vapor
#

think't

cyan crown
subtle ravine
#

Marketing next

upper vapor
cyan crown
#

😿 noooo david

unique crane
#

fate worse than death

#

Translation team

subtle ravine
upper vapor
#

Wien Hauptbahnhof

upper vapor
#

yeah

cyan crown
#

i'll check it out and see if it works since i have to make a lot of other systems for 096

#

for now i don't know how will i do his face detection :'(

unique crane
#

Funnily enough

subtle ravine
#

Bro making SCP clone instead his own game

unique crane
#

nothing in german is Null

celest thorn
subtle ravine
celest thorn
cyan crown
#

i'm thinking of using a sphere collider that is inside of mesh of 096 the mesh collider includes the layer "Detection" making it 2 colliders inside of each other

subtle ravine
cyan crown
subtle ravine
#

Insane hitbox

cyan crown
#

fuck it if you see 096 ass you see his face

celest thorn
subtle ravine
celest thorn
celest thorn
#

sorry looked too good

cyan crown
#

hopefully this shit works

subtle ravine
celest thorn
#

im gonna steal your dog too

cyan crown
#

i don't have a pet

celest thorn
cyan crown
#

yeah

celest thorn
#

im inside your walls

subtle ravine
cyan crown
#

thanks hacker i didn't know🥰

celest thorn
upper vapor
celest thorn
subtle ravine
#

That's a fun dog

#

I wanna have one like that

celest thorn
#

with that thing

subtle ravine
#

:((

cyan crown
#

that's alex dog

subtle ravine
#

I don't have any animals

celest thorn
#

you meant

cyan crown
#

yeah

subtle ravine
#

Wait what

cyan crown
#

not you alex bruh

#

💀

subtle ravine
#

Bro called me a dog

celest thorn
cyan crown
tepid sluice
#

cat cat

cyan crown
#

i can't model

#

or animate

subtle ravine
#

Borrow from internet

cyan crown
#

wouldn't fit the art style

tepid sluice
#

steal

subtle ravine
cyan crown
cyan crown
#

i don't want to add a cat to this danger ass facility

upper vapor
subtle ravine
#

Immortal cat

cyan crown
#

if you mode the game i'll steal your scpsl

upper vapor
#

i thought we were talking about 3D modeling

cyan crown
#

it was a joke vro

#

😿

cyan crown
#

i don't know

tepid sluice
#

gg chat

celest thorn
tepid sluice
#

:3

celest thorn
#

:3

#

i love being cute :3

tepid sluice
#

cute kitty cute

celest thorn
tepid sluice
#

y not

hearty shard
#

spooks

celest thorn
cyan crown
#

:3

cyan crown
#

Im losing it

#

096 is insane

upper vapor
cyan crown
#

Im blocking you vro

#

😾

tepid sluice
#

096 just wanted a hug

upper vapor
celest thorn
cyan crown
#

:3

celest thorn
#

:3

#

we all love the ":3"

cyan crown
upper vapor
#

ε:

tepid sluice
#

ε:

celest thorn
#

:3

#

idk why this is even a gif

#

lol

bright vine
#

but how/whats the method?

celest thorn
bright vine
#

Friendly fire between scps

#

Supposedly he found a working method

hearty shard
#

it shouldnt work

upper vapor
#

hurting event

#

oh like

#

for scps

hearty shard
upper vapor
#

uhhhhh

celest thorn
#

hmmm

upper vapor
#

yeah that's cooked

hearty shard
#

yea

upper vapor
#

939 in 939clawability i guess

hearty shard
#

u cant really without fake syncing

bright vine
hearty shard
#

then 939

#

and 3114

bright vine
#

so i need to fakesync and then enable fullfriendlyfireforce?

#

is that how it’s done

hearty shard
#

you can for 939 do it differentlyt

#

for other scps you have to fake them as not scp

#

uhhhh

#

ok it isnt as easy as i thought

bright vine
#

sob

hearty shard
#

client does the check too for it, but you can at least check for them clawing and then handle it urself

bright vine
#

So

#

Does this mean I have to like

hearty shard
#

harmny patch!!

bright vine
#

Implement the hitbox for claw so it can register hits on scps

hearty shard
#

harmony patching is prob needed here

royal mica
#

I love Transpiler and I live for it

#

especially when it just randomly stops the code

#

Wait am I correct that this just, returns false?!

    IL_012F: br =>      Label21
    IL_0134: ldc.i4.0
    IL_0135: Label21
    IL_0135: stloc.s    14 (ReferenceHub)
    IL_0137: ldloc.s    14 (ReferenceHub)
    IL_0139: brfalse => Label22
upper vapor
#

um no

#

can you show the full IL

royal mica
#

something utterly fucking volán is going on

upper vapor
#

huh

#

what are you waffling about

#

there is no kormány toomuchtrolling

royal mica
#

How tf does

            // if (!ScpsToSpawn.Contains(allHub2) && RoleAssigner.CheckPlayer(allHub2))
            IL_00df: ldsfld class [mscorlib]System.Collections.Generic.List`1<class ReferenceHub> PlayerRoles.RoleAssign.ScpPlayerPicker::ScpsToSpawn
            IL_00e4: ldloc.s 7
            IL_00e6: callvirt instance bool class [mscorlib]System.Collections.Generic.List`1<class ReferenceHub>::Contains(!0)
            IL_00eb: brtrue.s IL_013f

            IL_00ed: ldloc.s 7
            IL_00ef: call bool PlayerRoles.RoleAssign.RoleAssigner::CheckPlayer(class ReferenceHub)
            IL_00f4: brfalse.s IL_013f

become

           // if (!ScpsToSpawn.Contains(allHub2) && RoleAssigner.CheckPlayer(allHub2) && !PlayerDataStore.CanSpawnAsScpCheaterCheck(allHub2))
           IL_0126: nop
           IL_0127: ldsfld class [mscorlib]System.Collections.Generic.List`1<class ['Assembly-CSharp']ReferenceHub> PlayerRoles.RoleAssign.ScpPlayerPicker2::ScpsToSpawn
           IL_012c: ldloc.s 14
           IL_012e: callvirt instance bool class [mscorlib]System.Collections.Generic.List`1<class ['Assembly-CSharp']ReferenceHub>::Contains(!0)
           IL_0133: brtrue.s IL_013e

           IL_0135: ldloc.s 14
           IL_0137: call bool ['Assembly-CSharp']PlayerRoles.RoleAssign.RoleAssigner::CheckPlayer(class ['Assembly-CSharp']ReferenceHub)
           IL_013c: br.s IL_013f

           // (no C# code)
           IL_013e: ldc.i4.0

           IL_013f: stloc.s 15
           IL_0141: ldloc.s 15
           IL_0143: brfalse.s IL_01a7

           IL_0145: nop
           IL_0146: ldloc.s 14
#

above original
bottom is my recompile

#

same class copied

#

Tryin to patch the SCP Picker stuff

#

and im encountering very strange issues

upper vapor
#

you stloc and ldloc what

royal mica
#

no fucking idea

#

I did not add that

#

my best guess 15 is Refhub?

#

[15] bool, Wha

#

its fucking bool now?!

upper vapor
#

i think you might have brainfarted me

slate flume
hearty shard
#

how would you get 049 to attack team

slate flume
hearty shard
#

you sure

slate flume
hearty shard
#

cuz wheres the client side patch

slate flume
#

Like 3114 strangle doesn't work

hearty shard
#

049 shouldnt either

upper vapor
#

erm

slate flume
#

Pretty sure it does

upper vapor
#

target checking is server-only

#

for 049

slate flume
#

Told you

hearty shard
#

since when

upper vapor
#

last time i checked you couldn't

#

-# last time was probably years ago

slate flume
#

😁

#

Some things won't work until NW makes it use server validation
Like even with friendly fire on, I'm pretty sure SCPs can't attack each other

hearty shard
#

correct

#

you need to handle it urself

#

used to be an exiled bug that you could

#

14.x ig changed it to be server side validation tho

slate flume
#

I love being right all the time

burnt hearth
upper vapor
feral haven
wanton turtle
#

i once had a bug

#

it was a spider

#

killed it with a paper towel

feral haven
#

I don't use exiled

hearty shard
#

it was a known bug that i fixed

#

oh you broke smth urself then

feral haven
#

I never have and never will

hearty shard
#

💀

feral haven
#

Which had Custom Teams and Factions

hollow pewter
#

is it possible to make a held or dropped radio not make sound?

#

when others are talking

feral haven
#

Audio = 0

upper vapor
feral haven
#

Though, ig you could make it not send the VoiceChat msg

upper vapor
hollow pewter
hollow pewter
slate flume
#

Or something like that

#

It's a LabAPI event

#

Then check ev.Message.Channel == VoiceChatChannel.Radio

#

Or whatever else you wanna check for

feral haven
hollow pewter
#

others that don't have a radio

#

since you can hear what others are saying when the radio is dropped or held

upper vapor
#

that might be client-side

#

i guess you can turn off the radio

#

on the ground

hollow pewter
#

ig ReceivingVoiceMessage might work?

#

i'll try

upper vapor
#

that's not gonna hel,p

feral haven
feral haven
# hollow pewter i'll try
public override void OnPlayerDroppedItem(PlayerDroppedItemEventArgs ev)
{
    if (ev.Pickup is not RadioPickup radio)
    {
        return;
    }

    radio.IsEnabled = false;
}

Put this in a Custom Event Handler and register it to the CustomHandlerManager, then radios on the ground shouldn't be able to give out player sounds anymore

upper vapor
#

erm

#

it should be

#

PlayerDropedpItem

royal mica
#

That fucking thumbsup emote

upper vapor
#

from biológiai elszigetelés

bright vine
#

this method is a bit.. Unpopular

#

im gonna kill myself

#

WTF

#

THE FUCK AM I MEANT TO DO WITH HITBOXIDENTIFY.ISENEMY LOL

hearty shard
slate flume
#

Patching HitboxIdentity.IsEnemy will get you effectively 90% functionality

bright vine
#

90% functionality?

#

What could that 10% BE

slate flume
#

Which means there's no way to get them to work until SL makes it server validated

restive turret
#

patch deez

bright vine
#

by editing the client

slate flume
#

You can't make client mods

bright vine
#

the 3114 strangle

restive turret
#

"editing the client" lel good luck

bright vine
#

im confused, i have a mod that disables 3114 strangl

#

strangle

slate flume
#

You can't allow friendly fire for 3114 strangle

#

There's a difference

bright vine
#

ohh you mean that

#

i see

#

so client validation in terms of friendly fire is not possible

#

but server wise? that applies to most scps like 939, i assume?

slate flume
#

If something is client-sided, we can't touch it

#

Period

restive turret
#

There is so much stuff client sided

slate flume
#

For everything

#

SCP-3114 strangle is client-sided

#

So we can't touch it

slate flume
bright vine
#

i see thank you again

slate flume
#

Just a few things like 3114 strangle don't because they're not run through the server

#

We can prevent a person from strangling, but can't register enemies that the client doesn't think are enemies

restive turret
#

Same for cuffing

#

You cannot cuff same class

#

(team)

slate flume
#

What this guy said this

bright vine
#

Harmony patches

#

These are the ones im pretty unexperienced so im going to try anyway

hearty shard
#

skibidi

bright vine
#

LOL

#

IT WORKED

#

THANK YOU SO MUCH @slate flume

#

AND @hearty shard

#

im gonna be real here i used chatgpt because i literally didnt know what to do with hitboxidentify

#

i dont have any info about that

bright vine
#

the lunge ability doesnt work on teammates

slate flume
bright vine
#

its just this

    [HarmonyPatch(typeof(HitboxIdentity), nameof(HitboxIdentity.IsEnemy), new Type[] { typeof(ReferenceHub), typeof(ReferenceHub) })]
    internal class FriendlyFire
    {
        static void Postfix(ReferenceHub attacker, ReferenceHub victim, ref bool __result)
        {
           if (attacker.roleManager.CurrentRole.RoleTypeId == RoleTypeId.Scp939)
            {
                __result = true;
            }
        }
    }```
bright vine
#

what am i supposed to be patching

slate flume
#
[HarmonyPatch(typeof(HitboxIdentity), nameof(HitboxIdentity.IsEnemy), [ typeof(Team), typeof(Team) ])]
internal class FriendlyFire
{
    static void Postfix(Team attackerTeam, Team victimTeam, ref bool __result)
    {
        if (attackerTeam is Team.SCPs)
            __result = true;
    }
}
bright vine
#

ohh

#

so simpler and more optimized

#

thank you

slate flume
#

And not the ReferenceHub version

#

Lunge still might not work

#

But you might be able to fix that in a really round-about jank way

#

Which is by spawning an dummy with Fade 255 and attributing lunge damage from the dummy back to the hit SCP

bright vine
#

yeah i wont do that

#

no worries

slate flume
#

I love this gif

#

So happy I stole it

bright vine
#

so

#

when attacking another 049

#

your game is forced to disconnecvt

#

and their hp becomes 0

#

LOL

#

it seems like 173 can't attack either

#

but it does get obsreved

hearty shard
#

Observe is server sided

#

attack team check is client afaik

bright vine
#

when attacking as 3114, you also get kicked

slate flume
bright vine
#

it just forces the disconnection

#

the damage does get registered

hearty shard
#

ya but logs

#

client and server

bright vine
#

in the server i dont see any logs

hearty shard
#

LocalAdminLogs and player.log

bright vine
#

where is player.log located?

hearty shard
#

idk

bright vine
#

😭

hearty shard
#

LocalLow/Northwood or smth

restive turret
#

log.bat

#

Guh

bright vine
#

so it seems like these one work fully:

  • SCP-049-2
  • SCP-096
  • SCP-939
    • Amnestic Cloud gives you the screen effect, so only visually
    • Lunging does not work, will just go through them

partially working:

  • SCP-173
    • No snapping, but you do get observed

not working:

  • SCP-106
    • Still doesn't work with the traumatized effect

hitting scps will get you kicked:

  • SCP-3114
  • SCP-049
    • Only when you do the second attack (the instant kill)
#

this was interesting

slate flume
#

Well I haven't tested all of them

#

But I have 3114 hitting other SCPs just fine in my plugin

slate flume
#

Yep

bright vine
#

when did you test the 3114 part?

#

maybe it got changed recently

slate flume
bright vine
#

Oh wow

#

That’s very recent yes

slate flume
#

I use it for a custom item and I was testing how it was working with another role

bright vine
#

ill rerun the server maybe it’ll magically be fixed

slate flume
bright vine
#

Um

#

I didn’t know you weren’t supposed to have that

#

i do have other code doing that

#

ill disable them momentarily

slate flume
#

Even if you enabled it through patches or otherwise

#

Because the FF detector uses its own methods

bright vine
#

its disabled by default right

slate flume
#

I don't think so

bright vine
#

Oh.

slate flume
#

You'll have to check the gameplay config

#

You shouldn't be getting kicked for any of these

#

I prob can hop on a private server and test in a bit

restive turret
#

Check your logs why are you kicked

bright vine
#

this is what it looks like

#

(the server is very much alive and i rejoined each time i got kicked from hitting as 3114 or 049's second attack)

#

and if you do get kicked, the health would be.. Bugged (its literally at 0)

#

but if u hit him as any working scps then he just dies immediately

#

Bc yk the health is 0

slate flume
#

049 second attack doesn't work

#

And @bright vine you really gotta check LocalAdminLogs for this stuff cause I immediately found out why 049 attack doesn't work

#

SCP 3114 attack works unless it kills an SCP

#

I might have a fix for that

#

For both actually

slate flume
#

096 also kicks on kill

bright vine
#

ohh

#

i did not read that one

slate flume
bright vine
#

oh no i know i checked the log

#

i meant to say that i didn't see that one until you pointed it out

slate flume
#

Oh

#

Gotcha

bright vine
#

i'm blind 😭 sorry, i even searched for tags like "disconnection", "kick", "remove", etc...

slate flume
#

Lmao all good

bright vine
#

im sure this can be fixed

slate flume
#

I already fixed it

bright vine
#

we just need to put that ragument in

#

argument

#

Oh.

slate flume
#

I'm just fixing other stuff

bright vine
#

right so what shou

slate flume
#

I'm gonna fix some of the other things before I send it over

#

I wanna challenge myself a bit

bright vine
#

wait theres more stuff broken?

#

oh right i sent the list

slate flume
#

I wanna see if I can get 106 working

#

Time to add harmony patches to 106 attacks just for logging

#

So 106 attack must be validated client side cause it makes no calls to ServerProcessCmd

bright vine
#

ah

slate flume
#

Eh whatever

#

Tough break

bright vine
#

Well yeah you wanted a challenge

slate flume
#
private static readonly Regex GrabNumbersRegex = new(@"\d+", RegexOptions.Compiled);
private static string GrabNumbers(string role) => GrabNumbersRegex.Match(role).Value;
private static string SpaceNumbers(string numbers) => string.Join(' ', numbers.ToCharArray());
[HarmonyPrefix]
[HarmonyPatch(typeof(NineTailedFoxAnnouncer), nameof(NineTailedFoxAnnouncer.AnnounceScpTermination))]
public static bool FixDisconnectBug(ReferenceHub scp, DamageHandlerBase hit)
{
  if (hit.CassieDeathAnnouncement.SubtitleParts != null || hit is not AttackerDamageHandler handler)
    return true;
  string scp1 = GrabNumbers(scp.GetRoleId().ToString());
  string scp2 = GrabNumbers(handler.Attacker.Role.ToString());
  Cassie.Message($"SCP {SpaceNumbers(scp1)} terminated by SCP {SpaceNumbers(scp2)}", customSubtitles: $"SCP-{scp1} terminated by SCP-{scp2}.");
  return false;
}

This is how you fix the disconnecting issues

#

You essentially just check if it's gonna make you disconnect and if so you make your own cassie message instead of the original code running

#

The problem is that SubtitleParts in the SCP's damage handlers is sometimes null, because it's never used base-game

bright vine
#

i see

slate flume
#

And it breaks mirror

bright vine
slate flume
#

I have one

#

Really stupid idea

#

That I know would work but it's dumb

#

Which is to have an SSSS keybind assigned to Mouse1

bright vine
#

😭

slate flume
#

I need to make more LabAPI requests

bright vine
#

oh yeah what about 173 snapping @slate flume

#

i'm wondering what you used to make that happen

slate flume
#

173 snapping should be more feasible

#

I forgot to work with that

bright vine
#

oh you didn't do anything

#

HAHA

slate flume
#

Lemme take a look

bright vine
#

i'm guessing the snapping just ignores scps and we only need to disallow that

slate flume
bright vine
#

i use DnSpy to take a look at the game code, thats a good way to check right?

#

is there a better way i should know

#

tbh it would be nice if there was a plugin that would log all events ingame (not the errors, just in general)
this would be so great for testing and developing plugins (less time consuming)

(unless theres already a way? 💀)

slate flume
bright vine
#

o

agile tartan
#

Is there event of Scp106 attack like EXILED AttackingEvent?

bright vine
#

yes, i believe there are more events to check for that actually

#

from what i know, you can just go with OnPlayerHurting or OnPlayerHurted and just check if the player is 106

#

and there you go

#

oh but let me check again

slate flume
#

Also @bright vine I fixed 173 blink

#

Got that fully working

#

Against SCPs

bright vine
#

oh! how did you do it?

slate flume
#

Took 2 transpiler patches

#

But I got it working

bright vine
#

a.. transpiler

slate flume
#

They're pretty basic though

bright vine
#

oh, so we essentially fill in the missing data

slate flume
#

I mean

#

Not really?

#

What happens is the client gathers all the information (including the Scp173TeleportAbility.BestTarget) and sends that to the server to use
It's actually kind of smart because it avoids the server overhead of having to calculate that by itself, but the problem is that it doesn't allow us to modify it easily

#

So what I did was went to where the NetworkReader::ReadReferenceHub call was and replaced it with a call to the server's Scp173TeleportAbility.BestTarget instead of using the client one

bright vine
#

So

#

You basically made it serversided

slate flume
#

Pretty much

bright vine
#

is that what youre saying

#

ok

#

i see

slate flume
#

The problem is that the server's BestTarget uses HitboxIdentity.IsEnemy which with our old patches now registers for SCPs

#

Which brings us to the second patch

bright vine
#

im honestly impressed you even did all of this

slate flume
#

I had to patch BestTarget to make it so that the loop continued in the event that the current ReferenceHub was equal to the Scp173TeleportAbility::Owner

#

So it wouldn't register the 173 owner as the target

bright vine
#

lol because itd kill itself

slate flume
#

Yep lmao

#

I burst out laughing when that happened after my first patch

#

Never even crossed my mind

soft depot
slate flume
# soft depot var, and MethodImpl??? 😭

var compiles exactly the same and the [MethodImpl(MethodImplOptions.AggressiveInlining)] on the helper method should make it so that it doesn't do an external call and instead just fills in the code

#

Essentially

#

Idrk the best way to put it

soft depot
#

I don't think Harmony would even check the inlining attribute on it, but like, 3 freaking nanoseconds ahhh "optimization" and var just makes code less readable

slate flume
#

And "var just makes code less readable" is entirely subjective

#

I can read it just fine

#

The difference between
var codeMatcher = new CodeMatcher(instructions, generator);
and
CodeMatcher codeMatcher = new(instructions, generator);
Is not large

soft depot
#

wait till bro hears about StyleCop 💀

slate flume
#

Idgaf

#

Why do you

soft depot
#

readable code

slate flume
#

It's perfectly readable

#

You're dying on a very lame hill

bright vine
#

i think every dev should code in their way

#

nothing wrong with that

soft depot
#

you CAN

#

but should you?

bright vine
#

No one cares about standards

slate flume
#

I love this guy

bright vine
#

Guy...........

soft depot
#

yea tell that to a software engineer guy at google or somethin

bright vine
#

Right but this isnt google

#

this is literally scpsl

slate flume
#

For real dude

soft depot
bright vine
#

this isnt a job dude

#

😭

soft depot
slate flume
#

That's wild

soft depot
#

not just var, StyleCop in general, cuz that's what this has escalated to

#

and I mean, you're still arguing over it too

slate flume
soft depot
slate flume
#

Bruh

soft depot
#

I'm just saying standards exist smh

bright vine
#

tries to defend claiming "you can, you dont have to"
makes this argument in the first place

#

Sure..

soft depot
#

so feel free to disagree

slate flume
bright vine
#

When did i say you had to follow standards

soft depot
#

do you really think MS has the best coding conventions?

soft depot
#

are you really saying you cant objectively say one of these .csproj files are better?

slate flume
#

Such a weird hill to die on

#

If StyleCop is made by Microsoft and following Microsoft coding conventions then it literally agrees with me

soft depot
#

anyways, I'll concede that

#

but I'm literally not dying on a hill about this bro

#

you're just refusing to say that code style can be objectively judged 😭

slate flume
#

Code style is entirely subjective

#

Well

#

Not entirely

#

It's like how music has subjective and objective elements

#

You can say objectively when someone isn't hitting the right notes (eg. using horrible coding practices, writing unoptimized code) or you can say subjectively whether or not you like/dislike someone's music (eg. style conventions)

#

And there is a point to some of the standard style conventions but saying you need to follow a certain set of a rules to a T is generally, in my opinion, stupid

#

Especially when some people prefer certain coding conventions in some rules over others in other rules

soft depot
#

I would say code style can be judged personally, but like, I don't care what you name your variables, nor do I really care if you use var personally, but saying that code style cant be judged would mean that things like StyleCop are useless, except they clearly have a use

#

otherwise you get a spaghetti fest of Types in namespaces and you've got nothing telling you "Hey, this is gonna be unreadable for somebody else"

#

and I think that a good code style is a quality a good dev should have

slate flume
#

I just think the strict rules you're spouting are nonsense

#

At least in this case

soft depot
#

sure, in this case, you can use whatever you want

#

but like I said, I think a good dev should follow good style choices

slate flume
#

But the definition of good is fungible

soft depot
#

which is why I pointed out you used var

#

and then you refused to take a jab at you

#

and then this argument began

soft depot
slate flume
#

Some people, like you, strictly abide against var, and I think pushing that in these kinds of contexts on other devs is dumb

soft depot
slate flume
#

💀 it's a metaphor lmao

soft depot
#

why do you think there's a trolley?

slate flume
#

Idk I don't read into things very well

soft depot
#

alr, well it was a joke

slate flume
#

Good talk

copper plume
#

hi there

#

is there any way to somehow patch one specific method of one specific instance of something

soft depot
#

you can check the instance in a patch

copper plume
#

like if i throw a grenade, i want to prefix the explosion just for that grenade. Not have to check for every grenade

soft depot
#

but all instances reference the same method, which in memory is just a bunch of bytes, so like, there's not individual methods for each instance, they just all point to the same method

copper plume
soft depot
copper plume
#

That was an example

soft depot
copper plume
#

okay

#

thanks for the help

soft depot
#

so if you're forced to patch I'd just say make a prefix like

public static bool Prefix()
{
  if (is my instance)
  {
    // my code
    return false
  }
  else
  {
    return true
  }
}
slate flume
soft depot
#

if you're using a transpiler that's gonna be harder, depending on if you're completely rewriting the method or just making a minor modification

celest thorn
#

(Im joking)

celest thorn
#

Just transpile a new method

copper plume
celest thorn
#

And that works

celest thorn
#

Now ced can enjoy transpilers without having to transpile everytime

soft depot
crimson dune
# soft depot

i dont know how someone can deal with light mode when coding

soft depot
#

that's github

#

also I have to get up really early every morning so I can't stay up late 😔

crimson dune
slate flume
# bright vine Guy...........

I feel the need to say I use that as a gender neutral term, I don't mean anything by it
Also I updated the other patch cause I hated the helper method

[HarmonyTranspiler]
[HarmonyPatch(typeof(Scp173TeleportAbility), nameof(Scp173TeleportAbility.BestTarget), MethodType.Getter)]
public static IEnumerable<CodeInstruction> FixBestTarget(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
{
    var codeMatcher = new CodeMatcher(instructions, generator);

    codeMatcher.MatchStartForward(
            CodeMatch.Calls(AccessTools.PropertyGetter(typeof(HashSet<ReferenceHub>.Enumerator),
                nameof(HashSet<ReferenceHub>.Enumerator.Current))))
        .ThrowIfInvalid("Couldn't find ReferenceHub Enumerator.Current call")
        .Advance();
    int referenceHubIndex = codeMatcher.Instruction.LocalIndex();
    
    codeMatcher.MatchStartForward(CodeMatch.Branches());
    Label target = (Label)codeMatcher.Operand;

    codeMatcher.Advance();
    codeMatcher.Insert(
        CodeInstruction.LoadArgument(0),
        new CodeInstruction(OpCodes.Call , AccessTools.PropertyGetter(typeof(Scp173TeleportAbility), nameof(Scp173TeleportAbility.Owner))),
        CodeInstruction.LoadLocal(referenceHubIndex),
        new CodeInstruction(OpCodes.Call, AccessTools.Method(typeof(ReferenceHub), "op_Equality")),
        new CodeInstruction(OpCodes.Brtrue, target)
        );
    
    return codeMatcher.Instructions();
}
bright vine
#

oh i was being sarcastic

#

i see, thx so much again!

slate flume
#

It was a good challenge

#

Besides I can use the code myself cause I do my own friendly fire shenanigans

bright vine
#

now everything except some abilities and 106 would work

slate flume
#

Yeah I'll have to check how the others work

#

Oh 939 is gonna be a bitch

#

I think I can patch the lunge though

agile tartan
#

What is the difference between these IDs?

crimson dune
#

LifeId i would imagine is a temporary thing that lasts for only while you are one current role
NetworkId is a mirror thing
PlayerId is the one that can be seen in remote admin
UnitId i have no clue
UserId Steam64, Discord or Northwood which depends on how the player has logged into scp sl

bright vine
#

@slate flume so i have an issue, ive been trying to fix it for an hour and i can't figure it out anymore, but essentially im trying to narrow FF down to roles

#

the check

bright vine
#

how would i check if the player is a specific role, as opposed to teams? i tried the referencehub thing, but for some reason, that never worked

slate flume
bright vine
#

i see. is it not a good idea to use the ReferenceHub directly?

#

ive noticed that the server lowkey lagged and was forced to crash every time i switched to that

slate flume
slate flume
#

Cause it shouldn't be causing these issues

bright vine
#

it's just the same, all i did was swap Team to ReferenceHub

 [HarmonyPatch(typeof(HitboxIdentity), nameof(HitboxIdentity.IsEnemy), [ typeof(ReferenceHub), typeof(ReferenceHub) ])]
slate flume
#

And what does the rest of the patch look like

#

Cause you'll need to do other stuff if you're transferring to referencehub

slate flume
bright vine
#

team version

        static void Postfix(Team attackerTeam, Team victimTeam, ref bool __result)
        {
            if (attackerTeam is Team.SCPs)
            {
                // This forces friendly fire to be enabled between SCPs lol (only for SCP-939-Hybrid)
                Logger.Info($"Working, it is detected: Attacker:{attackerTeam}");
                __result = true;
            }

            else
                Logger.Info("No SCP-939 hybrid detected");
        }

previously, it was

        static void Postfix(ReferenceHub attacker, ReferenceHub victim, ref bool __result)
        {
            if (attacker.roleManager.CurrentRole.RoleTypeId == RoleTypeId.Scp939)
            {
                // This forces friendly fire to be enabled between SCPs lol (only for SCP-939-Hybrid)
                Logger.Info($"Working, it is detected: Attacker:{attacker}");
                __result = true;
            }

            else
                Logger.Info("No SCP-939 hybrid detected");
        }
#

the roleManager does work, but like im trying to integrate with UncomplicatedCustomRoles (another custom plugin) and seems like they dont appreciate that 💀

slate flume
#

So it works when you use:
static void Postfix(ReferenceHub attacker, ReferenceHub victim, ref bool __result)
{
if (attacker.roleManager.CurrentRole.RoleTypeId == RoleTypeId.Scp939)
{
// This forces friendly fire to be enabled between SCPs lol (only for SCP-939-Hybrid)
Logger.Info($"Working, it is detected: Attacker:{attacker}");
__result = true;
}

        else
            Logger.Info("No SCP-939 hybrid detected");
    }
}

But not when you integrate?

#

you'll have to catch me up a bit here

bright vine
#

let me debug further just to narrow it down

bright vine
#

@slate flume i fixed it, so it turns out

if i use ReferenceHub version then i have to enable full force friendly fire for 939 as well (for some reason 😭), which you can see here

            public override void OnPlayerHurting(PlayerHurtingEventArgs ev)
            {
                Scp939DamageHandler scp939DamageHandler = ev.DamageHandler as Scp939DamageHandler;
                bool flag = scp939DamageHandler != null;
                if (flag)
                {
                    PropertyInfo property = typeof(Scp939DamageHandler).GetProperty("ForceFullFriendlyFire", BindingFlags.Instance | BindingFlags.NonPublic);
                    if (property != null)
                    {
                        property.SetValue(scp939DamageHandler, true);
                    }
                }

                base.OnPlayerHurting(ev);
            }```

whereso with `Team` version, i dont even have to do that
#

i have no idea why this is necessary but it just works

upper vapor
upper vapor
upper vapor
# soft depot

*argues about style being objective*
*uses github light theme*

slate flume
celest thorn
bright vine
#

oh no i never got that error now but i still disconnected

#

...odd

#

this happened after like a few minutes or 10 mins

#

(never had an issue until i tried to do the SCP friendly fire thing btw)

bright vine
#

i love scp friendly fire

eager herald
#

Guys, How to locate every player's zone! I am Trying to make Delta nuke Plugins.

upper vapor
#

go through the list of players (ReadyList)

bright vine
#

wasn't there a method that could remove the blur from 939's screen?

upper vapor
#

player.Zone

bright vine
#

i remember someone doing that

bright vine
#

someone changed it so that if you played as 939 your vision isnt blurred

#

normally its blurred

eager herald
#

@upper vapor thanks

upper vapor
#

np

bright vine
#

okay

eager herald
#

@upper vapor but how to use it, I still don't know!

bright vine
#

Zone is a subclass within Player

Player is often used as an argument in most event handlers

upper vapor
#

check if the zone is good

bright vine
#

oops yeah

eager herald
#

so how to check if is in light containment and surface area

restive turret
restive turret
eager herald
#

a little bit

restive turret
#

Enums?

eager herald
#

yeah

upper vapor
#

!dotnet

#

f

unique crane
restive turret
unique crane
#

check in game settings

#

!c#

regal lakeBOT
upper vapor
#

ms

unique crane
#

:3

upper vapor
#

ah

#

xd

restive turret
eager herald
restive turret
#

Ye but they have names

#

player.Zone == FacilityZone.Surface

eager herald
#

Thx!

agile tartan
#

Is it possible to make a player invisible so that only the items they are holding are visible?

agile tartan
celest thorn
upper vapor
#

idk then

celest thorn
#

fade doesn't work for that

#

i mean it shrinks the gun / item

#

but that has been solved now

agile tartan
#

about shrinking?

celest thorn
#

or item

agile tartan
agile tartan
#

great

bright vine
#

how do you change the scp target counter

#

whats the method

hearty shard
#

youll have to patch it prob

bright vine
#

i tried to search for it but i couldnt find-

#

oh

#

So it has to be patched

#

Omfg

#

Everything just has to be patched

#

LOPL

hearty shard
#

well yea

bright vine
#

what is it even caleld

#

called

hearty shard
#

i dont remember where it is

bright vine
#

💔

royal mica
#

And then there are things you cannot patch cause its client side only

hearty shard
#

target counter was made server side a while ago

#

for 14.2 i think

bright vine
#

is that what its called

#

Target Counter

hearty shard
#

scp target counter

bright vine
#

odd all i could find is 096 targets tracker and 079 target counter (i heard that one is clientsided)

hearty shard
#

ya 079 knows all targets

#

itll be there somewhere

bright vine
hearty shard
#

check Round class from labapi it might have smth

royal mica
#

Look at RoundSummary.UpdateTargetCount

#

That updates thecounter

hearty shard
#

ya

#

you need to patch it from updating

#

prefix >>

royal mica
#

you can easily make a Prefix patch o UpdateTargetCount to disable it, since it is a public int TargetCount

hearty shard
#

int is crazy

bright vine
#

thank you!

#

why is it always hidden

hearty shard
#

-2 targets

#

thats what is synced

bright vine
#

oh whoopise daisy

royal mica
#

There is a get/setter for it

hearty shard
#

ya

bright vine
#

thank you so much again! my only goal is to make a specific scp count towards the target counter as well, this shouldnt be hard to do

royal mica
#

In programming it is never "shouldn't be hard to do"

celest thorn
bright vine
#

is it just a matter of whether northwood lets us do this thing or not

royal mica
#

I had tons of instances where "this is the most complicated shit I require to do" and was done in 3 lines
and then the next request is "just do this, its simple" and had to refactor 3 parts of the code

royal mica
#

or was very limited

bright vine
#

oh thats cool

royal mica
#

so things not possible now, can be possible with the right suggestions

royal mica
celest thorn
#

skybox

#

other stuff

royal mica
#

we should just create an open source server impl

celest thorn
#

sadly still aren't

celest thorn
#

but imagine

#

updating it