davidlallen
Deity
I want to add a new civic category for Dune Wars (background in this thread). One key point is that certain buildings should only buildable with this civic. I can see how to change the yields for buildings using civics, but not preventing the building from being built.
There may be some other mods which do this; but does anybody know the details of how it works? There is a python hook canBuild where I could check the civic. But, the problem is that this building ties to a victory condition. If I use canBuild, the AI will not *understand* that the civic prevents the building. The civic attributes that are set by XML could at least theoretically, be used by the AI to decide whether or not the civic is a good idea. Hiding the restriction in python means the AI cannot use this to decide.
Any suggestions on how to do this? I can also associate the building with a tech, if that helps any, but there is no way to restrict techs by civic either.
There may be some other mods which do this; but does anybody know the details of how it works? There is a python hook canBuild where I could check the civic. But, the problem is that this building ties to a victory condition. If I use canBuild, the AI will not *understand* that the civic prevents the building. The civic attributes that are set by XML could at least theoretically, be used by the AI to decide whether or not the civic is a good idea. Hiding the restriction in python means the AI cannot use this to decide.
Any suggestions on how to do this? I can also associate the building with a tech, if that helps any, but there is no way to restrict techs by civic either.