Greetings, fellow Civ-Fanatics.
As a long time lurker of these forums (going back to some modding experiments on CIV3), I would first like to express my gratitude to everyone who has kept this site alive and full of content.
Now, I have been playing CIV5 pretty much since release and more so since G&K. One major source of frustration with this iteration of the game for me is I cant play my favorite type of map: Terra. Indeed, as has been noted in many threads, due to game mechanics, playing on Terra is a disappointing experience. So Ive been thinking about ways to make a mod that would improve play on Terran worlds. However, I have little experience with modding CIV5 and programming more generally so after going through most tutorial and help threads on the forum I am still facing some dead ends even at the mod design stage.
Below is a rather long post where I will:
1) describe some issues with playing Terra in CIV5,
2) provide some avenues to improve gameplay on Terra that Id like to include in the mod,
3) explain some design issues I have bumped into so far.
I do understand that this project is probably way above my head given my lack of experience (some aspects may even be impossible due to game limitations or lack of access to DLLs), so any ideas and help, perhaps just to point me in the right direction, from veteran modders at this stage or further down would be much appreciated.
Problems with Terra in CIV5.
This has been covered in part in different threads and posts, but I think it useful to recap these in order to understand my aim and purpose with the mod.
1- There is no incentive to expand to the New World (NW).
Due to happiness/culture mechanics regarding wide Civs, there is little incentives besides gaining access to some resources for expansion in the mid-late game when the NW is revealed. This results in the AI/human player rarely colonizing the NW. Which removes much of the interest of playing Terra.
2- Settling the NW doesnt help achieving victory
With the exception of gaining support from NW CS for a diplomatic victory, victory conditions dont encourage dealing with the NW: there are no enemy capital to conquer and cities are likely to be settled too late to help with a science or culture victory (the latter acting against expansion to begin with).
3- Terra maps are larger than other maps of the same size, yet this is not taken into account in gameplay.
Science, Culture and Golden Age costs are all affected by the size of other maps, yet the extra landmasses on a Terra map isnt balanced by changes to these costs.
4- Distances to the NW discourage expansion.
This is especially true on large/huge maps where 10+ turns may be needed to reach an overseas location.
5- Terra map scripts encourage AIs to explore, but not to expand overseas.
Caravels often visit the NW, but AIs presence often stops there.
6- Many CIVs are destroyed early on the Old World (OW) Pangea.
A large landmass, unbalanced costs and a smaller number of City States on the OW (since CS are split between OW and NW) means that non-expansionist CIVs are likely to be destroyed by their neighbors earlier than on other maps. This, in turn, reduces competition when it comes to settling the NW.
7- Discovering fully-developed CS in the NW robs CIV5 Terra of its discovery flavor.
This doesnt have much impact on gameplay, but does feel odd. How did these minor civs develop in complete autarky? Semi-civilized barb cities in CIV4 made discovery of the NW more interesting and rewarding.
Modding Terra
The goal of this Mod would be to improve play on Terra (eventually Rspeers Terra Incognita too) by (a) making it worthwhile to settle the NW, (b) encouraging the AI to be more expansionist, (c) giving it a better feeling of discovery and colonization.
So here are the key elements and some options:
1- Adoption of a social policy branch would give a unique bonus to overseas cities upon researching Navigation.
For example, opening Commerce could give a boost to the value of overseas trade routes or Rationalism would provide extra science from luxury resources found overseas. That way developing overseas colonies would provide an advantage to any CIV regardless of their grand strategy. Even those looking for a Cultural victory could gain, though they are more likely not to expand. I would select Navigation instead of Astronomy as the threshold so that these gains do not show up with the first settler sent to the NW.
Modding requirements: a) modify intro Social Policies to trigger the new bonus upon researching Navigation, b) find a way for the game to differentiate between same-continent and overseas cities.
2- Adapt the culture/science/golden age/national wonders costs and the target number of cities to account for the larger map.
This is a pretty straightforward way to encourage expansion or at least remove some disincentives to it.
Modding requirements: Mostly changes to ratios in World.xml and costs in Buildings.xml
3- Make CIVs more resilient early in the game.
To ensure that the OW doesnt become a graveyard of empires and to put more demographic, territorial and resource pressure to overseas expansion as well as stimulate competition.
Modding requirements: either a) change the base city defense value or b) add a building akin to Kaels Palissade for early defense. I would be more inclined to go for the latter to preserve early game tradeoffs between expansion and defense.
4- AI CIVs destroyed early in the game respawn on the NW.
I dont know if there is any way to make this working in the game. New CIVs would spawn on the NW once a OW CIVs capital falls. Domination-oriented CIVs would thus have an incentive to expand to the NW or else would have to refrain from early conquest. Im thinking of a cut-out point at year 0AD or upon the first accession to the Medieval Era to give the new CIV some time to develop (new CIV would probably start with an extra settler + warrior). Of course, this would add greatly to the new world flavor of Terra.
Modding requirements: this would be a tricky one as far as I know, I havent seen any reference to such a mod and I dont know how the games limitation on the number of CIV per map as well as the CIV location scripts would interfere with such a modification. Im thinking of a Lua script which would trigger the CIV spawn script following the conquest of a Capital before the cut-out point. The spawn point would have to be set on the NW and the location script would have to be re-run to get an acceptable spawn point in that area, both of which might be tricky to mod. If a second CIV falls before the cut-out point, its spawn location would have to be fairly far from the first one. In addition, the possibility of flipping barb units around the spawn point (à la Rhyes & Fall of Civ should be looked at).
5- City States on the NW spawn later in the game.
Again, not sure if this is possible at all. CS would only spawn on the NW (a) if a CIVs capital fall on the OW (same as a major CIV respawn) or (b) once a player researches Astronomy (then they would get already-researched techs). This would ensure that either (a) NW CS are at the same level of development as a respawned CIV or (b) CS are at a similar level of development as early colonies from major CIVs. In addition to preserving the flavor of a NW discovery game, this would add a twist to Terra games: you may either deal with developed CS that are relatively behind technologically speaking because they appeared at the same time as a newly-spawned CIV or you find technologically up-to-date CS that just have started to colonize the NW.
Modding requirements: First, this change would entail rebalancing the Terra script so that about 2/3 of the total CS are on the OW, again adding pressure to overseas expansion and probably adding 2-3 CS to the total. As per CIVs respawn, Lua scripts would have to be design to trigger the spawn process, one for early appearance and one for astronomy-era development. Flipping barbs could also be needed, especially for early start.
Options: Eventually Id like to be able to use davii.adams Minor Civs with a Terra Mod.
6- Add a new optional Colonialism technology and Colonists unit
Colonialism would come after Astronomy and would be slightly more expensive than Navigation, it wouldnt lead to any other technology. Colonialism would allow the training of Colonists units. Colonist would be a special type of settler with the military unit attributes of Pikemen (perhaps with a possibility to upgrade to Musketmen attributes), they might also have slightly stronger defense rate when embarked. Cities founded by Colonists would start with 2 or 3 pop and a free harbor or monument/shrine (perhaps based on open Social Policy branches).
As was suggested in a CIV Fanatics thread (cant find where), founding a city with a colonist could give the opportunity to select between a Colony (founds a regular city), a Territory (founds a puppeted city) or a Dominion (founds a new CS with a big chunk of influence). Founded CS would either be (a) of a random type, (b) selected according to policy branches or (c) Maritime by default (I dont know yet which option would be best balanced).
Researching Colonialism and training colonists would certainly give a big advantage for colonizing the NW, thats why Id make it both expensive and optional. Of course, non-colonialist CIV could still expand in the NW using regular settlers.
Modding requirements: Creating the new tech and new unit should be relatively easy. Modding the type of colony created could be more difficult though. I was thinking that founding a city with a colonist could bring a CS-liberation-like menu which already has the abovementioned options built-in. However, I couldnt find if/where the settle action could be modified.
7- Double speed of all units on Ocean tiles
This change would greatly speed up to discovery and colonization of the NW and thus encourage overseas expansion. One issue with this change is that it would affect coastal warfare and give an advantage to long-range attacks from the open seas. A solution would be to apply this modifier only to Ocean Hex located x hex from the coast or to limit it to international waters (i.e. outside of cultural boundaries.
Modding requirements: reduce the movement costs of Ocean hexes (excluding Ironclads), eventually find a way to reduce ocean hex movement near coastal areas.
8- Make some Luxury Resources only available in the NW.
This might already be part of the Terra script, needs to be confirmed.
Modding requirements: Ratio of OW/NW luxury resources might need a change. Terran maps may require one more Luxury Res than other maps of the same size to help expansion.
9- Introduce new strategic resources for Scientific Victory.
Replace the required strategic resource (aluminium) for SS Cockpit, SS Engine and SS Stasis Chamber to Rare Earths, Methane Hydroxide and Lithium respectively; SS Boosters would continue to require aluminium. These new strategic resources would be revealed upon discovery of Scientific Theory. Rare Earths and Lithium are Land resources and need a mine; Methane Hydroxide is a Sea resource and needs an Offshore Platform. Each node would yield 1 resource. Improved Rare Earths and Lithium resources would yield 1 more gold; improved Methane Hydroxide resource would yield 2 extra science. Two of these resources types would only be available in the NW.
Modding requirements: Add the 3 strategic resources; change the requirements for the units. Adapt the map script to distribute these resources in the OW and NW.
10- Consider introducing a NW area factor in Domination victory (especially if CIV respawn is impossible)
To ensure that Domination Victory is truly a domination, it may be necessary to add a factor to include the NW as a part of that domination, either as a % of total NW land or as a number of cities on the NW.
Modding requirements: Change domination victory conditions, I have no idea how an area % could be included as a condition.
Modding challenges
As described above some of the needed changes for this mod appear (at least in the eye of this modding dilettante) quite challenging. I have been reviewing the online tutorials and various threads on modding available. I have some ideas how to deal with some challenges after getting more comfortable with xml and Lua. Yet for some other issues, I am totally at loss because I cant find ways or dont know if its even possible to program the abovementioned modifications. Here are some troublesome issues.
1- Overseas bonuses
I would need to find a way to define 2 types of cities so that colonies can gain Social Policy-based bonuses: 1) those on the same continent as the capital or accessible over Coastal waters, 2) those located on a different continent/island separated by Ocean hexes. This could probably be done by mapping potential trade routes connections (i.e. excluding blocades/open borders agreement from the equation) or by uncovering how Other Continents are defined in the ECONOMICAISTRATEGY_EXPAND_TO_OTHER_CONTINENTS function. Alternatively, a distance-from-capital factor could be set and modified depending on map size, but this would then benefit inland expansion Russian-style. If only the last option can be modded, then conquered cities located far away from the capital should be excluded from gaining these benefits.
Ideally this overseas definition could also be used to distinguished NW CIVs and CS to provide social policy-related bonuses.
2- CIV respawn and late CS spawn.
Though it seems theoretically possible to have a Lua script trigger the spawn process as a Game Event later in the game, I havent read anything on this subject online. I dont know if its been tried and if it is possible at all. As far as I know, no official scenario has CIVs or CS spawn late in the game.
In addition, although the Terra map script includes a function to distribute CS on the NW, Im not too sure how much this can be manipulated and if the location-selection script can be invoked later on in the game to make sure CIV respawn are restricted to the NW (there is a similar problem with restricting strategic resources to the NW).
Another issue is founding a city as a CS or as a puppet city, I know its been suggested on the forum, but Im not sure if its ever been implemented in a mod. Also unclear is how to modify the Settle action.
3- Ocean movement
I believe the easiest way to deal with this would be to give all post-Astronomy naval/embarked units (excluding Ironclads) a promotion which boosts Ocean hex speed. As stated above however, finding a way to limit this bonus impact on coastal warfare could also create some modding difficulties like distinguishing between near-land vs. high seas or national vs. international waters. Alternatively, the map script could be adapted to double the average coastal width, yet that may introduce some issues with coastal resources/economics.
4- Area-wide barb flipping upon spawn
An issue related to mid-game spawning of CIVs or CS is to make sure that they wont be surrounded by hostile barbs upon spawning. Thus a mechanism for converting nearby barbarians would probably be needed if a way to allow in game CIV spawn is found.
5- Policy bonuses
For Social Policy-based bonuses triggered by the discovery of Navigation, I think adding a new column to the Social Policy table (using Afforess SQL methodology) for the bonus and making it dependent on the tech would be the way to go. I might be wrong though since I havent seen any policy bonuses dependent on technology.
As a long time lurker of these forums (going back to some modding experiments on CIV3), I would first like to express my gratitude to everyone who has kept this site alive and full of content.
Now, I have been playing CIV5 pretty much since release and more so since G&K. One major source of frustration with this iteration of the game for me is I cant play my favorite type of map: Terra. Indeed, as has been noted in many threads, due to game mechanics, playing on Terra is a disappointing experience. So Ive been thinking about ways to make a mod that would improve play on Terran worlds. However, I have little experience with modding CIV5 and programming more generally so after going through most tutorial and help threads on the forum I am still facing some dead ends even at the mod design stage.
Below is a rather long post where I will:
1) describe some issues with playing Terra in CIV5,
2) provide some avenues to improve gameplay on Terra that Id like to include in the mod,
3) explain some design issues I have bumped into so far.
I do understand that this project is probably way above my head given my lack of experience (some aspects may even be impossible due to game limitations or lack of access to DLLs), so any ideas and help, perhaps just to point me in the right direction, from veteran modders at this stage or further down would be much appreciated.
Problems with Terra in CIV5.
This has been covered in part in different threads and posts, but I think it useful to recap these in order to understand my aim and purpose with the mod.
Spoiler :
1- There is no incentive to expand to the New World (NW).
Due to happiness/culture mechanics regarding wide Civs, there is little incentives besides gaining access to some resources for expansion in the mid-late game when the NW is revealed. This results in the AI/human player rarely colonizing the NW. Which removes much of the interest of playing Terra.
2- Settling the NW doesnt help achieving victory
With the exception of gaining support from NW CS for a diplomatic victory, victory conditions dont encourage dealing with the NW: there are no enemy capital to conquer and cities are likely to be settled too late to help with a science or culture victory (the latter acting against expansion to begin with).
3- Terra maps are larger than other maps of the same size, yet this is not taken into account in gameplay.
Science, Culture and Golden Age costs are all affected by the size of other maps, yet the extra landmasses on a Terra map isnt balanced by changes to these costs.
4- Distances to the NW discourage expansion.
This is especially true on large/huge maps where 10+ turns may be needed to reach an overseas location.
5- Terra map scripts encourage AIs to explore, but not to expand overseas.
Caravels often visit the NW, but AIs presence often stops there.
6- Many CIVs are destroyed early on the Old World (OW) Pangea.
A large landmass, unbalanced costs and a smaller number of City States on the OW (since CS are split between OW and NW) means that non-expansionist CIVs are likely to be destroyed by their neighbors earlier than on other maps. This, in turn, reduces competition when it comes to settling the NW.
7- Discovering fully-developed CS in the NW robs CIV5 Terra of its discovery flavor.
This doesnt have much impact on gameplay, but does feel odd. How did these minor civs develop in complete autarky? Semi-civilized barb cities in CIV4 made discovery of the NW more interesting and rewarding.
Modding Terra
The goal of this Mod would be to improve play on Terra (eventually Rspeers Terra Incognita too) by (a) making it worthwhile to settle the NW, (b) encouraging the AI to be more expansionist, (c) giving it a better feeling of discovery and colonization.
So here are the key elements and some options:
Spoiler :
1- Adoption of a social policy branch would give a unique bonus to overseas cities upon researching Navigation.
For example, opening Commerce could give a boost to the value of overseas trade routes or Rationalism would provide extra science from luxury resources found overseas. That way developing overseas colonies would provide an advantage to any CIV regardless of their grand strategy. Even those looking for a Cultural victory could gain, though they are more likely not to expand. I would select Navigation instead of Astronomy as the threshold so that these gains do not show up with the first settler sent to the NW.
Modding requirements: a) modify intro Social Policies to trigger the new bonus upon researching Navigation, b) find a way for the game to differentiate between same-continent and overseas cities.
2- Adapt the culture/science/golden age/national wonders costs and the target number of cities to account for the larger map.
This is a pretty straightforward way to encourage expansion or at least remove some disincentives to it.
Modding requirements: Mostly changes to ratios in World.xml and costs in Buildings.xml
3- Make CIVs more resilient early in the game.
To ensure that the OW doesnt become a graveyard of empires and to put more demographic, territorial and resource pressure to overseas expansion as well as stimulate competition.
Modding requirements: either a) change the base city defense value or b) add a building akin to Kaels Palissade for early defense. I would be more inclined to go for the latter to preserve early game tradeoffs between expansion and defense.
4- AI CIVs destroyed early in the game respawn on the NW.
I dont know if there is any way to make this working in the game. New CIVs would spawn on the NW once a OW CIVs capital falls. Domination-oriented CIVs would thus have an incentive to expand to the NW or else would have to refrain from early conquest. Im thinking of a cut-out point at year 0AD or upon the first accession to the Medieval Era to give the new CIV some time to develop (new CIV would probably start with an extra settler + warrior). Of course, this would add greatly to the new world flavor of Terra.
Modding requirements: this would be a tricky one as far as I know, I havent seen any reference to such a mod and I dont know how the games limitation on the number of CIV per map as well as the CIV location scripts would interfere with such a modification. Im thinking of a Lua script which would trigger the CIV spawn script following the conquest of a Capital before the cut-out point. The spawn point would have to be set on the NW and the location script would have to be re-run to get an acceptable spawn point in that area, both of which might be tricky to mod. If a second CIV falls before the cut-out point, its spawn location would have to be fairly far from the first one. In addition, the possibility of flipping barb units around the spawn point (à la Rhyes & Fall of Civ should be looked at).
5- City States on the NW spawn later in the game.
Again, not sure if this is possible at all. CS would only spawn on the NW (a) if a CIVs capital fall on the OW (same as a major CIV respawn) or (b) once a player researches Astronomy (then they would get already-researched techs). This would ensure that either (a) NW CS are at the same level of development as a respawned CIV or (b) CS are at a similar level of development as early colonies from major CIVs. In addition to preserving the flavor of a NW discovery game, this would add a twist to Terra games: you may either deal with developed CS that are relatively behind technologically speaking because they appeared at the same time as a newly-spawned CIV or you find technologically up-to-date CS that just have started to colonize the NW.
Modding requirements: First, this change would entail rebalancing the Terra script so that about 2/3 of the total CS are on the OW, again adding pressure to overseas expansion and probably adding 2-3 CS to the total. As per CIVs respawn, Lua scripts would have to be design to trigger the spawn process, one for early appearance and one for astronomy-era development. Flipping barbs could also be needed, especially for early start.
Options: Eventually Id like to be able to use davii.adams Minor Civs with a Terra Mod.
6- Add a new optional Colonialism technology and Colonists unit
Colonialism would come after Astronomy and would be slightly more expensive than Navigation, it wouldnt lead to any other technology. Colonialism would allow the training of Colonists units. Colonist would be a special type of settler with the military unit attributes of Pikemen (perhaps with a possibility to upgrade to Musketmen attributes), they might also have slightly stronger defense rate when embarked. Cities founded by Colonists would start with 2 or 3 pop and a free harbor or monument/shrine (perhaps based on open Social Policy branches).
As was suggested in a CIV Fanatics thread (cant find where), founding a city with a colonist could give the opportunity to select between a Colony (founds a regular city), a Territory (founds a puppeted city) or a Dominion (founds a new CS with a big chunk of influence). Founded CS would either be (a) of a random type, (b) selected according to policy branches or (c) Maritime by default (I dont know yet which option would be best balanced).
Researching Colonialism and training colonists would certainly give a big advantage for colonizing the NW, thats why Id make it both expensive and optional. Of course, non-colonialist CIV could still expand in the NW using regular settlers.
Modding requirements: Creating the new tech and new unit should be relatively easy. Modding the type of colony created could be more difficult though. I was thinking that founding a city with a colonist could bring a CS-liberation-like menu which already has the abovementioned options built-in. However, I couldnt find if/where the settle action could be modified.
7- Double speed of all units on Ocean tiles
This change would greatly speed up to discovery and colonization of the NW and thus encourage overseas expansion. One issue with this change is that it would affect coastal warfare and give an advantage to long-range attacks from the open seas. A solution would be to apply this modifier only to Ocean Hex located x hex from the coast or to limit it to international waters (i.e. outside of cultural boundaries.
Modding requirements: reduce the movement costs of Ocean hexes (excluding Ironclads), eventually find a way to reduce ocean hex movement near coastal areas.
8- Make some Luxury Resources only available in the NW.
This might already be part of the Terra script, needs to be confirmed.
Modding requirements: Ratio of OW/NW luxury resources might need a change. Terran maps may require one more Luxury Res than other maps of the same size to help expansion.
9- Introduce new strategic resources for Scientific Victory.
Replace the required strategic resource (aluminium) for SS Cockpit, SS Engine and SS Stasis Chamber to Rare Earths, Methane Hydroxide and Lithium respectively; SS Boosters would continue to require aluminium. These new strategic resources would be revealed upon discovery of Scientific Theory. Rare Earths and Lithium are Land resources and need a mine; Methane Hydroxide is a Sea resource and needs an Offshore Platform. Each node would yield 1 resource. Improved Rare Earths and Lithium resources would yield 1 more gold; improved Methane Hydroxide resource would yield 2 extra science. Two of these resources types would only be available in the NW.
Modding requirements: Add the 3 strategic resources; change the requirements for the units. Adapt the map script to distribute these resources in the OW and NW.
10- Consider introducing a NW area factor in Domination victory (especially if CIV respawn is impossible)
To ensure that Domination Victory is truly a domination, it may be necessary to add a factor to include the NW as a part of that domination, either as a % of total NW land or as a number of cities on the NW.
Modding requirements: Change domination victory conditions, I have no idea how an area % could be included as a condition.
Modding challenges
As described above some of the needed changes for this mod appear (at least in the eye of this modding dilettante) quite challenging. I have been reviewing the online tutorials and various threads on modding available. I have some ideas how to deal with some challenges after getting more comfortable with xml and Lua. Yet for some other issues, I am totally at loss because I cant find ways or dont know if its even possible to program the abovementioned modifications. Here are some troublesome issues.
Spoiler :
1- Overseas bonuses
I would need to find a way to define 2 types of cities so that colonies can gain Social Policy-based bonuses: 1) those on the same continent as the capital or accessible over Coastal waters, 2) those located on a different continent/island separated by Ocean hexes. This could probably be done by mapping potential trade routes connections (i.e. excluding blocades/open borders agreement from the equation) or by uncovering how Other Continents are defined in the ECONOMICAISTRATEGY_EXPAND_TO_OTHER_CONTINENTS function. Alternatively, a distance-from-capital factor could be set and modified depending on map size, but this would then benefit inland expansion Russian-style. If only the last option can be modded, then conquered cities located far away from the capital should be excluded from gaining these benefits.
Ideally this overseas definition could also be used to distinguished NW CIVs and CS to provide social policy-related bonuses.
2- CIV respawn and late CS spawn.
Though it seems theoretically possible to have a Lua script trigger the spawn process as a Game Event later in the game, I havent read anything on this subject online. I dont know if its been tried and if it is possible at all. As far as I know, no official scenario has CIVs or CS spawn late in the game.
In addition, although the Terra map script includes a function to distribute CS on the NW, Im not too sure how much this can be manipulated and if the location-selection script can be invoked later on in the game to make sure CIV respawn are restricted to the NW (there is a similar problem with restricting strategic resources to the NW).
Another issue is founding a city as a CS or as a puppet city, I know its been suggested on the forum, but Im not sure if its ever been implemented in a mod. Also unclear is how to modify the Settle action.
3- Ocean movement
I believe the easiest way to deal with this would be to give all post-Astronomy naval/embarked units (excluding Ironclads) a promotion which boosts Ocean hex speed. As stated above however, finding a way to limit this bonus impact on coastal warfare could also create some modding difficulties like distinguishing between near-land vs. high seas or national vs. international waters. Alternatively, the map script could be adapted to double the average coastal width, yet that may introduce some issues with coastal resources/economics.
4- Area-wide barb flipping upon spawn
An issue related to mid-game spawning of CIVs or CS is to make sure that they wont be surrounded by hostile barbs upon spawning. Thus a mechanism for converting nearby barbarians would probably be needed if a way to allow in game CIV spawn is found.
5- Policy bonuses
For Social Policy-based bonuses triggered by the discovery of Navigation, I think adding a new column to the Social Policy table (using Afforess SQL methodology) for the bonus and making it dependent on the tech would be the way to go. I might be wrong though since I havent seen any policy bonuses dependent on technology.