Ruleset editing: unit availability according to city resources

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
arj.smn.cnt
Posts: 2
Joined: Sat Nov 23, 2024 1:24 pm

Ruleset editing: unit availability according to city resources

Post by arj.smn.cnt »

Hello,

I'm creating a ruleset loosely based on Civ4 and i have question related unit availability.

According to units.ruleset, the unit requirement can only be defined by a tech (tech_req), by a building (impr_req) or by a government (gov_req).
My question is if it is possible to define a specific unit availability (say, a Chariot) according to an extra availability (say, Horses) on the city or trade route. I don't seem to find a way to set this by adding effects (https://freeciv.fandom.com/wiki/Editing_Effects). Am i right in assuming this is not possible?

If it is not possible, it would be great, in future releases, to have the same flexibility as the building requirements (defined by the "reqs" array) applied to units too.

I'm thinking of other alternatives to this, like defining that a Chariot can only be built when a certain building is present on the city and then define the building requirements as "must have an extra of type horses on the city/trade route" but that is a little bit lame :)

Thanks in advance.
cazfi
Elite
Posts: 3258
Joined: Tue Jan 29, 2013 6:54 pm

Re: Ruleset editing: unit availability according to city resources

Post by cazfi »

Coming in freeciv-3.2.

https://www.freeciv.org/wiki/NEWS-3.2.0 : "Units now have support for full requirement vector, instead of having just one tech, building, and government requirement"
arj.smn.cnt
Posts: 2
Joined: Sat Nov 23, 2024 1:24 pm

Re: Ruleset editing: unit availability according to city resources

Post by arj.smn.cnt »

cazfi wrote: Sat Nov 23, 2024 7:34 pm Coming in freeciv-3.2.

https://www.freeciv.org/wiki/NEWS-3.2.0 : "Units now have support for full requirement vector, instead of having just one tech, building, and government requirement"
That's great news! Thank you very much, cazfi.
Post Reply