City-State Investments
Download it here: http://forums.civfanatics.com/downloads.php?do=file&id=20678
IF YOU ENCOUNTER BUGS OR ODDITIES, PLEASE REPORT THEM WITH AS MUCH DETAIL AS POSSIBLE AND A SAVED GAME IF POSSIBLE
This is a mod component being developed as a piece of a larger City-State mod, which is in turn a component of my Epochs mod (see sig). I'm releasing it because its effects on the game as a standalone mod are significant.
Features
City-State Investments removes the ability to gift lump sums of Gold from the game, replacing it with the concept of investing in a City-State. Investments cost you gold per turn based on the Era of the game you're in, giving the City-State various benefits, while you gain Influence with them each turn.
You can choose between Economy, Growth and Military investments. Economy investments give the City-State gold each turn and production in their capital city. Growth investments give them bonus food and growth % in their capital city. Military investments give them a free unit every few turns.
While investing, you accrue Goodwill with the City-State; after you stop investing, your Influence will not start decaying with them for a number of turns equal to the number of turns you've invested in them.
What does this do to my game?
Quite a few of the features of this mod are intended to hook into pieces of the larger mods it's being developed for, but as is it changes the nature of city-state friendship and of the Diplomacy Victory quite a bit.
Friendship and alliance is much easier to maintain, as you can always put a low level investment on a City-State in order to maintain/slightly increase your Influence with them.
However, you can't just snatch City-States away from other players anymore; acquiring new allied City-States takes planning. If the UN is about to be built and you don't have longstanding relationships with many City-States, it doesn't matter how much money you have, you won't be able to buy them up in time.
There are two non-City State bonus features:
Compatibility
This mod uses a custom GameCoreDLL and will not be compatible with any other mod with a custom DLL.
This mod replaces the following UI files and will not be compatible with any other mod which relies on those files:
This mod includes whoward69's UI - Notifications mod as part of it. You should not load both mods, but you will get the complete functionality of that mod as part of it.
To Do
My backlog of additional features to implement or iterate on is:
For Modders
This mod adds the following game events:
It adds the following new Lua methods:
iType values are:
0: Economy Investment
1: Military Investment
2: Growth Investment
iSize values are:
0: Small Investment
1: Medium Investment
2: Large Investments
New XML Variables explained here:
Eras data:
<SmallGoldInvestment> - Cost per turn in gold for a Small investment in this era.
<MediumGoldInvestment> - Cost per turn in gold for a Medium investment in this era.
<LargeGoldInvestment> - Cost per turn in gold for a Large investment in this era.
<GrowthInvestmentFoodBonus> - Bonus food in the city-state's capital for a Large investment in this Era.
<GrowthInvestmentFoodModifier> - Bonus Growth % in the city-state's capital for a Large investment in this Era.
<EconomyInvestmentGoldBonus> - Bonus Gold Per Turn for the City-State for a Large investment in this Era.
<EconomyInvestmentProductionBonus> - Bonus Production in the City-State's capital for a Large investment in this Era.
Small investments yield 1/3 the benefits (rounded up), while Medium investments yield 2/3 the benefits (rounded up).
GameDefines:
INVESTMENT_INFLUENCE_GAIN_PER_TURN_SMALL - Influence gained with that City-State for a Small Investment.
INVESTMENT_INFLUENCE_GAIN_PER_TURN_MEDIUM - Influence gained with that City-State for a Medium Investment.
INVESTMENT_INFLUENCE_GAIN_PER_TURN_LARGE - Influence gained with that City-State for a Large Investment.
INVESTMENT_MILITARY_COUNTER_PER_UNIT - The number of 'points' of Military Investment required for the City-State to be given a new unit.
INVESTMENT_MILITARY_COUNTER_SMALL_INCREMENT - The number of 'points' of Military Investment per turn awarded for a Small Military Investment.
INVESTMENT_MILITARY_COUNTER_MEDIUM_INCREMENT - The number of 'points' of Military Investment per turn awarded for a Medium Military Investment.
INVESTMENT_MILITARY_COUNTER_LARGE_INCREMENT - The number of 'points' of Military Investment per turn awarded for a Large Military Investment.
Note that all Military Points are added together (if multiple players are investing in this City-State's military), and that the unit awarded will always be a recommended Offense unit.
Game Core source code available on request.
Download it here: http://forums.civfanatics.com/downloads.php?do=file&id=20678
IF YOU ENCOUNTER BUGS OR ODDITIES, PLEASE REPORT THEM WITH AS MUCH DETAIL AS POSSIBLE AND A SAVED GAME IF POSSIBLE
This is a mod component being developed as a piece of a larger City-State mod, which is in turn a component of my Epochs mod (see sig). I'm releasing it because its effects on the game as a standalone mod are significant.
Features
City-State Investments removes the ability to gift lump sums of Gold from the game, replacing it with the concept of investing in a City-State. Investments cost you gold per turn based on the Era of the game you're in, giving the City-State various benefits, while you gain Influence with them each turn.
You can choose between Economy, Growth and Military investments. Economy investments give the City-State gold each turn and production in their capital city. Growth investments give them bonus food and growth % in their capital city. Military investments give them a free unit every few turns.
While investing, you accrue Goodwill with the City-State; after you stop investing, your Influence will not start decaying with them for a number of turns equal to the number of turns you've invested in them.
What does this do to my game?
Quite a few of the features of this mod are intended to hook into pieces of the larger mods it's being developed for, but as is it changes the nature of city-state friendship and of the Diplomacy Victory quite a bit.
Friendship and alliance is much easier to maintain, as you can always put a low level investment on a City-State in order to maintain/slightly increase your Influence with them.
However, you can't just snatch City-States away from other players anymore; acquiring new allied City-States takes planning. If the UN is about to be built and you don't have longstanding relationships with many City-States, it doesn't matter how much money you have, you won't be able to buy them up in time.
There are two non-City State bonus features:
- Cities will not receive religious pressure from unmet Civilizations.
- There is now a GameEvent that will fire when a Building is first created.
Compatibility
This mod uses a custom GameCoreDLL and will not be compatible with any other mod with a custom DLL.
This mod replaces the following UI files and will not be compatible with any other mod which relies on those files:
- CityBannerManager.lua
- CityStateDiploPopup.lua
- CityStateDiploPopup.xml
- CityStateStatusHelper.lua
- TopPanel.lua
This mod includes whoward69's UI - Notifications mod as part of it. You should not load both mods, but you will get the complete functionality of that mod as part of it.
To Do
My backlog of additional features to implement or iterate on is:
- Implement an Investments tab in the Economic Overview UI
- Add Investment information in the Diplo popup in the top right and in the Diplo Overview UI
- Better handle adding a new Military Unit via Military Investment when the land around a City-State is overcrowded
- Create new City-State quests to invest in them for a time period.
- Change Goodwill text when you have only 1 turn remaining ("1 turns").
- Improve AI logic for when to invest, how much to invest and what type of investment to create.
- Integrate Game Speed to Influence Gains and Costs as appropriate.
- Update the Civ Advisors
- Prevent notifications from giving away the identities of unmet players.
- Allow AI players to choose to increase their investment level with a City-State.
- Improve AI logic for deciding when to cancel an Investment.
- Expose many AI values to XML
- Allow AI players to decide to stop investing in a City-State which they are allied with and not in imminent danger of losing their alliance with.
- Create a Civilopedia - Concepts entry.
For Modders
Spoiler :
This mod adds the following game events:
- StraboNewInvestment( iMinorPlayerID, iMajorPlayerID, iType, iSize)
- StraboGoodwillExpired(iMajorPlayerID, iMinorPlayerID)
- StraboOnBuildingCreated(iCityX, iCityY, iBuildingType, iOwnerID, iCityID)
- StraboInvestmentStopped(iMinorPlayerID, iMajorPlayerID)
- StraboNoGoldForInvestments(iMajorPlayerID) - fires if all investments will be cancelled due to lack of funds.
- StraboNewInvestmentMilitaryUnits(iMinorPlayerID, iNumNewUnits, iRemainingCounter, iCounterPerTurn)
It adds the following new Lua methods:
- Game.DoGoldInvestment(iMajorID, iMinorID, iType, iSize)
- Game.GetRemainingGoodwillDuration(iMajorID, iMinorID)
- Player:GetGoldPerTurnFromInvestments()
- Player:RecommendUnit()
- Player:GetInvestmentSizeWithMinor(iMinorID)
- Player:GetInvestmentTypeWithMinor(iMinor)
- Player:GetHasInvestmentWithMinor(iMinor)
- Player:StopInvestmentWithMinor(iMinor)
iType values are:
0: Economy Investment
1: Military Investment
2: Growth Investment
iSize values are:
0: Small Investment
1: Medium Investment
2: Large Investments
New XML Variables explained here:
Eras data:
<SmallGoldInvestment> - Cost per turn in gold for a Small investment in this era.
<MediumGoldInvestment> - Cost per turn in gold for a Medium investment in this era.
<LargeGoldInvestment> - Cost per turn in gold for a Large investment in this era.
<GrowthInvestmentFoodBonus> - Bonus food in the city-state's capital for a Large investment in this Era.
<GrowthInvestmentFoodModifier> - Bonus Growth % in the city-state's capital for a Large investment in this Era.
<EconomyInvestmentGoldBonus> - Bonus Gold Per Turn for the City-State for a Large investment in this Era.
<EconomyInvestmentProductionBonus> - Bonus Production in the City-State's capital for a Large investment in this Era.
Small investments yield 1/3 the benefits (rounded up), while Medium investments yield 2/3 the benefits (rounded up).
GameDefines:
INVESTMENT_INFLUENCE_GAIN_PER_TURN_SMALL - Influence gained with that City-State for a Small Investment.
INVESTMENT_INFLUENCE_GAIN_PER_TURN_MEDIUM - Influence gained with that City-State for a Medium Investment.
INVESTMENT_INFLUENCE_GAIN_PER_TURN_LARGE - Influence gained with that City-State for a Large Investment.
INVESTMENT_MILITARY_COUNTER_PER_UNIT - The number of 'points' of Military Investment required for the City-State to be given a new unit.
INVESTMENT_MILITARY_COUNTER_SMALL_INCREMENT - The number of 'points' of Military Investment per turn awarded for a Small Military Investment.
INVESTMENT_MILITARY_COUNTER_MEDIUM_INCREMENT - The number of 'points' of Military Investment per turn awarded for a Medium Military Investment.
INVESTMENT_MILITARY_COUNTER_LARGE_INCREMENT - The number of 'points' of Military Investment per turn awarded for a Large Military Investment.
Note that all Military Points are added together (if multiple players are investing in this City-State's military), and that the unit awarded will always be a recommended Offense unit.
Game Core source code available on request.