Skip to content

Specifics

FoxWorn3365 edited this page Sep 29, 2024 · 26 revisions

UncomplicatedCustomRoles - Specifics

This page contains all the noteworthy specifications

Defining the spawn location with SpawnLocationType

The plugin, having a full customization perspective provides a wide choice for spawn location.

  • CompleteRandomSpawn
  • ZoneSpawn
  • RoomsSpawn
  • KeepRoleSpawn
  • KeepCurrentPositionSpawn
  • SpawnPointSpawn

CompleteRandomSpawn

This flag means that this role will be spawned in a random room of the facility.

ZoneSpawn

This flag means that you can define one or more zone(s) where the player will spawn.
The room choice is randomic.

RoomsSpawn

You'll need to define the SpawnRooms as an array of room type IDs (for example LczToilets) and the spawn manager will pick a random item from the list and spawnt the player at that room.

KeepRoleSpawn

With this flag the CustomRole will spawn in its RoleType's position.

KeepCurrentPositionSpawn

You'll keep the current player position while becoming a custom role.

SpawnPointSpawn

The role will be spawned at the given SpawnPoint if defined

EXILED Enums

Many enums are not defined by us but by EXILED, so please take a look at these:

UCR SpawnPoints

Since version v3.5.0 we have implemented SpawnPoints that you can use to spawn roles to a precise location in a precise room each round: even when the map changes the SpawnPoint remains constant being tied to the room. SpawnPoints are tied to the IP and the server port: in case you simply want to transfer an existing configuration from one port to another you can do it by command while for transfer between different IPs you need to contact us.

Caution

SpawnPoints are stored for convenience and security on our cloud (UCS cloud) so we have imposed limits (although very large): maximum 35 SpawnPoints per port and a maximum of 10 ports per IP. You can create and manage your SpawnPoints via the ucr spawnpoint subcommand.

The UCR Effect object

UncomplicatedCustomRoles, to make its job easier uses a custom object for defining the effects that are given to a role. Illustrated below:

C#

Yeah, you can understand nothing here :D

        public abstract EffectType EffectType { get; set; }
        public abstract float Duration { get; set; }
        public abstract byte Intensity { get; set; }
        public abstract bool Removable { get; set; }

YAML

Here you should understand :/

  duration: 5,
  effect_type: Bleeding,
  intensity: 1
  removable: true

The effect property of UCR is an array so you can add how much effect as you want.

As v1.6.7 to have infinite effect(s) you must put the duration to a value less than 0 (for example -1).
The removable param, which is effective only for infinite effects, let you choose if SCP-500 can clear or not the effect

Nickname manager

From v3.0.0 the nickname feature has been added (again!).\

Multiple nicknames

You can choose multiple nicknames and UCR will pick one.
Just split them with a comma (,):

nickname: 'Fox,UwU,Dr.Agenda is a Furry,HELLO,Italy

Available placeholders

You can also use placeholders in order to customize nicknames.
Available:

%nick% -> Player's nickname
%rand% -> Random 1 digit number
%dnumber% -> Random 4 digit number
%unitid% -> Current unit Id (for FoundationForces)
%unitname% -> Current unit name (for FoundationForces)

The big YAML dilemma

You probably happened to have an incredible 2000-line error due to the YAML parser finding something it doesn't like and then breaking down.
To locate the error so you scramble online to put the YAML into a validator and what does it say? YAML is Valid
Wtf?

I'll explain, the validator doesn't check the types of each variable, EXILED does and it gets upset if you get something wrong so you might have put a int instead of a string, who knows.

UCS Domination System

The plugin includes an automatic feature for statistical purposes that sends a request (ping) to our servers to register it as a UCS family plugin owner.
The following data is transmitted in the request:

  • Your server IPv4 and port (the IPv4 by the request itself, the port by a GET param)
  • The UCR version that you're using
  • The number of cores that your server have

The data are saved according to the planned European regulations (GDPR) and it is possible at any time to access them, request rectification, deletion or portability by writing to me on Discord or send me an email (foxworn3365 AT gmail.com)!

Tip

To disable this function, create a file named .nohttp in the UncomplicatedCustomRoles folder!

Is Friend Of

The is_friend_of is a param that will allow you to choose which teams can't damage (and be damaged) by this custom role.
The param is a List<Team> (array) so the syntax will be the following:

is_friend_of:
- SCPs
- ChaosInsurgency

Role After Escape

Version v3.5.0 also brought major changes for the role_after_escape function as we wanted to make it as user-friendly and easy to use as possible without at the same time going to overload the plugin. That's why we chose this new, easier, faster and more intuitive syntax that will allow you to choose what will happen to the player in these scenarios:

  • Escaped without handcuffs
  • Escaped handcuffed by a CustomRole
  • Escaped handcuffed by a vanilla Team The syntax is the following:
role_after_escape:
  <condition>: <result>
  # This is the example condition for the cuffed escape
  cuffed by <CustomRole/InternalTeam> <CustomRole Id/InternalTeam enum>: <InternalRole/CustomRole> <InternalRole enum/CustomRole Id>

Example:

role_after_escape:
  default: InternalRole Spectator
  cuffed by InternalTeam ChaosInsurgency: InternalRole ClassD

Health management

You can manage Health, Max Health and the Hume Shield through the HealtBehaviour class.
Here the params:

C#

        public float Amount { get; set; } = 100;
        public float Maximum { get; set; } = 100;
        public float HumeShield { get; set; } = 0;
        public float HumeShieldRegenerationAmount { get; set; } = 2;
        public float HumeShieldRegenerationDelay { get; set; } = 7.5f;

YAML

    amount: 100
    maximum: 100
    hume_shield: 0
    hume_shield_regeneration_amount: 2
    hume_shield_regeneration_delay: 7.5

Caution

The hume_shield value won't be displayed if the role is not an SCP but the shield will be there and will be active!

Artificial Health (AHP) management

You can manage the Artificial Health (AHP) and the related params through the class AhpBehaviour.
Here the params:

C#

        public float Amount { get; set; } = 0;
        public float Limit { get; set; } = 75;
        public float Decay { get; set; } = 1.2f;
        public float Efficacy { get; set; } = 0.7f;
        public float Sustain { get; set; } = 0f;
        public bool Persistant { get; set; } = false;

YAML

    amount: 0
    limit: 75
    decay: 1.2
    efficacy: 0.7
    sustain: 0
    persistant: false

Stamina management

You can also handle the stamina through it's class, StaminaBehaviour.
Here the params:

C#

        public float RegenMultiplier { get; set; } = 1;
        public float UsageMultiplier { get; set; } = 1;
        public bool Infinite { get; set; } = false;

YAML

    regen_multiplier: 1
    usage_multiplier: 1
    infinite: false

Spawn Behaviour

Every param that is supposed to handle the spawn of the role has now been grouped into a single class, in order to make the things more easy for other plugins to use UCR while using also their spawn system.
Here the params:

C#

        public List<RoleTypeId> CanReplaceRoles { get; set; } = new()
        {
            RoleTypeId.ClassD
        };
        public int MaxPlayers { get; set; } = 10;
        public int MinPlayers { get; set; } = 1;
        public int SpawnChance { get; set; } = 60;
        public SpawnLocationType Spawn { get; set; } = SpawnLocationType.RoomsSpawn;
        public List<ZoneType> SpawnZones { get; set; } = new();
        public List<RoomType> SpawnRooms { get; set; } = new()
        {
            RoomType.LczClassDSpawn
        };
        public List<string>? SpawnPoint { get; set; } = null
        public string? RequiredPermission { get; set; } = string.Empty;

YAML

    max_players: 5
    min_players: 1
    spawn_chance: 60
    can_replace_roles:
    - ClassD
    spawn: RoomsSpawn
    spawn_zones: []
    spawn_rooms:
    - LczToilets
    spawn_point:
    required_permissions

List<[enum]RoleTypeId> can_replace_roles

Defines the roles that can be replaced by this custom role. For example if the list contains only NtfPrivate a NtfCaptain won't never be this role.

int max_players

The max number of players that can be spawned with this role.

int min_players

The minimum number of players in the server to allow the spawn of this role.

int spawn_chance

Defines the spawn chance for this role in percentage, 0 is never and 100 is always

[enum]SpawnLocationType spawn

Define the spawn location type, read more here

List<[enum]ZoneType> spawn_zones

Define a list of zones that will be the spawnpoint for the role if spawn is ZoneSpawn. The choice is randomic.

List<[enum]RoomTypeId> spawn_rooms

Define a list of rooms that will be the spawnpoint for the role if spawn is RoomsSpawn. The choice is randomic.

List<string>? spawn_point

The name of the targeted SpawnPoint(s).

string required_permission

If not null or empty impose that only players with that permission can spawn as this role.