Hello everyone. As I explained in another thread, I wrote a bot to automatically generate a full API documentation on the wiki. You can see a sample from an old beta version here. I would like to here your opinion on the naming convention for types. There are two possibilies.
Firaxis style
* "Type" for integers that are issued from the data tables or from enumerations: TerrainType, PolicyType, UnitType, etc.
* "ID" for indexes: CityID, UnitID, etc.
Alternative style
* "ID" for integers that are issued form the data tables or from enumerations: TerrainID, PolicyID, UnitID, etc.
* "Index" for indexes: CityIndex, UnitIndex, etc.
Pros and cons of the Firaxis convention
* The Firaxis convention suits the API naming convention: Plot.SetTerrainType() takes a TerrainType, Unit.GetID() returns an UnitID, etc.
* But it's confusing as hell at the beginning when you realize that "type" does not refer to the "type" column in the database but to the "id" column. Besides their so-called ID are not always global ID: sometimes they are player-specific (two players can use the same ID for two different units), etc.
Firaxis style
* "Type" for integers that are issued from the data tables or from enumerations: TerrainType, PolicyType, UnitType, etc.
* "ID" for indexes: CityID, UnitID, etc.
Alternative style
* "ID" for integers that are issued form the data tables or from enumerations: TerrainID, PolicyID, UnitID, etc.
* "Index" for indexes: CityIndex, UnitIndex, etc.
Pros and cons of the Firaxis convention
* The Firaxis convention suits the API naming convention: Plot.SetTerrainType() takes a TerrainType, Unit.GetID() returns an UnitID, etc.
* But it's confusing as hell at the beginning when you realize that "type" does not refer to the "type" column in the database but to the "id" column. Besides their so-called ID are not always global ID: sometimes they are player-specific (two players can use the same ID for two different units), etc.