Global - City States Gifts

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,699
Location
Near Portsmouth, UK
City states give a gift of gold (mercantile), food (maritime), culture (cultural), faith (religious) or (possibly) a unit (militaristic).

In addition to the specific gift a friendship boost is also given - city states are sociable, they like meeting great nations!

Friendly city states give more than neutral ones, who in turn give more than hostile ones (if they give anything at all). Irrational city states are ... irrational in their gifts!

The first team to meet a city state gets more than subsequent ones, and the leader of the team gets more than the other team members.

Download (and required DLL Download)





EDIT: And all the configuration parameters if you don't like my values ;)
Spoiler :
<!-- These are the values for the first team to meet a neutral CS, -->
<!-- multipliers for friendly and hostile city states are below -->
<!-- Irrational city states roll to see if they are friendly, neutral or hostile towards the meeting player -->
<Row Name="MINOR_CIV_FIRST_CONTACT_BONUS_FRIENDSHIP" Value="12"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_BONUS_CULTURE" Value="8"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_BONUS_FAITH" Value="8"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_BONUS_GOLD" Value="30"/>
<!-- Only the team leader gets these bonuses -->
<Row Name="MINOR_CIV_FIRST_CONTACT_BONUS_FOOD" Value="8"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_BONUS_UNIT" Value="30"/> <!-- This is a percentage -->
<Row Name="MINOR_CIV_FIRST_CONTACT_XP_PER_ERA" Value="5"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_XP_RANDOM" Value="10"/>

<!-- Multiplier and Divisor for the team leader (usually the player meeting the CS), we can only store ints so *2 is 2/1 -->
<Row Name="MINOR_CIV_FIRST_CONTACT_PLAYER_MULTIPLIER" Value="2"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_PLAYER_DIVISOR" Value="1"/>
<!-- Multiplier and Divisor for the subsequent teams meeting the CS, we can only store ints so *0.5 is 1/2 -->
<Row Name="MINOR_CIV_FIRST_CONTACT_SUBSEQUENT_TEAM_MULTIPLIER" Value="1"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_SUBSEQUENT_TEAM_DIVISOR" Value="2"/>
<!-- Multiplier and Divisor for friendly city states bonuses, we can only store ints so *1.5 is 3/2 -->
<Row Name="MINOR_CIV_FIRST_CONTACT_FRIENDLY_BONUS_MULTIPLIER" Value="3"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_FRIENDLY_BONUS_DIVISOR" Value="2"/>
<!-- Multiplier and Divisor for friendly city states unit percentage, we can only store ints so *2 is 2/1 -->
<Row Name="MINOR_CIV_FIRST_CONTACT_FRIENDLY_UNIT_MULTIPLIER" Value="2"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_FRIENDLY_UNIT_DIVISOR" Value="1"/>
<!-- Multiplier and Divisor for hostile city states bonuses, we can only store ints so *0.5 is 1/2 -->
<Row Name="MINOR_CIV_FIRST_CONTACT_HOSTILE_BONUS_MULTIPLIER" Value="1"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_HOSTILE_BONUS_DIVISOR" Value="2"/>
<!-- Multiplier and Divisor for hostile city states unit percentage, we can only store ints so *0 is 0/1 -->
<Row Name="MINOR_CIV_FIRST_CONTACT_HOSTILE_UNIT_MULTIPLIER" Value="0"/>
<Row Name="MINOR_CIV_FIRST_CONTACT_HOSTILE_UNIT_DIVISOR" Value="1"/>
 

Attachments

  • CsGift1.jpg
    CsGift1.jpg
    34.3 KB · Views: 1,006
  • CsGift2.jpg
    CsGift2.jpg
    33.1 KB · Views: 737
  • CsGift3.jpg
    CsGift3.jpg
    39.9 KB · Views: 220
  • CsGift4.jpg
    CsGift4.jpg
    32.2 KB · Views: 188
  • CsGift5.jpg
    CsGift5.jpg
    34.8 KB · Views: 249
  • CsGift6.jpg
    CsGift6.jpg
    28.4 KB · Views: 153
  • CsGift7.jpg
    CsGift7.jpg
    29.2 KB · Views: 775
Great. I was scratching my head how to do something like this using Lua. Always wondered why only religious CS were gifting more than mere gold.
 
Oh wow that's fantastic. I love the doggie-bag with food. :D Is there some place I can read about what to do with a .dll mod to get it to work?
 
Hi whoward69, tried to playtest this. The mod seems to have the desired effect, but I don't get any pop-ups when I meet a new city-state. I have v. 12 of the .dll as well as this one installed. Can you explain if I do something wrong?
 
Any other mods? Specifically ones that also modify CityStateDiploPopup.lua and CityStateGreetingPopup.lua

Also, what's in lua.log (assuming you have logging enabled)
 
I have many other mods, but I didn't think any of them would modify those popups.

Lots of info in my lua.log - I've attached it, if that's any help.
 

Attachments

  • Lua.log.txt
    72.6 KB · Views: 150
In CityStateDiploPopup.lua and CityStateGreetingPopup.lua within the UI\InGame\Popups sub-directory of the mod you will find the code

Code:
	local sProtectingPlayers = getProtectingPlayers(g_iMinorCivID);

	if (sProtectingPlayers ~= "") then
		Controls.ProtectInfo:SetText("[COLOR_POSITIVE_TEXT]" .. sProtectingPlayers .. "[ENDCOLOR]");
	else
		Controls.ProtectInfo:SetText(Locale.ConvertTextKey("TXT_KEY_CITY_STATE_NOBODY"));
	end
	
	Controls.ProtectInfo:SetToolTipString(Locale.ConvertTextKey("TXT_KEY_POP_CSTATE_PROTECTED_BY_TT"));
	Controls.ProtectLabel:SetToolTipString(Locale.ConvertTextKey("TXT_KEY_POP_CSTATE_PROTECTED_BY_TT"));

delete it from each file - that'll fix the immediate problem.

I vaguely remember an issue uploading that mod, and I note I'm using v2 on my system which isn't on my site yet
 
Hi, I tried to do as you said, but in the folder there is only the CityStateGreetingPopup.lua file (and no other files!) - the CityStateDiploPopup.lua file is not there at all!
 
Just wanted to report that after I commented out the lines you mentioned, the pop-up works as intended!
 
Top Bottom