Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: Ruleset Development Was: Development Strategies
Home

[Freeciv-Dev] Re: Ruleset Development Was: Development Strategies

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Josh Cogliati <jjc@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cc: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Ruleset Development Was: Development Strategies
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 4 Dec 2001 13:01:57 +0000 (GMT)

On Mon, 3 Dec 2001, Josh Cogliati wrote:

> If freeciv actually implemented everything that was in the rulesets I
> guarantee that there would be more rulesets.

        As far as city improvements go, Freeciv was always written with 
hard-coded behaviour. It was only recently that the buildings ruleset was 
generalised, and the code was never finished. This is what we "AC people" 
(I quite like that moniker) are attempting to rectify at the moment.

> (Oh, and I have looked at the impr-gen patch that the AC people have.  
> That doesn't cut it since it does not get rid of OLD_IMPR_TYPE_ENUM)

        Oh come on - we're only human. We haven't got rid of 
OLD_IMPR_TYPE_ENUM because (as you point out earlier) its use is implicit 
all through the Freeciv code. In particular, we haven't touched the AI, 
which uses this extensively. If you're not too bothered about the AI not 
understanding your new customised buildings, however, the rest of the code 
should (largely) work; we don't actually rely on OLD_IMPR_TYPE_ENUM for 
much of the behaviour now.

        Here's a quick summary of the situation with regard to handling 
of buildings.ruleset (as I read the situation):-

        Freeciv-1.12 lets you change the building names (although not 
everywhere - e.g. "needs an Aqueduct to grow further" is still hardcoded, 
I believe), the tech requirements, build cost, and upkeep. I'm not sure if 
the sabotage field is used, but I _think_ it isn't.

        Current Freeciv CVS does this, plus it incorporates a small part 
of the AC impr-gen patch, which understands the bldg_req, terr_gate and 
spec_gate fields (e.g. you can specify "coastal" improvements using 
"terr_gate=Ocean", and the unusual terrain requirements of the Hydro Plant 
are now read from the rulesets).

        In addition to all of the above, the AC impr-gen patch also does 
the following:-

- Understands the equiv_range, equiv_dupl and equiv_repl fields (for 
  setting behaviour like "Sun Tzu's replaces a Barracks in every city 
  owned by this civ")
- Removes the "fixed number of buildings" limitation
- Understands most of the "effect" parameters - e.g. the following should 
  be taken directly from the rulesets, and not hardcoded:
  - Shield/Food/Trade bonuses for city tiles (e.g. effect of Supermarket)
  - City tax/luxury/science/production bonuses (e.g. effect of Bank)
  - Pollution modifiers (e.g. effect of Mass Transit)
  - Content/happy modifiers (e.g. Bach)
  - Proper selling of "coastal" improvements when city becomes landlocked
  - Generalisation of capital city and airlift effects
  - Generalisation of all "veteran making" effects (e.g. Barracks)

        With this, most of the Alpha Centauri buildings work in 
FreecivAC. (Some Wonders are still non-functional though.)

We still don't do (among other things):-

- AI support; it should really consider building effects, rather than 
  considering building types directly
- Client and server have different ideas of the world (e.g. islands can be 
  different in the client, due to unexplored territory) and this can give 
  the client incorrect effects
- Handling of population size limits (e.g. Aqueduct, Sewer System)
- Code optimisation; many algorithms are still O(N**2) in number of 
  cities, and we iterate over effects too frequently for my liking

Hint: we "AC people" are busy, and need all the help we can get. ;)

> Freeciv does not need to be reimplemented, it needs to actually 
> implement everything it claims to.

        I'm not entirely sure that Freeciv _does_ claim you can modify 
buildings.ruleset to your heart's content. (True, it doesn't say you 
CAN'T, either...)

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"My bionic eye enables me to 'see' objects"
        - 'The Six Million Rupee Man'



[Prev in Thread] Current Thread [Next in Thread]