UltraAchievements Revamped
A Mod which adds a few Achievements to Ultrakill
截圖 共 3 張
模組介紹 作者原文
UltraAchievements-Revamped
AI Disclaimer: Claude Code was used to review and identify issues in the codebase. All code was written by me.
UltraAchievements-Revamped is both a mod and library for the hit indie game ULTRAKILL. The Core (library) provides utilities for mod developers to create their own achievements. The Mod uses the library to add 15 achievements that are interesting compared to basic progression achievements (of which there are none in this mod).
Trailer:
Limitations
- Completed achievements are displayed inside the in-game Shop UI, which can be accessed by clicking on the SmileOS icon in the top left of the Shop UI. This may lead to conflicts with other mods which also use the same icon.
- The settings menu currently doesn't work. It'll probably have settings for the Achievement PopUp in a future version.
- Achievements currently don't have icons. This is a WIP which will be done in a later version.
Installation
Both the Mod and Core can be installed the same way. Choose whichever method works best for you:
- (Recommended) - Install via the release published using a mod manager like r2ModMan. This will automatically detect your ULTRAKILL install and handle all setup for you. Here are the Mod and Core links
- Manual - Download the latest release from GitHub Releases, set up BepInEx manually for ULTRAKILL, then move release files into a subfolder in the BepInEx plugins folder.
- Build from source - See Building from Source below.
Using the Library
UltraAchievementsRevamped.Core is a library that lets mod developers add custom achievements to ULTRAKILL. It handles saving, loading, and in-game display, so you only need to define what an achievement is and when it should be unlocked. To get started, create a new C# project from scratch or use the ULTRAKILL Template Project, which sets up all the necessary boilerplate.
Creating an Achievement
Achievements can be created in two ways, as a Unity ScriptableObject or entirely in code. This guide covers the code approach, so you don't need Unity set up.
Create an AchievementInfo
Call AchievementInfo.Create() or ProgressiveAchievementInfo.Create() to create a new AchievementInfo or ProgressiveAchievementInfo instance. The sourceMod parameter should be a human-readable name for your mod, as it's used to group your achievements together in the Shop UI.
Register the achievement
Call AchievementManager.RegisterAchievementInfos(infos) to register it. Once registered, the achievement will appear in the Shop UI.
Mark it as complete
You need to call AchievementManager.MarkAchievementComplete(id) when the triggering event occurs in-game using a [HarmonyPatch]. To find the right method to patch, use UnityExplorer and dnSpy to identify where the event happens in the game's code.
Note: For ProgressiveAchievementInfo, completion is handled automatically once currentProgress reaches maxProgress. Use AchievementManager.AddProgressToAchievement(id, amount) to increment progress instead.
Code Sample
A complete sample Plugin.cs file based on the ULTRAKILL Template Project can be seen below. For more examples, see the UltraAchievementsRevamped.Mod folder in this repository.
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UltraAchievementsRevamped.Core.Achievements;
namespace TemplateMod;
[BepInPlugin(PluginInfo.Guid, PluginInfo.Name, PluginInfo.Version)]
[BepInDependency("protract.ultrakill.ultra_achievements_core")]
[HarmonyPatch]
public class Plugin: BaseUnityPlugin
{
private static class PluginInfo {
public const string Guid = "yourname.modname";
public const string Name = "Template";
public const string Version = "1.0.0";
}
internal new static ManualLogSource Logger;
private void Awake()
{
Logger = base.Logger;
new Harmony(PluginInfo.Guid).PatchAll();
Logger.LogInfo($"{PluginInfo.Name} v{PluginInfo.Version} has been loaded.");
var achInfo = AchievementInfo.Create(id, sourceMod, icon, displayNam
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: