MoreBadges

版本 v0.3.5·更新於 2026-03-31

Helps modders add custom badges to their mods and the ability to make their custom cosmetics unlockable through badges.

截圖 共 5 張

模組介紹 作者原文

More Badges

Helps modders add custom badges to their mods and the ability to make their custom cosmetics unlockable through badges

To Modders

As this mod is in its early stages, I would appreciate if any modders who have issues with the mod or have suggestions for improvements, to please reach out to me. The best way to reach me is through the More Badges thread on the Peak modding discord server.

Peak Modding Discord Server

Guide

This guide will be improved in future updates as the mod matures.

To add a custom badge, you will first need to download this mod and place the dll file as a reference in your mod project. For now, the easiest way to ensure that your mod loads after More Badges is to add a dependancy at the top of your plugin file.

[BepInDependency("com.snosz.morebadges", BepInDependency.DependencyFlags.HardDependency)]

This mod currently relies on the badge name being unique and consistent. To ensure this we add some constants so that we can easily use them later and only need to define the badge names once. The recommended format for badge names are below, dont worry the display name can be whatever you like.

public static class BadgeNames

{

// The ideal format for your badge names would be something like Badge_ModName_BadgeName

public const string BonkBadge = "Badge_BonkBadge_Bonk";

public const string ExtraBonksBadge = "Badge_BonkBadge_ExtraBonks";

}

There are two types of badges, persistent badges which track progress across all runs such as for example a 3 consecutive expedition victories badge, and a run based badge, which requires the player to meet the conditions in a single run otherwise the progress will reset. Unlocking either type of badge is permanent and will save to a badges.json file in the mod folder, and when the player loads the game back up the unlocked badges will be there.

With the mod added as a reference, you can add new badges either Programmatically, or load it via AssetBundle.

(To find out more about the AssetBundle method go down to Further Info)

AssetBundle:

byte bundleBytes = Resource1.custombadges;

badgesBundle = AssetBundle.LoadFromMemory(bundleBytes);

MoreBadgesPlugin.RegisterBadgeAssetBundle(badgesBundle);

// If using MoreCustomizations, do this instead

// MoreBadgesPlugin.RegisterBadgeAssetBundle(badgesBundle, Assembly.GetExecutingAssembly().Location);

Programmatically:

// This adds a badge that will trigger as soon as the condition has been met.

MoreBadgesPlugin.CustomBadge bonkBadge = new MoreBadgesPlugin.CustomBadge(

name: BadgeNames.BonkBadge, // Using the BadgeNames const to avoid typos!

displayName: "BONK BADGE", // All uppercase to match in game badge name display

description: "Bonk yourself with a coconut.",

icon: bonkBadgeIcon //128x128 Texture2D

);

// This adds a badge that will trigger only if the conditions are met during a single expedition.

MoreBadgesPlugin.CustomBadge extraBonkBadge = new MoreBadgesPlugin.CustomBadge(

name: BadgeNames.ExtraBonksBadge,

displayName: "EXTRA BONKS BADGE",

description: "Bonk yourself 2 times with a coconut in a single expedition.",

icon: extraBonkBadgeIcon, //256x256 Texture2D

progressRequired: 2, // How many times the condition needs to be met to unlock the badge. Defaults to 1

runBasedProgress: true // This determines if the badge progress is reset every expedition. Defaults to false,

//nameLocalizations: nameLocalizations // If you want to support more than just english, you can pass a list containing translated strings in the appropriate order

//descriptionLocalizations: descriptionLocalizations

);

By default, if no localization lists are passed through, it will automatically create one with the default language being english.

To create a localization, you must create a list and add the translated strings to the appropriate index as shown below:

English = 0,

French = 1,

Italian = 2,

German = 3,

SpanishSpain = 4,

SpanishLatam = 5,

BRPortuguese = 6,

Russian = 7,

Ukrainian = 8,

SimplifiedChinese = 9,

T

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack_PEAK

檔案與校驗

檔案名稱
MoreBadges-0.3.5.zip
檔案大小
113.3 KiB