Follow-up Comment #5, patch #1264 (project freeciv):

There is a bug in the tech upkeep code that causes unexpected tech loss.
Probably caused by having 12 bulbs in stock while having a tech upkeep of 17
(and a production of several hundred).

Looking at the patch, I think having a negative research->bulbs_researched in
update_tech() should only be fatal after all cities have contributed their
bulbs. Also keep in mind if tech_upkeep is deducted before the cities are
processed, the bulbs output of several cities may be needed to pay the upkeep

Spelling: s/To low schience output/Too low science output/

A savegame is attached, from trunk + patches: variable-city-radii + tech
loosing/upkeep + experimental ruleset (not including the multiple buildslots

Thinking about tech upkeep a bit more,

* What happens during anarchy? Currently you can loose several techs. IMO
tech upkeep should not apply then, like monetary upkeep is zero, too.

* Should tech upkeep be allowed to be paid from stockpiled bulbs or should
freshly researched bulbs be required? The following pseudocode describes that

old_bulbs = get_bulbs()
add_bulbs(- tech_upkeep)
if (get_bulbs() < 0) {
  // not enough bulbs produced in the current turn to pay the tech upkeep
  old_bulbs = 0 // these are lost as well :-P
} else {

(file #8521)

Additional Item Attachment:

File name: fc23test3-T168-Y1180ADm.sav.gz Size:284 KB


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to