I have another question, How do I get some help text to act like a prerequisite, ie it is red if it is preventing you from building something?
Naw... he was talking about prerequisite notifications really. Good info on text color though... thanks for that!
How are Heroes denoted in the xml definition on them? Is there a boolean tag to say isHero or something along those lines?
###world units - part 2 - The_J
SevoScreenEnums.PEDIA_WORLD_UNITS : SevoPediaUnit.SevoPediaUnit(self),
#~ SevoScreenEnums.PEDIA_WORLD_UNITS : SevoPediaHero.SevoPediaHero(self),
###world units - part 2 - The_J
self.szCategoryUnits = localText.getText("TXT_KEY_PEDIA_CATEGORY_UNIT", ())
###world units - part 4
self.szCategoryWorldUnits = localText.getText("TXT_KEY_PEDIA_CATEGORY_HERO", ())
Ok, so what would getHero be supposed to do exactly?
1)Ah, I see what you want now. Hmm... I don't think it'd be problematic to simply use gc.getUnitInfo in that case.1) I was asking if it existed already. Since the Python code in the SevopediaHeroes.py uses gc.getHeroInfo where ever you would expect gc.getUnitInfo. If te code is not in the dll then the that python screen was not being used. I could rewrite the python, keeping an indexed array where the hero index points to the unit index and just use gc.getUnitInfo.
2) Hero is defined as a world unit ie there can only be one as defined in the UnitClassInfos XML just like world wonders.
EditWhat are the numerical values for each of the properties (Crime, Disease, Pollution(Water) and Pollution(Air)). What I need is Minimum value, Maximum value, Below what value is OK, Above what value is Bad, Above what value is Very Bad. Hint: it is for something like the Revolution warning bar.
THAT depends on the specific RESULT of the property, like a building that would auto build is given an iminimum and an imaximum and so on. I'm soon to go in and take a much deeper look into the structure of that system so I can harmonize with it better in my Disease mechanism so I can't get much more specific yet.
Each property info has a range specified via the iOperationalRangeMin and iOperationalRangeMax values in teh XML. It can go out of the range, but the range specifies the low end where effects start to happen and a high end by which time the effects are as bad as they are going to get. Crime, in v27, has them at 0 and 1000. The "badness" is probably not well defined (i.e. it isn't just some function of the value) since it depends on the auto-build levels for buildings for the property and some of the buildings have mild effects and others stronger effects.
Thesetwo range values do not currently appear to be available to the Python. The only properties of the PropertyInfo that are defined for Python (in v27, I suppose more could be in the SVN) are getChar (to get the font symbol for the property) and isSourceDrain (I have no idea what the python does with this). These are defined in CyInfoInterface4.cpp.