[VX] Large Party

Large Party
by Dargor
Version 1.7


Introduction

My version of Large Party. You all know what it does! There's a little feature that let you scroll up/down the status window's contents in battle. Simply press L/R (PageUp/PageDown) when the party commands window is active. You can also add extra battle test members.

Enjoy!

Script

  1. #==============================================================================
  2. # ** Large Party
  3. #------------------------------------------------------------------------------
  4. #    © Dargor, 2008-2009
  5. #   28/0//09
  6. #   Version 1.7
  7. #------------------------------------------------------------------------------
  8. #   VERSION HISTORY:
  9. #    - 1.0 (08/03/08), Initial release
  10. #    - 1.1 (15/03/08), Added party arrange support
  11. #    - 1.2 (15/03/08), Battle Status bug fixed with Party Changer
  12. #    - 1.3 (11/05/08), Bug fixed with the add_actor method
  13. #    - 1.4 (13/06/08), Configuration Module added
  14. #    - 1.5 (13/06/08), Support added for extra battle test members
  15. #    - 1.6 (04/07/08), Improved compatibility with Multiple Parties
  16. #    - 1.7 (28/01/09), Fixed a bug with "max_members"
  17. #------------------------------------------------------------------------------
  18. #   INSTRUCTIONS:
  19. #       1)   To change the maximum # of actors allowed in the party, use:
  20. #                - $game_party.max_members = x
  21. #==============================================================================
  22.  
  23. #==============================================================================
  24. # ** Large Party Customization Module
  25. #==============================================================================
  26.  
  27. module Large_Party
  28.   # Maximum number of party members at the begining of the game
  29.   Initial_Max_Members = 4
  30.   # Maximum number of party members possible to have
  31.   # NOTE: Should be higher than Initial_Max_Members
  32.   Max_Members = 8
  33.   # Extra actors (ID) for Battle Test
  34.   BTEST_Extra_Actors = []
  35. end
  36.  
  37. #==============================================================================
  38. # ** Game_Party
  39. #------------------------------------------------------------------------------
  40. #   This class handles the party. It includes information on amount of gold
  41. # and items. The instance of this class is referenced by $game_party.
  42. #==============================================================================
  43.  
  44. class Game_Party < Game_Unit
  45.   # Constants
  46.   MAX_MEMBERS = Large_Party::Max_Members      
  47.   #--------------------------------------------------------------------------
  48.   # * Public Instance Variables
  49.   #--------------------------------------------------------------------------
  50.   attr_accessor :max_members                        # Maximum number of party members
  51.   #--------------------------------------------------------------------------
  52.   # * Alias Listing
  53.   #--------------------------------------------------------------------------
  54.   alias dargor_vx_large_party_initialize initialize
  55.   alias dargor_vx_large_party_add_actor add_actor
  56.   #--------------------------------------------------------------------------
  57.   # * Object Initialization
  58.   #--------------------------------------------------------------------------
  59.   def initialize
  60.      dargor_vx_large_party_initialize
  61.      @max_members = Large_Party::Initial_Max_Members # Maximum number of party members
  62.   end
  63.   #--------------------------------------------------------------------------
  64.   # * Add an Actor
  65.   #       actor_id : actor ID
  66.   #--------------------------------------------------------------------------
  67.   def add_actor(actor_id)
  68.      if self.methods.include?('add_reserve_actor')
  69.         add_reserve_actor(actor_id)
  70.      end
  71.      if $game_parties != nil
  72.         $game_parties.add_actor(actor_id)
  73.         $game_parties.add_reserve_actor(actor_id)
  74.      end
  75.      if @actors.size < @max_members
  76.         dargor_vx_large_party_add_actor(actor_id)
  77.      end
  78.   end
  79.   #--------------------------------------------------------------------------
  80.   # * Battle Test Party Setup
  81.   #--------------------------------------------------------------------------
  82.   def setup_battle_test_members
  83.      @actors = []
  84.      for actor_id in Large_Party::BTEST_Extra_Actors
  85.         battler = RPG::System::TestBattler.new
  86.         battler.actor_id = actor_id
  87.         $data_system.test_battlers << battler
  88.      end
  89.      for battler in $data_system.test_battlers
  90.         actor = $game_actors[battler.actor_id]
  91.         actor.change_level(battler.level, false)
  92.         actor.change_equip_by_id(0, battler.weapon_id, true)
  93.         actor.change_equip_by_id(1, battler.armor1_id, true)
  94.         actor.change_equip_by_id(2, battler.armor2_id, true)
  95.         actor.change_equip_by_id(3, battler.armor3_id, true)
  96.         actor.change_equip_by_id(4, battler.armor4_id, true)
  97.         actor.recover_all
  98.         @actors.push(actor.id)
  99.      end
  100.      @items = {}
  101.      for i in 1...$data_items.size
  102.         if $data_items[i].battle_ok?
  103.            @items[i] = 99 unless $data_items[i].name.empty?
  104.         end
  105.      end
  106.   end
  107. end
  108.  
  109. #==============================================================================
  110. # ** Window_MenuStatus
  111. #------------------------------------------------------------------------------
  112. #   This window displays party member status on the menu screen.
  113. #==============================================================================
  114.  
  115. class Window_MenuStatus < Window_Selectable
  116.   #--------------------------------------------------------------------------
  117.   # * Alias Listings
  118.   #--------------------------------------------------------------------------
  119.   alias dargor_large_party_initialize initialize
  120.   alias dargor_large_party_update_cursor update_cursor
  121.   #--------------------------------------------------------------------------
  122.   # * Object Initialization
  123.   #--------------------------------------------------------------------------
  124.   def initialize(x, y)
  125.      @selection_rect = false
  126.      @selection_y = 0
  127.      dargor_large_party_initialize(x, y)
  128.      height = 416
  129.      extra_height = (96 * ($game_party.members.size-4))
  130.      if $game_party.members.size > 0
  131.         height += extra_height
  132.      end
  133.      self.contents = Bitmap.new(width - 32, height - 32)
  134.      self.height = 416
  135.      refresh
  136.   end
  137.   #--------------------------------------------------------------------------
  138.   # * Refresh
  139.   #--------------------------------------------------------------------------
  140.   def refresh
  141.      self.contents.clear
  142.      if @selection_rect
  143.         color = Color.new(0,0,0,160)
  144.         self.contents.fill_rect(2, @selection_y, contents.width-4, 92, color)
  145.      end
  146.      @item_max = $game_party.members.size
  147.      for actor in $game_party.members
  148.         draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
  149.         x = 104
  150.         y = actor.index * 96 + WLH / 2
  151.         draw_actor_name(actor, x, y)
  152.         draw_actor_class(actor, x + 120, y)
  153.         draw_actor_level(actor, x, y + WLH * 1)
  154.         draw_actor_state(actor, x, y + WLH * 2)
  155.         draw_actor_hp(actor, x + 120, y + WLH * 1)
  156.         draw_actor_mp(actor, x + 120, y + WLH * 2)
  157.      end
  158.   end
  159.   #--------------------------------------------------------------------------
  160.   # * Set Selection Rect
  161.   #--------------------------------------------------------------------------
  162.   def set_selection_rect(index)
  163.      @selection_rect = true
  164.      @selection_y = index * 96 - WLH / 2 + 14
  165.      refresh
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # * Clear Selection Rect
  169.   #--------------------------------------------------------------------------
  170.   def clear_selection_rect
  171.      @selection_rect = false
  172.      refresh
  173.   end
  174.   #--------------------------------------------------------------------------
  175.   # * Update cursor
  176.   #--------------------------------------------------------------------------   
  177.   def update_cursor
  178.      #dargor_large_party_update_cursor
  179.      if @index < 0
  180.         self.cursor_rect.empty
  181.         return
  182.      end
  183.      # Get top row
  184.      row = @index   / @column_max
  185.      if row < self.top_row
  186.         self.top_row = row
  187.      end
  188.      # Reset Top Row if at bottom of list
  189.      if row > self.top_row + (self.page_row_max - 1)
  190.         self.top_row = row - (self.page_row_max - 1)
  191.      end
  192.      y = @index / @column_max * 96 - self.oy
  193.      # Draw the cursor
  194.      self.cursor_rect.set(0, y, contents.width, 96)
  195.   end
  196.   #--------------------------------------------------------------------------
  197.   # * Get Top Row
  198.   #--------------------------------------------------------------------------   
  199.   def top_row
  200.      return self.oy / 96
  201.   end
  202.   #--------------------------------------------------------------------------
  203.   # * Set Top Row
  204.   #       row : row shown on top
  205.   #--------------------------------------------------------------------------   
  206.   def top_row=(row)
  207.      if row < 0
  208.         row = 0
  209.      end
  210.      if row > row_max - 1
  211.         row = row_max - 1
  212.      end
  213.      self.oy = row * 96
  214.   end
  215.   #--------------------------------------------------------------------------
  216.   # * Get Number of Rows Displayable on 1 Page
  217.   #--------------------------------------------------------------------------   
  218.   def page_row_max
  219.      return 4
  220.   end
  221. end
  222.  
  223. #==============================================================================
  224. # ** Window_BattleStatus
  225. #------------------------------------------------------------------------------
  226. #   This window displays the status of all party members on the battle screen.
  227. #==============================================================================
  228.  
  229. class Window_BattleStatus < Window_Selectable
  230.   #--------------------------------------------------------------------------
  231.   # * Alias Listings
  232.   #--------------------------------------------------------------------------
  233.   alias dargor_large_party_initialize initialize
  234.   #--------------------------------------------------------------------------
  235.   # * Object Initialization
  236.   #--------------------------------------------------------------------------
  237.   def initialize
  238.      dargor_large_party_initialize
  239.      height = 128 + (24 * ($game_party.members.size-4))
  240.      self.contents = Bitmap.new(width - 32, height - 32)
  241.      self.height = 128
  242.      refresh
  243.   end
  244.   #--------------------------------------------------------------------------
  245.   # * Update cursor
  246.   #--------------------------------------------------------------------------   
  247.   def update_cursor
  248.      if @index < 0
  249.         self.cursor_rect.empty
  250.         return
  251.      end
  252.      # Get top row
  253.      row = @index   / @column_max
  254.      if row < self.top_row
  255.         self.top_row = row
  256.      end
  257.      # Reset Top Row if at bottom of list
  258.      if row > self.top_row + (self.page_row_max - 1)
  259.         self.top_row = row - (self.page_row_max - 1)
  260.      end
  261.      y = @index / @column_max * 24 - self.oy
  262.      # Draw the cursor
  263.      self.cursor_rect.set(0, y, contents.width, 24)
  264.   end
  265.   #--------------------------------------------------------------------------
  266.   # * Get Top Row
  267.   #--------------------------------------------------------------------------   
  268.   def top_row
  269.      return self.oy / 24
  270.   end
  271.   #--------------------------------------------------------------------------
  272.   # * Set Top Row
  273.   #       row : row shown on top
  274.   #--------------------------------------------------------------------------   
  275.   def top_row=(row)
  276.      if row < 0
  277.         row = 0
  278.      end
  279.      if row > row_max - 1
  280.         row = row_max - 1
  281.      end
  282.      self.oy = row * 24
  283.   end
  284.   #--------------------------------------------------------------------------
  285.   # * Get Number of Rows Displayable on 1 Page
  286.   #--------------------------------------------------------------------------   
  287.   def page_row_max
  288.      return 4
  289.   end
  290. end
  291.  
  292. #==============================================================================
  293. # ** Scene_Battle
  294. #------------------------------------------------------------------------------
  295. #   This class performs battle screen processing.
  296. #==============================================================================
  297.  
  298. class Scene_Battle
  299.   #--------------------------------------------------------------------------
  300.   # * Alias Listing
  301.   #--------------------------------------------------------------------------
  302.   alias dargor_large_party_update_party_command_selection update_party_command_selection
  303.   #--------------------------------------------------------------------------
  304.   # * Update Party Command Selection
  305.   #--------------------------------------------------------------------------
  306.   def update_party_command_selection
  307.      if Input.trigger?(Input::L)
  308.         @status_window.oy = [@status_window.oy -= 24, 0].max
  309.      end
  310.      if Input.trigger?(Input::R)
  311.         @status_window.oy = [@status_window.oy += 24, ($game_party.members.size-4) * 24].min
  312.      end
  313.      dargor_large_party_update_party_command_selection
  314.   end
  315. end
Expand to see the code.


Notes

I changed a bit the way to customize the party size. Instead of using the MAX_MEMBERS constant in Game_Party, you should use $game_party.max_members = value
Don't forget to give me credit!

-Dargor
Script updated to version 1.2
Bug fixed with my Party Changer script.
Awesome!  You make some very good scripts.  I've just got a few questions.

1. Does it matter where it's placed in the Materials section?  I have a few scripts already there, and I want to make sure it doesn't clash with them.

2. Does the battle window scroll down automatically when it's the character's turn?

Thanks for all the help! :thumb:

~Guardian1239
Thanks!

1. It depends on which script you are using but I would place it  just bellow Materials and above every other scripts since it rewrites the Window_MenuStatus' Refresh method.

2.Yes it does!
Awesome!  I look forward to using it!
Script updated to version 1.3
Another bug fixed with my Party Changer script.
Um.. I'm confused, this script doesn't seem to work at all for me. I've tried it with the game I'm working on (Using Scripts such as Tankentai SBS and some of your other scripts) and I've tried it in a new game alone. But when I use the event command "Change Party Member..." to add a member (when having 4 members in the party), the new member neither shows up in the menu or in battle. I've tried pressing each key on my keyboard, including page up and down, and nothing.

Is there something I'm doing wrong? Do I need to use a call script? I have your Custom Command script thrown in there with this as well, in both attempts, and still nothing.

Thanks in Advance.
~Inno
Correct me if I'm wrong, but I think Tankentai's CBS alters some methods of Game_Party. Try to put the script below the CBS.
If it does not work, I'll take a look at the CBS and fix the bug.
Nope, still nothing. It just won't add that 5th Member. :(

~Inno
I have a problem with the script. I use the Tankentai Side View Battle System, and I can't have more than 5 people. I have in your large party script AND that script set to 6 people, but when I try to add a 6th, it won't work. 5 works perfectly, but 6 isn't working.
My script is not compatible with Tankentai CBS. However, I know there's an option in his CBS that let you choose the max members in battle.
I know, but I changed that value, too. I'll try to find a way to work around it. :dead:
Erm, the script doesn't work with Battle Test.
It's because you can't setup more than 4 actors for the battle test. However, I can add a feature that would let you have more than 4 party members in battle test. It would require to change a variable in the script editor each time you test a battle though.
That'd be testing two scripts at once... and since I'd need to make a lot more of my game to test it normally in it... might as well.
When i try to call the Audio-Adjustment-Menu Script
from the Script "Audio-Adjustment" i get this Error after i close it:

http://s7.directupload.net/images/080828/f4hngpg5.jpg[/img]

i just renamed the Script into "More then 4 Players" in German,
so i can find it with more ease.

Audio Adjustment Script:
http://www.hbgames.org/forums/http://dev.r ... 72#p522672

I tried so far:
Changing the Script Order.
wait, the error is in the large party script and not in the party changer!?!?!?
Now I understand. It's this line, right?
self.contents = Bitmap.new(width - 32, height - 32)
Expand to see the code.

Hmm? Looks like this script is outdated... I thought I have updated it not long ago 0.o
Try downloading the demo of the Party changer. In there you'll find the new version of the large party script.
Dargor wrote:
wait, the error is in the large party script and not in the party changer!?!?!?
Now I understand. It's this line, right?
self.contents = Bitmap.new(width - 32, height - 32)
Expand to see the code.

Hmm? Looks like this script is outdated... I thought I have updated it not long ago 0.o
Try downloading the demo of the Party changer. In there you'll find the new version of the large party script.


WAAAAH!
ok...could you update the Scripts in the spoilers so my fellow won't have the outdated scripts
who dont download the Demo? Dx

EDIT:
For some wierd reason the Menu pops up after the Audio Menu and
even though i switched the Map Party changer to False you can
change your party...if you DO so the game gives Error in line 1117 or sthing

EDIT2:
Ok the Problem with the Open-Menu is definately the fault of the audio script...
its because its ment to be an Item, so if you initialize it, it will open the menu after.
But why didnt it Initialize the party - thingy? hmm...can you still help me?
Just in case you didnt noticed, i will bump my question with this reply:
You get an Error when you choose partymembers and there is no one in the Party.
its when you try to select "no one", dont remember the line but it was sthing with
"play se cancel / buzzer" one of the sounds lol.
ok thanks. I'll be able to work on it tomorrow night so you can expect an update this weekend.
Dargor wrote:
ok thanks. I'll be able to work on it tomorrow night so you can expect an update this weekend.


cool! i will wait for it! <3

Edit:
sometimes i could just kick myself into the face.
I always mess up posting in the right topic eh?
Sorry, I didn't had the time to work on it. I'll try to update it ASAP.
Yea similar to an earlier post, it clashes with RPG tankentai v2.7. I have a 4 member battle party but a 8 member party. So when i have all 8 characters (using yoru Large Party script) in battle, it'll have the 4 character thats going ot be in battle but when im done choosing the action for the 4th guy, the other characters thats not suppose to be in battle, the 5th,6th,7th,and 8th, the game will ask me to actiosn for them too >_<


Is there any way you can fix this? I gave Mr.bubbles the heads up on my problem too.



i also get that BITMAP error from one of the earlier posts.
It's because the tankenta CBS has it's own Large Party system. And unless someone modifies a good part of it, my large party script won't be compatible, because the CBS depends on a couple of variables related to its own large party system.

And about the bitmap bug, if you are using my party changer, the problem is probably the 'locked' picture. Make sure its extension is .png
If it's not the problem, then can you give me more details please?

Take care!
-Dargor 
PingPong wrote:
Yea similar to an earlier post, it clashes with RPG tankentai v2.7. I have a 4 member battle party but a 8 member party. So when i have all 8 characters (using yoru Large Party script) in battle, it'll have the 4 character thats going ot be in battle but when im done choosing the action for the 4th guy, the other characters thats not suppose to be in battle, the 5th,6th,7th,and 8th, the game will ask me to actiosn for them too >_<


Is there any way you can fix this? I gave Mr.bubbles the heads up on my problem too.



i also get that BITMAP error from one of the earlier posts.


ok i had 8 members too, but that battles became boring so i made 6.
now to your Problem:

look for this in the Tankentai battle script:
(line 70 - 78 at mine)
and change it to this:
(for 6 player)
[spoiler]#--------------------------------------------------------------------------
# â €”
@ Dargor
well when i started a new project in order to test a few things, i had an NPC add party members. I went through an put the size i want (8) to all parts of the script that is need. The @Max_Member = 8 and the little $game_party.members.size-8

but when i talk to then NPC, i open up the menu and i get the bitmap error.


@Yion
No, i dont want all 8 members out on the field, just 4, but instead, when im done choosing action for the 4 characters thats on the field, it'll ask me for the actions of the other characters that arent suppose to be in battle.

for example

*should only be 4 characters in battle and on the field. And 8 total party members in the party overall
-Choosing Action-
Character 1 -> Attack
Character 2 -> Defend
Character 3 -> Magic
Character 4 -> Heal

(and thats when they are suppose to do those action but instead, the game continues to ask me to choose actions for the rest of the part members when they arent suppose to be in battle.) then i get an error.


[EDIT]
ok at around lines 1191 or something on the Sideview battle, it asks me to add in the character IDs in the battle. Well now, after the 4th character's action is chosen, it gets an error right there.

http://i217.photobucket.com/albums/cc22 ... tled-4.jpg[/img]
PingPong wrote:
@ Dargor
well when i started a new project in order to test a few things, i had an NPC add party members. I went through an put the size i want (8) to all parts of the script that is need. The @Max_Member = 8 and the little $game_party.members.size-8

but when i talk to then NPC, i open up the menu and i get the bitmap error.


@Yion
No, i dont want all 8 members out on the field, just 4, but instead, when im done choosing action for the 4 characters thats on the field, it'll ask me for the actions of the other characters that arent suppose to be in battle.

for example

*should only be 4 characters in battle and on the field. And 8 total party members in the party overall
-Choosing Action-
Character 1 -> Attack
Character 2 -> Defend
Character 3 -> Magic
Character 4 -> Heal

(and thats when they are suppose to do those action but instead, the game continues to ask me to choose actions for the rest of the part members when they arent suppose to be in battle.) then i get an error.


[EDIT]
ok at around lines 1191 or something on the Sideview battle, it asks me to add in the character IDs in the battle. Well now, after the 4th character's action is chosen, it gets an error right there.

http://i217.photobucket.com/albums/cc22 ... tled-4.jpg[/img]




Why dont you just do 4 Players in your party but do another 4 Players into Reserve using Dargor's Party Manager? you could just change them after battles / in battles then.
(just do Large Party Script to Max Member 4 and use the Party Manager script =P)
i FREAKING LOVE MYSELF :D


I found a fix all by myself ^_^ and it fixed ALL of the problems.

Thats right, i made the large party script compatible with RPG tankentai's

Well i had help from mr. bubble, so he told me to get KGC's large party instead as its compatible, but i love Dargor's large party and i need it for his awesome party changer. So i decided to use BOTH KGC's AND Dargor's party changer.

It works! I putted Dargor's above KGC.

Now, Dargor's large party is used for his Party changer and it works and KGC is used for battle. Since KGC doesnt render all party member into the battle, you can use Dargor's party changer to switch characters.


Im soo happy right now, i've been having this problem for WEEKS.
PingPong wrote:
i FREAKING LOVE MYSELF :D


I found a fix all by myself ^_^ and it fixed ALL of the problems.

Thats right, i made the large party script compatible with RPG tankentai's

Well i had help from mr. bubble, so he told me to get KGC's large party instead as its compatible, but i love Dargor's large party and i need it for his awesome party changer. So i decided to use BOTH KGC's AND Dargor's party changer.

It works! I putted Dargor's above KGC.

Now, Dargor's large party is used for his Party changer and it works and KGC is used for battle. Since KGC doesnt render all party member into the battle, you can use Dargor's party changer to switch characters.


Im soo happy right now, i've been having this problem for WEEKS.


like i said:
it is compatible.
i just dont get what you wanted lol.
Hmmm, that's weird, the version here is 1.3 and I have updated this script 2 months ago to version 1.6.
Did I really forgot to update the topic!?!? Sorry about that.

Try to use the new version. Maybe it will solve your problems.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=42720