Odds and randomness
Learning paths through this topic
Which gun is better depends on how long the fight lasts
A weapon table with one damage-per-second number hides that guns with big magazines and slow reloads win long fights and lose short ones. Critical hits and misses change the picture again. This entry computes the damage actually dealt within a time window.
How long does a weapon really take to kill, with misses and reloads?
Balance talk is full of kill times, and the sheet and the game rarely agree. Off-by-one slips at the start and a reload hidden in the middle of a fight explain most of the gap. This entry gives the count that matches what the player sees on the clock.
A pickaxe with a break chance per swing is either useless or immortal
A small chance of breaking sounds fair, but then some tools die on day one and others last for a whole season, and the label on the tool means little. This shows how to choose the chance from the promise you want to make.
A wandering trader should visit about weekly, never two days running
A daily chance makes the trader appear in bunches and vanish for weeks, and bolting on a rest period shifts the average without anyone noticing. This shows how to choose the daily chance so that the average gap is what you promised, with the rest period built in.
A chest table with one-of-a-kind items keeps handing out ones you already own
Some treasures can only be owned once, yet the chest keeps rolling them, and the quick patches either waste the opening or quietly change how often everything else appears. This shows how to keep every remaining chance in proportion.
Fill an enemy wave up to a point budget without overspending or stalling
Every wave gets a number of points to spend on enemies of different cost. Simple loops either go over the budget, stop with a big chunk unused, or run forever when nothing fits. This entry shows a loop that always ends and uses the points well.
How often will it rain in my game if the weather follows yesterday's weather?
Weather, moods and enemy behaviour that depend on what happened just before are easy to set up and hard to predict: you pick small numbers and end up with a world that is always rainy. This entry tells you the share of each state before the player sees it.
The world looks different depending on which way the player walked
If trees, caves and chests are rolled the moment an area appears, two players with the same world code can see two different worlds, and walking back can change what was there. This shows how to make each place roll the same way for everyone, whatever the order.