Godfather-API changelog

Every release of Godfather-API, newest first.

v0.4.0

Latest

Menus, HUD stats and sights

Gamemodes can open GTA V-style menus, show stat lines in the bottom right of the HUD and give weapons their own sights.

Added

  • UI.Menu: a menu in the top left that players move through with the arrow keys, pick from with Enter and leave with Backspace; the Back event lets a menu go up a level instead of closing.
  • player.Hud.SetStat / ClearStat: stat lines in the bottom right (job, level, ...).
  • player.Hud.SetSight: a weapon's own sight for this player (HudSight: dot, cross, shotgun, scope, launcher, camera, thrown).
  • HudPiece ids for the engine's weapon wheel, radio wheel, phone and sights, so a gamemode can hide them.
  • examples/HudDemo 0.2.0: stat lines, a red-dot sight for the M4 and a menu.
Technical notes
  • Hosting: PanelState.Menu; HudCommand gains Id and Text; Runtime.HandleInput handles "menu:back". ApiVersion 0.4.0.
  • Tests: 23 (menus, Back, stats, sights).

v0.3.0

HUD and wanted level

Gamemodes can drive the GTA V-style HUD (money, strips under the radar, timers, the GPS waypoint, hiding pieces) and give players a wanted level with a police search area.

Added

  • player.Hud: Money, SetStrip/ResetStrip, StartTimer/StopTimer, SetWaypoint/ClearWaypoint, Hide/Show (HudPiece ids).
  • player.Wanted: Level 0-5, a search area that grows with the level, Seen(), and the escape rule: six seconds outside the area clears the level (Escaped event), checked by the server every tick.
  • examples/HudDemo: money, armour strip, countdown, GPS waypoint and an escape from two stars.
Technical notes
  • Hosting: HudCommand; Player gains Hud, Wanted and a protected SendHud the engine implements; Runtime.Tick updates wanted levels.
  • Tests: 19 (HUD commands, escaping, Seen, no ticking while unspawned).

v0.2.0

Sign-in support

Everything a gamemode needs for a sign-in screen: player accounts with salted, slow password hashes, a SQLite database, camera fly-overs and renaming players.

Added

  • Accounts: Create, Verify, Exists and CheckName. PBKDF2-HMAC-SHA256 with 100,000 iterations and a random salt per account; five wrong passwords lock an account for five minutes; one message for a wrong name or password.
  • Camera: player.Camera.FlyOver(Landscape), FlyTo(point, seconds) and Follow(), with Landscape.Default (Los Santos), LasVenturas, SanFierro and Orbit(...).
  • player.SetName(name), e.g. to the account name after sign-in.
  • Spawn.At(point) now finds the ground under the point.

Changed

  • Storage is one SQLite database (data/godfather/godfather.db) using the SQLite built into Windows; v0.1 JSON bucket files are imported once and kept.
Technical notes
  • Hosting: IGodfatherHost.AccountStore, IAccountStore, AccountRecord, CameraCommand, SqliteStore (winsqlite3 via P/Invoke, values as JSON through the host's IJsonCodec). Player gains SetName and a protected SendCamera the engine implements.
  • Tests: 15 (PBKDF2 test vectors, accounts, locks, SQLite persistence and no plain-text password in the file, camera).

v0.1.0

First gamemodes

Godfather v0.1 is real: gamemodes written in C# load on the Alt:SA dedicated server, greet players with glass panels, spawn them, show toasts and remember data between restarts.

Added

  • Gamemode: [Gamemode] attribute, OnServerStart, OnPlayerJoined, OnPlayerLeft, OnTick, OnServerStop, SpawnOnJoin and Players.
  • Player: Id, Name, Position, Heading, Spawn (Spawn.Default or Spawn.At), Freeze and Unfreeze, Toast, Message (chat) and Kick.
  • UI: glass panels with tabs, text, fields (password fields are never echoed), buttons in four kinds, an error line and a busy state.
  • Storage: per-player, server and named buckets of JSON values, saved every few seconds and on shutdown.
  • Hello-Godfather: an example gamemode with a welcome panel, a visit counter and a Spawn button (examples/HelloGodfather).

Changed

  • Camera control and accounts move to v0.2, with the NG-RP sign-in.
  • server.json names the gamemode in "gameMode".
Technical notes
  • src/Godfather targets netstandard2.0 with no Unity or NuGet dependencies, so it is tested on its own: dotnet run --project tests/Godfather.Tests (9 tests).
  • The engine implements Godfather.Hosting (IGodfatherHost, IStorage) in Alt-SAMP/Engine Assets/Scripts/Godfather (engine v0.9.0).

v0.0.2

Docs move to the Alt:SA wiki

The Godfather docs are now markdown in this repo and are published as part of the Alt:SA wiki at altmp.app/wiki/godfather. godfather.altmp.app redirects there.

Added

  • docs/wiki/: overview, one page per API module (Gamemode, Player, Camera, Storage, UI, Loading) and the UI kit with live previews.

Changed

  • godfather.altmp.app is retired: every old URL redirects (301) to its page on altmp.app/wiki/godfather.

Removed

  • The site/ folder, wrangler.jsonc and tools/sync-site.cjs. The site is built by Alt-SAMP/Website from docs/wiki.
Technical notes
  • Alt-SAMP/Website reads docs/wiki/** at origin/main with git (tools/sync-site.cjs), so only merged docs are published.

v0.0.1

Design and docs site

No API code yet. This release sets out the plan: a docs site, the draft v0.1 API surface, and the approved black-glass UI kit.

Added

  • godfather.altmp.app with an overview, the draft API reference, a UI kit preview, changelog and roadmap.
  • Draft v0.1 API: gamemode lifecycle, players, storage and server-driven UI.
Technical notes
  • Gamemodes will be C# class libraries loaded from the dedicated server's plugins folder by the engine's existing PluginManager, registered through GameModeManager.