CvCity

From Civilization Modding Wiki
Revision as of 06:59, 23 December 2009 by Afforess (talk | contribs) (Created page with 'The CvCity controls everything that occurs in each city in the game. Everything from Religion spread, Meltdowns, and city growth are controlled here. The SDK files are written i...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The CvCity controls everything that occurs in each city in the game. Everything from Religion spread, Meltdowns, and city growth are controlled here.

The SDK files are written in the C++ programming language. They can be edited in a text editor such as notepad or in a programming editor like Microsoft's Visual Studio.

This page is missing information. Do not remove this notice until it is complete.

Functions

Below is a list of all the functions in the file. Each function has a quick description attached to it. Note that there are comments strewn throughout some of these files, direct from the developers in order to aid the potential modders. All these functions are in the class CvCity.

Function Parameters Return Type Description
CvCity::CvCity() None Void Initializes and creates references for the arrays for each city ID
CvCity::~CvCity() None Void Clears the arrays of all data and size
CvCity::init() int iID, PlayerTypes eOwner, int iX, int iY, bool bBumpUnits, bool bUpdatePlotGroups Void Begins the initial city setup, finds the plot the city is located on, updates the city's culture, line of sight, destroys any features the city is built on top of, adds a road underneath the city, adds any initial free buildings, etc...
CvCity::uninit() None Void Clears all the arrays of size and data, for when the game is shutting down, or the city is destroyed.
CvCity::reset() int iID, PlayerTypes eOwner, int iX, int iY, bool bConstructorCall Void Initializes all variables and arrays to their default value (usually 0 or -1)
CvCity::setupGraphical() None Void Sets up the graphical display for the city
CvCity::kill bool bUpdatePlotGroups Void Destroys the city, called when the city is razed.
CvCity::doTurn() None Void Called each turn by CvGame. Does all of the standard actions a city experiences, growth, religion spread, Great People, Production... etc..
CvCity::isCitySelected() None Boolean Called when the city is selected in-game
dCvCity::canBeSelected() None Boolean Called to see if the active team member can select the city in question or not.

(Note: this file is incomplete. I will finish it at a later date Afforess)