Relatude Help

Settings

Settings<TDefinition>() registers a Relatude.DB custom settings set. It gets its own tab in the admin UI, beside each database's settings or the server's, as Scope says:

public class EventSettings {
    public bool RegistrationOpen { get; set; } = true;
    public int DefaultCapacity { get; set; } = 40;
}

public class EventSettingsDefinition : ICustomSettingsDefinition<EventSettings> {
    public string FileKey => "events";
    public string Title => "Events";
    public CustomSettingsScope Scope => CustomSettingsScope.Database;      // or Server
}

var settings = db.Settings.TryGet<EventSettings>(out var s) ? s : new();   // works where it is not registered

A server set is read with RelatudeDBRuntime.Server.CustomSettings.Get<T>(). The Relatude.DB manual describes settings sets in full (custom settings).