phungus420
Deity
- Joined
- Mar 1, 2003
- Messages
- 6,296
I'm trying to clone some revolutions functions that exist for Civics into traits. Unfortunately jdog has made this require Python and SDK. The SDK stuff is easy, just setting up XML tags and exposing them to Python. This is done. Now I need to get the stuff to work functionally, which unfortunately requires python. Just cloning the functions is not effective as they don't relate well. Right here at the start I've ran into a problem, I just need to get the list for reference so that I can clone the functionality functions, and get the XML tags I've added to do stuff (modify Revolution penalties/bonuses).
Here is what I'm stuck on (and this is the beggining of the file... so I gots a ways to go).
There is nothing equivalent for traits to getNumCivicOptionsInfos() so this is where I am stuck. Anyone know how to get this list to work?
Here is what I'm stuck on (and this is the beggining of the file... so I gots a ways to go).
Code:
# civicsList[0] is a list of all civics of option type 0
civicsList = list()
def initCivicsList( ) :
CvUtil.pyPrint(" Rev - Initializing Civics List")
global civicsList
for i in range(0,gc.getNumCivicOptionInfos()) :
civicsList.append(list())
for i in range(0,gc.getNumCivicInfos()) :
civicInfo = gc.getCivicInfo(i)
civicsList[civicInfo.getCivicOptionType()].append(i)
There is nothing equivalent for traits to getNumCivicOptionsInfos() so this is where I am stuck. Anyone know how to get this list to work?