new trait to increase great engineer rate?

starter

Chieftain
Joined
Dec 22, 2011
Messages
14
Hi guys. I'm wondering if there is any way to modify great engineer rate in one civ's trait? I know currently in XML, we can increase great general rate (China), great scientist rate (Babylon), or generally increase great people rate (unknown civ). However, if there anyway to change great engineer rate ONLY by just changing XML file?
Thanks a lot!
 
BTW, do I need to call this function at the start of the player's turn or at the end of it? Not quite sure about it.
 
I tried this code in lua, but it seems not working. Particularly, setgreatpeopleunitprogress this function never works for me. Any idea on why? Thanks a lot!

function EngineerBoost(iPlayer)

local player = Players[iPlayer];
if GameInfo.Leaders[player:GetLeaderType()].Type == "LEADER_ALEXANDER" then
for pCity in player:Cities() do
pCity:SetGreatPeopleUnitProgress(6,pCity:GetGreatPeopleUnitProgress(6)+2*pCity:GetGreatPeopleUnitRate(6));
end
end
end



GameEvents.PlayerDoTurn.Add( EngineerBoost );
 
Top Bottom