Skip to content

Add support for mod credits in credit screen - #362

Open
lamali292 wants to merge 3 commits into
Alchyr:developfrom
lamali292:credits
Open

Add support for mod credits in credit screen#362
lamali292 wants to merge 3 commits into
Alchyr:developfrom
lamali292:credits

Conversation

@lamali292

Copy link
Copy Markdown
Contributor

Add mod credits to the credits screen

Mods can now register their own sections on the in-game credits screen. A — MODS —
banner separates modded content from vanilla, each mod gets its own titled block, and
a fixed side-navigation list lets you jump straight to the top of the vanilla credits
or to any mod's section (mouse, keyboard, and controller).

Usage

Register at load time, using your mod id or any type from your assembly:

ModCredits.Register(ModId,
    new ModCredits.Section("TEAM",   ModCredits.Layout.Roles),
    new ModCredits.Section("HELP",   ModCredits.Layout.Roles),
    new ModCredits.Section("ART",    ModCredits.Layout.Names),
    new ModCredits.Section("LOC",    ModCredits.Layout.Roles),
    new ModCredits.Section("TESTER", ModCredits.Layout.Columns3));

Layouts

Layout Description .names format
Roles Two columns, role beside name Developer||Name 1\nArtist||Name 2
Names Single column of names Name 1\nName 2\nName 3
Columns3 Three columns of names, playtester-style Name 1\nName 2\nName 3

Localization

All text is read from the vanilla credits loc table, namespaced by mod id
(<MODID>-<SECTION>.header / .names, plus <MODID>-<MODID>.title for the block title):

{
  "DOWNFALL-DOWNFALL.title": "Downfall",

  "DOWNFALL-TEAM.header": "Team",
  "DOWNFALL-TEAM.names": "Lead Developer||Name 1\nConcept & Balance||Name 2",

  "DOWNFALL-HELP.header": "Programming & Bug Fixes",
  "DOWNFALL-HELP.names": "Bug Fixes & Code Cleanup||Name 3\nBug Fixes||Name 4",

  "DOWNFALL-ART.header": "Art",
  "DOWNFALL-ART.names": "Name 5\nName 6",

  "DOWNFALL-LOC.header": "Localization",
  "DOWNFALL-LOC.names": "Language||Name 7\nLanguage||TODO\nLanguage||Name 8",

  "DOWNFALL-TESTER.header": "Playtester",
  "DOWNFALL-TESTER.names": "Name 9\nName 10\nName 11\nName 12\nName 13"
}

The section id (TEAM, HELP, …) is just the loc-key stub and is independent of the
visible .header text, so a single-person section can still read "Developer" or
"Author" on screen.

Demo

2026-07-27.12-56-22.mp4

@lamali292

lamali292 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

added nested sections

i.e as an example a localization section with a green header grouped together like in base game

grafik
   ModCredits.Register<DownfallMainFile>(
            new ModCredits.Section("TEAM", ModCredits.Layout.Roles),
            new ModCredits.Section("HELP", ModCredits.Layout.Roles),
            new ModCredits.Section("ART"),
            new ModCredits.Section("LOC", Children: [
                new ModCredits.Section("LOC_ZHS"),
                new ModCredits.Section("LOC_FRA"),
                new ModCredits.Section("LOC_ITA"),
                new ModCredits.Section("LOC_RUS"),
                new ModCredits.Section("LOC_KOR"),
                new ModCredits.Section("LOC_JPN"),
                new ModCredits.Section("LOC_PTB"),
                new ModCredits.Section("LOC_DEU")
            ])
            );

Removed 'MegaInput.accept' from ConfirmActions array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant