Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3-person Party Script
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Hey guys. I just edited the script so that the party member limit is 3 instead of 4, like in Chrono Trigger or some recent Final Fantasies.

First, go to the Window_MenuStatus page, and look at this part:

Code:
class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # â—? オブジェクトåˆ?期化
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype � # "Main" window font
    self.contents.font.size = $defaultfontsize
    refresh
    self.active = false
    self.index = -1
  end

The second "480" is the height of the Window_MenuStatus, which is the part of the main menu where you see all your party members and their Name, Level, HP, etc. Change the height to 360. The window should now be big enough to fit three party members and look right. I figured this out by discovering that adding 120 will eventually add up to 480. I simply subtracted 480 by 120 to get the window how I want it.

Next, go to Game_Party and scroll down until you run into this code:

Code:
def add_actor(actor_id) #This is somewhere in Game_Party page.
   # アクターをå?–å¾—
   actor = $game_actors[actor_id]
   # パーãƒ� ィ人数ã?Œ 4 人未満ã?§ã€?ã?“ã?®ã‚¢ã‚¯ã‚¿ãƒ¼ã?Œãƒ‘ーãƒ� ã‚£ã?«ã?„ã?ªã?„å� ´å?ˆ
   if @actors.size < 4 and not @actors.include?(actor)
     # アクターを追å� �
     @actors.push(actor)
     # プレイヤーをリフレッシュ
     $game_player.refresh
   end
end

Change the 4 beside @actors.size into 3, so that it reads:

Code:
if @actors.size < 3 and not @actors.include?(actor)


When your team has 3 members and you try to add another, nothing will happen. The member won't be in the party.

Now when you get into a battle, you'll see a big blank space at the right of the status window, where the fourth member would be. To do something about that, you edit this part of the Window_BattleStatus page:

Code:
def refresh #Find this in Window_BattleStatus, it controls the heroes' status position.
   self.contents.clear
   @item_max = $game_party.actors.size
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     actor_x = i * 160 + 4
     draw_actor_name(actor, actor_x, 0)
     draw_actor_hp(actor, actor_x, 32, 120)
     draw_actor_sp(actor, actor_x, 64, 120)
     if @level_up_flags[i]
       self.contents.font.color = normal_color
       self.contents.draw_text(actor_x, 96, 120, 32, "Level Up")
     else
       draw_actor_state(actor, actor_x, 96)
     end
   end
end


In the line of code that says actor_x = i * 160 + 4, change the 160 to 240. This makes the second member's status appear in the middle, and the third member's status appear at the right; just about where the fourth member would usually be. It took me many tries but I got it.

Last is to do something about the battlers. They will still be in their default positions. We want the hero's battler to appear in the middle of their status like normal. You do that by going here, under Game_Actor:


Code:
def screen_x #This is under the Game_Actor page, it controls the hero's battler positions.
   # パーãƒ� ã‚£å� …ã?®ä¸¦ã?³é� � ã?‹ã‚‰ X 座標を計算ã?—ã?¦è¿”ã?™
   if self.index != nil
     return self.index * 160 + 80
   else
     return 0
   end
end


See that 160? Change it to 240; the same number x coordinate as the hero's status stuff. Now the hero's battler will appear in the middle of their respective status like it should be.

Doing all this should have spaces between each of the three heroes, instead of three of them together and a huge blank space at the end. I think it looks slightly better this way, but you can still edit the positions as you please.


There you go. By the way, there's an issue I haven't quite got figured out yet. If you have four members in the initial party from the Database, that fourth member will be in the group. You would also be able to access their equip or status screen in the menu, but you won't see them (nor the cursor highlighter over them). They would also be in battle, but you won't see them. Same goes for Test Battle, the fourth member will be in your party in Test Battle mode.

If you remove the fourth member in the initial party after the game starts, everything should work fine then. However, I still need to find out how to remove the fourth hero if your initial party has 4 heroes. Until then, just stick with an initial team of 3 members.


Edit: I just now was able to position the hero's command windows so that the windows appear on top of them, instead of in their default positions -- which I forgot to fix. Go to Scene_Battle3 and in the code:

Code:
def phase3_setup_command_window
   # パーãƒ� ィコマンドウィンドウを無å� ¹åŒ–
   @party_command_window.active = false
   @party_command_window.visible = false
   # アクターコマンドウィンド ‚¦ã‚’有å� ¹åŒ–
   @actor_command_window.active = true
   @actor_command_window.visible = true
   # アクターコマンドウィンドウã?®ä½?置を設定
   @actor_command_window.x = @actor_index * 160
   # インデックスを 0 ã?«è¨­å®š
   @actor_command_window.index = 0
end

Change "160" to 240.
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Change character script jaigai 0 2,737 11-19-2006, 01:00 PM
Last Post: jaigai
  Just a modification of Abyssos' facs script lumina... 0 2,589 11-01-2006, 01:00 PM
Last Post: lumina...
  Credit Script 1.1 acoole 0 2,416 10-24-2006, 01:00 PM
Last Post: acoole
  Script Dev Kit Nick 0 2,792 10-15-2006, 01:00 PM
Last Post: Nick
  Opening Image script sasuke89 0 2,020 07-24-2006, 01:00 PM
Last Post: sasuke89
  Change Color of The diferent Status Script MASTERLOKI 0 2,267 07-18-2006, 01:00 PM
Last Post: MASTERLOKI
  Event Name and ID Search Script Hadriel 0 2,026 06-21-2006, 01:00 PM
Last Post: Hadriel
  Currency Script Split 0 2,273 05-18-2006, 01:00 PM
Last Post: Split
  Book Script and Utility Bruth 0 2,216 05-07-2006, 01:00 PM
Last Post: Bruth
  Individuality Script DrakoShade 0 2,175 03-12-2006, 01:00 PM
Last Post: DrakoShade



Users browsing this thread: