Tíquete #45895

Pop units in build slots > 1 reduce the population of the city even when deletetd/postponed from not fulfilling build reqs

: 2022-10-17 21:06 Última Atualização: 2022-10-20 08:16

Relator:
(Anônimo)
Dono:
(Nenhum)
Tipo:
Estado:
Aberto
Componente:
(Nenhum)
Marcos:
(Nenhum)
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Nenhum
Arquivo:
Nenhum

Details

Blamed: city_build_unit()

Pop reduction actions need to be INSIDE the {{{ code c if (punit) { ... } }}} Otherwise if punit == NULL because illegal to build, it will still reduce the population.

Ticket History (3/3 Histories)

2022-10-17 21:06 Updated by: None
  • New Ticket "Pop units in build slots > 1 reduce the population of the city even when deletetd/postponed from not fulfilling build reqs" created
2022-10-17 21:32 Updated by: cazfi
Comentário

That seems like FCW specific bug as they allow build slots to produce different kind of units than what was checked for. (They have a point in that the behavior they look for makes sense, but they have removed restrictions without fixing the reasons the restrictions were there)

2022-10-20 08:16 Updated by: None
Comentário

Yeah you're right

It's also true that if you later upgrade the build slot behaviour in 3.x, the way city_build_unit() is currently coded will fail from this unnecessary bad logic. So it's not a bug, it's a logic trap waiting to happen when build slots are later empowered more. The good news is that it could easily be made to work for status quo AND for future build slot empowerment, by simply NOT reducing population for a unit that couldn't be made... It makes more logical sense to only reduce pop if the unit could be made, than to ASSUME some other function prevents population units from being made (which later might change.)

Also, what are the reasons the restrictions were there? I might as well fix those. ;)

Because, THOUGHT OF THE DAY... A future with high city_radius_sq and even more build slot flexibility, it seems to be the key to the future of games without micro-managing 200 cities, in large global multiplayer games with 25+ players.

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login