- saurelMembre
- Nombre de messages : 51
Age : 29
Localisation : la ou je suis et non la ou je ne suis pas
Distinction : aucune
Date d'inscription : 10/04/2010
Un menu des plus simple pour VX ACE
Sam 23 Juin 2012 - 13:26
Bonjour, après avoir chercher sur le forum, je n'est pas trouver le script de menu qui me correspondait pour RMVXACE, le script du menu que je voudrait existe sur vx, mais pas sur ace.
Ma demande est très simple, c'est de pouvoir avoir ce script pour ace.
Pour ce qui est du script de vx, vous le trouverait ici : http://rpgmakervx.1fr1.net/t3506-menu-simpliste-barre-sur-la-map ou alors ci-dessous.
Pour ce qui est du menu, c'est juste un menu avec Objets, Sauvegarder, Quitter.
Voila voila, merci d'avance de bien vouloir m'aidez !
Cordialement, Saurel
Ma demande est très simple, c'est de pouvoir avoir ce script pour ace.
Pour ce qui est du script de vx, vous le trouverait ici : http://rpgmakervx.1fr1.net/t3506-menu-simpliste-barre-sur-la-map ou alors ci-dessous.
Pour ce qui est du menu, c'est juste un menu avec Objets, Sauvegarder, Quitter.
Voila voila, merci d'avance de bien vouloir m'aidez !
Cordialement, Saurel
- Spoiler:
- #==============================================================================
# ** Menu Simplifié
#-------------------------------------------------------------------------------
# Fait par Arayashiki et Fecha ( nommez les deux dans les crédits)
# Description : Ce script affiche un menu simplifié comportant trois options : Objets, Sauver, Quitter
# Il affiche aussi sur la map les barres de vie, mana et exp. Vous pouvez régler les barres que vous voulez
# dans la configuration. Maintenant rendez-vous à la ligne 128.
# 16-10-08
# Forum : http://rpgmakervx.1fr1.net/
#==============================================================================
#===============================================================
#
# rpgmakervx.1fr1.net
#
#===============================================================
#============================================================================#
# * 0; Haut gauche 1; Haut droite 2; Bas gauche 3; Bas droite
#============================================================================#
LUGAR = 0 # Position des barres *
HUD_BAR_HP = true # Montrer Barre HP(true). Cacher Barre HP (false)
HUD_BAR_MP = true # Montrer Barre MP(true). Cacher Barre MP (false)
HUD_BAR_EP = true # Montrer barre EXP(true). Cacher Barre EXP (false)
ON_OFF_SWITCH = 10 # Numéros interrupteur
#============================================================================#
# ** Scene_Menu
#============================================================================#
class Scene_Menu< Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
end
def start
super
create_menu_background
create_command_window
end
def terminate
super
dispose_menu_background
@command_window.dispose
end
def update
super
update_menu_background
@command_window.update
if @command_window.active
update_command_selection
end
end
def create_command_window
s1 = Vocab:: item
s2 = Vocab::save
s3 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2,s3])
@command_window.index = @menu_index
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(1, false) # Disable save
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
Sound.play_decision
case @command_window.index
when 0 # item
$scene = Scene_Item.new
when 1 # Save
$scene = Scene_File.new(true, false, false)
when 2 # End Game
$scene = Scene_End.new
end
end
end
end
#============================================================================#
# ** Scene_file
#============================================================================#
class Scene_File
def return_scene
if @from_title
$scene = Scene_Title.new
elsif @from_event
$scene = Scene_Map.new
else
$scene = Scene_Menu.new(1)
end
end
end
#============================================================================#
# ** Scene_End
#============================================================================#
class Scene_End
def return_scene
$scene = Scene_Menu.new(2)
end
end
#============================================================================#
# ** Window_HUD
#============================================================================#
class Window_HUD < Window_Base
def initialize
super(0, 0, 280, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
actor = $game_actors[1]
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 110-2, 22, $game_actors[1].name, 2)
# C'est ici que vous pouvez changer l'ordre des barres. Une petite explication? En voilà une :
# Regardez dans les parenthèses vous avez actor et deux nombres. actor et 30 on va dire
# que ça nous sert à rien. C'est le dernier chiffre qui nous interresse. En fait il modifie l'emplacement y
# de la barre en question. Un petit exemple ? Selon la configuration d'en dessous sur votre menu
# vous allez avoir dans l'ordre de haut en bas : Vie,Mana,Exp. Maintenant si on change les trois dernières
# lignes par : draw_hud_actor_hp(actor, 30, 20) if HUD_BAR_HP == true
# draw_hud_actor_hp(actor, 30, 80) if HUD_BAR_HP == true
# draw_hud_actor_mp(actor, 30, 50) if HUD_BAR_MP == true
# draw_hud_actor_exp(actor, 30, 20) if HUD_BAR_EP == true
# vous allez avoir maintenant dans l'ordre de haut en bas : Exp,Mana,Exp
# A quoi ça sert ? Si par exemple vous ne voulez pas de la barre de mana cela vous permet de recadrer
# la barre d'exp pour pas que ce soit moche. Moi perfectionniste ? Non jamais ^^.
draw_hud_actor_hp(actor, 30, 20) if HUD_BAR_HP == true
draw_hud_actor_mp(actor, 30, 50) if HUD_BAR_MP == true
draw_hud_actor_exp(actor, 30, 80) if HUD_BAR_EP == true
end
end
#============================================================================#
# ** Scene_Map alias
#============================================================================#
class Scene_Map
alias hud_main main
alias hud_update update
alias hud_terminate terminate
def main
@lalalah = $game_actors[1].hp
@lalalas = $game_actors[1].mp
@lalalae = $game_actors[1].exp
@hud = Window_HUD.new
case LUGAR
when 0
@hud.y = 0
@hud.x = 0
when 1
@hud.y = 280
@hud.x = 0
when 2
@hud.y = 0
@hud.x = 340
when 3
@hud.y = 280
@hud.x = 340
end
@hud.visible = false
hud_main
end
def update
if $game_switches[ON_OFF_SWITCH] == true
@hud.visible = true
$game_map.refresh
else
@hud.visible = false
$game_map.refresh
end
if $game_switches[ON_OFF_SWITCH] == true
if $game_actors[1].hp != @lalalah and HUD_BAR_HP == true
@hud.refresh
@lalalah = $game_actors[1].hp
@hud.update
end
if $game_actors[1].mp != @lalalas and HUD_BAR_MP == true
@hud.refresh
@lalalas = $game_actors[1].mp
@hud.update
end
if $game_actors[1].exp != @lalalae and HUD_BAR_EP == true
@hud.refresh
@lalalae = $game_actors[1].exp
@hud.update
end
end
hud_update
end
def terminate
@hud.dispose
hud_terminate
end
end
class Window_Base < Window
def draw_hp_bar(actor, x, y)
hpwidth = (actor.hp * 10) / actor.maxhp * 12 * (1)
self.contents.fill_rect(x + 0, y + 0, 1 * 120 + 4, 14, Color.new(0, 0, 0, 100))
self.contents.fill_rect(x + 1, y + 1, 1 * 120 + 2, 12, Color.new(255, 255, 255))
self.contents.fill_rect(x + 2, y + 2, 1 * 120, 10, Color.new(0, 0, 0, 150))
self.contents.fill_rect(x + 2, y + 2, hpwidth, 10, Color.new(155, 50, 50, 100))
end
def draw_mp_bar(actor, x, y)
mpwidth = (actor.mp * 10) / actor.maxmp * 12 * (1)
self.contents.fill_rect(x + 0, y + 0, 1 * 120 + 4, 14, Color.new(0, 0, 0, 100))
self.contents.fill_rect(x + 1, y + 1, 1 * 120 + 2, 12, Color.new(255, 255, 255))
self.contents.fill_rect(x + 2, y + 2, 1 * 120, 10, Color.new(0, 0, 0, 150))
self.contents.fill_rect(x + 2, y + 2, mpwidth, 10, Color.new(50, 50, 155, 100))
end
def draw_exp_bar(actor, x, y)
exp = actor.exp_s.to_i
max_exp = actor.next_exp_s.to_i
expwidth = (exp * 10) / max_exp * 12 * (1)
self.contents.fill_rect(x + 0, y + 0, 1 * 120 + 4, 14, Color.new(0, 0, 0, 100))
self.contents.fill_rect(x + 1, y + 1, 1 * 120 + 2, 12, Color.new(255, 255, 255))
self.contents.fill_rect(x + 2, y + 2, 1 * 120, 10, Color.new(0, 0, 0, 150))
self.contents.fill_rect(x + 2, y + 2, expwidth, 10, Color.new(50, 155, 50, 100))
end
def draw_hud_actor_exp(actor, x, y)
self.contents.font.color = Color.new(10, 100, 10)
draw_exp_bar(actor, x, y + 16)
self.contents.draw_text(x - 30, y + 6, 32, 32, 'E')
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 84, y, 12, 32, '/', 1)
self.contents.draw_text(x + 96, y, 84, 32, actor.next_exp_s)
end
def draw_hud_actor_hp(actor, x, y, width = 144)
self.contents.font.color = Color.new(100, 10, 10)
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_bar(actor, hp_x - 36, y + 16)
self.contents.draw_text(x - 30, y + 6, 32, 32, Vocab::hp_a)
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, 48, 32, actor.hp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, '/', 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
def draw_hud_actor_mp(actor, x, y, width = 144)
self.contents.font.color = Color.new(10, 10, 100)
if width - 32 >= 108
mp_x = x + width - 108
flag = true
elsif width - 32 >= 48
mp_x = x + width - 48
flag = false
end
draw_mp_bar(actor, mp_x - 36, y + 16)
self.contents.draw_text(x - 30, y + 6, 32, 32, Vocab::mp_a)
self.contents.font.color = actor.mp == 0 ? knockout_color :
actor.mp <= actor.maxmp / 4 ? crisis_color : normal_color
self.contents.draw_text(mp_x, y, 48, 32, actor.mp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(mp_x + 48, y, 12, 32, '/', 1)
self.contents.draw_text(mp_x + 60, y, 48, 32, actor.maxmp.to_s)
end
end
end
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|