Temps de jeu + nom de la carte dans les menus
Script a placer au dessus du script Main.
Ajoute donc le temps de jeu plus le nom de la map ou se trouve le héros.
Nommé ce script comme vous voulez (moi nommé "Temps_Lieux" ça marche).
- Code : Tout sélectionner
################################################### Mog Basic Menu Plus V 1.0 #
##################################################
# By Moghunter
# http://www.atelier-rgss.com
###################################################Menu padrão VX com adição de alguns extras, neste#script vocêpoderá trabalhar em cima dele e adaptá-lo
#facilmente ao seu jogo.#-------------------------------------------------
############### Game_Actor #
##############
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
###############
# Window_Base #
###############
class Window_Base < Window
def draw_actor_level_menu(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
self.contents.font.color = normal_color
self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2)
end
def draw_actor_class_menu(actor, x, y)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 85, WLH, actor.class.name)
end
def exp_gauge_color1
return text_color(30)
end
def exp_gauge_color2
return text_color(31)
end
def draw_actor_exp_meter(actor, x, y, width = 100)
if actor.next_exp != 0
exp = actor.now_exp
else
exp = 1
end
gw = width * exp / [actor.next_exp, 1„.max
gc1 = exp_gauge_color1
gc2 = exp_gauge_color2
self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, "Exp")
self.contents.font.color = normal_color
xr = x + width
self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_rest_exp_s, 2)
end
end
#####################
# Window_MenuStatus #
#####################
class Window_MenuStatus < Window_Selectable
def initialize(x, y)
super(x, y, 384, 416)
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 104
y = actor.index * 96 + WLH / 2
draw_actor_name(actor, x, y)
draw_actor_class_menu(actor, x + 120, y)
draw_actor_level_menu(actor, x + 200, y)
draw_actor_state(actor, x, y + WLH * 2)
draw_actor_hp(actor, x + 120, y + WLH * 1)
draw_actor_mp(actor, x + 120, y + WLH * 2)
draw_actor_exp_meter(actor, x , y + WLH * 1)
end
end
def update_cursor
if @index < 0
self.cursor_rect.empty
elsif @index < @item_max
self.cursor_rect.set(0, @index * 96, contents.width, 96)
elsif @index >= 100
self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
else
self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
end
end
end
############
# Game_Map #
############
class Game_Map
attr_reader :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id„.name
end
end
###############
# Window_Time #
###############
class Window_Mapname < Window_Base
def initialize(x, y)
super(x, y, 160, WLH + 64)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Location")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_map.mpname.to_s, 2)
end
end
###############
# Window_Time #
###############
class Window_Time < Window_Base
def initialize(x, y)
super(x, y, 160, WLH + 64)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, text, 2)
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
##############
# Scene_Menu #
##############
class Scene_Menu
def main
start
perform_transition
Input.update
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.update
pre_terminate
Graphics.freeze
terminate
end
def initialize(menu_index = 0)
@menu_index = menu_index
end
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
update_menu_background
end
def create_menu_background
@menuback_sprite = Sprite.new
@menuback_sprite.bitmap = $game_temp.background_bitmap
@menuback_sprite.color.set(16, 16, 16, 128)
update_menu_background
end
def dispose_menu_background
@menuback_sprite.dispose
end
def update_menu_background
end
def perform_transition
Graphics.transition(10)
end
def start
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
@playtime_window = Window_Time .new(0, 270)
@mapname_window = Window_Mapname.new(0, 178)
@status_window.openness = 0
@playtime_window.openness = 0
@mapname_window.openness = 0
@gold_window.openness = 0
@status_window.open
@playtime_window.open
@mapname_window.open
@gold_window.open
end
def pre_terminate
@status_window.close
@playtime_window.close
@mapname_window.close
@gold_window.close
@command_window.close
begin
@status_window.update
@playtime_window.update
@mapname_window.update
@gold_window.update
@command_window.update
Graphics.update
end until @status_window.openness == 0
end
def terminate
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@playtime_window.dispose
@mapname_window.dispose
end
def update
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@mapname_window.update
@playtime_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6„)
@command_window.index = @menu_index
@command_window.openness = 0
@command_window.open
if $game_party.members.size == 0
@command_window.draw_item(0, false)
@command_window.draw_item(1, false)
@command_window.draw_item(2, false)
@command_window.draw_item(3, false)
end
if $game_system.save_disabled
@command_window.draw_item(4, false)
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0
$scene = Scene_Item.new
when 1,2,3
start_actor_selection
when 4
$scene = Scene_File.new(true, false, false)
when 5
$scene = Scene_End.new
end
end
end
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1
$scene = Scene_Skill.new(@status_window.index)
when 2
$scene = Scene_Equip.new(@status_window.index)
when 3
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"„ = true
Pour avoir les combats à la FF like
Voici un script réalisé par Claimh version 1.0.0
Lien de l'article original pour les combats à la vue "FF like".
Compatible avec le script Backgroun battle présent.
N.B:Quelqu'un à déjà testé ce script, il paraît que cela marche parfaitement
3 scripts. A placer au dessus de Main. (Respecter les noms des scripts)
1er script:
sideview_formation
- Code : Tout sélectionner
#==============================================================================
# ¦ VX-RGSS2-6 Side-View Battle System [Formation] [Ver.1.0.0] by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# Actor location [Formation]
# The same amount of damage will be given regardless of formation setup.
#==============================================================================
module Battle_Formation
#------------------------------------------------------------------------------
# [Formation Setup]
# $game_system.battle_formation = Formation ID
# It’s possible to change the formation (Even an event script is possible).
FORM = {
# Formation ID => [[Member 1 x?y], [Member2 x, y],
# [Member 3 x, y], [Member 4 x, y]]
0 => [[380,150], [400, 230], [460, 170], [480, 250]]
}
#------------------------------------------------------------------------------
end
#==============================================================================
# ¦ Game_System
#==============================================================================
class Game_System
attr_accessor :battle_formation # Formation ID
#--------------------------------------------------------------------------
# ? Object initialization
#--------------------------------------------------------------------------
alias init_game_system initialize
def initialize
init_game_system
@battle_formation = 0 # Initial formation
end
end
#==============================================================================
# ¦ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ? Are sprites used? [Redefinition]
#--------------------------------------------------------------------------
def use_sprite?
return true
end
#--------------------------------------------------------------------------
# ? Battle screen Acquiring X Coordinate
#--------------------------------------------------------------------------
def screen_x
return Battle_Formation::FORM[$game_system.battle_formation][self.index][0]
end
#--------------------------------------------------------------------------
# ? Battle screen Acquiring Y Coordinate
#--------------------------------------------------------------------------
def screen_y
return Battle_Formation::FORM[$game_system.battle_formation][self.index][1]
end
#--------------------------------------------------------------------------
# ? Battle screen Acquiring Z Coordinate
#--------------------------------------------------------------------------
def screen_z
bitmap = Cache.character(self.character_name)
# Height +Y Coordinates
return screen_y + bitmap.height / 4
end
end
#==============================================================================
# ¦ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ? Battle screen Acquiring Z Coordinate [Redefinition]
#--------------------------------------------------------------------------
def screen_z
bitmap = Cache.battler(self.battler_name, self.battler_hue)
# Height +Y Coordinates
return screen_y + bitmap.height
end
end
2éme script:
sideview_motion_ctrl
- Code : Tout sélectionner
#==============================================================================
# ¦ VX-RGSS2-6 Side-View Battle System [MotionCtrl] [Ver.1.0.0] by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# This script carries out the movement controls of the actors.
#==============================================================================
#==============================================================================
# ¦ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ? Battle Start Process
#--------------------------------------------------------------------------
alias process_battle_start_sideview process_battle_start
def process_battle_start
for battler in $game_party.members + $game_troop.members
battler.move_mode = SideView::M_MODE_WAIT
end
process_battle_start_sideview
end
#--------------------------------------------------------------------------
# ? Victory Process
#--------------------------------------------------------------------------
alias process_victory_sideview process_victory
def process_victory
for actor in $game_party.members
actor.move_mode = SideView::M_MODE_WIN
end
process_victory_sideview
end
#--------------------------------------------------------------------------
# ? Wait Until Motion Control Is Finished
#--------------------------------------------------------------------------
def wait_for_motion
while @active_battler.motion_stop
update_basic
end
end
#--------------------------------------------------------------------------
# ? Execute Combat Operations: Attack [Redefinition]
#--------------------------------------------------------------------------
def execute_action_attack
text = sprintf(Vocab::DoAttack, @active_battler.name)
@message_window.add_instant_text(text)
targets = @active_battler.action.make_targets
#---Enemy attack sound reproduced.
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
end
#--- Proximity (Going)
SideView.set_target_point(@active_battler, targets[0])
@active_battler.move_mode = SideView::M_MODE_ATK1
@active_battler.motion_stop = true
wait_for_motion
#--- Attack
wait(5)
@active_battler.move_mode = SideView::M_MODE_ATK2
#---
display_attack_animation(targets)
wait(20)
for target in targets
target.attack_effect(@active_battler)
display_action_effects(target)
end
#--- Proximity (Return)
@active_battler.move_mode = SideView::M_MODE_ATK3
@active_battler.motion_stop = true
wait_for_motion
#---Wait
for target in targets
target.move_mode = SideView::M_MODE_WAIT
end
@active_battler.move_mode = SideView::M_MODE_WAIT
#---
end
#--------------------------------------------------------------------------
# ? Execute Combat Operations: Skill [Redefinition]
#--------------------------------------------------------------------------
def execute_action_skill
skill = @active_battler.action.skill
text = @active_battler.name + skill.message1
@message_window.add_instant_text(text)
unless skill.message2.empty?
wait(10)
@message_window.add_instant_text(skill.message2)
end
#--- Enemy attack sound reproduced.
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
end
#--- Long distance attack
@active_battler.move_mode = SideView::M_MODE_MAGI
#---
targets = @active_battler.action.make_targets
display_animation(targets, skill.animation_id)
@active_battler.mp -= @active_battler.calc_mp_cost(skill)
$game_temp.common_event_id = skill.common_event_id
for target in targets
target.skill_effect(@active_battler, skill)
display_action_effects(target, skill)
end
#---Wait
for target in targets
target.move_mode = SideView::M_MODE_WAIT
end
@active_battler.move_mode = SideView::M_MODE_WAIT
#---
end
#--------------------------------------------------------------------------
# ? Execute Combat Operations: Item [Redefinition]
#--------------------------------------------------------------------------
def execute_action_item
item = @active_battler.action.item
text = sprintf(Vocab::UseItem, @active_battler.name, item.name)
@message_window.add_instant_text(text)
#--- Enemy attack sound reproduced.
if @active_battler.is_a?(Game_Enemy)
Sound.play_enemy_attack
wait(15, true)
end
#--- Long distance attack
@active_battler.move_mode = SideView::M_MODE_MAGI
#---
targets = @active_battler.action.make_targets
display_animation(targets, item.animation_id)
$game_party.consume_item(item)
$game_temp.common_event_id = item.common_event_id
for target in targets
target.item_effect(@active_battler, item)
display_action_effects(target, item)
end
#---Wait
for target in targets
target.move_mode = SideView::M_MODE_WAIT
end
@active_battler.move_mode = SideView::M_MODE_WAIT
#---
end
#--------------------------------------------------------------------------
# ? Attack Animation Display [Redefinition]
# Targets : Object's Arrangement
#--------------------------------------------------------------------------
# ?Changed part?
# Enemy sound effect is changed so it can be used in each phase of operation.
# However, it changes so that the attack animation of an enemy can be displayed.
#--------------------------------------------------------------------------
def display_attack_animation(targets)
display_normal_animation(targets, @active_battler.atk_animation_id, false)
display_normal_animation(targets, @active_battler.atk_animation_id2, true)
wait_for_animation
end
#--------------------------------------------------------------------------
# ? HP Damage display [Redefinition]
# target : Candidate
# obj : Skill or item
#--------------------------------------------------------------------------
def display_hp_damage(target, obj = nil)
if target.hp_damage == 0 # No damage
return if obj != nil and obj.damage_to_mp
return if obj != nil and obj.base_damage == 0
fmt = target.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
text = sprintf(fmt, target.name)
elsif target.absorbed # Absorption
fmt = target.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
text = sprintf(fmt, target.name, Vocab::hp, target.hp_damage)
elsif target.hp_damage > 0 # Damage
if target.actor?
text = sprintf(Vocab::ActorDamage, target.name, target.hp_damage)
Sound.play_actor_damage
$game_troop.screen.start_shake(5, 5, 10)
target.blink = true # Only adds here
else
text = sprintf(Vocab::EnemyDamage, target.name, target.hp_damage)
Sound.play_enemy_damage
target.blink = true
end
else # Recovery
fmt = target.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
text = sprintf(fmt, target.name, Vocab::hp, -target.hp_damage)
Sound.play_recovery
end
@message_window.add_instant_text(text)
wait(30)
end
end
3éme script:
sideview_motion_exe
- Code : Tout sélectionner
#==============================================================================
# ¦ VX-RGSS2-6 Side-View Battle System[MotionExe] [Ver.1.0.0] by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# This script executes movement controls of the actors.
#==============================================================================
module SideView
#----------------------------------------------------------------------------
#-----[Operation Setup]-----
# Operation Speed
MOTION_SPEED = 20
#-----[Animation Setup]-----
# Usual enemy attack animation setup.
E_ANIME = {
# EnemyID => [Usually atttack and additional attack animations.]
1 => [1, 0]
}
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Motion Control Mode
M_MODE_WAIT = 0 # Standby
M_MODE_MAGI = 1 # Attack
M_MODE_DAMG = 2 # Non-Damage Attack
M_MODE_WIN = 3 # Victory
M_MODE_ATK1 = 4 # Direct Attack (Approaching)
M_MODE_ATK2 = 5 # Direct Attack (Attacking)
M_MODE_ATK3 = 6 # Direct Attack (Returning)
module_function
#--------------------------------------------------------------------------
# ? Movement-Zone Calculation
#--------------------------------------------------------------------------
def set_target_point(attacker, target)
case target
when Game_Actor
bits = Cache.character(target.character_name)
attacker.target_x = target.screen_x + (bits.width / 8)
attacker.target_y = target.screen_y
when Game_Enemy
bits = Cache.battler(target.battler_name, target.battler_hue)
attacker.target_x = target.screen_x + (bits.width / 2)
attacker.target_y = target.screen_y
end
end
end
class Game_Battler
attr_accessor :move_mode # Operation Mode
# 0:Standby 1:Attack 2: Un-useless 3:Victory
attr_accessor :motion_stop # Operation Stop Flag (Under Movement Flag)
attr_accessor :target_x # Move Position(x)
attr_accessor :target_y # Move Position(y)
#--------------------------------------------------------------------------
# ? Object Initialization
#--------------------------------------------------------------------------
alias initialize_sdva_corpse initialize
def initialize
initialize_sdva_corpse
@move_mode = 0
@motion_stop = false
@target_x = 0
@target_y = 0
end
end
#==============================================================================
# ¦ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ? Attack Animation ID Acquisition
#--------------------------------------------------------------------------
def atk_animation_id
return 0 if SideView::E_ANIME[@enemy_id].nil?
return SideView::E_ANIME[@enemy_id][0]
end
#--------------------------------------------------------------------------
# ? Attack Animation ID Acquisition (2 Sword Style:2 Weapons )
#--------------------------------------------------------------------------
def atk_animation_id2
return 0 if SideView::E_ANIME[@enemy_id].nil?
return SideView::E_ANIME[@enemy_id][1]
end
end
#==============================================================================
# ¦ Sprite_Battler
#==============================================================================
class Sprite_Battler < Sprite_Base
#--------------------------------------------------------------------------
# ? Object Initialization
# viewport : View Port
# battler : Battler (Game_Battler)
#--------------------------------------------------------------------------
alias initialize_sideview initialize
def initialize(viewport, battler = nil)
initialize_sideview(viewport, battler)
init_direct_attack
end
#--------------------------------------------------------------------------
# ? Set Proximity Value For Attack
#--------------------------------------------------------------------------
def init_direct_attack
@direct_attack_cnt = 0
@direct_attack_phase = 0
@direct_move_cnt = 0
@battler_x_plus = 0
@battler_y_plus = 0
@moving_mode = 0
@pattern = 0
@direction = 0
end
#--------------------------------------------------------------------------
# ? Frame Renewal [Redefinition]
#--------------------------------------------------------------------------
def update
super
if @battler == nil
self.bitmap = nil
else
@use_sprite = @battler.use_sprite?
if @use_sprite
self.x = @battler.screen_x + @battler_x_plus
self.y = @battler.screen_y + @battler_y_plus
self.z = @battler.screen_z
update_battler_bitmap
end
setup_new_effect
update_effect
end
end
#--------------------------------------------------------------------------
# ? Bitmap Transfer Source Renewal
#--------------------------------------------------------------------------
alias update_battler_bitmap_sideview update_battler_bitmap
def update_battler_bitmap
case @battler
when Game_Actor
if @battler.character_name != @battler_name or
@battler.character_index != @battler_hue
@battler_name = @battler.character_name
@battler_hue = @battler.character_index
draw_pre_character
draw_character
if (@battler.dead? or @battler.hidden) and !@battler.dead_delay
self.opacity = 0
end
end
when Game_Enemy
if @battler.battler_name != @battler_name or
@battler.battler_hue != @battler_hue
@battler_name = @battler.battler_name
@battler_hue = @battler.battler_hue
draw_battler
if (@battler.dead? or @battler.hidden) and !@battler.dead_delay
self.opacity = 0
end
end
end
motion_control
end
#--------------------------------------------------------------------------
# ? Battler Drawing
#--------------------------------------------------------------------------
def draw_battler
self.bitmap = Cache.battler(@battler_name, @battler_hue)
@width = bitmap.width
@height = bitmap.height
self.ox = @width / 2
self.oy = @height
end
#--------------------------------------------------------------------------
# ? Pre-Character Drawing [Common]
#--------------------------------------------------------------------------
def draw_pre_character
self.bitmap = Cache.character(@battler_name)
sign = @battler_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
@width = bitmap.width / 3
@height = bitmap.height / 4
else
@width = bitmap.width / 12
@height = bitmap.height / 8
end
self.ox = @width / 2
self.oy = @height
end
#--------------------------------------------------------------------------
# ? Character Drawing [Common]
#--------------------------------------------------------------------------
def draw_character
index = @battler_hue
pattern = @pattern < 3 ? @pattern : 1
sx = (index % 4 * 3 + pattern) * @width
sy = (index / 4 * 4 + (@direction - 2) / 2) * @height
self.src_rect.set(sx, sy, @width, @height)
end
#--------------------------------------------------------------------------
# ? Motion Control
#--------------------------------------------------------------------------
def motion_control
# Memory Operation Mode
@moving_mode = @battler.move_mode
# Battler Drawing
case @battler
when Game_Actor # Actor
actor_motion_control
when Game_Enemy # Enemy
enemy_motion_control
end
end
#--------------------------------------------------------------------------
# ? Motion Control (Actor)
#--------------------------------------------------------------------------
def actor_motion_control
# Operation Change
case @moving_mode
when SideView::M_MODE_WAIT # Standby
init_direct_attack
@battler_x_plus = 0
@direction = 4
@pattern = 1
when SideView::M_MODE_MAGI # Attack
@battler_x_plus = -10
@direction = 4
@pattern = 3
when SideView::M_MODE_DAMG # Non-Damage Attack
@battler_x_plus = 10
@direction = 4
@pattern = 3
when SideView::M_MODE_WIN # Victory
@direction = 2
@pattern = 1
when SideView::M_MODE_ATK1 # Direct Attack (Approaching)
exe_moving_attack_start
@end_pos_x = @battler_x_plus
when SideView::M_MODE_ATK2 # Direct Attack (Attacking)
@battler_x_plus = @end_pos_x - 10
when SideView::M_MODE_ATK3 # Direct Attack (Returning)
exe_moving_attack_end
else
p "error:Sprite_Battler>> @moving_mode"
end
draw_character
end
#--------------------------------------------------------------------------
# ? Motion Control (Enemy)
#--------------------------------------------------------------------------
def enemy_motion_control
# ??????
case @moving_mode
when SideView::M_MODE_WAIT # Standby
init_direct_attack
when SideView::M_MODE_MAGI # Attack
@battler_x_plus = 10
when SideView::M_MODE_DAMG # Non-Damage Attack
@battler_x_plus = -10
@shake_flg = true
when SideView::M_MODE_ATK1 # Direct Attack (Approaching)
exe_moving_attack_start
@end_pos_x = @battler_x_plus
when SideView::M_MODE_ATK2 # Direct Attack (Attacking)
@battler_x_plus = @end_pos_x + 10
when SideView::M_MODE_ATK3 # Direct Attack (Returning)
exe_moving_attack_end
else
p "error:Sprite_Battler>> @moving_mode", @moving_mode
end
end
#--------------------------------------------------------------------------
# ? Proximity Attack Execution Method
#--------------------------------------------------------------------------
def exe_moving_attack_start
return unless @battler.motion_stop
case @direct_attack_phase
when 0 # Start Operation Preparation
diratk_start
when 1 # Move Operation (Going)
diratk_move
when 2 # After-Movement Wait
diratk_wait
end
end
def exe_moving_attack_end
case @direct_attack_phase
when 0 # Attack Operation
diratk_attack
when 1 # Move Operation (Return)
diratk_back
when 2 # Operation End
diratk_end
end
end
#--------------------------------------------------------------------------
# ? Proximity Attack Execution [Start Operation Preparation]
#--------------------------------------------------------------------------
def diratk_start
# Pose Change
@pattern = 1
# The number of frames needed is the distance between current position
# and target position.
pos_x = @battler.target_x - self.x
pos_y = @battler.target_y - self.y
# Caculation for ammount of frames needed.
@direct_move_cnt = @direct_attack_cnt = (pos_x.abs / SideView::MOTION_SPEED).round
# NEXT Phase
@direct_attack_phase += 1
end
#--------------------------------------------------------------------------
# ? Proximity Attack Execution [Move Operation (Going)]
#--------------------------------------------------------------------------
def diratk_move
case @battler
when Game_Actor
x_plus = @width
y_plus = -@height / 4
when Game_Enemy
x_plus = -@width - 10
y_plus = @height / 4
end
# The next movement location is figured out by the distance between
# current position and target position.
pos_x = @battler.target_x - self.x + x_plus
pos_y = @battler.target_y - self.y + y_plus
@battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
@battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
# End count
@direct_attack_cnt -= 1
# Last movement (Insurance: Last correction)
if @direct_attack_cnt <= 0
@battler_x_plus = @battler.target_x - @battler.screen_x + x_plus
@battler_y_plus = @battler.target_y - @battler.screen_y + y_plus
# NEXT Phase
@direct_attack_cnt = 5
@direct_attack_phase += 1
end
end
#--------------------------------------------------------------------------
# ? Proximity Attack Execution [Attack Operation Return]
#--------------------------------------------------------------------------
def diratk_wait
# End Count
@direct_attack_cnt -= 1
# Last Movement
if @direct_attack_cnt <= 0
# Pose Change
@pattern = 3
# END Phase
@direct_attack_phase = 0
@battler.motion_stop = false
end
end
#--------------------------------------------------------------------------
# ? Proximity Attack Execution [Attack Operation Return]
#--------------------------------------------------------------------------
def diratk_attack
# Pose Change
@pattern = 1
# End Wait Count
@direct_attack_cnt = @direct_move_cnt
# NEXT Phase
@direct_attack_phase += 1
end
#--------------------------------------------------------------------------
# ? Proximity Attack Execution [Move Operation (Return)]
#--------------------------------------------------------------------------
def diratk_back
# The next movement location is figured out by the distance between
# current position and target position.
pos_x = @battler.screen_x - self.x
pos_y = @battler.screen_y - self.y
@battler_x_plus += pos_x / @direct_attack_cnt if @direct_attack_cnt != 0
@battler_y_plus += pos_y / @direct_attack_cnt if @direct_attack_cnt != 0
# End Count
@direct_attack_cnt -= 1
# Last Movement
if @direct_attack_cnt == 0
@battler_x_plus = 0
@battler_y_plus = 0
# NEXT Phase
@direct_attack_phase += 1
end
end
#--------------------------------------------------------------------------
# ? Proximity attack execution [Operation End]
#--------------------------------------------------------------------------
def diratk_end
init_direct_attack
@battler.motion_stop = false
# END Phase
@direct_attack_phase = 0
end
end
Pour éliminer le bord noir
Voici un script pour
éliminer les bords noirs.
Attention la résolution ne change pas.
Cela reste des carreaux de 32 pixel.
Par contre vous devez changer les dimensions des pictures comme l'ecran
titres, game over, des combats, ....
La dimension initial du script c'est 640*480. Comme XP. Bien sur vous
pouvez modifier cela.
Lien du topic original
D'après l'auteur, avec ce script, vous ne pouvez pas
commercialiser vôtre jeu. Mais il propose une
"licence" Aller voir sur le lien donné en haut.
Au dessus du scipt main.
- Code : Tout sélectionner
WIDTH = 640
HEIGHT = 480
DELTA_WIDTH = (WIDTH - 544).abs
DELTA_HEIGHT = (HEIGHT - 416).abs
class Spriteset_Map
def create_viewports
@viewport1 = Viewport.new(0, 0, WIDTH, HEIGHT)
@viewport2 = Viewport.new(0, 0, WIDTH, HEIGHT)
@viewport3 = Viewport.new(0, 0, WIDTH, HEIGHT)
@viewport2.z = 50
@viewport3.z = 100
end
end
class Spriteset_Battle
def create_viewports
@viewport1 = Viewport.new(0, 0, WIDTH, HEIGHT)
@viewport2 = Viewport.new(0, 0, WIDTH, HEIGHT)
@viewport3 = Viewport.new(0, 0, WIDTH, HEIGHT)
@viewport2.z = 50
@viewport3.z = 100
end
end
class Window_Base < Window
def x=(x)
super(x + DELTA_WIDTH / 2)
end
def y=(y)
super(y + DELTA_HEIGHT/ 2)
end
end
class Scene_Battle < Scene_Base
def create_info_viewport
@info_viewport = Viewport.new(0, 288, WIDTH,
HEIGHT)
@info_viewport.z = 100
@status_window = Window_BattleStatus.new
@party_command_window = Window_PartyCommand.new
@actor_command_window = Window_ActorCommand.new
@status_window.viewport = @info_viewport
@party_command_window.viewport = @info_viewport
@actor_command_window.viewport = @info_viewport
@status_window.x = 128
@actor_command_window.x = 544
@info_viewport.visible = false
end
end
class Scene_Item < Scene_Base
def start
super
create_menu_background
@viewport = Viewport.new(0, 0, WIDTH, HEIGHT)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@item_window = Window_Item.new(0, 56, 544, 360) @item_window.help_window = @help_window
@item_window.active = false
@target_window =
Window_MenuStatus.new(0, 0)
hide_target_window
end
def show_target_window(right)
@item_window.active = false
width_remain = WIDTH - @target_window.width
@target_window.x = right ? width_remain : 0
@target_window.visible = true
@target_window.active = true
if right
@viewport.rect.set(0, 0, width_remain,
HEIGHT)
@viewport.ox = 0
else
@viewport.rect.set(@target_window.width, 0, width_remain, HEIGHT)
@viewport.ox = @target_window.width
end
end
def hide_target_window
@item_window.active = true
@target_window.visible = false
@target_window.active = false
@viewport.rect.set(0, 0, WIDTH, HEIGHT)
@viewport.ox = 0
end
end
class Scene_Skill < Scene_Base
def start
super
create_menu_background
@actor = $game_party.members[@actor_index]
@viewport = Viewport.new(0, 0, WIDTH, HEIGHT)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@status_window = Window_SkillStatus.new(0, 56,
@actor)
@status_window.viewport = @viewport
@skill_window = Window_Skill.new(0, 112, 544,
304, @actor)
@skill_window.viewport = @viewport
@skill_window.help_window = @help_window
@target_window = Window_MenuStatus.new(0, 0)
hide_target_window
end
def show_target_window(right)
@skill_window.active = false
width_remain = WIDTH - @target_window.width
@target_window.x = right ? width_remain : 0 @target_window.visible = true
@target_window.active = true
if right
@viewport.rect.set(0, 0, width_remain,
HEIGHT)
@viewport.ox = 0
else
@viewport.rect.set(@target_window.width, 0, width_remain, HEIGHT)
@viewport.ox = @target_window.width
end
end
def hide_target_window
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
@viewport.rect.set(0, 0, WIDTH, HEIGHT)
@viewport.ox = 0
end
end
Et voici ce que vous devez placer sur la 1er ligne du script Main.
Code:
Graphics.resize_screen(WIDTH, HEIGHT)
Pour Flasher les ennemis dans les combats
Ce script permet de flasher l'ennemi sélectionné en combat.
A placer avant le Script "Main":
target_flash
- Code : Tout sélectionner
#==============================================================================
# ¦ ????????? Ver1.00 (??:2008.01.12)
#
# URL : http://f53.aaa.livedoor.jp/~momomo/
#------------------------------------------------------------------------------
# ????????????????????????????????
#==============================================================================
#==============================================================================
# ¦ Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ? ???????????
#--------------------------------------------------------------------------
alias momo_target_flash_update_target_enemy_selection :update_target_enemy_selection
def update_target_enemy_selection
# ???????
momo_target_flash_update_target_enemy_selection
# ?????????????????
if @target_enemy_window != nil
# ?????????????????????true?
@target_enemy_window.enemy.white_flash = true
end
end
end
Script pour avoir des fonds de combat.
Complément info:
Ce script fonctionne.
Ce script ce place au dessus du script Main.
Il vous permet afficher un fond de combat par carte que vous placerez dans le dossier picture.
Voici comment on nomme la picure:
Citation:
001-nom
Le 001 c'est le numéro de la carte.
Ensuite dans le script il faut aussi paramétrer cela.
Citation:
1 => "001-Grassland01",
2 => "001-Grassland01"
Au début vous avez cette portion de code.
Changer cela par le nom de la picture.
Et garder le 1-2 après 3.
Et surtout la virgule aussi.
Voici l'article original en anglais plus le script.
Script Name: Battle Backgrounds
Ecrit par: Synthesize
Version actuel: Version 1.00A
Date: January 20, 2008
What is this script?
This simple script allows you to have a battle background instead of the abstract background which is the default for RPG Maker VX. Simply define the Background filename in the customization section, along with your Map_ID.
Features:
- Simple
- Easy to use
- Turn ON/OFF the battlefloor
- Once RMVX is released, I will interpret more features
Version :
V1.00
- Script is released
- Code : Tout sélectionner
#===============================================================================
# Battle Backgrounds - RMVX
#===============================================================================
# Written by Synthesize
# January 20, 2008
# Version 1.00A
#===============================================================================
# * This script is untested. *
#===============================================================================
module SynBattleB
# Place your battle backgrounds in the 'Pictures' folder (Graphics/Pictures)
# Format = {map_id => Battleback Name}
Battle_background =
{
1 => "001-Grassland01",
2 => "001-Grassland01"
}
#-----------------------------------------------------------------------------
# Create the battlefloor?
Create_battlefloor = false
#-----------------------------------------------------------------------------
# This was being requested on quite a fe forums now, so I threw a quick script
# together. It is nice and simple, and does what it is suppsoed to do. Once
# RMVX is released in English, then I will add additional features into this.
#-----------------------------------------------------------------------------
end
#-------------------------------------------------------------------------------
# Spriteset_Battle
#-------------------------------------------------------------------------------
class Spriteset_Battle
alias syn_create_battlefloor create_battlefloor
#-----------------------------------------------------------------------------
# Create Battleback
#-----------------------------------------------------------------------------
def create_battleback
image = SynBattleB::Battle_background[$game_map.map_id„
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = Cache.picture(image)
end
def create_battlefloor
@battlefloor_sprite = Sprite.new(@viewport1)
syn_create_battlefloor if SynBattleB::Create_battlefloor == true
end
end
#===============================================================================
# * This script is untested *
#===============================================================================
# Version 1.00A
# January 20, 2008
# Written by Synthesize
#===============================================================================
# Battle Backgrounds - RMVX
#===============================================================================
Enfin, j'ai terminer. Je n'ai fait qu'un copier-coller d'un site (voir ressource). Je remercie quand même le site de Oniromancie de pouvoir publier ces ressources.
Ressource:Oniromancie