CosmeticTokenPriorityUse

版本 v4.0.1·更新於 2026-05-24

【Client MOD】Uses cosmetic tokens from high rarity by default, or from low rarity while holding Shift.初期値では高レアリティからコスメトークンを使用し、Shiftキーを押しながら使用すると低レアリティから使用します

模組介紹 作者原文

COMPATIBLE WITH R.E.P.O. V0.4.4.

Cosmetic Token Priority Use

This mod is a client-only mod that lets you choose the cosmetic token consumption order and temporarily reverse it by holding Shift.

Overview

Vanilla R.E.P.O. uses the newest cosmetic token first because the gacha machine reads and removes the last token in the saved token list.

This mod changes the token used right before the gacha machine starts.

It searches your owned tokens and moves the best eligible token to the end of the list so the vanilla gacha logic can consume it normally.

The token priority order can be changed from config.

Default order:

  • UltraRare
  • Rare
  • Uncommon
  • Common

Alternative order:

  • Common
  • Uncommon
  • Rare
  • UltraRare

If all cosmetics in a rarity are already unlocked, that rarity is skipped.

For example, if the current order starts from UltraRare and you own an UltraRare token but all UltraRare cosmetics are already unlocked, the mod will try Rare next.

Shift reverse behavior

When you hold Shift while using the cosmetic gacha machine, the configured order is reversed only for that use.

  • HighRarityFirst normally uses UltraRare, Rare, Uncommon, Common.
  • HighRarityFirst with Shift uses Common, Uncommon, Rare, UltraRare.
  • LowRarityFirst normally uses Common, Uncommon, Rare, UltraRare.
  • LowRarityFirst with Shift uses UltraRare, Rare, Uncommon, Common.

This is useful when you normally want to spend high rarity tokens first, but temporarily want to spend lower rarity tokens without changing the config.

Behavior

  • Only affects the player who installed the mod.
  • Does not change gacha animation, reward unlock logic, save logic, RPC logic, or vanilla token removal logic.
  • Does not permanently sort all tokens.
  • Only moves one selected token to the end of the list when the gacha machine is used.
  • Keeps the remaining token order as close to vanilla as possible.
  • Uses the same configured order for both normal locked-cosmetic selection and all-unlocked fallback selection.

When all cosmetics are unlocked

When all valid cosmetics are already unlocked, the mod cannot select a token based on locked cosmetics.

In that case, the mod uses the same General.TokenUseOrder config.

Holding Shift also reverses this fallback order.

Multiplayer

This is a client-only mod.

Each player has their own local cosmetic tokens and cosmetic unlock data.

Because of that, the host cannot control another player's token consumption order with a host-only mod.

If every player wants this behavior, every player needs to install the mod.

Configuration

General.Enabled

Enables this mod.

  • Default: true
  • Minimum: false
  • Maximum: true

General.TokenUseOrder

Token priority order used when selecting the next cosmetic token.

  • Default: HighRarityFirst
  • Valid values: HighRarityFirst, LowRarityFirst
  • HighRarityFirst: UltraRare, Rare, Uncommon, Common
  • LowRarityFirst: Common, Uncommon, Rare, UltraRare

General.RefreshTokenUIAfterReorder

Updates the token UI after internally moving the selected token.

  • Default: true
  • Minimum: false
  • Maximum: true

Debug.DebugLogSelectedToken

Outputs the selected token rarity, selection reason, and Shift reverse state to the BepInEx log.

  • Default: false
  • Minimum: false
  • Maximum: true

Upgrade notes

General.AllCosmeticsUnlockedOrder from v4.0.0 is no longer used.

The new General.TokenUseOrder config controls both normal token selection and all-unlocked fallback selection.

If the old config remains in your config file, it can be ignored or deleted manually.

Notes for developers

The mod patches CosmeticShopMachine.Interact() with a Harmony Prefix.

It does not skip the original method.

Instead, it prepares MetaManager.cosmeticTokens before vanilla code reads cosmeticTokens[cosmeticTokens.Count - 1].

The selected token is moved to the end of the list so vanilla CosmeticTokenRemove() still removes the correct token.

This avoids rewriting the reward, unlock, save, and RPC flow.

The Shift key state is checked only at

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

BepInEx-BepInExPack

檔案與校驗

檔案名稱
CosmeticTokenPriorityUse-4.0.1.zip
檔案大小
137.2 KiB