Kesler
Master Kekkler
I mean, to be fair, it would be great to actually use Samurai a bit more in the game xD
I mean, to be fair, it would be great to actually use Samurai a bit more in the game xD
Also, the Samurai still upgrades into Riflemen, even though they're two eras away :/. Intentional?
Maybe it should upgrades to Line Intantry in EE
Hmm, seems all you'd need to do is just change the techs mentioned there from the Renaissance era ones to the Enlightenment Era ones and you'd be set.
The Wat Phra Kaew grants +2 Science for Religious Buildings.
Would you check the xml?
cf.
XML\Buildings\Enlightenment_Wonders.xml
Line: 439 - 474
--------------------------------------------------------------
-- Versailles effect (+10 WLTKD turns in all cities on Construction)
-- Author: LeeS
--------------------------------------------------------------
local iVersaillesWonder = GameInfoTypes.BUILDING_EE_VERSAILLES
local iWLTKDmod = (math.ceil(GameDefines.CITY_RESOURCE_WLTKD_TURNS * (50/100))) + 1
function VersaillesCompleted(ownerId, cityId, buildingType, bGold, bFaithOrCulture)
if buildingType == iVersaillesWonder then
for pCity in Players[ownerId]:Cities() do
if not pCity:IsPuppet() and not pCity:IsRazing() and not pCity:IsResistance() then
if pCity:GetWeLoveTheKingDayCounter() > 0 then
pCity:ChangeWeLoveTheKingDayCounter(iWLTKDmod)
else
pCity:SetWeLoveTheKingDayCounter(iWLTKDmod)
end
end
end
end
end
GameEvents.CityConstructed.Add(VersaillesCompleted)
Yeah...the issue with a permanent longer WLTKD 'modification' is there's nothing standard within the game to hang the modification on.Doesn't that just start a WLTKD in all cities though, instead of a Chichen Itza esque longer WLTKD when they occur?
--------------------------------------------------------------
-- Versailles effect (+10 WLTKD turns in all cities in WLTKD on Construction)
-- extends all WLTKD for the player by +10 turns for the remainder of the game as these WLTKD occur
-- Author: LeeS
--------------------------------------------------------------
local iVersaillesWonder = GameInfoTypes.BUILDING_EE_VERSAILLES
local iWLTKDmod = (math.ceil(GameDefines.CITY_RESOURCE_WLTKD_TURNS * (50/100)))
local tCitiesInWLTKD = {["NONE"] = "nobody has built the Versailles yet"}
function VersaillesCityCaptured(iOldOwner, bIsCapital, iX, iY, iNewOwner, iPop, bConquest)
if iNewOwner == 63 then return end
local pCity = Map.GetPlot(iX, iY):GetPlotCity();
if pCity:IsHasBuilding(iVersaillesWonder) then
--City with the Versailles Wonder was just captured
tCitiesInWLTKD = {}
if Players[iNewOwner]:IsMinorCiv() then
tCitiesInWLTKD[iNewOwner] = {["NONE"] = "new owner of the Versailles is a city-state"}
return
else
tCitiesInWLTKD[iNewOwner] = {}
end
for pCity in Players[iNewOwner]:Cities() do
if not pCity:IsPuppet() and not pCity:IsRazing() and not pCity:IsResistance() then
if pCity:GetWeLoveTheKingDayCounter() > 0 then
pCity:ChangeWeLoveTheKingDayCounter(iWLTKDmod)
end
tCitiesInWLTKD[iNewOwner][pCity:GetID()] = pCity:GetWeLoveTheKingDayCounter()
end
end
else
if Players[iNewOwner]:CountNumBuildings(iVersaillesWonder) > 0 then
if not pCity:IsPuppet() and not pCity:IsRazing() and not pCity:IsResistance() then
tCitiesInWLTKD[iNewOwner][pCity:GetID()] = pCity:GetWeLoveTheKingDayCounter()
end
end
end
end
function VersaillesPlayerCityFounded(iPlayer, iCityX, iCityY)
if Players[iPlayer]:CountNumBuildings(iVersaillesWonder) > 0 then
if Players[iPlayer]:IsBarbarian() then return end
if Players[iPlayer]:IsMinorCiv() then return end
tCitiesInWLTKD[iPlayer][Map.GetPlot(iCityX, iCityY):GetPlotCity():GetID()] = 0
end
end
function VersaillesPlayerDoTurn(iPlayer)
local pPlayer = Players[iPlayer]
if pPlayer:IsBarbarian() then return end
if pPlayer:IsMinorCiv() then return end
if pPlayer:CountNumBuildings(iVersaillesWonder) > 0 then
print("Versailles was detected in the empire of player # " .. iPlayer)
for pCity in pPlayer:Cities() do
local iCityID = pCity:GetID()
if not pCity:IsPuppet() and not pCity:IsRazing() and not pCity:IsResistance() then
if tCitiesInWLTKD[iPlayer][iCityID] then
if pCity:GetWeLoveTheKingDayCounter() > tCitiesInWLTKD[iPlayer][iCityID] then
pCity:ChangeWeLoveTheKingDayCounter(iWLTKDmod)
end
else
if pCity:GetWeLoveTheKingDayCounter() > 0 then
pCity:ChangeWeLoveTheKingDayCounter(iWLTKDmod)
end
end
tCitiesInWLTKD[iPlayer][iCityID] = pCity:GetWeLoveTheKingDayCounter()
end
end
print("tCitiesInWLTKD[iPlayer] is a table: iPlayer = player # " .. iPlayer)
for iCityID,WLTKDCounter in pairs(tCitiesInWLTKD[iPlayer]) do
print("Player City of ID# " .. iCityID .. " currently has a WLTKD counter of " .. WLTKDCounter)
end
end
end
function VersaillesCompleted(ownerId, cityId, buildingType, bGold, bFaithOrCulture)
if buildingType == iVersaillesWonder then
tCitiesInWLTKD = {}
tCitiesInWLTKD[ownerId] = {}
for pCity in Players[ownerId]:Cities() do
if not pCity:IsPuppet() and not pCity:IsRazing() and not pCity:IsResistance() then
if pCity:GetWeLoveTheKingDayCounter() > 0 then
pCity:ChangeWeLoveTheKingDayCounter(iWLTKDmod)
end
tCitiesInWLTKD[ownerId][pCity:GetID()] = pCity:GetWeLoveTheKingDayCounter()
end
end
--add additional event subscriptions here
GameEvents.PlayerDoTurn.Add(VersaillesPlayerDoTurn)
GameEvents.PlayerCityFounded.Add(VersaillesPlayerCityFounded)
GameEvents.CityCaptureComplete.Add(VersaillesCityCaptured)
end
end
GameEvents.CityConstructed.Add(VersaillesCompleted)
for iPlayer = 0, GameDefines.MAX_MAJOR_CIVS - 1 do
if Players[iPlayer]:IsAlive() then
if Players[iPlayer]:CountNumBuildings(iVersaillesWonder) > 0 then
tCitiesInWLTKD = {}
tCitiesInWLTKD[iPlayer] = {}
for pCity in Players[iPlayer]:Cities() do
if not pCity:IsPuppet() and not pCity:IsRazing() and not pCity:IsResistance() then
tCitiesInWLTKD[iPlayer][pCity:GetID()] = pCity:GetWeLoveTheKingDayCounter()
end
end
GameEvents.PlayerDoTurn.Add(VersaillesPlayerDoTurn)
GameEvents.PlayerCityFounded.Add(VersaillesPlayerCityFounded)
GameEvents.CityCaptureComplete.Add(VersaillesCityCaptured)
end
end
end
for k,v in pairs(tCitiesInWLTKD) do
if type(v) == "table" then
print("tCitiesInWLTKD[k] is a table: k = player # " .. k)
for iCityID,WLTKDCounter in pairs(tCitiesInWLTKD[k]) do
print("Player City of ID# " .. iCityID .. " currently has a WLTKD counter of " .. WLTKDCounter)
end
elseif k == "NONE" then
print("tCitiesInWLTKD[k] = " .. k .. " because " .. v)
else
print("We have something really wierd going on here with the data in the tCitiesInWLTKD table")
end
end