I'm trying to consolidate a number of constants that I use into a single, imported Python file so they can be easily reassigned later if need be. These are all defined at the top of the file, in the global namespace:
HR.py
However if I do this, either from CvEventManager.py or the python console in game:
The output is:
The InfoType for the civic is always -1, with any of the above, even though those civic definitions all exist and work elsewhere. There's other ways I could implement this but it would be good to know what am I misunderstanding. Any ideas?
HR.py
Code:
gc = CyGlobalContext()
Civic_CorporationExtraProduction = gc.getInfoTypeForString('CIVIC_INDUSTRIALISM'), 2
Civic_CorporationExtraCommerce = gc.getInfoTypeForString('CIVIC_FREE_MARKET'), 2
Civic_CorporationHappiness = gc.getInfoTypeForString('CIVIC_SOCIAL_WELFARE'), 2
Civic_CorporationHealth = gc.getInfoTypeForString('CIVIC_ENVIRONMENTALISM'), 2
Civic_ExtraChoppingProduction = gc.getInfoTypeForString('CIVIC_INDUSTRIALISM')
Civic_GreatPeopleGoldenAge = gc.getInfoTypeForString('CIVIC_EQUAL_RIGHTS')
However if I do this, either from CvEventManager.py or the python console in game:
Code:
import HR
print HR.Civic_ExtraChoppingProduction
print HR.Civic_CorporationHappiness
The output is:
-1
-1, 2
The InfoType for the civic is always -1, with any of the above, even though those civic definitions all exist and work elsewhere. There's other ways I could implement this but it would be good to know what am I misunderstanding. Any ideas?