Done everything but the pages. Here's something to let you know I've done everything else.
#===============================================================================
#
# Pacman Advanced Creative (PAC) Engine - Party Management System (2.0 ?)
# 19/6/2011
# Type: Scene
# Installation: Script calls.
# Level: Average
# Thanks: Infinate X
#
#===============================================================================
#
# Description:
# VX limits your party to having 4 members. Isn't that terrible? This script
# won't give you more members in your party, rather be able to change them
# throughout the game at the player's call. Read the instructions to find out
# more.
#
#===============================================================================
#
# Instructions:
# INSTALLATION
# Paste above main, below materials, in the script editor (F11). Make sure you
# save upon exiting.
# SCRIPT CALLS
# $data_actors[ID].found = true/false
# Where ID is the ID of an actor in the database. This places an actor in the
# reserves party, ready for selection by the player if true, and takes them
# out if false.
# $data_actors[ID].unavailable = true/false
# Makes actor with the specified ID unavailable to the player in the reserves
# party if true. If false, makes them available.
# $data_actors[ID].required = true/false
# Locks actor with specified ID to the actual party, ergo mandatory to the
# player, if true. Unlocks the character if false.
# For each of these calls you can use, instead of $data_actors[ID],
# $game_party.members[position].actor.found/unavailable/required to perform
# the action for the actor in that position in the party, starting with 0 as
# the party leader.
# $game_system.party_menu_disabled = true/false
# This will change the access of the command if PAC Main Menu is being used.
# $scene = Scene_Party.new
# Simply calls the Party Management scene. By default, there is no menu option
# for the party scene, but it is simple to add if you are using PAC Main Menu,
# and still quite easy if you are using the default menu system.
#
#===============================================================================
#
# EDITING BEGINS AT LINE XX. DO NOT TOUCH LINES XX-XX.
#
#===============================================================================
module PAC
module MENU
module PARTY
#===============================================================================
#
# BEGIN EDITING
#
#===============================================================================
PARTY_SWITCH = Input::X # Button which will switch between equip and status
# display in the party scene.
PARTY_KILL = Input::Z # Button used to dispose of actors.
DISPOSE_TEXT = "Disband actor" # Text displayed on disband command.
KEEP_TEXT = "Leave alone" # Text displayed on the leave alone command.
PARTY_VARIABLE = 1 # Variable which stores the id of the last acted upon
# actor.
STATUS_WINDOW = Input::Y # Button to toggle status window existance.
START_NO_STATUS = false # false: status window at start. true: no status
# window at start.
MOVE_SPEED = 2 # Speed at which the windows move when opening the status
# window (pixels/second).
#===============================================================================
#
# This script requires no editing. Do not edit anything in this script
# unless you are a compenent scripter. Should you edit without any scripting
# education, it may result in me tutting at you for getting it wrong.
#
#===============================================================================
end
end
end
$imported = {} if $imported == nil
$imported["PAC_Party"] = true
#==============================================================================
# ** RPG::Actor
#------------------------------------------------------------------------------
# Data class for actors.
#==============================================================================
class RPG::Actor
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :found
attr_accessor :unavailable
attr_accessor :required
attr_accessor :disband
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def setup
@found = false
@unavailable = false
@required = false
@disband = false
end
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :party_menu_disabled
#--------------------------------------------------------------------------
# alias listing
#--------------------------------------------------------------------------
alias pac_party_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
pac_party_initialize
@party_menu_disabled = false
end
end
#==============================================================================
# ** Game_Actors
#------------------------------------------------------------------------------
# This class handles the actor array. The instance of this class is
# referenced by $game_actors.
#==============================================================================
class Game_Actors
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :data
#--------------------------------------------------------------------------
# alias listing
#--------------------------------------------------------------------------
alias pac_pms_act_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
pac_pms_act_initialize
$data_actors.each do |actor|
actor.setup if actor
@data[actor.id] = Game_Actor.new(actor.id) if actor
end
end
end
#==============================================================================
# ** Window_CurrentMember
#------------------------------------------------------------------------------
# This window displays the current party member in the party scene.
#==============================================================================
class Window_CurrentMember < Window_Base
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :mode
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(member = nil, mode = 0)
super(304, 80, 192, 256)
create_contents
@member = member
@mode = 0
refresh
end
#--------------------------------------------------------------------------
# * Get member
#--------------------------------------------------------------------------
def member
return @member
end
#--------------------------------------------------------------------------
# * Set Member
#--------------------------------------------------------------------------
def set_member(member)
old_member = @member
@member = member
refresh if old_member != @member
end
#--------------------------------------------------------------------------
# * Set modes
#--------------------------------------------------------------------------
def mode=(n)
@mode = n if [0, 1].include?(n)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
return unless @member
x, y = 0, 0
self.draw_actor_face(@member, x, y, 48)
self.draw_actor_name(@member, x + 52, y)
self.draw_actor_class(@member, x + 52, y + WLH)
self.draw_actor_level(@member, x, y + WLH*2)
case @mode
when 0
self.draw_icon(142, self.contents.width - 24, y + WLH*2)
self.contents.draw_text(x, y + WLH*2, self.contents.width - 12, WLH,
'Stat', 2)
self.draw_actor_hp(@member, x, y + WLH*3, 160)
self.draw_actor_mp(@member, x, y + WLH*4, 160)
self.draw_actor_parameter(@member, x, y + WLH*5, 0)
self.draw_actor_parameter(@member, x, y + WLH*6, 1)
self.draw_actor_parameter(@member, x, y + WLH*7, 2)
self.draw_actor_parameter(@member, x, y + WLH*8, 3)
when 1
self.draw_icon(143, self.contents.width - 24, y + WLH*2)
self.contents.draw_text(x, y + WLH*2, self.contents.width - 12, WLH,
'Equip', 2)
for i in 0...@member.equips.size
item = @member.equips[i]
self.draw_item_name(item, x, y + WLH*(3+i), true)
end
end
end
end
#==============================================================================
# ** Window_CurrentParty
#------------------------------------------------------------------------------
# This window displays the current party selected in the party scene.
#==============================================================================
class Window_CurrentParty < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(48, 80, 256, 64)
@item_max = 4
@column_max = @item_max
create_contents
self.index = 0
refresh
end
#--------------------------------------------------------------------------
# * Get member
#--------------------------------------------------------------------------
def member
return $game_party.members[self.index]
end
#--------------------------------------------------------------------------
# * Refresh window
#--------------------------------------------------------------------------
def refresh
for i in 0...@item_max
rect = item_rect(i)
self.contents.clear_rect(rect)
end
for i in 0...$game_party.members.size
rect = item_rect(i)
bitmap = Cache.character($game_party.members[i].character_name)
sign = $game_party.members[i].character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = $game_party.members[i].character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
if $game_party.members[i].actor.unavailable
self.contents.blt(rect.x, rect.y, bitmap, src_rect, 128)
else
self.contents.blt(rect.x, rect.y, bitmap, src_rect, 255)
end
if $game_party.members[i].actor.required
lock_bitmap = Cache.system("Locked")
self.contents.blt(rect.x + rect.width - lock_bitmap.width,
rect.y + rect.height - lock_bitmap.height,lock_bitmap,lock_bitmap.rect)
end
end
end
#--------------------------------------------------------------------------
# * Get rectangle for displaying items
# index : item number
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.width = (contents.width + @spacing) / @column_max - @spacing
rect.height = 32
rect.x = index % @column_max * (rect.width + @spacing)
rect.y = index / @column_max * 32
return rect
end
end
#==============================================================================
# ** Window_SelectMember
#------------------------------------------------------------------------------
# This window displays the currently selected member in the party scene.
#==============================================================================
class Window_SelectMember < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(48, 144, 256, 192)
calculate_actors
@item_max = @actors.size
@column_max = 4
self.index = -1
self.active = false
refresh
end
#--------------------------------------------------------------------------
# * Calculate Actors
#--------------------------------------------------------------------------
def calculate_actors
@actors = []
for a in $game_actors.data
if a != nil and a.actor.found and !$game_party.members.include?(a)
@actors << a unless $data_actors[a.id].disband
end
end
end
#--------------------------------------------------------------------------
# * Get member
#--------------------------------------------------------------------------
def member
return @actors[self.index]
end
#--------------------------------------------------------------------------
# * Refresh Window
#--------------------------------------------------------------------------
def refresh
self.contents.clear
calculate_actors
@item_max = @actors.size + 1
for i in 0...@actors.size
rect = item_rect(i)
bitmap = Cache.character(@actors[i].character_name)
sign = @actors[i].character_name[/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = @actors[i].character_index
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
if @actors[i].actor.unavailable
self.contents.blt(rect.x, rect.y, bitmap, src_rect, 128)
else
self.contents.blt(rect.x, rect.y, bitmap, src_rect, 255)
end
if @actors[i].actor.required
lock_bitmap = Cache.system("Locked")
self.contents.blt(rect.x + rect.width - lock_bitmap.width,
rect.y + rect.height - lock_bitmap.height,lock_bitmap,lock_bitmap.rect)
end
end
end
#--------------------------------------------------------------------------
# * Get rectangle for displaying items
# index : item number
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.width = (contents.width + @spacing) / @column_max - @spacing
rect.height = 32
rect.x = index % @column_max * (rect.width + @spacing)
rect.y = index / @column_max * 32
return rect
end
end
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
# This class performs the save and load screen processing.
#==============================================================================
class Scene_File < Scene_Base
#--------------------------------------------------------------------------
# alias listing
#--------------------------------------------------------------------------
alias pac_pms_file_write_save_data write_save_data
alias pac_pms_file_read_save_data read_save_data
#--------------------------------------------------------------------------
# * Write Save Data
# file : write file object (opened)
#--------------------------------------------------------------------------
def write_save_data(file)
pac_pms_file_write_save_data(file)
Marshal.dump($data_actors, file)
end
#--------------------------------------------------------------------------
# * Read Save Data
# file : file object for reading (opened)
#--------------------------------------------------------------------------
def read_save_data(file)
pac_pms_file_read_save_data(file)
$data_actors = Marshal.load(file)
end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs the title screen processing.
#==============================================================================
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# alias listing
#--------------------------------------------------------------------------
alias pac_pms_ttl_command_new_game command_new_game
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
pac_pms_ttl_command_new_game
$game_party.members.each {|s| s.actor.found = true if s}
end
end
#==============================================================================
# ** Scene_Party
#------------------------------------------------------------------------------
# This class performs the party screen processing.
#==============================================================================
class Scene_Party < Scene_Base
include PAC::MENU::PARTY
#--------------------------------------------------------------------------
# Public Instance Variables
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(from_map = true, from_menu = false)
@from_map = from_map
@from_menu = from_menu
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_windows
end
#--------------------------------------------------------------------------
# * Create windows
#--------------------------------------------------------------------------
def create_windows
@member_window = Window_CurrentMember.new
@member_window.visible = false if START_NO_STATUS
@member_window.openness = 0 if START_NO_STATUS
@party_window = Window_CurrentParty.new
@party_window.active = true
@party_window.x += 96 if START_NO_STATUS
@selectable_window = Window_SelectMember.new
@selectable_window.x += 96 if START_NO_STATUS
commands = [PAC::MENU::PARTY::DISPOSE_TEXT, PAC::MENU::PARTY::KEEP_TEXT]
@choice_window = Window_Command.new(160, commands)
@choice_window.x = (544 - @choice_window.width) / 2
@choice_window.y = (416 - @choice_window.height) / 2
@choice_window.openness = 0
end
#--------------------------------------------------------------------------
# * Open Member Window (now with awesomeness!)
#--------------------------------------------------------------------------
def open_member_window
begin
@party_window.x -= MOVE_SPEED
@selectable_window.x -= MOVE_SPEED
Graphics.update
end until @party_window.x == 48
@member_window.visible = true
@member_window.open
begin
@member_window.update
Graphics.update
end until @member_window.openness == 255
end
#--------------------------------------------------------------------------
# * Close Member Window (with equal awesomeness!)
#--------------------------------------------------------------------------
def close_member_window
@member_window.close
begin
@member_window.update
Graphics.update
end until @member_window.openness == 0
@member_window.visible = false
begin
@party_window.x += MOVE_SPEED
@selectable_window.x += MOVE_SPEED
Graphics.update
end until @party_window.x == 144
end
#--------------------------------------------------------------------------
# * Window update
#--------------------------------------------------------------------------
def update_windows
@member_window.update
@party_window.update
@selectable_window.update
@choice_window.update
if @party_window.active
@member_window.set_member(@party_window.member)
elsif @selectable_window.active
@member_window.set_member(@selectable_window.member)
end
end
#--------------------------------------------------------------------------
# * Open Choice Window
#--------------------------------------------------------------------------
def activate_choice_window
@previously_active = @selectable_window.active ?
@selectable_window : @party_window
@previously_active.active = false
@choice_window.active = true
@choice_window.open
begin
@choice_window.update
Graphics.update
end until @choice_window.openness == 255
end
#--------------------------------------------------------------------------
# * Close Choice Window
#--------------------------------------------------------------------------
def deactivate_choice_window
@choice_window.active = false
@party_window.active = true
@choice_window.close
@selectable_window.index = -1
begin
@choice_window.update
Graphics.update
end until @choice_window.openness == 0
end
#--------------------------------------------------------------------------
# * Update Party Window
#--------------------------------------------------------------------------
def update_party_window
if Input.trigger?(Input::B) # If you want to leave,
if $game_party.members.size == 0 # If party is empty,
Sound.play_buzzer # Bee-bow.
return # No soup for you
else
Sound.play_cancel # Bloop.
if @from_map
$scene = Scene_Map.new
elsif @from_menu
if $imported["PAC_Menu 1.7"]
$scene = Scene_Menu.new
else
$scene = Scene_Menu.new(4)
end
end
end
elsif Input.trigger?(Input::C) # If you want to do something,
member = @party_window.member # do stuff.
if member != nil
if member.actor.unavailable or member.actor.required
Sound.play_buzzer
return
end
end
Sound.play_decision
@party_window.active = false
@selectable_window.active = true
@selectable_window.index = 0
elsif Input.trigger?(PARTY_KILL)
Sound.play_buzzer
end
end
#--------------------------------------------------------------------------
# * Update Selectable Window
#--------------------------------------------------------------------------
def update_selectable_window
if Input.trigger?(Input::B)
Sound.play_cancel
@selectable_window.index = -1
@selectable_window.active = false
@party_window.active = true
elsif Input.trigger?(Input::C)
member = @selectable_window.member
if member != nil
if member.actor.unavailable
Sound.play_buzzer
return
end
end
Sound.play_decision
if @party_window.member != nil
member = @party_window.member
$game_party.remove_actor(member.id)
end
if @selectable_window.member != nil
member = @selectable_window.member
$game_party.add_actor(member.id)
end
$game_variables[PAC::MENU::PARTY::PARTY_VARIABLE] = member.id
@selectable_window.refresh
@party_window.refresh
@selectable_window.index = -1
@selectable_window.active = false
@party_window.active = true
elsif Input.trigger?(PAC::MENU::PARTY::PARTY_KILL)
activate_choice_window
end
end
#--------------------------------------------------------------------------
# * Update Choice Window
#--------------------------------------------------------------------------
def update_choice_window
if Input.trigger?(Input::B)
Sound.play_cancel
deactivate_choice_window
elsif Input.trigger?(Input::C)
case @choice_window.index
when 0 # Disband
member = @selectable_window.member
if member != nil
if member.actor.unavailable
Sound.play_buzzer
return
end
end
Sound.play_decision
if @party_window.member != nil
member = @party_window.member
end
if @selectable_window.member != nil
member = @selectable_window.member
end
$game_party.remove_actor(member.id)
$game_variables[PAC::MENU::PARTY::PARTY_VARIABLE] = member.id
$data_actors[member.id].disband = true
@selectable_window.refresh
@party_window.refresh
@selectable_window.index = -1
deactivate_choice_window
when 1 # Leave
Sound.play_cancel
deactivate_choice_window
end
end
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
@member_window.dispose
@party_window.dispose
@selectable_window.dispose
@choice_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_windows
update_input
end
#--------------------------------------------------------------------------
# * Update Command Input
#--------------------------------------------------------------------------
def update_input
if Input.trigger?(PARTY_SWITCH) # If the button is being pressed...
@member_window.mode = @member_window.mode == 1 ? 0 : 1
elsif Input.trigger?(STATUS_WINDOW)
if @member_window.visible
close_member_window
else
open_member_window
end
end
if @party_window.active # If the party member is active
update_party_window
elsif @selectable_window.active
update_selectable_window
elsif @choice_window.active
update_choice_window
end
end
end
#===============================================================================
#
# END OF SCRIPT
#
#===============================================================================
You even get your own line in the script header to acknowledge your requests! Enjoy a congratulatory lemonade with me.