///////////////////////////////////////////////////////////////////////////////
//
//    City Expansion v2.0 - A mod by Pedrunn, and the Immortal Wombat and
//
///////////////////////////////////////////////////////////////////////////////

(Pedrunn)
pbcavalcanti@uol.com.br

Apolyton forums

20 th august 2002




I. Introduction
II. Installation
III. How Does It Works?
IV. Graphics
V. Thanks
VI. How to use it together with IW's Wonder Code

I. Introduction

The concept of having cities expanding was first idealize by the apolytioneer BlueO. At that time there was no way of changing the terrain or tile improvements. So he created city graphics as good. This mean the city was actually a good that could be traded. The idea of cities being traded, added to that several game-play bugs and the difficulty of implementing it. The idea did not had good acceptancy to the CTP2 community. The project was forgotten. But the concept still remaint in the head of several CTP2 modmakers. Including me.
After the Tiledit was released by Martin, the Dane. It became possible to create and edit terrain a tile improvements graphics. This is made possible to redo all the city expansion coding concept. This way after a while learning the Slic language I used the BlueO's ExpandCity function to make cities grow using tile improvements. After more than a month working in this project I have finally achieved my goal. The City Expansion v2.0 is totally functional and bug free.

II. Instalation

Basic Prerequisites:
1) Download and install properly the CTP2 Patch 1.11
2) Download and install properly the Modswapper
3) Download and install properly the Apolyton Tile File

How to Play with the original game?

Make sure the prerequisites are ok.
Unzip the file cityexpansion.zip (where this document is inside) in your CTP2 base
You will find the option to play with it when launching Modswapper.

How to install to play with Apolyton Pack?


Make sure the prerequisites are ok.
Just unzip the same file but remember to have the apolyton pack installed.

How to install to play with others mods?

Make sure the prerequisites are ok and the mod doenst already uses the mod..
There is a folder call modmaking resources that comes together with the code (inside the zip but dont unzip it).

1) Copy the cityexpasion.slc file inside the directory path starting from the CTP2 base directory /ctp2_data/default/gamedata/,
2) Then cut the content of CE_Tileimp and paste inside the *_tileimp.txt file (inside the gamedata folder).
3) Then add in the correct *_script.slc the line: #include "cityexpasion.slc"
4) Launch the mod

* This stands for the mod file prefix.

III. How Does It Work?

The Expansion

The city expansion works adding a terrain graphic aside the city every time a city reaches a multiple of three (3, 6, 9, 12, 15, …120) population number until the max number of 120 in every land terrain except forests, swamps, forests, jungles, mountains and glaciers (if the city is settled in land) or every deep sea terrain (if it is a sea city) . The city kills all food collecting from the tile but increases the production and gold input from it.
If there is no possible terrains (mountanis, shallow water and beach tiles) in the city radius or all possible ones are already taken by city expansion. The city has reached a maximum number of pop so it can't grow anymore.
If the tile has forests, swamps or jungles the city cant grow either but it will create a couple plains tiles to prepare for the next expansion.
Once the city expansion is added it cant be removed anymore.

The Losing of Pop and dead city expansions

If the city looses population from starvation or after being captured and reaches a city
population one number smaller then the multiple of three that were supposed add the new tile improvement the city expansion next to the city dies. What I mean by saying that the city expansion dies is that a dead city takes it place. The dead city doesn't only kill all food input but also the gold and the production. In another words, the tile works as if there was a dead terrain.
The city doesn't looses pop only when starved or captured but also with others events too.
Those events are:
- The building of settlers, urban planners and sea engineers will kill one city expansion;
- The enslavent the population of a city by slaver one city expansion will also kill one city expansion
- When the city is plagued one city expansion will die.
- When an abolitionist removes slaves from the city one city expansion will die.
- The totally death of a city for the actual death of all pop, park creation by an Eco-Ranger, and slic-related death of cities evens also cause cities to dies. When this happens every city expansion close to the city according to its size. Also gets killed and dies.
- Nuking a city is a event the kill a lot of population. For every three population numbers killed a city expansion closes to the city dies.
The only event not related to the death of population that creates a dead tile is pillaging. Any player can pillage another player city expansion or even

Once a dead city expansion is added it can't be removed anymore. (Ghost Cities). The only way to remove them is to expand the city and by that replacing it by a brand new city expansion.

Entering City Ages

Once a player researchs a defined advance it means he has achieved a city expansion age. That in most case will be parallel to the entering of an age in the game. This will make cities expansion from early ages to be replaced for modern ones as the city expands. You must not that this transition of city expansions as in real-life is slow and only one or two will be replaced every time a city expands. And as nowadays you may find really developed nations with cities using old archtecture since the city did not follow the progress of its nation. Every age has it series of graphics for big, medium and/or small cities. The place of different expansion of a city depends on the size of the city. Currently Ancient and medieval has one tile; modern has three; and, genetic and diamond has two.

IV. Graphics

Those are the used graphics in the code. Yet there are more in the apolyton Tile File

 

CITIES SOURCE TileSet Index
Ancient City Pedrunn 434
Medieval City BlueO 352
Ancient/Medieaval Dead City BlueO 365
    399
Modern Small City BlueO / Pedrunn 367
Modern Medium City BlueO 600
Modern Big City BlueO 340
Modern Dead City BlueO 365
    335
Genetic Small City Pedrunn 388
Genetic Big City Pedrunn 353
Genetic Dead City Pedrunn 381
    351
Future Small City CTP2 398
Future Big City CTP2 339
     
Sea City Pedrunn 397
Sea Dead City Pedrunn 397

 

V. Thanks

Special Thanks

The special thanks goes to BlueO who has disapeared a while ago but without him this mod wasnt possible at all. Since he was the creator of the City Expansion v1.0 therefore the ExpandCity function, related fuctions and some graphics.

A big Thanks to the Immortal Wombat who rescued the city expansion concept making me start the work on it, helped me in the bug hunt, and compiled mine and BlueO's graphics into the Apolyton Tile File.

And to Martin who helped in the fix really important bugs in the final version of the code.

And Finally

I hope you find this mod fun, useful, helpful, enjoyable, or whatever, to make it worth the time I spent on it.

Special thanks to Apolyton Civ Site.
Apolyton CS - Thankyou Dan Quick & Markos Gianopoulos.


VI. How to use it together with IW's Wonder Code.

At the very beginning of the code there is a fuction to prevent the

int_f TileHasWonder(location_t tmpLoc) {
          if(TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_WONDER_PYRAMIDS))
          || TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_WONDER_HANGING_GARDENS))
          || TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_WONDER_CHICHEN_ITZA))
          || TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_WONDER_GREAT_WALL_A))
          || TileHasImprovement(tmpLoc, TerrainImprovementDB(TILEIMP_WONDER_GREAT_WALL_B))) {
                 return 1;
         } else {
                 return 0;
         }
}





Legal Junk:
THIS MATERIAL IS NOT MADE OR SUPPORTED BY ACTIVISION.
Feel free to use/adapt/alter and distribute this modpack, on the conditions that credit is given to the author of the original game materials and if possible, this readme file is included; and that any use of this mod is completely non-commercial.

The author takes no responsibility for any damaged software, damaged hardware, lost data, exploding modems, unexpected melting, or any other damage or loss of property potentially or actually caused by this download.
Tough Luck.