CvUnit:
The mod Im currently working on requires that a method in CvPlayer calls a method in CvUnit for each of the players units of a specific type (in this case UNIT_ICBM). At the moment Im simply iterating through every one of the players units every time the method is called. Ideally, however, Id much rather maintain separate list of valid units. The problem is maintaining the list through ::read / ::write calls. Are there any unique identifiers CvUnit uses that persist through those, or would it be necessary to rebuild the list?
CvPlayerAI (CvCityAI?):
The AI needs to build a single additional building. When the specified building is built a flag is set in CvPlayer. The building is a National Wonder, and appears to be limited to one instance of the building per player. Which methods are used in the AIs building selection process (or is it possible to force this behavior in some other manner)?
Any information on the above would be appreciated.
The mod Im currently working on requires that a method in CvPlayer calls a method in CvUnit for each of the players units of a specific type (in this case UNIT_ICBM). At the moment Im simply iterating through every one of the players units every time the method is called. Ideally, however, Id much rather maintain separate list of valid units. The problem is maintaining the list through ::read / ::write calls. Are there any unique identifiers CvUnit uses that persist through those, or would it be necessary to rebuild the list?
CvPlayerAI (CvCityAI?):
The AI needs to build a single additional building. When the specified building is built a flag is set in CvPlayer. The building is a National Wonder, and appears to be limited to one instance of the building per player. Which methods are used in the AIs building selection process (or is it possible to force this behavior in some other manner)?
Any information on the above would be appreciated.