Making unit unavailable for certain government(s)

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

Making unit unavailable for certain government(s)

Post by Corbeau »

It is possible to make a unit available only for a certain government. But is it possible to make a unit UNavailable for a certain government?

I have a slighly convoluted workaround, can anyone think of possible problems with it?

For example, I am planning to have two units:
- Bowmen - more effective (elite), generally available, but unavailable for Tribal govrnment
- Archers - less effective and available at Tribal government (it is irrelevant whether they will be available in other governments)

Both units should be able to exist under any governments. the main thing is that I don't want Bowmen to be built under Tribal government.

Workaround solution:

1. Archers are a unique unit for Tribal government (like Fanatics...)
2. Bowmen (elite) are obsoleted by Archers while Archers are obsoleted by whatever the next step is.

This way, when in Tribal, can only build less effective Archers. Once out of Tribal, Bowmen are available. I have tested it and it workes.

There is only one aesthetic problem: when a city is producing Archers under Tribalism and the government switches to something else, the city will continue producing them (won't switchautomatically) and I get an ugly message "Can't produce Archers, not available anymore".

Any advice or recommendation about a possible different solution to this?
--
* Freeciv LongTurn, a community of one-turn-per-day players and developers
* LongTurn Blog - information nexus with stuff and stuff and stuff
* Longturn Discord server; real-time chatting, discussing, quarrelling, trolling, gaslighting...
Post Reply