Jump to content
Rpg²S Forum
  • 0

BUG e altro... [GPS, ProfiloPG, edit a sezione MP3, problemi XAS]


FenriX`
 Share

Question

Vai... d'ora in poi non so quanto riuscirò a fare da solo, è tantissimo che non uso l'rgss e anche prima ricordo che avevo grandi grandi problemi a scamparmela con sti problemi..

vi riporto il contenuto del mio Log con i BUG di gioco XD

*BS* FRAMES EXTRA negli attacchi:

-Prob: Il chara viene splittato nel numero di frames corretto

(secondo lo script "COG Extra Frames")

però non si vedono i frames oltre il 4°

(se i frames sono meno di 4 quelli non presenti vengono visti invisibili)

-Sol: ?

 

 

*BS* MINIMENU' di Battaglia [QUASI]:

-Prob: Quando si usano gli oggetti non aggiorna il numero di oggetti

nella classe Window_Icon...

-Sol: ?

 

 

*BS* Seconda HUD con le Skills:

-Prob: Sostituire le skill negli HotKeys

(quelle visualizzate, a livello di GamePlay gia funge)

quando la variabile universale $rayBATTLE è attivata...

-Sol: ?

 

 

*MN* Scene MP3, Visualizzare l'album installato:

-Prob: Bisogna far vedere l'album che si ha installato in una finestrella...

e sotto il corrispettivo numero di brani...

-Sol: ?

 

 

*MN* Scene PROFILI, Lista dei profili dei PG scovati:

-Prob: Lo scene Profili non è ancora stato creato...

Una lista dei PG scovati come per i mostri, vengono aggiunti

al database quando si incontrano almeno una volta.

-Sol: ?

 

 

*MN* Scene GPS, Mappe multiple della città:

-Prob: Creare uno scene con le mappe del gioco (Cursore per controllare

le info delle mappe e indicatore per la posizione del protagonista).

-Sol: ?

Ora con il vostro permesso passerei ad esprimermi sui singoli problemi XD

FRAMES EXTRA negli attacchi:

per determinare il numero di frame di ogni animazione uso questo script:

class Game_Character  #--------------------------------------------------------------------------  # ● フレーム更新  #--------------------------------------------------------------------------  def update	# ジャンプ中、移動中、停止中で分岐	if jumping?	  update_jump	elsif moving?	  update_move	else	  update_stop	end	# アニメカウントが最大値を超えた場合	# ※最大値は、基本値 18 から移動速度 * 1 を引いた値	# ファイル名に[n]が入っている場合、通常の(n-1)/4の速度でパターン更新	if @character_name[/[(d+)]/]	  @anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern	  if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2		# 停止時アニメが OFF かつ 停止中の場合		if not @step_anime and @stop_count > 0		  # パターンをオリジナルに戻す		  @pattern = @original_pattern		# 停止時アニメが ON または 移動中の場合		else		  # パターンを更新		  @pattern = @pattern % ($1.to_i - 1) + 1		end		# アニメカウントをクリア		@anime_count = 0	  end	else	# 通常キャラのパターン更新処理(デフォルトの処理をコピペしただけ)	  if @anime_count > 18 - @move_speed * 2		# 停止時アニメが OFF かつ 停止中の場合		if not @step_anime and @stop_count > 0		  # パターンをオリジナルに戻す		  @pattern = @original_pattern		# 停止時アニメが ON または 移動中の場合		else		  # パターンを更新		  @pattern = (@pattern + 1) % 4		end		# アニメカウントをクリア		@anime_count = 0	  end	end	# ウェイト中の場合	if @wait_count > 0	  # ウェイトカウントを減らす	  @wait_count -= 1	  return	end	# 移動ルート強制中の場合	if @move_route_forcing	  # カスタム移動	  move_type_custom	  return	end	# イベント実行待機中またはロック状態の場合	if @starting or lock?	  # 自律移動はしない	  return	end	# 停止カウントが一定の値 (移動頻度から算出) を超えた場合	if @stop_count > (40 - @move_frequency * 2) * (6 - @move_frequency)	  # 移動タイプで分岐	  case @move_type	  when 1  # ランダム		move_type_random	  when 2  # 近づく		move_type_toward_player	  when 3  # カスタム		move_type_custom	  end	end  endend #==============================================================================# ■ Sprite_Character#------------------------------------------------------------------------------#  キャラクター表示用のスプライトです。Game_Character クラスのインスタンスを# 監視し、スプライトの状態を自動的に変化させます。#============================================================================== class Sprite_Character < RPG::Sprite  #--------------------------------------------------------------------------  # ● フレーム更新  #--------------------------------------------------------------------------  def update	super	# タイル ID、ファイル名、色相のどれかが現在のものと異なる場合	if @tile_id != @character.tile_id or	   @character_name != @character.character_name or	   @character_hue != @character.character_hue	  # タイル ID とファイル名、色相を記憶	  @tile_id = @character.tile_id	  @character_name = @character.character_name	  @character_hue = @character.character_hue	  # タイル ID が有効な値の場合	  if @tile_id >= 384		self.bitmap = RPG::Cache.tile($game_map.tileset_name,		  @tile_id, @character.character_hue)		self.src_rect.set(0, 0, 32, 32)		self.ox = 16		self.oy = 32	  # タイル ID が無効な値の場合	  else		self.bitmap = RPG::Cache.character(@character.character_name,		  @character.character_hue)		# ファイル名に[n]が入っている場合、パターン数を横:n, 縦:4とみなす		if @character.character_name[/[(d+)]/]		  @cw = bitmap.width / $1.to_i		  @ch = bitmap.height / 4		# ファイル名に[D]が入っていない場合、通常通り横:4, 縦:4とする		else		  @cw = bitmap.width / 4		  @ch = bitmap.height / 4		end		self.ox = @cw / 2		self.oy = @ch - @character.correction_y	  end	end	# 可視状態を設定	self.visible = (not @character.transparent)	# グラフィックがキャラクターの場合	if @tile_id == 0	  # 転送元の矩形を設定	  sx = @character.pattern * @cw	  sy = (@character.direction - 2) / 2 * @ch	  self.src_rect.set(sx, sy, @cw, @ch)	end	# スプライトの座標を設定	self.x = @character.screen_x	self.y = @character.screen_y	self.z = @character.screen_z(@ch)	# 不透明度、合成方法、茂み深さを設定	self.opacity = @character.opacity	self.blend_type = @character.blend_type	self.bush_depth = @character.bush_depth	# アニメーション	if @character.animation_id != 0	  animation = $data_animations[@character.animation_id]	  animation(animation, true)	  @character.animation_id = 0	end  endend  # ついでにメニュー画面でパターンが多いグラフィックを使用した場合の表記変更 #==============================================================================# ■ Window_Base#------------------------------------------------------------------------------#  ゲーム中のすべてのウィンドウのスーパークラスです。#============================================================================== class Window_Base < Window  #--------------------------------------------------------------------------  # ● グラフィックの描画  #	 actor : アクター  #	 x	 : 描画先 X 座標  #	 y	 : 描画先 Y 座標  #--------------------------------------------------------------------------  def draw_actor_graphic(actor, x, y)	bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)	if actor.character_name[/[(d+)]/]	  cw = bitmap.width / $1.to_i	  ch = bitmap.height / 4	else	  cw = bitmap.width / 4	  ch = bitmap.height / 4	end	src_rect = Rect.new(0, 0, cw, ch)	self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)  endend #==============================================================================# ■ Window_SaveFile#------------------------------------------------------------------------------#  セーブ画面およびロード画面で表示する、セーブファイルのウィンドウです。#============================================================================== class Window_SaveFile < Window_Base  #--------------------------------------------------------------------------  # ● リフレッシュ  #--------------------------------------------------------------------------  def refresh	self.contents.clear	# ファイル番号を描画	self.contents.font.color = normal_color	name = "File #{@file_index + 1}"	self.contents.draw_text(4, 0, 600, 32, name)	@name_width = contents.text_size(name).width	# セーブファイルが存在する場合	if @file_exist	  # キャラクターを描画	  for i in 0...@characters.size		bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])		if @characters[i][0][/[(d+)]/]		  cw = bitmap.width / $1.to_i		  ch = bitmap.height / 4		else		  cw = bitmap.width / 4		  ch = bitmap.height / 4		end		src_rect = Rect.new(0, 0, cw, ch)		x = 300 - @characters.size * 32 + i * 64 - cw / 2		self.contents.blt(x, 68 - ch, bitmap, src_rect)	  end	  # プレイ時間を描画	  hour = @total_sec / 60 / 60	  min = @total_sec / 60 % 60	  sec = @total_sec % 60	  time_string = sprintf("%02d:%02d:%02d", hour, min, sec)	  self.contents.font.color = normal_color	  self.contents.draw_text(4, 8, 600, 32, time_string, 2)	  # タイムスタンプを描画	  self.contents.font.color = normal_color	  time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")	  self.contents.draw_text(4, 40, 600, 32, time_string, 2)	end  endend #==============================================================================# ■ Game_Player#------------------------------------------------------------------------------#  プレイヤーを扱うクラスです。イベントの起動判定や、マップのスクロールなどの# 機能を持っています。このクラスのインスタンスは $game_player で参照されます。#============================================================================== class Game_Player < Game_Character  #--------------------------------------------------------------------------  # ● アニメーションアップデート  #--------------------------------------------------------------------------  def anime_update	# アニメカウントが最大値を超えた場合	# ※最大値は、基本値 18 から移動速度 * 1 を引いた値	# ファイル名に[n]が入っている場合、通常の(n-1)/4の速度でパターン更新	if @character_name[/[(d+)]/]	  @anime_count = 20 if @anime_count > 0 and @pattern == @original_pattern	  if @anime_count * ($1.to_i - 1) / 4 > 18 - @move_speed * 2		# 停止時アニメが OFF かつ 停止中の場合		if not @step_anime and @stop_count > 0		  # パターンをオリジナルに戻す		  @pattern = @original_pattern		# 停止時アニメが ON または 移動中の場合		else		  # パターンを更新		  @pattern = @pattern % ($1.to_i - 1) + 1		end		# アニメカウントをクリア		@anime_count = 0	  end	else	# 通常キャラのパターン更新処理(デフォルトの処理をコピペしただけ)	  if @anime_count > 18 - @move_speed * 2		# 停止時アニメが OFF かつ 停止中の場合		if not @step_anime and @stop_count > 0		  # パターンをオリジナルに戻す		  @pattern = @original_pattern		# 停止時アニメが ON または 移動中の場合		else		  # パターンを更新		  @pattern = (@pattern + 1) % 4		end		# アニメカウントをクリア		@anime_count = 0	  end	end  endend

da problemi con la versione 3.6 dello XAS... in senso che i frame me li calcola nella giusta maniera (non divide i chara sempre in 4 parti, ma li divide in N parti quanti i frame... solo che ne anima a prescindere 4... se sono di meno lascia i frame trasparenti)...

Edited by FenriX`

 

 

Membro # 8-8-8 [Hachi] della:

http://img3.imageshack.us/img3/9636/bannergm.png

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

MINIMENU' DI BATTAGLIA

questo è il menù che uso negli scontri... lo script è pressappoco questo:

class Window_SelectableM < Window_Base  #--------------------------------------------------------------------------  # * Public Instance Variables  #--------------------------------------------------------------------------  attr_reader   :index					# cursor position  attr_reader   :help_window			  # help window  attr_reader   :icon_window			  # icon window  #--------------------------------------------------------------------------  # * Object Initialization  #	 x	  : window x-coordinate  #	 y	  : window y-coordinate  #	 width  : window width  #	 height : window height  #--------------------------------------------------------------------------  def initialize(x, y, width, height)	super(x, y, width, height)	@item_max = 1	@column_max = 1	@index = -1  end  #--------------------------------------------------------------------------  # * Set Cursor Position  #	 index : new cursor position  #--------------------------------------------------------------------------  def index=(index)	@index = index	# 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  #--------------------------------------------------------------------------  # * Get Row Count  #--------------------------------------------------------------------------  def row_max	# Compute rows from number of items and columns	return (@item_max + @column_max - 1) / @column_max  end  #--------------------------------------------------------------------------  # * Get Top Row  #--------------------------------------------------------------------------  def top_row	# Divide y-coordinate of window contents transfer origin by 1 row	# height of 32	return self.oy / 14  end  #--------------------------------------------------------------------------  # * Set Top Row  #	 row : row shown on top  #--------------------------------------------------------------------------  def top_row=(row)	# If row is less than 0, change it to 0	if row < 0	  row = 0	end	# If row exceeds row_max - 1, change it to row_max - 1	if row > row_max - 1	  row = row_max - 1	end	# Multiply 1 row height by 32 for y-coordinate of window contents	# transfer origin	self.oy = row * 14  end  #--------------------------------------------------------------------------  # * Get Number of Rows Displayable on 1 Page  #--------------------------------------------------------------------------  def page_row_max	# Subtract a frame height of 32 from the window height, and divide it by	# 1 row height of 32	return (self.height - 32) / 14  end  #--------------------------------------------------------------------------  # * Get Number of Items Displayable on 1 Page  #--------------------------------------------------------------------------  def page_item_max	# Multiply row count (page_row_max) times column count (@column_max)	return page_row_max * @column_max  end  #--------------------------------------------------------------------------  # * Set Help Window  #	 help_window : new help window  #--------------------------------------------------------------------------  def help_window=(help_window)	@help_window = help_window	# Update help text (update_help is defined by the subclasses)	if self.active and @help_window != nil	  update_help	end  end  #--------------------------------------------------------------------------  # * Set Icon Window  #	 icon_window : new icon window  #--------------------------------------------------------------------------  def icon_window=(icon_window)	@icon_window = icon_window	# Update icon text (update_icon is defined by the subclasses)	if self.active and @icon_window != nil	  update_icon	end  end  #--------------------------------------------------------------------------  # * Update Cursor Rectangle  #--------------------------------------------------------------------------  def update_cursor_rect	# If cursor position is less than 0	if @index < 0	  self.cursor_rect.empty	  return	end	# Get current row	row = @index / @column_max	# If current row is before top row	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 * 14 - self.oy	# Update cursor rectangle	self.cursor_rect.set(x, y, cursor_width, 14)  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  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 count is 1 and directional button was pressed down with no		# repeat, or if cursor position is more to the front than		# (item count - column count)		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 count is 1 and directional button was pressed up with no		# repeat, or if cursor position is more to the back than column count		if (@column_max == 1 and Input.trigger?(Input::UP)) or		   @index >= @column_max		  # Move cursor up		  $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 count is 2 or more, and cursor position is closer to front		# than (item count -1)		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 Y button was pressed	  if Input.repeat?(Input::L)		# 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 Z button was pressed	  if Input.repeat?(Input::R)		# 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 and icon text (update_help is defined by the subclasses)	if self.active and @help_window != nil	  update_help	end	if self.active and @icon_window != nil	  update_icon	end	# Update cursor rectangle	update_cursor_rect  endend #==============================================================================# ** Window_Help#------------------------------------------------------------------------------#  This window shows skill and item explanations along with actor status.#============================================================================== class Window_Icon < Window_Base  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize	super(493, 247, 64, 64)	self.contents = Bitmap.new(width - 32, height - 32)	self.opacity = 0  end  #--------------------------------------------------------------------------  # * Set Text  #  text  : text string displayed in window  #  align : alignment (0..flush left, 1..center, 2..flush right)  #--------------------------------------------------------------------------  def set_icon(icon,text,align=0)	if icon != @icon	  self.contents.clear	  #rect = Rect.new(0, 0, 32, 32)	  #self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))	  self.contents.blt(0, 0, icon, Rect.new(0, 0, 24, 24), 255)	  self.contents.font.name = "Aerial"	  self.contents.font.size = 8	  self.contents.font.color = normal_color	  self.contents.draw_hemming_text(0, 14, 24, 12, text, align)	  @text = text	  @icon = icon	  @align = align	  @actor = nil	end	self.visible = true  endend #==============================================================================# ** Window_Item#------------------------------------------------------------------------------#  This window displays items in possession on the item and battle screens.#============================================================================== class MM_Item < Window_SelectableM  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize	super(510, 285, 144, 130)	@column_max = 1	refresh	self.index = 0	self.opacity = 0	# If in battle, move window to center of screen	# and make it semi-transparent  end  #--------------------------------------------------------------------------  # * Get Item  #--------------------------------------------------------------------------  def item	return @data[self.index]  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh	if self.contents != nil	  self.contents.dispose	  self.contents = nil	end	@data = []	# Add item	  for i in 1...$data_items.size		if $game_party.item_number(i) > 0		  @data.push($data_items[i]) if (not Filter_Items::SPECIAL_ITEMS.include?(i) and not Filter_Items::MUSIC_ALBUMS.include?(i))		end	  end	# If item count is not 0, make a bit map and draw all items	@item_max = @data.size	if @item_max > 0	  self.contents = Bitmap.new(width - 32, row_max * 14)	  for i in 0...@item_max		draw_item(i)	  end	end  end  #--------------------------------------------------------------------------  # * Draw Item  #	 index : item number  #--------------------------------------------------------------------------  def draw_item(index)	item = @data[index]	case item	when RPG::Item	  number = $game_party.item_number(item.id)	when RPG::Weapon	  number = $game_party.weapon_number(item.id)	when RPG::Armor	  number = $game_party.armor_number(item.id)	end	if item.is_a?(RPG::Item) and	   $game_party.item_can_use?(item.id)	  self.contents.font.color = normal_color	else	  self.contents.font.color = disabled_color	end	y = index * 14	self.contents.font.color = text_color(15)	self.contents.font.name = "Aerial"	self.contents.font.size = 8	self.contents.draw_hemming_text(0, y, 107, 12,item.name, 2)  end  def update_icon	item = @data[index]	number = $game_party.item_number(item.id)	unless item==nil	  bitmap = RPG::Cache.icon(item.icon_name)	else	  bitmap = RPG::Cache.icon("empty.png")	end	@icon_window.set_icon(bitmap,number.to_s,2)  endend #==============================================================================# ** Window_Skill#------------------------------------------------------------------------------#  This window displays usable skills on the skill and battle screens.#============================================================================== class MM_Skill < Window_SelectableM  #--------------------------------------------------------------------------  # * Object Initialization  #	 actor : actor  #--------------------------------------------------------------------------  def initialize(actor)	super(510, 285, 144, 130)	@actor = actor	@column_max = 1	refresh	self.index = 0	self.opacity = 0  end  #--------------------------------------------------------------------------  # * Acquiring Skill  #--------------------------------------------------------------------------  def skill	return @data[self.index]  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh	if self.contents != nil	  self.contents.dispose	  self.contents = nil	end	@data = []	for i in 0...@actor.skills.size	  skill = $data_skills[@actor.skills[i]]	  if skill != nil		@data.push(skill)	  end	end	# If item count is not 0, make a bit map and draw all items	@item_max = @data.size	if @item_max > 0	  self.contents = Bitmap.new(width - 32, row_max * 14)	  for i in 0...@item_max		draw_item(i)	  end	end  end  #--------------------------------------------------------------------------  # * Draw Item  #	 index : item number  #--------------------------------------------------------------------------  def draw_item(index)	skill = @data[index]	if @actor.skill_can_use?(skill.id)	  self.contents.font.color = normal_color	else	  self.contents.font.color = disabled_color	end	y = index * 14	self.contents.font.color = text_color(15)	self.contents.font.name = "Aerial"	self.contents.font.size = 8	self.contents.draw_hemming_text(0, y, 107, 12,skill.name, 2)  end  def update_icon	skill = @data[index]	unless skill==nil	  bitmap = RPG::Cache.icon(skill.icon_name)	  @icon_window.set_icon(bitmap,skill.sp_cost.to_s,2)	else	  bitmap = RPG::Cache.icon("empty.png")	  @icon_window.set_icon(bitmap,"0",2)	end	#@icon_window.set_icon(bitmap,skill.sp_cost.to_s,2)  endend  class BA_MiniMenu  def main	if $game_switches[MOG::BOSS_INFO_SWITCH_ID] == true	  @enemy_window_info = Window_Enemy_Status.new	  @enemy_window_info.x = -16	  @enemy_window_info.y = 383	end	@actor = $game_party.actors[0]	@spriteset = Spriteset_Map.new	@sthero = Window_HUD.new	@sthero.x = XAS_HUD::XASHUD_X	@sthero.y = XAS_HUD::XASHUD_Y	@windows_hud2 = XAS_Window_HUD2.new	@windows_hud2.x = XAS_HUD::WINDOW_HUD2_X	@windows_hud2.y = XAS_HUD::WINDOW_HUD2_Y	@item_w = MM_Item.new	@skill_w = MM_Skill.new(@actor)	@skill_w.visible = false	@skill_w.active = false	@back_mm = Sprite.new	@icon_window = Window_Icon.new	@skill_w.icon_window = @icon_window	@item_w.icon_window = @icon_window	# Refresh Item_scene	refresh	@back_mm.x = 486	@back_mm.y = 240	# 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	@item_w.dispose	@skill_w.dispose	@spriteset.dispose	@back_mm.bitmap.dispose	@sthero.dispose	@windows_hud2.dispose	@skill_w.dispose	@icon_window.dispose	if $game_switches[MOG::BOSS_INFO_SWITCH_ID] == true	  @enemy_window_info.dispose	end  end  #=============================================================================  def refresh	if @item_w.visible	  @back_mm.bitmap = RPG::Cache.windowskin("020-MM[Oggetti].png")	elsif @skill_w.visible	  @back_mm.bitmap = RPG::Cache.windowskin("021-MM[Tecniche].png")	end  end  #=============================================================================  def update	@item_w.update	@skill_w.update	@sthero.update	@windows_hud2.update	@skill_w.update	if @item_w.active	  update_item	elsif @skill_w.active	  update_skill	end  end  #=============================================================================  def update_item	if Input.trigger?(Input::RIGHT)	  @item_w.visible = false	  @item_w.active = false	  @skill_w.visible = true	  @skill_w.active = true	  @back_mm.bitmap = RPG::Cache.windowskin("021-MM[Tecniche].png")	end	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  $scene = Scene_Map.new	end	# If C button was pressed	if Input.trigger?(Input::C)	  # Acquisizione dei dati selezionati	  @item = @item_w.item	  # Quando l'oggetto è un'arma o un'armatura	  unless @item.is_a?(RPG::Item)		# Suona SE Azione Impossibile		$game_system.se_play($data_system.buzzer_se)		return	  end	  # Quando l'oggetto non può essere usato	  unless $game_party.item_can_use?(@item.id)		# Suona SE Azione Impossibile		$game_system.se_play($data_system.buzzer_se)		return	  end	  	  # Controlla l'obiettivo dell'oggetto	  if @item.scope >= 3		# Quando un oggetto è finito		if $game_party.item_number(@item.id) == 0		  # Suona SE Azione Impossibile		  $game_system.se_play($data_system.buzzer_se)		  return		end		target = $game_party.actors[0]		used = target.item_effect(@item)		# Quando l'oggetto viene usato		if used		  # Suona SE dell'oggetto		  $game_system.se_play(@item.menu_se)		  # Se l'oggetto si consuma		  if @item.consumable			# Elimina un oggetto			$game_party.lose_item(@item.id, 1)			# Aggiorna la finestra degli oggetti			@item_w.draw_item(@item_w.index)		  end		  # Aggiorna la finestra dell'obiettivo		  @item_w.refresh		  # Se gli eroi muoiono		  if $game_party.all_dead?			# Vai al gameover			$scene = Scene_Gameover.new			return		  end		  # Se c'è un evento comune		  if @item.common_event_id > 0			# Chiama l'evento comune			$game_temp.common_event_id = @item.common_event_id			# Torna alla mappa			$scene = Scene_Map.new			return		  end		end		# Se l'oggetto non è stato usato		unless used		  # Suona SE Azione Impossibile		  $game_system.se_play($data_system.buzzer_se)		end		# Quando l'obiettivo non sono gli eroi	  else		# Quando c'è un evento comune		if @item.common_event_id > 0		  # Chiama l'evento comune		  $game_temp.common_event_id = @item.common_event_id		  # Suona SE dell'oggetto		  $game_system.se_play(@item.menu_se)		  # Se l'oggetto si consuma		  if @item.consumable			# Elimina un oggetto			$game_party.lose_item(@item.id, 1)			# Aggiorna la finestra degli oggetti			@item_w.draw_item(@item_w.index)		  end		  # Torna alla mappa		  $scene = Scene_Map.new		  return		end	  end	  return	end  end  #=============================================================================  def update_skill	if Input.trigger?(Input::LEFT)	  @item_w.visible = true	  @item_w.active = true	  @skill_w.visible = false	  @skill_w.active = false	  @back_mm.bitmap = RPG::Cache.windowskin("020-MM[Oggetti].png")	end	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  $scene = Scene_Map.new	end	if Input.trigger?(XAS_WINDOW_SKILL::BUTTON)	  @skill = @skill_w.skill	  if @skill == nil or not @actor.skill_can_use?(@skill.id)		$game_system.se_play($data_system.buzzer_se)		return	  end		$game_system.se_play($data_system.equip_se)		$game_system.xas_skill_id = @skill.id		@windows_hud2.refresh	  return	end	if Input.trigger?(XAS_WINDOW_SKILL::BUTTON2)	  @skill = @skill_w.skill	  if @skill == nil or not @actor.skill_can_use?(@skill.id)		$game_system.se_play($data_system.buzzer_se)		return	  end		$game_system.se_play($data_system.equip_se)		$game_system.xas_skill_id2 = @skill.id		@windows_hud2.refresh	  return	end  endend

Ne uscii molto soddisfatto dalla realizzazione di questo script ^.^ il problema è che il numero di fianco all'icona dell'oggetto non si aggiorna, la lista si aggiorna nel caso gli oggetti finiscano, ma quel numero no, a meno che io non clicki su e giu (e quindi si aggiorna l'icona come la quantità)

 

Seconda HUD con le Skills

qui lo script è lo stesso dello xas... solo che ho modificato un po' il layout e uso 2 skill anzichè 1 ogg e una skill... fin qui tutto bene, però quando combatti con le sembianze umane non hai a disposizione le potenti skill da arcangelo, e infatti quando usi le skill usi quelle corrette, solo che non mi aggiorna le icone nella HUD... (purtroppo soprattutto per questo se non avete in mano il prog potete fare ben poco -o-)

 

 

Membro # 8-8-8 [Hachi] della:

http://img3.imageshack.us/img3/9636/bannergm.png

Link to comment
Share on other sites

  • 0

Scene MP3, Visualizzare l'album installato

Questa è più semplice... si risolve mooolto tranquillamente anche senza il mio progetto fra le mani (a contrario delle precedenti >_<) la schermata dell MP3 (dal menù) è strutturata in 2 finestre + le opzioni... le 2 schermate mostrano le tracce contenute nell'album e la lista active con gli album posseduti... le opzioni invece permettono di accendere spegnere l'mp3, selezionare l'album e inserire i passcode per sbloccare gli album...

questo però presenta un paio di bug... per quanto riguarda il primo non riesco ad aggiornare subito la lista dei brani come sposto il cursore sugli album... la lista dovrebbe essere come la Window_help relativa ad un oggetto, però non mi si aggiorna :\ (sarà un errore stupido ma io non riesco a trovarlo)

il secondo è che quando inserisci un passcode si dovrebbe attivare un evento comune, questo però non parte finchè non ti trovi nella mappa (quindi inserisci un codice e poi dovresti uscire da tutto il menù per attivare l'evento comune...)

qui vi passo il codice, è dipendente dalle immagini contenute nella mia cartella picture e windowskin però...

################################################################################class C_Album < Window_Base  def initialize	super(0,0,240,64)	self.contents = Bitmap.new(width-32,height-32)	self.opacity = 0	refresh  end  def refresh	if $jukealbum	  self.contents.clear	  self.contents.font.name = "Aerial"	  self.contents.font.size = 23	  self.contents.draw_text(0,0,200,32,$jukealbum,1)	end  endend#==============================================================================class C_Track < Window_Base  def initialize	super(0,0,240,64)	self.contents = Bitmap.new(width-32,height-32)	self.opacity = 0	refresh  end  def refresh	if $jukealbum	  self.contents.creal	  self.contents.font.name = "Aerial"	  self.contents.font.size = 12	  self.contents.draw_text(0,0,240,32,$s0,1)	  self.contents.draw_text(0,20,240,32,$s1,1)	  self.contents.draw_text(0,40,240,32,$s2,1)	  self.contents.draw_text(0,60,240,32,$s3,1)	  self.contents.draw_text(0,80,240,32,$s4,1)	  self.contents.draw_text(0,100,240,32,$s5,1)	end  endend#################################################################################==============================================================================# ** Scene_JukeBox#------------------------------------------------------------------------------#  This class performs jukebox screen processing.#============================================================================== #==============================================================================# ** Window_Tracks#============================================================================== class Window_Tracks < Window_Base  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize	super(32, 210, 530, 400)	self.contents = Bitmap.new(width - 32, height - 32)	self.opacity = 0  end  #--------------------------------------------------------------------------  # * Set Text  #  text  : text string displayed in window  #  align : alignment (0..flush left, 1..center, 2..flush right)  #--------------------------------------------------------------------------  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.name = "Aerial"	  self.contents.font.size = 12	  self.contents.font.color = text_color(15)	  righe = text.split(',')[0...5]	  y = 0	  for riga in 0...righe.size		self.contents.draw_text(4, y, 240, 32, righe[riga], 1)		y += 20	  end	  @text = text	  @align = align	  @actor = nil	end	self.visible = true  end  #--------------------------------------------------------------------------  # * Set Actor  #	 actor : status displaying actor  #--------------------------------------------------------------------------  def set_actor(actor)	if actor != @actor	  self.contents.clear	  draw_actor_name(actor, 4, 0)	  draw_actor_state(actor, 140, 0)	  draw_actor_hp(actor, 284, 0)	  draw_actor_sp(actor, 460, 0)	  @actor = actor	  @text = nil	  self.visible = true	end  end  #--------------------------------------------------------------------------  # * Set Enemy  #	 enemy : name and status displaying enemy  #--------------------------------------------------------------------------  def set_enemy(enemy)	text = enemy.name	state_text = make_battler_state_text(enemy, 112, false)	if state_text != ""	  text += "  " + state_text	end	set_text(text, 1)  endend #==============================================================================# ** Window_Albums#============================================================================== class Window_Albums < Window_Selectable  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  def initialize	super(285, 215, 300, 196)	@column_max = 1	refresh	self.index = 0	self.opacity = 0  end  #--------------------------------------------------------------------------  # * Get Item  #--------------------------------------------------------------------------  def item	return @data[self.index]  end  #--------------------------------------------------------------------------  # * Refresh  #--------------------------------------------------------------------------  def refresh	if self.contents != nil	  self.contents.dispose	  self.contents = nil	end	@data = []	# Add item	for i in 1...$data_items.size	  if $game_party.item_number(i) > 0		@data.push($data_items[i]) if (Filter_Items::MUSIC_ALBUMS.include?(i))	  end	end	# If item count is not 0, make a bit map and draw all items	@item_max = @data.size	if @item_max > 0	  self.contents = Bitmap.new(width - 32, row_max * 32)	  for i in 0...@item_max		draw_item(i)	  end	end  end  #--------------------------------------------------------------------------  # * Draw Album  #	 index : album number  #--------------------------------------------------------------------------  def draw_item(index)	item = @data[index]	case item	when RPG::Item	  number = $game_party.item_number(item.id)	end	if item.is_a?(RPG::Item) and	   $game_party.item_can_use?(item.id)	  self.contents.font.color = normal_color	else	  self.contents.font.color = disabled_color	end	y = index * 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(item.icon_name)	opacity = self.contents.font.color == normal_color ? 255 : 128	self.contents.blt(0, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)	self.contents.font.name = "Aerial"	self.contents.font.color = text_color(15)	self.contents.font.size = 20	self.contents.draw_text(28, y, 212, 32, item.name, 0)  end  #--------------------------------------------------------------------------  # * Tracks Text Update  #--------------------------------------------------------------------------  def update_tracks	@tracks_window.set_text(self.item == nil ? "" : self.item.description)  endend #==============================================================================# ** Scene_JukeBox#============================================================================== class Scene_Mp3  #--------------------------------------------------------------------------  # * Object Initialization  #	 menu_index : command cursor's initial position  #--------------------------------------------------------------------------  def initialize(actor_index = 0, menu_index = 0)	@actor_index = actor_index	@menu_index = menu_index  end  #--------------------------------------------------------------------------  # * Main Processing  #--------------------------------------------------------------------------  def main	# Make other Window	@actor = $game_party.actors[@actor_index]	@spriteset = Spriteset_Map.new	@back = Sprite.new	@back.bitmap = RPG::Cache.windowskin("003-Mp3.PNG")	@selected = Sprite.new	@selected.bitmap = RPG::Cache.windowskin("003-Mp3[C1].PNG")	@selected.x = 56	@selected.y = 171	@selected.z = 6	@onoff = Sprite.new	onoff_update	# Make command window	s1 = "ON/OFF"	s2 = "ALBUM"	s3 = "PASSWORDS"	@command_window = Window_Command2.new(200, [s1, s2, s3])	@command_window.visible = false	@command_window.index = @menu_index	@command_window.opacity = 0	# Make status window	@status_window = Window_MenuStatus.new	@status_window.opacity = 0	@status_window.z = 5	# Current window	@c_alb = C_Album.new	@c_trk = C_Track.new	# Make albums window	@albums_window = Window_Albums.new	@albums_window.z = 7	@tracks_window = Window_Tracks.new	@tracks_window.z = 8	@albums_window.tracks_window = @tracks_window	@albums_window.active = false	@command_window.active = true	@albums_window.index = -1	case @command_window.index	when 0	  @selected.bitmap = RPG::Cache.windowskin("003-Mp3[C1].PNG")	  @selected.x = 57	  @selected.y = 172	  @selected.z = 6	when 1	  @selected.bitmap = RPG::Cache.windowskin("003-Mp3[C2].PNG")	  @selected.x = 232	  @selected.y = 172	  @selected.z = 6	when 2	  @selected.bitmap = RPG::Cache.windowskin("003-Mp3[C3].PNG")	  @selected.x = 81	  @selected.y = 378	  @selected.z = 6	end	# Get actor	$game_temp.name_actor_id = 2	$game_temp.name_max_char = 4	@actor2 = $game_actors[$game_temp.name_actor_id]	# Make windows	@edit_window = Window_PinEdit.new(@actor2, $game_temp.name_max_char)	@edit_window.z = 21	@input_window = Window_PinInput.new	@input_window.z = 22	@input_window.active = false	@edit_window.active = false	@input_window.visible = false	@edit_window.visible = false	@pin_back = Sprite.new	@pin_back.x = 244	@pin_back.y = 158	@pin_back.z = 20	# 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	@command_window.dispose	@status_window.dispose	@spriteset.dispose	@back.bitmap.dispose	@selected.bitmap.dispose	@onoff.bitmap.dispose	@albums_window.dispose	@tracks_window.dispose	# Dispose input and edit window	@edit_window.dispose	@input_window.dispose	# Current dispose	@c_alb.dispose	@c_trk.dispose  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update	@tracks_window.update	@albums_window.update	@command_window.update	@status_window.update	# 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 @albums_window.active	  update_albums	  return	end	# If input window is active: call input_update	if @input_window.active	  input_update	  return	end  end  #--------------------------------------------------------------------------  # * Frame Update (when albums window is active)  #--------------------------------------------------------------------------  def update_albums	# If B button was pressed	if Input.trigger?(Input::B)	  # Play cancel SE	  $game_system.se_play($data_system.cancel_se)	  # Switch to menu screen	  @albums_window.active = false	  @command_window.active = true	  @albums_window.index = -1	  @c_trk.visible = true	  return	end	# If C button was pressed	if Input.trigger?(Input::C)	  # Get currently selected data on the item window	  @item = @albums_window.item	  # If not a use item	  unless @item.is_a?(RPG::Item)		# Play buzzer SE		$game_system.se_play($data_system.buzzer_se)		return	  end	  # If it can't be used	  unless $game_party.item_can_use?(@item.id)		# Play buzzer SE		$game_system.se_play($data_system.buzzer_se)		return	  end	  # Play decision SE	  $game_system.se_play($data_system.decision_se)	  # If command event ID is valid	  if @item.common_event_id > 0		# Command event call reservation		$game_temp.common_event_id = @item.common_event_id		# Play item use SE		$game_system.se_play(@item.menu_se)		# If consumable		if @item.consumable		  # Decrease used items by 1		  $game_party.lose_item(@item.id, 1)		  # Draw item window item		  @albums_window.draw_item(@albums_window.index)		end		@command_window.active = true		@albums_window.active = false		@albums_window.index = -1		# Remake right window and item window contents		@albums_window.refresh		@c_alb.refresh		@c_trk.refresh		return	  end	  return	end  end  #--------------------------------------------------------------------------  # * Frame Update (when command window is active)  #--------------------------------------------------------------------------  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 menu screen	  $scene = Scene_Menu.new(0)	  return	end	case @command_window.index	when 0	  @selected.bitmap = RPG::Cache.windowskin("003-Mp3[C1].PNG")	  @selected.x = 57	  @selected.y = 172	  @selected.z = 6	when 1	  @selected.bitmap = RPG::Cache.windowskin("003-Mp3[C2].PNG")	  @selected.x = 232	  @selected.y = 172	  @selected.z = 6	when 2	  @selected.bitmap = RPG::Cache.windowskin("003-Mp3[C3].PNG")	  @selected.x = 81	  @selected.y = 378	  @selected.z = 6	end	# If C button was pressed	if Input.trigger?(Input::C)	  # Branch by command window cursor position	  case @command_window.index	  when 0  # ON/OFF		# Play decision SE		$game_system.se_play($data_system.decision_se)		if $jukebox		  $jukebox.off		  $jukebox = nil		  onoff_update		else		  $jukebox = Jukebox.new		  onoff_update		end	  when 1  # ALBUM		# Play decision SE		$game_system.se_play($data_system.decision_se)		@albums_window.active = true		@command_window.active = false		@albums_window.index = 0		@c_trk.visible = false	  when 2  # PASSWORDS		# Play decision SE		$game_system.se_play($data_system.decision_se)		@pin_back.bitmap = RPG::Cache.windowskin("003-Mp3[PIN].png")		@command_window.active = false		@input_window.active = true		@input_window.visible = true		@edit_window.visible = true	  end	  return	end  end   def onoff_update	if $jukebox	  @onoff.bitmap = RPG::Cache.windowskin("003-Mp3[ON].PNG")	else	  @onoff.bitmap = RPG::Cache.windowskin("003-Mp3[OFF].PNG")	end	@onoff.x = 95	@onoff.y = 174	@onoff.z = 7  end   def update_option	if $jukealbum	  @option_window.set_text($jukealbum)	end  end   #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------   def input_update	# Update windows	@edit_window.update	@input_window.update	# If B button was pressed	if Input.repeat?(Input::B)	  # If cursor position is at 0	  if @edit_window.index == 0		return	  end	  # Play cancel SE	  $game_system.se_play($data_system.cancel_se)	  # Delete text	  @edit_window.back	  return	end	# If C button was pressed	if Input.trigger?(Input::C)	  # If cursor position is at [OK]	  if @input_window.character == nil		# If name is empty		if @edit_window.name == ""		  # Return to default name		  @edit_window.restore_default		  # If name is empty		  if @edit_window.name == ""			# Play buzzer SE			$game_system.se_play($data_system.buzzer_se)			return		  end		  # Play decision SE		  $game_system.se_play($data_system.decision_se)		  return		end		# Change actor name		@actor.name = @edit_window.name		# Play decision SE		$game_system.se_play($data_system.decision_se)		# Switch to map screen		$game_temp.common_event_id = 99		@command_window.active = true		@input_window.active = false		@edit_window.active = false		@input_window.visible = false		@edit_window.visible = false		@pin_back.bitmap.dispose		return	  end	  # If cursor position is at maximum	  if @edit_window.index == $game_temp.name_max_char		# Play buzzer SE		$game_system.se_play($data_system.buzzer_se)		return	  end	  # If text character is empty	  if @input_window.character == ""		# Play buzzer SE		$game_system.se_play($data_system.buzzer_se)		return	  end	  # Play decision SE	  $game_system.se_play($data_system.decision_se)	  # Add text character	  @edit_window.add(@input_window.character)	  return	end  endend #==============================================================================# ** Module_Albums#------------------------------------------------------------------------------#  Questa classe filtra gli album presenti nel database fra i normali OGG#============================================================================== module Filter_Items  #MUSIC_ALBUMS = [id1, id2...] id degli album in database  MUSIC_ALBUMS = [201,202,203,204,205,206,207,208,209,221]end

 

Scene PROFILI, Lista dei profili dei PG scovati:

di simile a questo c'ho il bestiario... solo che nel bestiario i mostri te li aggiunge in maniera diversa e vengono prelevate le info dal database... qui invece non posso usare questo sistema... mi serviva una lista di PG divisi per categorie (che si scorrono con S e D) e dove le liste si scorrono con su e giu... (e le info si aggiornano in auto nella schermata a fianco... se serve c'ho il bestiario, posso upparlo, però è lungherrimo come script >_<)

 

Scene GPS, Mappe multiple della città:

Questa è sicuramente la cosa più complicata... ma non avendo nulla fra le mani ancora non c'è la minima necessità del prog XD in pratica volevo fare una grande picture dove a delle coordinate corrisponde una descrizione (nome + locali) la picture però sarà molto grossa >_< quindi si dovrebbe scorrere sul fondo dello schermo... o in alternativa si dovrebbe splittare la mappa di tutta la città in più parti (gia fatto) e denominarle in modo da selezionarle con i tasti S e D... in più vorrei inserirci il cursore che indica la posizione del protagonista... (partendo dall'ID della mappa dove si trova, ad ogni ID si fanno corrispondere delle coordinate ed una sottomappa della città...

 

eeeh... è un bel po' di roba >_< c'ho aperto un topic solo così da gestirle tutte insieme... e perchè alla fine son tutte cose che da solo troverei molti problemi a risolvere -o- e forse con alcune nemmeno ci riuscirei =.=''

per ogni evenienza posso darvi in mano il progetto (il tempo di smaltirlo della grafica superflua) basta che non gli fate fare il giro del mondo :\ ditemi se potete darmi una mano >_< giustamente l'aiuto sarà seguito da crediti e, se volete, tutti i rens che vi pare -o- svuotatemici pure, tanto dopo i problemi a livello di script mi gestisco tutto per conto mio e non mi servono più -o-

 

non mi pigliava il messaggio... ho dovuto per forza fare un triplo post... me sa che ho messo troppa roba -o-

 

 

Membro # 8-8-8 [Hachi] della:

http://img3.imageshack.us/img3/9636/bannergm.png

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