A trader chance of 0 is 1 in 101
Each base of a mission has a trader chance, a number in the mission’s script. When the map starts, the game rolls once for every base without a Trade Union: a random number from 0 to 100 that is less than or equal to the chance gives the base a trader. Its base menu’s TRADER entry then works while one of your units is inside, and the base’s panel reads ON SALE! instead of CLOSED.
- Where
- main.dol, base set-up map_build_bases
- Chance of a trader
- (chance + 1) in 101
- At a chance of 0
- 1 in 101
- When it is rolled
- Once per base, when the map starts
- Visible
- Yes, rarely; a working TRADER entry at a base that normally has none
Because of the “or equal”, the chance is one more than the number says, out of 101: a chance of 25 (bases 3 to 5 of Yugi’s y02) gives 26 in 101, and 100 or more is certain, but 0 is not “never”. It gives 1 in 101. 211 of the 280 bases in the mission scripts carry 0, so now and then one of them has a trader; whether 0 was meant as “never” is not known. A base with a Trade Union always has one, without a roll.
The roll happens only at map entry, so loading the save from the story hub and starting the map again rolls every base anew.
Evidence
The base set-up at map entry (map_build_bases) sets a base’s trader flag when one of its facilities is a Trade Union or when HSD_Rand() % 101 <= chance; the comparison is a “less or equal” in the original machine code, which the decompiled function matches exactly. The base menu enables TRADER for a base with a garrison and the flag or a Trade Union. The chances were read from the mission scripts.