Unused players color/slots causes bug in remaster?!

When making maps, ensure you use the correct sequence of start locations, i.e. 1-4 for 4 player maps, instead of 1-3 and 7.

Skipping a player/color when making maps has always been a feature that never caused any issue with the original game. The game would just ignore the unused slots and count the used ones only when considering starting positions available to players/ai. Players didn’t even need to have a unit placed by default as long as the starting position was over a tile a peon could be spawn in with the one peon only start condition.

Many maps are designed and made that way, even Blizzard official maps were made like that.

It should be trivial: Parse the PUD file look for starting positions put them in a list/array/vector whatever, and use that array to know how many players can be spawned what color they are etc…
randomly pop one element of the array until no more player needs a starting position not every color being used should not cause any problems…

4 Likes

You raise an important topic. Non-sequential player slots is a map feature by design. I’m not sure how this bug could have occurred unless the new lobby code combined with random location and one peasant only wasn’t compatible with the original. All the unit-related arrays are supposed to be statically allocated and the unused slots are just flagged as empty (0x03). It sounds like a flaw in how the random start assignment logic made the assumption of sequential slots.

The bigger question is, did the patch properly fix the problem or did it double-down on the wrong assumption and just takes action when the error condition occurs? I created a 3 player map using starting locations with slots 1, 3, and 7. Host a multiplayer game, fill 2 slots with computers and start the game. You’ll see randomly one of the players doesn’t get a starting unit still, even yourself.

2 Likes