Jump to content
Rpg²S Forum

-CMS


ProGM
 Share

Recommended Posts

Custom Menu System

Descrizione


è un menu ispirato a FFXII, fatto tempo fa per un utente O_


Autore


ProGM



Allegati


URL SCREEN BRUTALMENTE SCADUTO!!!!!


Istruzioni per l'uso


creare una nuova classe sopra main e inserire nel progetto la grafica:

URL BRUTALMENTE SCADUTO!!!!!!!!!!!!!!

 

#			***CMS***
#		Ispirato a FFXII.
#			 By ProGM
class Window_Base2 < Window_Base
	def draw_actor_face(actor, x, y)
		bitmap = RPG::Cache.picture(actor.name)
		cw = bitmap.width
		ch = bitmap.height
		src_rect = Rect.new(0, 0, cw, ch)
		self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
	end
	def draw_actor_level(actor, x, y)
		self.contents.font.color = normal_color
		self.contents.font.size = 40
		self.contents.font.name = "Addled"
		if actor.level < 10
			self.contents.draw_text(x + 32, y, 32, 32, "0" + actor.level.to_s, 2, 2)
		else
			self.contents.draw_text(x + 32, y, 32, 32, actor.level.to_s, 2, 2)
		end
		self.contents.font.size = $fontsize
		self.contents.font.name = $fontface
	end
	def draw_actor_exp(actor, x, y)
		self.contents.font.color = system_color
		self.contents.draw_text(x, y, 40, 32, "EXP")
		self.contents.font.color = normal_color
		self.contents.draw_text(x + 48, y, 84, 32, actor.exp_s, 1, 2)
		self.contents.font.color = Color.new(120, 120, 120)
		if actor.exp_s.to_i < 10
			self.contents.font.color = Color.new(255, 255, 255, 120)
			self.contents.draw_text(x + 40, y, 84, 32, "0000", 0, 2)
		elsif actor.next_exp_s.to_i < 100
			self.contents.draw_text(x + 40, y, 84, 32, "000", 0, 2)
		elsif actor.next_exp_s.to_i < 1000
			self.contents.draw_text(x + 40, y, 84, 32, "00", 0, 2)
		elsif actor.next_exp_s.to_i < 10000
			self.contents.draw_text(x + 40, y, 84, 32, "0", 0, 2)
		end
		self.contents.font.color = normal_color
		
		x = x + 140
		self.contents.font.color = system_color
		self.contents.draw_text(x - 3, y, 40, 32, "NEXT")
		self.contents.font.color = normal_color
		self.contents.draw_text(x + 42, y, 84, 32, actor.next_exp_s, 1, 2)
		self.contents.font.color = Color.new(120, 120, 120)
		if actor.next_exp_s.to_i < 10
			self.contents.font.color = Color.new(255, 255, 255, 120)
			self.contents.draw_text(x + 40, y, 84, 32, "0000", 0, 2)
		elsif actor.next_exp_s.to_i < 100
			self.contents.draw_text(x + 40, y, 84, 32, "000", 0, 2)
		elsif actor.next_exp_s.to_i < 1000
			self.contents.draw_text(x + 40, y, 84, 32, "00", 0, 2)
		elsif actor.next_exp_s.to_i < 10000
			self.contents.draw_text(x + 40, y, 84, 32, "0", 0, 2)
		end
		self.contents.font.color = normal_color
	end
	def draw_actor_hp(actor, x, y, width = 144)
		# Draw "HP" text string
		self.contents.draw_text(x + 80, y - 25, 48, 32, "HP/Max", 0, 2)
		# Calculate if there is draw space for MaxHP
		if width - 32 >= 108
			hp_x = x + width - 108
			flag = true
		elsif width - 32 >= 48
			hp_x = x + width - 48
			flag = false
		end
		# Draw HP
		self.contents.font.size = 33
		self.contents.font.color = actor.hp == 0 ? knockout_color :
		actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
		self.contents.draw_text(hp_x, y - 6, 48, 32, actor.hp.to_s, 2, 2)
		# Draw MaxHP
		if flag
			self.contents.font.color = normal_color
			self.contents.font.size = $fontsize
			self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1, 2)
			self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s, 0, 2)
		end
	end
	def draw_actor_sp(actor, x, y, width = 144)
		# Draw "SP" text string
		self.contents.draw_text(x + 80, y - 25, 48, 32, "SP/Max", 0, 2)
		# Calculate if there is draw space for MaxHP
		if width - 32 >= 108
			sp_x = x + width - 108
			flag = true
		elsif width - 32 >= 48
			sp_x = x + width - 48
			flag = false
		end
		# Draw SP
		self.contents.font.color = actor.sp == 0 ? knockout_color :
		actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
		self.contents.font.size = 33
		self.contents.draw_text(sp_x, y - 6, 48, 32, actor.sp.to_s, 2, 2)
		# Draw MaxSP
		if flag
			self.contents.font.color = normal_color
			self.contents.font.size = $fontsize
			self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1, 2)
			self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s, 0, 2)
		end
	end
	def draw_actor_parameter(actor, x, y, type)
		case type
		when 0
			parameter_name = $data_system.words.atk
			parameter_value = actor.atk
		when 1
			parameter_name = $data_system.words.pdef
			parameter_value = actor.pdef
		when 2
			parameter_name = $data_system.words.mdef
			parameter_value = actor.mdef
		when 3
			parameter_name = $data_system.words.str
			parameter_value = actor.str
		when 4
			parameter_name = $data_system.words.dex
			parameter_value = actor.dex
		when 5
			parameter_name = $data_system.words.agi
			parameter_value = actor.agi
		when 6
			parameter_name = $data_system.words.int
			parameter_value = actor.int
		end
		self.contents.font.color = system_color
		self.contents.draw_text(x, y, 120, 32, parameter_name)
		self.contents.font.color = normal_color
		self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
	end
end
class Window_Selectable2 < Window_Base2
	attr_reader   :index					# cursor position
	attr_reader   :help_window			  # help window
	def initialize(x, y, width, height)
		super(x, y, width, height)
		@item_max = 1
		@column_max = 1
		@index = -1
	end
	def index=(index)
		@index = index
		if self.active and @help_window != nil
			update_help
		end
		update_cursor_rect
	end
	def row_max
		return (@item_max + @column_max - 1) / @column_max
	end
	def top_row
		return self.oy / 32
	end
	def top_row=(row)
		if row < 0
			row = 0
		end
		if row > row_max - 1
			row = row_max - 1
		end
		self.oy = row * 32
	end
	def page_row_max
		return (self.height - 32) / 32
	end
	def page_item_max
		return page_row_max * @column_max
	end
	def help_window=(help_window)
		@help_window = help_window
		if self.active and @help_window != nil
			update_help
		end
	end
	def update_cursor_rect
		if @index < 0
			self.cursor_rect.empty
			return
		end
		row = @index / @column_max
		if row < self.top_row
			# Scroll so that current row becomes top row
			self.top_row = row
		end
		# If current row is more to back than back row
		if row > self.top_row + (self.page_row_max - 1)
			# Scroll so that current row becomes back row
			self.top_row = row - (self.page_row_max - 1)
		end
		# Calculate cursor width
		cursor_width = self.width / @column_max - 32
		# Calculate cursor coordinates
		x = @index % @column_max * (cursor_width + 32)
		y = @index / @column_max * 32 - self.oy
		# Update cursor rectangle
		self.cursor_rect.set(x, y, cursor_width, 32)
	end
	def update
		super
		# If cursor is movable
		if self.active and @item_max > 0 and @index >= 0
			# If pressing down on the directional buttons
			if Input.repeat?(Input::DOWN)
				if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
					@index < @item_max - @column_max
					# Move cursor down
					$game_system.se_play($data_system.cursor_se)
					@index = (@index + @column_max) % @item_max
				end
			end
			# If the up directional button was pressed
			if Input.repeat?(Input::UP)
				if (@column_max == 1 and Input.trigger?(Input::UP)) or
					@index >= @column_max
					$game_system.se_play($data_system.cursor_se)
					@index = (@index - @column_max + @item_max) % @item_max
				end
			end
			# If the right directional button was pressed
			if Input.repeat?(Input::RIGHT)
				if @column_max >= 2 and @index < @item_max - 1
					# Move cursor right
					$game_system.se_play($data_system.cursor_se)
					@index += 1
				end
			end
			# If the left directional button was pressed
			if Input.repeat?(Input::LEFT)
				# If column count is 2 or more, and cursor position is more back than 0
				if @column_max >= 2 and @index > 0
					# Move cursor left
					$game_system.se_play($data_system.cursor_se)
					@index -= 1
				end
			end
			# If R button was pressed
			if Input.repeat?(Input::R)
				# If bottom row being displayed is more to front than bottom data row
				if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
					# Move cursor 1 page back
					$game_system.se_play($data_system.cursor_se)
					@index = [@index + self.page_item_max, @item_max - 1].min
					self.top_row += self.page_row_max
				end
			end
			# If L button was pressed
			if Input.repeat?(Input::L)
				# If top row being displayed is more to back than 0
				if self.top_row > 0
					# Move cursor 1 page forward
					$game_system.se_play($data_system.cursor_se)
					@index = [@index - self.page_item_max, 0].max
					self.top_row -= self.page_row_max
				end
			end
		end
		# Update help text (update_help is defined by the subclasses)
		if self.active and @help_window != nil
			update_help
		end
		# Update cursor rectangle
		update_cursor_rect
	end
end
class Window_MenuStatus < Window_Selectable2
	def initialize
		super(0, 0, 430, 416)
		self.contents = New_Bitmap.new(width - 32, height - 32)
		self.contents.font.name = $fontface
		self.contents.font.size = $fontsize
		refresh
		self.active = false
		self.index = -1
	end
	def refresh
		self.contents.clear
		@item_max = $game_party.actors.size
		for i in 0...$game_party.actors.size
			x = 64
			y = i * 90
			actor = $game_party.actors[i]
			draw_actor_face(actor, x - 30, y + 38)
			draw_actor_level(actor, x - 32, y)
			draw_actor_exp(actor, x, y + 35)
			draw_actor_hp(actor, x + 50, y + 16)
			draw_actor_sp(actor, x + 180, y + 16)
		end
	end
	def update_cursor_rect
		if @index < 0
			self.cursor_rect.empty
		else
			self.cursor_rect.set(0, @index * 90 - 7, self.width - 32, 70)
		end
	end
end
class Window_Help2 < Window_Base
	def initialize
		super(-10, 0, 672, 64)
		self.contents = Bitmap.new(width - 32, height - 32)
		self.contents.font.name = $fontface
		self.contents.font.size = $fontsize
	end
	def set_text(text, align = 0)
		# If at least one part of text and alignment differ from last time
		if text != @text or align != @align
			# Redraw text
			self.contents.clear
			self.contents.font.color = normal_color
			self.contents.blt(0, 3, RPG::Cache.icon("Help.png"), Rect.new(0, 0, 32, 24))
			self.contents.draw_text(36, 0, self.width - 40, 32, text, align)
			@text = text
			@align = align
		end
		self.visible = true
	end
	def choice(id)
		case id
		when 0
			set_text("Per inserire o escudere dal gruppo i vari personaggi.")
		when 1
			set_text("Per dare uno sguardo ai nostri personaggi e alle loro condizioni.")
		when 2
			set_text("Per dotare i personaggi di nuove armi o armature.")
		when 3
			set_text("Qui è contenuto l'elenco di oggetti posseduti dal gruppo.")
		when 4
			set_text("Qui verranno mostrate le abilita di ogni eroe.")
		when 5
			set_text("La mappa principale.")
		when 6
			set_text("Per salvare la partita.")
		when 7
			set_text("Per caricare una partita salvata.")
		when 8
			set_text("Per uscire dal gioco.")
		end
	end
end
class New_Bitmap < Bitmap
	def draw_text(x, y, w, h, text, m = 0, command = 0)
		case command
		when 0
			super (x, y, w, h, text, m)
		when 1
			old_color = font.color.dup
			font.color = Color.new(0, 0, 0, 120)
			super (x - 2, y + 2, w, h, text, m)
			font.color = old_color
			super (x, y, w, h, text, m)
		when 2
			old_color = font.color.dup
			font.color = Color.new(0, 0, 0, 255)
			super (x - 1, y - 1, w, h, text, m)
			super (x - 1, y + 1, w, h, text, m)
			super (x + 1, y - 1, w, h, text, m)
			super (x + 1, y + 1, w, h, text, m)
			font.color = old_color
			super (x, y, w, h, text, m)
		end
	end
end
class Scene_Menu
	def initialize(menu_index = 0)
		@menu_index = menu_index
	end
	def main
		@background = Sprite.new
		@background.bitmap = RPG::Cache.picture("BackGround.png")
		# Make command window
		s1 = "1 Battle Member"
		s2 = "2 Status"
		s3 = "3 Inventario"
		s4 = "4 Oggetti"
		s5 = "5 Magie"
		s6 = "6 Mappa"
		s7 = "7 Salva"
		s8 = "8 Carica"
		s9 = "9 Esci"
		@command_window = Window_Command.new(140, [s1, s2, s3, s4, s5, s6, s7, s8, s9])
		@command_window.index = @menu_index
		@command_window.x = 20
		@command_window.y = 64
		@command_window.opacity = 76
		# If number of party members is 0
		if $game_party.actors.size == 0
			# Disable items, skills, equipment, and status
			@command_window.disable_item(0)
			@command_window.disable_item(1)
			@command_window.disable_item(2)
			@command_window.disable_item(3)
		end
		# If save is forbidden
		if $game_system.save_disabled
			# Disable save
			@command_window.disable_item(4)
		end
		@help_window = Window_Help2.new
		@help_window.opacity = 0
		# Make status window
		@status_window = Window_MenuStatus.new
		@status_window.x = 180
		@status_window.y = 64
		@status_window.opacity = 0
		# Make gold window
		@gold_window = Window_Gold.new
		@gold_window.x = 20
		@gold_window.y = 400
		@gold_window.opacity = 76
		# Execute transition
		Graphics.transition
		# Main loop
		loop do
			# Update game screen
			Graphics.update
			# Update input information
			Input.update
			# Frame update
			update
			# Abort loop if screen is changed
			if $scene != self
				break
			end
		end
		# Prepare for transition
		Graphics.freeze
		# Dispose of windows
		@background.dispose
		@help_window.dispose
		@command_window.dispose
		@status_window.dispose
		@gold_window.dispose
		@map.dispose if @map != nil
	end
	def update
		# Update windows
		@command_window.update
		@status_window.update
		@gold_window.update
		@help_window.choice(@command_window.index)
		# If command window is active: call update_command
		if @command_window.active
			update_command
			return
		end
		# If status window is active: call update_status
		if @status_window.active
			update_status
			return
		end
	end
	def update_command
		# If B button was pressed
		if Input.trigger?(Input::B)
			# Play cancel SE
			$game_system.se_play($data_system.cancel_se)
			# Switch to map screen
			$scene = Scene_Map.new
			return
		end
		# If C button was pressed
		if Input.trigger?(Input::C)
			# If command other than save or end game, and party members = 0
			if $game_party.actors.size == 0 and @command_window.index < 4
				# Play buzzer SE
				$game_system.se_play($data_system.buzzer_se)
				return
			end
			# Branch by command window cursor position
			case @command_window.index
			when 3  # item mod
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Switch to item screen
				$scene = Scene_Item.new
			when 0
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Switch to item screen
				$scene = Scene_Battler.new
			when 4  # skill mod
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Make status window active
				@command_window.active = false
				@status_window.active = true
				@status_window.index = 0
			when 5  # map mod
				$game_system.se_play($data_system.decision_se)
				@map = Sprite.new
				@map.bitmap = RPG::Cache.picture("QUI VA MESSO IL NOME DELLA PICTURE")
			when 2  # equipment mod
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Make status window active
				@command_window.active = false
				@status_window.active = true
				@status_window.index = 0
			when 1  # status mod
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Make status window active
				@command_window.active = false
				@status_window.active = true
				@status_window.index = 0
			when 6  # save mod
				# If saving is forbidden
				if $game_system.save_disabled
					# Play buzzer SE
					$game_system.se_play($data_system.buzzer_se)
					return
				end
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Switch to save screen
				$scene = Scene_Save.new
			when 7  # load mod
				$game_system.se_play($data_system.decision_se)
				$scene = Scene_Load.new(true)
			when 8  # end game mod
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Switch to end game screen
				$scene = Scene_End.new
			end
			return
		end
	end
	def update_status
		# If B button was pressed
		if Input.trigger?(Input::B)
			# Play cancel SE
			$game_system.se_play($data_system.cancel_se)
			# Make command window active
			@command_window.active = true
			@status_window.active = false
			@status_window.index = -1
			return
		end
		# If C button was pressed
		if Input.trigger?(Input::C)
			# Branch by command window cursor position
			case @command_window.index
			when 4  # skill
				# If this actor's action limit is 2 or more
				if $game_party.actors[@status_window.index].restriction >= 2
					# Play buzzer SE
					$game_system.se_play($data_system.buzzer_se)
					return
				end
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Switch to skill screen
				$scene = Scene_Skill.new(@status_window.index)
			when 2  # equipment
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Switch to equipment screen
				$scene = Scene_Equip.new(@status_window.index)
			when 1  # status
				# Play decision SE
				$game_system.se_play($data_system.decision_se)
				# Switch to status screen
				$scene = Scene_Status.new(@status_window.index)
			end
			return
		end
	end
end
class Game_Actor < Game_Battler
	attr_accessor :active
	alias other_setup setup
	def setup(actor_id)
		other_setup(actor_id)
		@active = true
	end
end
class Scene_Battle
	def phase3_next_actor
		begin
			if @active_battler != nil
				@active_battler.blink = false
			end
			if @actor_index == $game_party.actors.size-1
				start_phase4
				return
			end
			@actor_index += 1
			if $game_party.actors[@actor_index].active == false
				@actor_index += 1
				$game_party.actors[@actor_index].current_action.basic == 1 unless @actor_index == $game_party.actors.size
			end
			if @actor_index == $game_party.actors.size
				start_phase4
				return
			end
			@active_battler = $game_party.actors[@actor_index]
			@active_battler.blink = true
		end until @active_battler.inputable?
		phase3_setup_command_window
	end
end
class Scene_Battler
	def main
		@names=[]
		for i in $game_party.actors
			@names.push(i.name)
		end
		@command_window = Window_Command.new(200, @names)
		for i in 0...$game_party.actors.size
			if $game_party.actors[i].active == false
				@command_window.disable_item(i)
			end
		end
		@command_window.x = 120
		@command_window.y = 100
		# Execute transition
		Graphics.transition
		# Main loop
		loop do
			# Update game screen
			Graphics.update
			# Update input information
			Input.update
			# Frame update
			update
			# Abort loop if screen is changed
			if $scene != self
				break
			end
		end
		# Prepare for transition
		Graphics.freeze
		@command_window.dispose
	end
	def update
		@command_window.update
		if Input.trigger?(Input::C)
			case @command_window.index
			when 0
				if $game_party.actors[0].active == false
					$game_party.actors[0].active = true
				else
					$game_party.actors[0].active = false
				end
			when 1
				if $game_party.actors[1].active == false
					$game_party.actors[1].active = true
				else
					$game_party.actors[1].active = false
				end
			when 2
				if $game_party.actors[2].active == false
					$game_party.actors[2].active = true
				else
					$game_party.actors[2].active = false
				end
			when 3
				if $game_party.actors[3].active == false
					$game_party.actors[3].active = true
				else
					$game_party.actors[3].active = false
				end
			end
			@command_window.dispose
			@names=[]
			for i in $game_party.actors
				@names.push(i.name)
			end
			@command_window = Window_Command.new(200, @names)
			for i in 0...$game_party.actors.size
				if $game_party.actors[i].active == false
					@command_window.disable_item(i)
				end
			end
			@command_window.x = 120
			@command_window.y = 100
		end
		if Input.trigger?(Input::B)
			$scene = Scene_Menu.new(0)
		end
	end
end
class Sprite_Battler < RPG::Sprite
	alias old_update update
	def update
		old_update
		self.opacity = 120 if @battler.is_a?(Game_Actor) and @battler.active == false
		self.color = Color.new(255, 255, 255, 90) if @battler.is_a?(Game_Actor) and @battler.active == false
	end
end
class Scene_Load
	alias old_initialize initialize
	def initialize(menu = false)
		@menu = menu
		old_initialize
	end
	def on_cancel
		$game_system.se_play($data_system.cancel_se)
		if @menu
			$scene = Scene_Menu.new(7)
		else
			$scene = Scene_Title.new
		end
	end
end
 

 

 

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 7 months later...

bah, questo errore non l'ho mai avuto sinceramente... comunque editato il post!

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

che versione di rpgmaker usi °_°

 

comunque correggi quelle 2 righe in questo modo:

 

self.contents.font.name = "Arial"
self.contents.font.size = 20

e allo stesso modo tutte le righe simili nello script :P

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

ctrl + f

Progetti:

 http://i.imgur.com/jmLkIqi.png

http://i54.tinypic.com/2rh4ojq.png

https://github.com/ProGM

 

Crea anche tu il tuo gioco per Game Boy!
http://rpg2s.net/gif/SCContest3Oct.gifhttp://www.rpg2s.net/img/fablecontest1st.pnghttp://i43.tinypic.com/1zokd2s.png


http://i.imgur.com/BEu6G.gif

http://i.imgur.com/H1ARhq7.gif

http://i.imgur.com/Af6ijZN.gif

AOT: Associazione Odiamo la Telecom:

http://i.imgur.com/aYJs89E.png

"4 gattini... 4 stelline... E le 4 paperelle non ci stavano :3"

Flame


http://i30.tinypic.com/i27ypj.png

Link to comment
Share on other sites

  • 3 months later...

scusate, il mio gioco ha una schermata Skill personalizzata. Come si può modificare lo script in modo che selezionando la voce Magia,al posto di aprire la finestra predefinita, si colleghi a quest'altro script (he ho già inserito)?

 

Script:

#===============================================================

===============

# カスタマイズポイント

#==============================================================================

module XRXS_MP11

# 個数

NUMBER = 4

end

class Window_SelectSkill < Window_Skill

#

# キャプション

#

@@captions = []

@@captions[0] = "B"

@@captions[1] = "→B"

@@captions[2] = "↑B"

@@captions[3] = "↓B"

end

 

#==============================================================================

# ■ Game_Battler

#==============================================================================

class Game_Battler

#--------------------------------------------------------------------------

# ● 公開インスタンス変数

#--------------------------------------------------------------------------

attr_writer :selected_skills # セレクトされたスキルID配列

def selected_skills

if @selected_skills.nil?

@selected_skills = []

for i in 0...XRXS_MP11::NUMBER

@selected_skills = 0

end

elsif @selected_skills.size < XRXS_MP11::NUMBER

for i in @selected_skills.size...XRXS_MP11::NUMBER

@selected_skills = 0

end

end

return @selected_skills

end

end

#==============================================================================

# ■ Window_Skill

#==============================================================================

class Window_Skill < Window_Selectable

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

alias xrxs_mp11_initialize initialize

def initialize(actor)

xrxs_mp11_initialize(actor)

unless $game_temp.in_battle

self.x = 320

self.y -= 64

self.width = 320

self.height += 32

self.active = false

self.index = -1

@column_max = 1

refresh

end

end

end

#==============================================================================

# □ Window_SelectSkill

#==============================================================================

class Window_SelectSkill < Window_Skill

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

def initialize(actor)

super

self.x = 0

self.y = 64

self.width = 320

self.height = (XRXS_MP11::NUMBER + 1) * 32

self.active = true

self.index = 0

@item_max = XRXS_MP11::NUMBER

@column_max = 1

refresh

end

#--------------------------------------------------------------------------

# ● リフレッシュ

#--------------------------------------------------------------------------

def refresh

if self.contents != nil

self.contents.dispose

self.contents = nil

end

# データ

@data = []

for i in 0...XRXS_MP11::NUMBER

@data.push($data_skills[@actor.selected_skills])

end

# 描写

self.contents = Bitmap.new(width - 32, row_max * 32)

for i in 0...XRXS_MP11::NUMBER

y = i / @column_max * 32

self.contents.font.color = system_color

self.contents.draw_text(4, y, 48, 32, @@captions.to_s, 0)

if @data != nil

draw_item(i)

else

x = 4 + i % @column_max * (288 + 32) + 48

self.contents.font.color = normal_color

self.contents.draw_text(x + 28, y, 204, 32, "---", 0)

end

end

end

#--------------------------------------------------------------------------

# ● 項目の描画

# index : 項目番号

#--------------------------------------------------------------------------

def draw_item(index)

skill = @data[index]

self.contents.font.color = normal_color

x = 4 + index % @column_max * (288 + 32) + 48

y = index / @column_max * 32

rect = Rect.new(x, y, self.width / @column_max - 32, 32)

self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))

bitmap = RPG::Cache.icon(skill.icon_name)

opacity = self.contents.font.color == normal_color ? 255 : 128

self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)

self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)

end

end

#==============================================================================

# ■ Window_SkillStatus

#==============================================================================

class Window_SkillStatus < Window_Base

#--------------------------------------------------------------------------

# ● 公開インスタンス変数

#--------------------------------------------------------------------------

attr_reader :selectskill_window

attr_reader :bottomkeyhelp_window

#--------------------------------------------------------------------------

# ● オブジェクト初期化 [再定義]

#--------------------------------------------------------------------------

def initialize(actor)

super(0, 224, 320, 224)

@actor = actor

self.height = 352 - XRXS_MP11::NUMBER * 32

self.y = 448 - self.height

self.contents = Bitmap.new(width - 32, [height - 32, 1].max)

refresh

 

# 皆して寄生

# セレクトスキルウィンドウ

@selectskill_window = Window_SelectSkill.new(@actor)

# ボトルキーヘルプウィンドウ

@bottomkeyhelp_window = Window_BottomKeyHelp.new

 

# Window_SkillStatus「ウワァァ━━━━━。゚(゚´Д`゚)゚。━━━━━ン!!!!」

# Window_SelectSkill「(・∀・)ニヤニヤ」

# Window_BottomKeyHelp「(・∀・)ニヤニヤ」

end

#--------------------------------------------------------------------------

# ○ フレーム更新

#--------------------------------------------------------------------------

def update

# ウィンドウを更新

@selectskill_window.update

@bottomkeyhelp_window.update

super

end

#--------------------------------------------------------------------------

# ○ 解放

#--------------------------------------------------------------------------

def dispose

@selectskill_window.dispose

@bottomkeyhelp_window.dispose

super

end

#--------------------------------------------------------------------------

# ● リフレッシュ

#--------------------------------------------------------------------------

def refresh

self.contents.clear

draw_actor_name(@actor, 4, 0)

draw_actor_state(@actor, 140, 0)

draw_actor_hp(@actor, 4,64)

draw_actor_sp(@actor, 4,96)

end

end

 

#==============================================================================

# ■ Scene_Skill

#==============================================================================

class Scene_Skill

#--------------------------------------------------------------------------

# ● フレーム更新

#--------------------------------------------------------------------------

alias xrxs_mp11_update update

def update

# 登録

if @selectskill_window.nil?

@selectskill_window = @status_window.selectskill_window

end

if @bottomkeyhelp_window.nil?

@bottomkeyhelp_window = @status_window.bottomkeyhelp_window

end

# ヘルプウィンドウを関連付け

if @selectskill_window.help_window.nil?

@selectskill_window.help_window = @help_window

set_selectskill

end

# セレクトスキルウィンドウがアクティブの場合: update_selectskill を呼ぶ

if @selectskill_window.active

@selectskill_window.update

if @skill_window.active

@skill_window.active = false

return

end

update_selectskill

return

end

# 呼び戻す

xrxs_mp11_update

end

#--------------------------------------------------------------------------

# ○ セレクトスキルへ

#--------------------------------------------------------------------------

def set_selectskill

@selectskill_window.active = true

@bottomkeyhelp_window.clear

@bottomkeyhelp_window.add("→","スキルを使用")

@bottomkeyhelp_window.add("C","選択")

@bottomkeyhelp_window.add("Y","スキル設定を解除")

end

#--------------------------------------------------------------------------

# ○ スキルウィンドウへ

#--------------------------------------------------------------------------

def set_skill_window

@skill_window.active = true

@selectskill_window.active = false

@bottomkeyhelp_window.clear

if @selectskill_window.index >= 0

@bottomkeyhelp_window.add("B","戻る")

@bottomkeyhelp_window.add("C","スキルに設定する")

else

@bottomkeyhelp_window.add("←,B","戻る")

@bottomkeyhelp_window.add("C","スキルを使用")

end

end

#--------------------------------------------------------------------------

# ● フレーム更新 (スキルウィンドウがアクティブの場合)

#--------------------------------------------------------------------------

alias xrxs_mp11_update_skill update_skill

def update_skill

# 左 ボタンが押された場合

if @selectskill_window.index == -1 and Input.trigger?(Input::LEFT)

# カーソル SE を演奏

$game_system.se_play($data_system.cursor_se)

# カーソル

@skill_window.index = -1

@selectskill_window.index = 0

# セレクトスキル選択へ移行

set_selectskill

end

# B ボタンが押された場合

if Input.trigger?(Input::B)

# キャンセル SE を演奏

$game_system.se_play($data_system.cancel_se)

# カーソル

@skill_window.index = -1

if @selectskill_window.index == -1

@selectskill_window.index = 0

end

# セレクトスキル選択へ移行

set_selectskill

return

end

# セレクトスキルで C ボタンが押された場合

if @selectskill_window.index >= 0 and Input.trigger?(Input::C)

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# スキルウィンドウで現在選択されているデータを取得して登録

@skill = @skill_window.skill

@actor.selected_skills[@selectskill_window.index] = @skill.id

# セレクトスキルウィンドウをリフレッシュ

@selectskill_window.refresh

# カーソル

@skill_window.index = -1

# セレクトスキル選択へ移行

set_selectskill

return

end

# 呼び戻す

xrxs_mp11_update_skill

end

#--------------------------------------------------------------------------

# ○ フレーム更新 (セレクトスキルがアクティブの場合)

#--------------------------------------------------------------------------

def update_selectskill

# B ボタンが押された場合

if Input.trigger?(Input::B)

# キャンセル SE を演奏

$game_system.se_play($data_system.cancel_se)

# メニュー画面に切り替え

$scene = Scene_Menu.new(1)

return

end

# C ボタンが押された場合

if Input.trigger?(Input::C)

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# カーソル

@skill_window.index = 0

# スキル選択へ移行

set_skill_window

return

end

# Y ボタンが押された場合

if Input.trigger?(Input::Y)

# 決定 SE を演奏

$game_system.se_play($data_system.decision_se)

# スキルウィンドウで現在選択されているデータを外す

@actor.selected_skills[@selectskill_window.index] = 0

# セレクトスキルウィンドウをリフレッシュ

@selectskill_window.refresh

return

end

# 右 ボタンが押された場合

if Input.trigger?(Input::RIGHT)

# カーソル SE を演奏

$game_system.se_play($data_system.cursor_se)

# カーソル

@skill_window.index = 0

@selectskill_window.index = -1

# スキル選択へ移行

set_skill_window

end

# R ボタンが押された場合

if Input.trigger?(Input::R)

# カーソル SE を演奏

$game_system.se_play($data_system.cursor_se)

# 次のアクターへ

@actor_index += 1

@actor_index %= $game_party.actors.size

# 別のスキル画面に切り替え

$scene = Scene_Skill.new(@actor_index)

return

end

# L ボタンが押された場合

if Input.trigger?(Input::L)

# カーソル SE を演奏

$game_system.se_play($data_system.cursor_se)

# 前のアクターへ

@actor_index += $game_party.actors.size - 1

@actor_index %= $game_party.actors.size

# 別のスキル画面に切り替え

$scene = Scene_Skill.new(@actor_index)

return

end

end

end

#==============================================================================

# □ Window_BottomKeyHelp

#------------------------------------------------------------------------------

# 画面下で操作説明をする透明なウィンドウです。

#==============================================================================

class Window_BottomKeyHelp < Window_Base

#--------------------------------------------------------------------------

# ○ オブジェクト初期化

#--------------------------------------------------------------------------

def initialize

super(0, 432, 640, 64)

self.contents = Bitmap.new(width - 32, height - 32)

self.opacity = 0

clear

end

#--------------------------------------------------------------------------

# ○ クリア

#--------------------------------------------------------------------------

def clear

self.contents.clear

@now_x = 608

end

#--------------------------------------------------------------------------

# ○ 追加

#--------------------------------------------------------------------------

def add(key, explanation)

# 計算

self.contents.font.size = 20

x = self.contents.text_size(key).width

self.contents.font.size = 16

x += self.contents.text_size(explanation).width + 8

@now_x -= x

# 描写

self.contents.font.size = 20

self.contents.font.color = system_color

self.contents.draw_text(@now_x, 0, x, 32, key, 0)

self.contents.font.size = 16

self.contents.font.color = normal_color

self.contents.draw_text(@now_x, 0, x, 32, explanation, 2)

# 余白

@now_x -= 32

end

end

 

 

Edited by Luigi
Link to comment
Share on other sites

ProGM, scusa se ti disturbo, ma per caso da una lista di PG con come primi 4 solo quelli che utilizzi nel gioco?

Come in FFXII?

"Giochiamo a: schiettezza o grande impresa eroica!"

Personaggio PBF: Lyriel
PN: 12/20
PV: 2/2
PA: 4 (5 col mantello d'acero)
Equipaggiamento:

Spada comune
Pugnale comune
Arco elfico (magico, ignifugo. Permette di colpire da lunghe distanze. Se distrutto si auto-restaura a fine battaglia. Le frecce scoccate con questo arco ottengono l'effetto dell'incantesimo Folata di vento permettendo di spazzare via piccoli oggetti e creature.)
Faretra con 20 frecce
Cappuccio
Armatura delle ombre borchiata (punti armatura 4, ignifuga, di notte +1 a furtività)
2 anelli di valore
Borsa comune (10 slot)

  • Corda
  • Penna e calamaio
  • Libro vuoto
  • Forma di formaggio
  • Mappa
  • Cannocchiale
  • Tagliola di ferro
  • Campanellino di Maia
  • Mantello d'Acero (+1PA): un mantello pesante di colore rossiccio che presenta dei motivi fiochi, dello stesso colore, a forma di foglie d'acero. E' dotato di un ampio cappuccio e può coprire completamente chi lo indossa. Se si resta fermi in un'area boschiva o tra un gruppo di alberi il mantello è in grado di celare completamente la presenza del possessore dando un grado di furtività pari a gr.5. Nel caso di bestie ed animali dalla visuale meno acuta, se il giocatore è già stato notato od ha notificato in qualche modo la sua presenza può gettarsi a terra tra un gruppo di foglie o tra i cespugli per scomparire completamente dalla visuale di tali nemici.

181 monete d'oro
Cintura porta coltelli (6 slot)

  • Coltello da lancio intarsiato
  • Coltello da lancio in metallo
  • Coltello da lancio in metallo

Campanellino di Maia




Se Lyriel, e solo lui, suona tre volte il campanellino può richiamare una creatura magica che combatterà al suo fianco al prezzo di 3 PN.
L'animale ha l'aspetto di un leopardo delle nevi, i suoi occhi sono viola e così gli artigli, i denti e la punta della coda. Questa è lunga e larga, molto folta e corposa. Il manto a differenza dei leopardi è tutto bianco, inoltre ha una folta criniera circolare intorno al collo a mo' di sciarpa e che si unisce con la sommità della fronte creando un cresta non molto alta pettinata all'indietro.
La creatura combatte indipendentemente dal possessore (il giocatore potrà descriverne il comportamento in battaglia e fuori, ma il master potrà riservarsi il diritto di far compiere alla creatura delle azioni per conto proprio).
La creatura non deve per forza stare vicino all'utilizzatore, ma può essere mandata lontano e tornare da lui su comando.
Lyriel e l'animale hanno un contatto mentale e possono comunicare anche a distanza.
Non vi è limite alla permanenza della creatura una volta evocata, però se i suoi PV raggiungono lo zero dovrà essere risvegliata magicamente da un mago od un curatore esperto. Lyriel può richiamare all'interno del campanellino la creatura quando essa non è impegnata in combattimento od in altre prove senza sforzi, ma dovrà spendere di nuovo 3 PN per richiamarla. Può continuare a combattere se Lyriel viene sconfitto.
L'animale vede bene anche di notte e se c'è nebbia.
Caratteristiche della creatura:
PV 2
PA 2
Atletica Gr.4
Furtività Gr.1
Attacco (tipo descritto dal giocatore nei limiti fisici di artigli e morso) di massimo Gr.5 può dichiarare DIRETTO su armature di cuoio o cuoio borchiato e MAGICO con tutti gli attacchi. Può dichiarare SONNO se artigli e denti viola entrano in contatto diretto con il sangue l'avversario. DIRETTO e SONNO sono due effetti, quindi come da regolamento solo uno può essere scelto. MAGICO può esser combinato con entrambi.
Malus: il campanellino deve tintinnare, quindi Lyriel suonandolo tradirà la sua presenza.
Il campanellino tutte le volte che viene suonato fa venire in mente Maia a Lyriel, quindi il giocatore dovrà scrivere una frase di almeno 3 parole per ricordare la bambina, ogni volta diversa, altrimenti l'evocazione non avrà esito.

 


Personaggio PBF: Wren
PN: 20/20
PV:2/2
PA:0


Borsa Comune

  • 3 filoni di pane
  • 4 mele
  • prosciutto
  • formaggio
  • coltello da cucina

 

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