Opened 8 years ago

Last modified 6 years ago

#4294 closed defect

[PATCH] No retries with the SimpleGroup placer — at Initial Version

Reported by: elexis Owned by:
Priority: Must Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch:

Description

On some maps we can notice that the random map placement algorithm just doesn't place the resources we want it to place, even when passing gazillions of retries.

This can be noticed with metal on the map latium or fish on the map corinthian isthmus.

The reason for that being the retry loop used by createObjectGroups and createObjectGroupsByAreas of placer.js being broken if a SimpleGroup or a RandomGroup is passed, because these functions just return true or false while all other place functions return an array or undefined. The retry loop needs the array to decide how often it has to retry.

The bug exists at least since alpha 19, most likely since the introduction of these functions.

Unfortunately this means that many resource amount numbers in random map scripts are wrong as they hid the bug by increasing the amount of res, leaving us to rebalance all maps.

Change History (1)

by elexis, 8 years ago

Attachment: retry_simplegroups_v1.patch added
Note: See TracTickets for help on using tickets.