¡Bienvenid@ a Mundo Maker!

¿Quieres aprender todo sobre el RPG Maker?



Regístrate y forma parte de Mundo Maker.
Conectarse

Recuperar mi contraseña

Temas importantes
----------------------------------------
Páginas con recursos RPG Maker
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
----------------------------------------
Afiliados
Estadísticas
Tenemos 3378 miembros registrados.
El último usuario registrado es Max003.

Nuestros miembros han publicado un total de 79742 mensajes en 11241 argumentos.
Navega con Google Chrome
[DESCARGA]

Cambiar los personajes de lugar en tankentai

 :: RPG Maker :: Scripts

Ver el tema anterior Ver el tema siguiente Ir abajo

Cambiar los personajes de lugar en tankentai

Mensaje por Cradle90 el 2015-06-15, 16:05

Buenas! Uso rpg maker vx ace.

Vereis, yo se poco de scrip, he puesto el tankentai y funciona bien, el unico problema es que los personajes aparecen muy abajo, de tal forma que el menu los tapa a todos, pierde toda la gracia. Hay alguna manera de moverlos de lugar?

Me queda algo así.
http://pasteboard.co/1fbGhnxc.png

Cradle90
Iniciado
Iniciado

0/3

Créditos 10

Gracias : 2

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Bleuw el 2015-06-15, 16:40

Buscá esta línea

Cada espacio que te marco con amarillo, (separado por los corchetes hasta el 0) corresponde a un personaje.
El primer número, es la coordenada X, que en el primer personaje sería 400. Eso equivale a 400 píxeles de izquierda a derecha en tu pantalla. Y el segundo, es la coordenada Y, que equivale a los píxeles de arriba a abajo. Por lo que si tus personajes quedan por detrás de la HUD, para subirlos deberías bajar el número de la coordenada Y. Por ejemplo:
Código:
[400, 50, 0]
Que hará que tu personaje este solo 50 píxeles debajo del borde de tu pantalla. Lo que sería, obviamente muy arriba. Pero como para guiarte.

Espero te sirva, saludos.

Bleuw
Aventurero
Aventurero

0/3

Créditos 1597

Gracias : 101

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Cradle90 el 2015-06-15, 17:06

Eyy, muchas gracias por responder.

Lo malo es que esas lineas no existen, deberia de estar en el scrips de batalla lateral no?

Cradle90
Iniciado
Iniciado

0/3

Créditos 10

Gracias : 2

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Bleuw el 2015-06-15, 17:09

¿Cómo que no existen? =o
Supongo tendrás otra versión del script. Si tenés la japonesa, buscá una en inglés, si tenés una en inglés, deberían estar, y si no, pasame el script y me fijo.

Bleuw
Aventurero
Aventurero

0/3

Créditos 1597

Gracias : 101

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Cradle90 el 2015-06-15, 17:13

Deacuerdo, como no entiendo mucho de script te lo enseño XD

script:
Código:
#===============================================================================
# Side-View Battle System
# By Jet10985 (Jet)
#===============================================================================
# This script will allow you to have battle where all the actor's sprites are
# display on the right side of the screen.
# This script has: 10 customization options.
#===============================================================================
# Overwritten Methods:
# Scene_Battle: show_attack_animation
# Spriteset_Battle: update_actors
#-------------------------------------------------------------------------------
# Aliased methods:
# Spriteset_Battle: create_actors, create_enemies
# Sprite_Character: initialize, update, dispose, start_new_effect
# Scene_Battle: use_item, next_command, prior_command
# Game_Character: screen_x, screen_y
#===============================================================================

module Jet
 module Sideview
 
   #===========================================================================
   # ENEMY OPTIONS
   #===========================================================================
 
   # These are the attack animations for enemies when they use a regular attack.
   # It follows this format: enemy_id => animation_id
   ENEMY_ATK_ANIMS = {
 
   1 => 4,
   6 => 2,
   5 => 27
 
   }
 
   # This is the default enemy attack animation, used when they do not have a
   # specific attack animation above.
   ENEMY_ATK_ANIMS.default = 1
 
   # This is a list of enemies whose portraits should be flipped in battle.
   FLIPPED_ENEMIES = [2, 3, 4, 5, 8, 10, 12, 13, 14, 16, 17, 18, 19]
 
   #===========================================================================
   # ACTOR OPTIONS
   #===========================================================================
 
   # Should the player sprite have a shadow beneath them?
   PLAYER_SHADOW = true
 
   # These are sprite changes depending on state infliction.
   # It follows this format: state_id => "sprite_appention"
   # This means if the state is inflicted, the sprite will look for a graphic
   # that is the same name as the character's sprite, plus the appended option.
   # EX: Ralph's sprite's name is $ralph. Ralph gets knocked-out. This means
   # state 1 was inflicted, and my below config for 1 was: 1 => "_dead"
   # Now, his shown sprite will be $ralph_dead. If the sprite does not exist,
   # no change will be made.
   # The sprite index will be the same as the actor's.
   STATE_SPRITES = {
 
   1 => "_dead",
   2 => "_poison",
   3 => "_blind"
 
   }
 
   #===========================================================================
   # GENERAL_OPTIONS
   #===========================================================================
 
   # This is the animation displayed when a skill is about to be used.
   SKILL_ANIMATION = 43
 
   # This is the animation displayed when an item is about to be used.
   ITEM_ANIMATION = 43
 
   # These are the animations played when a state is inflicted.
   # It follows this format: state_id => animation_id
   STATE_ANIMATIONS = {
 
   1 => 56,
   2 => 50,
   3 => 51
 
   }
 
   #===========================================================================
   # FIELD OPTIONS
   #===========================================================================
 
   # This is where the line-up begins. [x, y]. The higher the x, the further
   # right and the higher the y the further down.
   FIELD_POS = [400, 230]
 
   # This is how far down, and to the right each player is from the previous
   # actor. [x, y]. Same rules as above.
   FIELD_SPACING = [12, 50]
 
 end
end

#===============================================================================
# DON'T EDIT FURTHER UNLESS YOU KNOW WHAT TO DO.
#===============================================================================

($imported ||= {})[:jet] ||= {}
$imported[:jet][:Sideview] = true

class Game_Character

 attr_accessor :step_anime

 %w[screen_x screen_y].each {|a|
   aStr = %Q{
     alias jet6372_#{a} #{a}
     def #{a}(*args, &block)
       $BTEST ? 0 : jet6372_#{a}(*args, &block)
     end
   }
   module_eval(aStr)
 }
end

class Game_Actor

 def animation_id=(t)
   self.battle_sprite.start_animation($data_animations[t]) rescue nil
 end
end

class Game_Battler

 def battle_sprite
   return nil unless SceneManager.scene_is?(Scene_Battle)
   SceneManager.scene.spriteset.battler_sprites.each {|a|
     return a if a.battler == self
   }
   return nil
 end
end

class Spriteset_Battle

 alias jet2847_create_enemies create_enemies
 def create_enemies(*args, &block)
   jet2847_create_enemies(*args, &block)
   @enemy_sprites.each {|a|
     a.mirror = Jet::Sideview::FLIPPED_ENEMIES.include?(a.battler.enemy.id)
   }
 end

 alias jet3835_create_actors create_actors
 def create_actors(*args, &block)
   jet3835_create_actors(*args, &block)
   @jet_party = $game_party.members
   @actor_sprites.each {|a|
     a.dispose
   }
   @actor_sprites = []
   $game_party.members.each {|a|
     f = Game_Character.new
     f.set_graphic(a.character_name, a.character_index)
     f.step_anime = true
     f.set_direction(4)
     n = Sprite_Character.new(@viewport1, f)
     n.jet_x = Jet::Sideview::FIELD_POS[0] + a.index * Jet::Sideview::FIELD_SPACING[0]
     n.jet_y = Jet::Sideview::FIELD_POS[1] + a.index * Jet::Sideview::FIELD_SPACING[1]
     n.battler = a
     n.battle_sprite = true
     if Jet::Sideview::PLAYER_SHADOW
       v = Sprite.new(nil)
       v.bitmap = Cache.system("Shadow")
       n.shadow_sprite = v
     end
     @actor_sprites.push(n)
   }
 end

 def update_actors
   if @jet_party != $game_party.members
     @actor_sprites.each {|a|
       a.dispose
     }
     @actor_sprites = []
     create_actors
   end
   @actor_sprites.each {|a| a.update }
 end
end

class Sprite_Character

 attr_accessor :battle_sprite, :jet_x, :jet_y, :shadow_sprite, :battler

 alias jet4646_initialize initialize
 def initialize(*args, &block)
   @battle_sprite = false
   jet4646_initialize(*args, &block)
 end

 alias jet3645_update update
 def update(*args, &block)
   jet3645_update(*args, &block)
   if @battle_sprite
     @character.step_anime = !@battler.dead?
     @character.update
     self.x = @jet_x
     self.y = @jet_y
     if !@battler.nil?
       f = @battler.states.dup
       f.sort! {|a, b|
         a.priority <=> b.priority
       }.reverse!
       for i in 0...f.size
         a = Jet::Sideview::STATE_SPRITES[f[i].id]
         next if a.nil?
         b = (Cache.character(@character.character_name + a) rescue false)
         next unless b
         index = @character.character_index
         @character.set_graphic(@character.character_name + a, index)
         break
       end
     end
     if !@shadow_sprite.nil?
       @shadow_sprite.x = self.x - @shadow_sprite.width / 2
       @shadow_sprite.y = self.y - 28
       @shadow_sprite.visible = self.visible
       @shadow_sprite.viewport = self.viewport
       @shadow_sprite.z = self.z - 1
     end
   end
 end

 alias jet5484_dispose dispose
 def dispose(*args, &block)
   @shadow_sprite.dispose if !@shadow_sprite.nil?
   jet5484_dispose(*args, &block)
 end

 def move_x(times, amount)
   i = 0
   until i == times
     self.jet_x += amount
     i += 1
     [Graphics, SceneManager.scene.spriteset].each {|a| a.update }
   end
 end

 def effect?
   false
 end
end

class Game_Enemy

 def atk_animation_id1
   return Jet::Sideview::ENEMY_ATK_ANIMS[@enemy_id]
 end

 def atk_animation_id2
   return 0
 end
end

class Scene_Battle

 attr_reader :spriteset

 alias jet2711_use_item use_item
 def use_item(*args, &block)
   if @subject.is_a?(Game_Actor)
     if !@subject.current_action.guard?
       @subject.battle_sprite.move_x(11, -6)
     end
   end
   if !@subject.current_action.guard? && !@subject.current_action.attack?
     if @subject.current_action.item.is_a?(RPG::Item)
       n = $data_animations[Jet::Sideview::ITEM_ANIMATION]
     else
       n = $data_animations[Jet::Sideview::SKILL_ANIMATION]
     end
     @subject.battle_sprite.start_animation(n)
     wait_for_animation
   end
   jet2711_use_item(*args, &block)
   if @subject.is_a?(Game_Actor)
     if !@subject.current_action.guard?
       @subject.battle_sprite.move_x(11, 6)
     end
   end
 end

 def show_attack_animation(targets)
   aid1 = @subject.atk_animation_id1
   aid2 = @subject.atk_animation_id2
   show_normal_animation(targets, aid1, false)
   show_normal_animation(targets, aid2, true)
 end

 %w[next prior].each {|a|
   aStr = %Q{
     alias jet3734_#{a}_command #{a}_command
     def #{a}_command(*args, &block)
       f = BattleManager.actor
       f.battle_sprite.move_x(6, 6) if f.is_a?(Game_Actor)
       jet3734_#{a}_command(*args, &block)
       f = BattleManager.actor
       f.battle_sprite.move_x(6, -6) if f.is_a?(Game_Actor)
     end
   }
   module_eval(aStr)
 }
end

class Game_Action

 def guard?
   item == $data_skills[subject.guard_skill_id]
 end
end

if $imported[:jet][:BattlePopUps]
 class Sprite_Character
 
   attr_accessor :popups
     
   alias jet4758_initialize initialize
   def initialize(*args, &block)
     @popups = []
     @updating_sprites = []
     @popup_wait = 0
     jet4758_initialize(*args, &block)
   end
     
   alias jet7467_update update
   def update(*args, &block)
     jet7467_update(*args, &block)
     if @popup_wait == 0
       if !@popups.empty?
         @updating_sprites.push(@popups.pop)
         @popup_wait = 30
       end
     else
       @popup_wait -= 1
     end
     @updating_sprites.each {|a|
       a.visible = true if !a.visible
       a.update
       @updating_sprites.delete(a) if a.disposed?
     }
   end
 
   alias jet5483_dispose dispose
   def dispose(*args, &block)
     (@updating_sprites + @popups).each {|a| a.dispose }
     jet5483_dispose(*args, &block)
   end
 
   alias jet3745_setup_new_effect setup_new_effect
   def setup_new_effect(*args, &block)
     jet3745_setup_new_effect(*args, &block)
     do_sprite_popups
   end
 
   def make_popup(text, color)
     @popups.unshift(Sprite_JetPopup.new(text.to_s, color, self))
   end
 
   def do_sprite_popups
     return if @battler.nil?
     if @battler_struct.nil?
       @battler_struct = Struct.new(:hp, :mp, :tp).new(0, 0, 0)
       @battler_struct.hp = @battler.hp
       @battler_struct.mp = @battler.mp
       @battler_struct.tp = @battler.tp
     end
     check_success_popup
     check_hp_popup
     check_mp_popup
     check_tp_popup
   end
 
   def check_success_popup
     if @battler.result.success
       if @battler.result.critical
         make_popup(Jet::BattlePopUps::CRITICAL_TEXT, Jet::BattlePopUps::CRITICAL_COLOR)
       elsif @battler.result.missed
         make_popup(Jet::BattlePopUps::MISSED_TEXT, Jet::BattlePopUps::MISS_COLOR)
       elsif @battler.result.evaded
         make_popup(Jet::BattlePopUps::EVADED_TEXT, Jet::BattlePopUps::EVADE_COLOR)
       end
       @battler.result.clear_hit_flags
     end
   end
 
   def check_hp_popup
     if @battler_struct.hp != @battler.hp
       f = @battler_struct.hp - @battler.hp
       if f > 0
         make_popup(Jet::BattlePopUps::HURT_TEXT + f.to_s, Jet::BattlePopUps::HURT_COLOR)
       elsif f < 0
         make_popup(Jet::BattlePopUps::HEAL_TEXT + f.abs.to_s, Jet::BattlePopUps::HEAL_COLOR)
       end
       @battler_struct.hp = @battler.hp
     end
   end
 
   def check_mp_popup
     if @battler_struct.mp != @battler.mp
       f = @battler_struct.mp - @battler.mp
       if f > 0
         make_popup(Jet::BattlePopUps::HURT_TEXT_MP + f.to_s, Jet::BattlePopUps::HURT_COLOR_MP)
       elsif f < 0
         make_popup(Jet::BattlePopUps::HEAL_TEXT_MP + f.abs.to_s, Jet::BattlePopUps::HEAL_COLOR_MP)
       end
       @battler_struct.mp = @battler.mp
     end
   end
 
   def check_tp_popup
     if @battler_struct.tp != @battler.tp
       f = (@battler_struct.tp - @battler.tp).round
       if f > 0
         make_popup(Jet::BattlePopUps::HURT_TEXT_TP + f.to_s, Jet::BattlePopUps::HURT_COLOR_TP)
       elsif f < 0
         make_popup(Jet::BattlePopUps::HEAL_TEXT_TP + f.abs.to_s, Jet::BattlePopUps::HEAL_COLOR_TP)
       end
       @battler_struct.tp = @battler.tp
     end
   end
 end
end

Cradle90
Iniciado
Iniciado

0/3

Créditos 10

Gracias : 2

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Bleuw el 2015-06-15, 17:19

Pasa que ese no es el Tankentai, es el script de Jet =p
Es mucho más simple que el tankentai. Pero debería fijarte en las líneas 94 y 98, donde salen los números, que esencialmente son lo mismo que te remarqué antes, las coordenadas X y las Y
Fijate jugando con esos números si podés posicionar los personajes donde te guste.

Bleuw
Aventurero
Aventurero

0/3

Créditos 1597

Gracias : 101

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Cradle90 el 2015-06-15, 17:29

wow tio gracias, me ha funcionado! se que es algo básico, pero sabiendo 0 sobre script se me hace imposible saber como hacerlo XD.

Y disculpad mi pesadez pero yaa que estoy seguiré dando la lata XD, si sabes algo bien y si es muy complejo lo dejamos y ya esta.

Tengo el sistema de 8 jugadores (que usare para hacer una especie de invocaciones) y como he visto aparecen siempre los personajes uno bajo del otro, habría alguna manera de poner 4 personajes atras y 4 un poco mas adelante?

Te dejo esto por si acaso sabes algo, o tienes que mirar algo thx!

script 8 personajes:
Código:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Party System v1.08
# -- Last Updated: 2012.01.23
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-PartySystem"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.23 - Bug fixed: Party members are now rearranged when newly added.
# 2012.01.14 - New Feature: Maximum Battle Members Variable added.
# 2012.01.07 - Bug fixed: Error with removing members.
# 2012.01.05 - Bug fixed: Escape skill/item effects no longer counts as death.
# 2011.12.26 - Compatibility Update: New Game+
# 2011.12.17 - Updated Spriteset_Battle to have updated sprite counts.
# 2011.12.13 - Updated to provide better visual display when more than 5 pieces
#              of equipment are equipped on an actor at a time.
# 2011.12.05 - Added functionality to display faces in the Party Select Window.
#            - Fixed bug that doesn't refresh the caterpillar when new members
#              join the party.
# 2011.12.04 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# RPG Maker VX Ace comes with a very nice party system. However, changing the
# maximum number of members isn't possible without the aid of a script. This
# script enables you the ability to change the maximum number of party members,
# change EXP rates, and/or open up a separate party menu (if desired). In
# addition to that, you can lock the position of actors within a party and
# require other actors to be in the active party before continuing.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# *IMPORTANT* These script calls require the new party menu to be enabled to
# use them. Otherwise, nothing will happen.
#
# lock_actor(x)
# unlock_actor(x)
# This will lock actor x in its current position in the party if the actor is
# in the current party. The actor is unable to switch position and must remain
# in that position until the lock is removed. Use the unlock script call to
# remove the locked status. This script requires the actor to have joined and
# in the current party before the script call will work.
#
# require_actor(x)
# unrequire_actor(x)
# This will cause the party to require actor x in order to continue. If the
# actor isn't in the current party but is in the reserve party, the party menu
# will open up and prompt the player to add the required actor into the party
# before being able to continue. This script call will not function unless the
# specific actor has joined the party, whether it is in the current or reserve.
#
# call_party_menu
# This will open up the party menu. This script call requires for the party
# menu to be enabled to use.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
 module PARTY
   
   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   # - General Party Settings -
   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   # In this section, you can adjust the general party settings for your game
   # such as the maximum amount of members and whatnot, the EXP rate for
   # party members in the reserve, etc.
   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   MAX_BATTLE_MEMBERS   = 8      # Maximum party members. Default: 4
   SPLIT_EXP            = false  # Splits EXP with more members in the party.
   RESERVE_EXP_RATE     = 0.50   # Reserve EXP Rate. Default: 1.00
   
   # If you wish to be able to change the maximum number of battle members
   # during the middle of your game, set this constant to a variable ID. If
   # that variable ID is a number greater than 0, that variable will determine
   # the current maximum number of battle members. Be cautious about using
   # this during battle.
   MAX_MEMBERS_VARIABLE = 0
   
   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   # - Party Menu Settings -
   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   # This section contains various menu settings for those who wish to use a
   # menu separate for the party system. Here, adjust the menu command order,
   # icons used, and other settings.
   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   ENABLE_MENU = true   # Enables party menu. Default: false
   COMMANDS =[          # The order at which the menu items are shown.
   # [:command,  "Display"],
     [ :change,  "Change",],
     [ :remove,  "Remove",],
     [ :revert,  "Revert",],
     [ :finish,  "Finish",],
   ] # Do not remove this.
   COMMAND_ALIGN    = 1     # 0:Left Align, 1:Center Align, 2:Right Align
   
   # These settings here are used for the upper right window: the Party Select
   # window where the player selects a member to swap out or remove.
   PARTY_FONT_SIZE  = 20    # Font size used for party member names.
   LOCK_FIRST_ACTOR = false # Lock the first actor by default?
   LOCKED_ICON      = 125   # Icon used for locked members.
   REQUIRED_ICON    = 126   # Icon used for required members.
   EMPTY_TEXT = "-Empty-"   # Text used when a member isn't present.
   DISPLAY_FACE     = false # Display faces instead of sprites?
   
   # These settings here are used for the lower left window: the Party List
   # window where the player selects a member to replace.
   REMOVE_ICON      = 185          # Icon used for removing members.
   REMOVE_TEXT      = "-Remove-"   # Text used for remove member command.
   ACTOR_Y_BUFFER   = 12           # Amount the actor graphic be adjusted by.
   
   # These settings here are used for the lower right window: the Party Status
   # window where info about a selected actor is shown.
   NO_DATA         = "- No Data -" # Text used for when no actor is shown.
   IN_PARTY_COLOUR = 6             # Text colour used for in party members.
   STAT_FONT_SIZE  = 20            # Font size used for stats.
   EQUIP_TEXT      = "Equipment"   # Text used to display equipment.
   
 end # PARTY
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

#==============================================================================
# ■ Icon
#==============================================================================

module Icon
 
 #--------------------------------------------------------------------------
 # self.locked_party
 #--------------------------------------------------------------------------
 def self.locked_party; return YEA::PARTY::LOCKED_ICON; end
 
 #--------------------------------------------------------------------------
 # self.required_party
 #--------------------------------------------------------------------------
 def self.required_party; return YEA::PARTY::REQUIRED_ICON; end
 
 #--------------------------------------------------------------------------
 # self.remove_party
 #--------------------------------------------------------------------------
 def self.remove_party; return YEA::PARTY::REMOVE_ICON; end
   
end # Icon

#==============================================================================
# ■ Variable
#==============================================================================

module Variable
 
 #--------------------------------------------------------------------------
 # self.max_battle_members
 #--------------------------------------------------------------------------
 def self.max_battle_members
   default = YEA::PARTY::MAX_BATTLE_MEMBERS
   return default if YEA::PARTY::MAX_MEMBERS_VARIABLE <= 0
   return default if $game_variables[YEA::PARTY::MAX_MEMBERS_VARIABLE] <= 0
   return $game_variables[YEA::PARTY::MAX_MEMBERS_VARIABLE]
 end
 
end # Variable

#==============================================================================
# ■ Numeric
#==============================================================================

class Numeric
 
 #--------------------------------------------------------------------------
 # new method: group_digits
 #--------------------------------------------------------------------------
 unless $imported["YEA-CoreEngine"]
 def group; return self.to_s; end
 end # $imported["YEA-CoreEngine"]
   
end # Numeric

#==============================================================================
# ■ Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
 
 #--------------------------------------------------------------------------
 # public instance variables
 #--------------------------------------------------------------------------
 attr_accessor :locked
 attr_accessor :required
 
 #--------------------------------------------------------------------------
 # alias method: setup
 #--------------------------------------------------------------------------
 alias game_actor_setup_ps setup
 def setup(actor_id)
   game_actor_setup_ps(actor_id)
   @locked = false
   @required = false
 end
 
 #--------------------------------------------------------------------------
 # overwrite method: final_exp_rate
 #--------------------------------------------------------------------------
 def final_exp_rate
   n = exr * (battle_member? ? 1 : reserve_members_exp_rate)
   if $game_party.in_battle
     n /= [$game_party.battle_members.size, 1].max if YEA::PARTY::SPLIT_EXP
   end
   return n
 end
 
 #--------------------------------------------------------------------------
 # overwrite method: reserve_members_exp_rate
 #--------------------------------------------------------------------------
 def reserve_members_exp_rate
   $data_system.opt_extra_exp ? YEA::PARTY::RESERVE_EXP_RATE : 0
 end
 
end # Game_Actor

#==============================================================================
# ■ Game_Party
#==============================================================================

class Game_Party < Game_Unit
 
 #--------------------------------------------------------------------------
 # public instance variables
 #--------------------------------------------------------------------------
 attr_accessor :battle_members_array
 
 #--------------------------------------------------------------------------
 # alias method: initialize
 #--------------------------------------------------------------------------
 alias game_party_initialize_ps initialize
 def initialize
   game_party_initialize_ps
   @battle_members_array = nil
 end
 
 #--------------------------------------------------------------------------
 # overwrite method: max_battle_members
 #--------------------------------------------------------------------------
 def max_battle_members; return Variable.max_battle_members; end
 
 #--------------------------------------------------------------------------
 # alias method: setup_starting_members
 #--------------------------------------------------------------------------
 alias setup_starting_members_ps setup_starting_members
 def setup_starting_members
   setup_starting_members_ps
   initialize_battle_members
   return unless YEA::PARTY::LOCK_FIRST_ACTOR
   return if members[0].nil?
   members[0].locked = true
 end
 
 #--------------------------------------------------------------------------
 # alias method: setup_battle_test_members
 #--------------------------------------------------------------------------
 alias setup_battle_test_members_ps setup_battle_test_members
 def setup_battle_test_members
   setup_battle_test_members_ps
   return unless YEA::PARTY::LOCK_FIRST_ACTOR
   return if members[0].nil?
   members[0].locked = true
 end
 
 #--------------------------------------------------------------------------
 # overwrite method: battle_members
 #--------------------------------------------------------------------------
 def battle_members
   initialize_battle_members if initialize_battle_members?
   array = []
   for actor_id in @battle_members_array
     break if array.size > max_battle_members
     next if actor_id.nil?
     next if $game_actors[actor_id].nil?
     next unless $game_actors[actor_id].exist?
     array.push($game_actors[actor_id])
   end
   return array
 end
 
 #--------------------------------------------------------------------------
 # new method: initialize_battle_members?
 #--------------------------------------------------------------------------
 def initialize_battle_members?
   return true if @battle_members_array.nil?
   return @battle_members_array.size != max_battle_members
 end
 
 #--------------------------------------------------------------------------
 # new method: initialize_battle_members
 #--------------------------------------------------------------------------
 def initialize_battle_members
   @battle_members_array = []
   for i in 0...max_battle_members
     @battle_members_array.push(@actors[i]) unless @actors[i].nil?
     @battle_members_array.push(0) if @actors[i].nil?
   end
   $game_player.refresh
 end
 
 #--------------------------------------------------------------------------
 # alias method: add_actor
 #--------------------------------------------------------------------------
 alias game_party_add_actor_ps add_actor
 def add_actor(actor_id)
   game_party_add_actor_ps(actor_id)
   return if @battle_members_array.include?(actor_id)
   return unless @battle_members_array.include?(0)
   index = @battle_members_array.index(0)
   @battle_members_array[index] = actor_id
   $game_player.refresh
   $game_map.need_refresh = true
   rearrange_actors
 end
 
 #--------------------------------------------------------------------------
 # alias method: remove_actor
 #--------------------------------------------------------------------------
 alias game_party_remove_actor_ps remove_actor
 def remove_actor(actor_id)
   game_party_remove_actor_ps(actor_id)
   return unless @battle_members_array.include?(actor_id)
   index = @battle_members_array.index(actor_id)
   @battle_members_array[index] = 0
   $game_player.refresh
   $game_map.need_refresh = true
   rearrange_actors
 end
 
 #--------------------------------------------------------------------------
 # new method: rearrange_actors
 #--------------------------------------------------------------------------
 def rearrange_actors
   initialize_battle_members if @battle_members_array.nil?
   array = []
   for actor_id in @battle_members_array
     next if [0, nil].include?(actor_id)
     next if $game_actors[actor_id].nil?
     array.push(actor_id)
   end
   for actor_id in @actors
     next if array.include?(actor_id)
     next if $game_actors[actor_id].nil?
     array.push(actor_id)
   end
   @actors = array
 end
 
end # Game_Party

#==============================================================================
# ■ Game_Interpreter
#==============================================================================

class Game_Interpreter
 
 #--------------------------------------------------------------------------
 # new method: lock_actor
 #--------------------------------------------------------------------------
 def lock_actor(actor_id)
   return unless YEA::PARTY::ENABLE_MENU
   actor = $game_actors[actor_id]
   return unless $game_party.battle_members.include?(actor.id)
   actor.locked = true
 end
 
 #--------------------------------------------------------------------------
 # new method: unlock_actor
 #--------------------------------------------------------------------------
 def unlock_actor(actor_id)
   return unless YEA::PARTY::ENABLE_MENU
   actor = $game_actors[actor_id]
   return unless $game_party.battle_members.include?(actor.id)
   actor.locked = false
 end
 
 #--------------------------------------------------------------------------
 # new method: require_actor
 #--------------------------------------------------------------------------
 def require_actor(actor_id)
   return unless YEA::PARTY::ENABLE_MENU
   return if $game_system.formation_disabled
   actor = $game_actors[actor_id]
   return unless $game_party.all_members.include?(actor)
   actor.required = true
   call_party_menu unless $game_party.battle_members.include?(actor)
 end
 
 #--------------------------------------------------------------------------
 # new method: unrequire_actor
 #--------------------------------------------------------------------------
 def unrequire_actor(actor_id)
   return unless YEA::PARTY::ENABLE_MENU
   return if $game_system.formation_disabled
   actor = $game_actors[actor_id]
   return unless $game_party.all_members.include?(actor)
   actor.required = false
   call_party_menu unless $game_party.battle_members.include?(actor)
 end
 
 #--------------------------------------------------------------------------
 # new method: call_party_menu
 #--------------------------------------------------------------------------
 def call_party_menu
   return unless YEA::PARTY::ENABLE_MENU
   return if $game_system.formation_disabled
   SceneManager.call(Scene_Party)
 end
 
end # Game_Interpreter

#==============================================================================
# ■ Spriteset_Battle
#==============================================================================

class Spriteset_Battle
 
 #--------------------------------------------------------------------------
 # overwrite method: create_actors
 #--------------------------------------------------------------------------
 def create_actors
   total = $game_party.max_battle_members
   @actor_sprites = Array.new(total) { Sprite_Battler.new(@viewport1) }
 end
 
end # Spriteset_Battle

#==============================================================================
# ■ Window_PartyMenuCommand
#==============================================================================

class Window_PartyMenuCommand < Window_Command
 
 #--------------------------------------------------------------------------
 # window_width
 #--------------------------------------------------------------------------
 def window_width; return 160; end
 
 #--------------------------------------------------------------------------
 # visible_line_number
 #--------------------------------------------------------------------------
 def visible_line_number; 4; end
 
 #--------------------------------------------------------------------------
 # alignment
 #--------------------------------------------------------------------------
 def alignment
   return Menu.command_window_align if $imported["YEA-AceMenuEngine"]
   return YEA::PARTY::COMMAND_ALIGN
 end
 
 #--------------------------------------------------------------------------
 # scene
 #--------------------------------------------------------------------------
 def scene; return SceneManager.scene; end
 
 #--------------------------------------------------------------------------
 # make_command_list
 #--------------------------------------------------------------------------
 def make_command_list
   for command in YEA::PARTY::COMMANDS
     case command[0]
     when :change, :remove, :revert
       add_command(command[1], command[0])
     when :finish
       add_command(command[1], command[0], enable_cancel?)
     else; next
     end
   end
 end
 
 #--------------------------------------------------------------------------
 # process_cancel
 #--------------------------------------------------------------------------
 def process_cancel
   unless enable_cancel?
     Sound.play_buzzer
     return
   end
   super
 end
 
 #--------------------------------------------------------------------------
 # in_party?
 #--------------------------------------------------------------------------
 def in_party?(actor)
   return $game_party.battle_members.include?(actor)
 end
 
 #--------------------------------------------------------------------------
 # enable_cancel?
 #--------------------------------------------------------------------------
 def enable_cancel?
   return false if $game_party.battle_members.size <= 0
   for actor in $game_party.all_members
     next if in_party?(actor)
     return false if actor.required
     return false if actor.locked
   end
   return true
 end
 
end # Window_PartyMenuCommand

#==============================================================================
# ■ Window_PartySelect
#==============================================================================

class Window_PartySelect < Window_Selectable
 
 #--------------------------------------------------------------------------
 # initialize
 #-------------------------------------------------------------------------
 def initialize(command_window)
   @command_window = command_window
   super(160, 0, window_width, fitting_height(visible_line_number))
   select(0)
   deactivate
   refresh
 end
 
 #--------------------------------------------------------------------------
 # col_max
 #--------------------------------------------------------------------------
 def col_max; return $game_party.max_battle_members; end
 
 #--------------------------------------------------------------------------
 # item_max
 #--------------------------------------------------------------------------
 def item_max; return $game_party.max_battle_members; end
 
 #--------------------------------------------------------------------------
 # window_width
 #--------------------------------------------------------------------------
 def window_width; return Graphics.width - 160; end
 
 #--------------------------------------------------------------------------
 # visible_line_number
 #--------------------------------------------------------------------------
 def visible_line_number; 4; end
 
 #--------------------------------------------------------------------------
 # item_rect
 #--------------------------------------------------------------------------
 def item_rect(index)
   rect = Rect.new
   rect.width = contents.width / item_max
   rect.height = contents.height
   rect.x = index * rect.width
   rect.y = 0
   return rect
 end
 
 #--------------------------------------------------------------------------
 # refresh
 #--------------------------------------------------------------------------
 def refresh
   make_item_list
   create_contents
   draw_all_items
 end
 
 #--------------------------------------------------------------------------
 # make_item_list
 #--------------------------------------------------------------------------
 def make_item_list
   @data = $game_party.battle_members_array.clone
 end
 
 #--------------------------------------------------------------------------
 # draw_item
 #--------------------------------------------------------------------------
 def draw_item(index)
   actor = $game_actors[@data[index]]
   rect = item_rect(index)
   if actor.nil?
     draw_empty(rect.clone)
     return
   end
   dx = rect.width / 2
   dy = rect.height - 16
   draw_actor_face(actor, rect.x, rect.y) if display_face?
   draw_actor_graphic(actor, rect.x + dx, rect.y + dy) unless display_face?
   draw_actor_name(actor, rect)
   draw_locked_icon(actor, rect)
   draw_required_icon(actor, rect)
 end
 
 #--------------------------------------------------------------------------
 # display_face?
 #--------------------------------------------------------------------------
 def display_face?
   return YEA::PARTY::DISPLAY_FACE
 end
 
 #--------------------------------------------------------------------------
 # draw_empty
 #--------------------------------------------------------------------------
 def draw_empty(rect)
   colour = Color.new(0, 0, 0, translucent_alpha/2)
   rect.x += 2
   rect.y += 2
   rect.width -= 4
   rect.height -= 4
   contents.fill_rect(rect, colour)
   reset_font_settings
   change_color(system_color)
   text = YEA::PARTY::EMPTY_TEXT
   draw_text(rect, text, 1)
   reset_font_settings
 end
 
 #--------------------------------------------------------------------------
 # draw_actor_name
 #--------------------------------------------------------------------------
 def draw_actor_name(actor, rect)
   contents.font.size = YEA::PARTY::PARTY_FONT_SIZE
   change_color(normal_color, actor.exist?)
   draw_text(rect.x+4, rect.y, rect.width-8, line_height, actor.name, 1)
 end
 
 #--------------------------------------------------------------------------
 # draw_face
 #--------------------------------------------------------------------------
 def draw_face(face_name, face_index, dx, dy, enabled = true)
   bitmap = Cache.face(face_name)
   dw = [96, item_rect(0).width-4].min
   rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, dw, 92)
   contents.blt(dx+2, dy+2, bitmap, rect, enabled ? 255 : translucent_alpha)
   bitmap.dispose
 end
 
 #--------------------------------------------------------------------------
 # draw_locked_icon
 #--------------------------------------------------------------------------
 def draw_locked_icon(actor, rect)
   return unless actor_locked?(actor)
   draw_icon(Icon.locked_party, rect.x+rect.width-26, rect.height - 26)
 end
 
 #--------------------------------------------------------------------------
 # draw_required_icon
 #--------------------------------------------------------------------------
 def draw_required_icon(actor, rect)
   return if actor_locked?(actor)
   return unless actor_required?(actor)
   draw_icon(Icon.required_party, rect.x+rect.width-26, rect.height - 26)
 end
 
 #--------------------------------------------------------------------------
 # actor_locked?
 #--------------------------------------------------------------------------
 def actor_locked?(actor); return actor.locked; end
 
 #--------------------------------------------------------------------------
 # actor_required?
 #--------------------------------------------------------------------------
 def actor_required?(actor)
   return false if actor.locked
   return actor.required
 end
 
 #--------------------------------------------------------------------------
 # current_item_enabled?
 #--------------------------------------------------------------------------
 def current_item_enabled?; enable?(@data[index]); end
 
 #--------------------------------------------------------------------------
 # enable?
 #--------------------------------------------------------------------------
 def enable?(item)
   case @command_window.current_symbol
   when :change
     return true if item.nil?
     return true if item == 0
   when :remove
     return false if item.nil?
     return false if item == 0
   end
   actor = $game_actors[item]
   return false if actor.locked
   return false if actor.required
   return true
 end
 
 #--------------------------------------------------------------------------
 # process_handling
 #--------------------------------------------------------------------------
 def process_handling
   return unless open? && active
   return process_ok       if ok_enabled?        && Input.trigger?(:C)
   return process_cancel   if cancel_enabled?    && Input.trigger?(:B)
   return process_pagedown if handle?(:pagedown) && Input.repeat?(:R)
   return process_pageup   if handle?(:pageup)   && Input.repeat?(:L)
 end
 
 #--------------------------------------------------------------------------
 # cur_actor
 #--------------------------------------------------------------------------
 def cur_actor
   actor_id = @data[index]
   return $game_actors[actor_id]
 end
 
 #--------------------------------------------------------------------------
 # prev_actor
 #--------------------------------------------------------------------------
 def prev_actor
   id = index == 0 ? @data.size - 1 : index - 1
   actor_id = @data[id]
   return $game_actors[actor_id]
 end
 
 #--------------------------------------------------------------------------
 # next_actor
 #--------------------------------------------------------------------------
 def next_actor
   id = index == @data.size - 1 ? 0 : index + 1
   actor_id = @data[id]
   return $game_actors[actor_id]
 end
 
 #--------------------------------------------------------------------------
 # process_pageup
 #--------------------------------------------------------------------------
 def process_pageup
   allow = true
   allow = false if !prev_actor.nil? && prev_actor.locked
   allow = false if !cur_actor.nil? && cur_actor.locked
   Sound.play_buzzer unless allow
   if allow
     super
     activate
     select(index == 0 ? @data.size - 1 : index - 1)
   end
 end
 
 #--------------------------------------------------------------------------
 # process_pagedown
 #--------------------------------------------------------------------------
 def process_pagedown
   allow = true
   allow = false if !next_actor.nil? && next_actor.locked
   allow = false if !cur_actor.nil? && cur_actor.locked
   Sound.play_buzzer unless allow
   if allow
     super
     activate
     select(index == @data.size - 1 ? 0 : index + 1)
   end
 end
 
 #--------------------------------------------------------------------------
 # item
 #--------------------------------------------------------------------------
 def item; return @data[index]; end
 
end # Window_PartySelect

#==============================================================================
# ■ Window_PartyList
#==============================================================================

class Window_PartyList < Window_Selectable
 
 #--------------------------------------------------------------------------
 # initialize
 #-------------------------------------------------------------------------
 def initialize(party_window)
   super(0, fitting_height(4), window_width, window_height)
   @party_window = party_window
   select(1)
   deactivate
   refresh
 end
 
 #--------------------------------------------------------------------------
 # window_width
 #--------------------------------------------------------------------------
 def window_width; return 200; end
 
 #--------------------------------------------------------------------------
 # window_height
 #--------------------------------------------------------------------------
 def window_height; return Graphics.height - fitting_height(4); end
 
 #--------------------------------------------------------------------------
 # item_max
 #--------------------------------------------------------------------------
 def item_max; return @data ? @data.size : 1; end
 
 #--------------------------------------------------------------------------
 # refresh
 #--------------------------------------------------------------------------
 def refresh
   make_item_list
   create_contents
   draw_all_items
 end
 
 #--------------------------------------------------------------------------
 # make_item_list
 #--------------------------------------------------------------------------
 def make_item_list
   @data = [0]
   for member in $game_party.all_members
     next if member.nil?
     @data.push(member.id)
   end
   @data.push(0)
 end
 
 #--------------------------------------------------------------------------
 # draw_item
 #--------------------------------------------------------------------------
 def draw_item(index)
   clear_item(index)
   rect = item_rect(index)
   if @data[index] == 0
     draw_remove(rect)
     return
   end
   actor = $game_actors[@data[index]]
   draw_actor(actor, rect)
   draw_actor_locked(actor, rect)
   draw_actor_required(actor, rect)
 end
 
 #--------------------------------------------------------------------------
 # draw_remove
 #--------------------------------------------------------------------------
 def draw_remove(rect)
   reset_font_settings
   draw_icon(Icon.remove_party, rect.x+4, rect.y)
   text = YEA::PARTY::REMOVE_TEXT
   draw_text(rect.x+32, rect.y, rect.width-32, line_height, text)
 end
 
 #--------------------------------------------------------------------------
 # draw_actor
 #--------------------------------------------------------------------------
 def draw_actor(actor, rect)
   buffer = YEA::PARTY::ACTOR_Y_BUFFER
   draw_actor_graphic(actor, rect.x + 16, rect.y + rect.height + buffer)
   text = actor.name
   change_color(list_colour(actor), enabled?(actor))
   draw_text(rect.x+32, rect.y, rect.width-32, line_height, text)
 end
 
 #--------------------------------------------------------------------------
 # list_colour
 #--------------------------------------------------------------------------
 def list_colour(actor)
   return text_color(YEA::PARTY::IN_PARTY_COLOUR) if in_party?(actor)
   return normal_color
 end
 
 #--------------------------------------------------------------------------
 # draw_actor_locked
 #--------------------------------------------------------------------------
 def draw_actor_locked(actor, rect)
   return unless actor.locked
   draw_icon(Icon.locked_party, rect.width-24, rect.y)
 end
 
 #--------------------------------------------------------------------------
 # draw_actor_required
 #--------------------------------------------------------------------------
 def draw_actor_required(actor, rect)
   return if actor.locked
   return unless actor.required
   draw_icon(Icon.required_party, rect.width-24, rect.y)
 end
 
 #--------------------------------------------------------------------------
 # enabled?
 #--------------------------------------------------------------------------
 def enabled?(actor)
   return false if actor.locked
   return false if actor.required && in_party?(actor)
   return actor.exist?
 end
 
 #--------------------------------------------------------------------------
 # in_party?
 #--------------------------------------------------------------------------
 def in_party?(actor); return $game_party.battle_members.include?(actor); end
 
 #--------------------------------------------------------------------------
 # current_item_enabled?
 #--------------------------------------------------------------------------
 def current_item_enabled?
   actor = $game_actors[item]
   replace = $game_actors[@party_window.item]
   unless actor.nil?
     return false if actor.locked && in_party?(actor)
     return false if actor.required && in_party?(actor)
   end
   return true if replace.nil?
   return false if replace.locked
   return false if replace.required
   return true if actor.nil?
   return actor.exist?
 end
 
 #--------------------------------------------------------------------------
 # item
 #--------------------------------------------------------------------------
 def item; return @data[index]; end
 
end # Window_PartyList

#==============================================================================
# ** Window_PartyStatus
#==============================================================================

class Window_PartyStatus < Window_Base
 
 #--------------------------------------------------------------------------
 # initialize
 #--------------------------------------------------------------------------
 def initialize(party_window, list_window)
   super(200, fitting_height(4), window_width, window_height)
   @party_window = party_window
   @list_window = list_window
   @actor = active_actor
   refresh
 end
 
 #--------------------------------------------------------------------------
 # window_width
 #--------------------------------------------------------------------------
 def window_width; Graphics.width - 200; end
 
 #--------------------------------------------------------------------------
 # window_height
 #--------------------------------------------------------------------------
 def window_height; Graphics.height - fitting_height(4); end
 
 #--------------------------------------------------------------------------
 # update
 #--------------------------------------------------------------------------
 def update
   super
   refresh if @actor != active_actor
 end
 
 #--------------------------------------------------------------------------
 # active_actor
 #--------------------------------------------------------------------------
 def active_actor
   if @list_window.active
     actor = @list_window.item
   else
     actor = @party_window.item
   end
   return nil if [0, nil].include?(actor)
   return actor
 end
 
 #--------------------------------------------------------------------------
 # refresh
 #--------------------------------------------------------------------------
 def refresh
   contents.clear
   @actor = active_actor
   reset_font_settings
   if @actor.nil?
     draw_nil_actor
     return
   end
   actor = $game_actors[@actor]
   draw_actor_face(actor, 0, 0)
   draw_actor_name(actor, 108, 0)
   draw_actor_class(actor, 228, 0, contents.width-232)
   draw_actor_level(actor, 108, line_height)
   draw_actor_icons(actor, 228, line_height, contents.width-232)
   draw_actor_hp(actor, 108, line_height*2, contents.width-112)
   draw_actor_mp(actor, 108, line_height*3, contents.width-112)
   draw_actor_parameters(actor, 0, line_height*4 + line_height/2)
   draw_equipments(actor, contents.width/2, line_height*4 + line_height/2)
 end
 
 #--------------------------------------------------------------------------
 # draw_nil_actor
 #--------------------------------------------------------------------------
 def draw_nil_actor
   colour = Color.new(0, 0, 0, translucent_alpha/2)
   rect = Rect.new(0, 0, contents.width, contents.height)
   contents.fill_rect(rect, colour)
   change_color(system_color)
   text = YEA::PARTY::NO_DATA
   draw_text(rect, text, 1)
 end
 
 #--------------------------------------------------------------------------
 # draw_actor_parameters
 #--------------------------------------------------------------------------
 def draw_actor_parameters(actor, dx, dy)
   dw = contents.width/2 - 4
   rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
   contents.font.size = YEA::PARTY::STAT_FONT_SIZE
   colour = Color.new(0, 0, 0, translucent_alpha/2)
   array = [:atk, :def, :mat, :mdf, :agi, :luk]
   cx = 4
   for stat in array
     case stat
     when :atk
       param = Vocab::param(2)
       value = actor.atk.group
     when :def
       param = Vocab::param(3)
       value = actor.def.group
     when :mat
       param = Vocab::param(4)
       value = actor.mat.group
     when :mdf
       param = Vocab::param(5)
       value = actor.mdf.group
     when :agi
       param = Vocab::param(6)
       value = actor.agi.group
     when :luk
       param = Vocab::param(7)
       value = actor.luk.group
     else; next
     end
     contents.fill_rect(rect, colour)
     change_color(system_color)
     draw_text(rect.x + cx, rect.y, rect.width-cx*2, line_height, param, 0)
     change_color(normal_color)
     draw_text(rect.x + cx, rect.y, rect.width-cx*2, line_height, value, 2)
     rect.y += line_height
   end
   reset_font_settings
 end
 
 #--------------------------------------------------------------------------
 # draw_equipments
 #--------------------------------------------------------------------------
 def draw_equipments(actor, dx, dy)
   text = YEA::PARTY::EQUIP_TEXT
   change_color(system_color)
   draw_text(dx, dy, contents.width - dx, line_height, text, 1)
   dy += line_height
   if actor.equips.size <= 5
     actor.equips.each_with_index do |item, i|
       draw_item_name(item, dx, dy + line_height * i)
     end
   else
     orig_x = dx
     actor.equips.each_with_index do |item, i|
       next if item.nil?
       draw_icon(item.icon_index, dx, dy)
       dy += line_height if dx + 48 > contents.width
       dx = dx + 48 > contents.width ? orig_x : dx + 24
     end
   end
 end
 
end # Window_PartyStatus

#==============================================================================
# ■ Scene_Menu
#==============================================================================

class Scene_Menu < Scene_MenuBase
 
 #--------------------------------------------------------------------------
 # overwrite method: command_formation
 #--------------------------------------------------------------------------
 if YEA::PARTY::ENABLE_MENU
 def command_formation
   SceneManager.call(Scene_Party)
 end
 end # YEA::PARTY::ENABLE_MENU
 
end # Scene_Menu

#==============================================================================
# ■ Scene_Party
#==============================================================================

class Scene_Party < Scene_MenuBase
 
 #--------------------------------------------------------------------------
 # start
 #--------------------------------------------------------------------------
 def start
   super
   @former_party = $game_party.battle_members_array.clone
   create_command_window
   create_party_window
   create_list_window
   create_status_window
 end
 
 #--------------------------------------------------------------------------
 # create_command_window
 #--------------------------------------------------------------------------
 def create_command_window
   @command_window = Window_PartyMenuCommand.new(0, 0)
   @command_window.set_handler(:change, method(:adjust_members))
   @command_window.set_handler(:remove, method(:adjust_members))
   @command_window.set_handler(:revert, method(:revert_party))
   @command_window.set_handler(:finish, method(:return_scene))
   @command_window.set_handler(:cancel, method(:return_scene))
 end
 
 #--------------------------------------------------------------------------
 # create_party_window
 #--------------------------------------------------------------------------
 def create_party_window
   @party_window = Window_PartySelect.new(@command_window)
   @party_window.set_handler(:ok,       method(:on_party_ok))
   @party_window.set_handler(:cancel,   method(:on_party_cancel))
   @party_window.set_handler(:pageup,   method(:on_party_pageup))
   @party_window.set_handler(:pagedown, method(:on_party_pagedown))
 end
 
 #--------------------------------------------------------------------------
 # create_list_window
 #--------------------------------------------------------------------------
 def create_list_window
   @list_window = Window_PartyList.new(@party_window)
   @list_window.set_handler(:ok,     method(:on_list_ok))
   @list_window.set_handler(:cancel, method(:on_list_cancel))
 end
 
 #--------------------------------------------------------------------------
 # create_status_window
 #--------------------------------------------------------------------------
 def create_status_window
   @status_window = Window_PartyStatus.new(@party_window, @list_window)
 end
 
 #--------------------------------------------------------------------------
 # adjust_members
 #--------------------------------------------------------------------------
 def adjust_members
   @party_window.activate
 end
 
 #--------------------------------------------------------------------------
 # window_refresh
 #--------------------------------------------------------------------------
 def window_refresh
   $game_party.rearrange_actors
   @command_window.refresh
   @party_window.refresh
   @list_window.refresh
   $game_player.refresh
   $game_map.need_refresh = true
 end
 
 #--------------------------------------------------------------------------
 # revert_party
 #--------------------------------------------------------------------------
 def revert_party
   @command_window.activate
   $game_party.battle_members_array = @former_party.clone
   window_refresh
 end
 
 #--------------------------------------------------------------------------
 # on_party_ok
 #--------------------------------------------------------------------------
 def on_party_ok
   case @command_window.current_symbol
   when :change
     @list_window.activate
   when :remove
     index = @party_window.index
     actor = $game_actors[$game_party.battle_members_array[index]]
     Sound.play_equip
     $game_party.battle_members_array[index] = 0
     window_refresh
     @party_window.activate
   end
 end
 
 #--------------------------------------------------------------------------
 # on_party_cancel
 #--------------------------------------------------------------------------
 def on_party_cancel
   @command_window.activate
 end
 
 #--------------------------------------------------------------------------
 # on_party_pageup
 #--------------------------------------------------------------------------
 def on_party_pageup
   Sound.play_equip
   actor_id1 = @party_window.item
   actor_id2 = @party_window.prev_actor.nil? ? 0 : @party_window.prev_actor.id
   max = @party_window.item_max-1
   index1 = @party_window.index
   index2 = @party_window.index == 0 ? max : index1-1
   $game_party.battle_members_array[index1] = actor_id2
   $game_party.battle_members_array[index2] = actor_id1
   window_refresh
 end
 
 #--------------------------------------------------------------------------
 # on_party_pagedown
 #--------------------------------------------------------------------------
 def on_party_pagedown
   Sound.play_equip
   actor_id1 = @party_window.item
   actor_id2 = @party_window.next_actor.nil? ? 0 : @party_window.next_actor.id
   max = @party_window.item_max-1
   index1 = @party_window.index
   index2 = @party_window.index == max ? 0 : index1+1
   $game_party.battle_members_array[index1] = actor_id2
   $game_party.battle_members_array[index2] = actor_id1
   window_refresh
 end
 
 #--------------------------------------------------------------------------
 # on_list_cancel
 #--------------------------------------------------------------------------
 def on_list_cancel
   @party_window.activate
 end
 
 #--------------------------------------------------------------------------
 # on_list_ok
 #--------------------------------------------------------------------------
 def on_list_ok
   Sound.play_equip
   replace = $game_actors[@party_window.item]
   actor = $game_actors[@list_window.item]
   index1 = @party_window.index
   actor_id1 = actor.nil? ? 0 : actor.id
   if actor.nil?
     $game_party.battle_members_array[index1] = 0
     window_refresh
     @party_window.activate
     return
   end
   actor_id2 = replace.nil? ? 0 : replace.id
   if $game_party.battle_members_array.include?(actor_id1)
     index2 = $game_party.battle_members_array.index(actor_id1)
     $game_party.battle_members_array[index2] = actor_id2
   end
   $game_party.battle_members_array[index1] = actor_id1
   window_refresh
   @party_window.activate
 end
 
end # Scene_Party

#==============================================================================
#
# ▼ End of File
#
#==============================================================================

Cradle90
Iniciado
Iniciado

0/3

Créditos 10

Gracias : 2

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Bleuw el 2015-06-16, 03:01

Por lo que tengo entendido y veo del script (Del primero, el otro no afecta esa parte en particular del sistema de batalla) Si querés algo así, creo sí podrías con el Tankentai, por ejemplo, pero el de Jet, creo que está planeado para 4, pues no veo una opción como para modificar la coordenada de cada personaje individualmente.

Bleuw
Aventurero
Aventurero

0/3

Créditos 1597

Gracias : 101

Volver arriba Ir abajo

Re: Cambiar los personajes de lugar en tankentai

Mensaje por Contenido patrocinado Hoy a las 02:28


Contenido patrocinado


Volver arriba Ir abajo

Ver el tema anterior Ver el tema siguiente Volver arriba


 :: RPG Maker :: Scripts

Permisos de este foro:
No puedes responder a temas en este foro.