raystuttgart
Civ4Col Modder
Hi guys,
please post any findings, bugs or todos in this thread.![Thumbs Up :thumbsup: :thumbsup:](/images/smilies/thumbsup.gif)
please post any findings, bugs or todos in this thread.
![Thumbs Up :thumbsup: :thumbsup:](/images/smilies/thumbsup.gif)
Did you manage to fix that?
Yes, I used Trachmyrs ModComp as Blueprint and did some minor adaptions / changes / fixes.
Did not see any python exceptions in my version.
However, I am not sure if I had the "Python Exceptions" activated, when I was testing the feature.
(Will check that.)
Otherwise I really tested the feature very thoroughly and had no problems.
Edit:
Yes, I get some (harmless) Python exceptions, too.
Thanks for telling.
I will try to fix that.
That is exactly the problem I was having.
Did you try to fix ?
I did, but unfortunately my efforts failed. I haven't found out yet why the abandon_city_ZeroRedraw is referenced before being assigned, considering in Trachmyr's mod it is assigned at the initialization of CvMainInterface, and is used in a function of CvMainInterface itself.
def updateCitizenButtons( self ):
[B]global[/B] abandon_city_ZeroRedraw
...
Yes, but in the method it is not declared to use the global "abandon_city_ZeroRedraw" by saying in the beginning of the method:
Code:def updateCitizenButtons( self ): [B]global[/B] abandon_city_ZeroRedraw ...
Thus it tries to create a new local varialbe also called "abandon_city_ZeroRedraw".
However, trying to use the global "abandon_city_ZeroRedraw" only makes the problem worse.
![]()
What happens? Does it result in an infinite loop?
Just out of curiousity have you tried Abandon Colony by Aymerick? Or is it the same you are talking about?
I had taken a look at all "Abandon Colony"-Modcomps that were out at that time.
Trachmyr's was the one I liked best and thus chose it as base for our version.![]()
if (pHeadSelectedCity.getPopulation() == 0): # RaR abandon city
[COLOR="Red"]return [/COLOR]# RaR abandon city- Required to prevent Python Exceptions
Hi guys,
the bug is fixed.
(Had been away for a while.)
Code:if (pHeadSelectedCity.getPopulation() == 0): # TAC abandon city [COLOR="Red"]return [/COLOR]# TAC abandon city- Required to prevent Python Exceptions
Trachmyrs Code there was totally useless and not working.
(Only causing a Python-Exception.)
def updateCitizenButtons( self ):
screen = CyGInterfaceScreen("MainInterface", CvScreenEnums.MAIN_INTERFACE )
xResolution = screen.getXResolution()
yResolution = screen.getYResolution()
screen.hideList(CITIZEN_HIDE)
if (CyInterface().isCityScreenUp()):
CitizenHideList = []
# ON PLOT WORKERS
pHeadSelectedCity = CyInterface().getHeadSelectedCity()
ButtonSize = (CITY_VIEW_BOX_HEIGHT_AND_WIDTH - (MAP_EDGE_MARGIN_WIDTH * 4)) / 3
[COLOR="Red"]if (pHeadSelectedCity.getPopulation() == 0): # TAC abandon city
return # TAC abandon city- Required to prevent Python Exceptions[/COLOR]
if (pHeadSelectedCity and CyInterface().getShowInterface() == InterfaceVisibility.INTERFACE_SHOW):
...
Simply replace the if / elif using abandon_city_ZeroRedraw
Code:def updateCitizenButtons( self ): screen = CyGInterfaceScreen("MainInterface", CvScreenEnums.MAIN_INTERFACE ) xResolution = screen.getXResolution() yResolution = screen.getYResolution() screen.hideList(CITIZEN_HIDE) if (CyInterface().isCityScreenUp()): CitizenHideList = [] # ON PLOT WORKERS pHeadSelectedCity = CyInterface().getHeadSelectedCity() ButtonSize = (CITY_VIEW_BOX_HEIGHT_AND_WIDTH - (MAP_EDGE_MARGIN_WIDTH * 4)) / 3 [COLOR="Red"]if (pHeadSelectedCity.getPopulation() == 0): # TAC abandon city return # TAC abandon city- Required to prevent Python Exceptions[/COLOR] if (pHeadSelectedCity and CyInterface().getShowInterface() == InterfaceVisibility.INTERFACE_SHOW): ...
Thanks![]()
We found a new Starting screen, however, there is a second LOADING screen. Now we have a TAC version, but I propose such variant:
![]()
This image made from last Preview version.
All credits to George Walter Vincent Smith for his "New England Scenery" (1851).
Here is the "Loading Screen" the way it should be showed.
Why is Nieuw Netherlands not New Netherlands?