Jump to content

Correcção do texto ao refinar os items


Braunwald
 Share

Recommended Posts

Exemplo do texto ao Refinar com :

25040    Pergaminho da Bênção:::O Item pode ser piorado desta forma.
25041    Pedra Mágica:::Isto vai aumentar a probabilidade de ser melhorado,    mas se falhares o item pode ser destruído. Queres continuar?    
71032    Pergaminho do Dragão:::(sem qualquer texto)

Coisa feia e ruím.

 

Aqui fica uma correção feita por mim.

#### bin/locale/locale_game.txt

Spoiler
// Search:

REFINE_DESTROY_WARNING	Este Item será destruído se o melhoramento falhar.
REFINE_DOWN_GRADE_WARNING	O Item irá descer de nível se o melhoramento falhar.
REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_1	Isto vai aumentar a probabilidade de ser melhorado,	
REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_2	mas se falhares o item pode ser destruído. Queres continuar?


// Replace with:
REFINE_DESTROY_WARNING	O item será destruído caso o melhoramento falhe.
REFINE_DOWN_GRADE_WARNING_1	O Item não será destruído se o melhoramento falhar,
REFINE_DOWN_GRADE_WARNING_2	mas irá descer um nível na refinação.	
REFINE_DOWN_GRADE_WARNING_3	O Item não será destruído se o melhoramento falhar,
REFINE_DOWN_GRADE_WARNING_4	nem irá descer de nível na refinação.
REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_1	A probabilidade de melhoramento aumentou,	
REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_2	mas se falhar o item irá descer um nível na refinação.	

 

 

#### bin/root/uirefine.py

Spoiler

// Search:
			pyScrLoader.LoadScriptFile(self.dlgQuestion, "uiscript/questiondialog2.py")

// Replace with:
			pyScrLoader.LoadScriptFile(self.dlgQuestion, "uiscript/questiondialog3.py")


// Search:
		dlgQuestion = uiCommon.QuestionDialog2()

// Replace with:
		dlgQuestion = uiCommon.QuestionDialog3()


// Search:
		if 3 == self.type: ## Çöö
			dlgQuestion.SetText1(localeInfo.REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_1)
			dlgQuestion.SetText2(localeInfo.REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_2)
		elif 2 == self.type: ## Ãູ¼­
			dlgQuestion.SetText1(localeInfo.REFINE_DOWN_GRADE_WARNING)
		else:
			dlgQuestion.SetText1(localeInfo.REFINE_DESTROY_WARNING)
			
// Replace with:
		if self.type >= 4: ### item: 71032
			dlgQuestion.SetText1(localeInfo.REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_1)
			dlgQuestion.SetText2(localeInfo.REFINE_DESTROY_WARNING_WITH_BONUS_PERCENT_2)
			dlgQuestion.SetText3(localeInfo.REFINE_WARNING2) 
		elif 3 == self.type: ### item: 25040
			dlgQuestion.SetText1(localeInfo.REFINE_DOWN_GRADE_WARNING_3)
			dlgQuestion.SetText2(localeInfo.REFINE_DOWN_GRADE_WARNING_4)
			dlgQuestion.SetText3(localeInfo.REFINE_WARNING2)
		elif 2 == self.type: ### item: 25041
			dlgQuestion.SetText1(localeInfo.REFINE_DOWN_GRADE_WARNING_1)
			dlgQuestion.SetText2(localeInfo.REFINE_DOWN_GRADE_WARNING_2)
			dlgQuestion.SetText3(localeInfo.REFINE_WARNING2)
		else:
			dlgQuestion.SetText1(localeInfo.REFINE_DESTROY_WARNING)
			dlgQuestion.SetText2(localeInfo.REFINE_WARNING2)
			dlgQuestion.SetText3("")
			
			

 

 

#### bin/root/uicommon.py

Spoiler

// Search:
class QuestionDialog2(QuestionDialog):
	[...]
	
	[...]
		
		
// Add after all class:

class QuestionDialog3(QuestionDialog):

	def __init__(self):
		QuestionDialog.__init__(self)
		self.__CreateDialog()

	def __del__(self):
		QuestionDialog.__del__(self)

	def __CreateDialog(self):
		pyScrLoader = ui.PythonScriptLoader()
		pyScrLoader.LoadScriptFile(self, "uiscript/questiondialog3.py")

		self.board = self.GetChild("board")
		self.textLine1 = self.GetChild("message1")
		self.textLine2 = self.GetChild("message2")
		self.textLine3 = self.GetChild("message3")
		self.acceptButton = self.GetChild("accept")
		self.cancelButton = self.GetChild("cancel")

	def SetText1(self, text):
		self.textLine1.SetText(text)

	def SetText2(self, text):
		self.textLine2.SetText(text)
		
	def SetText3(self, text):
		self.textLine3.SetText(text)
		
		

 

 

#### bin/uiscript/questiondialog3.py

Spoiler

// Create a new file and name it:        questiondialog3.py        past all in the file

import uiScriptLocale

window = {
	"name" : "QuestionDialog",
	"style" : ("movable", "float",),

	"x" : SCREEN_WIDTH/2 - 125,
	"y" : SCREEN_HEIGHT/2 - 52,

	"width" : 280,
	"height" : 105,

	"children" :
	(
		{
			"name" : "board",
			"type" : "board",

			"x" : 0,
			"y" : 0,

			"width" : 280,
			"height" : 105,

			"children" :
			(
				{
					"name" : "message1",
					"type" : "text",

					"x" : 0,
					"y" : 20,

					"text" : uiScriptLocale.MESSAGE,

					"horizontal_align" : "center",
					"text_horizontal_align" : "center",
					"text_vertical_align" : "center",
				},
				{
					"name" : "message2",
					"type" : "text",

					"x" : 0,
					"y" : 35,

					"text" : uiScriptLocale.MESSAGE,

					"horizontal_align" : "center",
					"text_horizontal_align" : "center",
					"text_vertical_align" : "center",
				},
				{
					"name" : "message3",
					"type" : "text",

					"x" : 0,
					"y" : 50,

					"text" : uiScriptLocale.MESSAGE,

					"horizontal_align" : "center",
					"text_horizontal_align" : "center",
					"text_vertical_align" : "center",
				},
				{
					"name" : "accept",
					"type" : "button",

					"x" : -40,
					"y" : 68,

					"width" : 61,
					"height" : 21,

					"horizontal_align" : "center",
					"text" : uiScriptLocale.YES,

					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},
				{
					"name" : "cancel",
					"type" : "button",

					"x" : +40,
					"y" : 68,

					"width" : 61,
					"height" : 21,

					"horizontal_align" : "center",
					"text" : uiScriptLocale.NO,

					"default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
					"over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
				},
			),
		},
	),
}

 

 

 

 

 

 

 

 

 

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...