Advertisement
Civilization Fanatics' Center

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Colonization > Civ4Col - Creation & Customization > Civ4Col - Project & Mod Development > Religion and Revolution

Notices

Religion and Revolution Forum for the Religion and Revolution mod.

Reply
 
Thread Tools
Old Dec 13, 2011, 07:03 AM   #1
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
[Religion and Revolution]: Bugs and Todos

Hi guys,

please post any findings, bugs or todos in this thread.
__________________
Religion and Revolution
(Retired Modder)

Last edited by raystuttgart; Aug 21, 2012 at 09:15 AM.
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 07:03 AM   #2
Androrc the Orc
Emperor
 
Androrc the Orc's Avatar
 
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,595
[Bug-fixing] Python Exception with Abandoning Cities

Quote:
Originally Posted by raystuttgart View Post
Abandoning Cities
(@Robert: This Feature is already fully implemented in my Preview)

It is based on a mod-component from Trachmyr.
(I added improvements.)

It basically works like the "Abandon City" from Original CivCol.

A) Drag&Drop the last Citizen of a City to the Garrison-Area in City-Screen.
B) You can equip that settlers in that process if you want.
C) There will be a warning that the city will be lost soon.
D) Now you have time till the end of the game turn
- to change your mind and put a settler in the city again -> this will stop the abandoning
- send ships or wagontrains for example to the empty city to take out the last goods.
E) When you finish the game turn, the city is lost.

Feedback ?
I remember Trachmyr's mod gave me Python exceptions in the city screen when abandoning the colony (but if Python exceptions were disabled, nothing bad would happen). Did you manage to fix that?
__________________
Wyrmsun
Androrc the Orc is offline   Reply With Quote
Old Dec 13, 2011, 07:27 AM   #3
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Quote:
Originally Posted by Androrc the Orc View Post
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.
Attached Thumbnails
Click image for larger version

Name:	Civ4ScreenShot0026.JPG
Views:	113
Size:	112.4 KB
ID:	309048  
__________________
Religion and Revolution
(Retired Modder)

Last edited by raystuttgart; Dec 13, 2011 at 07:41 AM.
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 07:44 AM   #4
Androrc the Orc
Emperor
 
Androrc the Orc's Avatar
 
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,595
Quote:
Originally Posted by raystuttgart View Post
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.
__________________
Wyrmsun
Androrc the Orc is offline   Reply With Quote
Old Dec 13, 2011, 08:09 AM   #5
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Quote:
Originally Posted by Androrc the Orc View Post
That is exactly the problem I was having.
Did you try to fix ?
__________________
Religion and Revolution
(Retired Modder)
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 08:20 AM   #6
Androrc the Orc
Emperor
 
Androrc the Orc's Avatar
 
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,595
Quote:
Originally Posted by raystuttgart View Post
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.
__________________
Wyrmsun
Androrc the Orc is offline   Reply With Quote
Old Dec 13, 2011, 09:31 AM   #7
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Quote:
Originally Posted by Androrc the Orc View Post
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.
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 ):

   global 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.

__________________
Religion and Revolution
(Retired Modder)
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 09:34 AM   #8
Androrc the Orc
Emperor
 
Androrc the Orc's Avatar
 
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,595
Quote:
Originally Posted by raystuttgart View Post
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 ):

   global 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?
__________________
Wyrmsun
Androrc the Orc is offline   Reply With Quote
Old Dec 13, 2011, 09:36 AM   #9
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Quote:
Originally Posted by Androrc the Orc View Post
What happens? Does it result in an infinite loop?
Yes and throwing the same Python-Exceptions all the time.
__________________
Religion and Revolution
(Retired Modder)

Last edited by raystuttgart; Dec 13, 2011 at 11:57 AM.
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 09:43 AM   #10
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
[Bug-fixing] Python Exception with Abandoning Cities

Hi guys,

Androrc has discovered a small bug in our Abandoning Cities feature.
In this thread we will eventually try to solve it.

@Androrc:
Would you like to support fixing this ?

If yes, would it help you if you got access to our "Internal Version" ?

I could give you "reading rights" to our Subversion-Sever if you send me your eMail-address.
(Please send me as Private Message, if you want to.)
__________________
Religion and Revolution
(Retired Modder)

Last edited by raystuttgart; Dec 13, 2011 at 09:53 AM.
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 10:15 AM   #11
Gomer_Pyle
Prince
 
Join Date: Aug 2008
Posts: 354
Just out of curiousity have you tried Abandon Colony by Aymerick? Or is it the same you are talking about?
Gomer_Pyle is offline   Reply With Quote
Old Dec 13, 2011, 11:58 AM   #12
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Quote:
Originally Posted by Gomer_Pyle View Post
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.
__________________
Religion and Revolution
(Retired Modder)
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 12:06 PM   #13
Androrc the Orc
Emperor
 
Androrc the Orc's Avatar
 
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,595
Quote:
Originally Posted by raystuttgart View Post
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.
Indeed, it's the one that seems best to me as well.
__________________
Wyrmsun
Androrc the Orc is offline   Reply With Quote
Old Dec 13, 2011, 12:07 PM   #14
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Hi guys,

the bug is fixed.
(Had been away for a while.)

Code:
if (pHeadSelectedCity.getPopulation() == 0): # RaR abandon city
				return # RaR abandon city- Required to prevent Python Exceptions
Trachmyrs Code there was totally useless and not working.
(Only causing a Python-Exception.)
__________________
Religion and Revolution
(Retired Modder)
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 12:10 PM   #15
Androrc the Orc
Emperor
 
Androrc the Orc's Avatar
 
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,595
Quote:
Originally Posted by raystuttgart View Post
Hi guys,

the bug is fixed.
(Had been away for a while.)

Code:
if (pHeadSelectedCity.getPopulation() == 0): # TAC abandon city
				return # TAC abandon city- Required to prevent Python Exceptions
Trachmyrs Code there was totally useless and not working.
(Only causing a Python-Exception.)
Good! In which part of the file did you put that code?
__________________
Wyrmsun
Androrc the Orc is offline   Reply With Quote
Old Dec 13, 2011, 12:20 PM   #16
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
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
			
			if (pHeadSelectedCity.getPopulation() == 0): # TAC abandon city
				return # TAC abandon city- Required to prevent Python Exceptions
			
			if (pHeadSelectedCity and CyInterface().getShowInterface() == InterfaceVisibility.INTERFACE_SHOW):
...
__________________
Religion and Revolution
(Retired Modder)
raystuttgart is offline   Reply With Quote
Old Dec 13, 2011, 03:33 PM   #17
Androrc the Orc
Emperor
 
Androrc the Orc's Avatar
 
Join Date: Apr 2004
Location: Vienna, Austria
Posts: 1,595
Quote:
Originally Posted by raystuttgart View Post
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
			
			if (pHeadSelectedCity.getPopulation() == 0): # TAC abandon city
				return # TAC abandon city- Required to prevent Python Exceptions
			
			if (pHeadSelectedCity and CyInterface().getShowInterface() == InterfaceVisibility.INTERFACE_SHOW):
...
Thanks
__________________
Wyrmsun
Androrc the Orc is offline   Reply With Quote
Old Dec 13, 2011, 03:58 PM   #18
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Quote:
Originally Posted by Androrc the Orc View Post
Thanks
No, I have to thank you for telling me about that bug.
__________________
Religion and Revolution
(Retired Modder)
raystuttgart is offline   Reply With Quote
Old Dec 26, 2011, 11:44 AM   #19
Gomer_Pyle
Prince
 
Join Date: Aug 2008
Posts: 354
Here is the "Loading Screen" the way it should be showed.

Quote:
Originally Posted by KJ Jansson View Post
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).
And here there is an issue with this screen on my resolution "1920x1080" where I can only see parts of the wagon. It is no big issue but reported nevertheless.



And a small typo maybe. Why is Nieuw Netherlands not New Netherlands?

Last edited by Gomer_Pyle; Dec 26, 2011 at 11:52 AM.
Gomer_Pyle is offline   Reply With Quote
Old Dec 26, 2011, 12:00 PM   #20
raystuttgart
Civ4Col Modder
 
raystuttgart's Avatar
 
Join Date: Jan 2011
Location: Stuttgart, Germany
Posts: 4,360
Quote:
Originally Posted by Gomer_Pyle View Post
Here is the "Loading Screen" the way it should be showed.
That is the old problem with "wide screen"-Resolutions.
Maybe KJ can make an image that works for both (normal and wide-screen).

Quote:
Originally Posted by Gomer_Pyle View Post
Why is Nieuw Netherlands not New Netherlands?
Because that is how the Dutch had called their colonies.
(Just like the French called their colonies "Nouveau France" ...)
__________________
Religion and Revolution
(Retired Modder)

Last edited by raystuttgart; Dec 26, 2011 at 12:05 PM.
raystuttgart is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Colonization > Civ4Col - Creation & Customization > Civ4Col - Project & Mod Development > Religion and Revolution > [Religion and Revolution]: Bugs and Todos

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Advertisement

All times are GMT -6. The time now is 03:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
This site is copyright Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR