Thats the weird thing. No error messages and nothing in the python error log. The only thing I noted is that it won't show up when I certain amount of files in the art file. Even if I just copy the same file several times. It's odd.
I've been modding the Fury Road mod for a bit now. Adding/replacing a whole mess of units. Everything seems to be going fine. However the resettle button(presumably a python button), for the refugees/caravans, is no longer showing up at all. At first I thought it was because I edited python, so I reverted that. The problem was still present. Eventually after taking apart the changes I made one painful piece at a time I found that it from having too many new art assets. Even if the file in Assets/Art weren't being used for anything their existence was somehow stopping the resettle button from showing up.
Long story short: Having too many art files lead to python buttons not showing up. Does anyone know of any way to fix this?
could it be that there are a limited number of 'ideal' start locations, so those are the only place it thinks the AI can fit them in?
This sounds similar to a problem I encountered with the Babylon 5 Mod. The issue was resolved on This thread. Post 297 showed the issue and 298 clarified what the problem was and how to fix it. Hope this is of some use and apologies if it is not related to this at all.
# DaveA ACTION: inspired by Gods Of Old
pUnit = g_pSelectedUnit
iUnitType = pUnit.getUnitType()
pUnitOwner = gc.getPlayer(pUnit.getOwner())
if pUnitOwner.isTurnActive():
# Refugee and truck resettle
n = CvEventInterface.getEventManager().resettleID(iUnitType)
if n > 0:
art = ArtFileMgr.getInterfaceArtInfo("INTERFACE_FURY_RESETTLE").getPath()
screen.appendMultiListButton("BottomButtonContainer", art, 0, WidgetTypes.WIDGET_GENERAL, n, n, False)
# Maybe disable
bDisable = true
pPlot = gc.getMap().plot(g_pSelectedUnit.getX(), g_pSelectedUnit.getY())
if pPlot.isCity():
iOwner = pPlot.getPlotCity().getOwner()
if iOwner == pUnitOwner.getID():
bDisable = false
if bDisable:
screen.disableMultiListButton("BottomButtonContainer", 0, iCount, art)
screen.show("BottomButtonContainer")
iCount = iCount + 1
# Map from unit type to widget action, called by CvMainInterface. 665 is
# for settlers, 667 is for trucks.
def resettleID(self, iType):
if not self.settleTypes.has_key(iType): return 0
if self.settleTypes[iType] == 0: return 665
return 667
# Help strings for action buttons
def getWidgetHelp(self,argsList):
eWidgetType, iData1, iData2, bOption = argsList
trans = CyTranslator()
#if (eWidgetType == WidgetTypes.WIDGET_ACTION):
if iData1 == 665:
return trans.getText("TXT_KEY_FURY_RESETTLE_MOUSE_OVER", ())
if iData1 == 666:
return trans.getText("TXT_KEY_FURY_REFUEL_MOUSE_OVER", ())
if iData1 == 667:
return trans.getText("TXT_KEY_FURY_UNLOAD_MOUSE_OVER", ())
if iData1 == 668:
return trans.getText("TXT_KEY_FURY_UNCONVERT_MOUSE_OVER", ())
return u""
art = ArtFileMgr.getInterfaceArtInfo("INTERFACE_FURY_RESETTLE").getPath()
art = gc.getUnitInfo(0).getButton()