CosmeticTokenPriorityUse
【Client MOD】Uses cosmetic tokens from high rarity by default, or from low rarity while holding Shift.Use the initial high level of レアリティからコスメトークンを, Shift キーを thrust the しながら use the すると low レアリティから use the します
About this mod Author’s original text
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
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: