Main Menu
  • Welcome to The RPG Maker Resource Kit.

Integrated Reserve Party

Started by modern algebra, May 08, 2009, 01:51:15 AM

0 Members and 1 Guest are viewing this topic.

duckput

#50
thanks! it works perfectly.  ;8


EDIT: just 1 more question, i'm also using your quest journa script v 1.1.
when ever i test my game, i open the 'Quest' menu everything is fine, until i pressed my escape button, to go to the previous menu, an error pop up and it says

"Script Diary v 1.0 line 832 ArgumentError occured.
comparison of string with 4 failed"

is it related to this party script?

modern algebra

No, the Diary and Quest Journal scripts are just incompatible when both are used in the menu. It's not hard to fix, you just need to do a little replacing. It's a fairly simple thing to make them compatible though. All you really need to do is go into the diary script, find the line that says:

elsif menu_index >= Data_DiaryEntries::MENU_INDEX

and replace it with:


elsif menu_index.is_a? (Integer) && menu_index >= Data_DiaryEntries::MENU_INDEX

duckput

it did fix some problems, but when i go to the quest menu and press my esc button to go back to the previous menu, another error popped up saying:

Script 'Integrated Reserve Party' line 686: ArgumentError occurred.
comparison of String with 5 failed.

Help... (again)

modern algebra

Is the Integrated Reserve Party above both the Diary and the Quest Journal in the Script Editor? Try that.

duckput

I never thought about placing it in different orders.
Anyway the script is already on top of every other scripts, but I got it everything to work by placing the party script below every other scripts
woohoo ;8

your scripts are awesome btw.

Infinate X

This reminds me of Mario RPG! That game freezes for me every time I beat johney so I can't beat it >:( 


:dwi:

MonkeyMan454

I don't understand how to put this in my game can anyone help me?

heisenman

Just paste it in the script editor below Material but above Main o:

yuyu!

#58
@ Grafikal009: Just about the same for me :)
I just wanted to say that I really appreciate these scripts, this one in particular is probably my favorite. It works nicely since I like making many characters to switch out and use. :D

[Spoiler=My Games and Art]
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]

[/Spoiler]

Forty

I was playing with your script and I noticed that the reserve party does not gain exp. Although this is fine for me, I thought I would bring it to your attention.

modern algebra

They do as long as the PARTY_CHANGE_RESERVE_EXP_PERCENT constant isn't set to 0. It is probably an incompatibility with another script though. Maybe one that overwrites levelup stuff or a different battle script.

modern algebra

I wrote an addon that will allow you to lock an actor to a position, so that he or she cannot be shifted around at all. It is useful, for instance, if you want the main character to always be the lead actor.



#==============================================================================
#    Lock Position
#      Addon to Integrated Reserve Party 1.0d
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: December 23, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:

#    This addon allows you to lock an actor to the position they are in. This
#   is useful if you always need a particular actor to be in the lead.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this script in its own slot above Main but below the Integrated
#   Reserve Party script in the Script Editor.
#
#    To lock an actor in position, place the following code in a Script command:
#
#        lock_position (actor_id)
#          actor_id : the ID of the actor you want to lock.
#
#    To unlock, use the following code:
#
#        unlock_position (actor_id)
#          actor_id : the ID of the actor you want to unlock.
#
#    To set what icon will be shown for actors who are locked in position, go
#   to line xx and choose the icon index.
#==============================================================================

IRP_LOCK_POSITION_ICON_INDEX = 81

#==============================================================================
# ** Game Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new accessor instance variable - position_locked
#    aliased method - setup
#==============================================================================

class Game_Actor
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_accessor :irp_position_locked
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Setup
  #     actor_id : actor ID
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_resrvlock_stup_8hg3 setup
  def setup (*args)
    @irp_position_locked = false
    # Run Original Method
    ma_resrvlock_stup_8hg3 (*args)
  end
end

#==============================================================================
# ** Game_Interpreter
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    new method - lock_position, unlock_position
#==============================================================================

class Game_Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Lock Position
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def lock_position (actor_id)
    $game_actors[actor_id].irp_position_locked = true
    $game_party.ma_lock_party (actor_id)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Unlock Position
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def unlock_position (actor_id)
    $game_actors[actor_id].irp_position_locked = false
    $game_party.ma_unlock_party (actor_id)
  end
end

#==============================================================================
# ** Window_MenuStatus
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - refresh
#==============================================================================

class Window_MenuStatus
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias malbra_lckposton_refrsh_7yv4 refresh
  def refresh (*args)
    malbra_lckposton_refrsh_7yv4 (*args) # Run Original Method
    ($game_party.members + $game_party.ma_reserve_members).each { |actor|
      next unless actor.irp_position_locked
      rect = Rect.new (self.contents.width - 32, actor.index*96 + 8, 24, 24)
      self.contents.clear_rect (rect)
      draw_icon (IRP_LOCK_POSITION_ICON_INDEX, rect.x, rect.y)
    }
  end
end 

#==============================================================================
# ** Scene_Menu
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased methods - ma_select_active; ma_select_reserve
#==============================================================================

class Scene_Menu
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Select Active
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mara_slctact_lockpos_6uc1 ma_select_active
  def ma_select_active (index, *args)
    if $game_party.members[index] && $game_party.members[index].irp_position_locked
      Sound.play_buzzer
      return
    end
    mara_slctact_lockpos_6uc1 (index, *args) # Run Original Method
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Select Reserve
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias mara_slctres_lockpos_2ef3 ma_select_reserve
  def ma_select_reserve (index, *args)
    if $game_party.members[index] && $game_party.members[index].irp_position_locked
      Sound.play_buzzer
      return
    end
    mara_slctres_lockpos_2ef3 (index, *args) # Run Original Method
  end
end


The actor will need to be in the position that you want him or her to be in before you lock it. I probably should have added the function to specify a position to lock him or her to, but I kind of grew tired of looking at how terrible I used to be at scripting :P In any case, you want to do it at the start of the game so it shouldn't be a problem. Even if you want to do it midgame or something, it isn't too hard to rearrange the party manually first using the Change Party Member event command.

Adrien

This may have been answered but:

- How would I call this via an npc interaction?
- How would I exclude - not lock - specific actors out so they don't appear?

yuyu!

#63
To have this called by an NPC... I think you can change the maximum of the reserve with this command: "change_reserve_maximum (new_maximum)" to make it look like the reserve is not there by setting it to "0", then call the command and change it via your NPC scene. I'll have to test that out. :) I don't know about the other question yet, I'll look around the script.

*EDIT* If you want the actor to be excluded and return by event, you could always make them leave the party with normal eventing and make them rejoin with eventing, but do not "initialize" them when they return. Is that what you mean? :)

[Spoiler=My Games and Art]
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]

[/Spoiler]

Adrien

Sorry I got this mixed up with a party switcher script. >_> doesnt look like this is what I wanted. but nice script

yuyu!

I think MA has a seperate party script as well. I'll check it out and PM you if it helps your request. Sound good? :)

[Spoiler=My Games and Art]
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]

[/Spoiler]

Adrien


Forty

Quote from: modern algebra on December 19, 2010, 11:36:30 PM
They do as long as the PARTY_CHANGE_RESERVE_EXP_PERCENT constant isn't set to 0. It is probably an incompatibility with another script though. Maybe one that overwrites levelup stuff or a different battle script.

That's probably exactly what happened. No big deal, I'll just make an arena or something in the game, haha.

ShortStar

This doesn't seem to work. Could it be Yanfly now uses a Main Menu Melody instead of a Scene Menu Redux? I have tried both compatability patches. Now I will go looking for help.

Mr G W

#69
Im using zeriab caterpillar with this script. the caterpillar only refreshes if i swap the actor 1. is there any way to always refresh the caterpilar when i switch the party members?

It doesnt work with Full Status CMS...

modern algebra

No, well it was never ever intended to work with any custom menu systems - after all, something can really only be integrated when you have knowledge of what you are integrating it with. That said, I can do something about the Caterpillar script, but I am fairly busy at the moment and I might forget. Maybe you can remind me by PM if I haven't done this by this time next week?

Mr G W

#71
Sure, no prob.

EDIT: The caterpillar script also doesnt refresh if i place multiple actors in the reserve. the first gets removed and the others stay following. In other works, it doesnt always refresh.

Mr G W

Theres a bug where even if you set a minimum active number, you can still place party members in the reserve party by selecting the first empty space in the reserve party. The second empty slot and so on work fine.

Kotone123

Wonderful script you have there. I tested it and it works fine. :D

Kotone123

I love this script, and I definently recommend it to anyone. But Algebra? Quick question, does this work with Full Status CMS?