/Qurre

Simple, convenient and functional plugin loader for SCP: Secret Laboratory

Primary LanguageC#Apache License 2.0Apache-2.0

Discord Downloads Release

Qurre

Simple, convenient and functional plugin loader for SCP: Secret Laboratory

Select language

EN RU

Installation

  1. Download Qurre.tar.gz file from releases
  2. Move Qurre folder into %appdata% (on Linux: ~/.config)
  3. Move Assembly-CSharp.dll into game folder: SCPSL_Data/Managed (with file replacement)
  4. That's all, you have successfully installed Qurre

Documentation

Coming soon

Configs

Configs are in JSON format and are located in %appdata%/Qurre/Configs

You can see the contents of the config after installing Qurre

Plugin Examples

*Coming soon

Small plugin example (to be removed after normal examples appear)

What is important to know:

  1. Method [PluginEnable] & [PluginDisable] must be static
  2. The [EventMethod] event method can be non-static, but for better performance, it is better to use a static method
using Qurre.API;
using Qurre.API.Attributes;
using Qurre.Events;
using Qurre.Events.Structs;

[PluginInit("MyPlugin", "Qurre Team", "1.0.0")]
static class Plugin
{
    [PluginEnable] // Similarly, you can use [PluginDisable]
    static internal void Enabled()
    {
        Log.Info("Plugin Enabled");
    }
    
    [EventMethod(PlayerEvents.Join)]
    static internal void Join(JoinEvent ev)
    {
        Log.Info($"Player {ev.Player?.UserInfomation.Nickname} joined");
    }
    
    [EventMethod(PlayerEvents.PickupArmor)]
    [EventMethod(PlayerEvents.PickupItem)]
    static internal void TestMultiple(IBaseEvent ev)
    {
        if (ev is PickupArmorEvent ev1)
        {
            Log.Info($"Armor; Pl: {ev1.Player?.UserInfomation.Nickname}; Item: {ev1.Pickup?.Serial}");
            //ev1.Allowed = false;
        }
        else if (ev is PickupItemEvent ev2)
        {
            Log.Info($"Item; Pl: {ev2.Player?.UserInfomation.Nickname}; Item: {ev2.Pickup?.Serial}");
            //ev2.Allowed = false;
        }
    }
}

Credits

0Harmony - Owned by Andreas Pardeike

Newtonsoft.Json - Owned by James Newton-King

Assembly-CSharp - Owned by Northwood Studios

Because we are writing code for one game, it can be similar to the code of other plugin loaders {Exiled or Synapse} (Always can carp to something somehow)