Here I go again fixing Rust bugs 😛

I’m sitting down and deciding I need to tweak the decay values for my 1000X battlefield server. Players get 1000X the stuff, so they build these massive castles and compounds that last the entire wipe, even when not in use and result in a massive amount of lag. I could use a plugin, but I’d actually rather leverage the built-in decay system. Luckily Rust includes a bunch of convars to tweak it to your needs.

Of these, there are 8 that interest me:

bracket_0_blockcount
bracket_0_costfraction
bracket_1_blockcount
bracket_1_costfraction
bracket_2_blockcount
bracket_2_costfraction
bracket_3_blockcount
bracket_3_costfraction

My goal being to sit in front of a tool cupboard, modify these values and empirically see how it impacts decay at various block counts. Except it wouldn’t. So I go poking around and find this:

If you haven’t picked up on it, these values get set exactly once. Any attempt to change them does nothing because they’re referenced in this static array. Updating these values requires a restart. Nobody has time for that. It’s 5+ minutes to start the Rust server and 5+ minutes to load into it. I want to play with this on the fly. Honestly this just has to be some kind of oversight, and I don’t know if its always been like this, I swear you could update these values before.

Anyway, I threw a Harmony mod together really quick to add a decay.reload command to the console so you can refresh this properly. I didn’t bundle this up into anything fancy, it’s a gist so you can figure out how to build it using my previous posts.

DecayReloader.cs