This, I believe, will be my first post. I have been the shy person in the back of the forums that has read almost all the discussions, and does not voice any oppinion or information he might have. Today however, I can not keep to myself any longer. So please fellow Civ4 fanatics, accept me.
Anyway, to get to the point. I have no idea how to code Python, but instead of making a thread discussing how I do not know how to code it, I will post here. My goal in Python is similar to Aussie's. I need to have Civic unique units that unly become avliable with the certain technology, which enables the Civic, which will enable the unit. This is my for my own mod, which is in the proccess of creation, and I need help similar to Aussies.
So far I have taken the code submitted by Aussie (thanks man), and stuck it into, what I believe is, the right .py file (CvGameUtils.py). After the usual XML errors, informing me of my broken XML files and such, my game completely crashes. I might be missing some code in CvGameInterface, but I do not know what code needs to go where.. and I did alter some of Aussie's code. If I knew how to make those clever boxes, I would submit my changes.
if eBuilding == gc.getInfoTypeForString('UNITCLASS_WARLOCK'):
if pPlayer.getCivics() == gc.getInfoTypeForString('CIVIC_NONMAG'):
return True
I dont know what any of the coding does, but that is what I changed in Aussie's code trying to connect it to the XML somehow. I believe I have to change eBuilding maybe to eUnitBuild (or whatever the command is), and maybe instead of a whole UNITCLASS, maybe just UNIT.
Any help is appreciated. I know this is Aussies thread, and he deserves the help before I do, but be aware there is utter Python newbs out there that can benefit from this thread. My goal in my mod is to have 5 civics to chose a unique unit, depending on time period and the technology you have researched. Also, there will be 5 more civics which will give youa superior unit that not only needs one of the previous 5 civics, but resources, and technology. Again, thank you for starting this thread, and if you read this, thank you for that too
-
Ron