Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - jayje

1
I was talking with KK20, with this, but it seemed like it was a bad time to talk then. No big hurry just wanted to get help with this if possible. Here's what the conversation was at that point:

Spoiler: ShowHide

Al CheddahToday at 12:00 AM
say i have a limit on stat boosting items
and once a certain number is reached, the bonuses don't work
pink b0iToday at 12:01 AM
like the pokemon IV items?
Al CheddahToday at 12:02 AM
that might e the best way to explain it, yes
pink b0iToday at 12:02 AM
yeah you're better off going another route
Al CheddahToday at 12:02 AM
i have a CE that just says "You've reached your limit", but I wanna makes sure it doesn't do anything
i see
what would/should i do?
pink b0iToday at 12:03 AM
do you want the item to call a common event?
Al CheddahToday at 12:04 AM
yes
all the stat boster call the same event
that adds 1 to a variale when there used
pink b0iToday at 12:05 AM
how are you determining what item was used
Al CheddahToday at 12:05 AM
i got an item ID catcher from LittleDrago awhile back
that gets the item ID
pink b0iToday at 12:08 AM
and your item use counter is stored in game variables
Al CheddahToday at 12:08 AM
yes
once it reaches a set number it should stop giving a bonus
pink b0iToday at 12:09 AM
then make the item itself add nothing, and do all the stat manipulation in the event
Al CheddahToday at 12:09 AM
okay. how would I go about that?
using the code from earlier?
pink b0iToday at 12:10 AM
conditional branch: if not reached limit
  actor stat+
else
  message "can no longer boost"
  add item back to party
Al CheddahToday at 12:11 AM
ok, but would I wo do that for the item target?
pink b0iToday at 12:12 AM
maybe you can make another variable for Game_Party, like last_item_target
Al CheddahToday at 12:13 AM
in a script call?:thinking:
pink b0iToday at 12:14 AM

class Game_Party
  attr_accessor :last_item_target
end

Al CheddahToday at 12:14 AM
aahhh
in the actual script
ok
pink b0iToday at 12:14 AM

      # If single target
      if @target_window.index >= 0
        # Apply item use effects to target actor
        target = $game_party.actors[@target_window.index]
        $game_party.last_item_target = target
        used = target.item_effect(@item)
      end

Al CheddahToday at 12:15 AM
ok so make last_item_target a variable
like in that code
Al CheddahToday at 12:34 AM
wait i thought we were adding/removing the item effects in the event instead of the item itself?
pink b0iToday at 12:35 AM
i had written code that i have since deleted
you can ignore
thanks again and I hope all is well with all parties involved.
2
I'm using SRD to redo the Battle status display for my game. I got  advice to use Yanfly's Battle core in addition to it to achieve the effect I wanted.

IT WORKED!!


My question now is how do I get the rest of the party to look like the first party member? Any ideas or thoughts would be great! T.I.A.

(PS: The reason for using Yanfly's battle Core was to use a function that related to the party member's positions)
3
I'm not sure if this would go n the forum or not, but I've been thinking about this mechanic for about a month.
Okay. I want to have a battle mechanic where:
1. I can fuse two different party members
2. you can choose which ones
3. you change the one's class of the first party member you chose
4. you remove the second party member you choose
5. after battle the first party member reverts to their original class and the second party member returns back to the party

I've come with ideas to pull off a few of these, but fumble on the rest. any ideas?

I've tried to figure this out on my own with eventing.

4
I didn't know if you had a forum for this site, so I'm late. I am hosting a Game Jam right now. https://itch.io/jam/the-collect-a-friend-game-jam
It's a week in, but I do have over 80s and one submission. If you'd like to join or just peep the situation, pleas stop by!
5
I had gotten permission to use the Easy Party Switcherhttps://forum.chaos-project.com/index.php/topic,116.0.html by Blizzard and got help editting it by KK20(Awesome job BTW :haha:) It works great!

But I have a problem.  :(  :(

I can call the scene with the $scene = Scene_PartySwitcher.new script call and I can close it just fine. The problem is I can't call it again without frezzing, and then closing, my game. I was told it was a "$scene = nil" type of error.

Here is the edited code:
Spoiler: ShowHide

#==============================================================================
# module BlizzCFG
#==============================================================================

module BlizzCFG

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Conficuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # how many party members do you use
  MAX_PARTY = 4
  # set to true to use facesets instead of spritesets
  FACESETS = true
  # allows a party with 0 members
  ALLOW_EMPTY_PARTY = false
  # allows switching the party in battle
  BATTLE_SWITCH = false
  # name of the call command in the party menu in battle
  SWITCH_COMMAND = 'Switch'
  # gives all other characters EXP (specify in %)
  EXP_RESERVE = 50
  # gives "not available" characters EXP (specify in %)
  EXP_NOT_AVAILABLE = 0
  # gives "disabled for party" characters EXP (specify in %)
  EXP_DISABLED_FOR_PARTY = 0
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Conficuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

end

# recognition variable for plug-ins
$easy_party_switcher = 2.51

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor < Game_Battler

  attr_accessor :must_be_in_party
  attr_accessor :disabled_for_party
  attr_accessor :not_available
  attr_accessor :forced_position
 
  alias setup_eps_later setup
  def setup(actor_id)
    setup_eps_later(actor_id)
    @must_be_in_party = @disabled_for_party = @not_available = false
  end 
end

#==============================================================================
# Game_System
#==============================================================================

class Game_System

  attr_accessor :stored_party
  attr_accessor :order_only
  attr_accessor :battle_order_only
  attr_accessor :battle_switch
 
  alias init_eps_later initialize
  def initialize
    init_eps_later
    @order_only = @battle_order_only = false
    @battle_switch = BlizzCFG::BATTLE_SWITCH
  end 
end

#==============================================================================
# Game_Party
#==============================================================================

class Game_Party

  attr_accessor :actors
  attr_accessor :forced_size
 
  def any_forced_position
    return (@actors.any? {|actor| actor != nil && actor.forced_position != nil})
  end 
end

#==============================================================================
# Window_Base
#==============================================================================

class Window_Base

  alias draw_actor_graphic_eps_later draw_actor_graphic
  def draw_actor_graphic(actor, x, y)
    if actor != nil
      classes = [Window_Current]
      if BlizzCFG::FACESETS && !$all_available && classes.include?(self.class)
        draw_actor_face_eps(actor, x, y)
      else
        if classes.include?(self.class)
          bitmap = RPG::Cache.character(actor.character_name,
              actor.character_hue)
          x += bitmap.width / 8 + 24
          y += bitmap.height / 4 + 16
        end
        # this may need changing when using a custom draw_actor_graphic method
        if actor.not_available || actor.must_be_in_party
          bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
          cw = bitmap.width / 4
          ch = bitmap.height / 4
          src_rect = Rect.new(0, 0, cw, ch)
          self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, 128)
        else
          draw_actor_graphic_eps_later(actor, x, y)
        end
      end
    end
  end

  def draw_actor_face_eps(actor, x, y)
    actor_num = actor.class_id
    bitmap = RPG::Cache.picture("face#{actor_num}")
    src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
    stretch_rect = Rect.new(x, y, 72, 72)
    self.contents.stretch_blt(stretch_rect, bitmap, src_rect)
  end
end

#==============================================================================
# Window_BattleResult
#==============================================================================

class Window_BattleResult
 
  attr_reader :exp
 
end

#==============================================================================
# Window_Current
#==============================================================================

class Window_Current < Window_Selectable

  def initialize
    super(240, 60, 76 + 32,
        BlizzCFG::MAX_PARTY > 4 ? 360 : BlizzCFG::MAX_PARTY * 88)
    self.contents = Bitmap.new(width - 32,
        448 + (BlizzCFG::MAX_PARTY - 4) * 120)
    @item_max = BlizzCFG::MAX_PARTY
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    self.contents.font.size = 24
    refresh
    self.active, self.index, self.z = false, -1, 5000
    self.back_opacity = 160
  end
 
  def refresh
    self.contents.clear
    $game_party.actors.each_index {|i|
        if $game_party.actors[i] != nil
          draw_actor_graphic($game_party.actors[i], 4, i * 80 + 4)
#          draw_actor_name($game_party.actors[i], 152, i * 120 - 4)
#          draw_actor_level($game_party.actors[i], 88, i * 120 - 4)
#          draw_actor_hp($game_party.actors[i], 88, i * 120 + 24)
#          draw_actor_sp($game_party.actors[i], 88, i * 120 + 52)
        end}
  end

  def setactor(index_1, index_2)
    $game_party.actors[index_2], $game_party.actors[index_1] =
        $game_party.actors[index_1], $game_party.actors[index_2]
    refresh
  end

  def getactor(index)
    return $game_party.actors[index]
  end
 
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    self.top_row = row if row < self.top_row
    if row > top_row + (page_row_max - 1)
      self.top_row = row - (page_row_max - 1)
    end
    y = (@index / @column_max) * 80 - self.oy
    self.cursor_rect.set(0, y, self.width - 32, 80)
  end

  def clone_cursor
    row = @index / @column_max
    self.top_row = row if row < self.top_row
    if row > top_row + (page_row_max - 1)
      self.top_row = row - (page_row_max - 1)
    end
    y = (@index / @column_max) * 80
    src_rect = Rect.new(0, 0, self.width, 88)
    bitmap = Bitmap.new(self.width-32, 88)
    bitmap.fill_rect(0, 0, self.width-32, 88, Color.new(255, 255, 255, 192))
    bitmap.fill_rect(2, 2, self.width-32, 88, Color.new(255, 255, 255, 80))
    self.contents.blt(0, y, bitmap, src_rect, 192)
  end
 
  def top_row
    return self.oy / 116
  end

  def top_row=(row)
    self.oy = (row % row_max) * 120
  end

  def page_row_max
    return (self.height / 80)
  end
end
=begin
#==============================================================================
# Window_Reserve
#==============================================================================

class Window_Reserve < Window_Selectable
 
  attr_reader :actors
 
  def initialize(scene)
    super(0, 0, 368, 320)
    setup
    @column_max = 3
    rows = @item_max / @column_max
    self.contents = Bitmap.new(width - 32, rows > 3 ? rows * 96 : height - 32)
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    self.contents.font.size = 24
    self.active, self.index, self.z = false, -1, 5000
    refresh
    if scene == Scene_Map && $game_system.order_only ||
        scene == Scene_Battle && $game_system.battle_order_only
      self.opacity = 128
    end
  end
 
  def setup
    @actors = []
    (1...$data_actors.size).each {|i|
        if !$game_party.actors.include?($game_actors[i]) &&
            !$game_actors[i].disabled_for_party || $all_available
          @actors.push($game_actors[i])
        end}
    @item_max = (@actors.size + $game_party.actors.size + 2) / 3 * 3
  end
 
  def refresh
    self.contents.clear
    @actors.each_index {|i|
        draw_actor_graphic(@actors[i], i % 3 * 112 + 16, i / 3 * 96 + 8)}
  end
 
  def getactor(index)
    return @actors[index]
  end
 
  def get_number
    return (@actors.find_all {|actor| actor != nil}).size if $all_available
    return (@actors.find_all {|actor| actor != nil &&
        !actor.not_available}).size
  end
 
  def setactor(index_1, index_2)
    @actors[index_1], @actors[index_2] = @actors[index_2], @actors[index_1]
    refresh
  end

  def setparty(index_1, index_2)
    @actors[index_1], $game_party.actors[index_2] =
        $game_party.actors[index_2], @actors[index_1]
    refresh
  end

  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    self.top_row = row if row < self.top_row
    self.top_row = row - (page_row_max-1) if row > top_row + (page_row_max-1)
    x = (@index % @column_max) * 112 + 8
    y = (@index / @column_max) * 96 - self.oy
    self.cursor_rect.set(x, y, 96, 96)
  end

  def clone_cursor
    row = @index / @column_max
    self.top_row = row if row < self.top_row
    if row > top_row + (page_row_max - 1)
      self.top_row = row - (page_row_max - 1)
    end
    x, y = (@index % @column_max) * 112 + 8, (@index / @column_max) * 96
    src_rect = Rect.new(0, 0, 96, 96)
    bitmap = Bitmap.new(96, 96)
    bitmap.fill_rect(0, 0, 96, 96, Color.new(255, 255, 255, 192))
    bitmap.fill_rect(2, 2, 92, 92, Color.new(255, 255, 255, 80))
    self.contents.blt(x, y, bitmap, src_rect, 192)
  end
 
  def top_row
    return self.oy / 96
  end

  def top_row=(row)
    row = row % row_max
    self.oy = row * 96
  end

  def page_row_max
    return (self.height - 32) / 96
  end
end

#==============================================================================
# Window_HelpStatus
#==============================================================================

class Window_HelpStatus < Window_Base

  def initialize(gotactor, scene)
    super(0, 0, 400 - 32, 160)
    self.contents = Bitmap.new(width - 32, height - 32)
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    self.contents.font.size = 24
    refresh(gotactor)
    self.active, self.z = false, 5000
    if scene == Scene_Map && $game_system.order_only ||
        scene == Scene_Battle && $game_system.battle_order_only
      self.opacity = 128
    end
  end
 
  def refresh(actor)
    self.contents.clear
    if actor != nil
      self.contents.font.color = normal_color
      if actor.not_available && !$all_available
        self.contents.draw_text(8, 0, 160, 32, 'not available', 0)
      end
      draw_actor_graphic(actor, 0, 40)
      draw_actor_name(actor, 160, 32)
      draw_actor_level(actor, 96, 32)
      draw_actor_hp(actor, 96, 64)
      draw_actor_sp(actor, 96, 96)
    end
  end
end
=end
#==============================================================================
# Window_Warning
#==============================================================================

class Window_Warning < Window_Base

  def initialize(mode, members)
    super(0, 0, 320, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    self.contents.font.size = 24
    self.x, self.y, self.z = 320 - width/2, 240 - height/2, 9999
    self.contents.font.color = normal_color
    case mode
    when 0
      self.contents.draw_text(0, 0, 288, 32, 'You need a party', 1)
      num = members + $game_party.actors.nitems
      if $game_party.forced_size != nil && $game_party.forced_size < num
        num = $game_party.forced_size
      end
      self.contents.draw_text(0, 32, 288, 32, "of #{num} members!", 1)
    when 1
      self.contents.draw_text(0, 0, 288, 32, 'You cannot remove', 1)
      self.contents.draw_text(0, 32, 288, 32, 'the last party member!', 1)
    when 2
      self.contents.draw_text(0, 0, 288, 32, 'At least one member', 1)
      self.contents.draw_text(0, 32, 288, 32, 'has to be alive!', 1)
    end
  end
end

#==============================================================================
# Window_PartyCommand
#==============================================================================

class Window_PartyCommand
 
  alias init_eps_later initialize
  def initialize
    if $game_system.battle_switch
      if defined?(SDK) && self.is_a?(Window_HorizCommand)
        s1 = SDK::Scene_Commands::Scene_Battle::Fight
        s2 = SDK::Scene_Commands::Scene_Battle::Escape
        s3 = BlizzCFG::SWITCH_COMMAND
        super(640, [s1, s2, s3])
        disable_item(1) if !$game_temp.battle_can_escape
      else
        super(0, 0, 640, 64)
        self.contents = Bitmap.new(width - 32, height - 32)
        @commands = ['Fight', 'Escape', BlizzCFG::SWITCH_COMMAND]
        @item_max = @column_max = 3
        draw_item(0, normal_color)
        draw_item(1, $game_temp.battle_can_escape ?
            normal_color : disabled_color)
        draw_item(2, normal_color)
      end
      self.active, self.visible, self.index = false, false, 0
      self.back_opacity = 160
    else
      init_eps_later
    end
  end
 
  alias draw_item_eps_later draw_item
  def draw_item(index, color)
    if $game_system.battle_switch
      self.contents.font.color = color
      rect = Rect.new(80 + index * 160 + 4, 0, 128 - 10, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      self.contents.draw_text(rect, @commands[index], 1)
    else
      draw_item_eps_later(index, color)
    end
  end
 
  alias update_cursor_rect_eps_later update_cursor_rect
  def update_cursor_rect
    if $game_system.battle_switch
      self.cursor_rect.set(80 + index * 160, 0, 128, 32)
    else
      update_cursor_rect_eps_later
    end
  end
 
  def command(index = self.index)
    return @commands[index]
  end 
end

#==============================================================================
# Scene_PartySwitcher
#==============================================================================

class Scene_PartySwitcher
 
  def initialize(wipe_party = 0, reset = 0, store = 0)
    @wipe_party, @reset, @store = wipe_party, reset, store
    @current_window_temp = @reserve_window_temp = 0
    @scene_flag, @temp_window = false, ''
    @scene = $scene.class
  end
 
  def main
    if @store != 0
      swap_parties
      $scene = Scene_Map.new
      $game_player.refresh
      return
    end
    case @wipe_party
    when 1 then setup_forced_party
    when 2 then wipe_party
    when 3
      $game_system.stored_party = $game_party.actors
      wipe_party
    when 10 then $all_available = true
    end
    if @reset == 1
      (1...$data_actors.size).each {|i| $game_actors[i].not_available = false}
    end
    @current_window = Window_Current.new
    @current_window.index, @current_window.active = 0, true
    @spriteset = Spriteset_Map.new
    #@reserve_window = Window_Reserve.new(@scene)
    #@reserve_window.x, @reserve_window.y = 272, 160
    #@help_window = Window_HelpStatus.new(@reserve_window.getactor(0), @scene)
    #@help_window.x = 240 + 32
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      break if $scene != self
    end
    Graphics.freeze
    @current_window.dispose
    $game_party.actors.compact!
    $game_player.refresh
    $all_available = false
  end
 
  def update
#begin
#    check = @reserve_window.index
#    if @reserve_window.active
#      reserve_update
#      @reserve_window.update
#    end
#    if check != @reserve_window.index
#      if @reserve_window.active
#        actor = @reserve_window.getactor(@reserve_window.index)
#      elsif @current_window.active
#        actor = @reserve_window.getactor(@reserve_window_temp)
#      end
#      @help_window.refresh(actor) if ['', 'Current'].include?(@temp_window)
#    end
#end
    current_update if @current_window.active
    if Input.trigger?(Input::B)
      if @scene_flag
        $game_system.se_play($data_system.cancel_se)
        @scene_flag, @temp_window = false, ''
        @current_window.refresh
        return
      end
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    end
  end
   
  def current_update
    @current_window.update
    if Input.trigger?(Input::C)
      actor = @current_window.getactor(@current_window.index)
      if actor != nil && actor.forced_position != nil
        $game_system.se_play($data_system.buzzer_se)
      else
        if @scene_flag
          switch_members
        else
          $game_system.se_play($data_system.decision_se)
          @scene_flag, @temp_window = true, 'Current'
          @temp_actor_index = @current_window.index
          @current_window.clone_cursor
        end
      end
#begin
#    elsif Input.trigger?(Input::RIGHT)
#      if @scene == Scene_Map && $game_system.order_only ||
#          @scene == Scene_Battle && $game_system.battle_order_only
#        $game_system.se_play($data_system.buzzer_se)
#      else
#        $game_system.se_play($data_system.cursor_se)
#        @current_window.active = false
#        @reserve_window.active = true
#       @current_window_temp = @current_window.index
#        actor = @reserve_window.getactor(@reserve_window_temp)
#        @current_window.index = -1
#        @reserve_window.index = @reserve_window_temp
#       @help_window.refresh(actor) if !@scene_flag
#      end
#    end
    end
  end
#begin 
#  def reserve_update
#    if Input.trigger?(Input::C)
#      if @scene_flag
#        switch_members
#      else
#        $game_system.se_play($data_system.decision_se)
#        @scene_flag, @temp_window = true, 'Reserve'
#        @temp_actor_index = @reserve_window.index
#        @reserve_window.clone_cursor
#      end
#    elsif @reserve_window.index % 3 == 0 && Input.repeat?(Input::LEFT)
#     $game_system.se_play($data_system.cursor_se)
#      @reserve_window.active = false
#      @current_window.active = true
#      @reserve_window_temp = @reserve_window.index
#      @reserve_window.index = -1
#      @current_window.index = @current_window_temp
#    end
#  end
#end 
  def switch_members
    if @temp_window == 'Current' && @current_window.active
      @current_window.setactor(@temp_actor_index, @current_window.index)
    end
    $game_system.se_play($data_system.decision_se)
    @scene_flag, @temp_window = false, ''
  end
   
  def wipe_party
    $game_party.actors.each {|actor| actor.not_available = true if actor != nil}
    setup_forced_party(true)
    if $game_party.actors == []
      (1...$data_actors.size).each {|i|
          if !$game_actors[i].not_available ||
              $game_actors[i].disabled_for_party
            $game_party.actors.push($game_actors[i])
            return
          end}
    end
  end
 
  def setup_forced_party(flag = false)
    $game_party.actors, party = [], []
    (1...$data_actors.size).each {|i|
        if $game_actors[i] != nil && $game_actors[i].must_be_in_party &&
             (!$game_actors[i].disabled_for_party || flag) &&
             !$game_actors[i].not_available
          party.push($game_actors[i])
        end}
    party.clone.each {|actor|
        if actor.forced_position != nil
          $game_party.actors[actor.forced_position] = actor
          party.delete(actor)
        end}
    $game_party.actors.each_index {|i|
        $game_party.actors[i] = party.shift if $game_party.actors[i] == nil}
    $game_party.actors += party.compact
  end 
 
  def swap_parties
    $game_party.actors.compact!
    temp_actors = $game_party.actors
    temp_actors.each {|actor| actor.not_available = true}
    $game_system.stored_party.compact!
    $game_system.stored_party.each {|actor| actor.not_available = false}
    $game_party.actors = $game_system.stored_party
    $game_system.stored_party = (@store == 1 ? temp_actors : nil)
  end
   
end

#==============================================================================
# Scene_Battle
#==============================================================================
 
class Scene_Battle
 
  alias update_phase2_eps_later update_phase2
  def update_phase2
    update_phase2_eps_later
    if Input.trigger?(Input::C) && @party_command_window.index == 2
      $game_system.se_play($data_system.decision_se)
      @spriteset.dispose
      $scene = Scene_PartySwitcher.new
      $scene.main
      $scene = self
      @spriteset = Spriteset_Battle.new
      15.times {@spriteset.update}
      @status_window.refresh
      Graphics.transition(0)
    end
  end
 
  alias start_phase5_eps_later start_phase5
  def start_phase5
    exp = 0
    oldexp = 0
    if $game_party.actors.size > 0
      oldexp = $game_party.actors[0].exp
      start_phase5_eps_later
      exp = $game_party.actors[0].exp - oldexp if $game_party.actors.size > 0
    else
      start_phase5_eps_later
    end
    exp = @result_window.exp if exp == 0 && @result_window != nil
    exp = @exp if exp == 0 && @exp != nil
    if exp > 0
      (1...$data_actors.size).each {|i|
          if !$game_party.actors.include?($game_actors[i])
            if $game_actors[i].not_available
              addexp = exp * BlizzCFG::EXP_NOT_AVAILABLE / 100
            elsif $game_actors[i].disabled_for_party
              addexp = exp * BlizzCFG::EXP_DISABLED_FOR_PARTY / 100
            else
              addexp = exp * BlizzCFG::EXP_RESERVE / 100
            end
            $game_actors[i].exp += addexp
          end}
    end
  end 
end


Any help is appreciated.

6
any way I could script call show a picture based on a variable? IE Show Picture 1 \V[1]?
7
New Projects / RMMV Slime Kingdom (IGMC Entry)
November 30, 2018, 08:56:55 pm

This is a Prototype submission for the IGMC 2018. I stopped progress on my current project, to try my hand at this. Leave me your thoughts, ideas and feedback. T.I.A.

https://itch.io/jam/igmc2018/rate/294024

Story/Plot
A lowly slime barely survives an encounter with an adventurer and limps(?) his way home. He's mad about his lot in life as just a exp grab for some dimwitted noob with a dream. He's tired of the oppression of those wandering brutes and their swords and spells.

He decides to fight back and create a safe place for slimes of all kinds to ooze about their lives. This is his story...

Setting
You know the basic trope. A mob decides to be a hero, after some kind of miraculous event. But THIS time, it's a slime determined to make a safe space for him and his. The world is just like any RPG world with heroes, demon kings, dragons, etc and our gooey little friend has to overcome them all. He'll need some help to avoid being a smear on some adventurer's boot. Can he recruit a strong enough team to accomplish his almost impossible goal?

SLIMES come in many different forms, based on environment/element:
Snots: Poison
Nectars: Healing
Magmas: Fire
Clays: Earth
Rimes: Ice
Mosses: Plant
Custards: Lightning
Gels: Water
Meringues: Air
Slags: Metal

Game Mechanics/Features

Synchronicity/Synergy affects most aspects of the this game. As you gather Party members, growing closer to them helps unlock many great benefits:

Spoiler: ShowHide
-Synergy: When two or more party members have a high enough affinity, they can unleash a Synergy Charge that gives a boost to skills and attacks.

-Synchro Skills (element): party members can gain skills that are a fusion of theirs and another members element.

-Fusions: All slimes can fuse together and with other creatures. (Not in Prototype, yet)

Other Features
-Equippable Talents: Sometimes enemies will give you skills that you can equip them with.

-Expandable Kingdom map: The more members you recruit, the bigger your kingdom grows. (Not available in-game, will add later)

-A unique Storybook-like Art style!

-Side-scrolling Maps: Because THEY'RE COOL!

-Sideview Battle System: Best fit for a game like this, IMHO...


CHARACTERS
These are seen throughout the prototype.
Spoiler: ShowHide

8
Script Troubleshooting / [RMMV] Follower script issues
November 01, 2018, 10:13:26 pm
Hey folks! I got a stumper for ya!!  :^_^\': I found a Follower script that help give ore control over the follower movement. However, it doesn't seem compatible with the latest version of MV. I also want to know if this can work for characters greater than the normal 48x 48 sprite style.

Here's the code

Spoiler: ShowHide
//============================================================================
// Karberus - Simple Follower Control
// SimpleFollowerControl.js
// Version 1.1
// No credit required. Can be used commercially or non commercially
//============================================================================
//============================================================================
var Imported = Imported || {};
Imported.SimpleFollowerOptions = true;

var Karberus = Karberus || {};
Karberus.FollowerOpt = Karberus.FollowerOpt || {};
//============================================================================
//============================================================================
/*:
* @plugindesc v1.1 Allows you simple control over your followers.
* @author Karberus
* @version 1.1
*
*
*
* @param Follower Collision
* @desc Whether events collide with your followers.
* Default: false
* @default false
*
*
*@help This Plugin allows you to have some control over your followers.
*
*After using the Plugin Command to choose which follower to move,
*in an event, use the Set Movement Route: Player command.
*
*By default, your followers will go through walls and such. You must set
*Through OFF in the set move route in order to disable this.
*
*If Through is set to OFF they will automatically skip if cannot move.
*As of now, you can't change their speed or frequency.
*You may only move one follower at a time.
*
*
* //==============================================================================
* //                  Plugin Commands
* //==============================================================================
*
* //Overrides Set Move Route to allow you some control over your followers.
*
* MoveFollower x   //Where x equals: 0 = Player, 1 = First Follower, and so on.
*
* //Stops all follower movement, allowing you to move without them following you.
*
* StopFollowers true/false  //Example: StopFollowers true
*
* //Allows you to show balloon animation on your followers
*
* BalloonFollower x  //Where x equals: 0 = player, 1 = First Follower, and so on.
*
* //==============================================================================
* //==============================================================================
*
*
*/
(function() {

Karberus.Parameters = PluginManager.parameters("SimpleFollowerControl");

Karberus.FollowerOpt.WhichFollower = 0;
Karberus.FollowerOpt.StopFollowers = false;
Karberus.FollowerOpt.FollowerCollision = String(Karberus.Parameters["Follower Collision"]);
Karberus.FollowerOpt.getIDforBalloon = 0;

var Karb_Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;

    Game_Interpreter.prototype.pluginCommand = function(command, args) {
        Karb_Game_Interpreter_pluginCommand.call(this, command, args);
         if (command === "MoveFollower") {
           Karberus.FollowerOpt.WhichFollower = args;
         }
         if (command === "StopFollowers") {
           Karberus.FollowerOpt.StopFollowers = String(args);
         }
         if (command === "BalloonFollower") {
           Karberus.FollowerOpt.getIDforBalloon = args[0];
         }
};

_karb_Game_Interpreter_command213 = Game_Interpreter.prototype.command213;
Game_Interpreter.prototype.command213 = function() {
  if (Karberus.FollowerOpt.getIDforBalloon > 0) {
    this._character = $gamePlayer._followers._data[Karberus.FollowerOpt.getIDforBalloon-1];
    if (this._character) {
        this._character.requestBalloon(this._params[1]);
        if (this._params[2]) {
            this.setWaitMode('balloon');
       }
    }
  }
  else {
    _karb_Game_Interpreter_command213.call(this);
  }
    return true;
};

Game_Player.prototype.isCollided = function(x, y) {
  if (eval(Karberus.FollowerOpt.FollowerCollision) === false) {
    if (this.isThrough()) {
        return false;
    } else {
        return this.pos(x, y);
    }
  }
  else {
    if (this.isThrough()) {
        return false;
    } else {
        return this.pos(x, y) || this._followers.isSomeoneCollided(x, y);
    }
  }
};


Game_Player.prototype.moveStraight = function(d) {
  if (eval(Karberus.FollowerOpt.StopFollowers) === false) {
    if (this.canPass(this.x, this.y, d)) {
        this._followers.updateMove();
    }
  }
    Game_Character.prototype.moveStraight.call(this, d);
};


Game_Followers.prototype.moveFollower = function(follower_direction) {
  this._data[Karberus.FollowerOpt.WhichFollower-1].moveStraight(follower_direction);
};
Game_Followers.prototype.moveDiagonallyFollower = function(follower_direction1, follower_direction2) {
  this._data[Karberus.FollowerOpt.WhichFollower-1].moveDiagonally(follower_direction1, follower_direction2);
};
Game_Followers.prototype.setDirectionFollower = function(follower_direction) {
  this._data[Karberus.FollowerOpt.WhichFollower-1].setDirection(follower_direction);
};
Game_Followers.prototype.jumpFollower = function(params, params) {
  this._data[Karberus.FollowerOpt.WhichFollower-1].jump(params, params);
};
Game_Followers.prototype.turnRight90Follower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].turnRight90();
};
Game_Followers.prototype.turnLeft90Follower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].turnLeft90();
};
Game_Followers.prototype.moveRandomFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].moveRandom();
};
Game_Followers.prototype.moveTowardPlayerFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].moveTowardPlayer();
};
Game_Followers.prototype.moveAwayFromPlayerFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].moveAwayFromPlayer();
};
Game_Followers.prototype.moveForwardFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].moveForward();
};
Game_Followers.prototype.moveBackwardFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].moveBackward();
};
Game_Followers.prototype.setThroughFollower = function(followerSwitch) {
  this._data[Karberus.FollowerOpt.WhichFollower-1].setThrough(followerSwitch);
};
Game_Followers.prototype.turn180Follower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].turn180();
};
Game_Followers.prototype.turnRightOrLeft90Follower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].turnRightOrLeft90();
};
Game_Followers.prototype.turnRandomFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].turnRandom();
};
Game_Followers.prototype.turnTowardPlayerFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].turnTowardPlayer();
};
Game_Followers.prototype.turnAwayFromPlayerFollower = function() {
  this._data[Karberus.FollowerOpt.WhichFollower-1].turnAwayFromPlayer();
};

_Karb_Game_Character_updateRoutineMove = Game_Character.prototype.updateRoutineMove;
Game_Character.prototype.updateRoutineMove = function() {
    if (this._waitCount > 0) {
        this._waitCount--;
    } else {
        this.setMovementSuccess(true);
        var command = this._moveRoute.list[this._moveRouteIndex];
        if (command && Karberus.FollowerOpt.WhichFollower > 0) {
            this.processMoveFollowerCommand(command);
            this.advanceMoveRouteIndex();
        }
        else if (command) {
            _Karb_Game_Character_updateRoutineMove.call(this);
        }
    }
};

Game_Character.prototype.processMoveFollowerCommand = function(command) {
    var gc = Game_Character;
    var params = command.parameters;
    switch (command.code) {
    case gc.ROUTE_END:
        this.processRouteEnd();
        break;
    case gc.ROUTE_MOVE_DOWN:
        this._followers.moveFollower(2);
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_LEFT:
        this._followers.moveFollower(4);
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_RIGHT:
        this._followers.moveFollower(6);
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_UP:
        this._followers.moveFollower(8);
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_LOWER_L:
        this._followers.moveDiagonallyFollower(4,2);
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_LOWER_R:
        this._followers.moveDiagonallyFollower(6,2);
          this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_UPPER_L:
        this._followers.moveDiagonallyFollower(4,8);
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_UPPER_R:
        this._followers.moveDiagonallyFollower(6,8);
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_RANDOM:
        this._followers.moveRandomFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_TOWARD:
        this._followers.moveTowardPlayerFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_AWAY:
        this._followers.moveAwayFromPlayerFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_FORWARD:
        this._followers.moveForwardFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_MOVE_BACKWARD:
        this._followers.moveBackwardFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_JUMP:
        this._followers.jumpFollower(params[0], params[1]);
        this._waitCount = 16;
        break;
    case gc.ROUTE_WAIT:
        this._waitCount = params[0] - 1;
        break;
    case gc.ROUTE_TURN_DOWN:
        this._followers.setDirectionFollower(2);
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_LEFT:
        this._followers.setDirectionFollower(4);
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_RIGHT:
        this._followers.setDirectionFollower(6);
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_UP:
        this._followers.setDirectionFollower(8);
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_90D_R:
        this._followers.turnRight90Follower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_90D_L:
        this._followers.turnLeft90Follower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_180D:
        this._followers.turn180Follower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_90D_R_L:
        this._followers.turnRightOrLeft90Follower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_RANDOM:
        this._followers.turnRandomFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_TOWARD:
        this._followers.turnTowardPlayerFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_TURN_AWAY:
        this._followers.turnAwayFromPlayerFollower();
        this._waitCount = 16;
        break;
    case gc.ROUTE_SWITCH_ON:
        $gameSwitches.setValue(params[0], true);
        break;
    case gc.ROUTE_SWITCH_OFF:
        $gameSwitches.setValue(params[0], false);
        break;
    case gc.ROUTE_CHANGE_SPEED:
        this.setMoveSpeed(params[0]);
        break;
    case gc.ROUTE_CHANGE_FREQ:
        this.setMoveFrequency(params[0]);
        break;
    case gc.ROUTE_WALK_ANIME_ON:
        this.setWalkAnime(true);
        break;
    case gc.ROUTE_WALK_ANIME_OFF:
        this.setWalkAnime(false);
        break;
    case gc.ROUTE_STEP_ANIME_ON:
        this.setStepAnime(true);
        break;
    case gc.ROUTE_STEP_ANIME_OFF:
        this.setStepAnime(false);
        break;
    case gc.ROUTE_DIR_FIX_ON:
        this.setDirectionFix(true);
        break;
    case gc.ROUTE_DIR_FIX_OFF:
        this.setDirectionFix(false);
        break;
    case gc.ROUTE_THROUGH_ON:
        this._followers.setThroughFollower(true);
        break;
    case gc.ROUTE_THROUGH_OFF:
        this._followers.setThroughFollower(false);
        break;
    case gc.ROUTE_TRANSPARENT_ON:
        this.setTransparent(true);
        break;
    case gc.ROUTE_TRANSPARENT_OFF:
        this.setTransparent(false);
        break;
    case gc.ROUTE_CHANGE_IMAGE:
        this.setImage(params[0], params[1]);
        break;
    case gc.ROUTE_CHANGE_OPACITY:
        this.setOpacity(params[0]);
        break;
    case gc.ROUTE_CHANGE_BLEND_MODE:
        this.setBlendMode(params[0]);
        break;
    case gc.ROUTE_PLAY_SE:
        AudioManager.playSe(params[0]);
        break;
    case gc.ROUTE_SCRIPT:
        eval(params[0]);
        break;
    }
};

})();
//============================================================================================
//=======================================END FILE=============================================
//============================================================================================
9
Hi gang!  :)

I'm using LittleDrago's Transparent Menu script, but I have a problem :^_^\':. It seems the script interferes with variable manipulation. By that, I mean it delayed the changing of a variable's value by a few frames. Usually this wouldn't be a problem, but it's slowing down a vital mechanic of my game, which will affect player's enjoyment.

Here's the script:

Spoiler: ShowHide
#==============================================================================
# ** [XP] Drago - Translucent Menu
# Version : 2.00
# Contact : littledrago.blogspot.com / forum.chaos-project.com
#==============================================================================

module Transparency
 
  Scene = [Scene_Menu, Scene_Item, Scene_Skill, Scene_Equip, Scene_Status,
           Scene_Save, Scene_End,  Scene_Shop,  Scene_Name,  Scene_Debug]
           
  No_Pause_Menu = true
           
end

($imported ||= {})[:drg_translucent_menu] = 2.00
#==============================================================================
# ** Object
#------------------------------------------------------------------------------
#  This class is superclass for all class
#==============================================================================
class Object
  #--------------------------------------------------------------------------
  # * self.menu_transparency
  #--------------------------------------------------------------------------
  def self.menu_transparency
    unless method_defined?(:menu_transparency_update)
      send(:alias_method, :menu_transparency_main,   :main)
      send(:alias_method, :menu_transparency_update, :update)
    end
    send(:define_method, :main) do |*args|
      @spriteset = Spriteset_Map.new if $game_map && $game_map.map_id != 0
      @menu_transparency = !@spriteset.nil?
      menu_transparency_main(*args)
      @spriteset && @spriteset.dispose
    end
    send(:define_method, :update) do |*args|
      menu_transparency_update(*args)
      return unless $game_temp
      return unless Transparency::No_Pause_Menu
      return if $game_temp.player_transferring
      return if $game_temp.transition_processing
      message = $game_temp.message_window_showing
      @spriteset   && @spriteset.update
      $game_map    && $game_map.update
      $game_system && $game_system.update
      $game_system && (sys = $game_system.map_interpreter) && sys.update
      $game_screen && $game_screen.update
      $game_temp.message_window_showing = true
      $game_player && $game_player.update
      $game_temp.message_window_showing = message
    end
  end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================
class Window_Base
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias_method :menu_transparency_main, :initialize
  #--------------------------------------------------------------------------
  # * Aliased method: initialize
  #--------------------------------------------------------------------------
  def initialize(*args)
    menu_transparency_main(*args)
    self.opacity = 255 if $scene.instance_variable_get(:@menu_transparency)
  end
end

Transparency::Scene.each {|scene| scene.menu_transparency }


Any fixes welcomed. Thanks for your help.
10
 :^_^\': Hey gang!  :^_^\':

I have this custom menu that shows the Monstructs that you 've created (kinda like a bestiary)
Spoiler: ShowHide


Problem is I this image in the background:
Spoiler: ShowHide


I've been trying to figure out how to do this and i've been failing miserably.

here is the script:
Spoiler: ShowHide
#---------------------------------------------------------
# Ignore this part. It simply tells RMXP to
# stop looping the menu index from bottom to top.
#---------------------------------------------------------
class Window_Command < Window_Selectable
  def set_commands(list)
    if (!list.nil?)
      @commands = list
    end
    refresh
  end
 
  def update
    old_index = (self.index)
    super
    # stop looping
    if (old_index > (self.index) +1) or (old_index < (self.index) -1)
      self.index = old_index
    end
  end
 
end
#---------------------------------------------------------------------#
#     Scene_Monstruct_Menu                                            #
# Changes: menu scrolls to show all the options.                      #
#          new class: Window_Monstruct                                #
#                                                                     #
#  Notes:                                                             #
#  - The tiny arrows are made by me.                                  #
#     copy them into your game's Pictre folder.                       #
#  - you need to edit the methods make_list & get_picture             #
#                                                                     #
#---------------------------------------------------------------------#
class Scene_Monstruct_Menu
 
  def main
    # this line shows the map behind the menu
    # if you erase it, the screen will be black around it.
    @spriteset = Spriteset_Map.new   
    # list of menu commands (monstruct names)
    # scroll down to see what 'make_list' does.
    @manual_background
    @commands = make_list
    # only show 6 names at a time:
    @commands_max = [10,@commands.size].min
    # use the first 6 names as a menu.
    @list = Array.new
    for i in 0...@commands_max
      @list.push(@commands[i])
    end
    # these two variables are used to get the 'real' index in the list.
    # normally, it's simply menu.index but since we're scrolling
    # we must calculate it.
    @list_start = 0
    @start_from = 0
    @end_in = @commands_max
    # command_window is our menu
    @command_window = Window_Command.new(160, @list)
    @command_window.x = 480
    @command_window.index = 0
    @command_window.opacity = 0
    @command_window.back_opacity = 0
    # in rmxp you must draw a picture inside a window
    # I made a new window class for it.
    @pic_window = Window_Monstruct.new
    @pic_window.opacity = 0
    @pic_window.back_opacity = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @pic_window.dispose
    @spriteset.dispose if !@spriteset.nil?       
    if (!@down.nil?) : @down.dispose end
    if (!@up.nil?)  : @up.dispose end
  end
 
  def update
    # Update windows
    @command_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
  end
 
  #-------------------------------------------------------
  # edit below to create the list the way you want it.
  #-------------------------------------------------------
  def make_list
    list = []
    switches = []
    # push all names into the array
    for i in  1401..1556
      switches.push(i)
    end

    for id in switches
      if $game_switches[id]
        k = id-1400
        name = $data_enemies[k].name
        list.push(name)
      end
    end
    #while list.size < 6
      #list.push 'Empty'
    #end
   
    return list
  end
 
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # delete the arrows
      if (!@down.nil?): @down.dispose end
      if (!@up.nil?): @up.dispose end
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      $game_switches[974] = true
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # delete the arrows
      if (@down): @down.dispose end
      if (@up): @up.dispose end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # get menu index
      @list_index = @command_window.index + @start_from
      # get the name of the monstruct we're pointing at
      monstruct = @commands[@list_index]
      # use the new class to show the picture
      @pic_window.draw(monstruct)
      return
    end
    # show an arrow up/ down if there are more options
    update_scroll_arrow
    # making the menu scroll up/down
    index = @command_window.index
    if (Input.trigger?(Input::DOWN))&&(index ==@commands_max-1)
      scroll_down
      return
    end
    if (Input.trigger?(Input::UP))&&(index ==0)
      scroll_up
    end
  end
 
  def scroll_down
    index_fix = 0
    @start_from = @list_start + @commands_max
    @end_in = @start_from + @commands_max
    if (@end_in > @commands.size)
      index_fix = @end_in - @commands.size
      @end_in = @commands.size
      @start_from = @end_in - @commands_max
    end
    @list = Array.new
    for i in (@start_from)...(@end_in)
      @list.push(@commands[i])
    end
    @list_start += @commands_max -1
    @list_start -= index_fix
    @command_window.dispose
    @command_window = Window_Command.new(160, @list)
    @command_window.x = 480
    @command_window.opacity = 0
    @command_window.back_opacity = 0               # new
    @command_window.active = true
    @command_window.index = @commands_max-1
  end
 
  def scroll_up
    index_fix = 0
    @start_from = @list_start - @commands_max-1
    @end_in = @start_from + @commands_max
    if (@start_from<0)
      index_fix = @start_from
      @start_from = 0
      @end_in = @commands_max
    end
    if (@end_in > @commands.size)
      index_fix = @end_in - @commands.size
      @end_in = @commands.size
      @start_from = @end_in - @commands_max
    end
    @list = Array.new
    for i in @start_from...@end_in
      @list.push(@commands[i])
    end
    @list_start = @list_start - @commands_max +1
    @list_start -= index_fix
    @command_window.dispose
    @command_window = Window_Command.new(160, @list)
    @command_window.x = 480
    @command_window.opacity = 0
    @command_window.back_opacity = 0               # new
    @command_window.active = true
    @command_window.index = 0
  end
 
  def show_down_arrow
    @down = Sprite.new
    @down.bitmap = RPG::Cache.picture("arrow_down.png")
    @down.z = 101
    @down.x = 60
    @down.y = 6*32+16
  end

  def show_up_arrow
    @up = Sprite.new
    @up.bitmap = RPG::Cache.picture("arrow_up.png")
    @up.z = 101
    @up.x = 60
    @up.y = 10
  end

  def update_scroll_arrow
    # show an arrow up/ down if there are more options
    index = @command_window.index +@start_from
    commands = @commands.size
    item_max = index + @commands_max
    if (commands >item_max)
     show_down_arrow
    else
      if (@down): @down.dispose end
    end
    item_min= index-@commands_max
    if  (index>@commands_max-1)     
      show_up_arrow
    else
      if (@up): @up.dispose end
    end
  end
 
end

#-------------------------------------------------------
#  This class shows a 400x400 window
#      with a monster picture in it.
#-------------------------------------------------------
class Window_Monstruct < Window_Base
 
  def initialize
    super(21, 16, 640, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
 
 
  #---------------------------------------------
  # edit below to set which picture is shown
  #---------------------------------------------
  def get_picture(name)
    hue = 0
    # name is the name of the monstruct
    # use it to decide which picture to use :
    # case (name)
    # when 'badger'
    #   filename = 'badger_battler.png'
    # when 'unicorn'
    #   filename = 'unicorn2.png'
    # end
    filename = name + " Page.png"
    return RPG::Cache.load_bitmap("Graphics/Manual/",filename, hue)
  end
 
  def draw(name)
    self.contents.clear
    bitmap = get_picture(name)
    cw = bitmap.width
    ch = bitmap.height
    x = 32
    y = 32
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x - 46 / 2, y - 70 / 2, bitmap, src_rect)#x - 46 / 2, y - 70
  end 
end


Any help will def be appreciated. :haha:

EDIT:
"code" tags are much easier to read code from than "quote" tags  :)  - Zer0
11
Projects / Games / [XP]Monstructs: Makers and Mayhem
December 15, 2017, 02:09:13 pm


LINKS

<== Monstructs: Makers and Mayhem of ITCH!

<== Monstructs: Makers and Mayhem of GAMEJOLT!


<== Official Website!

12
I've trying to increase the enemy's HP (I can change the MAXHP) but for some reason when I try to change just HP (ie: $game_troop.enemies[0].hp += 12) nothing happens. Is there something I'm missing?
13
You know that black color in the Menu/Item/Etc windows? What line of code would I find to change that to either an image or just make it so I can see the map when I look at the menu?
14
I'm trying to change THE based on the enemy you fight. one Transition for regular foes and another for boss fights. Any ideas welcome!
15
I wanted to know if there was a way to edit the Skill Window so that it shows just ONE column of skills? All of my heros only have a few skills, so I just want them displayed in one column. Any Ideas?
16
Script Troubleshooting / Got a problem here,
August 10, 2010, 10:50:32 pm
a friend of mine made a script for that gives me a NoMethodError on line # 85
"undefined method `nil?' for #<Sprite:0x3f49298>"

Spoiler: ShowHide
#---------------------------------------------------------
# Ignore this part. It simply tells RMXP to
# stop looping the menu index from bottom to top.
#---------------------------------------------------------
class Window_Command < Window_Selectable

 def set_commands(list)
   if (!list.nil?)
     @commands = list
   end
   refresh
 end
 
 def update
   old_index = (self.index)
   super
   # stop looping
   if (old_index > (self.index) +1) or (old_index < (self.index) -1)
     self.index = old_index
   end
 end
 
end
#---------------------------------------------------------------------#
#     Scene_Monstruct_Menu                                            #
# Changes: menu scrolls to show all the options.                      #
#          new class: Window_Monstruct                                #
#                                                                     #
#  Notes:                                                             #
#  - The tiny arrows are made by me.                                  #
#     copy them into your game's Pictre folder.                       #
#  - you need to edit the methods make_list & get_picture             #
#                                                                     #
#---------------------------------------------------------------------#
class Scene_Monstruct_Menu
 
 def main
   # this line shows the map behind the menu
   # if you erase it, the screen will be black around it.
   @spriteset = Spriteset_Map.new  
   # list of menu commands (monstruct names)
   # scroll down to see what 'make_list' does.
   @commands = make_list
   # only show 6 names at a time:
   @commands_max = [6,@commands.size].min
   # use the first 6 names as a menu.
   @list = Array.new
   for i in 0...@commands_max
     @list.push(@commands[i])
   end
   # these two variables are used to get the 'real' index in the list.
   # normally, it's simply menu.index but since we're scroling
   # we must calculate it.
   @list_start = 0
   @start_from = 0
   @end_in = @commands_max
   # command_window is our menu
   @command_window = Window_Command.new(160, @list)
   @command_window.index = 0
   @command_window.back_opacity = 200
   # in rmxp you must draw a picture inside a window
   # I made a new window class for it.
   @pic_window = Window_Monstruct.new
   @pic_window.opacity = 0
   # Execute transition
   Graphics.transition
   # Main loop
   loop do
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     if $scene != self
       break
     end
   end
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @command_window.dispose
   @spriteset.dispose if !@spriteset.nil?      
   if (!@down.ni?) : @down.dispose end <-----------(like 85)
   if (!@up.nil?)  : @up.dispose end
 end
 
 def update
   # Update windows
   @command_window.update
   # If command window is active: call update_command
   if @command_window.active
     update_command
     return
   end
 end
 
 #-------------------------------------------------------
 # edit below to create the list the way you want it.
 #-------------------------------------------------------
 def make_list
   list = []
   switches = []
   # push all names into the array
   for i in  1401..1553
     switches.push(i)
   end

   for id in switches
     if $game_switches[id]
       k = id-1400
       name = $data_enemies[k].name
       list.push(name)
     end
   end
   #while list.size < 6
     #list.push 'Empty'
   #end
   
   return list
 end
 
 def update_command
   # If B button was pressed
   if Input.trigger?(Input::B)
     # delete the arrows
     if (!@down.nil?): @down.dispose end
     if (!@up.nil?): @up.dispose end
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to map screen
     $scene = Scene_Map.new
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # delete the arrows
     if (@down): @down.dispose end
     if (@up): @up.dispose end
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # get menu index
     @list_index = @command_window.index + @start_from
     # get the name of the monstruct we're pointing at
     monstruct = @commands[@list_index]
     # use the new class to show the picture
     @pic_window.draw(monstruct)
     return
   end
   # show an arrow up/ down if there are more options
   update_scroll_arrow
   # making the menu scroll up/down
   index = @command_window.index
   if (Input.trigger?(Input::DOWN))&&(index ==@commands_max-1)
     scroll_down
     return
   end
   if (Input.trigger?(Input::UP))&&(index ==0)
     scroll_up
   end
 end
 
 def scroll_down
   index_fix = 0
   @start_from = @list_start + @commands_max
   @end_in = @start_from + @commands_max
   if (@end_in > @commands.size)
     index_fix = @end_in - @commands.size
     @end_in = @commands.size
     @start_from = @end_in - @commands_max
   end
   @list = Array.new
   for i in (@start_from)...(@end_in)
     @list.push(@commands[i])
   end
   @list_start += @commands_max -1
   @list_start -= index_fix
   @command_window.dispose
   @command_window = Window_Command.new(160, @list)
   @command_window.back_opacity = 200               # new
   @command_window.active = true
   @command_window.index = @commands_max-1
 end
 
 def scroll_up
   index_fix = 0
   @start_from = @list_start - @commands_max-1
   @end_in = @start_from + @commands_max
   if (@start_from<0)
     index_fix = @start_from
     @start_from = 0
     @end_in = @commands_max
   end
   if (@end_in > @commands.size)
     index_fix = @end_in - @commands.size
     @end_in = @commands.size
     @start_from = @end_in - @commands_max
   end
   @list = Array.new
   for i in @start_from...@end_in
     @list.push(@commands[i])
   end
   @list_start = @list_start - @commands_max +1
   @list_start -= index_fix
   @command_window.dispose
   @command_window = Window_Command.new(160, @list)
   @command_window.back_opacity = 200               # new
   @command_window.active = true
   @command_window.index = 0
 end
 
 def show_down_arrow
   @down = Sprite.new
   @down.bitmap = RPG::Cache.picture("arrow_down.png")
   @down.z = 101
   @down.x = 60
   @down.y = 6*32+16
 end

 def show_up_arrow
   @up = Sprite.new
   @up.bitmap = RPG::Cache.picture("arrow_up.png")
   @up.z = 101
   @up.x = 60
   @up.y = 10
 end

 def update_scroll_arrow
   # show an arrow up/ down if there are more options
   index = @command_window.index +@start_from
   commands = @commands.size
   item_max = index + @commands_max
   if (commands >item_max)
    show_down_arrow
   else
     if (@down): @down.dispose end
   end
   item_min= index-@commands_max
   if  (index>@commands_max-1)      
     show_up_arrow
   else
     if (@up): @up.dispose end
   end
 end
end

#-------------------------------------------------------
#  This class shows a 400x400 window
#      with a monster picture in it.
#-------------------------------------------------------
class Window_Monstruct < Window_Base
 
 def initialize
   super(160, 0, 480, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
 end
 
 #---------------------------------------------
 # edit below to set which picture is shown
 #---------------------------------------------
 def get_picture(name)
   hue = 0
   # name is the name of the monstruct
   # use it to decide which picture to use :
   # case (name)
   # when 'badger'
   #   filename = 'badger_battler.png'
   # when 'unicorn'
   #   filename = 'unicorn2.png'
   # end
   filename = name + " Page.png"
   return RPG::Cache.load_bitmap("Graphics/Manual/",filename, hue)
 end
 
 def draw(name)
   self.contents.clear
   bitmap = get_picture(name)
   cw = bitmap.width
   ch = bitmap.height
   x =  40
   y =  40
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x - 46 / 2, y - 70, bitmap, src_rect)
 end
 
end


any help would be great
17
Script Troubleshooting / [RESOLVED]SHOULD BE EASY
August 09, 2010, 07:39:12 am
I'm looking to change a monster's battler graphic. I'm not transforming it, just change it, i tried using@data_enemies[1].battler_name, but it didn't work. any ideas or did i mess up somewhere?

18
Hey folks! I'm not sure if anyone something similar to this or not, but here goes anyway.

Have you ever wanted to make an enemy drop random items after you beat them WITHOUT;

A. Looking for a script?

B. Requesting a script?

C. Learning to script?

This is how! It's so easy, you wonder why no one thought of this first!

Step 1. Creating an Item Giver(IG) (monster that will be giving the random item).

Go through the standard steps used to make your other enemies. Choose the battler, set the stats, etc. But don't, DO NOT, give it an item. (This will be cover later). make sure to remember the IG's ID

Step 2. The Setup.

Here's where things get interesting. Go to the Monster Group(Troops) tab in the editor, expand the array by one and create a new Troop containing you IG (call it whatever you want). Next, in the Battle Event editor, click the "Trigger" menu. Select where is says "turn" and leave it as is(which is 0 x 0) and set the frequency to "Battle Turn"

Step 3. The System.

Now the easy part. First set up a variable(we'll call it 'treasure') and set it to a random number between 0 and 3. Make four Conditional Branches, one for each number(0-3). The first one you leave blank, you get nothing. The second one is where you'll need to do a bit of light scripting.

Select the Call Script function in your event editor(its the last item on the Page 3) and type in this little code snippet
Code: text
$data_enemies[enemy id].item_id = 

Where it says enemy id, put in the IG's ID and at the right of the equal sign, put in the ID number of the item you want to give(we'll make it '1' for a potion). Repeat this step for the other number branches while changing the item ID's to whatever you choose. Try it out.

And VIOLA! Congratulations, you've just made yourself a monster that gives different items when you beat it.

NOTE: THIS WILL ONLY WORK ONCE PER BATTLE!!! IF YOU HAVE TWO OR MORE OF THE SAME MONSTER IN THE TROOP, YOU WILL ONLY GET TWO OF THE SAME ITEM!!!


The good news is, you can set another monster to give away random items as well. So you can two different monsters give in two different items.

I'll see if I can come up with a way for two of the same monster to give different random items. Unless someone beats me to it.

I have a link to the demo showing how it works. If used, credit would be nice. Any questions feel free to hit me up. Any critiques welcome.

http://www.4shared.com/file/Wc1aBM0H/Random_Item_Drop.html

TTFN
19
New Projects / Monstructs
July 09, 2010, 04:38:52 pm



The Concept


I'm making a game where you create your own monsters and battle them against other creators (or Makers, as they're called). This is a remake of a failed project that I intend to finish it this time. I know this isn't the greatest game but I figured folks would be interested anyway.

The Story

Spoiler: ShowHide
You play the role of Aron/Eryn (more this in Cast), a young orphan living in a cabin in the forest with your grandfather Oron, a world-class Maker.  

While you're away at the Fusion House creating your first Monstruct, your grandfather Oron is approached by three shady characters (2 men and 1 woman)named Johl, Cirt and Vayn. He welcomes them into his and, after a light lunch, asks how he can help them. The leader, Vayn asks if Oron would be willing to share his Maker Formula with them and even offers to pay him handsomely. Oron refuses. As you return home with your new friend, you find him being threatened by the group. You ask your grandpa what's happening; he tells you to run. A battle ensues as Oron keeps them busy while you escape. You run away as an explosion booms behind you blowing you into a tree. You lose consciousness.

Later, a young girl/boy finds you and takes you home. You wake up in a room you don't recognize and find out that you've been brought back to the Fusion House you just came from earlier. The owner says his niece/nephew, Flix found you in the forest passed out two days ago. You ask if your grandpa is there as well and the owner tells you the news that he was found missing, his house a complete ruin. The owner says you can stay with him and Flix, as you mourn your loss.

Later, you and Flin go to your house to find any clues to your grandpa's whereabouts. There you see a figure cloaked in black staring at the wreckage. As you walk closer you hear whispering.


"I'm sorry, old friend. I wasn't there in time to help you..."

He turns around just as you approach and you question him about Oron. He promises to tell you if you have a Monstruct Match with. After the battle, he speaks with you briefly and he leaves; you and Flin continue on your search. A flash catches your attention. Out of the corner of your eye you see a package with a letter with you name on it under a floor board. You open it and you read it. It asks you to meet your grandfather at Sunshine Island Resort.

You fold the note back and get ready to leave, determined to finish what Oron started, no matter what.

Now you embark on a journey to complete your grandfather's work. You'll face may challenges, fierce beasts and see great things that will change you forever--all while creating Monstructs of your own and avoiding the three people who attacked your grandfather.

But who was that man at Oron's house and what was his relationship with him?



The Cast


Spoiler: ShowHide
Aron/Eryn(Hero)

Gender: Male/Female
Caste: Unknown

A young orphan travelling the world trying to finish your grandfather's work. You're also looking for clues as to his whereabouts.

Oron(Missing)

Gender: Male
Caste: Soil

A Master Maker who was creating a masterpiece when he was attacked. He disappears after battling the Malicious Trio

Flix(Friend)

Gender: Female/Male
Caste: Unknown

He/she is a friend of yours ever since you were little. His/her uncle owns the Fusion House you use early in the game. Flix goes off to challenge the Makers at Grand Circle to become Champion.


Johl (Leader of the Malicious Trio)
Gender: Male
Caste: Ember

Cold-hearted and burning with ambition, he destroys anything in his path. No one knows why he wants Oron's new Monstruct designs. But he's going to get them regardless of the cost.



Cirt (Member of the Malicious Trio)
Gender: Male
Caste: [colorteal]Metal[/color]

A quiet man with no real moral compass. He'll follow anyone as long as their goals interests him. Not even his partners know that much about him or his past.


Vayn (Member of the Malicious Trio)
Gender: Female
Caste: Gem
A natural beauty with a penchant for all things glamorous, she brings a lady's touch to the group. Totally in love wth Johl, she'd do anything and everything he says without question.


Stranger(????)
Gender: Male
Caste: Unknown
While you may know nothing about this mysterious man, he seems to know everything about you and you grandfather. Who is he?


The Setting

Spoiler: ShowHide

In the distant past, a young alchemist was working with a formula for water transmutation, accidently mispronounced something and created a living being. Thus was the first Monstruct born and the world was changed forever.

Now alchemy is the power that shapes the world. Many deadly illnesses are cured with a pill and everyday problems are solved with ease. People even move from place to place in an instant. In the midst of it all are the Makers, men and women gifted with the ability to create Monstructs. Some use them for work, some for companionship, others for glory. But everyone knows that these mysterious creatures are apart of their lives.


Castes/Aspects

Spoiler: ShowHide
Each Monstruct is derived from nine Castes split into three Aspects of creation.

Aspect

Element(The vital power of the natural world)


These Monstructs have the strongest Physical Defense.
Soil


These Monstructs have the best Agility.
Breeze


These Monstructs have the strongest Attack.
Ember


These Monstructs have the Most HP.
Tide

Mystic(That mysterious force that guides the hearts of living creatures)


These Monstructs have the highest Intelligence.
Halo


These Monstructs have the greatest SP.
Aura


These Monstructs have the best Evasion.
Shade

Form(Those things used and shaped by the hands of man)


These Monstructs have the strongest Magic Defense.
Gem


These Monstructs have the most Strength.
Metal




The Features


Spoiler: ShowHide
Choose your gender (you have a choice of being a boy or girl)
Minigames
Missions (send your creations on jobs to gain great stuff ALA FFTA)
Tournaments (Challenge other Makers to be the best!)
Monstruct Creation (the coolest part of the game XD)
Battle Tile System (turn the tide of battle with a flip of a tile)
Enhancement/Synergy System (transform your creations with items or fuse them to make an even stronger one)
Side Quests
Active Day and Night System(certain events occur depending on the time of day)


Gameplay

The game will be broken up into 9 - 10 chapters, each with a mini-boss and a boss to complete it. Along with puzzles to solve as well.

Pictures

Spoiler: ShowHide

The Fuse house, where Makers create Monstructs.


While you're away, The Malicious Trio make you grandpa an offer he shouldn't refuse.


After you escape the Trio, an old friend finds you passed out in the forest.


While looking for clues, you see a strange man snooping around the ruins of your home.

Some Monstructs












Well that should do for now. I'll post pics of more Monstructs and other stuff later, if folks are interested. Any questions or comments are welcomed. Thanks :D
20
Recruitment / A proposition...
June 22, 2010, 09:55:13 pm
 have this idea for a PvP system that can be made for RMXP. i have the event system pretty much all worked out in my head(see below).

This is a rough mock up of the general idea of the system(OPPONENT will be used to identify the other computer your connected to):



(Event side)

Setting variables for Your enemy party's stats and the OPPONENT's hero party(i.e. variable[enemyhp] = to variable[opp.herohp])

Adjusting OPPONENT's hero party stat to reflect those inflicted on Your enemies.

A variable for keeping score.

A set of switches for whatever various battle events that may be included.


(Scripting side)

Changing your enemy party's skill to those of the OPPONENT's hero party's skill sets(this includes when the OPPONENT chooses a skil[ie 'Heal'] your enemy uses said skill)

Ability to quit battle (via the 'Run' command in the party)

what i'm looking for a scripter parther to work on this WITH(operative word) me not FOR me. someone who wil connect with me and knock out the kinks of the system to make it as perfect as possible.

yes i know the blizzard made a script that can do something similar to this but i'm looking for something a bit more simplistic.
i found a version of Netplay we could use. but if there is a better system of connection the let me know.

NOTE: this will be a COLLABORATIVE effort on both our parts with full credit given. I'd really like to get the help of a dedicated scripter for this, so if your serious about making something pretty effin cool, please reply.
21
what i need is a simpler version of the party switcher where you just switch the party members around with their facesets and that's it. no reserved members or any other stuff.

meaning i just want to change party positiions with their faces and that's all.

here's the code
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Easy Party Switcher by Blizzard
# Version 2.43b
# Type: Party Changing System
# Date: 21.05.2006
# Date v1.1: 25.05.2006
# Date v1.2b: 27.05.2006
# Date v1.5b: 3.11.2006
# Date v1.51b: 29.11.2006
# Date v1.52b: 6.12.2006
# Date v1.7b: 23.2.2007
# Date v1.8b: 30.4.2007
# Date v2.0b: 7.8.2007
# Date v2.1b: 24.8.2007
# Date v2.11b: 24.9.2007
# Date v2.3b: 26.1.2008
# Date v2.32b: 28.1.2008
# Date v2.4b: 29.1.2008
# Date v2.41b: 6.8.2008
# Date v2.42b: 14.10.2008
# Date v2.43b: 20.10.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This work is protected by the following license:
# #----------------------------------------------------------------------------
# #
# # Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# # ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# #
# # You are free:
# #
# # to Share - to copy, distribute and transmit the work
# # to Remix - to adapt the work
# #
# # Under the following conditions:
# #
# # Attribution. You must attribute the work in the manner specified by the
# # author or licensor (but not in any way that suggests that they endorse you
# # or your use of the work).
# #
# # Noncommercial. You may not use this work for commercial purposes.
# #
# # Share alike. If you alter, transform, or build upon this work, you may
# # distribute the resulting work only under the same or similar license to
# # this one.
# #
# # - For any reuse or distribution, you must make clear to others the license
# # terms of this work. The best way to do this is with a link to this web
# # page.
# #
# # - Any of the above conditions can be waived if you get permission from the
# # copyright holder.
# #
# # - Nothing in this license impairs or restricts the author's moral rights.
# #
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Special Thanks to:
#
# Zeriab for pointing out a few glitches and shortening the code in an
# earlier version. =D
#
#
# IMPORTANT NOTE:
#
# Be sure to set the MAX_PARTY to the maximum size of your party. There is
# already a preconfiguration of 4.
#
#
# Compatibility:
#
# 98% compatible with SDK v1.x. 90% compatible with SDK 2.x. Can cause
# incompatibility issued with other Party Change Systems. Can cause problems
# with CBS-es if you use the battle switch feature. WILL corrupt your old
# savegames.
#
#
# Features:
#
# - set party members for "not _available" (shown transparent in the reserve)
# - remove party members from the reserve list ("disabled_for_party")
# - set party members, who MUST be in the party (shown transparent in the
# current party, "must_be_in_party")
# - set up forced positions for party members
# - set up forced party size
# - option either to wipe the party (for multi-party use) or only remove
# every member (except 1) from the party.
# - easy to use and easy to switch party members
# - also supports small parties (2 or 3 members) and large parties (5 or
# more)
# - uses facesets optionally
#
# v1.5b:
# - better, shorter and more efficient code (less memory use, less CPU use)
# - fixed potential bugs
#
# v1.7b:
# - improved coding
# - facesets now optional
# - no extra bitmap files needed anymore
# - works now with Tons of Add-ons
#
# v1.8b:
# - added "forced position"
# - added "forced party size"
#
# v2.0b:
# - fixed the bug where you could empty the party... again...
# - fixed the bug that appeared when you pressed SHIFT
# - added option to allow an empty party
# - added "EXP for party members in reserve" option
# - made the forced_size for party work more convenient
# - improved coding
# - slightly decreased lag
#
# v2.1b:
# - fixed a bug
# - improved coding
# - rewritten conditions using classic syntax to avoid RGSS conditioning bug
# - now can serve as enhancement for CP Debug System
#
# v2.11b:
# - improved coding and performance
#
# v2.3b:
# - optional feature to call the Party Switcher during battle
#
# v2.32b:
# - fixed crash problem with SDK 2.x when using the BATTLE_SWITCH option
# - fixed SP display glitch when using BARS from Tons of Add-ons
#
# v2.4b:
# - now you can activate party order change only in the party switcher
# - add option for automatic party order change only in battle
#
# v2.41b:
# - fixed problem where you could put together a party where everybody is
# dead
#
# v2.42b:
# - added possibility to change the BATTLE_SWITCH setting during the game
#
# v2.43b:
# - fixed a problem with SDK 2.x
#
#
# How to use:
#
# To call this script, make a "Call script" command in an event.
#
# 1. Syntax: $scene = Scene_PartySwitcher.new
# No extra feature will be applied and you can switch the party as you
# wish.
#
# 2. Syntax: $scene = Scene_PartySwitcher.new(XXX)
# You can replace XXX for 1 to remove all party members except one (either
# one, who must be in the party or a random one), or replace XXX with 2,
# to cause a wipe party. Wiping a party will disable the of the current
# members and a NEW party of the remaining members must be formed. If you
# replace it with 3, the current party configuration will be stored for a
# later fast switch-back. If XXX is 10, all actors will be available for
# party switching no matter if the are "not_available" or
# "disabled_for_party". This feature if used by the CP Debug System. No
# faceset will be used in this case for a more convenient working.
#
# 3. Syntax: $scene = Scene_PartySwitcher.new(XXX, 1)
# You can use the XXX as described above or just set it to 0 to disable
# it. Also the "1" in the syntax will reset any disabled_for_party and is
# made to be used after multi-party use.
#
# 4. Syntax: $scene = Scene_PartySwitcher.new(XXX, YYY, ZZZ)
# You can replace ZZZ with 1 to replace the party with a stored one AND
# store the current or replace it with 2 to replace the party with a
# stored one, but without storing the current. USE THIS ONLY IF YOU ASSUME
# TO HAVE A STORED PARTY READY! You can simply test if there is a store
# party by putting this code into the conditional branch script:
#
# $game_system.stored_party != nil
#
# This syntax will not open the Party Switcher and it will override the
# commands XXX and YYY, so you can replace these with any number.
#
# 5. To activate/deactivate the option of order change only, simply use the
# event command "Call Script" with following syntax:
#
# $game_system.order_only = true/false
#
# If the setting is set to true, the switcher will allow only party order
# change. The same goes for battle change (if you are using the
# BATTLE_SWITCH option), but the syntax is different:
#
# $game_system.battle_order_only = true/false
#
# The BATTLE_SWITCH option can be changed during the game by using
# following syntax:
#
# $game_system.battle_switch = true/false
#
# This option is intially set to the same setting as BATTLE_SWITCH is.
#
# Character faces go into the "Characters" folder and they have the same name
# as the character spritesets have with _face added
#
# Example:
#
# sprite - Marlen.png
# face - Marlen_face.png
#
# Other syntaxes:
# $game_actors[ID].not_available = true/false
# $game_actors[ID].disabled_for_party = true/false
# $game_actors[ID].must_be_in_party = true/false
# $game_actors[ID].forced_position = nil/0/1/2/...
# OR
# $game_party.actors[POS].not_available = true/false
# $game_party.actors[POS].disabled_for_party = true/false
# $game_party.actors[POS].must_be_in_party = true/false
# $game_party.actors[POS].forced_position = nil/0/1/2/...
#
# ID - the actor's ID in the database
# POS - the actor's position in the party (STARTS FROM 0, not 1!)
#
# not_available
# - will disable the possibility of an already unlocked character to be in
# the current party
#
# disabled_for_party
# - will cause the character NOT to appear in the party switch screen at all
#
# must_be_in_party
# - will cause the character to be automatically moved into the current party
# and he also cannot be put in the reserve
#
# forced_position
# - will enforce the player to be at a specific position in the party, set
# this value to nil to disable this feature, use it in combination with
# must_be_in_party and $game_party.forced_size or you might experience
# bugs,
#
# $game_party.forced_size = nil/0/1/2/...
#
# Using this syntax will enforce a specific party size. The EPS won't exit
# until this size is filled up or there are no more in the reserve. EPS will
# automatically "correct" this number if there are not enough characters in
# the reserve to fill up a party of forced_size. Set this value to nil to
# disable the size requirement. Note that the actor DO NOT HAVE TO be set in
# normal order without any empty position like in version 1.x.
#
#
# Additional note:
#
# For your own sake, do not apply the attribute "must_be_in_party" to a
# character at the same time with "not_available" or "disabled_for_party" as
# this WILL disrupt your party and party switch system. Use "forced_position"
# together with "must_be_in_party" to avoid bugs. Be careful when using
# "forced_position" with "$game_party.forced_size". Add actors at the very
# end to be sure the player can't put others after them if the "forced_size"
# is smaller than the maximum party size.
#
#
# If you find any bugs, please report them here:
# http://www.chaosproject.co.nr
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#==============================================================================
# module BlizzCFG
#==============================================================================

module BlizzCFG

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Conficuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# how many party members do you use
MAX_PARTY = 4
# set to true to use facesets instead of spritesets
FACESETS = false
# allows a party with 0 members
ALLOW_EMPTY_PARTY = false
# allows switching the party in battle
BATTLE_SWITCH = false
# name of the call command in the party menu in battle
SWITCH_COMMAND = 'Switch'
# gives all other characters EXP (specify in %)
EXP_RESERVE = 10
# gives "not available" characters EXP (specify in %)
EXP_NOT_AVAILABLE = 0
# gives "disabled for party" characters EXP (specify in %)
EXP_DISABLED_FOR_PARTY = 0
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Conficuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

end

# recognition variable for plug-ins
$easy_party_switcher = 2.43

#==============================================================================
# Game_Actor
#==============================================================================

class Game_Actor < Game_Battler

attr_accessor :must_be_in_party
attr_accessor :disabled_for_party
attr_accessor :not_available
attr_accessor :forced_position

alias setup_eps_later setup
def setup(actor_id)
setup_eps_later(actor_id)
@must_be_in_party = @disabled_for_party = @not_available = false
end

end

#==============================================================================
# Game_System
#==============================================================================

class Game_System

attr_accessor :stored_party
attr_accessor :order_only
attr_accessor :battle_order_only
attr_accessor :battle_switch

alias init_eps_later initialize
def initialize
init_eps_later
@order_only = @battle_order_only = false
@battle_switch = BlizzCFG::BATTLE_SWITCH
end

end

#==============================================================================
# Game_Party
#==============================================================================

class Game_Party

attr_accessor :actors
attr_accessor :forced_size

def any_forced_position
return (@actors.any? {|actor| actor != nil && actor.forced_position != nil})
end

end

#==============================================================================
# Window_Base
#==============================================================================

class Window_Base

alias draw_actor_graphic_eps_later draw_actor_graphic
def draw_actor_graphic(actor, x, y)
if actor != nil && actor.character_name != ''
classes = [Window_Current, Window_Reserve, Window_HelpStatus]
if BlizzCFG::FACESETS && !$all_available && classes.include?(self.class)
draw_actor_face_eps(actor, x, y)
else
if classes.include?(self.class)
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
x += bitmap.width / 8 + 24
y += bitmap.height / 4 + 16
end
draw_actor_graphic_eps_later(actor, x, y)
end
end
end

def draw_actor_face_eps(actor, x, y)
if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE
hue = 0
else
hue = actor.character_hue
end
bitmap = RPG::Cache.character("#{actor.character_name}_face", hue)
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
if actor.not_available || actor.must_be_in_party
self.contents.blt(x, y, bitmap, src_rect, 128)
else
self.contents.blt(x, y, bitmap, src_rect)
end
end

end

#==============================================================================
# Window_BattleResult
#==============================================================================

class Window_BattleResult

attr_reader :exp

end

#==============================================================================
# Window_Current
#==============================================================================

class Window_Current < Window_Selectable

def initialize
super(0, 0, 240 + 32, (BlizzCFG::MAX_PARTY > 4 ? 480 : BlizzCFG::MAX_PARTY * 120))
self.contents = Bitmap.new(width - 32, 448 + (BlizzCFG::MAX_PARTY-4) * 120)
@item_max = BlizzCFG::MAX_PARTY
if $fontface != nil
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
end
self.contents.font.size = 24
refresh
self.active, self.index, self.z = false, -1, 5000
end

def refresh
self.contents.clear
$game_party.actors.each_index {|i|
if $game_party.actors[i] != nil
draw_actor_graphic($game_party.actors[i], 4, i*120+4)
draw_actor_name($game_party.actors[i], 152, i*120-4)
draw_actor_level($game_party.actors[i], 88, i*120-4)
draw_actor_hp($game_party.actors[i], 88, i*120+24)
draw_actor_sp($game_party.actors[i], 88, i*120+52)
end}
end

def setactor(index_1, index_2)
$game_party.actors[index_2], $game_party.actors[index_1] =
$game_party.actors[index_1], $game_party.actors[index_2]
refresh
end

def getactor(index)
return $game_party.actors[index]
end

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
self.top_row = row if row < self.top_row
self.top_row = row - (page_row_max - 1) if row > top_row + (page_row_max - 1)
y = (@index / @column_max) * 120 - self.oy
self.cursor_rect.set(0, y, self.width - 32, 88)
end

def clone_cursor
row = @index / @column_max
self.top_row = row if row < self.top_row
self.top_row = row - (page_row_max - 1) if row > top_row + (page_row_max - 1)
y = (@index / @column_max) * 120
src_rect = Rect.new(0, 0, self.width, 88)
bitmap = Bitmap.new(self.width-32, 88)
bitmap.fill_rect(0, 0, self.width-32, 88, Color.new(255, 255, 255, 192))
bitmap.fill_rect(2, 2, self.width-36, 84, Color.new(255, 255, 255, 80))
self.contents.blt(0, y, bitmap, src_rect, 192)
end

def top_row
return self.oy / 116
end

def top_row=(row)
self.oy = (row % row_max) * 120
end

def page_row_max
return (self.height / 120)
end

end

#==============================================================================
# Window_Reserve
#==============================================================================

class Window_Reserve < Window_Selectable

attr_reader :actors

def initialize(scene)
super(0, 0, 368, 320)
setup
@column_max, rows = 3, @item_max / @column_max
self.contents = Bitmap.new(width - 32, (rows >= 3 ? rows * 96 : height - 32))
if $fontface != nil
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
end
self.contents.font.size = 24
self.active, self.index, self.z = false, -1, 5000
refresh
if scene == Scene_Map && $game_system.order_only ||
scene == Scene_Battle && $game_system.battle_order_only
self.opacity = 128
end
end

def setup
@actors = []
(1...$data_actors.size).each {|i|
unless $game_party.actors.include?($game_actors[i]) ||
$game_actors[i].disabled_for_party && !$all_available
@actors.push($game_actors[i])
end}
@item_max = (@actors.size + $game_party.actors.size + 3) / 3 * 3
end

def refresh
self.contents.clear
@actors.each_index {|i| draw_actor_graphic(@actors[i], i%3*112+16, i/3*96+8)}
end

def getactor(index)
return @actors[index]
end

def get_number
return (@actors.find_all {|actor| actor != nil}).size if $all_available
return (@actors.find_all {|actor| actor != nil && !actor.not_available}).size
end

def setactor(index_1, index_2)
@actors[index_1], @actors[index_2] = @actors[index_2], @actors[index_1]
refresh
end

def setparty(index_1, index_2)
@actors[index_1], $game_party.actors[index_2] =
$game_party.actors[index_2], @actors[index_1]
refresh
end

def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
self.top_row = row if row < self.top_row
self.top_row = row - (page_row_max-1) if row > top_row + (page_row_max-1)
x, y = (@index % @column_max)*112 + 8, (@index / @column_max)*96 - self.oy
self.cursor_rect.set(x, y, 96, 96)
end

def clone_cursor
row = @index / @column_max
self.top_row = row if row < self.top_row
self.top_row = row - (page_row_max - 1) if row > top_row + (page_row_max - 1)
x, y = (@index % @column_max) * 112 + 8, (@index / @column_max) * 96
src_rect = Rect.new(0, 0, 96, 96)
bitmap = Bitmap.new(96, 96)
bitmap.fill_rect(0, 0, 96, 96, Color.new(255, 255, 255, 192))
bitmap.fill_rect(2, 2, 92, 92, Color.new(255, 255, 255, 80))
self.contents.blt(x, y, bitmap, src_rect, 192)
end

def top_row
return self.oy / 96
end

def top_row=(row)
row = row % row_max
self.oy = row * 96
end

def page_row_max
return (self.height - 32) / 96
end

end

#==============================================================================
# Window_HelpStatus
#==============================================================================

class Window_HelpStatus < Window_Base

def initialize(gotactor, scene)
super(0, 0, 400 - 32, 160)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
end
self.contents.font.size = 24
refresh(gotactor)
self.active, self.z = false, 5000
if scene == Scene_Map && $game_system.order_only ||
scene == Scene_Battle && $game_system.battle_order_only
self.opacity = 128
end
end

def refresh(actor)
self.contents.clear
if actor != nil
self.contents.font.color = normal_color
if actor.not_available && !$all_available
self.contents.draw_text(8, 0, 160, 32, 'not available', 0)
end
draw_actor_graphic(actor, 0, 40)
draw_actor_name(actor, 160, 32)
draw_actor_level(actor, 96, 32)
draw_actor_hp(actor, 96, 64)
draw_actor_sp(actor, 96, 96)
end
end

end

#==============================================================================
# Window_Warning
#==============================================================================

class Window_Warning < Window_Base

def initialize(mode, members)
super(0, 0, 320, 96)
self.contents = Bitmap.new(width - 32, height - 32)
if $fontface != nil
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
end
self.contents.font.size = 24
self.x, self.y, self.z = 320 - width/2, 240 - height/2, 9999
self.contents.font.color = normal_color
case mode
when 0
self.contents.draw_text(0, 0, 288, 32, 'You need a party', 1)
num = [$game_party.forced_size, members + $game_party.actors.nitems].min
self.contents.draw_text(0, 32, 288, 32, "of #{num} members!", 1)
when 1
self.contents.draw_text(0, 0, 288, 32, 'You cannot remove', 1)
self.contents.draw_text(0, 32, 288, 32, 'the last party member!', 1)
when 2
self.contents.draw_text(0, 0, 288, 32, 'At least one member', 1)
self.contents.draw_text(0, 32, 288, 32, 'has to be alive!', 1)
end
end

end

#==============================================================================
# Window_PartyCommand
#==============================================================================

class Window_PartyCommand

alias init_eps_later initialize
def initialize
if $game_system.battle_switch
if defined?(SDK) && self.is_a?(Window_HorizCommand)
s1 = SDK::Scene_Commands::Scene_Battle::Fight
s2 = SDK::Scene_Commands::Scene_Battle::Escape
s3 = BlizzCFG::SWITCH_COMMAND
super(640, [s1, s2, s3])
disable_item(1) unless $game_temp.battle_can_escape
else
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
@commands = ['Fight', 'Escape', BlizzCFG::SWITCH_COMMAND]
@item_max = @column_max = 3
draw_item(0, normal_color)
draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color)
draw_item(2, normal_color)
end
self.active, self.visible, self.index = false, false, 0
self.back_opacity = 160
else
init_eps_later
end
end

alias draw_item_eps_later draw_item
def draw_item(index, color)
if $game_system.battle_switch
self.contents.font.color = color
rect = Rect.new(80 + index * 160 + 4, 0, 128 - 10, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index], 1)
else
draw_item_eps_later(index, color)
end
end

alias update_cursor_rect_eps_later update_cursor_rect
def update_cursor_rect
if $game_system.battle_switch
self.cursor_rect.set(80 + index * 160, 0, 128, 32)
else
update_cursor_rect_eps_later
end
end

def command(index = self.index)
return @commands[index]
end

end

#==============================================================================
# Scene_PartySwitcher
#==============================================================================

class Scene_PartySwitcher

def initialize(wipe_party = 0, reset = 0, store = 0)
@wipe_party, @store, @reset = store, reset, wipe_party
@current_window_temp = @reserve_window_temp = 0
@scene_flag, @temp_window = false, ''
@scene = $scene.class
end

def main
if @store != 0
swap_parties
$scene = Scene_Map.new
$game_player.refresh
return
end
case @wipe_party
when 1 then setup_forced_party
when 2 then wipe_party
when 3
$game_system.stored_party = $game_party.actors
wipe_party
when 10 then $all_available = true
end
if @reset == 1
(1...$data_actors.size).each {|i| $game_actors[i].not_available = false}
end
@current_window = Window_Current.new
@current_window.index, @current_window.active = 0, true
@reserve_window = Window_Reserve.new(@scene)
@reserve_window.x, @reserve_window.y = 272, 160
@help_window = Window_HelpStatus.new(@reserve_window.getactor(0), @scene)
@help_window.x = 240 + 32
Graphics.transition
loop do
Graphics.update
Input.update
update
break if $scene != self
end
Graphics.freeze
[@current_window, @reserve_window, @help_window].each {|win| win.dispose}
$game_party.actors.compact!
$game_player.refresh
$all_available = nil
end

def update
check = @reserve_window.index
if @reserve_window.active
reserve_update
@reserve_window.update
end
if check != @reserve_window.index
if @reserve_window.active
actor = @reserve_window.getactor(@reserve_window.index)
elsif @current_window.active
actor = @reserve_window.getactor(@reserve_window_temp)
end
@help_window.refresh(actor) if ['', 'Current'].include?(@temp_window)
end
current_update if @current_window.active
if Input.trigger?(Input::B)
if @scene_flag
$game_system.se_play($data_system.cancel_se)
@scene_flag, @temp_window = false, ''
if @reserve_window.active
actor = @reserve_window.getactor(@reserve_window.index)
elsif @current_window.active
actor = @reserve_window.getactor(@reserve_window_temp)
end
@help_window.refresh(actor) if ['', 'Current'].include?(@temp_window)
[@current_window, @reserve_window].each {|win| win.refresh}
return
end
if $game_party.forced_size != nil &&
($game_party.forced_size < $game_party.actors.nitems ||
($game_party.forced_size > $game_party.actors.nitems &&
@reserve_window.get_number != 0))
$game_system.se_play($data_system.buzzer_se)
warning(1)
return
end
if $game_party.actors.all? {|actor| actor == nil ||
actor != nil && actor.dead?}
$game_system.se_play($data_system.buzzer_se)
warning(2)
return
end
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
elsif Input.trigger?(Input::A)
if $game_party.any_forced_position
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
$game_party.actors.compact!
@current_window.refresh
end
end
end

def current_update
@current_window.update
if Input.trigger?(Input::C)
actor = @current_window.getactor(@current_window.index)
if actor != nil && actor.forced_position != nil
$game_system.se_play($data_system.buzzer_se)
else
if @scene_flag
switch_members
else
$game_system.se_play($data_system.decision_se)
@scene_flag, @temp_window = true, 'Current'
@temp_actor_index = @current_window.index
@current_window.clone_cursor
end
end
elsif Input.trigger?(Input::RIGHT)
if @scene == Scene_Map && $game_system.order_only ||
@scene == Scene_Battle && $game_system.battle_order_only
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.cursor_se)
@current_window.active = false
@reserve_window.active = true
@current_window_temp = @current_window.index
actor = @reserve_window.getactor(@reserve_window_temp)
@current_window.index = -1
@reserve_window.index = @reserve_window_temp
@help_window.refresh(actor) unless @scene_flag
end
end
end

def reserve_update
if Input.trigger?(Input::C)
if @scene_flag
switch_members
else
$game_system.se_play($data_system.decision_se)
@scene_flag, @temp_window = true, 'Reserve'
@temp_actor_index = @reserve_window.index
@reserve_window.clone_cursor
end
elsif @reserve_window.index % 3 == 0 && Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@reserve_window.active = false
@current_window.active = true
@reserve_window_temp = @reserve_window.index
@reserve_window.index = -1
@current_window.index = @current_window_temp
end
end

def switch_members
if @temp_window == 'Reserve' && @reserve_window.active
@reserve_window.setactor(@temp_actor_index, @reserve_window.index)
actor = @reserve_window.getactor(@reserve_window.index)
@help_window.refresh(actor)
end
if @temp_window == 'Current' && @current_window.active
@current_window.setactor(@temp_actor_index, @current_window.index)
end
if @temp_window == 'Reserve' && @current_window.active
actor1 = @current_window.getactor(@current_window.index)
actor2 = @reserve_window.getactor(@temp_actor_index)
if call_warning?(@current_window.index, actor2)
if actor1 != nil && actor1.must_be_in_party
$game_system.se_play($data_system.buzzer_se)
@scene_flag, @temp_window = false, ''
actor = @reserve_window.getactor(@reserve_window_temp)
[@current_window, @reserve_window].each {|win| win.refresh}
@help_window.refresh(actor)
return
end
if actor2 != nil && actor2.not_available && !$all_available
$game_system.se_play($data_system.buzzer_se)
@scene_flag, @temp_window = false, ''
actor = @reserve_window.getactor(@reserve_window_temp)
[@current_window, @reserve_window].each {|win| win.refresh}
@help_window.refresh(actor)
return
end
@reserve_window.setparty(@temp_actor_index, @current_window.index)
@current_window.refresh
actor = @reserve_window.getactor(@reserve_window_temp)
@help_window.refresh(actor)
else
warning(0)
end
end
if @temp_window == 'Current' && @reserve_window.active
actor1 = @current_window.getactor(@temp_actor_index)
actor2 = @reserve_window.getactor(@reserve_window.index)
if call_warning?(@temp_actor_index, actor2)
if actor1 != nil && actor1.must_be_in_party
$game_system.se_play($data_system.buzzer_se)
@scene_flag, @temp_window = false, ''
actor = @reserve_window.getactor(@reserve_window.index)
[@current_window, @reserve_window].each {|win| win.refresh}
@help_window.refresh(actor)
return
end
if actor2 != nil && actor2.not_available && !$all_available
$game_system.se_play($data_system.buzzer_se)
@scene_flag, @temp_window = false, ''
actor = @reserve_window.getactor(@reserve_window.index)
[@current_window, @reserve_window].each {|win| win.refresh}
@help_window.refresh(actor)
return
end
@reserve_window.setparty(@reserve_window.index, @temp_actor_index)
@current_window.refresh
actor = @reserve_window.getactor(@reserve_window.index)
@help_window.refresh(actor)
else
warning(0)
end
end
$game_system.se_play($data_system.decision_se)
@scene_flag, @temp_window = false, ''
end

def wipe_party
$game_party.actors.each {|actor| actor.not_available = true if actor != nil}
setup_forced_party(true)
if $game_party.actors == []
(1...$data_actors.size).each {|i|
unless $game_actors[i].not_available ||
$game_actors[i].disabled_for_party
$game_party.actors.push($game_actors[i])
return
end}
end
end

def setup_forced_party(flag = false)
$game_party.actors, party = [], []
(1...$data_actors.size).each {|i|
if $game_actors[i] != nil && $game_actors[i].must_be_in_party &&
(!$game_actors[i].disabled_for_party || flag) &&
!$game_actors[i].not_available
party.push($game_actors[i])
end}
party.clone.each {|actor|
if actor.forced_position != nil
$game_party.actors[actor.forced_position] = actor
party.delete(actor)
end}
$game_party.actors.each_index {|i|
$game_party.actors[i] = party.shift if $game_party.actors[i] == nil}
$game_party.actors += party.compact
end

def swap_parties
$game_party.actors.compact!
temp_actors = $game_party.actors
temp_actors.each {|actor| actor.not_available = true}
$game_system.stored_party.compact!
$game_system.stored_party.each {|actor| actor.not_available = false}
$game_party.actors = $game_system.stored_party
$game_system.stored_party = (@store == 1 ? temp_actors : nil)
end

def call_warning?(index, actor2)
return (BlizzCFG::ALLOW_EMPTY_PARTY || $game_party.actors[index] == nil ||
actor2 != nil || $game_party.actors.nitems > 1)
end

def warning(type)
$game_system.se_play($data_system.buzzer_se)
@warning_window = Window_Warning.new(type, @reserve_window.get_number)
loop do
Graphics.update
Input.update
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se) if type > 0
[@current_window, @reserve_window].each {|win| win.refresh}
@warning_window.dispose
@warning_window = nil
break
end
end
end

end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle

alias update_phase2_eps_later update_phase2
def update_phase2
update_phase2_eps_later
if Input.trigger?(Input::C) && @party_command_window.index == 2
$game_system.se_play($data_system.decision_se)
@spriteset.dispose
$scene = Scene_PartySwitcher.new
$scene.main
$scene = self
@spriteset = Spriteset_Battle.new
15.times {@spriteset.update}
@status_window.refresh
Graphics.transition(0)
end
end

alias start_phase5_eps_later start_phase5
def start_phase5
start_phase5_eps_later
(1...$data_actors.size).each {|i|
unless $game_party.actors.include?($game_actors[i])
if $game_actors[i].not_available
$game_actors[i].exp += @result_window.exp * BlizzCFG::EXP_NOT_AVAILABLE/100
elsif $game_actors[i].disabled_for_party
$game_actors[i].exp += @result_window.exp * BlizzCFG::EXP_DISABLED_FOR_PARTY/100
else
$game_actors[i].exp += @result_window.exp * BlizzCFG::EXP_RESERVE/100
end
end}
end

end
22
Script Requests / [XP]This might be a lil bit tricky
April 30, 2010, 09:06:46 am
i want to set up an array of variables[ids 1-10(all set to '0')] to store actor IDs in. here's the tricky part. i want to be to add a hero's ID to the first variable in that array that equals 0. i ask this so that i can use the values in those variables to turn on certain switches to activate certain events.

any help would be appreciated.  8)