int CvGame::countKnownTechNumTeams(TechTypes eTech)
{
int iCount = 0;
for (int iI = 0; iI < MAX_TEAMS; iI++)
{
if (GET_TEAM((TeamTypes)iI).isEverAlive())
{
if (GET_TEAM((TeamTypes)iI).isHasTech(eTech))
{
iCount++;
}
}
}
return iCount;
}
from PyScenario import *
from Custom import *
Code:from PyScenario import * from Custom import *
Like that? (never remember )
[EDIT]: OK, it worked. What happens if I build national wonder in a city if another city already has the wonder? Like palace? Two national wonders or it will disappear from other city?
I'm doing the Golden Age thing next but I realized that the method could potentially be useful for more things. What other features could be covered by the same method? I'm thinking stuff like Anarchy, Plague and Great Depression. Anarchy is already covered by the civics() method however, and I'm not so sure I can hack into Plague.py or Stability.py without making changes in the actual modules. And I'd rather not.Some things to start with: modification to tech(), that check if player is the first to invent technology, goldenage() which triggers golden age and deflag() which makes fired label look like unfired. Good luck
from Custom import *
Trigger.rebirth = rebirth
Could you give me an example of use for this?... and deflag() which makes fired label look like unfired.