Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
Re: [Freeciv-Dev] patch: solar plant...
Home

Re: [Freeciv-Dev] patch: solar plant...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: Re: [Freeciv-Dev] patch: solar plant...
From: Reinier Post <rp@xxxxxxxxxx>
Date: Sat, 24 Jul 1999 01:20:26 +0200

> > Pollution from production is calculated from the cities factory
> > production...
> 
> I prefer that it be based on the entire production.
> Example: say I have a city with no factory, a smallish
> population, and several coal mines.  Under the current
> rules I have to worry about pollution, whereas I don't
> much under your rules.  I prefer the current rules here.

What are the proper rules for pullution?
There's no arguing that Freeciv has it wrong.  But how to fix it?

I can only draw from my Civ I experience.

In Civ I, there are clearly two contributing polluting factors:
pollution due to production (prodpol) and due to city size (sizepol).
prodpol never happens, as far as I'm aware, before the discovery of
Industrialization.  sizepol second never happens before the discovery
of Automobile.  I don't know how the discovery of more techs affect either.
Recycling plants diminish (or eliminate?) prodpol, mass transit
dimimishes (or eliminates?) sizepol.

I think the two are computed independently, including the modifying effects
of buildings, then added to give total pollution.

Freeciv (

  http://www.freeciv.org/other/lxr/ident?i=set_pollution

) also uses these two factors, and, I think, applies the effects of
buildings correctly.  It differs as follows:

 + prodpol 'before buildings' is computed differently
 + sizepol 'before buildings' is computed differently
 + 20 is subtracted from the final value!

First, the computation of prodpol.  In Freeciv it scales with city
production, and more effective factories can scale it down again.
This is not how it works in Civ I, where prodpol is never possible before
Industrialization, as far as I remember.  But is it possible without
factories?  I don't remember.

Daniel's patch assumes that it isn't, by making it scale with the
production bonus brought by factories.  That way, it will stay at 0
for cities without factories.

If prodpol is possible in cities without factories, I think it should work
like it does now, but with the condition of A_INDUSTRIALIZATION:

  if (get_invention(pplayer, A_INDUSTRIALIZATION)==TECH_KNOWN) {
    /* what it is already: */
    pcity->pollution=pcity->shield_prod;
    if (city_got_building(pcity, B_RECYCLING))
      pcity->pollution/=3;
    else  if (city_got_building(pcity, B_HYDRO) ||
             city_affected_by_wonder(pcity, B_HOOVER) ||
              city_got_building(pcity, B_NUCLEAR))
      pcity->pollution/=2;
  }

maybe with an additional factor inflicted by higher techs.

In any case, it should be 0 without A_INDUSTRIALIZATION.

Second, the computation of sizepol.  In Freeciv it starts to happen
with A_INDUSTRIALIZATION; in Civ I, with A_AUTOMOBILE.  I don't think
A_INDUSTRIALIZATION or A_MASS affect it at all.  Daniel's patch
fixes that.

Third, the subtraction of 20.  This looks like a quick hack
to make sure pollution doesn't happen early in the game.  With a
modified prodpol computation, this would be fixed properly.

> > Pollution from population was equal to the size times a factor decided
> > by the level of advancement in Your civilization...
> > 0.50 for Automobile
> > 1.00 for Plastic
> 
> I prefer the more gradual change with more factors.

Yes, but I don't think that's how it works.  (Can't speak for Civ II.)

-- 
Reinier

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