Skip to content

Specifics

FoxWorn3365 edited this page Dec 21, 2023 · 26 revisions

UncomplicatedCustomRoles - Specifics

This page contains all the noteworthy specifications

Placeholders for the Display Nickname

Well yes, to make it cooler, we decided to integrate placeholders so that the user's nickname can be changed in a better way according to the role.
Remember, to prevent this from being applied put the field to null!

  • %name% -> The player real nickname
  • %dnumber% -> A random integer between 1000 and 9999 for D numbers
  • %o5number% -> A random integer between 1 and 10 for O5 numbers

Example:

display_nickname: 'Dr. %name%'

Result: Dr. FoxWorn3365

Vector3 notation for External Custom Roles

Any role that is created and saved in an external file other than the general configuration is automatically recognized by the plugin as an ExternalCustomRole and is loaded in a specific way.
This is because the vectors here are not object Vector3 but are simple strings with the following notation:

"x, y, z"

so

string Coords = "1, 1.5, 5";
// IS EQUAL TO
Vector3 Coords = new(1, 1.5, 5);

Defining the spawn location with SpawnLocationType

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

  • CompleteRandomSpawn
  • ZoneSpawn
  • RoomsSpawn
  • PositionSpawn
  • KeepRoleSpawn

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 exampe LczToilets) and the spawn manager will pick a random item from the list and spawnt the player at that room.

PositionSpawn

This flag means that you can define the spawn position using coordinates (x, y, z).

KeepRoleSpawn

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

EXILED Enums

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

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; }

YAML

Here you should understand :/

  duration: 5,
  effect_type: Bleeding,
  intensity: 1

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