RPG Creator : créez votre MMORPG ou RPG sans aucune connaissance en programmation


Disponible le 4 Juin !




- Jouez à votre jeu sur tablettes tactiles, Smartphones et navigateurs Web
- Personnalisez vos menus
- Dessinez facilement et rapidement vos cartes
- Créez des actions pour le combat A-RPG


www.rpgcreator.net


Heures au format UTC + 1 heure [ Heure d’été ]


Règles du forum


Consultez la liste des Scripts : cliquez ici



Publier un nouveau sujet Répondre au sujet  [ 18 messages ]  Aller à la page Précédent  1, 2
Auteur Message
 Sujet du message: Re: Menu Compact
MessagePublié: 11 Juin 2010, 20:37 
Garde
Garde
Avatar de l’utilisateur

Inscrit le: 26 Sep 2006, 00:00
Messages: 1973
Points d'aide: Illimité

Créations :

Voir ses créations

Code: Tout sélectionner
self.contents.font.color = system_color

Que tu remplaces par :
Code: Tout sélectionner
self.contents.font.color = Color.new(rouge, vert, bleu)

A toi de remplacer rouge, vert, bleu par les valeurs que tu veux (de 0 à 255).
Si tu n'es pas habitué, quelques exemples :
255, 0, 0 => Rouge
0, 255, 0 => Vert
255, 255, 0 => Jaune
0, 0, 0 => Noir
255, 255, 255 => Blanc
etc...

_________________
Image
Image


Haut
 Profil  
 
 Sujet du message: Re: Menu Compact
MessagePublié: 11 Juin 2010, 21:12 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 25 Aoû 2009, 11:17
Messages: 849
Localisation: Jamais loin
Niveau RPG Maker: Débrouillard
Logiciel(s) préféré(s): RMXP, Photofiltre
Point(s) Fort(s): Polyvalent
Points d'aide: 39/60

Créations :

- Légendes d'un temps [Démo]


Voir ses créations

Voici ce que je te propose:
module Menu_Compact
Police = "Arial"
Couleur_disabled = Color.new(255, 255, 255, 150)

Couleur_pouvoir = Color.new(255, 255, 51, 255)
Couleur_bordure_pouvoir = Color.new(0, 0, 0, 255)

Couleur_objet = Color.new(255, 255, 51, 255)
Couleur_bordure_objet = Color.new(0, 0, 0, 255)

Couleur_equip = Color.new(255, 255, 255, 255)
Couleur_bordure_equip = Color.new(0, 0, 0, 255)

Couleur_statut = Color.new(255, 255, 255, 255)
Couleur_bordure_statut = Color.new(0, 0, 0, 255)
end
#==============================================================================
# ** Compact Menu
#------------------------------------------------------------------------------
# Autor: The Sleeping Leonhart
# Version: 1.2
# Release Date: 26/07/2008
#------------------------------------------------------------------------------
# Description:
# This is an All in One menu where you can use item equipment and skill.
#------------------------------------------------------------------------------
# Istruzioni:
# Edit the images to suit tastes.
# You must put the images of party in the Picture
# and you must call it like the Battler graphic.
#==============================================================================

class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
################################################################################
class Window_Base < Window
include Menu_Compact

def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, width, 32, text)
self.contents.draw_text(x, y+1, width, 32, text)
self.contents.draw_text(x+1, y, width, 32, text)
self.contents.draw_text(x, y-1, width, 32, text)

self.contents.font.color = actor.hp == 0 ? knockout_color : Couleur_statut
self.contents.draw_text(x, y, width, 32, text)
end

def draw_actor_hp(actor, x, y, width = 144)
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 32, 32, $data_system.words.hp)
self.contents.draw_text(x, y+1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x+1, y, 32, 32, $data_system.words.hp)
self.contents.draw_text(x, y-1, 32, 32, $data_system.words.hp)

self.contents.draw_text(hp_x-1, y, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x, y+1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x+1, y, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x, y-1, 48, 32, actor.hp.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)

self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : Couleur_statut
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)

if flag
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(hp_x + 47, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48, y+1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 49, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48, y-1, 12, 32, "/", 1)

self.contents.draw_text(hp_x + 59, y, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60, y+1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 61, y, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60, y-1, 48, 32, actor.maxhp.to_s)

self.contents.font.color = Couleur_statut
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_actor_sp(actor, x, y, width = 144)
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 32, 32, $data_system.words.sp)
self.contents.draw_text(x, y+1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x+1, y, 32, 32, $data_system.words.sp)
self.contents.draw_text(x, y-1, 32, 32, $data_system.words.sp)

self.contents.draw_text(sp_x-1, y, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x, y+1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x+1, y, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x, y-1, 48, 32, actor.sp.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)

self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : Couleur_statut
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)

if flag
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(sp_x + 47, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48, y+1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 49, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48, y-1, 12, 32, "/", 1)

self.contents.draw_text(sp_x + 59, y, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60, y+1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 61, y, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60, y-1, 48, 32, actor.maxsp.to_s)

self.contents.font.color = Couleur_statut
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end

def draw_actor_name(actor, x, y)
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 120, 32, actor.name)
self.contents.draw_text(x, y+1, 120, 32, actor.name)
self.contents.draw_text(x+1, y, 120, 32, actor.name)
self.contents.draw_text(x, y-1, 120, 32, actor.name)

self.contents.font.color = Couleur_statut
self.contents.draw_text(x, y, 120, 32, actor.name)
end

def draw_actor_class(actor, x, y)
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 236, 32, actor.class_name)
self.contents.draw_text(x, y+1, 236, 32, actor.class_name)
self.contents.draw_text(x+1, y, 236, 32, actor.class_name)
self.contents.draw_text(x, y-1, 236, 32, actor.class_name)

self.contents.font.color = Couleur_statut
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end

def draw_actor_level(actor, x, y)
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 32, 32, "Nv")
self.contents.draw_text(x, y+1, 32, 32, "Nv")
self.contents.draw_text(x+1, y, 32, 32, "Nv")
self.contents.draw_text(x, y-1, 32, 32, "Nv")

self.contents.draw_text(x + 31, y, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 32, y+1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 32, y-1, 24, 32, actor.level.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Nv")
self.contents.font.color = Couleur_statut
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end

def draw_actor_exps(actor, x, y)
if actor.now_exp != 0
text = (actor.now_exp.to_f / actor.next_exp.to_f)*100.00
text = text.round
else
text = 0
end
self.contents.font.name = Police

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 28, 32, "Exp")
self.contents.draw_text(x, y+1, 28, 32, "Exp")
self.contents.draw_text(x+1, y, 28, 32, "Exp")
self.contents.draw_text(x, y-1, 28, 32, "Exp")

self.contents.draw_text(x + 39, y, 84, 32, text.to_s+"%")
self.contents.draw_text(x + 40, y+1, 84, 32, text.to_s+"%")
self.contents.draw_text(x + 41, y, 84, 32, text.to_s+"%")
self.contents.draw_text(x + 40, y-1, 84, 32, text.to_s+"%")

self.contents.font.color = system_color
self.contents.draw_text(x, y, 28, 32, "Exp")
self.contents.font.color = Couleur_statut
self.contents.draw_text(x + 40, y, 84, 32, text.to_s+"%")
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
when 7
parameter_name = "Evasion"
parameter_value = actor.eva
end

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 120, 32, parameter_name)
self.contents.draw_text(x, y+1, 120, 32, parameter_name)
self.contents.draw_text(x+1, y, 120, 32, parameter_name)
self.contents.draw_text(x, y-1, 120, 32, parameter_name)

self.contents.draw_text(x + 87, y, 36, 32, parameter_value.to_s, 2)
self.contents.draw_text(x + 88, y+1, 36, 32, parameter_value.to_s, 2)
self.contents.draw_text(x + 89, y, 36, 32, parameter_value.to_s, 2)
self.contents.draw_text(x + 88, y-1, 36, 32, parameter_value.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = Couleur_statut
self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s, 2)
end
end
################################################################################
class Window_MenuStatus < Window_Selectable
include Menu_Compact
def initialize(actor)
super(220, 48, 480, 96+32)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = Police
self.opacity = 0
@actor = actor
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
@item_max = 1
x = 0
y = 0
actor = @actor
self.contents.font.size = 18
draw_actor_name(actor, x, y)
draw_actor_hp(actor, x + 92, y)
draw_actor_sp(actor, x + 236, y)
draw_actor_state(actor, x, y + 18)
draw_actor_level(actor, x, y + 36)
draw_actor_exps(actor, x, y + 54)
draw_actor_parameter(actor, x + 92, y + 16, 0)
draw_actor_parameter(actor, x + 92, y + 32, 1)
draw_actor_parameter(actor, x + 92, y + 48, 2)
draw_actor_parameter(actor, x + 92, y + 64, 6)
draw_actor_parameter(actor, x + 236, y + 16, 3)
draw_actor_parameter(actor, x + 236, y + 32, 4)
draw_actor_parameter(actor, x + 236, y + 48, 5)
draw_actor_parameter(actor, x + 236, y + 64, 7)
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 96, self.width - 32, 96)
end
end
end
################################################################################
class Window_MenuSkill < Window_Selectable
include Menu_Compact
def initialize(actor)
super(287, 299, 278, 56)
@actor = actor
@column_max = 10
@row_max = 1
refresh
self.opacity = 0
self.index = 0
end
def skill
return @data[self.index]
end
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
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width-32, row_max*32)
self.contents.font.name = Police
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
skill = @data[index]
x = index % 10 * 24
y = index / 10 * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.font.size = 14
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)

self.contents.font.color = Couleur_bordure_pouvoir
self.contents.draw_text(x+11,y+8,128,24,skill.sp_cost.to_s)
self.contents.draw_text(x+12,y+9,128,24,skill.sp_cost.to_s)
self.contents.draw_text(x+13,y+8,128,24,skill.sp_cost.to_s)
self.contents.draw_text(x+12,y+7,128,24,skill.sp_cost.to_s)

if @actor.skill_can_use?(skill.id)
self.contents.font.color = Couleur_pouvoir
else
self.contents.font.color = Couleur_disabled
end
self.contents.draw_text(x+12,y+8,128,24,skill.sp_cost.to_s)
end
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.name+": "+self.skill.description)
end
def update_cursor_rect
if self.active
self.cursor_rect.set(@index % 10 * 24, 0, 24, 24)
self.oy = index / 10 * 24
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Window_MenuItem < Window_Selectable
include Menu_Compact
def initialize
super(287, 355, 278, 56+24)
@column_max = 10
refresh
self.index = 0
self.opacity = 0
end
def item
return @data[self.index]
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = Police
for i in 0...@item_max
draw_item(i)
end
end
end
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

x = index % 10 * 24
y = index / 10 * 24
rect = Rect.new(x, y, 24, 24)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.size = 14
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)

self.contents.font.color = Couleur_bordure_objet
self.contents.draw_text(x + 11, y + 4, 24, 32, number.to_s)
self.contents.draw_text(x + 12, y + 5, 24, 32, number.to_s)
self.contents.draw_text(x + 13, y + 4, 24, 32, number.to_s)
self.contents.draw_text(x + 12, y + 3, 24, 32, number.to_s)

if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = Couleur_objet
else
self.contents.font.color = Couleur_disabled
end
self.contents.draw_text(x + 12, y + 4, 24, 32, number.to_s)
end
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)
end
def update_cursor_rect
if self.active
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + 1
self.top_row = row - 1
end
cursor_width = self.width / @column_max - 32
self.oy = (self.oy/32)*24
x = @index % @column_max * 24
y = @index / @column_max * 24 - (self.oy/24)*24
self.cursor_rect.set(x, y, 24, 24)
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Window_Target < Window_Selectable
include Menu_Compact
def initialize
super(0, 0, $game_party.actors.size*48+32, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = Police
self.z += 10
@column_max = @item_max = $game_party.actors.size
refresh
end
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = 48*i+24
y = 52
actor = $game_party.actors[i]
draw_actor_graphic(actor, x, y)
end
end
def update_cursor_rect
if @index <= -2
self.cursor_rect.set((@index + 10) * 48, 0, 48, 64)
elsif @index == -1
self.cursor_rect.set(0, 0, @item_max * 48, 64)
else
self.cursor_rect.set(@index * 48, 0, 48, 64)
end
end
end
################################################################################
class Window_MenuEquipped < Window_Selectable
include Menu_Compact
def initialize(actor)
super(272, 158, 368, 26*2+32)
self.contents = Bitmap.new(width - 32, 32 * 5 - 32)
self.contents.font.name = Police
self.opacity = 0
self.active = false
self.index = 0
@item_max = 5
@column_max = 1
@actor = actor
refresh
end

def item
return @data[self.index]
end

def draw_item_name(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))

self.contents.font.color = Couleur_bordure_equip
self.contents.draw_text(x + 27, y, 212, 32, item.name)
self.contents.draw_text(x + 28, y+1, 212, 32, item.name)
self.contents.draw_text(x + 29, y, 212, 32, item.name)
self.contents.draw_text(x + 28, y-1, 212, 32, item.name)

self.contents.font.color = Couleur_equip
self.contents.draw_text(x + 28, y, 212, 32, item.name)

end

def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.size = 16

self.contents.font.color = Couleur_bordure_equip
self.contents.draw_text(15, 26 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(15, 26 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(15, 26 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(15, 26 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(15, 26 * 4, 92, 32, $data_system.words.armor4)

self.contents.draw_text(16, 26 * 0+1, 92, 32, $data_system.words.weapon)
self.contents.draw_text(16, 26 * 1+1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(16, 26 * 2+1, 92, 32, $data_system.words.armor2)
self.contents.draw_text(16, 26 * 3+1, 92, 32, $data_system.words.armor3)
self.contents.draw_text(16, 26 * 4+1, 92, 32, $data_system.words.armor4)

self.contents.draw_text(17, 26 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(17, 26 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(17, 26 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(17, 26 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(17, 26 * 4, 92, 32, $data_system.words.armor4)

self.contents.draw_text(16, 26 * 0-1, 92, 32, $data_system.words.weapon)
self.contents.draw_text(16, 26 * 1-1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(16, 26 * 2-1, 92, 32, $data_system.words.armor2)
self.contents.draw_text(16, 26 * 3-1, 92, 32, $data_system.words.armor3)
self.contents.draw_text(16, 26 * 4-1, 92, 32, $data_system.words.armor4)

self.contents.font.color = system_color
self.contents.draw_text(16, 26 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(16, 26 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(16, 26 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(16, 26 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(16, 26 * 4, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 26 * 0)
draw_item_name(@data[1], 92, 26 * 1)
draw_item_name(@data[2], 92, 26 * 2)
draw_item_name(@data[3], 92, 26 * 3)
draw_item_name(@data[4], 92, 26 * 4)
end

def update_help
@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)
end

def update_cursor_rect
if self.active
y = @index % 2 * 26
self.cursor_rect.set(12, y + 9, 244, 16)
self.oy = (@index - @index % 2) * 26
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Window_MenuEquip < Window_Selectable
include Menu_Compact
def initialize(actor, type)
super(287, 243-24, 272, 80)
@actor = actor
@column_max = 10
@row_max = 2
@equip_type = type
self.index = 0
self.opacity = 0
self.active = false
refresh
end
def item
return @data[self.index]
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
end
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == @equip_type-1
@data.push($data_armors[i])
end
end
end
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = Police
for i in 0...@item_max-1
draw_item(i)
end
end
def draw_item(index)
item = @data[index]
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
x = index % 10 * 24
y = index / 10 * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.font.size = 14
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)

self.contents.font.color = Couleur_bordure_objet
self.contents.draw_text(x+11,y+8,128,24, number.to_s)
self.contents.draw_text(x+12,y+9,128,24, number.to_s)
self.contents.draw_text(x+13,y+8,128,24, number.to_s)
self.contents.draw_text(x+12,y+7,128,24, number.to_s)

self.contents.font.color = Couleur_objet
self.contents.draw_text(x+12,y+8,128,24, number.to_s)
end

def update_help
@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)
end
def update_cursor_rect
if self.active
self.cursor_rect.set(@index % 10 * 24, 0, 24, 24)
self.oy = index / 10 * 24
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
@actor_index = 0
@target = ""
scene_window
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
scene_dispose
end

def scene_window
@actor = $game_party.actors[@actor_index]
@map = Spriteset_Map.new
@bg = Sprite.new
@bg.bitmap = Bitmap.new("Graphics/Pictures/MenuBG")
@pg = Sprite.new
@pg.bitmap = Bitmap.new("Graphics/Pictures/"+@actor.battler_name)
@pg.y = 64
@arrow = Sprite.new
@arrow.x = 264
@arrow.y = 170
@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow")
@lr = Sprite.new
@lr.bitmap = Bitmap.new("Graphics/Pictures/LR") if $game_party.actors.size > 1
s1 = ""
@command_window = Window_Command.new(160, [s1, s1, s1, s1, s1])
@menu_index = 3 if @menu_index == 4
@menu_index = 4 if @menu_index == 5
@command_window.index = @menu_index
@command_window.visible = false
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
@help_window = Window_Help.new
@help_window.opacity = 0
@item_window = Window_MenuItem.new
@skill_window = Window_MenuSkill.new(@actor)
@status_window = Window_MenuStatus.new(@actor)
@target_window = Window_Target.new
@right_window = Window_MenuEquipped.new(@actor)
@item_window1 = Window_MenuEquip.new(@actor, 0)
@item_window2 = Window_MenuEquip.new(@actor, 1)
@item_window3 = Window_MenuEquip.new(@actor, 2)
@item_window4 = Window_MenuEquip.new(@actor, 3)
@item_window5 = Window_MenuEquip.new(@actor, 4)
@skill_window.help_window = @help_window
@item_window.help_window = @help_window
@right_window.help_window = @help_window
@item_window1.help_window = @help_window
@item_window2.help_window = @help_window
@item_window3.help_window = @help_window
@item_window4.help_window = @help_window
@item_window5.help_window = @help_window
@item_equip_window = @item_window1
@item_window1.visible = false
@item_window2.visible = false
@item_window3.visible = false
@item_window4.visible = false
@item_window5.visible = false
@item_window.active = false
@help_window.visible = false
@skill_window.active = false
@target_window.visible = false
@target_window.active = false
end

def scene_dispose
@command_window.dispose
@item_window.dispose
@item_window1.dispose
@item_window2.dispose
@item_window3.dispose
@item_window4.dispose
@item_window5.dispose
@skill_window.dispose
@status_window.dispose
@target_window.dispose
@right_window.dispose
@help_window.dispose
@map.dispose
@bg.dispose
@pg.dispose
@arrow.dispose
@lr.dispose
end

def update
@command_window.update
@item_window.update
@item_window1.update
@item_window2.update
@item_window3.update
@item_window4.update
@item_window5.update
@skill_window.update
@status_window.update
@target_window.update
@right_window.update
@map.update
case @right_window.index
when 0
@item_equip_window.visible = false
@item_equip_window = @item_window1
@item_equip_window.visible = true
when 1
@item_equip_window.visible = false
@item_equip_window = @item_window2
@item_equip_window.visible = true
when 2
@item_equip_window.visible = false
@item_equip_window = @item_window3
@item_equip_window.visible = true
when 3
@item_equip_window.visible = false
@item_equip_window = @item_window4
@item_equip_window.visible = true
when 4
@item_equip_window.visible = false
@item_equip_window = @item_window5
@item_equip_window.visible = true
end
if $game_party.actors.size > 1
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
scene_dispose
scene_window
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
scene_dispose
scene_window
return
end
end
if @command_window.active
update_command
return
end
if @item_window.active
update_item
return
end
if @skill_window.active
update_skill
return
end
if @right_window.active
update_right
return
end
if @item_equip_window.active
update_equip_item
return
end
if @target_window.active
update_item_target if @target == "item"
update_skill_target if @target == "skill"
return
end
end

def update_command
case @command_window.index
when 2
@help_window.set_text("Show and use item.")
@arrow.x = 264
@arrow.y = 360
when 1
@help_window.set_text("Show and use Skill.")
@arrow.x = 264
@arrow.y = 300
when 0
@help_window.set_text("Equip Weapon and Armor.")
@arrow.x = 264
@arrow.y = 170
when 3
@help_window.set_text("Save the game progress.")
@arrow.x = 556
@arrow.y = 464
when 4
@help_window.set_text("Exit.")
@arrow.x = 590
@arrow.y = 464
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@item_window.active = true
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@skill_window.active = true
when 0
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@right_window.active = true
when 3
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 4
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
return
end
end

def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_window.active = false
@item_window.help_window.visible = false
@command_window.active = true
return
end
if Input.trigger?(Input::C)
@item = @item_window.item
unless @item.is_a?(RPG::Item)
$game_system.se_play($data_system.buzzer_se)
return
end
unless $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
if @item.scope >= 3
@item_window.active = false
@target_window.x = 287
@target_window.y = 355
@target_window.visible = true
@target_window.active = true
@target = "item"
if @item.scope == 4 || @item.scope == 6
@target_window.index = -1
else
@target_window.index = 0
end
else
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@item_window.draw_item(@item_window.index)
end
$scene = Scene_Map.new
return
end
end
return
end
end

def update_item_target
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
unless $game_party.item_can_use?(@item.id)
@item_window.refresh
end
@target = ""
@item_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
if Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_window.index == -1
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@item_window.draw_item(@item_window.index)
end
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$scene = Scene_Map.new
return
end
@status_window.refresh
end
unless used
$game_system.se_play($data_system.buzzer_se)
end
return
end
end

def update_skill
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@skill_window.active = false
@skill_window.help_window.visible = false
@command_window.active = true
return
end
if Input.trigger?(Input::C)
@skill = @skill_window.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.decision_se)
if @skill.scope >= 3
@skill_window.active = false
@target_window.x = 287
@target_window.y = 299
@target_window.visible = true
@target_window.active = true
@target = "skill"
if @skill.scope == 4 || @skill.scope == 6
@target_window.index = -1
elsif @skill.scope == 7
@target_window.index = @actor_index - 10
else
@target_window.index = 0
end
else
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$game_system.se_play(@skill.menu_se)
@status_window.refresh
@skill_window.refresh
@target_window.refresh
$scene = Scene_Map.new
return
end
end
return
end
end

def update_skill_target
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
@target = ""
return
end
if Input.trigger?(Input::C)
unless @actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_window.index == -1
used = false
for i in $game_party.actors
used |= i.skill_effect(@actor, @skill)
end
end
if @target_window.index <= -2
target = $game_party.actors[@target_window.index + 10]
used = target.skill_effect(@actor, @skill)
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.skill_effect(@actor, @skill)
end
if used
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
@status_window.refresh
@skill_window.refresh
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$scene = Scene_Map.new
return
end
end
unless used
$game_system.se_play($data_system.buzzer_se)
end
return
end
end

def update_right
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = false
@right_window.help_window.visible = false
@command_window.active = true
return
end
if Input.trigger?(Input::C)
if @actor.equip_fix?(@right_window.index)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@right_window.active = false
@item_equip_window.active = true
return
end
end

def update_equip_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = true
@item_equip_window.help_window.visible = false
@item_equip_window.active = false
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.equip_se)
type = @right_window.index
item = @item_equip_window.item
@actor.equip(type, item == nil ? 0 : item.id)
@right_window.active = true
@item_equip_window.active = false
@right_window.refresh
@item_equip_window.refresh
@status_window.refresh
return
end
end
end

Tu remplaces les constantes en haut du script pour faire ce que tu souhaites. J'ai même rajouté des bordures aux nombres, de façon à ce qu'on les voit mieux. Tu peux l'enlever en mettant le dernier nombre de leur couleur à zéro, sachant que c'est l'opacité. Au cas ou, je te rappelle comment est fait la définition d'une couleur:
(Rouge, Vert, Bleu, Opacité)

Bonne continuation.

_________________
Image
Ressources pour menu moghunter

Mon projet
Nom: Légendes d'un temps.
Avancement: Aucune idée^^'
Présentation: C'est par ici
Forum: http://un-monde-de-legendes.lescigales.org/


Haut
 Profil  
 
 Sujet du message: Re: Menu Compact
MessagePublié: 24 Juin 2010, 10:50 
Villageois (Nv 4)
Avatar de l’utilisateur

Inscrit le: 04 Juin 2010, 09:40
Messages: 62
Localisation: Pau
Niveau RPG Maker: novice
Sexe: Masculin
Points d'aide: 0/60

Créations :

Voir ses créations

Ça marche nickel, mais j'ai une question, mon personnage au cours de l'histoire va changer physiquement donc j'aimerais changer l'image utilisé dans le menu au milieu de mon jeu, est-ce possible et comment le faire?
de plus, seulement un des personnages est toujours present dans l'équipe, les autres viennent pour une une durée plus ou moins longue, tu crois que c'est compatible avec ce menu qui demande des images pour 4 persos?


Haut
 Profil  
 
 Sujet du message: Re: Menu Compact
MessagePublié: 27 Juin 2010, 13:47 
Villageois (Nv 4)
Avatar de l’utilisateur

Inscrit le: 04 Juin 2010, 09:40
Messages: 62
Localisation: Pau
Niveau RPG Maker: novice
Sexe: Masculin
Points d'aide: 0/60

Créations :

Voir ses créations

up! et une petite question, c'est possible d'afficher l'argent possédé?


Haut
 Profil  
 
 Sujet du message: Re: Menu Compact
MessagePublié: 06 Juil 2010, 16:03 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 01 Juin 2008, 00:00
Messages: 1812
Localisation: Dans le pré
Niveau RPG Maker: Pas trop mal
Logiciel(s) préféré(s): RPG Maker XP
Point(s) Fort(s): Tout le pixel-art
Sexe: Féminin
Points d'aide: 33/60

Créations :

Voir ses créations

@ Torod :

- Changer d'image : Je pense qu'il faudrait faire un deuxième héros dans la BDD et lui mettre un nom du style "Truc (adulte)" ou quelque chose comme ça, et du coup l'image associée serait changée aussi (encore faudra-t-il penser à sauvegarder les caractéristiques du héros avant de changer de personnage ... ce qui n'est foncièrement pas bien difficile).

- Un seul vrai personnage : Bah moi j'ai que deux personnages dans mon équipe avec et script, ça marche très bien, je vois pas vraiment le problème ... À moins que tu n'aies pas d'image pour les autres persos, ce qui est plus gênant.

- Afficher l'argent possédé : Je saurais plus te redire ce qu'on m'a expliqué, mais j'avais fait une demande pour ça sur le forum. Tu peux toujours utiliser la fonction "Rechercher", le topic est dans "Aide sur les scripts" il me semble (ou "Demande de script", mais c'est moins probable).

_________________
Image
Mon jeu [démo] :
Image
Mon dA : ~trucbiduleBond
truc is back ? maybe ...


Haut
 Profil  
 
 Sujet du message: Re: Menu Compact
MessagePublié: 06 Juil 2010, 18:08 
Ancien membre du staff
Ancien membre du staff
Avatar de l’utilisateur

Inscrit le: 25 Aoû 2009, 11:17
Messages: 849
Localisation: Jamais loin
Niveau RPG Maker: Débrouillard
Logiciel(s) préféré(s): RMXP, Photofiltre
Point(s) Fort(s): Polyvalent
Points d'aide: 39/60

Créations :

- Légendes d'un temps [Démo]


Voir ses créations

Je te ferais les modifications nécessaires. Tu pourras changer l'apparence du héros en redéfinissant une variable globale à coup d'insérer script. Pour la fenêtre d'argent, dis-moi où tu la veux, sinon je ferais en sorte que tu puisses la changer de place à volonté.
module Menu_Compact
Police = "Arial"
Couleur_disabled = Color.new(255, 255, 255, 150)

Couleur_pouvoir = Color.new(255, 255, 51, 255)
Couleur_bordure_pouvoir = Color.new(0, 0, 0, 255)

Couleur_objet = Color.new(255, 255, 51, 255)
Couleur_bordure_objet = Color.new(0, 0, 0, 255)

Couleur_equip = Color.new(255, 255, 255, 255)
Couleur_bordure_equip = Color.new(0, 0, 0, 255)

Couleur_statut = Color.new(255, 255, 255, 255)
Couleur_bordure_statut = Color.new(0, 0, 0, 255)
end
#==============================================================================
# ** Compact Menu
#------------------------------------------------------------------------------
# Autor: The Sleeping Leonhart
# Version: 1.2
# Release Date: 26/07/2008
#------------------------------------------------------------------------------
# Description:
# This is an All in One menu where you can use item equipment and skill.
#------------------------------------------------------------------------------
# Istruzioni:
# Edit the images to suit tastes.
# You must put the images of party in the Picture
# and you must call it like the Battler graphic.
#==============================================================================

class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
################################################################################
class Window_Base < Window
include Menu_Compact

def draw_actor_state(actor, x, y, width = 120)
text = make_battler_state_text(actor, width, true)

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, width, 32, text)
self.contents.draw_text(x, y+1, width, 32, text)
self.contents.draw_text(x+1, y, width, 32, text)
self.contents.draw_text(x, y-1, width, 32, text)

self.contents.font.color = actor.hp == 0 ? knockout_color : Couleur_statut
self.contents.draw_text(x, y, width, 32, text)
end

def draw_actor_hp(actor, x, y, width = 144)
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 32, 32, $data_system.words.hp)
self.contents.draw_text(x, y+1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x+1, y, 32, 32, $data_system.words.hp)
self.contents.draw_text(x, y-1, 32, 32, $data_system.words.hp)

self.contents.draw_text(hp_x-1, y, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x, y+1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x+1, y, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x, y-1, 48, 32, actor.hp.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)

self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : Couleur_statut
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)

if flag
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(hp_x + 47, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48, y+1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 49, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48, y-1, 12, 32, "/", 1)

self.contents.draw_text(hp_x + 59, y, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60, y+1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 61, y, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60, y-1, 48, 32, actor.maxhp.to_s)

self.contents.font.color = Couleur_statut
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_actor_sp(actor, x, y, width = 144)
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 32, 32, $data_system.words.sp)
self.contents.draw_text(x, y+1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x+1, y, 32, 32, $data_system.words.sp)
self.contents.draw_text(x, y-1, 32, 32, $data_system.words.sp)

self.contents.draw_text(sp_x-1, y, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x, y+1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x+1, y, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x, y-1, 48, 32, actor.sp.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)

self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : Couleur_statut
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)

if flag
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(sp_x + 47, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48, y+1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 49, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48, y-1, 12, 32, "/", 1)

self.contents.draw_text(sp_x + 59, y, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60, y+1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 61, y, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60, y-1, 48, 32, actor.maxsp.to_s)

self.contents.font.color = Couleur_statut
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end

def draw_actor_name(actor, x, y)
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 120, 32, actor.name)
self.contents.draw_text(x, y+1, 120, 32, actor.name)
self.contents.draw_text(x+1, y, 120, 32, actor.name)
self.contents.draw_text(x, y-1, 120, 32, actor.name)

self.contents.font.color = Couleur_statut
self.contents.draw_text(x, y, 120, 32, actor.name)
end

def draw_actor_class(actor, x, y)
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 236, 32, actor.class_name)
self.contents.draw_text(x, y+1, 236, 32, actor.class_name)
self.contents.draw_text(x+1, y, 236, 32, actor.class_name)
self.contents.draw_text(x, y-1, 236, 32, actor.class_name)

self.contents.font.color = Couleur_statut
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end

def draw_actor_level(actor, x, y)
self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 32, 32, "Nv")
self.contents.draw_text(x, y+1, 32, 32, "Nv")
self.contents.draw_text(x+1, y, 32, 32, "Nv")
self.contents.draw_text(x, y-1, 32, 32, "Nv")

self.contents.draw_text(x + 31, y, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 32, y+1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 32, y-1, 24, 32, actor.level.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Nv")
self.contents.font.color = Couleur_statut
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end

def draw_actor_exps(actor, x, y)
if actor.now_exp != 0
text = (actor.now_exp.to_f / actor.next_exp.to_f)*100.00
text = text.round
else
text = 0
end
self.contents.font.name = Police

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 28, 32, "Exp")
self.contents.draw_text(x, y+1, 28, 32, "Exp")
self.contents.draw_text(x+1, y, 28, 32, "Exp")
self.contents.draw_text(x, y-1, 28, 32, "Exp")

self.contents.draw_text(x + 39, y, 84, 32, text.to_s+"%")
self.contents.draw_text(x + 40, y+1, 84, 32, text.to_s+"%")
self.contents.draw_text(x + 41, y, 84, 32, text.to_s+"%")
self.contents.draw_text(x + 40, y-1, 84, 32, text.to_s+"%")

self.contents.font.color = system_color
self.contents.draw_text(x, y, 28, 32, "Exp")
self.contents.font.color = Couleur_statut
self.contents.draw_text(x + 40, y, 84, 32, text.to_s+"%")
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
when 7
parameter_name = "Evasion"
parameter_value = actor.eva
end

self.contents.font.color = Couleur_bordure_statut
self.contents.draw_text(x-1, y, 120, 32, parameter_name)
self.contents.draw_text(x, y+1, 120, 32, parameter_name)
self.contents.draw_text(x+1, y, 120, 32, parameter_name)
self.contents.draw_text(x, y-1, 120, 32, parameter_name)

self.contents.draw_text(x + 87, y, 36, 32, parameter_value.to_s, 2)
self.contents.draw_text(x + 88, y+1, 36, 32, parameter_value.to_s, 2)
self.contents.draw_text(x + 89, y, 36, 32, parameter_value.to_s, 2)
self.contents.draw_text(x + 88, y-1, 36, 32, parameter_value.to_s, 2)

self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = Couleur_statut
self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s, 2)
end
end
################################################################################
class Window_MenuStatus < Window_Selectable
include Menu_Compact
def initialize(actor)
super(220, 48, 480, 96+32)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = Police
self.opacity = 0
@actor = actor
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
@item_max = 1
x = 0
y = 0
actor = @actor
self.contents.font.size = 18
draw_actor_name(actor, x, y)
draw_actor_hp(actor, x + 92, y)
draw_actor_sp(actor, x + 236, y)
draw_actor_state(actor, x, y + 18)
draw_actor_level(actor, x, y + 36)
draw_actor_exps(actor, x, y + 54)
draw_actor_parameter(actor, x + 92, y + 16, 0)
draw_actor_parameter(actor, x + 92, y + 32, 1)
draw_actor_parameter(actor, x + 92, y + 48, 2)
draw_actor_parameter(actor, x + 92, y + 64, 6)
draw_actor_parameter(actor, x + 236, y + 16, 3)
draw_actor_parameter(actor, x + 236, y + 32, 4)
draw_actor_parameter(actor, x + 236, y + 48, 5)
draw_actor_parameter(actor, x + 236, y + 64, 7)
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 96, self.width - 32, 96)
end
end
end
################################################################################
class Window_MenuSkill < Window_Selectable
include Menu_Compact
def initialize(actor)
super(287, 299, 278, 56)
@actor = actor
@column_max = 10
@row_max = 1
refresh
self.opacity = 0
self.index = 0
end
def skill
return @data[self.index]
end
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
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width-32, row_max*32)
self.contents.font.name = Police
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
skill = @data[index]
x = index % 10 * 24
y = index / 10 * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.font.size = 14
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)

self.contents.font.color = Couleur_bordure_pouvoir
self.contents.draw_text(x+11,y+8,128,24,skill.sp_cost.to_s)
self.contents.draw_text(x+12,y+9,128,24,skill.sp_cost.to_s)
self.contents.draw_text(x+13,y+8,128,24,skill.sp_cost.to_s)
self.contents.draw_text(x+12,y+7,128,24,skill.sp_cost.to_s)

if @actor.skill_can_use?(skill.id)
self.contents.font.color = Couleur_pouvoir
else
self.contents.font.color = Couleur_disabled
end
self.contents.draw_text(x+12,y+8,128,24,skill.sp_cost.to_s)
end
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.name+": "+self.skill.description)
end
def update_cursor_rect
if self.active
self.cursor_rect.set(@index % 10 * 24, 0, 24, 24)
self.oy = index / 10 * 24
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Window_MenuItem < Window_Selectable
include Menu_Compact
def initialize
super(287, 355, 278, 56+24)
@column_max = 10
refresh
self.index = 0
self.opacity = 0
end
def item
return @data[self.index]
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = Police
for i in 0...@item_max
draw_item(i)
end
end
end
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

x = index % 10 * 24
y = index / 10 * 24
rect = Rect.new(x, y, 24, 24)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.size = 14
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)

self.contents.font.color = Couleur_bordure_objet
self.contents.draw_text(x + 11, y + 4, 24, 32, number.to_s)
self.contents.draw_text(x + 12, y + 5, 24, 32, number.to_s)
self.contents.draw_text(x + 13, y + 4, 24, 32, number.to_s)
self.contents.draw_text(x + 12, y + 3, 24, 32, number.to_s)

if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = Couleur_objet
else
self.contents.font.color = Couleur_disabled
end
self.contents.draw_text(x + 12, y + 4, 24, 32, number.to_s)
end
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)
end
def update_cursor_rect
if self.active
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + 1
self.top_row = row - 1
end
cursor_width = self.width / @column_max - 32
self.oy = (self.oy/32)*24
x = @index % @column_max * 24
y = @index / @column_max * 24 - (self.oy/24)*24
self.cursor_rect.set(x, y, 24, 24)
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Window_Target < Window_Selectable
include Menu_Compact
def initialize
super(0, 0, $game_party.actors.size*48+32, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = Police
self.z += 10
@column_max = @item_max = $game_party.actors.size
refresh
end
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = 48*i+24
y = 52
actor = $game_party.actors[i]
draw_actor_graphic(actor, x, y)
end
end
def update_cursor_rect
if @index <= -2
self.cursor_rect.set((@index + 10) * 48, 0, 48, 64)
elsif @index == -1
self.cursor_rect.set(0, 0, @item_max * 48, 64)
else
self.cursor_rect.set(@index * 48, 0, 48, 64)
end
end
end
################################################################################
class Window_MenuEquipped < Window_Selectable
include Menu_Compact
def initialize(actor)
super(272, 158, 368, 26*2+32)
self.contents = Bitmap.new(width - 32, 32 * 5 - 32)
self.contents.font.name = Police
self.opacity = 0
self.active = false
self.index = 0
@item_max = 5
@column_max = 1
@actor = actor
refresh
end

def item
return @data[self.index]
end

def draw_item_name(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))

self.contents.font.color = Couleur_bordure_equip
self.contents.draw_text(x + 27, y, 212, 32, item.name)
self.contents.draw_text(x + 28, y+1, 212, 32, item.name)
self.contents.draw_text(x + 29, y, 212, 32, item.name)
self.contents.draw_text(x + 28, y-1, 212, 32, item.name)

self.contents.font.color = Couleur_equip
self.contents.draw_text(x + 28, y, 212, 32, item.name)

end

def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.size = 16

self.contents.font.color = Couleur_bordure_equip
self.contents.draw_text(15, 26 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(15, 26 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(15, 26 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(15, 26 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(15, 26 * 4, 92, 32, $data_system.words.armor4)

self.contents.draw_text(16, 26 * 0+1, 92, 32, $data_system.words.weapon)
self.contents.draw_text(16, 26 * 1+1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(16, 26 * 2+1, 92, 32, $data_system.words.armor2)
self.contents.draw_text(16, 26 * 3+1, 92, 32, $data_system.words.armor3)
self.contents.draw_text(16, 26 * 4+1, 92, 32, $data_system.words.armor4)

self.contents.draw_text(17, 26 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(17, 26 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(17, 26 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(17, 26 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(17, 26 * 4, 92, 32, $data_system.words.armor4)

self.contents.draw_text(16, 26 * 0-1, 92, 32, $data_system.words.weapon)
self.contents.draw_text(16, 26 * 1-1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(16, 26 * 2-1, 92, 32, $data_system.words.armor2)
self.contents.draw_text(16, 26 * 3-1, 92, 32, $data_system.words.armor3)
self.contents.draw_text(16, 26 * 4-1, 92, 32, $data_system.words.armor4)

self.contents.font.color = system_color
self.contents.draw_text(16, 26 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(16, 26 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(16, 26 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(16, 26 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(16, 26 * 4, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 26 * 0)
draw_item_name(@data[1], 92, 26 * 1)
draw_item_name(@data[2], 92, 26 * 2)
draw_item_name(@data[3], 92, 26 * 3)
draw_item_name(@data[4], 92, 26 * 4)
end

def update_help
@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)
end

def update_cursor_rect
if self.active
y = @index % 2 * 26
self.cursor_rect.set(12, y + 9, 244, 16)
self.oy = (@index - @index % 2) * 26
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Window_MenuEquip < Window_Selectable
include Menu_Compact
def initialize(actor, type)
super(287, 243-24, 272, 80)
@actor = actor
@column_max = 10
@row_max = 2
@equip_type = type
self.index = 0
self.opacity = 0
self.active = false
refresh
end
def item
return @data[self.index]
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
end
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == @equip_type-1
@data.push($data_armors[i])
end
end
end
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = Police
for i in 0...@item_max-1
draw_item(i)
end
end
def draw_item(index)
item = @data[index]
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
x = index % 10 * 24
y = index / 10 * 24
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.font.size = 14
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y, bitmap, Rect.new(0, 0, 24, 24), opacity)

self.contents.font.color = Couleur_bordure_objet
self.contents.draw_text(x+11,y+8,128,24, number.to_s)
self.contents.draw_text(x+12,y+9,128,24, number.to_s)
self.contents.draw_text(x+13,y+8,128,24, number.to_s)
self.contents.draw_text(x+12,y+7,128,24, number.to_s)

self.contents.font.color = Couleur_objet
self.contents.draw_text(x+12,y+8,128,24, number.to_s)
end

def update_help
@help_window.set_text(self.item == nil ? "" : self.item.name+": "+self.item.description)
end
def update_cursor_rect
if self.active
self.cursor_rect.set(@index % 10 * 24, 0, 24, 24)
self.oy = index / 10 * 24
else
self.cursor_rect.set(0, 0, 0, 0)
end
end
end
################################################################################
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
$heros_name["", "", "", ""]
@actor_index = 0
@target = ""
scene_window
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
scene_dispose
end

def scene_window
@actor = $game_party.actors[@actor_index]
@map = Spriteset_Map.new
@bg = Sprite.new
@bg.bitmap = Bitmap.new("Graphics/Pictures/MenuBG")
@pg = Sprite.new
@pg.bitmap = Bitmap.new("Graphics/Pictures/"+$heros_name[@actor_index])
@pg.y = 64
@arrow = Sprite.new
@arrow.x = 264
@arrow.y = 170
@arrow.bitmap = Bitmap.new("Graphics/Pictures/Arrow")
@lr = Sprite.new
@lr.bitmap = Bitmap.new("Graphics/Pictures/LR") if $game_party.actors.size > 1
s1 = ""
@command_window = Window_Command.new(160, [s1, s1, s1, s1, s1])
@menu_index = 3 if @menu_index == 4
@menu_index = 4 if @menu_index == 5
@command_window.index = @menu_index
@command_window.visible = false
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
if $game_system.save_disabled
@command_window.disable_item(4)
end
@help_window = Window_Help.new
@help_window.opacity = 0
@item_window = Window_MenuItem.new
@skill_window = Window_MenuSkill.new(@actor)
@status_window = Window_MenuStatus.new(@actor)
@target_window = Window_Target.new
@right_window = Window_MenuEquipped.new(@actor)
@item_window1 = Window_MenuEquip.new(@actor, 0)
@item_window2 = Window_MenuEquip.new(@actor, 1)
@item_window3 = Window_MenuEquip.new(@actor, 2)
@item_window4 = Window_MenuEquip.new(@actor, 3)
@item_window5 = Window_MenuEquip.new(@actor, 4)
@skill_window.help_window = @help_window
@item_window.help_window = @help_window
@right_window.help_window = @help_window
@item_window1.help_window = @help_window
@item_window2.help_window = @help_window
@item_window3.help_window = @help_window
@item_window4.help_window = @help_window
@item_window5.help_window = @help_window
@item_equip_window = @item_window1
@item_window1.visible = false
@item_window2.visible = false
@item_window3.visible = false
@item_window4.visible = false
@item_window5.visible = false
@item_window.active = false
@help_window.visible = false
@skill_window.active = false
@target_window.visible = false
@target_window.active = false
end

def scene_dispose
@command_window.dispose
@item_window.dispose
@item_window1.dispose
@item_window2.dispose
@item_window3.dispose
@item_window4.dispose
@item_window5.dispose
@skill_window.dispose
@status_window.dispose
@target_window.dispose
@right_window.dispose
@help_window.dispose
@map.dispose
@bg.dispose
@pg.dispose
@arrow.dispose
@lr.dispose
end

def update
@command_window.update
@item_window.update
@item_window1.update
@item_window2.update
@item_window3.update
@item_window4.update
@item_window5.update
@skill_window.update
@status_window.update
@target_window.update
@right_window.update
@map.update
case @right_window.index
when 0
@item_equip_window.visible = false
@item_equip_window = @item_window1
@item_equip_window.visible = true
when 1
@item_equip_window.visible = false
@item_equip_window = @item_window2
@item_equip_window.visible = true
when 2
@item_equip_window.visible = false
@item_equip_window = @item_window3
@item_equip_window.visible = true
when 3
@item_equip_window.visible = false
@item_equip_window = @item_window4
@item_equip_window.visible = true
when 4
@item_equip_window.visible = false
@item_equip_window = @item_window5
@item_equip_window.visible = true
end
if $game_party.actors.size > 1
if Input.trigger?(Input::R)
$game_system.se_play($data_system.cursor_se)
@actor_index += 1
@actor_index %= $game_party.actors.size
scene_dispose
scene_window
return
end
if Input.trigger?(Input::L)
$game_system.se_play($data_system.cursor_se)
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
scene_dispose
scene_window
return
end
end
if @command_window.active
update_command
return
end
if @item_window.active
update_item
return
end
if @skill_window.active
update_skill
return
end
if @right_window.active
update_right
return
end
if @item_equip_window.active
update_equip_item
return
end
if @target_window.active
update_item_target if @target == "item"
update_skill_target if @target == "skill"
return
end
end

def update_command
case @command_window.index
when 2
@help_window.set_text("Show and use item.")
@arrow.x = 264
@arrow.y = 360
when 1
@help_window.set_text("Show and use Skill.")
@arrow.x = 264
@arrow.y = 300
when 0
@help_window.set_text("Equip Weapon and Armor.")
@arrow.x = 264
@arrow.y = 170
when 3
@help_window.set_text("Save the game progress.")
@arrow.x = 556
@arrow.y = 464
when 4
@help_window.set_text("Exit.")
@arrow.x = 590
@arrow.y = 464
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@item_window.active = true
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@skill_window.active = true
when 0
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@right_window.active = true
when 3
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 4
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
return
end
end

def update_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@item_window.active = false
@item_window.help_window.visible = false
@command_window.active = true
return
end
if Input.trigger?(Input::C)
@item = @item_window.item
unless @item.is_a?(RPG::Item)
$game_system.se_play($data_system.buzzer_se)
return
end
unless $game_party.item_can_use?(@item.id)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
if @item.scope >= 3
@item_window.active = false
@target_window.x = 287
@target_window.y = 355
@target_window.visible = true
@target_window.active = true
@target = "item"
if @item.scope == 4 || @item.scope == 6
@target_window.index = -1
else
@target_window.index = 0
end
else
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@item_window.draw_item(@item_window.index)
end
$scene = Scene_Map.new
return
end
end
return
end
end

def update_item_target
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
unless $game_party.item_can_use?(@item.id)
@item_window.refresh
end
@target = ""
@item_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
if Input.trigger?(Input::C)
if $game_party.item_number(@item.id) == 0
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_window.index == -1
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.item_effect(@item)
end
if used
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
@item_window.draw_item(@item_window.index)
end
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$scene = Scene_Map.new
return
end
@status_window.refresh
end
unless used
$game_system.se_play($data_system.buzzer_se)
end
return
end
end

def update_skill
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@skill_window.active = false
@skill_window.help_window.visible = false
@command_window.active = true
return
end
if Input.trigger?(Input::C)
@skill = @skill_window.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.decision_se)
if @skill.scope >= 3
@skill_window.active = false
@target_window.x = 287
@target_window.y = 299
@target_window.visible = true
@target_window.active = true
@target = "skill"
if @skill.scope == 4 || @skill.scope == 6
@target_window.index = -1
elsif @skill.scope == 7
@target_window.index = @actor_index - 10
else
@target_window.index = 0
end
else
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$game_system.se_play(@skill.menu_se)
@status_window.refresh
@skill_window.refresh
@target_window.refresh
$scene = Scene_Map.new
return
end
end
return
end
end

def update_skill_target
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
@target = ""
return
end
if Input.trigger?(Input::C)
unless @actor.skill_can_use?(@skill.id)
$game_system.se_play($data_system.buzzer_se)
return
end
if @target_window.index == -1
used = false
for i in $game_party.actors
used |= i.skill_effect(@actor, @skill)
end
end
if @target_window.index <= -2
target = $game_party.actors[@target_window.index + 10]
used = target.skill_effect(@actor, @skill)
end
if @target_window.index >= 0
target = $game_party.actors[@target_window.index]
used = target.skill_effect(@actor, @skill)
end
if used
$game_system.se_play(@skill.menu_se)
@actor.sp -= @skill.sp_cost
@status_window.refresh
@skill_window.refresh
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
return
end
if @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$scene = Scene_Map.new
return
end
end
unless used
$game_system.se_play($data_system.buzzer_se)
end
return
end
end

def update_right
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = false
@right_window.help_window.visible = false
@command_window.active = true
return
end
if Input.trigger?(Input::C)
if @actor.equip_fix?(@right_window.index)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@right_window.active = false
@item_equip_window.active = true
return
end
end

def update_equip_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@right_window.active = true
@item_equip_window.help_window.visible = false
@item_equip_window.active = false
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.equip_se)
type = @right_window.index
item = @item_equip_window.item
@actor.equip(type, item == nil ? 0 : item.id)
@right_window.active = true
@item_equip_window.active = false
@right_window.refresh
@item_equip_window.refresh
@status_window.refresh
return
end
end
end


Pour l'instant, j'ai testé ceci, mais sans testé car je n'ai pas trop le temps. Là c'est censé simplement changer le nom de l'image à afficher. Dans le Scene_Menu de ce script, vers la fin, après le def main, tu as ça:
Code: Tout sélectionner
$heros_name["", "", "", ""]

C'est le nom des quatre héros dans l'ordre. Ainsi, si tu as tes images nommées "Arshes" (pour le premier héros) et "Basil" (pour le second), tu mettras ceci:
Code: Tout sélectionner
$heros_name["Arshes", "Basil", "", ""]

Tu peux supprimer le deux derniers champs, comme ça:
Code: Tout sélectionner
$heros_name["Arshes", "Basil"]


Ensuite, dans un evenement en mettant "Insérer script", tu n'auras qu'à mettre ça si l'image de tes héros fini par "_adulte":
Code: Tout sélectionner
$heros_name["Arshes_adulte", "Basil_adulte"]


Encore une fois, ce n'est pas forcément fonctionnel vu que je n'ai pas trop le temps. Mais qui ne tente rien...n'a rien.

J'espère au moins ne pas t'avoir fait planté le script. Je verrais ça plus en profondeur plus tard.

_________________
Image
Ressources pour menu moghunter

Mon projet
Nom: Légendes d'un temps.
Avancement: Aucune idée^^'
Présentation: C'est par ici
Forum: http://un-monde-de-legendes.lescigales.org/


Haut
 Profil  
 
 Sujet du message: Re: Menu Compact
MessagePublié: 06 Juil 2010, 18:32 
Villageois (Nv 4)
Avatar de l’utilisateur

Inscrit le: 04 Juin 2010, 09:40
Messages: 62
Localisation: Pau
Niveau RPG Maker: novice
Sexe: Masculin
Points d'aide: 0/60

Créations :

Voir ses créations

ok merci a vous deux.
le problème c'est que je me tâte a garder ce menu car je voudrais utiliser ce script: f69-apprentissage-skills-via-equipements-ff9-t15680.html , le problème c'est que cela ne s'affichera pas, a moins de faire en sorte que quand on clique sur le "menu" magies,compétences,... cela ouvre une autre fenêtre comme cela:
Image


Haut
 Profil  
 
 Sujet du message: Re: Menu Compact
MessagePublié: 06 Juil 2010, 18:34 
Membre VIP
Membre VIP
Avatar de l’utilisateur

Inscrit le: 27 Oct 2006, 00:00
Messages: 1238
Niveau RPG Maker: Correct
Logiciel(s) préféré(s): XP
Point(s) Fort(s): Aucune spécialité
Sexe: Masculin
Points d'aide: 60/60

Créations :

Voir ses créations

Ça se fait, envoie ton script de menu par Mp ( Puisque c'est pas le même que celui du Topic, si ? )
J'verrais pour faire la boite à Or par la même occas' ^^

_________________
Sihara : Démonstration Technique


Haut
 Profil  
 
Afficher les messages depuis:  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 18 messages ]  Aller à la page Précédent  1, 2

Heures au format UTC + 1 heure [ Heure d’été ]


Qui est en ligne ?

Utilisateurs parcourant actuellement ce forum : Aucun utilisateur inscrit et 2 invités


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Rechercher pour:
Sauter vers:  
cron
RPG Creative Forum version 5 ; Tous droits réservés
phpBB Group (Traduit par Xaphos)
Optimisé pour une résolution 1024*728