LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[IDEA] CustomRoles & CustomItems

Open seksirakun opened this issue 1 year ago • 5 comments

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>!");
    }
}

seksirakun avatar Oct 01 '25 14:10 seksirakun

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

obvEve avatar Oct 01 '25 14:10 obvEve

90% of stuff is possible, including abilities

obvEve avatar Oct 01 '25 14:10 obvEve

ill do my own api.

seksirakun avatar Oct 01 '25 14:10 seksirakun

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.

Jesus-QC avatar Oct 14 '25 09:10 Jesus-QC

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.

Axwabo avatar Apr 28 '26 07:04 Axwabo