Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12873) OR Requirements for Buildings
Home

[Freeciv-Dev] Re: (PR#12873) OR Requirements for Buildings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#12873) OR Requirements for Buildings
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Mon, 25 Apr 2005 05:54:16 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12873 >

On Sun, 24 Apr 2005, Benedict Adamson wrote:

> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12873 >
>
> Jason Short wrote:
> ...
> > 2.  It is not crucial for modpacks.  The same results can be simulated
> > simply by using multiple buildings.
> ...
> I added:
> ...
> > We could have two types of building: Mountain Hydro Plant and River
> > Hydro Plant. The first would require Mountains, the second River.
> ...
>
> However, would we want a city to have two types of hydro plant if it
> were adjacent to Mountains and River? If so we, would want to reduce the
> effect of the two kinds of hydro plant. If not, we need nreqs for the
> two kinds of improvement. I tried the later for the Ancients modpack,
> but I think FreeCiv was confused by the mutually negative requirements.

You can do it quite easily (CVS HEAD) like this:

== buildings.ruleset
[building_mountain_hydro_plant]
name            = _("Mountain Hydro Plant")
reqs    =
    { "type", "name", "range"
      "Tech", "Electronics", "Player"
      "Building", "Factory", "City"
      "Terrain", "Mountains", "Adjacent"
    }

[building_river_hydro_plant]
name            = _("River Hydro Plant")
reqs    =
    { "type", "name", "range"
      "Tech", "Electronics", "Player"
      "Building", "Factory", "City"
      "Special", "River", "Adjacent"
    }


== effects.ruleset
[effect_mountain_hydro_plant]
name    = "Prod_Bonus"
value   = 25
reqs    =
    { "type", "name", "range"
      "Building", "Factory", "City"
      "Building", "Mountain Hydro Plant", "City"
    }
nreqs   =
    { "type", "name", "range"
      "Building", "Hoover Dam", "Player"
      "Building", "Nuclear Plant", "City"
    }

[effect_river_hydro_plant]
name    = "Prod_Bonus"
value   = 25
reqs    =
    { "type", "name", "range"
      "Building", "Factory", "City"
      "Building", "River Hydro Plant", "City"
    }
nreqs   =
    { "type", "name", "range"
      "Building", "Hoover Dam", "Player"
      "Building", "Nuclear Plant", "City"
      "Building", "Mountain Hydro Plant", "City"
    }


There are more effects you need to change, etc, because things will be
referencing "Hydro Plant", when they should be referencing both. But that
is the gist of it. Of course if you had made both cancel each other when
a city has them both the combined effect will be *zero*.

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





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