Page 1 of 1

[SOLVED] How exactly does "TerrainAlter" requirement type work?

Posted: Thu Aug 29, 2019 10:40 pm
by Corbeau
I am trying to prevent the building of a certain base if there is irrigation or mine on a hill/mountain tile. Would this work?

Code: Select all

[base_resort]
name           = _("Resort")
graphic        = "base.buoy"
graphic_alt    = "base.ruins"
activity_gfx   = "unit.buoy"
act_gfx_alt    = "unit.fortress"
reqs           =
    { "type", "name", "range", "negated"
      "Tech", "Explosives", "Player", FALSE
      "Terrain", "Mountains", "Local", FALSE
      "UnitFlag", "Settlers", "Local", FALSE
      "CityTile", "Center", "Local", TRUE
      "TerrainAlter", "Irrigation", "Local", TRUE    <------------ THIS
      "TerrainAlter", "Mine", "Local", TRUE     <--------THIS
    }

Re: How exactly does "TerrainAlter" requirement type work?

Posted: Fri Aug 30, 2019 1:29 am
by cazfi
"TerrainAlter" is about the potential of the terrain to be altered. Typically it's used to provide an irrigation bonus in the city center tile that is not irrigated, but could be ("CanIrrigate").
To test if there's an "Irrigation" or "Mine" extra in the tile, use "Extra" requirement (2.6 and later) or "Special" requirement (2.5 and earlier).

Re: How exactly does "TerrainAlter" requirement type work?

Posted: Fri Aug 30, 2019 9:19 am
by Corbeau
Thanks.