Jump to content
Rpg²S Forum

*Window_equip left add'on


MasterSion
 Share

Recommended Posts

Window_equip left add'on

sostituisce il sempre presente" ->" con un altro simbolo che dipende se il nuovo equip è migliore,peggiore o uguale.

Autore

 

MasterSion

Allegati
http://img257.imageshack.us/img257/5039/equipleft.png

Istruzioni per l'uso

 

Sostituite la window_equip_left con questo script

 

 

 

#==============================================================================
# ** Window_EquipLeft
#------------------------------------------------------------------------------
# This window displays actor parameter changes on the equipment screen.
#==============================================================================

class Window_EquipLeft < Window_Base
	#--------------------------------------------------------------------------
	# * Object Initialization
	# actor : actor
	#--------------------------------------------------------------------------
	def initialize(actor)
		super(0, 64, 272, 192)
		self.contents = Bitmap.new(width - 32, height - 32)
		@actor = actor
		refresh
	end
	#--------------------------------------------------------------------------
	# * Refresh
	#--------------------------------------------------------------------------
	def refresh
		self.contents.clear
		draw_actor_name(@actor, 4, 0)
		draw_actor_level(@actor, 4, 32)
		draw_actor_parameter(@actor, 4, 64, 0)
		draw_actor_parameter(@actor, 4, 96, 1)
		draw_actor_parameter(@actor, 4, 128, 2)
		if @new_atk != nil
			self.contents.font.color = system_color
			if @actor.atk == @new_atk
				self.contents.font.color = system_color
				self.contents.draw_text(160, 64, 40, 32, "=", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
			elsif @actor.atk < @new_atk
				self.contents.font.color = green_color
				self.contents.draw_text(160, 64, 40, 32, "▲", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
			elsif @actor.atk > @new_atk
				self.contents.font.color = crisis_color
				self.contents.draw_text(160, 64, 40, 32, "▼", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
			end
		end
		if @new_pdef != nil
			if @actor.pdef == @new_pdef
				self.contents.font.color = system_color
				self.contents.draw_text(160, 96, 40, 32, "=", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
			elsif @actor.pdef < @new_pdef
				self.contents.font.color = crisis_color
				self.contents.draw_text(160, 96, 40, 32, "▲", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
			elsif @actor.pdef > @new_pdef
				self.contents.font.color = crisis_color
				self.contents.draw_text(160, 96, 40, 32, "▼", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
			end
		end
		if @new_mdef != nil
			if @actor.mdef == @new_mdef
				self.contents.font.color =system_color
				self.contents.draw_text(160, 128, 40, 32, "=", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
			elsif @actor.mdef < @new_mdef
				self.contents.font.color = crisis_color
				self.contents.draw_text(160, 128, 40, 32, "▲", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
			elsif @actor.mdef > @new_mdef
				self.contents.font.color = crisis_color
				self.contents.draw_text(160, 128, 40, 32, "▼", 1)
				self.contents.font.color = normal_color
				self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
			end
		end
	end
	#--------------------------------------------------------------------------
	# * Set parameters after changing equipment
	# new_atk : attack power after changing equipment
	# new_pdef : physical defense after changing equipment
	# new_mdef : magic defense after changing equipment
	#--------------------------------------------------------------------------
	def set_new_parameters(new_atk, new_pdef, new_mdef)
		if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
			@new_atk = new_atk
			@new_pdef = new_pdef
			@new_mdef = new_mdef
			refresh
		end
	end
end

 

 

 

Bugs e Conflitti Noti

 

N/A (logicamente non funziona se la stessa window viene riscritta da un altro script)

Note


per cambiare i colori dei simboli cercate all'interno della finestra questa stringa self.contents.font.color
e variate il valore dopo l'uguale.

Edited by Dilos
Script monoriga sistemato.

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

Link to comment
Share on other sites

Ma non sarebbe più bello colorare il numero che sta dopo?

Io nel mio window_equip_left, quando cambio equip se metto un oggetto + forte mi viene la scritta in verde tipo

 

100 >> 150

 

quando è + debole

 

100 >>80

 

e quando è uguale non cambia colore

 

Comunque bravo!

 

 

http://files.nireblog.com/blogs4/narutozorro9kolas/files/firma-naruto-y-yondaime.gif

 

 

Link to comment
Share on other sites

A me non funge manco questo..mi da gli stessi errori che nel light effect.

Sarà dovuto al fatto che devo copiaincollare lo script prima in OperOffice e poi da li riportarlo in rpg maker, perchè li mettete sempre in modo tale che vengono su una riga sola?

Link to comment
Share on other sites

A me non funge manco questo..mi da gli stessi errori che nel light effect.

Sarà dovuto al fatto che devo copiaincollare lo script prima in OperOffice e poi da li riportarlo in rpg maker, perchè li mettete sempre in modo tale che vengono su una riga sola?

Il problema è del tuo browser, non di chi posta gli script.

Io lo vedo normalmente, come tutti gli script in questo forum.

 

Detto questo, per ritornare in-topic, Master, script semplice e molto utile.

Partecipante al Rpg2s.net Game Contest 2008/2009
http://www.rpg2s.net/contest/GameContest0809/gc0809-bannerino.jpg
Gioco in Sviluppo: Oromis' Tale

Premi Rpg2s.net Game Contest 2008/2009:
http://www.rpg2s.net/gif/GC_programmazione2.gif Miglior Programmazione XP: 2°
http://www.rpg2s.net/gif/GC_premio3.gif Longevità: 3°

Hiken... Tsubame Gaeshi!

Link to comment
Share on other sites

Grazie Amos sono semplicemente 3 condizioni if però e un modo come un altro per migliorare graficamente il gioco.

 

Per Andre4e :

Se vuoi posso colorare anche le scritte seguenti ci metto veramente poco.

http://img256.imageshack.us/img256/7639/ihateyou.gif

Un uomo senza religione è come un pesce senza bicicletta.

http://img18.imageshack.us/img18/3668/decasoft1.png

http://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif

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