Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] Re: (PR#10125) Pollu_Prod_Pct
Home

[Freeciv-Dev] Re: (PR#10125) Pollu_Prod_Pct

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#10125) Pollu_Prod_Pct
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Wed, 15 Sep 2004 17:53:17 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10125 >

On Wed, 15 Sep 2004, Per I. Mathisen wrote:

>
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10125 >
>
> On Wed, 15 Sep 2004, Jason Short wrote:
> > > Then the effect's name is in error. PCT stands for "percent". It does not
> > > use a percentage. It would be better to call it "Pollution_Divisor" or
> > > something, although why it does not use a percentage, or how it divides, I
> > > do not understand.
> >
> > It does not use a percentage because multiple effects are additive.If
> > you have one -66% effect (aka 3) and one -50% effect (aka 2) these
> > should not sum up to be -116%.They _should_ be applied in series, so
> > it sums up to -84% (aka 6).However the way it is now they are summed
> > up in parallel, so it sums up to -80% (aka 5).
> >
> > However I was under the impression when I wrote this that it was
> > actually a problem for the default ruleset.Because of the "janitors"
> > group this is not the case.
>
> I still do not understand
>   1) why its name contains PCT (percent) even though it does not use
> a percentage value
>   2) why this strange way of calculating pollution is used
>
> Could it not be easier solved by using a percentage value? Pollution is
> reduced by the given percentage value. For recycling center, pollution is
> increased by 66% but reduced by 50% if you have a nuclear plant or a hydro
> plant. This is possible using existing effects:
>
> effect         =
>     { "name", "range", "value", "req_type", "req"
>       "Pollud_Prod_Pct", "Player", 66
>       "Pollud_Prod_Pct", "Player", -50, "Nuclear Plant"
>       "Pollud_Prod_Pct", "Player", -50, "Hydro Plant"
>     }

Percentages will work, but that "-50" stuff is not necessary. To cancel
effects you are supposed to use the group mechanism instead, which is what
the "janitors" group does in this case.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa






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