Oniromancie: Scripts - Menu Transparent


Comment ça marche?

Aëdemphia
Par Sylvanor

Fighting Robots Quest
Par Boulon

Forstale
Par Ødd Clock

Geex
Par roys

Inexistence
Par Falco

La Légende d'Ibabou
Par Zaitan

Lije
Par Gaetz

LoveMaster
Par Cuddlefox

Sarcia
Par Kaëlar

Super Mario RPG - Lost Souls
Par Omegabowser

Jeux: Monster World RPG / Jeux: Pif et Hercule / News: Mise à jour de RPG Maker 2003 / Tutos: Création de charset / Jeux: FAYLINAWA /

Chat  (24 connectés)

Bienvenue
visiteur !








Statistiques

Liste des
membres


Contact

57 connectés actuellement

9265284 visiteurs
depuis l'ouverture

544 visiteurs
aujourd'hui

Groupe Facebook

Barre de séparation

Partenaires




TOP
GAMEMAKING


Les 5 plus
visités

Lunae, le baz'arts d'Emz0

Le studio du chat vert

Pixelandgame

Tashiroworld

HeyMakeGames

Au hasard

Magic-mangas

FrGraph-X

RPG Land

Les deux derniers

Lunae, le baz'arts d'Emz0

Le studio du chat vert

Nos autres partenaires

Devenir
partenaire


Barre de séparation

Un site du réseau
War Paradise

Annuaires référenceurs




Menu Transparent
Script pour RPG Maker XP
Ecrit par matkilsa

Ce script permet de rendre tout votre menu transparent, même le magasin est les combats, seul le menu de sauvegarde n'a pas été retravailler, pour régler l'opacité regardez le script il est détailler. Pour toute aide contactez moi via le forum.





Petite info supplémentaires mdr j'ai apprit les bases du ruby en créant ou plutot en modifiant les 11 scripts qui permette d'avoir ce menu.





Crée un nouveau script au dessus de Main et appeler le "Menu_Trans" et collez y ce code







#============================================
# [ Menu Translucide
#------------------------------------------------------------------------------
#Script Menu Translucide crée par www.studio-matkilsa.com
#Amélioration du menu
#Tout est translucide sauf le menu de sauvegarde
#Version 1.1
#Pour toute aide sur ce script contactez moi sur le forum
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# ? ?????????
# menu_index : ?????????????
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ????????????
@sprite = Spriteset_Map.new
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Statut"
s5 = "Sauvegarder"
s6 = "Quitter"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
@command_window.x = 0
@command_window.y = 0
#Réglage de l'opacité du menu principal
#Changez la valeur 200, plus le chiffre est petit
#plus le menu sera transparent
@command_window.back_opacity = 200
# ??????? 0 ????
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
# ????????????
#Le x et le y sont les coordonées de la boite Argent
#Pour la transparence reporter vous plus haut
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 224
@gold_window.back_opacity = 200
# ?????????????
#Le x et le y sont les coordonées de la boite Status
#Pour la transparence reporter vous plus haut
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
@status_window.back_opacity = 200
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@sprite.dispose
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????
@command_window.update
@gold_window.update
@status_window.update
# ??????????????????: update_command ???
if @command_window.active
update_command
return
end
# ???????????????????: update_status ???
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (??????????????????)
#--------------------------------------------------------------------------
def update_command
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
$scene = Scene_Map.new
return
end
# C ??????????
if Input.trigger?(Input::C)
# ??????? 0 ??????????????????????
if $game_party.actors.size == 0 and @command_window.index < 4
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ???????????????????
case @command_window.index
when 0 # ????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ???????????
$scene = Scene_Item.new
when 1 # ???
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ???????????????????
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2 # ??
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ???????????????????
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3 # ?????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ???????????????????
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4 # ???
# ????????
if $game_system.save_disabled
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ??????????
$scene = Scene_Save.new
when 5 # ?????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????????
$scene = Scene_End.new
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????????????)
#--------------------------------------------------------------------------
def update_status
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????????????
@command_window.active = true
@status_window.active = false
@status_window.index = -1
return
end
# C ??????????
if Input.trigger?(Input::C)
# ???????????????????
case @command_window.index
when 1 # ???
# ???????????? 2 ?????
if $game_party.actors[@status_window.index].restriction >= 2
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ??????????
$scene = Scene_Skill.new(@status_window.index)
when 2 # ??
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ?????????
$scene = Scene_Equip.new(@status_window.index)
when 3 # ?????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????????
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end

#==============================================================================
# [ Window_Gold
#==============================================================================

class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = contents.text_size($data_system.words.gold).width
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
end
end




#==============================================================================
# [ Window_MenuStatus
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 415)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 95
actor = $game_party.actors
draw_actor_graphic(actor, x - 30, y + 70)
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 134, y)
draw_actor_level(actor, x, y + 30)
draw_actor_state(actor, x + 80, y + 30)
draw_actor_exp(actor, x, y + 60)
draw_actor_hp(actor, x + 226, y + 30)
draw_actor_sp(actor, x + 226, y + 60)
end
end

#--------------------------------------------------------------------------
# ? ?????????
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 95, self.width - 32, 95)
end
end
end

#==============================================================================
# [ Window_SkillStatus
#==============================================================================

class Window_SkillStatus < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
# actor : ????
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 64, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 100, 45)
draw_actor_name(@actor, 4, 0)
draw_actor_state(@actor, 140, 0)
draw_actor_hp(@actor, 284, 0)
draw_actor_sp(@actor, 460, 0)
end
end

#==============================================================================
# [ Window_EquipLeft
#==============================================================================

class Window_EquipLeft < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
# actor : ????
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 64, 272, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 220, 45)
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 4, 32)
draw_actor_parameter(@actor, 4, 64, 0)
draw_actor_parameter(@actor, 4, 96, 1)
draw_actor_parameter(@actor, 4, 128, 2)
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 64, 40, 32, "?", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 96, 40, 32, "?", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "?", 1)
self.contents.font.color = normal_color
self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ? ?????????????
# new_atk : ?????????
# new_pdef : ??????????
# new_mdef : ??????????
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef)
if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
refresh
end
end
end

#==============================================================================
# [ Window_Status
#==============================================================================

class Window_Status < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
# actor : ????
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 20, 45)
draw_actor_face(@actor, 4, 450)
draw_actor_name(@actor, 40, 0)
draw_actor_class(@actor, 4 + 180, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
draw_actor_parameter(@actor, 96, 192, 0)
draw_actor_parameter(@actor, 96, 224, 1)
draw_actor_parameter(@actor, 96, 304, 3)
draw_actor_parameter(@actor, 96, 336, 4)
draw_actor_parameter(@actor, 96, 368, 5)
draw_actor_parameter(@actor, 96, 400, 6)
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 140, 32, "Expérience : ")
self.contents.draw_text(320, 80, 160, 32, "Niveau suivant : ")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 140, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 160, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 196, 22, "Equipements : ")
draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
end
def dummy
self.contents.font.color = system_color
self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
end

def draw_actor_face(actor, x, y)
face = RPG::Cache.battler(actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(3, -1, fw, fh)
opacity = 120
self.contents.blt(x - fw / 23, y - fh, face, src_rect, opacity)
end
end

#==============================================================================
# [ Scene_Item
#==============================================================================

class Scene_Item
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ?????????????????????
#Pour la transparence changer la valeur 200
#plus elle sera base plus votre menu sera transparent
@sprite = Spriteset_Map.new
@help_window = Window_Help.new
@item_window = Window_Item.new
@help_window.back_opacity = 200
@item_window.back_opacity = 200
# ?????????????
@item_window.help_window = @help_window
# ????????????? (???·?????????)
#Pour la transparence changer la valeur 200
#plus elle sera base plus votre menu sera transparent
@target_window = Window_Target.new
@target_window.visible = false
@target_window.active = false
@target_window.back_opacity = 200
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????
@help_window.dispose
@item_window.dispose
@target_window.dispose
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????
@help_window.update
@item_window.update
@target_window.update
# ??????????????????: update_item ???
if @item_window.active
update_item
return
end
# ???????????????????: update_target ???
if @target_window.active
update_target
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (??????????????????)
#--------------------------------------------------------------------------
def update_item
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ???????????
$scene = Scene_Menu.new(0)
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?????????????????????????
@item = @item_window.item
# ????????????
unless @item.is_a?(RPG::Item)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ????????
unless $game_party.item_can_use?(@item.id)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ??????????
if @item.scope >= 3
# ?????????????????
@item_window.active = false
@target_window.x = (@item_window.index + 1) % 2 * 304
@target_window.visible = true
@target_window.active = true
# ???? (??/??) ?????????????
if @item.scope == 4 || @item.scope == 6
@target_window.index = -1
else
@target_window.index = 0
end
# ????????????
else
# ??????? ID ??????
if @item.common_event_id > 0
# ?????????????
$game_temp.common_event_id = @item.common_event_id
# ???????? SE ???
$game_system.se_play(@item.menu_se)
# ??????
if @item.consumable
# ????????? 1 ???
$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_target
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ????????????????????
unless $game_party.item_can_use?(@item.id)
# ????????????????
@item_window.refresh
end
# ?????????????
@item_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
# C ??????????
if Input.trigger?(Input::C)
# ????????????
if $game_party.item_number(@item.id) == 0
# ??? SE ???
$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
# ???????? SE ???
$game_system.se_play(@item.menu_se)
# ??????
if @item.consumable
# ????????? 1 ???
$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
# ??????? ID ??????
if @item.common_event_id > 0
# ?????????????
$game_temp.common_event_id = @item.common_event_id
# ??????????
$scene = Scene_Map.new
return
end
end
# ?????????????
unless used
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end

#==============================================================================
# [ Scene_Skill
#==============================================================================

class Scene_Skill
#--------------------------------------------------------------------------
# ? ?????????
# actor_index : ??????????
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ???????
@sprite = Spriteset_Map.new
@actor = $game_party.actors[@actor_index]
# ???????????????????????????????
#Pour la transparence changer la valeur 200
#plus elle sera base plus votre menu sera transparent
@help_window = Window_Help.new
@status_window = Window_SkillStatus.new(@actor)
@skill_window = Window_Skill.new(@actor)
@help_window.back_opacity = 200
@status_window.back_opacity = 200
@skill_window.back_opacity = 200
# ?????????????
@skill_window.help_window = @help_window
# ????????????? (???·?????????)
@target_window = Window_Target.new
@target_window.visible = false
@target_window.active = false
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????
@help_window.dispose
@status_window.dispose
@skill_window.dispose
@target_window.dispose
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
# ?????????????????: update_skill ???
if @skill_window.active
update_skill
return
end
# ???????????????????: update_target ???
if @target_window.active
update_target
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (?????????????????)
#--------------------------------------------------------------------------
def update_skill
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ???????????
$scene = Scene_Menu.new(1)
return
end
# C ??????????
if Input.trigger?(Input::C)
# ????????????????????????
@skill = @skill_window.skill
# ????????
if @skill == nil or not @actor.skill_can_use?(@skill.id)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ??????????
if @skill.scope >= 3
# ?????????????????
@skill_window.active = false
@target_window.x = (@skill_window.index + 1) % 2 * 304
@target_window.visible = true
@target_window.active = true
# ???? (??/??) ?????????????
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
# ??????? ID ??????
if @skill.common_event_id > 0
# ?????????????
$game_temp.common_event_id = @skill.common_event_id
# ??????? SE ???
$game_system.se_play(@skill.menu_se)
# SP ??
@actor.sp -= @skill.sp_cost
# ?????????????
@status_window.refresh
@skill_window.refresh
@target_window.refresh
# ??????????
$scene = Scene_Map.new
return
end
end
return
end
# R ??????????
if Input.trigger?(Input::R)
# ???? SE ???
$game_system.se_play($data_system.cursor_se)
# ???????
@actor_index += 1
@actor_index %= $game_party.actors.size
# ????????????
$scene = Scene_Skill.new(@actor_index)
return
end
# L ??????????
if Input.trigger?(Input::L)
# ???? SE ???
$game_system.se_play($data_system.cursor_se)
# ???????
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# ????????????
$scene = Scene_Skill.new(@actor_index)
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (???????????????????)
#--------------------------------------------------------------------------
def update_target
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ?????????????
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
return
end
# C ??????????
if Input.trigger?(Input::C)
# SP ????????????????
unless @actor.skill_can_use?(@skill.id)
# ??? SE ???
$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
# ??????? SE ???
$game_system.se_play(@skill.menu_se)
# SP ??
@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
# ??????? ID ??????
if @skill.common_event_id > 0
# ?????????????
$game_temp.common_event_id = @skill.common_event_id
# ??????????
$scene = Scene_Map.new
return
end
end
# ????????????
unless used
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end

#==============================================================================
# [ Scene_Equip
#==============================================================================

class Scene_Equip
#--------------------------------------------------------------------------
# ? ?????????
# actor_index : ??????????
# equip_index : ????????
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
@equip_index = equip_index
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ???????
@sprite = Spriteset_Map.new
@actor = $game_party.actors[@actor_index]

# ????????
#Pour la transparence changer la valeur 200
#plus elle sera base plus votre menu sera transparent
@help_window = Window_Help.new
@left_window = Window_EquipLeft.new(@actor)
@right_window = Window_EquipRight.new(@actor)
@item_window1 = Window_EquipItem.new(@actor, 0)
@item_window2 = Window_EquipItem.new(@actor, 1)
@item_window3 = Window_EquipItem.new(@actor, 2)
@item_window4 = Window_EquipItem.new(@actor, 3)
@item_window5 = Window_EquipItem.new(@actor, 4)
@help_window.back_opacity = 200
@left_window.back_opacity = 200
@right_window.back_opacity = 200
@item_window1.back_opacity = 200
@item_window2.back_opacity = 200
@item_window3.back_opacity = 200
@item_window4.back_opacity = 200
@item_window5.back_opacity = 200
# ?????????????
@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
# ?????????
@right_window.index = @equip_index
refresh
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????
@help_window.dispose
@left_window.dispose
@right_window.dispose
@item_window1.dispose
@item_window2.dispose
@item_window3.dispose
@item_window4.dispose
@item_window5.dispose
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
# ????????????????
@item_window1.visible = (@right_window.index == 0)
@item_window2.visible = (@right_window.index == 1)
@item_window3.visible = (@right_window.index == 2)
@item_window4.visible = (@right_window.index == 3)
@item_window5.visible = (@right_window.index == 4)
# ?????????????
item1 = @right_window.item
# ????????????? @item_window ???
case @right_window.index
when 0
@item_window = @item_window1
when 1
@item_window = @item_window2
when 2
@item_window = @item_window3
when 3
@item_window = @item_window4
when 4
@item_window = @item_window5
end
# ?????????????????
if @right_window.active
# ??????????????
@left_window.set_new_parameters(nil, nil, nil)
end
# ??????????????????
if @item_window.active
# ?????????????
item2 = @item_window.item
# ?????
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
# ??????????????
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
# ?????
@actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
# ???????????
@left_window.set_new_parameters(new_atk, new_pdef, new_mdef)
end
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????
@left_window.update
@right_window.update
@item_window.update
refresh
# ?????????????????: update_right ???
if @right_window.active
update_right
return
end
# ??????????????????: update_item ???
if @item_window.active
update_item
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (?????????????????)
#--------------------------------------------------------------------------
def update_right
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ???????????
$scene = Scene_Menu.new(2)
return
end
# C ??????????
if Input.trigger?(Input::C)
# ???????
if @actor.equip_fix?(@right_window.index)
# ??? SE ???
$game_system.se_play($data_system.buzzer_se)
return
end
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ????????????????
@right_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
# R ??????????
if Input.trigger?(Input::R)
# ???? SE ???
$game_system.se_play($data_system.cursor_se)
# ???????
@actor_index += 1
@actor_index %= $game_party.actors.size
# ???????????
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
# L ??????????
if Input.trigger?(Input::L)
# ???? SE ???
$game_system.se_play($data_system.cursor_se)
# ???????
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# ???????????
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (??????????????????)
#--------------------------------------------------------------------------
def update_item
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ???????????????
@right_window.active = true
@item_window.active = false
@item_window.index = -1
return
end
# C ??????????
if Input.trigger?(Input::C)
# ?? SE ???
$game_system.se_play($data_system.equip_se)
# ?????????????????????????
item = @item_window.item
# ?????
@actor.equip(@right_window.index, item == nil ? 0 : item.id)
# ???????????????
@right_window.active = true
@item_window.active = false
@item_window.index = -1
# ?????????????????????????
@right_window.refresh
@item_window.refresh
return
end
end
end

#==============================================================================
# [ Scene_Status
#==============================================================================

class Scene_Status
#--------------------------------------------------------------------------
# ? ?????????
# actor_index : ??????????
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ???????
@sprite = Spriteset_Map.new
@actor = $game_party.actors[@actor_index]
# ?????????????
#Pour la transparence changer la valeur 200
#plus elle sera base plus votre menu sera transparent
@status_window = Window_Status.new(@actor)
@status_window.back_opacity = 200
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????
@status_window.dispose
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ???????????
$scene = Scene_Menu.new(3)
return
end
# R ??????????
if Input.trigger?(Input::R)
# ???? SE ???
$game_system.se_play($data_system.cursor_se)
# ???????
@actor_index += 1
@actor_index %= $game_party.actors.size
# ??????????????
$scene = Scene_Status.new(@actor_index)
return
end
# L ??????????
if Input.trigger?(Input::L)
# ???? SE ???
$game_system.se_play($data_system.cursor_se)
# ???????
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# ??????????????
$scene = Scene_Status.new(@actor_index)
return
end
end
end

#==============================================================================
# [ Scene_End
#==============================================================================

class Scene_End
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ????????????
#Pour la transparence changer la valeur 200
#plus elle sera base plus votre menu sera transparent
@sprite = Spriteset_Map.new
s1 = "Écran-Titre"
s2 = "Quitter"
s3 = "Annuler"
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
@command_window.back_opacity = 200
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????
@command_window.dispose
# ???????????????
if $scene.is_a?(Scene_Title)
# ??????????
Graphics.transition
Graphics.freeze
end
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????????
@command_window.update
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ???????????
$scene = Scene_Menu.new(5)
return
end
# C ??????????
if Input.trigger?(Input::C)
# ???????????????????
case @command_window.index
when 0 # ?????
command_to_title
when 1 # ???????
command_shutdown
when 2 # ???
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
# ? ???? [?????] ??????
#--------------------------------------------------------------------------
def command_to_title
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# BGM?BGS?ME ????????
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# ???????????
$scene = Scene_Title.new
end
#--------------------------------------------------------------------------
# ? ???? [???????] ??????
#--------------------------------------------------------------------------
def command_shutdown
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# BGM?BGS?ME ????????
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# ???????
$scene = nil
end
#--------------------------------------------------------------------------
# ? ???? [???] ??????
#--------------------------------------------------------------------------
def command_cancel
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ???????????
$scene = Scene_Menu.new(5)
end
end

#==============================================================================
# [ Scene_Battle (???? 1)
#==============================================================================

class Scene_Battle
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ???????????????
$game_temp.in_battle = true
$game_temp.battle_turn = 0
$game_temp.battle_event_flags.clear
$game_temp.battle_abort = false
$game_temp.battle_main_phase = false
$game_temp.battleback_name = $game_map.battleback_name
$game_temp.forcing_battler = nil
# ??????????????????
$game_system.battle_interpreter.setup(nil, 0)
# ???????
@troop_id = $game_temp.battle_troop_id
$game_troop.setup(@troop_id)
# ????????????????
s1 = $data_system.words.attack
s2 = $data_system.words.skill
s3 = $data_system.words.guard
s4 = $data_system.words.item
@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
@actor_command_window.y = 160
@actor_command_window.back_opacity = 200
@actor_command_window.active = false
@actor_command_window.visible = false
# ????????????
@party_command_window = Window_PartyCommand.new
@party_command_window.back_opacity = 200
@help_window = Window_Help.new
@help_window.back_opacity = 200
@help_window.visible = false
@status_window = Window_BattleStatus.new
@status_window.back_opacity = 200
@message_window = Window_Message.new
@message_window.back_opacity = 200
# ???????????
@spriteset = Spriteset_Battle.new
# ????????????
@wait_count = 0
# ?????????
if $data_system.battle_transition == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$data_system.battle_transition)
end
# ???????????
start_phase1
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ??????????
$game_map.refresh
# ?????????
Graphics.freeze
# ????????
@actor_command_window.dispose
@party_command_window.dispose
@help_window.dispose
@status_window.dispose
@message_window.dispose
if @skill_window != nil
@skill_window.dispose
end
if @item_window != nil
@item_window.dispose
end
if @result_window != nil
@result_window.dispose
end
# ???????????
@spriteset.dispose
# ???????????????
if $scene.is_a?(Scene_Title)
# ??????????
Graphics.transition
Graphics.freeze
end
# ???????????????????????????
if $BTEST and not $scene.is_a?(Scene_Gameover)
$scene = nil
end
end
#--------------------------------------------------------------------------
# ? ????
#--------------------------------------------------------------------------
def judge
# ????????????????? 0 ????
if $game_party.all_dead? or $game_party.actors.size == 0
# ???????
if $game_temp.battle_can_lose
# ??????? BGM ???
$game_system.bgm_play($game_temp.map_bgm)
# ?????
battle_end(2)
# true ???
return true
end
# ??????????????
$game_temp.gameover = true
# true ???
return true
end
# ????? 1 ???????? false ???
for enemy in $game_troop.enemies
if enemy.exist?
return false
end
end
# ????????????? (??)
start_phase5
# true ???
return true
end
#--------------------------------------------------------------------------
# ? ?????
# result : ?? (0:?? 1:?? 2:??)
#--------------------------------------------------------------------------
def battle_end(result)
# ??????????
$game_temp.in_battle = false
# ????????????????
$game_party.clear_actions
# ???????????
for actor in $game_party.actors
actor.remove_states_battle
end
# ????????
$game_troop.enemies.clear
# ??? ?????????
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
# ??????????
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# ? ??????????????
#--------------------------------------------------------------------------
def setup_battle_event
# ?????????????
if $game_system.battle_interpreter.running?
return
end
# ???????????????
for index in 0...$data_troops[@troop_id].pages.size
# ??????????
page = $data_troops[@troop_id].pages[index]
# ??????? c ??????
c = page.condition
# ??????????????????????
unless c.turn_valid or c.enemy_valid or
c.actor_valid or c.switch_valid
next
end
# ??????????????
if $game_temp.battle_event_flags[index]
next
end
# ??? ????
if c.turn_valid
n = $game_temp.battle_turn
a = c.turn_a
b = c.turn_b
if (b == 0 and n != a) or
(b > 0 and (n < 1 or n < a or n % b != a % b))
next
end
end
# ???? ????
if c.enemy_valid
enemy = $game_troop.enemies[c.enemy_index]
if enemy == nil or enemy.hp * 100.0 / enemy.maxhp > c.enemy_hp
next
end
end
# ???? ????
if c.actor_valid
actor = $game_actors[c.actor_id]
if actor == nil or actor.hp * 100.0 / actor.maxhp > c.actor_hp
next
end
end
# ???? ????
if c.switch_valid
if $game_switches[c.switch_id] == false
next
end
end
# ???????????
$game_system.battle_interpreter.setup(page.list, 0)
# ?????????? [???] ? [???] ???
if page.span <= 1
# ???????????
$game_temp.battle_event_flags[index] = true
end
return
end
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ?????????????
if $game_system.battle_interpreter.running?
# ?????????
$game_system.battle_interpreter.update
# ?????????????????????????
if $game_temp.forcing_battler == nil
# ?????????????????
unless $game_system.battle_interpreter.running?
# ??????????????????????????
unless judge
setup_battle_event
end
end
# ????????????????
if @phase != 5
# ?????????????????
@status_window.refresh
end
end
end
# ???? (????)??????
$game_system.update
$game_screen.update
# ????? 0 ??????
if $game_system.timer_working and $game_system.timer == 0
# ?????
$game_temp.battle_abort = true
end
# ????????
@help_window.update
@party_command_window.update
@actor_command_window.update
@status_window.update
@message_window.update
# ???????????
@spriteset.update
# ?????????????
if $game_temp.transition_processing
# ?????????????????
$game_temp.transition_processing = false
# ?????????
if $game_temp.transition_name == ""
Graphics.transition(20)
else
Graphics.transition(40, "Graphics/Transitions/" +
$game_temp.transition_name)
end
end
# ????????????????
if $game_temp.message_window_showing
return
end
# ???????????
if @spriteset.effect?
return
end
# ??????????
if $game_temp.gameover
# ??????????????
$scene = Scene_Gameover.new
return
end
# ???????????
if $game_temp.to_title
# ???????????
$scene = Scene_Title.new
return
end
# ????????
if $game_temp.battle_abort
# ??????? BGM ???
$game_system.bgm_play($game_temp.map_bgm)
# ?????
battle_end(1)
return
end
# ????????
if @wait_count > 0
# ????????????
@wait_count -= 1
return
end
# ???????????????????????
# ????????????????
if $game_temp.forcing_battler == nil and
$game_system.battle_interpreter.running?
return
end
# ??????????
case @phase
when 1 # ?????????
update_phase1
when 2 # ????????????
update_phase2
when 3 # ????????????
update_phase3
when 4 # ???????
update_phase4
when 5 # ???????????
update_phase5
end
end
end

#==============================================================================
# [ Scene_Shop
#==============================================================================

class Scene_Shop
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
#Réglage de l'opacité du menu du magasin
#Changez la valeur 200, plus le chiffre est petit
#plus le menu sera transparent
# ???????????
@sprite = Spriteset_Map.new
@help_window = Window_Help.new
@help_window.back_opacity = 200
# ????????????
@command_window = Window_ShopCommand.new
@command_window.back_opacity = 200
# ????????????
@gold_window = Window_Gold.new
@gold_window.x = 480
@gold_window.y = 64
@gold_window.back_opacity = 200
# ???????????
@dummy_window = Window_Base.new(0, 128, 640, 352)
@dummy_window.back_opacity = 200
# ??????????
@buy_window = Window_ShopBuy.new($game_temp.shop_goods)
@buy_window.active = false
@buy_window.visible = false
@buy_window.help_window = @help_window
@buy_window.back_opacity = 200
# ??????????
@sell_window = Window_ShopSell.new
@sell_window.active = false
@sell_window.visible = false
@sell_window.help_window = @help_window
@sell_window.back_opacity = 200
# ????????????
@number_window = Window_ShopNumber.new
@number_window.active = false
@number_window.visible = false
@number_window.back_opacity = 200
# ?????????????
@status_window = Window_ShopStatus.new
@status_window.visible = false
@status_window.back_opacity = 200
# ?????????
Graphics.transition
# ??????
loop do
# ????????
Graphics.update
# ???????
Input.update
# ??????
update
# ????????????????
if $scene != self
break
end
end
# ?????????
Graphics.freeze
# ????????
@help_window.dispose
@command_window.dispose
@gold_window.dispose
@dummy_window.dispose
@buy_window.dispose
@sell_window.dispose
@number_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def update
# ????????
@help_window.update
@command_window.update
@gold_window.update
@dummy_window.update
@buy_window.update
@sell_window.update
@number_window.update
@status_window.update
# ??????????????????: update_command ???
if @command_window.active
update_command
return
end
# ????????????????: update_buy ???
if @buy_window.active
update_buy
return
end
# ????????????????: update_sell ???
if @sell_window.active
update_sell
return
end
# ??????????????????: update_number ???
if @number_window.active
update_number
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (??????????????????)
#--------------------------------------------------------------------------
def update_command
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ??????????
$scene = Scene_Map.new
return
end
# C ??????????
if Input.trigger?(Input::C)
# ???????????????????
case @command_window.index
when 0 # ????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ???????????????
@command_window.active = false
@dummy_window.visible = false
@buy_window.active = true
@buy_window.visible = true
@buy_window.refresh
@status_window.visible = true
when 1 # ????
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ???????????????
@command_window.active = false
@dummy_window.visible = false
@sell_window.active = true
@sell_window.visible = true
@sell_window.refresh
when 2 # ???
# ?? SE ???
$game_system.se_play($data_system.decision_se)
# ??????????
$scene = Scene_Map.new
end
return
end
end
#--------------------------------------------------------------------------
# ? ?????? (????????????????)
#--------------------------------------------------------------------------
def update_buy
# ??????????????????
@status_window.item = @buy_window.item
# B ??????????
if Input.trigger?(Input::B)
# ????? SE ???
$game_system.se_play($data_system.cancel_se)
# ???????????????
@command_window.active = true
@dummy_window.visible = true
@buy_window.active = false
@buy_window.visible = false
@status_window.visible = false
@status_window.item = nil



Sneyke59 - posté le 08/07/2014 à 13:58:29. (9 messages postés)

Dommage, il y a une erreur à la 1836eme ligne ( la derniere ) et sachant que j'y connais rien en Ruby je ne saurais dire laquelle ^^

Suite à de nombreux abus, le post en invités a été désactivé. Veuillez vous inscrire si vous souhaitez participer à la conversation.

Haut de page

Merci de ne pas reproduire le contenu de ce site sans autorisation.
Contacter l'équipe

Plan du site:

Activité: Accueil | News | Forum | Flash-news | Chat | Commentaires | Galerie | Screen de la semaine | Sorties | Articles perso | Livre d'or | Recherche
Jeux: Index jeux séparés | Top Classiques | Top Originaux | Les autres | RPG Maker 95 | RPG Maker 2000 | RPG Maker 2003 | RPG Maker XP | RPG Maker VX | RPG Maker VX Ace | RPG Maker MV | Autres | Jeux complets | Proposer
Rubriques: Le Wiki | Collection Oniro | Tutoriaux | Scripts | Guides | Gaming-Live | Tests | Making-of | Interviews | Articles perso | OST | L'Annuaire | Divers | Palmarès
Hébergés: Aëdemphia | Fighting Robots Quest | Forstale | Geex | Inexistence | La Légende d'Ibabou | Lije | LoveMaster | Sarcia | Super Mario RPG - Lost Souls
Ressources: Jeux | Programmes | Packs de ressources | Midis | Eléments séparés | Sprites
RPG Maker 2000/2003: Chipsets | Charsets | Panoramas | Backdrops | Facesets | Battle anims | Battle charsets | Monstres | Systems | Templates
RPG Maker XP: Tilesets | Autotiles | Characters | Battlers | Window skins | Icônes | Transitions | Fogs | Templates
RPG Maker VX: Tilesets | Charsets | Facesets | Systèmes
RPG Maker MV: Tilesets | Characters | Faces | Systèmes | Title | Battlebacks | Animations | SV/Ennemis