I need complete steps to Set City States at -1 Influence

king_dean

Warlord
Joined
May 6, 2007
Messages
198
I need complete steps to set all City States at -1 Influence starting on turn 1. Currently, all city states begin at influence zero which sets it as neutral. I need all city states to begin at -1 below neutral and it needs to apply to any random map (not through worldbuilder).

If it's too tedious for a detailed step-by-step from A to Z then thanks anyway. If you can provide it then you will be recognized in CivRome. Thanks.
 
You can adapt this code... hook it the game start sequence event. I am not at home, but I have more appropriate code on my computer there. I'll post it later...


Code:
function SetCsFriendships()

if Game.GetGameTurn() >= 0 then

print(">>>> Friendship");

local pWiht
local pWessex
local Wessex

for iPlayer=0, GameDefines.MAX_MAJOR_CIVS-1 do 

local pWessex = Players[iPlayer]
	
  if (pWessex:IsAlive()) then
		if (GameInfo.Civilizations.CIVILIZATION_ENGLAND.ID == pWessex:GetCivilizationType()) then
     
	   	Wessex = iPlayer
		

for iWiht = GameDefines.MAX_MAJOR_CIVS, GameDefines.MAX_CIV_PLAYERS-2, 1 do

local pWiht = Players[iWiht]

   if (pWiht:IsAlive()) then
		if (GameInfo.MinorCivilizations.MINOR_CIV_WIHT.ID == pWiht:GetMinorCivType()) then
										
      pWiht:ChangeMinorCivFriendshipWithMajor(Wessex, .67)

		end
    end
  end
end
end
end
end
end

Events.ActivePlayerTurnEnd.Add(SetCsFriendships)

Change the number from .67 to -1 and have it fire at the opening sequence. I you want all minors and all majors, you'll have to do a bit more recoding.
 
never mind, but thanks anyway. I found a different fix. Sorry for the trouble.
 
Top Bottom