[Need Python/SDK Help] City Build list

GIR

It'sNotStupidIt'sAdvanced
Joined
Jul 12, 2005
Messages
886
Location
EU
I have a little problem with Mod:

I would like to prevent my City from the ability to build certain Buildings in certain circumstances (e.g. I want to create a new Wonder that gives you a chance to get a UB instead of the standard Building if you build a City Improvement in this City. This works with a python code that replaces the e.g. Walls with the Dun. Now I have the problem that after this replacement I’m able to build the Walls again. Is it possible to prevent my City from building the Walls again if it already has a foreign UB of the same kind?)

Thx for reading
 
I have a little problem with Mod:

I would like to prevent my City from the ability to build certain Buildings in certain circumstances (e.g. I want to create a new Wonder that gives you a chance to get a UB instead of the standard Building if you build a City Improvement in this City. This works with a python code that replaces the e.g. Walls with the Dun. Now I have the problem that after this replacement I’m able to build the Walls again. Is it possible to prevent my City from building the Walls again if it already has a foreign UB of the same kind?)

Thx for reading

Hello,

Have you try to declare the UB in the civilization XML file?
I think it is perhaps a question of Building Class...
 
Take a look at canConstruct and cannotConstruct inside CvGameUtils. They allow you to override the DLL logic. If you use them, make sure to enable whichever one you use in PythonCallbackDefines.xml.
 
Take a look at canConstruct and cannotConstruct inside CvGameUtils. They allow you to override the DLL logic. If you use them, make sure to enable whichever one you use in PythonCallbackDefines.xml.

oh thx a lot!!
i will try it tomorrow
maybe i will need some help, but we will see ;)
 
Back
Top Bottom