For comment: proposed changes in how caravan science bonus behaves
Posted: Tue Sep 27, 2022 10:05 pm
Cazfi at https://osdn.net/projects/freeciv/ticket/45685 suggested that this topic should be offered for comments.
Subject: by design, if you switch a technology from previously worked on one, its shields are penalized according to techpenalty option. During the turn, you can switch back to that previous tech and get your original bulbs back. The penalty is not applied if you have got a technology this turn, "got_tech" flag is recorded in savegames.
Now, what happens if a caravan brings you bonus in bulbs? It is added to the current research:
(1) If you at that moment continue researching, it adds to the "saved" bulbs, and if you later in the turn switch to another research (given you have no "got_tech " state), techpenalty is applied to the caravan bulbs as well.
(2) But if you use your caravan bulbs _after_ you have switched from the previous research, you get all of them towards the new research target. Moreover, you can transfer them to any other tech... except the "saved" one that will give you the same bulbs it would without the caravan. And if you switch from it again to a new rech, see point (1), you lose the bonus or part of it forever.
That lurking mechanics seemed to me like a bug, so I have prepared patches:
(a) for versions with frozen datafile format, we add caravan bulbs also to the saved research buffer. Thus, switching from a new tech to the saved preserves the caravan bulbs. It does not for the case (1), but we have no suitable place in the savegame to put the amount of the bulbs.
(b) In the newer versions, we just split bulbs on free to transfer and penalized ones, so the caravan bonus will preserve on your bulbs stock whatever you switch during the turn. So, "got_tech" flag is abandoned, just researching a new tech puts all your remaining bulbs into the free part.
What do you see about that proposal? Is it compatible with Civilization I/II?
Subject: by design, if you switch a technology from previously worked on one, its shields are penalized according to techpenalty option. During the turn, you can switch back to that previous tech and get your original bulbs back. The penalty is not applied if you have got a technology this turn, "got_tech" flag is recorded in savegames.
Now, what happens if a caravan brings you bonus in bulbs? It is added to the current research:
(1) If you at that moment continue researching, it adds to the "saved" bulbs, and if you later in the turn switch to another research (given you have no "got_tech " state), techpenalty is applied to the caravan bulbs as well.
(2) But if you use your caravan bulbs _after_ you have switched from the previous research, you get all of them towards the new research target. Moreover, you can transfer them to any other tech... except the "saved" one that will give you the same bulbs it would without the caravan. And if you switch from it again to a new rech, see point (1), you lose the bonus or part of it forever.
That lurking mechanics seemed to me like a bug, so I have prepared patches:
(a) for versions with frozen datafile format, we add caravan bulbs also to the saved research buffer. Thus, switching from a new tech to the saved preserves the caravan bulbs. It does not for the case (1), but we have no suitable place in the savegame to put the amount of the bulbs.
(b) In the newer versions, we just split bulbs on free to transfer and penalized ones, so the caravan bonus will preserve on your bulbs stock whatever you switch during the turn. So, "got_tech" flag is abandoned, just researching a new tech puts all your remaining bulbs into the free part.
What do you see about that proposal? Is it compatible with Civilization I/II?