Turns to complete

MOD/Turns to complete
Last-modified: 2009-04-16 18:48:39

MOD/Turns to complete †

Turns to complete.jpg



Site



都市画面の文化バー、偉人バーに成長に必要なターン数を表示します。



インストール方法

CvMainInterface.pyに次の文を見つけます。

screen.setLabel( "CultureText",

その行を次の数行にわたるコードに置き換えます。

## FU edit start -- append Turns to Complete 
					iCulRate =  pHeadSelectedCity.getCommerceRate(CommerceTypes.COMMERCE_CULTURE) 
					if ( iCulRate > 0 ): 
						iCulNext = pHeadSelectedCity.getCultureThreshold() 
						iCulNow = pHeadSelectedCity.getCulture(pHeadSelectedCity.getOwner()) 
						iCulTurns = (iCulNext-iCulNow+iCulRate-1)/iCulRate 
						szTurnsToComplete = " %d Turns" %(iCulTurns) 
						szBuffer = szBuffer + szTurnsToComplete 
						szTurnsToComplete = "" 
## FU edit end
					screen.setLabel( "CultureText", "Background", szBuffer, CvUtil.FONT_CENTER_JUSTIFY, 125, yResolution - 184, -1.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )  

同様に次の行を見つけ、

screen.setLabel( "GreatPeopleText",

また置き換えます。

## FU edit start -- append turns to completion 
					iGPRate = pHeadSelectedCity.getGreatPeopleRate() 
					if ( iGPRate > 0 ): 
						iGPNext = gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold() 
						iGPNow = pHeadSelectedCity.getGreatPeopleProgress() 
						iGPTurns = (iGPNext-iGPNow+iGPRate-1)/iGPRate 
						szTurnsToComplete = " %d Turns" %(iGPTurns) 
						szBuffer = szBuffer + szTurnsToComplete 
						szTurnsToComplete = "" 
## FU edit end 
					screen.setLabel( "GreatPeopleText", "Background", szBuffer, CvUtil.FONT_CENTER_JUSTIFY, xResolution - 146, yResolution - 176, -1.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )




Warlordsの場合、少し変更が必要です。

## FU edit start -- append Turns to Complete(for Warlords + indent down)
					iCulRate = pHeadSelectedCity.getCommerceRateTimes100(CommerceTypes.COMMERCE_CULTURE)
					if ( iCulRate > 0 ):
						iCulNext = pHeadSelectedCity.getCultureThreshold()*100
						iCulNow = pHeadSelectedCity.getCultureTimes100(pHeadSelectedCity.getOwner())
						iCulTurns = (iCulNext-iCulNow+iCulRate-1)/iCulRate
						szTurnsToComplete = " %d Turns" %(iCulTurns)
						szBuffer = szBuffer + szTurnsToComplete
						szTurnsToComplete = ""
## FU edit end
					screen.setLabel( "CultureText", "Background", szBuffer, CvUtil.FONT_CENTER_JUSTIFY, 125, yResolution - 184, -1.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
## FU edit start -- append turns to completion(for Warlords + indent down)
					iGPRate = pHeadSelectedCity.getGreatPeopleRate()
					if ( iGPRate > 0 ):
						iGPNext = gc.getPlayer( pHeadSelectedCity.getOwner() ).greatPeopleThreshold(false)
						iGPNow = pHeadSelectedCity.getGreatPeopleProgress()
						iGPTurns = (iGPNext-iGPNow+iGPRate-1)/iGPRate
						szTurnsToComplete = " %d Turns" %(iGPTurns)
						szBuffer = szBuffer + szTurnsToComplete
						szTurnsToComplete = ""
## FU edit end
					screen.setLabel( "GreatPeopleText", "Background", szBuffer, CvUtil.FONT_CENTER_JUSTIFY, xResolution - 146, yResolution - 176, -1.3, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )