[IDEA] CustomRoles & CustomItems
Goal Description
1. Custom Role API
Currently, roles are hardcoded (Class-D, Scientist, SCPs, MTF, Chaos). A CustomRole system would allow developers to add new roles with unique behaviors.
Proposal:
Add a CustomRole base class with properties like name, team, spawn location,abilities.
Allow plugins to register and assign these roles dynamically.
Code Example:
public class NinjaRole : CustomRole
{
public override string Name => "Ninja";
public override Team Team => RoleTypeId.ChaosRepressor;
public override void OnSpawn(Player player)
{
player.Broadcast(5, "You are the <color=red>Ninja</color>!");
}
public override void OnAbilityUse(Player player)
{
//123
}
}
2. Custom Item API
Right now, only vanilla SCP:SL items exist. Adding new items requires skills.
Proposal:
Introduce CustomItem class.
Allow registering new items with icons, effects, and actions (like right-click ability).
Code Example:
public class MedkitPlus : CustomItem
{
public override string Name => "Medkit+";
public override ItemType BaseItem => ItemTypeId.Medkit;
public override void OnUse(Player player)
{
player.Broadcast(3, "You used a <b>Medkit+</b>!");
}
}
Custom Roles and Items wont be implemented into LabAPI afaik
You'll have to rely on custom systems or this suggestion : https://github.com/northwood-studios/LabAPI/issues/40
90% of stuff is possible, including abilities
ill do my own api.
Thank you for your suggestion! We've logged this issue in our internal git system for further review and tracking. Please note that this doesn't guarantee acceptance or implementation at this stage. If we need any additional information or clarification, we'll be sure to reach out to you.
We've reopened this suggestion to prevent confusion and duplicate posts. As stated before, the issue has been added to our internal tracker, but that does not guarantee acceptance nor implementation.