update: Reorder unit building and maintenance for fairness
The update visits ships, planes and land units in increasing order of country number. Within a country, it visits first ships, then planes, then land units, each in increasing order of unit number. The order is relevant when money, materials and work don't suffice to build everything. Money is charged to the owner, so only the relative order for the same owner matters there. One order is as good as any. Work and materials come from the sector, so only the relative order in each sector matters. The current order unfairly prefers countries with lower country numbers. Mitigating factor: the affected countries need to be friendly (ships only) or allied. The unfairness goes back to Chainsaw's option BUDGET. See the commit before previous for more detailed historical notes. The update test demonstrates the unfair behavior: sector 14,6 builds ships 95/97 owned by country#1, but not 96 owned by country#7. Likewise, planes 95/96/97 and land units 95/96/97. Go back to the the pre-BUDGET order: first ships, then planes, then land units, all in increasing order of unit number, regardless of owner. The update test now builds ship, plane and land unit 96 instead of 97. Bonus: speeds up both the update and budget by a similar absolute amount. For budget, this is roughly a factor of two in my testing. For the update, which does much more, it's around 10%. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
70f69640e1
commit
c5df505c98
11 changed files with 152 additions and 173 deletions
|
@ -39,7 +39,7 @@ read 0
|
|||
| 92/93 +0% friendly city without work
|
||||
| odd: cities don't repair ships
|
||||
| 95 +80% own harbor
|
||||
| 97 +20% own harbor, materials limit
|
||||
| 97 +0% own harbor, materials limit
|
||||
| 103 +13% at sea
|
||||
| 104 +13% at sea
|
||||
| 113 +5% at sea
|
||||
|
@ -58,7 +58,7 @@ read 0
|
|||
| 90/91 +90% allied airfield with and without work
|
||||
| 92/93 +30% allied city without work
|
||||
| 95 +50% own airfield
|
||||
| 97 +50% own airfield
|
||||
| 97 +0% own airfield, materials limit
|
||||
| 100 allied airfield where plague killed off mil
|
||||
| land unit building
|
||||
| 60 stopped
|
||||
|
@ -69,7 +69,7 @@ read 0
|
|||
| 90/91 allied fort/hq with and without work
|
||||
| 92/93 +30% allied city without work
|
||||
| 95 +90% own hq
|
||||
| 97 +50% own hq, materials limit
|
||||
| 97 +0% own hq, materials limit
|
||||
| 98 +90% own fort
|
||||
| produce sect
|
||||
| make units avail
|
||||
|
@ -204,10 +204,10 @@ nation 5
|
|||
|| country#6
|
||||
| plane building
|
||||
| 62 friendly airfield
|
||||
| 96 allied airfield, no materials left
|
||||
| 96 +50% allied airfield
|
||||
| land unit building
|
||||
| 62 friendly hq
|
||||
| 96 allied hq, no materials left
|
||||
| 96 +50% allied hq, materials limit
|
||||
read 6
|
||||
nation 6
|
||||
cens 0:15,8
|
||||
|
@ -215,7 +215,7 @@ comm 0:15,8
|
|||
|| country#7
|
||||
| ship building
|
||||
| 62 neutral harbor
|
||||
| 96 friendly harbor, no materials left
|
||||
| 96 +20% friendly harbor, materials limit
|
||||
read 7
|
||||
nation 7
|
||||
cens -16:-1,8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue