[PYTHON] zCivics

Another stupid question: Could something be added to python code that makes building become "obsolete/disabled" when player changes that civic off that was required for civic specific building? I mean if I have slave market on slavery and then switch to Serfdom, I don't want those previously built slave markets to have any effect in city anymore. If you change again back to slavery, then those already built civic buildings would become active again. Is this possible to do?
 
I don't think there is a way to disable buildings from python, I'll check and see.

P.S I will also check the XML, I think there might be a useful tag in there.
 
When you swich from a civic, is there a way to cause the units to defect rather than disband, i.e. if you switch to representation, your royalists or right-wing paramilitaries take to the hills?
you mentioned that intercivic compatibility will be in the next version, will one be able to make it so that the benefits of each civic differ depending on what they are combinded with?
also, im not very experienced with schema additions, if you add a new line to the schema then each entry in the infos need to be updated to feature the new line? If you add <prereqcivic/> to unitschema then would you have to add that line to each unit or only those directly affected by the new feature.
thanks
 
When you swich from a civic, is there a way to cause the units to defect rather than disband, i.e. if you switch to representation, your royalists or right-wing paramilitaries take to the hills?
I could do that.
you mentioned that intercivic compatibility will be in the next version, will one be able to make it so that the benefits of each civic differ depending on what they are combinded with?
Depends on what you are calling benefits.
also, im not very experienced with schema additions, if you add a new line to the schema then each entry in the infos need to be updated to feature the new line? If you add <prereqcivic/> to unitschema then would you have to add that line to each unit or only those directly affected by the new feature.
thanks
Depends on what attributes you give the xml tag, like if you put min="0" in side of the < and > it would, in theory, not have to be on any. Now the slight problem is that civ requires changes to the SDK for new XML tags to work and some times the SDK forces the tag to be there.
 
if for example, universal suffage gave a plus +1 specialist in each city, but only when combined with Free Speech, or only got the production from towns when matched with emmancipation.
Thanks mate
 
I downloaded your mod and put it into the BtS mod folder. Everytime I load a custom game however, the all of the adviser buttons and the control panel on the bottom of the screen don't load, so I can choose to continue and play with hotkeys or fix the bug. Is there anything you can help me with?
 
Also remember that the CallbackDefines may have to be adjusted from the BtS default. I believe some of the functions used here (like cannotDoCivic) aren't turned on.

I do not know if this is an issue but it never hurts to check.
 
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:
 
Really good idea, Gaius Octavius. I have some use for that!

Zebra, I also ask you again to review my first request (about Locking Civics, found here).

It may not belong in this modcomp (I don't see why not), but it's definitely very useful. :)
 
Another idea (and along my favorite lines :D): how about civ-specific civics? I might want to make it so that only Russia can run State Property, or Rome can have Representation, etc. This is more useful for scenarios but it has broad applications.

I might even get around to doing this myself if I get time. :)
 
Another idea (and along my favorite lines :D): how about civ-specific civics? I might want to make it so that only Russia can run State Property, or Rome can have Representation, etc. This is more useful for scenarios but it has broad applications.

I might even get around to doing this myself if I get time. :)

That would be great. As it is, the only way I can figure to do it is to assign it to a disabled, non-tradeable tech, and set that tech as a starting free tech for a particular civ. Unfortunately, this means it's available to them from the start of the game which isn't necessarily what I want.
 
That would be great. As it is, the only way I can figure to do it is to assign it to a disabled, non-tradeable tech, and set that tech as a starting free tech for a particular civ. Unfortunately, this means it's available to them from the start of the game which isn't necessarily what I want.

I don't have CIV in front of me right now, and I don't remember either, but civics can't have multiple prereq techs (like units and buildings) ?
 
It's kind of hacky, but you could make a third tech which the Civic requires; and that tech will require the civ-specific technology, plus one that comes later on the tech tree which should grant access to the civic. You can make it cost like 1 or something small, but it would work ...
 
works with bts just use a bts original gameutils.py

Hmm, I tried that, and it doesn't seem to be working. The game doesn't crash or anything (at least not yet) but it seems to be ignoring the code altogether.

To test it out I added:
Code:
         self.addUnitPre("UNIT_ARCHER", "CIVIC_SLAVERY")
         self.addBuildingPre("BUILDING_LIGHTHOUSE", "CIVIC_SLAVERY")

But I can still build archers and lighthouses without slavery.
 
So has anyone gotten this to work yet with BTS? I have implemented the code from Zebra's download into the BTS GameUtils python file, but I get the same problem as Me101 where none of the icons show up. I haven't been able to play through the game without the icons to see if the code works.
 
Back
Top Bottom