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: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Sep 2004 11:13:08 -0700
Reply-to: rt@xxxxxxxxxxx

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

Per I. Mathisen wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10125 >
> 
> On Wed, 15 Sep 2004, Jason Short wrote:
> 
>>You're talking about two different things here:
>>
>>1.Removing the janitors group.
> 
> Oh. So you cannot build a Recycling Center if you have a power plant?

Only the first source in the group can have it's effect be active at once.

So if you build both a recycling center and a hydro power plant, only 
the recycling center will have a POLLUTION_PCT effect.

is_effect_redundant() returns TRUE if the effect is redundant because of 
an existing source in the group.  However for the AI this might not be 
enough.  Building a recycling center when you already have a hydro plant 
isn't redundant, but because it makes the hydro plant's 
pollution-savings redundant it only gives you a net -16% savings.

is_effect_usable() checks both redundancy and whether the reqs are met. 
  However for the AI this may not be enough because the AI probably 
wants to take steps to meet the reqs.  For instance when building a 
supermarket you probably want to go ahead and bring in workers to build 
farmland.

>>2.Replacing the multiplier by a percentage.
>>
>>The problem with this is that negative percentages do very poorly when
>>added.In the current ruleset this isn't a problem because no two such
>>effects can ever be active at the same time.But imagine if you had two
>>-66% effects active at the same time.What should the result be?
> 
> Obviously the result should be capped at 100%. You cannot reduce anything
> to less than nothing. If you want to fine tune this in a ruleset, such as
> one gives -66% and two gives -85% (or whatever), then you can specify this
> as in the example I gave. There still is no reason for these special
> numbers that will just confuse the heck out of ruleset authors.
> 
>>This is ugly and it prevents having effects that increase pollution.
> 
> I suggest: One effect, "Pollution_Pct", which gives the amount of extra
> pollution as a percentage, which is capped at -100% and limitless upwards.
> If you have a pollution-producing building that makes 50% more pollution
> and a pollution-reducing building that reduces pollution by 50% then they
> cancel each other out. If you have three buildings buildings that reduce
> pollution by 50% and none that increase pollution, you have no pollution
> and should sell the third building. Simple.

OK.  But it prevents having multiple effects that reduce percentage and 
having them work in a sane way.  Since this isn't in the default ruleset 
this might be okay.

jason




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