JFD
Kathigitarkh
I'm trying to get this code to work:
but am not having much luck. It is simply having no effect. There are no errors coming up in the log file either and I'm still slowly figuring out lua. I'd appreciate any help and some explanation as to what I've done wrong. I've managed to learn a few new things on my own, but when there's nothing indicated in the log it makes it difficult. Thanks.
Spoiler :
function OnPolicyAdopted(playerID, policyID)
GameEvents.PlayerAdoptPolicy.Add(OnPolicyAdopted);
local pPlayer = Players[playerID];
local iGoldenAgeBoost = 50;
-- Adjust the size of the bonus based on the game speed
local speedGoldenAgePercent = GameInfo.GameSpeeds[Game:GetGameSpeedType()].GoldenAgePercent;
local adjustedBonusGoldenAgePoints = (iGoldenAgeBoost * speedGoldenAgePercent) / 100;
if (pPlayer:HasPolicy(GameInfo.Policies["POLICY_TRADITION"].ID)) then
pPlayer:ChangeGoldenAgeProgressMeter(iGoldenAgeBoost);
end
endGameEvents.PlayerAdoptPolicy.Add(OnPolicyAdopted);
but am not having much luck. It is simply having no effect. There are no errors coming up in the log file either and I'm still slowly figuring out lua. I'd appreciate any help and some explanation as to what I've done wrong. I've managed to learn a few new things on my own, but when there's nothing indicated in the log it makes it difficult. Thanks.