#plugins-dev-chat
1 messages ยท Page 49 of 1
Now add the player being under an elevator
Or a bulkhead door that can close and kill the player

๐
Had to do it for our server
An extensive list of things that prevents reviving other players
Also add that player must not be in the room too
Because they'd just revive them to instantly kill them via environment
We didn't do that because otherwise it just becomes either impossible or not fun
I meant as enemy
You won't end up like me
.
thats lowk a u issue 
well yeah
it puts u near where you got captured
public static Vector3 GetBestExitPosition(IFpcRole role)
{
if (!NetworkServer.active)
throw new InvalidOperationException("Scp106PocketExitFinder.GetBestExitPosition is a server-side only method!");
ReferenceHub hub;
if (!(role is PlayerRoleBase playerRoleBase) || !playerRoleBase.TryGetOwner(out hub))
throw new InvalidOperationException("Scp106PocketExitFinder.GetBestExitPosition provided with non-compatible role!");
Vector3 position = hub.playerEffectsController.GetEffect<PocketCorroding>().CapturePosition.Position;
RoomIdentifier room;
if (!position.TryGetRoom(out room))
return position;
Pose[] posesForZone = Scp106PocketExitFinder.GetPosesForZone(room.Zone);
return posesForZone.Length != 0 ? SafeLocationFinder.GetSafePositionForPose(Scp106PocketExitFinder.GetRandomPose(posesForZone), room.Zone == FacilityZone.Surface ? 45f : 11f, role.FpcModule.CharController) : position;
}
if it doesnt find safe spot it throws u back where u came from
Just aaaaaaaaaaaaaaaaaaaaaaaaaa
lis ten
dont
get captured in an elevator
and u wont show up back in the elevator!
Or at all....
that also helps
That was mean!!
@unique crane what is bro testing
ยฏ_(ใ)_/ยฏ
you do that
Oh you know what it might be
you tell me
Fix for many gamebugs???
russia apparently blocks some security protocols or whatever
Skull
TLS1.2
Well no one from russia and shit couldnt play or whatever
i would respond to this but it's better if i don't
Same
But they do make not small part of the player base
Russia will be the middleman 
As in MITM
๐ญ
RINM 
i was about to say that lol
certain providers blocked tls 1.3 (and ECH, but i guess some resorted to blocking 1.3)
so this build it will try using tls1.2 with a special arg so russians are able to play the game
although some providers just outright block cloudflare ips, so not much we can do about that one
how do people put their plugins inside of buildinfo, im surprised labapi doesnt automatically do it
what's buildinfo?
Deez
raaaaaaah
Add your own mod description
gotta find which thing triggers this tho because Exiled.Loader.dll doesnt have access to harmony :3
Fart : Poop
๐ญ
@icy knoll it is exiled loader
BuildInfoCommand.ModDescription = string.Join(
"\n",
AppDomain.CurrentDomain.GetAssemblies()
.Where(a => a.FullName.StartsWith("Exiled.", StringComparison.OrdinalIgnoreCase))
.Select(a => $"{a.GetName().Name} - Version {a.GetName().Version.ToString(3)}"));
how bruh, it doesnt have access to harmony tho ๐ญ
BuildInfoCommand
you don't need harmony for that
CommandSystem.Commands.Shared.BuildInfoCommand.ModDescription
me when you said patch ax smh
cuz i'm stupid
Hi stupid, I'm SlejmUr
also, is there any way to log smth to LocalAdminLogs but not the LA console?
When i set a TextToy's Base.NetworkScale to something, it instantly goes back to Scale 1 :c
set transform scale
look into how Mirror does it when there is a nul connection error 
cause that is not logged, but is in LocalAdminLog
wait wrong error
oh
why not just
textToy.Scale
That's literally the same shit
Problem is, i somewhat kinda need the NetworkScale, because i am using @restive turret's SetFakeSyncVar to change the scale of the TextToy per-person
wdym thats the same
then patch AdminToyBaes::UpdatePositionServer 
That still editing NetworkScals
no ??
well
yes
but it edits
transform scale
which updates the network scale
to transform scale
yeah cuz
Well ye you need to patch it
I suppose it wouldnt be possible to fake the TextFormat content, since that is not part of the .Base class?
I think you can but dont remember the TextToy's properties
Have fun
make the text static
then it won't sync unnecessarily
Its position needs to update
is it parented to something?
then you can make it static as it moves with the player anway
np
Me when my parents are now static
๐ญ๐ญ๐ญ
Ye bc when the game update happens it resync the scale, position, rotation
Basically just nullifying what u done
ur first call delayed is on the Update() and iirc it updates pos and stuff in FixedUpdate()
yo i have a stupid idea
if i attach a player to a primitive
that spins
will the player move with the spinner and actually be able to stand like on top of it and still move?
i already do that
(don't think so)
how do you plan on doing that
Clearly just Player.GameObject.transform.SetParent() smh
@unique crane position delta and rotation delta messages when :3
rotation used to be additive but since 14.0(?) they just override
talk english
this is how it works now
How about just SetRotation(current + yours)
Player has Rotate method no?
yeah but
yes
flickering
with a delta message the player could still move (both position and camera) while the server pushes them

Now with it being static, the position offset isnt applied :c
Do i need to set it differently? Or call something to update its local position?
but no smooth animations
This is evil
Imagine the lagback ๐ญ
Rubberbanding goes crazy
give the position in the create method
nah ive fixed that already
WAIT HOW
desync happens when movement is greater than 2m/tick
Share please ๐๐ผ
Also doesnt work
Still at 0,0,0 relative to its parent
it probably works differently for yours
all our stuff is client side
position is local-space btw
Oh 
or, at least, should be
I've been looking for a cure for rubberbanding
15000 primitives is crazy
thats not even the best part
that's 15k
It is inside the character, so 0,0,0 relative/local, even though it should have been set to 0,1,0
peak debug menu
yeah we're resyncing the client to a serverside netid
i LOVE having to fix mirror
uh
set networkSpawn to false in the create method, set local position on the transform and also NetworkPosition
then spawn it with NetworkServer.Spawn
im just tryna optimize everything the best we can
my fps is >100 until like 100k primitives
at around 500k its 60
Why make it static?
Because it is parented already and doesnt need unnecessary position updates
Oh I see
more performance!!
Yipppeee
NetworkServer.Spawn(textToy.GameObject) or textToy.Spawn() ?
1
nevermind my prev message
use the position create method with networkSpawn: false
set the NetworkPosition to the position
then toy.Spawn
Kind of based
I've been complaining about the rubber-banding in this game for so long
I would love to do a fix like that but sadly I'm avoiding client-side patches
so like for the server theres 8 different towers all inside of eachother
but the client only shows the one they're supposed to be in
I should really add that performance stuff into my stuff
same with colliders
I don't ๐ฅ
span
I don't have a lot of colliders in the server
im gonna warn you right now
be VERY CAREFUL
otherwise this happens
#plugins-dev-chat message
messing with client side stuff has some wierd side effects
think my biggest log file was almost 200gb
@celest thorn can attest to that 
yep
oh yea have fun figuring out why they don't spawn
thats the magic of them
they could spawn
Oh I already had to
or not
"normal" by our standards
normal by anyone
^
im NOT remaking all the towers
wait what?
nor do i care enough
scale is positive
Just remove the negative scale debug log ๐คท๐ผ
yeah thats like
if only unity was that nice
actually a good point

why do you have negative scaling in the first place
yea
you wanted to flip some things?
idk
ok so like
honestly
๐ญ
ok so math.abs fixes it 
textToy.Base.NetworkPosition didn't work, but textToy.Position worked!
Thank you :3

it would take about a MONTH of work to make them all pos
plus would break a ton of the jumps
it would take a few minutes for zero to make scale negativen't in the plugin :3
i can just fix it with a line of code
just abs it
and thats it

no wait
make an editor window to turn all scale properties to positive
If you abs it it'll slightly move the boxes
-0.788 X
Meaning you need to change the position as well
i cannot
for cubes you can
You could write a function that takes the box scale, makes it positive, and then adjusts position accordingly

yea but
No more errors
that's what i'm talking bout
@celest thorn honestly just leave it, dont do anything that changes position
yea
my client log is 100mb and sl has been open for hours
they won't change the position
then go for it ig
flipping a cube's scale from neg to pos doesn't do anything
besides getting rid of the log statement lol
if you have other objects in the cube...
well crap
lmao
I forgot scale was around the box center
yep
im just waiting for someone to fail the last jump of a 2 hour citadel
I thought it'd do this
all it does is just flip it on itself
4m jump
dam
primitiveInstance.NetworkScale = new Vector3(Mathf.Abs(primitive.Scale.x), Mathf.Abs(primitive.Scale.y), Mathf.Abs(primitive.Scale.z));
and fixed it

5m is the max possible but you have to do a lagjump
ill show you hold on
did you do that when creating the primitive for the first time?

https://i.e-z.host/๐ธ/ozcznm4r.mp4
@slate flume
Hell yeah
wait...
so you're saying that it's all clientside
then why do yuo have a primitive instance
Literally this
networked objects
eg spinners
moving blocks
etc
Surprised it's not worse
holy gizmos
ngl thats a zero question
Yea gizmo is used alot
my unity starts to lag badly with 5k prims selected ๐ญ๐ญ
https://i.e-z.host/๐ธ/1vbowbj3.mp4
yo btw this is debug menu
and im not even joking
and yeah CustomColliders saved out project
first it was almost killed by a door
then colliders
btw this entire project
yeah thats pretty much our structure
one class is doing the heavy lifting for everything
yep thats the debug menu name
meownu
the fact that this project went from breaking my windows installation with a 200gb log file to this
or "Metrics Monitoring Menu :3"
||this name is just a coverup||
yesterday i took 2 of the most hardest exams
no im leaving it meeowww~ meeow~ mrrp :3
So when doing client-side changes, what do you have users do to get that implemented?
Also can someone please fix NW movement code I rubberband multiple times every day when doing skill jumps and it gets me killed ๐๐ผ
TestItemViewmodel
What does it test
What is that?
And david what you think im missing for debug?
wdym
Like should i add something else
For base game to actually verify movement
Speedometer could be cool
Nw needs to leak internal stuff for testing the game
Im curious how you guys test the game
No i mean
When you decide to add an item
A room
You like pop it in a debug scene or what
@unique crane can you overhaul the entire movement system please and thank you
You can do that but its easier for artists to just add it to the map gen
So
I mean that wouldnโt be bad
For testing collisions
And how the room fits in the game
Collisions are just questionable
I see multiple in same room
I mean in same position
Question
If the TextToy is Static, can i still manually set and update its rotation? Or is the entire logic for that like disabled or sth
client wont update its transform when its static
only "transform" related thing you can do is change the parent
set IsStatic on the base instead of NetworkStatic

wait...
that doesn't work for new players
i guess make it non-static
Nah bro
i cannot
even if i don't go there i will pass
because of how high my grades are in 3 years
like if i go there and don't do anything i can pass with 70 / 110
if i show up i could get 90 / 110 and honestly i just wanna have a 90
Is there a list around of colors we can use for badges? I wanna make sure I don't break VSR lmao
https://en.scpslgame.com/index.php/Docs:Permissions the old site is empty
also you can't really break vsr cuz if you try, the client will just deny the info lol
np
Enumerable.Range(0, int.MaxValue).Select(e => "#" + e.ToString("X").ToUpper()).Except(NorthwoodApprovedColorCodes.Values)
bro really made it

not sure if int tostring with format X gives what you want
Does someone has a quick list of colors roles are using?
hueh
nvm i don't have it
Does LabAPI or the such have an update event i can subscribe to?
I dont want to make my script MonoBehaviour
like a per-froame update?
StaticUnityMethods
Thank you ^^
just make a component that calls your method, or use that yeah
it might be better to use monobehavior though
cuz that gets destroyed on round restart automatically
also, make sure you don't have anything that throws an exception in the subscribed method
otherwise you'll see... uh... weird things
just try catch the whole mf
oh? :O
@restive turret Trying to set the rotation of my TextToy but it doesnt work with FakeSyncVar
I tried other methods and only this way worked
Do you, or anyone else here, have any idea how i could set the rotation with the FakeSyncVar method?
But i think it uses the .Base.NetworkRotation, and i am not sure why setting that directly doesnt work....
oh i know
:o
toy.Base.enabled = false

:(
prevents server updates but not client updates
just do this after spawning
you disable the object server side
you can also harmony patch
but thats more effort
1st 2 get overwritten by server side updates
3rd doesnt because it sets what is meant to be set by server updates
Rotation, Position and Scale getting synced every Update Cycle
Ahhhh alright
So even if i do enabled = false, i can still send the fake TextFormat and Rotation values? Huh, interesting
TexFromat should work tbh
Alright, with the textToy enabled = false, it now looks like this
Now im just hoping the SendFakeSyncVar is still possible to do

can you show your fake sync var code?
It works with 64uL and sending a string
But not with 2uL and sending a Quaternion
to textToy.Base
yeah cuz slejmur did a funny
dirtybits, transforms are written, then and then dirty bits again with derived props
Something about the difference of LabAPI.Features.Wrappers.AdminToys and just AdminToys i would guess
so for transform properties the writeulong(0) has to be after the sync var writing
how would I solve that huh
can you link the code again
public static void SendFakeSyncVar<T>(this LabApi.Features.Wrappers.Player target, NetworkBehaviour networkBehaviour, ulong dirtyBit, T syncVar)
{
//if (!target.IsConnected)
// return;
if (!target.Connection.isReady)
return;
NetworkWriterPooled writer = NetworkWriterPool.Get();
// always writing 1?
Compression.CompressVarUInt(writer, 1);
// placeholder length
int headerPosition = writer.Position;
writer.WriteByte(0);
int contentPosition = writer.Position;
// Serialize stuff. we dont want to ser objects only sync data
writer.WriteULong(0);
foreach (var item in SubClassWriteExtra)
{
if (networkBehaviour.GetType().IsSubclassOf(item))
{
writer.WriteULong(dirtyBit);
}
}
writer.WriteULong(dirtyBit);
if (WriterExtensions.TryGetValue(typeof(T), out var method))
{
method.Invoke(null, [writer, syncVar]);
}
else
{
Log.Error($"Not found ser for type {typeof(T)}");
return;
}
// end position safety write
int endPosition = writer.Position;
writer.Position = headerPosition;
int size = endPosition - contentPosition;
byte safety = (byte)(size & 0xFF);
writer.WriteByte(safety);
writer.Position = endPosition;
// Copy owner to observer
if (networkBehaviour.syncMode != SyncMode.Observers)
Log.Warn("Well snyc mode is not observers, sucks to be you I guess.");
target.Connection.Send(new EntityStateMessage
{
netId = networkBehaviour.netId,
payload = writer.ToArraySegment(),
});
}
AH becaise labapi doesnt use SyncVars for these
it just using Tranform
im gonna die
private static readonly List<Type> SubClassWriteExtra = [typeof(AdminToyBase)];
// Easier syncVar
public static void SendFakeSyncVar<T>(this Player target, NetworkBehaviour networkBehaviour, ulong dirtyBit, T syncVar)
{
if (target.Connection == null)
return;
NetworkWriterPooled writer = NetworkWriterPool.Get();
// always writing 1 because we only change 1 value!
Compression.CompressVarUInt(writer, 1);
// placeholder length
int headerPosition = writer.Position;
writer.WriteByte(0);
int contentPosition = writer.Position;
// Serialize Object Sync Data.
writer.WriteULong(0);
// some class write this stuff twice.
var isDerived = SubClassWriteExtra.Any(e => e.IsAssignableFrom(networkBehaviour.GetType());
writer.WriteULong(dirtyBit);
if(isDerived && dirtyBit > 16UL) // if not admintoybase prop
writer.WriteULong(dirtyBit);
if (!MirrorWriterExtension.Write(syncVar, writer))
{
CL.Error($"Not found NetworkWriter for type {typeof(T)}");
return;
}
if (!isDerived || dirtyBit > 16UL)
writer.WriteULong(dirtyBit);
// end position safety write
int endPosition = writer.Position;
writer.Position = headerPosition;
int size = endPosition - contentPosition;
byte safety = (byte)(size & 0xFF);
writer.WriteByte(safety);
writer.Position = endPosition;
// Copy owner to observer
if (networkBehaviour.syncMode != SyncMode.Observers)
CL.Warn("Well snyc mode is not observers, sucks to be you I guess.");
target.Connection.Send(new EntityStateMessage
{
netId = networkBehaviour.netId,
payload = writer.ToArraySegment(),
});
}
}
well try it then report back i guess
So i should replace my FakeSync method with this one?
ye
ah i dont have that
wait
you can replace that with
writer.Write<T>(syncVar)
@upper vapor why does mirror write another dirtybit after syncvar val
i think im too stupid for all of this xD
you can remove the if statement
OH THIS
I HATE MIRROR
BURN IT DOWN
WHYY????
writer.WriteULong(base.syncVarDirtyBits);
writer.WriteVector3(this.Scale);
writer.WriteULong(base.syncVarDirtyBits);
ye
this shit

Im at my point sending them a letter why
auto-generated code
Mostly because it's autogenerated
like they didnt need to write twice

And you're not meant to do this by hand
generate my ass
no need for that
im patching out
nothing is happening .w.
Ragdolls all have 0 serial, cause of the default value parameter
I can use hashcode for identification instead of serial, but funny oversight
should still use serial unless it doesnt work at all
connsidering all of the ragdolls have 0 serial, it doesn't not work
yeah about that
you can still make it work btw
Patch the ctor
Also readonly is compile time
I am just going to use hashcode
damn
it uses creationtime as well so lol
no cause I want to store primitive not the whole rigidbody
Storing disarm data in a list and need to save which rigidbody was cuffed when
Hey so I started to play SCP:SL sometime ago and I know some basics to C# but is there like some sort of hard down way to learn? ive tried ot understand the LabAPI tutorials but is there like advice any of you guys can give me. I know that the game uses c# and unity and I just want to do a simple plugin for gods sake
C# tutorial beginners full course (C# for Unity)
#C# #tutorial #Unity
โญ๏ธTime Stampsโญ๏ธ
#1 (00:00:00) C# tutorial for beginners ๐
#2 (00:06:30) output ๐ฌ
#3 (00:10:48) variables โ๏ธ
#4 (00:19:32) constants ฯ
#5 (00:20:35) type casting ๐ฑ
#6 (00:27:49) user input โจ๏ธ
#7 (00:31:24) arithmetic operators ๐งฎ
#8 (...
Yeah, I'm making plugins for 3 months now, but I'll watch the whole thing so I can destroy my sleep schedule
lofi hip hop tutorials to sleep to
i remember using this same one, i just saw it for 10 seconds, got bored and just went testing around it was similar enough to java that i actually started from my java knowledge
lolll
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityEquipment;
the ultimate way to learn to code is to fuck around and find out
@icy knoll i believe in u
we got it working
rotation and all
just i now need a queue system and then hint based messages

got what working
lemme show
yeah i plan on making it a public plugin
i really wanted to add TTS for it too but everything was paid
I was literally thinking if someone had made something like this the other day lmaoo
great work!
thank you! it should be out probably this weekend as a public plugin!
That's pretty slick
i was gonna then instantly forgot 
I started making something like it, then realised very quickly that I don't have the expertise nor patience to make it lmao
Hi kadava
im one hour into this video and its so brain dead
im learning things i already know
i can make a calculator
thats it

eve
hi
There is Dr Brights Mayhem server and out of what i learnt so far in c# and an idea, i thought about this simple formula that could calculate the chances of you exploding because the pills are unsafe, one of the developers said that its calculated when you pick the item and i thought there was another factor that can make the chances of boom higher. any tips 
um
what is this?
watt
idk at this point I'm going insane
but what are you trying to make?
an plugin or smth else?
it says above
js a test
for mysekf
in a terminal and later when I can make a plugin yeah ill try
oh
@grand flower what changes did you make to increase TPS
I did the FPC Distributor patch but I'm curious if you have any other tricks
I wanna get a consistent 60 tps with 32 players
It tends to be pretty good with distributor patch + ragdoll and item cleaning but I get dips when a lot of players are alive
I don't think it ever really gets under like 45-50 tps but I'd like to improve it as much as possible
Round robin, relative position caching
Mostly
Those are the ones that give the most
The rest is on NW's side
Round robin?
You already do ragdolls and items so that's good
I've heard of that from my time doing speech but I wonder how the concept applies here
If you can illuminate that for me @grand flower
Oh interesting so you do odd players one tick and even players the next?
yes
I like that idea
My current cache checks netId instead of playerId but I'll change that
I found this out like 3 days ago
I made a custom item framework and one of the room spawns was going to be red room
P5 on the issue tracker so I'll abandon hope
Lmao
Yeah we have mini waves/40% of spawn wave players spawn in red room
Because another amazing thing about SL is the fact gate A and gate B can be right next to each other
So SCPs can just lock down the facility
So we have mini waves and 40% of regular waves spawn in red rooms
Surprise surprise, red rooms isnt guaranteed anymore
I wonder if I can patch map gen
Do it
Does SL send the map to clients or are they expected to generate the same map with the same seed
Good question
It sends seed
So you'd have to use only seeds that generate the red room
Yeah :/
Makes sense, but limiting
You'll probably have to pass a seed through the random, check it with the zone generators, and see if it produces the red room
If not, generate a new seed
Hopefully
The issue is we'd have to generate the map regardless
Because if we skip any random calls it'll throw off generation
how do i get a player steamid from a plugin?
Player.UserId but that can be using northwoods one so.
string steamid = string.Empty;
if (player.UserId.Contains("steam")
steamid = player.UserId.Split("@")[0];
Yippppeee
For TTS have you tried using System.Speech? It's an MS Package
The flip is this editor 
If you wanna use the terminal for editing, please use neovim
Notepad engineering as a beginner will be insanely painful
Though you might learn a bit more
Notepad in win11
If you plan on adding TTS I suggest creating a separate plugin (in the same solution) so people don't need to have TTS installed
maybe i should have written my plugin for LabApi so I could ask for help here
or I can just ask everyone to imagine I used the LabApi wrappers instead of the Exiled ones
this is interesting
I have to add it to my cassie plugin

I found it on Reddit lol
".net text to speech cross platform"
Bro i know its stephen hawking tts but we know it for scp-079 
Can you send me dotnet implementation instead and I will consider it
The doors to Gate B are now open.
Hahahahahah I remember finding the Microsoft SAM generator online and I scoured the internet finding a way to use it from code
I found a program I could use in order to export audio
HttpClient 
crazy
the original one is done .NET
Wha
but since SAM is pretty outdated, there was no way to use it in C# i could find
so I just did mass export of like a thousand words using AutoHotKey
for personal use
I might be placing a bit too much on my plate at the moment
https://github.com/seikosantana/eSpeak.NET
This software is an API and could be 10 times easier its the same used by the website
now iโve gotta work out if itโs possible to turn a project thatโs in the same folder as a solution into its own folderโฆ
Endswith better
just move it to a directory
true, thought there would be an issue or smth
me when nuget is crashing out or smth and not giving me access to kokoro
what
like
i cant use anything from kokoro
it's in the csproj
but nothing ๐ญ

try this maybe
this one targets 4.6 lol
4 years old
lets hope it still works
oh wait
this requires an executable to be open...
blegh
dont need, just would be v useful
just have a staff member narrating on demand 
Ok best idea
because you need to convert audio
i would say do a python endpoint
and just get the byte
and then send them to a speakertoy
I know it sounds boring and alot of work but directly on SL is a bit impossible
if you aren't hosting it on windows
else you can use built in speech function
id rather not deal with all that ๐ญ
I know its alot
but thats the best solution i can find
:3
im not doing that so ig no tts unless i use one of those paid unity things but ya
Nah don't throw money on that
im not going to
Hope i helped tho :3
anyway... does anyone know how to add stroke to rich text?
the website i use isnt working rn
blegh
stroke?
I don't think you can
rip
rip
@true cedar sorry for the ping but did you ever work out how to put a hint on the far right of the screen?
4
im studying and i have 8 subjects
so im just asking for random numbers, google ones just prefers alot 3,8,9
so thats why
does its possible to make the SSDropDownSettings options for each player diffrent like i want to make cosmetics plugin and i want that normal players have some cosmetics and "Vips" had more of them and etc.?
Yes, but you need to handle the desync yourself (send the data to individual player)
Or you can use Eve's secret API which already handles this
i think
damn
Not yet
easiest method would be to create a new option setting per player (all go in defined settings) and only send the setting for that player and not the ones for others. this is the way its intended to work from what i can see
Im making a release soon though
desync?
@main zenith if you want i can give you a secretapi build later with it
Well you have to handle the ids which arent sent to other players
im not home for a few hours though
it would be helpful
So it kinda is desync since the default implementation syncs everything to every player
You can also compile it yourself from the PR
wdym by "PR"?
i guess, theres built in methods todo this from the base system so this is also part of the default implementation
oh
Pull Request
let me find it
@main zenith
you have todo two things, one is disable the send to all by setting the filter to send non iirc, then you just handle the sending with that
so its pretty easy imo
You also have to handle errrrr
Yes I said that
You cant use the dropdown settings actual property
Thats what i do
Cool
What i sent has a Build Result
Which has the SecretAPI.dll
Btw this is untested
so it might not work, but ill make fixes to anything not working
how would u do it like i dont have any idea how to send to a player his invidual settings?
Create a new instance per player
Set your values
ServerSpecificSettingsSync.SendToPlayer(ReferenceHub hub, ServerSpecificSettingBase[] collection, int? versionOverride = null)
Send the player specific instances
With the collection being per-player
This is what secretapi does
i see but i think i can do it without any others dependencies like i think i can just make foreach loop then update list of options and then sendtoplayer
@unique crane when do you make the game bugfree
I cant believe you havent fixed all the bugs yer
Yet
what im doing wrong?
public void CreateListOfCosmetics(Player player)
{
CosmeticOptions.Clear();
CosmeticOptions.Add("Default1");
CosmeticOptions.Add("Default2");
if (player.HasAnyPermission("MothCosmeticsVIP"))
{
CosmeticOptions.Add("Vip");
}
}
public override void Activate(Player player)
{
CreateListOfCosmetics(player);
ServerSpecificSettingBase[] _settings = new ServerSpecificSettingBase[]
{
new SSGroupHeader("MothCosmetics"),
new SSDropdownSetting(AbilityId.DropDownSetting,"Kosmetyk:",CosmeticOptions.ToArray()),
new SSTwoButtonsSetting(AbilityId.TwoButtonSetting,"Zawsze: ","Tak","Nie",defaultIsB:true)
};
var Holder = (ServerSpecificSettingsSync.DefinedSettings ?? Array.Empty<ServerSpecificSettingBase>()).ToList();
foreach (var setting in _settings)
{
Holder.Add(setting);
}
ServerSpecificSettingsSync.DefinedSettings = Holder.ToArray();
ServerSpecificSettingsSync.SendToPlayer(player.ReferenceHub);
ServerSpecificSettingsSync.ServerOnSettingValueReceived += ProcessUserInput;
}
i think its a "var Holder = (ServerSpecificSettingsSync.DefinedSettings ?? Array.Empty<ServerSpecificSettingBase>()).ToList();" but how can i get ServerSpecificSettingsSync.DefinedSettings for each player?
the problem is that everyone has the same CosmeticOptions despite not having "MothCosmeticsVIP" Permissions (its not the permission problem)
DefinedSettings needs to contain ALL of the available options, that is not per user
that is the list of settings the server handles
Is this an SecretAPI implementation?
this is not SecretAPI
Then I have no idea what I am looking at.
What does Activate override
my SecretAPI will be working with this soon hopefully
Which class in it
Just a random guess cause override and class level variables, but I highly suspect this won't be the way SecretAPI does it, cause it smells like a lot of bugs
I dont use DefinedSettings
Oh you patched it out?
I patch what requires it
nothing important like its only to easly activate the ability nothing important at all
Yeah but what is CosmeticOptions
Which class is it part of. Is it like a class for per user?
or when this class is inited
https://github.com/Misfiy/SecretAPI/blob/implement-playerspecific-settings/SecretAPI%2FFeatures%2FUserSettings%2FCustomSetting.cs
https://github.com/Misfiy/SecretAPI/tree/implement-playerspecific-settings/SecretAPI%2FPatches%2FFeatures
@royal mica if ur interested in how secretapi does
its 4 patches
this is the untested version tho
public List<string> CosmeticOptions = new List<string>();
public void CreateListOfCosmetics(Player player)
{
CosmeticOptions.Clear();
CosmeticOptions.Add("Default1");
CosmeticOptions.Add("Default2");
if (player.HasAnyPermission("MothCosmeticsVIP"))
{
CosmeticOptions.Add("Vip");
}
}
I guess it is a instance level variable, but which class is it part of
When is this class created
Cause if you are editing the same List, then you are editing it for EVERYONE
well i forgot about that i was having the same issue last time and i forgotten about this XD
My advice is to learn to always have functions get an input and have an output and not edit a variable
Cause that way you do not have side effect functions
and you reduce the bugs by a large margin
so instead of editing CosmeticOptions, you can just return an array with those
well after i done making this "function" i actually thinked about that bcs this variable have no reason in being in this project but i wanted to check if this whole thing works and i didnt suspect this can be issue XD
@hearty shard what if we had SSS templates and SSS instances
Huh
Like
The setting would be created per player based on a template
Similar to how it is now
But it would have a different type
How should I parse the contents of UserIdBans.txt to get the player's ban time and ban duration? I can't understand the contents of UserIdBans.txt
target nickname
target ID
expiration date
reason
issuer nickname
issuance time
times are in .NET ticks https://www.venea.net/web/net_ticks_datetime_converter
no probleymo
what would you guys recommend i do for my specific use case?
i have a hint that seperates a list by /n, but i want the last item in the list to always exist at the same position on the screen and have the messages before the last get pushed up... i cant think about a good solution for this...
maybe voffset?
lemme try that first
show the hint seperately from the others at that position
i havent used hints before but i think its like ply.showhint("poopenfarten1\n
poopenfarten2\n") your doing
so you could do ply.showhint("poopenfarten1")
ply.showhint("poopenfarten2", pos)
Ruei will have this for 3.0
๐
nice
im so excited for ruei v3
bruh voffset isn't working today :c
oh... ruei removes it...
using string builder extensions now and it works fine lol
:3
voffset breaks ruei
then why is there AddVOffset()?
Break you
well 1) ruei SHOULD convert voffsets to line height
- completion's sake
it does for both cases of using AddVOffset() and not, but for some reason only AddVOffset works, not actually adding the voffset manually
which is hella weird but ye lol
anyway
i did the perfect math for my issue
list.Count*1.17f
that's how the bottom part of the text stays in place
use ems
nice
how close are we after that point?
so i can finally retire my HSM stuff because im not dealing with that shit anymore
well
once i get parser done
it should be pretty easy sailing
parser is gonna take a while tho bc i need to support animated value parameters
If its gonna take you much more than then I would consider just not support it for a while
Its not that big of a deal
Everytime i see this i thank myself i don't touch hint system 
NO.
Paislee
im gonna support it even if it kills me
Ur lowk insane in the head
just make regex to get all {int} stuff and then modify the indexes depending on how far down in the tree they show and then send the hints with the parameters, super easy.
Says you
Well your dead corpse is not gonna help others with the hint system
Then you make it
oh if it only it was that easy
ive legit done that already
Yeah i did say that
Then do it for ruei
idk where the source of this stuff is so /shrug
Applies to u too
make a regex for tags too
and replace values from there
lol
i mean ruei will support that too
Well what if you want it to move around the screen
!!!
respectfully. it is not that easy
Why would you do that












