EmperorFool
Deity
That will drop the buildings from the pedia, but they'll still show up in the list in the city screen.
You could easily apply the same filter logic in CvMainInterface.py where it draws the build buttons.
. . . it drops them from the list after building it, by hardcoded index.
Yes, if you have a lot of buildings to remove this is better as it will look them up once when the mod loads. You can employ BUG to help here.
1. Create a new Python module, say "GraphicalOnlyBuildings.py" (bad name, pick your own).
2. In it create a function called "init" that builds a list of the buildings to be removed. This list can be a simple global variable.
Code:
# GraphicalOnlyBuildings.py
from CvPythonExtensions import *
import BugUtil
buildings = []
def addBuilding(szType):
eBuilding = gc.getInfoTypeForString(szType)
if eBuilding != -1:
buildings.append(eBuilding)
else:
BugUtil.error("Failed to locate building %s", szType)
def isGraphicalOnly(eBuilding):
return eBuilding in buildings
def init():
addBuilding("BUILDING_ADD_SCIENTIST_SLOT")
addBuilding("BUILDING_ADD_MERCHANT_SLOT")
3. Add a line to Config/init.xml to initialize the new module.
Code:
<init module="GraphicalOnlyBuildings"/>
4. Call GraphicalOnlyBuildings.isGraphicalOnly() from SevoPediaBuilding and CvMainInterface.
Code:
import GraphicalOnlyBuildings
...
def getBuildingType(self, iBuilding):
if (isWorldWonderClass(gc.getBuildingInfo(iBuilding).getBuildingClassType())):
return 2
elif (isNationalWonderClass(gc.getBuildingInfo(iBuilding).getBuildingClassType())):
return 1
elif (GraphicalOnlyBuildings.isGraphicalOnly(iBuilding)):
return 3
else:
return 0
Oh, and the Mac ignoring schema/DLL? Pretty well known by everyone who's seriously tried modding that version.
Sure, the Mac does not have a DLL, but that doesn't mean it ignores the Schema. I just want to know if people assume this because the Mac has no DLL, there are no schema files in the Mac version, or they've modified the schema files with no effect.