<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39530 >

Marko Lindqvist wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=39530 >
> On 23/08/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>> With rndCiv i use Wonders to define special races,
>>> ie if you build "The Elves" wonder you can build Elvish units.
>>> I found that this didn't work, so i made building "The Elves"
>>> allowed you to build "Elveshome" in your cities which allowed
>>> you to build Elvish units.
>>> It would be simpler for me, and prolly for the code, if Wonders
>>> could allow certain units to be built, either on a City, Island,
>>> Nation, or Planet wide basis.
>>> This wouldn't affect the default rulesets, but would allow more
>>> complexity in mods.
>> Ive looked through the code, and i find that the functions that check
>> whether a unit can be built...
>>    common/city.c:490 can_build_unit
>>     - calls can_build_unit_direct & can_player_build_unit_direct
>>    common/city.c:463 can_build_unit_direct
>>     - calls can_player_build_unit_direct
>>    common/unittypes.c:503 can_player_build_unit_direct
>>   - calls can_player_build_improvement_direct
>> end up calling...
>>    common/improvement.c:312 can_player_build_improvement_direct
>> which returns false, if the improvement is a wonder & the wonder has
>> been built.
>  Actual problem is that unit improvement requirement has no ruleset
> defined range. Building is always required in "City" range. This is
> what we usually want for normal buildings, and for some wonders.
>  Just changing hardcoded range to be "Player" for wonders would
> replace bug with another. Do we want *all* the wonders to provide unit
> building abilities in all cities?
>  - ML

Having made a lot of rulesets for rndCiv, ive never wanted to allow a
unit to be buildable globally by everybody if a Wonder existed.

Sometimes ive wanted a unit to be buildable globally by the Wonder
owner, but handle that by having another building be buildable if
you own the wonder, that building allows the unit to be built.

Mostly i want the Wonder to have the same usage as ordinary impr_req
buildings.  If the wonder is in the city, and not obsolete, the unit
is buildable.

That's more than we can do right now, it keeps the standard impr_req
usage, it doesn't break impr_req expectations (ie, it's taken me a long
time to notice the problem), it would make rndCiv much better, and it
could be extended later on if required.


Freeciv-dev mailing list

Reply via email to