Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
CosmeticGachaBugFix
【Client MOD】Fixes a bug where one specific cosmetic cannot be awarded by the cosmetic gacha.コスメティックガチャで特定のコスメ1つだけが当選できない不具合を修正します。
By REPO_JP
| Last updated | 20 hours ago |
| Total downloads | 216 |
| Total rating | 1 |
| Categories | Mods Client-side Cosmetics AI Generated |
| Dependency string | REPO_JP-CosmeticGachaBugFix-0.4.1 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
COMPATIBLE WITH COSMETICS UPDATE V0.4.0.
CosmeticGachaBugFix
This mod is a client-only bug fix mod that fixes the cosmetic token reward bug where one valid cosmetic can never be obtained from the cosmetic reward machine because its unique Index is 0.
Overview
REPO cosmetics have a unique internal value called an Index.
Most cosmetic Index values are two or three digits, but the following cosmetic is the only one with Index 0.

| Field | Value |
|---|---|
| Cosmetic | Long Sleeve |
| Name | Arm Left - Long Sleeve |
| Index | 0 |
| Rarity | Common |
| Type | ArmLeft |
| Tintable | Yes |
| Default Color | Light Green |
In the vanilla game, this cosmetic exists as a valid cosmetic asset.
However, the reward confirmation logic checks the selected reward with a condition equivalent to interactingReward > 0.
Because of that check, Index 0 is treated as invalid even though cosmeticAssets[0] is a valid cosmetic entry.
As a result, when Arm Left - Long Sleeve should be selected as the Common cosmetic reward, the game rejects it during the post-selection reward processing.
From the player side, this makes the cosmetic effectively unobtainable through the cosmetic reward machine.
Bug Details
The vanilla reward check behaves like this:
interactingReward > 0
This allows Index 1 and higher, but rejects Index 0.
That is incorrect for an array/list Index check because valid Index values start at 0.
The correct check should behave like this:
interactingReward >= 0
-1 should remain invalid because it is used as the no-cosmetic/no-reward state.
0 should be valid because it points to Arm Left - Long Sleeve.
What This Mod Fixes
This mod changes only the cosmetic reward Index validation used during the reward confirmation step.
It patches the reward processing so that:
Index 0 is accepted as a valid cosmetic reward
After this fix, Arm Left - Long Sleeve can be selected and obtained normally when the cosmetic reward machine rolls that Common cosmetic.
What This Mod Does Not Change
This mod does not change cosmetic rarity rates.
This mod does not change cosmetic token generation.
This mod does not change the locked cosmetic candidate list.
This mod does not force unlock any cosmetic.
This mod does not increase the chance of Common cosmetics.
This mod only fixes the Index 0 reward validation bug.
Mod Type
Client-only mod.
Only the player who wants this cosmetic reward bug fixed needs to install it.
※Mod created by AI
COSMETICS UPDATE V0.4.0対応済み.
CosmeticGachaBugFix 日本語説明
REPOが好きな日本人のための日本人のみのREPOのDiscordサーバーあります! 参加は以下のリンクから! https://discord.gg/h5ATY4m5bZ
このMODは、コスメティックトークン報酬でIndex 0 のコスメティックだけが正常に当選・取得できないバグを修正するクライアント専用MODです。
概要
REPOのコスメティックには、内部的に一意な値として扱われる Index があります。
通常、コスメティックのIndexは2桁または3桁ですが、以下のコスメティックだけはIndexが 0 になっています。

| 項目 | 値 |
|---|---|
| Cosmetic | Long Sleeve |
| Name | Arm Left - Long Sleeve |
| Index | 0 |
| Rarity | Common |
| Type | ArmLeft |
| Tintable | Yes |
| Default Color | Light Green |
バニラのゲームでは、このコスメティック自体は有効なコスメティックアセットとして存在しています。
しかし、報酬確定処理側で interactingReward > 0 相当の判定が使われています。
この判定により、本来は有効な cosmeticAssets[0] が無効な報酬として扱われます。
その結果、Commonコスメティックの Arm Left - Long Sleeve が選ばれるはずの場面でも、当選後の報酬処理で弾かれます。
プレイヤー目線では、このコスメティックがコスメティック報酬機から実質的に取得できない状態になります。
バグ内容
バニラの報酬判定は以下のような動作です。
interactingReward > 0
この条件ではIndex 1 以上だけが有効扱いされ、Index 0 は無効扱いされます。
しかし、配列やリストのIndexとしては 0 から始まるため、この判定は誤りです。
正しい判定は以下です。
interactingReward >= 0
-1 は候補なしや報酬なしの状態として無効のままで問題ありません。
0 は Arm Left - Long Sleeve を指す有効なIndexなので、有効扱いする必要があります。
このMODが修正する内容
このMODは、コスメティック報酬確定時のIndex判定だけを修正します。
修正内容は以下です。
Index 0 を有効なコスメティック報酬として扱う
これにより、コスメティック報酬機でCommonコスメティックの Arm Left - Long Sleeve が抽選された場合でも、無効報酬扱いされず正常に取得できるようになります。
このMODが変更しない内容
このMODはコスメティックのレアリティ確率を変更しません。
このMODはコスメティックトークン生成処理を変更しません。
このMODは未所持コスメティック候補リストを変更しません。
このMODはコスメティックを強制アンロックしません。
このMODはCommonコスメティックの出現率を上げません。
このMODはIndex 0 の報酬判定バグだけを修正します。
MOD種別
クライアント専用MODです。
このコスメティック報酬バグを修正したいプレイヤーだけが導入すれば動作します。
※AI生成MOD