Skip to content
TayTay edited this page Jun 9, 2024 · 1 revision

This is the base plugin that adds central functionality to most of my other plugins.

Functionality

  • NPC spawning and AI management, and Pathfinding
  • Player scale management
  • HUD management
  • More Exiled Events
  • Weighted Random lists
  • Optional plugin/object references
  • Simplified Reflection handling
  • Misc utility classes
  • Unity components for adding to game objects

NPCs

Commands

  • npc spawn <Name> <Role> <TargetPlayer> Summons an NPC at the location of TargetPlayer (Defaults to command sender)
  • npc remove <npc> Kicks the NPC in the argument, or attempts to get one the command sender is looking at

Scale

Adds the following method to the Exiled Player class

Player.ChangeSize(float size) // Uniform scaling
Player.ChangeSize(Vector3 size) // Non-uniform scaling

These will change the players size over time rather than instantly as increasing size can sometimes force a player through the floor.

HUD

Adds the following methods to the Exiled Player class to add a Heads Up Display to the player which updates over time using the Hint system

Player.GetHUD() // Gets the HUD object for the player
Player.SetHUDLayout(HUDLayout layout) // Sets the element layout for the HUD
Player.TryGetHUD(out HUD gameHUD) // Attempts to get the HUD for the player, if 
Player.GetHUDLayout<T:HUDLayout>() // Gets the current element layout for the HUD
Player.ShowHUDHint(string text, float duration = 3f) // A special "ShowHint" method that respects the HUD system

Events

Optionals

OptionalReference

if(OptionalReference.Create(object, out OptionalReference optional)){
    optional.CallMethod("name", true, 1, "argument")
    float hp = (float) optional.GetOrSetField("Health")
    optional.GetOrSetField<float>("Health")
    optional.GetOrSetField("Health", 100)
    
}
OptionalPlugin

if(OptionalPlugin.GetPlugin("SCriPt", out OptionalPlugin plugin)){
    plugin.CallMethod("AccessAPI", this, "string")
    plugin.GetOrSetField<bool>("OtherVariable", true)
}

Clone this wiki locally