Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Maxhero's Party Manager
maxhero
post Sep 9 2011, 10:22 PM
Post #1



Group Icon

Group: Member
Posts: 2
Type: Scripter
RM Skill: Beginner




Well, Hello I'm Maxhero an Brazilian maker, and now i'm posting my script of party management. happy.gif
Instructions:
to call add character window use:
QUOTE
$scene = Scene_Party_Menu.new("Add")

to call remove character window use:
QUOTE
$scene = Scene_Party_Menu.new("Remove")

ScreenShots:
Screenshots




Script:
Script
CODE
#===============================================================================
# Maxhero Party Manager
#-------------------------------------------------------------------------------
#
#===============================================================================
module Maxhero
  module Party_Manager
    TEXTS = [
    "Which character you want to add?",
    "You have the limit of characters in party",
    "Which character you want to remove?"
    ]
    BLOCKED_ACTORS    = [1]
    INCLUDED_ACTORS = [2,3,4,5,6,7,8]
  end
end
class Game_Actors
  alias index [] unless $@
  def []( x )
    x = x.id if x.is_a?(Game_Actor)
    return index( x )
  end
end
#===============================================================================
# **Window_Party_Manager
#===============================================================================
class Window_Party_Manager < Window_Base
  #-----------------------------------------------------------------------------
  # *Initialize
  #  x:        X of the Window
  #  y:        Y of the Window
  #  width:    Width of Window
  #  height:   Height pf Window
  #-----------------------------------------------------------------------------
  def initialize(x,y,width,height)
    super(x,y,width,height)
    self.contents = Bitmap.new(width - 32,height - 32)
  end
  #-----------------------------------------------------------------------------
  # *draw_info
  #  actor_id: the id of the actor to draw the contents
  #-----------------------------------------------------------------------------
  def draw_info(actor_id)
    draw_actor_name     ($game_actors[actor_id]     ,0,   0)
    draw_actor_level    ($game_actors[actor_id]     ,0,  40)
    draw_actor_class    ($game_actors[actor_id]     ,0,  20)
    draw_actor_face     ($game_actors[actor_id]     ,0,  60)
    draw_actor_hp       ($game_actors[actor_id]     ,0, 156)
    draw_equipments     ($game_actors[actor_id],   135,   0)
    draw_actor_mp       ($game_actors[actor_id]     ,0, 176)
    draw_actor_parameter($game_actors[actor_id]     ,0, 196, 0)
    draw_actor_parameter($game_actors[actor_id]     ,0, 216, 1)
    draw_actor_parameter($game_actors[actor_id]     ,0, 236, 2)
    draw_actor_parameter($game_actors[actor_id]     ,0, 256, 3)
  end
  #-----------------------------------------------------------------------------
  # *draw_equipaments
  #  x:          x where draw the actor equipaments
  #  y:          y where draw the actor equipaments
  #  actor:      actor which has the item
  #-----------------------------------------------------------------------------
  def draw_equipments(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, Vocab::equip)
    (0..4).each{|i|draw_item_name(actor.equips[i], x + 16, y + WLH * (i + 1))}
  end
  #-----------------------------------------------------------------------------
  # *update
  #-----------------------------------------------------------------------------
  def update
    super
  end
end
#===============================================================================
# **Scene_Party_Menu
#===============================================================================
class Scene_Party_Menu < Scene_Base
  include Maxhero::Party_Manager
  #-----------------------------------------------------------------------------
  # *Initialize
  # type: if "Add" go to Add Window Character, if "Remove" go to Remove Char Win
  #-----------------------------------------------------------------------------
  def initialize(type)
    @type = type
  end
  #-----------------------------------------------------------------------------
  # *start
  #-----------------------------------------------------------------------------
  def start
    @WPM  = Window_Party_Manager.new(160,000,544-160,416-(24+32))
    @WC   = Window_Command.new(160,include_add_chars)
    @WH   = Window_Help.new
    @WH.y = 416-(24+32)
    @WH.set_text(TEXTS[0]) if add_mode?
    @WH.set_text(TEXTS[2]) if remove_mode?
    create_menu_background
    @WPM.draw_info(INCLUDED_ACTORS[@WC.index])        if add_mode?
    @WPM.draw_info($game_party.members[@WC.index].id) if remove_mode?
  end
  #-----------------------------------------------------------------------------
  # *update
  #-----------------------------------------------------------------------------
  def update
    @WPM.update
    @WC.update
    if Input.trigger?(Input::C)
      Sound.play_decision
      party = $game_party
      if add_mode?
        if party.members.size < 4
          $game_party.add_actor(INCLUDED_ACTORS[@WC.index])
        else
          print TEXTS[1]
        end
      end
      if remove_mode?
        $game_party.remove_actor(@actors[@WC.index].id)
      end
      $scene = Scene_Map.new
    end      
      @WPM.contents.clear
      @WPM.draw_info(INCLUDED_ACTORS[@WC.index])     if add_mode?
      if remove_mode?
        @WPM.draw_info(@actors[@WC.index].id)
      end
    if Input.trigger?(Input::B)
      return_scene
    end
  end
  #-----------------------------------------------------------------------------
  # *terminate
  #-----------------------------------------------------------------------------
  def terminate
    dispose_menu_background
    @WPM.dispose
    @WC.dispose
    @WH.dispose
  end
  #-----------------------------------------------------------------------------
  # *Add Mode?
  #-----------------------------------------------------------------------------
  def add_mode?
    return true if @type == "Add"
    return false
  end
  #-----------------------------------------------------------------------------
  # *Remove Mode?
  #-----------------------------------------------------------------------------
  def remove_mode?
    return true if @type == "Remove"
    return false
  end
  #-----------------------------------------------------------------------------
  # *return_scene
  #-----------------------------------------------------------------------------
  def return_scene
    $scene = Scene_Map.new
  end
  #-----------------------------------------------------------------------------
  # *include_add_chars
  #-----------------------------------------------------------------------------
  def include_add_chars
    array   = []
    party   = $game_party.members
    INCLUDED_ACTORS.each{|i| array << $game_actors[i].name}   if add_mode?
    if remove_mode?
      commands = []
      @actors = []
      $game_party.members.each do |actor|
        if !actor.nil? && $game_party.members.size > 1 &&
          !BLOCKED_ACTORS.include?(actor.id)
          @actors << actor
          array << actor.name
        end
      end
      array << "" if array.empty?
    end
    return array
  end
end

DEMO:
Download


__________________________
Nationality: Brazilian;
Where acts? Scripts, Events and Mapping (super newbie);
Go to the top of the page
 
+Quote Post
   
Brazy
post Sep 13 2011, 04:04 AM
Post #2



Group Icon

Group: Member
Posts: 1
Type: Developer
RM Skill: Skilled




hey wassup... quick question: throughout the game, when adding & removing party members, will their levels squired be the same???
Go to the top of the page
 
+Quote Post
   
Lockheart
post Sep 13 2011, 07:47 AM
Post #3


Level 9
Group Icon

Group: Revolutionary
Posts: 136
Type: Developer
RM Skill: Advanced




Is it possible in this script to include new characters to be added to the list over the course of the game?

For Example, say Vera and Elmer aren't available off the bat of the game but could be added later in the game, is this already possible?
Go to the top of the page
 
+Quote Post
   
maxhero
post Sep 13 2011, 01:34 PM
Post #4



Group Icon

Group: Member
Posts: 2
Type: Scripter
RM Skill: Beginner




QUOTE (Brazy @ Sep 13 2011, 09:04 AM) *
hey wassup... quick question: throughout the game, when adding & removing party members, will their levels squired be the same???

I not tested it...
But I Think when remove and add before back with same level...

QUOTE (Lockheart @ Sep 13 2011, 12:47 PM) *
Is it possible in this script to include new characters to be added to the list over the course of the game?

For Example, say Vera and Elmer aren't available off the bat of the game but could be added later in the game, is this already possible?

well, I Will Create This function..


__________________________
Nationality: Brazilian;
Where acts? Scripts, Events and Mapping (super newbie);
Go to the top of the page
 
+Quote Post
   
rural_monk
post Sep 20 2011, 07:35 AM
Post #5


Level 2
Group Icon

Group: Member
Posts: 20
Type: Musician
RM Skill: Advanced




Real Nice! I can't wait to see some future functions like those mentioned by lockheart! smile.gif

This post has been edited by rural_monk: Sep 20 2011, 07:36 AM


__________________________
The Rural Monk - the fresh smell of rum in the morning
Go to the top of the page
 
+Quote Post
   
darquez1
post Sep 25 2011, 05:59 AM
Post #6



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Intermediate




where do the QUOTE go?
Go to the top of the page
 
+Quote Post
   
nevious
post Oct 7 2011, 10:00 PM
Post #7


Hyperfunctional Drive Modulator?
Group Icon

Group: Revolutionary
Posts: 337
Type: Artist
RM Skill: Advanced




it would be very nice to see this script more advanced i think it could very well have amazing aplications in numerious games. good job maxhero, cant wait to see more for this.


__________________________
Artist: Advanced
Musician: None
Scripter: Undisclosed
Writer: Beginner
Developer: None
Event Designer: Intermediate







[Show/Hide] Signatures








necroking nevious


Check out my Gallery!! (please leave comments constructive critizism helps. but please dont be rude.
My Gallery!!

Omegazions rougelike battlesystem in action


Go to the top of the page
 
+Quote Post
   
SloaTheDemon
post Oct 17 2011, 02:44 PM
Post #8


Level 7
Group Icon

Group: Member
Posts: 95
Type: Musician
RM Skill: Beginner




i was curious if u could make it where at some points you can't choose characters not bc there not added or anything but u just can choose them bc u guy are splitting up into two or three groups or something. Best way i can think to explain it


__________________________





Current projects

    RMVX games-
    nothing


    RMXP-
      nothing


music
my music


Go to the top of the page
 
+Quote Post
   
munkis
post Oct 19 2011, 03:29 AM
Post #9


Woah, dude...
Group Icon

Group: Revolutionary
Posts: 197
Type: Writer
RM Skill: Intermediate




Can this script change the party leader?

@sloan: Do you mean locking certain party members in place, and multiple parties?

This post has been edited by munkis: Oct 19 2011, 03:01 PM


__________________________
Go to the top of the page
 
+Quote Post
   
SloaTheDemon
post Oct 22 2011, 02:56 PM
Post #10


Level 7
Group Icon

Group: Member
Posts: 95
Type: Musician
RM Skill: Beginner




not quite i mean like on final fantasy 8 they would have two parties and u couldn't choose a certain character bc of such and such and stuff and it's Sloa lol

This post has been edited by SloaTheDemon: Oct 22 2011, 02:57 PM


__________________________





Current projects

    RMVX games-
    nothing


    RMXP-
      nothing


music
my music


Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 06:23 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker