Q: Several cities building a unique unit?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
Corbeau
Elite
Posts: 867
Joined: Mon Jan 13, 2014 11:13 pm

Q: Several cities building a unique unit?

Postby Corbeau » Mon Oct 15, 2018 11:18 pm

Clarification needed. Suppose we have a unique unit and it is in action. Can other cities even start producing it while there is one active, or do you get some kind of message "can't build, got one in circulation already"?

If cities *can* produce it (but not finish), is there any mechanism in place to prevent abuse due to massive accumulation of shields?

cazfi
Elite
Posts: 1574
Joined: Tue Jan 29, 2013 6:54 pm

Re: Q: Several cities building a unique unit?

Postby cazfi » Mon Oct 15, 2018 11:44 pm

What kind of abuse you are thinking? This is far from the only way one can get shields saved instead of investing them.

User avatar
Corbeau
Elite
Posts: 867
Joined: Mon Jan 13, 2014 11:13 pm

Re: Q: Several cities building a unique unit?

Postby Corbeau » Tue Oct 16, 2018 7:44 am

I can't really think of any other apart from building a very expensive wonder or continuing to build one that was already built, and for units, that would mean losing half the shields. But this one can be done anytime, anywhere, in multiple cities.

Ignatus
Veteran
Posts: 101
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: Q: Several cities building a unique unit?

Postby Ignatus » Tue Oct 16, 2018 4:22 pm

For small cities a usual way is building a settler; you can leave them in early game undefended and cheaply genetate a defender if an enemy approaches.

Probably, there should be shields fine for constructing the impossible analogous to food fine for inability to grow.

Added: sorted out the code: starting producing an unique unit if player has one is prohibited in can_player_build_unit_direct() in unittools.c (later used in city.c and cityturn.c), but player not having one can start multiple productions and finish one of them, and the others will then accumulate unit shields. This is possible in a similar way to accumulating wonder shields (described above) and building shields (like, you start build Bank and then sell the Marketplace).