[PYTHON] zCivics

EDIT: On checking my code. I'm wrong. lol The code you have is correct just the [Unit] section goes in a zConfig file located at modbacana/Assets/zConfig/zCivics.zCnfg.

But zCivics.zCnfg doesn't exist. There is modbacana/Assets/Python/Utils/ZCivics.py
Is it this file?
 
Ok, I feal so stupid. :wallbash: I wrote this MOD COMP and I can't even remember how to use it!
Now lets get this strait. Your Assets/Python/zCivics/zCivicsLoadOrder.zcnfg file should look like this:
Code:
[Game Utils]
File = zCivics.py
[/]
Now in your assets directory create a directory zConfig. In this directory make a file called zCivics.zcnfg. The best way is to load Notepad (not Wordpad, or Office 2003, or OpenOffice, etc.). Now use Notepad to make this file look like this:
Code:
[Unit]
Type = UNITCLASS_INQUISITOR
Civic = CIVIC_THEOCRACY
Allow Continue = True[/]
Can't believe that I couldn't figure this out. This should work. If it doesn't load your Assets/Python/CvModName.py file with notepad and make sure it contains the name of your mod.
 
Ok for some reason in your zConfig file you have the closing [/] on the same line as Allow Continue = True. You need to move the [/] to the next line. Aslo you are using a UNITCLASS type. The MOD COMP requires a UNIT type. So UNIT_INQUISITOR works but not UNITCLASS_INQUISITOR. So check CIV4UnitInfos.xml and find the <type> tag of the unit you wnat it to apply to and use the contents of that tag. ;)
 
IT IS WORKING!!!! IT IS WORKING!!!! :aargh:


Zebra, thanks for your time and patients. Your component will be very important in my Mod.

I would like to keep some suggestions:

-There should be a “dynamic” text in the civic description showing what units, buildings or whatever need that civic. As should be a “dynamic” text in the unit (or whatever) description showing the civic needed;

- The “restricted stuff” shouldn’t work (or died) if you change the civic.
 
Just a question, but how hard would it be to add it so that civics gave a diplomatic penalty/bonus to other nations without that civic? (So Slavery would add a -2 "You enslave your people" to the diplomatic screen.)
 
I've been looking for this kind of "device"; awesome, awesome. Someone named The_J told me about it.
 
Would this work in conjunction with Asaf's Unique Civics mod comp? There are some things in here which he does not have. I think adding this with the Unique Civics and adding Hated Civics would make for some pretty complex situations in game.
 
EDIT: This is actually a question about zPython (or however it is called), not zCivics per se.

How would I let this work with RevDCM, or actually, BUG? I can merge everything perfectly fine, but...

Code:
class CvGameUtils:
	"Miscellaneous game functions"
	def __init__(self): 

		self.callbacks =	{
Very long list...

However, your CvGameUtils has 'pass' instead of self.callbacks etc. When I use yours instead of BUG's, the game plays normally (I guess, I didn't play past the first turn) but doesn't store the options that you can select with Ctrl Alt O (I believe).
 
Back
Top Bottom