ezysquire
Warlord
Unfortunately I don't have a screenshot of the social policy window on turn 67. You will have to trust me in saying that there is no free policy choice there!
function GivePolicy( era, playerID)
pPlayer = Players[playerID];
if pPlayer:IsAlive() and not pPlayer:IsMinorCiv() then
pPlayer:ChangeNumFreePolicies(1);
end
end
Events.SerialEventEraChanged.Add( GivePolicy );
Since we've clearly identified the game's own event is bugged, I think I might be able to do a workaround. I can keep track of every player's era, and if GetCurrentEra() doesn't match, give a free policy. It won't be as simple but should be doable. The lack of a ChangeNumFreePolicies function before the Mongol DLC's release was holding this concept back, not era detection.
I dunno why it runs at the start of the next turn, it's just how the developers coded it. If we're not getting a free policy from the classical era there's a bug in the (hardcoded) SerialEventEraChanged:
Bugs are probably because they don't use the event for any of the normal lua files, so it probably didn't get tested. The "new era" popup is created with a hardcoded method we don't have access to, so I can't use whatever era change detection they used for the popup.PHP:function GivePolicy( era, playerID) pPlayer = Players[playerID]; if pPlayer:IsAlive() and not pPlayer:IsMinorCiv() then pPlayer:ChangeNumFreePolicies(1); end end Events.SerialEventEraChanged.Add( GivePolicy );
However...
Since we've clearly identified the game's own event is bugged, I think I might be able to do a workaround. I can keep track of every player's era, and if GetCurrentEra() doesn't match, give a free policy. It won't be as simple but should be doable. The lack of a ChangeNumFreePolicies function before the Mongol DLC's release was holding this concept back, not era detection.
function GivePolicy( era, playerID)
print("GivePolicy(" .. playerID .. ")");
pPlayer = Players[playerID];
if pPlayer:IsAlive() and not pPlayer:IsMinorCiv() then
pPlayer:ChangeNumFreePolicies(1);
end
end
Events.SerialEventEraChanged.Add( GivePolicy );
function doTest()
print("[B]End of Turn[/B]");
end
Events.ActivePlayerTurnEnd.Add( doTest );
@Tomice
Local happiness/unhappiness is something the developers specifically shifted towards a global approach...
With the full balance package I don't believe ICS is significantly more effective than playing with low quantity, high quality cities, though it could always use further testing.
<!-- <Technologies>
<Update>
<Where Type="TECH_DYNAMITE" />
<Set GridX="9" />
</Update>
<Update>
<Where Type="TECH_COMPASS" />
<Set EmbarkedMoveChange="1" />
</Update>
<Update>
<Where Type="TECH_ASTRONOMY" />
<Set EmbarkedMoveChange="0" />
</Update>
</Technologies>
<Technology_Flavors>
<Update>
<Where TechType="TECH_COMPASS" FlavorType="FLAVOR_NAVAL" />
<Set Flavor="5" />
</Update>
</Technology_Flavors>
<Technology_PrereqTechs>
<Row>
<TechType>TECH_DYNAMITE</TechType>
<PrereqTech>TECH_MILITARY_SCIENCE</PrereqTech>
</Row>
</Technology_PrereqTechs>
-->
Now that you mention it, ezysquire, I don't think I have gotten the free SP from entering the Classical Era, either. No problems with the others, though.
I initially thought this may have been intentional because it's so early, but I looked at the Lua and it doesn't look like it.
BTW, Thal, why is it set to give the SP at the end of the turn and not the beginning?
I have been doing some alterations/additions to thal's mods and I am looking for feedback on what people think of Mech Infantry, Knights and Cavalry in the current build.
I think that mech inf movement should be 2, tanks 4, and modern armor 5. also, cavalry should be 4 instead of 3,...