Skip to content

Add support for custom badges#143

Open
lamali292 wants to merge 5 commits intoAlchyr:developfrom
lamali292:master
Open

Add support for custom badges#143
lamali292 wants to merge 5 commits intoAlchyr:developfrom
lamali292:master

Conversation

@lamali292
Copy link
Copy Markdown
Contributor

@lamali292 lamali292 commented Apr 12, 2026

It's probably not worth pulling it directly, as this would destroy the compatibility with the main branch, since there are no badges on the main branch.
But it's maybe something to look into later
(and maybe even improve my version)

Custom badge implementation

public class MyBadge(SerializableRun run, ulong playerId) : CustomBadge(run, playerId)
{
    public override BadgeRarity Rarity => BadgeRarity.Silver;          // rarity condition
    public override string CustomBadgeIconPath => "res://path/to/icon.png";
    public override bool RequiresWin => false;                         // available on win or loss
    public override bool MultiplayerOnly => false;                     // available in multiplayer only
    public override bool IsObtained() => true;                         // when should this badge be obtained
}

Localization in badges.json

{
    "DOWNFALL-MY_BADGE.title": "My Cool Badge",
    "DOWNFALL-MY_BADGE.description": "My Cool Badge Description"
}

lamali and others added 2 commits April 12, 2026 08:19
Removed logging statements for badge addition.
@lamali292
Copy link
Copy Markdown
Contributor Author

and i really dont like the AssetCacheLoadAssetPatch either.
It's only there to avoid errors, as I only postfix the missing texture in the other patch.
probably il transpiler surgery can do that better

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.

2 participants