Back to NxLabs

NxLabs / Vintage Story

Zero Loss Coke

HBy harukadev

Removes the random 50% loss when converting coal to coke, ensuring you always get maximum yield. Ser

Description

ZeroLossCoke

No More 50% Loss When Producing Coke in Vintage Story

ZeroLossCoke removes the hardcoded coke yield loss from vanilla coal conversion, ensuring predictable, configurable, and server-safe results using clean Harmony Postfix patches.

📋 Features

  • Full Coke Yield – Eliminates the vanilla 50% conversion loss
  • Configurable Output – Yield multiplier with optional min/max limits
  • Server-Safe Patching – Uses Postfix only (no Transpilers, no IL hacks)
  • Zero Performance Impact – No extra ticks, loops, or allocations
  • Optional Debug Logging – Transparent server-side logging for admins

⚙️ Configuration

On first launch, the mod generates zerolosscoke.json with the following defaults:

<pre>{ "YieldMultiplier": 2.0, "MinYield": 0, "MaxYield": 0, "DebugLogging": true }</pre>

Settings Explanation

<table> <thead> <tr> <th>Setting</th> <th>Type</th> <th>Default</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>YieldMultiplier</td> <td>float</td> <td>2.0</td> <td>Final coke multiplier (2.0 = 100% yield, 1.0 = vanilla behavior)</td> </tr> <tr> <td>MinYield</td> <td>int</td> <td>0</td> <td>Guaranteed minimum output (0 disables the limit)</td> </tr> <tr> <td>MaxYield</td> <td>int</td> <td>0</td> <td>Hard cap for output amount (0 = unlimited)</td> </tr> <tr> <td>DebugLogging</td> <td>bool</td> <td>true</td> <td>Enable detailed server-side conversion logs</td> </tr> </tbody> </table>

🎮 How It Works

  1. Build a valid coke oven using refractory blocks and a door
  2. Place bituminous coal piles inside
  3. Ignite the oven and wait for the burn cycle to complete
  4. Receive the full configured coke yield

Example: 16 coal &rarr; 16 coke (instead of the vanilla 8)

🔧 Compatibility

  • Vintage Story: 1.20.x &ndash; 1.21.x (GitHub Releases for 1.20)
  • Multiplayer: Fully server-side, clients do not need the mod
  • Other Mods: Compatible with most mods that do not replace coal pile logic

💻 Technical Notes

ZeroLossCoke applies a Harmony Postfix patch to BlockEntityCoalPile.OnBurningTickServer(), adjusting the final output after the vanilla logic completes. No IL rewriting, reflection tricks, or unsafe hooks are used.

❓ Support &amp; Issues

  • Bug reports and feature requests: GitHub repository
  • General discussion: Vintage Story modding forum
  • Debugging: Check server logs for [ZeroLossCoke] entries

"Because losing half your coke was never good game design." 🏭🔥

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.