True1 5x
Patches drop scaling to roll the remainder instead of rounding up.
模組介紹 作者原文
NOT TESTED IN MULTIPLAYER
DOES NOT AFFECT DROP CHANCES, ONLY AMOUNTS
True 1.5x
Patches drop scaling to roll for the remainder instead of rounding up. In 1.5x resourceRate this means a dandelion for example won't always drop 2 items. It will drop 1 and flip a coin to drop another.
Also includes a fix for a discrepancy in the code causing wrongly scaled drops when playing with modified resource rates.
FAQ
Is it laggy?
Probably not. I couldn't see a difference even when popping objects with 50+ nodes.
Does it work in multiplayer?
I haven't tested it in multiplayer but I assume if you own the GameObject that's handling the drop method it should apply the patch accordingly.
How does the rounding patch work?
By default the game rounds float values up. So if the resourceRate is set to 1.5x, items that usually drop 1 will drop 1.5 items. Of course you can't drop half an item so it rounds up to 2. Even something that drops 1.01 items (theoretically) would be rounded up to 2. This mod replaces the rounding method with a method that rolls the remainder to add one or not. So if something drops 1.5 items, it will drop one and then roll a 50% chance to add another. If something drops 1.25 items, it will drop one and roll a 25% chance to add another, etc.
What does the range patch do?
There's a discrepancy in the game code where different methods are used to calculate a random range depending on the resourceRate. By default (1x resourceRate) the game uses integers when rolling how many items to drop. For example, the Deer prefab drops 1-3 deer hide. So it puts the minimum drop and the maximum drop into Random.Range(min, max) which generates a random number between 1 and 3. But wait, deer only drop 1-2 hide right? That's because the Random.Range(int, int) method is non-inclusive. Meaning that, although you put 3 as the max, it truncates down to 2. So deer only drop 1 or 2 hide, averaging to 1.5.
However, when modified resourceRates are active (any other than 1x) then the game uses Random.Range(float, float) which IS inclusive. So now the result is any float between 1.0 and 3.0. Just this discrepancy, before the resourceRate multiplier is even applied, changes the average to 2.0 when the default is 1.5.
Here's an example: We kill a deer and it rolls to drop 2.6 hide. At the default 1x resourceRate this value would be truncated to 2. With 2x resourceRate it multiplies it to be 5.2. Then it rounds it up to 6. So somehow, by turning on 2x drop rates, something that usually can only drop 2 items drops 6! That's not 2x. To fix it I added a patch to the method that minuses 1 from the max. This is combination with the rounding patch fixes the discrepancy and the average.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。
下面這些內容需要先安裝,否則該模組不會生效: