Lifecycle
Server start and stop, player joined and left, each tick. The server calls you; you never poll.
Godfather is the API every Alt:SA gamemode is built on: what happens when a player joins, where they spawn, what they see on screen and what the server remembers about them. It stays small and versioned, so gamemodes keep working as the engine changes.
This is the shape v0.1 is aiming for. Names may still change before release; the API page tracks the current draft.
Godfather.API.dll and target the same .NET profile as the engine.GamemodeOverride the events you care about. Everything else has a safe default.plugins/The dedicated server loads it on start and names it in the server list.using Godfather; [Gamemode("hello-godfather", Version = "0.1.0")] public sealed class HelloGodfather : Gamemode { public override void OnPlayerJoined(Player player) { player.Freeze(); player.Camera.FlyOver(Landscape.Default); var panel = UI.Panel(player, "Welcome"); panel.Text($"Hi {player.Name}, ready?"); panel.Button("Play", () => { panel.Close(); player.Spawn(Spawn.Default); player.Toast("Good luck out there."); }); } // Stored per player on the server (SQLite by default). public override void OnPlayerLeft(Player player) => Storage.For(player).Set("lastPosition", player.Position); }
Server start and stop, player joined and left, each tick. The server calls you; you never poll.
Name, spawn, position, freeze and camera, including the landscape fly-over used behind sign-in.
A small key-value interface per player and per server, with SQLite underneath.
Black-glass panels, fields, buttons and toasts. The server decides what to show and the client draws it.
Release notes are written once as data and shown here, in the changelog and in the repository.