Skip to content

Specifics

FoxWorn3365 edited this page Apr 22, 2024 · 5 revisions

This page contains every specifications that is needed to be able to use the plugin correctly.

Custom Item types

Our plugin handle different items in different ways.
At the moment the only available types are the following:

Every type has a different custom_data


Item

An Item is a simple item that can trigger an event (or a command) by triggering it's event.
This is the custom_data of an Item (first C# and then YAML):

C#

        public abstract ItemEvents Event { get; set; }
        public abstract string? Command { get; set; }
        public abstract string ConsoleMessage { get; set; }
        public abstract string BroadcastMessage { get; set; }
        public abstract ushort BroadcastDuration { get; set; }
        public abstract string HintMessage { get; set; }
        public abstract float HintDuration { get; set; }

YAML

    custom_data:
      event: Command
      command: /SERVER_EVENT DETONATION_INSTANT
      console_message: UHUHUHUH!
      broadcast_message: The broadcast uuhh!!!
      broadcast_duration: 3
      hint_message: Yamato is a femboy

[enum]ItemEvents event

The events that triggers the command and the response.

string command

The command that will be executed when event is fired.
Null or empty to disable.

string console_message

The message that the player will receive in the console.
Empty to disable.

string broadcast_message

The message that the player will receive as a broadcast.
Empty to disable.

ushort broadcast_duration

The duration of the broadcast.

string hint_message

The message that the player will receive as a hint.
Empty to disable.

float hint_duration

The duration of the hint.


Weapon

A Weapon is an item able to shoot.
This is the custom_data of a Weapon (first C# and then YAML):

C#

        public abstract float Damage { get; set; }
        public abstract float FireRate { get; set; }
        public abstract byte MaxAmmo { get; set; }

YAML

    custom_data:
      damage: 2.75
      fire_rate: 0.35
      max_ammo: 20

float damage

The damage done by the weapon.
< 0 to heal.

float fire_rate

The fire rate, only for automatic weapons.

byte max_ammo

The max number of ammo that this weapon has.


Armor

An Armor is an item able to reduce damage.
This is the custom_data of an Armor (first C# and then YAML):

C#

        public abstract int HeadProtection { get; set; }
        public abstract int BodyProtection { get; set; }
        public abstract bool RemoveExcessOnDrop { get; set; }
        public abstract float StaminaUseMultiplier { get; set; }

YAML

    custom_data:
      head_protection: 2
      body_protection: 3
      remove_excess_on_drop: true
      stamina_use_multiplier: 1.5

int head_protection

The Head protection of the armor.

int body_protection

The Body protection of the armor.

bool remove_excess_on_drop

If the ammo should be dropped when the armor is dropped.

float stamina_use_multiplier

The stamina that is consumed, higher is more stamina.


Keycard

A Keycard is a simple keycard with custom permissions.
This is the custom_data of a Keycard (first C# and then YAML):

C#

        public abstract KeycardPermissions Permissions { get; set; }

YAML

    custom_data:
      permissions: Checkpoints

[enum]KeycardPermissions permissions

The permissions of the keycard.


Enums

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