Re: [Freeciv-Dev] rulesets, part1
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Per Mathisen wrote:
> > -- New variant field to improvement_type struct, to specify
> > variant improvement effects. Some effects implemented, but
> > not documented in this patch. New functions improvement_variant(),
> > and player_owns_active_govchange_wonder().
>
> I am not so sure this is a good way to handle this. Instead
> of going away from hard-wiring implementation, this brings
> us right back into the inflexibility of the civstyle 1 & 2
> scheme.
I agree its still pretty inflexible, but more significant
changes would mean an even bigger patch! :-)
> A much better (but, I must admit, somewhat harder)
> approach would be to add two new variables to the wonder
> struct (and the ruleset file), one which controls the nature
> of the "effects" of the wonder, and another which controls
> the implementation of this effect (how many become happy,
> how many content, if it does this or that etc).
Yeah, I think I initially planned something like that, but
then scaled back to something easier to implement!
One problem with making things too general is that in
some cases it becomes harder for the server and/or AI to
do things easily or efficiently. Eg, currently when the
server comes to adjust the granary, it knows to look at
B_GRANARY, and possibly B_PYRAMIDS (and possibly variants)
(and possibly B_AQUEDUCT and B_SEWER).
If the Granary "effect" was generalized, the server would
have to look through all the buildings to see if there was
a relevant effect.
Though its probaly still be worthwhile to try and do
something better. Eg, Marko Lindqvist (Caz) had some
good ideas about parameterising Improvement "requirements"
(Library->University etc) and Wonder "ranges".
-- David
|
|