Jump to content
Rpg²S Forum

*Menu' battle ad icone


Lusianl
 Share

Recommended Posts

Menù battle ad icone

Descrizione

Al posto di "combatti", "Magia" ecc..Gli puoi inserire le icone..

 

Autore

Momo

 

Screen

http://img396.imageshack.us/img396/8847/screen2rj7.jpg

 

Istruzioni per l'uso

 

Creare una nuova classe sopra main e inserire questo script:

 

###################################################
# アイコンコマンドウィンドウ
#
# 戦闘中に出てくるコマンドウィンドウの代わりに
# アイコンを並べたウィンドウを表示するようになります。
# アイコン画像はツクールのアイコンフォルダから検索してるので
# 自分で画像を用意する場合はツクールでアイコンにインポートしてください。
#
# 2005.8.15 バグ修正
# ・戦闘突入時、左上に一瞬アイコンが表示されるのを修正。
#
# 2006.2.17
# ・拡大縮小機能を詳しく設定できるように。

if true  # ←デバッグ用 trueで有効、falseで無効
 
module Momo_IconCommand
 # アイコンファイル名設定
 ATTACK_ICON_NAME = "001-Weapon01" # 攻撃
 SKILL_ICON_NAME = "044-Skill01"   # スキル
 GUARD_ICON_NAME = "009-Shield01"  # 防御
 ITEM_ICON_NAME = "032-Item01"	 # アイテム
 # ウィンドウのx座標補正
 X_PLUS = -60
 # ウィンドウのy座標補正
 Y_PLUS = -170
 # アイコン選択時の動作
 # 0:フラッシュ 1:拡大
 SELECT_TYPE = 1
 # フラッシュ時の色
 FLASH_COLOR = Color.new(255, 255, 255, 128)
 # フラッシュにかける時間(フレーム)
 FLASH_DURATION = 10
 # フラッシュする間隔(フレーム)
 FLASH_INTERVAL = 20
 
 ZOOM_MAX = 1.5	  # 最大倍率(1.0以上)
 ZOOM_MIN = 0.5	  # 最小倍率(1.0以下)
 ZOOM_INTERVAL1 = 4  # 等倍→最大倍率にかけるフレーム数 
 ZOOM_INTERVAL2 = 4  # 最大倍率→当倍にかけるフレーム数
 ZOOM_INTERVAL3 = 4  # 等倍→最小倍率にかけるフレーム数
 ZOOM_INTERVAL4 = 4  # 最小倍率→当倍にかけるフレーム数
 ZOOM_TYPE = true   # 拡大→縮小ならtrue、縮小→拡大ならfalse
 
 # コマンド文字列を表示するかどうか
 COM_NAME_DROW = true
 # 文字列を流すかどうか
 COM_NAME_MOVE = true
 # 表示する文字列
 ATTACK_NAME = "Attack"	# 攻撃
 SKILL_NAME = "Skills"   # スキル
 GUARD_NAME = "Defend"	 # 防御
 ITEM_NAME = "Items"  # アイテム
 # 文字列色
 COM_NAME_COLOR = Color.new(255, 255, 255, 255)
 # コマンド文字列の座標補正
 COM_NAME_X_PLUS = 60
 COM_NAME_Y_PLUS = 60
end

class Window_CommandIcon < Window_Selectable
 attr_accessor :last_index
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #--------------------------------------------------------------------------
 def initialize(x, y, commands)
super(520, 150, 40, 160)
# ウィンドウスキンに空文字列を指定してウィンドウを描画しないようにする

@item_max = commands.size
@commands = commands
@row_max = commands.size 
@index = 0
@last_index = nil
@name_sprite = nil
@sprite = []

self.opacity = 160
refresh
 end
 def dispose
super
for sprite in @sprite
  sprite.dispose unless sprite.nil?
end
@name_sprite.dispose unless @name_sprite.nil?
 end
 #--------------------------------------------------------------------------
 # ● リフレッシュ
 #--------------------------------------------------------------------------
 def refresh
@name_sprite.dispose unless @name_sprite.nil?
for sprite in @sprite
  sprite.dispose unless sprite.nil?
end
@name_sprite = nil
draw_com_name if Momo_IconCommand::COM_NAME_DROW
@sprite = []
for i in 0...@item_max
  draw_item(i) 
end
 end
 #--------------------------------------------------------------------------
 # ● 項目の描画
 #--------------------------------------------------------------------------
 def draw_item(index)
@sprite[index] = Sprite_Icon.new(nil, @commands[index])
@sprite[index].z = self.z + 1

 end
 def draw_com_name
@name_sprite = Sprite_Comm_Name.new(nil, get_com_name)

 end
 
 # 更新
 def update
super
icon_update
com_name_update if Momo_IconCommand::COM_NAME_DROW
if move_index?
  @last_index = self.index
end
 end
 # アイコンの更新
 def icon_update
for i in 0...@sprite.size

  
  @sprite[i].active = (self.index == i)
  @sprite[i].x = self.x + 20#+ i * 24
  @sprite[i].y = self.y  + i * 30 +32
  @sprite[i].z = (self.index == i) ? self.z + 2 : self.z + 1
  @sprite[i].visible = self.visible
  @sprite[i].update
end
 end
 # コマンドネームの更新
 def com_name_update
if move_index?
  @name_sprite.name = get_com_name
end
@name_sprite.x = self.x - 12 + Momo_IconCommand::COM_NAME_X_PLUS
@name_sprite.y = self.y - 40 + Momo_IconCommand::COM_NAME_Y_PLUS
@name_sprite.z = self.z + 1
@name_sprite.active = self.active
@name_sprite.visible = self.visible
@name_sprite.update
 end
 def get_com_name
make_name_set if @name_set.nil?
name = @name_set[self.index]
name = "" if name.nil?
return name
 end
 def make_name_set
@name_set = []
@name_set[0] = Momo_IconCommand::ATTACK_NAME
@name_set[1] = Momo_IconCommand::SKILL_NAME
@name_set[2] = Momo_IconCommand::GUARD_NAME
@name_set[3] = Momo_IconCommand::ITEM_NAME
 end
 def move_index?
return self.index != @last_index
 end
 def need_reset
@name_sprite.need_reset = true if Momo_IconCommand::COM_NAME_DROW
 end
end

# アイコン用スプライト
class Sprite_Icon < Sprite
 attr_accessor :active
 attr_accessor :icon_name
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #--------------------------------------------------------------------------
 def initialize(viewport, icon_name)
super(viewport)
@icon_name = icon_name
@last_icon = @icon_name
@count = 0
@zoom_in = Momo_IconCommand::ZOOM_TYPE
self.bitmap = RPG::Cache.icon(@icon_name)
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
@active = false
 end
 #--------------------------------------------------------------------------
 # ● 解放
 #--------------------------------------------------------------------------
 def dispose
if self.bitmap != nil
  self.bitmap.dispose
end
super
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新
 #--------------------------------------------------------------------------
 def update
super
if @icon_name != @last_icon
  @last_icon = @icon_name
  self.bitmap = RPG::Cache.icon(@icon_name)
end
if @active
  case Momo_IconCommand::SELECT_TYPE
  when 0
	icon_flash
  when 1
	icon_zoom
  end
else
  icon_reset
end
 end
 def icon_flash
if @count % Momo_IconCommand::FLASH_INTERVAL == 0 or @count == 1
  self.flash(Momo_IconCommand::FLASH_COLOR, Momo_IconCommand::FLASH_DURATION)
end
@count += 1
 end
 # 拡大縮小
 def icon_zoom
if @zoom_in
  interval1 = Momo_IconCommand::ZOOM_INTERVAL1
  interval2 = Momo_IconCommand::ZOOM_INTERVAL2
  zoom_max = Momo_IconCommand::ZOOM_MAX
  zoom_in(zoom_max, interval1, interval2)
else
  interval1 = Momo_IconCommand::ZOOM_INTERVAL3
  interval2 = Momo_IconCommand::ZOOM_INTERVAL4
  zoom_min = Momo_IconCommand::ZOOM_MIN
  zoom_out(zoom_min, interval1, interval2)
end
@count += 1
if @count >= interval1 + interval2
  @count = 0
  @zoom_in ^= true
end
 end
 # 拡大処理
 def zoom_in(zoom_max, interval1, interval2)
if interval1 >= @count
  zoom = 1.0 + (zoom_max - 1.0) * (1.0 * @count / interval1)
else
  zoom = zoom_max - (zoom_max - 1.0) * (1.0 * (@count - interval1) / interval2)
end
self.zoom_x = zoom
self.zoom_y = zoom
 end
 # 縮小処理
 def zoom_out(zoom_min, interval1, interval2)
if interval1 >= @count
  zoom = 1.0 - (1.0 - zoom_min) * (1.0 * @count / interval1)
else
  zoom = zoom_min + (1.0 - zoom_min) * (1.0 * (@count - interval1) / interval2)
end
self.zoom_x = zoom
self.zoom_y = zoom
 end
 def icon_zoom000
case @count
when 1..10
  zoom = 1.0 + @count / 10.0
when 11..20
  zoom = 2.0 - (@count - 10) / 10.0
end
self.zoom_x = zoom
self.zoom_y = zoom
 end
 def icon_reset
@count = 0
self.zoom_x = 1.0
self.zoom_y = 1.0
 end
end

# コマンドネーム用スプライト
class Sprite_Comm_Name < Sprite
 attr_accessor :active
 attr_accessor :name
 attr_accessor :need_reset
 #--------------------------------------------------------------------------
 # ● オブジェクト初期化
 #--------------------------------------------------------------------------
 def initialize(viewport, name)
super(viewport)
@name = name
@last_name = nil
@count = 0
@x_plus = 0
@opa_plus = 0
@need_reset = false
@active = false
self.bitmap = Bitmap.new(160, 32)
 end
 #--------------------------------------------------------------------------
 # ● 解放
 #--------------------------------------------------------------------------
 def dispose
if self.bitmap != nil
  self.bitmap.dispose
end
super
 end
 #--------------------------------------------------------------------------
 # ● フレーム更新
 #--------------------------------------------------------------------------
 def update
super
if @active
  if need_reset?
	@need_reset = false
	@last_name = @name
	text_reset
  end
  move_text if Momo_IconCommand::COM_NAME_MOVE
end
 end
 def move_text
@count += 1
@x_plus = [@count * 8, 80].min 
self.x = self.x - 80 + @x_plus
self.opacity = @count * 25
 end
 def text_reset
@count = 0
@x_plus = 0
self.bitmap.clear
self.bitmap.font.name = "Final Frontier"
self.bitmap.font.color = Momo_IconCommand::COM_NAME_COLOR
self.bitmap.draw_text(0, 0, 160, 32, @name)
 end
 def need_reset?
return (@name != @last_name or @need_reset)
 end
end

class Scene_Battle
 #--------------------------------------------------------------------------
 # ● プレバトルフェーズ開始
 #--------------------------------------------------------------------------
 alias scene_battle_icon_command_start_phase1 start_phase1
 def start_phase1
com1 = Momo_IconCommand::ATTACK_ICON_NAME
com2 = Momo_IconCommand::SKILL_ICON_NAME
com3 = Momo_IconCommand::GUARD_ICON_NAME
com4 = Momo_IconCommand::ITEM_ICON_NAME
@actor_command_window = Window_CommandIcon.new(0, 0, [com1, com2, com3, com4]) #Window_CommandIcon
@actor_command_window.y = 50
@actor_command_window.back_opacity = 160
@actor_command_window.active = false
@actor_command_window.visible = false
@actor_command_window.update
scene_battle_icon_command_start_phase1
 end
 #--------------------------------------------------------------------------
 # ● アクターコマンドウィンドウのセットアップ
 #--------------------------------------------------------------------------
#  alias scene_battle_icon_command_phase3_setup_command_window phase3_setup_command_window
#  def phase3_setup_command_window
#	scene_battle_icon_command_phase3_setup_command_window
# アクターコマンドウィンドウの位置を設定
#	@actor_command_window.x = command_window_actor_x(@actor_index)
#	@actor_command_window.y = command_window_actor_y(@actor_index)
#	@actor_command_window.need_reset
#  end
#  def command_window_actor_x(index)
#	$game_party.actors[index].screen_x + Momo_IconCommand::X_PLUS
#  end
#  def command_window_actor_y(index)
#	$game_party.actors[index].screen_y + Momo_IconCommand::Y_PLUS
#  end
end
end

 

 

Per cambiare le icone:

ATTACK_ICON_NAME = "001-Weapon01" # 攻撃
 SKILL_ICON_NAME = "044-Skill01"   # スキル
 GUARD_ICON_NAME = "009-Shield01"  # 防御
 ITEM_ICON_NAME = "032-Item01"	 # アイテム

 

Cambiare per esempio 001-Weapon01 con il nome dell'icone che volete inserire!

http://www.freankexpo.net/signature/1129.png

2986.png

BIM_Banner3.png

Premi RpgMaker

 


http://www.rpg2s.net/forum/uploads/monthly_01_2017/msg-293-0-48316500-1483794996.jpghttp://www.rpg2s.net/dax_games/r2s_regali2.pngContesthttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest3Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest1Oct.gif http://rpg2s.net/gif/SCContest2Oct.gif http://rpg2s.net/gif/SCContest2Oct.gifhttp://rpg2s.net/gif/SCContest1Oct.gifhttp://www.rpg2s.net/awards/bestpixel2.jpghttp://www.rpg2s.net/awards/bestresourCSist2.jpghttp://www.rpg2s.net/awards/mostproductive1.jpghttp://i42.servimg.com/u/f42/13/12/87/37/iconap13.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap14.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap15.pnghttp://i42.servimg.com/u/f42/13/12/87/37/iconap16.pnghttp://i42.servimg.com/u/f42/13/12/87/37/screen10.pnghttp://www.rpgmkr.net/contest/screen-contest-primo.pnghttp://www.makerando.com/forum/uploads/jawards/iconawards3.png

Link to comment
Share on other sites

Guest wcamaldoli

bello, mi piace!

solo che quel rettangolino blu chiaro quando seleziono una scelta mi da un po fastidio... è un po troppo stretto...

Link to comment
Share on other sites

Simpatico! Come sempre,grande Lusianl! :rolleyes:

I miei tutorial
BS in tempo reale ad eventi
Tecnica Ruba
Pesca ad eventi
Evocare
Lancio del masso
Minigioco del Negozio

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

http://img252.imageshack.us/img252/8742/bannerinoteamlrmiu6.png
 

http://img393.imageshack.us/img393/9920/legenrpgmaniamu3.gif
Forum:The legend of making

 

 

26373462 I love you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Mai Dire Speciale Cinema
L'Uomo che Usciva Tutti
Botte e Risposte / Rapine a mano a mano
Mobbasta
Mobbasta veramente per�
Mani in Alto
Per un pelo
Giammangiato
Anche no / Il buio / Ahia
Burle
Acqua Corrente / Urgenze

LegendRpgMania

Il 70% dei ragazzi pensa che GTA sia il miglior gioco del mondo. Il restante 30% pensa che Kingdom Hearts sia il gioco pi� bello. Se fai parte di questo 30% copia e incolla questa frase nella tua firma/blog.

MITICO OBSIDIAN LORD!!!
The March of The Swordmaster
Holy Thunderforce
Bard's Song

TALES OF MAGIC
Entra nella scuola di magia e diventa il mago pi� grande del mondo!

Tales of Magic � completamente gratuito e senza alcun obbligo! Il manuale ti fornir� informazioni sulle modalit� di funzionamento del gioco.
LINK DEL GIOCO

Bunnies Area
Bunnies Can't Phone
Bunnies Can't play 360
Bunnies Can't play Rugby
Bunnies Can't win races
Bunnies Can't Cook Eggs
Bunnies Can't cook turkey
Bunnies Can't Date
Bunnies Can't Park
Bunnies Can't play with Fireworks


Mi conoscete???
Se s� cliccate qui

 



Epitaffi:
1)E' diventato carne secca...
2)Giocava a buttarsi gi� dal castello...
3)Stava abbracciando una bomba a mano...
4)Gli piaceva bere nitroglicerina...
5)Ha ingoiato un candelotto di dinamite...
6)Ha effettuato il salto in lungo nel cratere di un vulcano...
7)Quando i suoi compagni di classe giocavano a calcio lui era la palla...



________________________________________________________________________________
A prescindere dal colore della pelle e dalla religione siamo tutti uguali e tutti abbiamo ugal diritto di vivere. Credi la scuola sia una seccatura? Un'imposizione dei genitori? Sai quanto darebbero questi bambini per avere un'istruzione? Invece loro ed i loro genitori vengono sfruttati nelle industrie delle pi� note multinazionali americane ed europee: Nike, Nestl�, Kraft...
Se sei anche tu contro il razzismo e contro lo sfruttamento inserisci questa frase nella tua firma.
________________________________________________________________________________
Now Playing:
PS3 : Soul Calibur 4
PS2 : Kingdom Hearts Re Chain of Memories
DS : Final Fantasy IV / Final Fantasy XII : Revenant Wings / Spore Creatures / Dinosaur King
PSP : Ratchet and Clank : Size Matters / Secret Agent Clank / Naruto Ultimate Ninja Heroes 2 / GuitarWay To Heaven 4 Amplified
PC : Frets on Fire con la chitarra!!! O_O

Rpg Maker Xp

I miei progetti:

Per ora nulla...

http://team.ffonline.it/imgpersonaggio/cloud_it.jpg
http://img230.imageshack.us/img230/608/pencehaynerroxasolettejyt1.th.jpg
http://r3.fodey.com/15d01c4c6f2dd4908b320f697f7fbe7bd.1.gif


http://img801.mytextgraphics.com/flamewordmaker/2008/03/28/2554b85201dbda32d87d5873d964a4fd.gif

 

 

Link to comment
Share on other sites

  • 1 year later...
  • 3 weeks later...

Bello,lo usato subito,veramente molto carino...

Solo una cosa,dove devo toccare per posizionare il menu'??? ...vorrei metterlo nella posizione in cui e'per l'eroe anche per gli altri membri visto che uso un BS laterale alla FF. :P

SEEP Universe su Steam:

http://cdn.akamai.steamstatic.com/steam/apps/383630/capsule_184x69.jpg?t=1436537417

SEEP Universe: http://www.seepuniverse.com/ (Sito ufficiale)

 

Blogging, dev log e vecchi progetti:

SEEP Blog: http://www.seeproduction.blogspot.ie/ (DOWNLOAD dei nostri progetti)

SEEP Bar: http://seepbar.blogspot.it/ (il bar viruale dove parlare di retrogaming e giochi indie)

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