[PYTHON] zCivics

The only problem I had with getting it to work in BtS was that the code wasn't actually taking effect (as OzzyKP describes), *until* I followed Gaius Octavius' suggestion and enabled the appropriate options in PythonCallbackDefines.xml. Never had any icon issues, so I don't know what's going on there, but at least for me it works great in BtS ...
 
Update zCivics. It's know a zModule for zModular Python. Check the first post for more details. I will be making a couple other updates in a few days.
 
I'm sorry, if question is stupid:
I've downloaded zModularPython and zCivics, added both to my mod.
I've created the zCivics.zcfng in the assets\zConfig directory, added a unit which requieres a civic.
I've deleted the pythoncallbackdefines.xml.
What do i have to do next?

edit: damn, zebra is offline.
I hope here's any other modder, who knows, what to do.
 
Ok the zCnfg file has to have the words loadorder in its name so try zCivicsLoadOrder.zcnfg. See if that works and let me know. ;)
 
First: You do really great work with python :goodjob:.
Now it works :).


But: DAMN!

It was my mistake, i'm sorry.
I copied the CvGameUtily.py to a wrong folder.
I think that would'n be a problem, but i use an ohter CvGameUtils.py, because i want to use JFortZoc.
Now ZCivics work, but JFortZoC only partially, because it uses:
PHP:
def cannotTrain(self,argsList):
		pCity = argsList[0]
		eUnit = argsList[1]
		bContinue = argsList[2]
		bTestVisible = argsList[3]
		bIgnoreCost = argsList[4]
		bIgnoreUpgrades = argsList[5]
		# < JFortZoC Mod Start >
		#if (gc.getUnitInfo(eUnit).getUnitClassType() == gc.getInfoTypeForString("UNITCLASS_SETTLER")):
                        #return True
		# < JFortZoC Mod End >
		return False

and ZCivics has
PHP:
return self.handleCallback("cannotTrain", argsList, False)
instead of "false" in the last line.

:cry:

edit: mmh, one moment, he commented the code out.
And i've copied the other parts.
Mmh, strange problem.
 
If thats the only conflict then there is no conflict because as you said he commented it out. Beyond that I don't know much about jFortZoC.
 
I have a really weird effect.
I have 2 accounts on this pc, one with admin-rights, one without.
Yesterday i started my mod with the last account, i just wanted to look at a few things.
First effect: zcivics doesn't work.
Second effect: After founding a city, i get a immense amount of gold, and i have a negative budget (also a big sum).
I think both values are random.
Third effect: All units in the game get endless experience-points.
I was pretty shocked :eek:, because i didn't change anything.
But then i started it on the account with the admin-rights, and all is normal, zcivics works, and no other weird effects.

I think, this will not be a problem, i just wanted to say it.
 
Did try starting another game on the account that had the problem. I seem to remember a friend having the same problem on unmodded civ.
 
It should. I don't think python functionality was changed with the patch.
 
I need some help with that. I don&#8217;t know what I am doing wrong.

- I downloaded the zModular Python files to modbacana\Assets\Python
- I downloaded the zCivics file to modbacana\Assets\Python\zCivics
- I edited the file zCivisLoadOrder.zcnfg just like that:

[Game Utils]
File = zCivics.py
[/]

[Unit]
Type = UNITCLASS_INQUISITOR
Civic = CIVIC_THEOCRACY
Allow Continue = True
[/]

It doesn&#8217;t work&#8230;
 
The [Unit] tag goes in an INI file that is located in the modbacana directory. I just can't remember what its called. Also this INI file would not require the closing tag ( [/] ).

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.
 
Hey Zebra, I had an idea that you might want to include in an updated version: civic-specific promotions. The premise is that you could link unit promotions to require a civic, so that you might create a special spy promotion available just to civs running Police State, for instance.

The tricky part would be whether to allow the unit to retain the promotion after you switch civics... I'd say probably not, but that's harder to do than the other option -- simply giving the promotion to new units that are being constructed and not messing with already existing units. Anyways, it's an idea. :thumbsup:

I too would be interested in civic-specific promotions
 
Back
Top Bottom