Party Selection Screen Script: Need Help

KrispyTheKorn

Villager
Member
Joined
May 25, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Hi again. I've recently been trying to put together a Party Selection scene that will allow the player to recruit three additional actors to their team before going on 'Missions', but I have come to a slight (Massive) stumbling block. The scene is working (if not slightly buggy) and currently the player is able to select from a pool of four actors, but in time I will want to have far more characters available (The entire crew of the players Starship).

Here is a .png image of my menu ...

What I'm currently trying to achieve is to lock away the 'Manley' actor by either graying him out or hiding him completely in the menu scene until he is found/unlocked (by script call) but I have no idea how I would go about doing that.

Here is my script in it's current state. Please be gentle this is my first real attempt at scripting something into my game ...

class AwayTeamWindow < Scene_IzzyMenuBase2    def start    super    create_command_window    create_status_window  end  #===============================================================================#===============================================================================    def create_command_window        @command_window = CmdWin2.new    @command_window.set_handler:)zack,    method:)command_zack))    @command_window.set_handler:)nicola,    method:)command_nicola))    @command_window.set_handler:)jones,    method:)command_jones))    @command_window.set_handler:)manley,    method:)command_manley))    @command_window.set_handler:)clear,    method:)command_clear))    @command_window.set_handler:)cancel, method:)return_scene))      end    def create_status_window      @status_window = Window_MenuStatus.new(@command_window.width, 0)  end    def command_zack      $game_party.add_actor(11)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))end    def command_nicola      $game_party.add_actor(12)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))      end    def command_jones      $game_party.add_actor(17)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))          end     def command_manley      $game_party.add_actor(18)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))  end     def command_clear      $game_party.remove_actor($game_party.members[1].instance_variable_get:)@actor_id))      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))    end    #===============================================================================#===============================================================================      class CmdWin2 < Window_Command  def initialize    super(0, 0)  end    def make_command_list    main  end    def window_width    return 180  end    def window_height    return 170  end    def main    add_command("Zack",   :zack)    add_command("Nicola",   :nicola)    add_command("Jones",   :jones)    add_command("Manley",   :manley)    add_command("Remove Member",   :clear)    add_command("Confirm",   :cancel)  endendend
Any help with this would be massively appreciated. Apologies if I have posted this inside the wrong forum section!
 
Last edited by a moderator:

AwesomeCool

Bratty and spoiled little sister
Veteran
Joined
Jul 20, 2013
Messages
2,862
Reaction score
1,947
First Language
English
Primarily Uses
N/A
If you use note-tags and loops (look it up in the help section), you should be able to add a infinite number of character to the list (rather then hard coding each character).
 
Last edited by a moderator:

Peridot Gaming

Veteran
Veteran
Joined
Nov 25, 2012
Messages
123
Reaction score
14
First Language
English
Primarily Uses
This is a bit of self-promotion from me but my party select script may do what you are trying to achieve: http://forums.rpgmakerweb.com/index.php?/topic/30909-party-select-screen/

Basically you make a call to the script, specifying the actor ids that are already in the party (along with being able to stop any of them from being removed - handy if you always want a main character to be there), and also a list of actor ids for what characters are available to be selected.  This means that at different times during your game you can call the party select screen and pass it a completely different list of actors that can be chosen from.  That would allow you to only display the actors that have been "found" so far.  There should be no limit in how many actors can be selected from, and you can also specify the minimum and maximum number of actors that can be in your party when selecting.

The topic that I linked has a downloadable demo, but if you needed any help with it just let me know.

If it's not what you're looking for, then feel free to ignore me.  :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

KrispyTheKorn

Villager
Member
Joined
May 25, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Thank you for your replies!

@Peridot Gaming Thanks mate, that looks exactly how I originally envisioned my own character select screen, so I will give that a bash and get back to you when I have something worth showing.

Apologies for posting in the wrong forum!
 

Peridot Gaming

Veteran
Veteran
Joined
Nov 25, 2012
Messages
123
Reaction score
14
First Language
English
Primarily Uses
I'm glad that it might be something useful for you.

Just let me know if you need any help, or if you find a bug.  Like I mentioned in the script topic I haven't come across any bugs or incompatibilities, but I may have missed something.
 

KrispyTheKorn

Villager
Member
Joined
May 25, 2014
Messages
11
Reaction score
0
First Language
English
Primarily Uses
Hey again.

I looked into your script and found that it worked wonderfully except for one major issue that is basically a problem with how my game works.

In your script you call up specific ID's to be listed in the character select screen (as you obviously know), this is great if the story progresses linearly, adding new Actor ID's as the player progresses. Unfortunately my game is in no way linear, the player can find/collect actors in such a fashion that they can be recruited at tradings posts, found in the field or even acquired as quest rewards, which adds issues in specifying any one list of Actor ID's at any point in the game. As a result your scripts method is impractical for what I need it to achieve. This isn't to say it wasn't useful to me!! Looking at your code and the base scripts found in RPGMaker VX Ace I have been able to find a solution to my problem.

class AwayTeamWindow < Scene_IzzyMenuBase2    def start    super    create_command_window    create_status_window  end  #===============================================================================#===============================================================================   def create_command_window        @command_window = CmdWin2.new    @command_window.set_handler:)zack,    method:)command_zack))    @command_window.set_handler:)nicola,    method:)command_nicola))    @command_window.set_handler:)jones,    method:)command_jones))    @command_window.set_handler:)manley,    method:)command_manley))    @command_window.set_handler:)clear,    method:)command_clear))    @command_window.set_handler:)cancel, method:)return_scene))      end    def create_status_window      @status_window = Window_MenuStatus.new(@command_window.width, 0)  end    def command_zack      $game_party.add_actor(11)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))end    def command_nicola      $game_party.add_actor(12)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))      end    def command_jones      $game_party.add_actor(17)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))          end     def command_manley      $game_party.add_actor(18)      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))  end     def command_clear      $game_party.remove_actor($game_party.members[1].instance_variable_get:)@actor_id))      @command_window.activate      SceneManager.goto(AwayTeamWindow)      $game_party.remove_actor($game_party.members[4].instance_variable_get:)@actor_id))    end    #===============================================================================#===============================================================================      class CmdWin2 < Window_Command  def initialize    super(0, 0)  end    def make_command_list    main  end    def window_width    return 180  end    def window_height    return 170  end    def main    add_command("Zack",   :zack)    add_command("Nicola",   :nicola)    add_command("Jones",   :jones)    add_command("Manley",   :manley, manley_enabled) ### Locked unless switch 23 is enabled    add_command("Remove Member",   :clear)    add_command("Confirm",   :cancel)  end    #--------------------------------------------------------------------------  # * Get Activation State of Character // Switch 23  #--------------------------------------------------------------------------  def manley_enabled    $game_switches[23]  endendend
Basically after lots of trial and error I found the function I needed to lock/unlock the 'Manley' Actor, via a switch that can be triggered in game ... which works perfectly for my intended purpose. It's still rough around the edges, but it works :)

Thanks again for your help Peridot Gaming! I'm happy to leave this script here for anybody else that has similar issues.

This topic can be locked now!
 

Peridot Gaming

Veteran
Veteran
Joined
Nov 25, 2012
Messages
123
Reaction score
14
First Language
English
Primarily Uses
Hey again.

I looked into your script and found that it worked wonderfully except for one major issue that is basically a problem with how my game works.
Glad you managed to get your script sorted, but your identifying an issue actually made me want to go and find a way around it myself.  As it turns out, there is a way to do this without needing to hardcode the actor ids that can be sent to the script for selection.
All you need to do is to set aside a variable that you will use and define it like this at the start of your game (or at least before attempting to use it for the actor ids):

$game_variables[x] = []Where x is the variable id.And then whenever you want to add an actorid when you have found the person and want to have them be selectable from then on, you just need to make this call:

$game_variables[x].push(y)Where x is the variable id set up in the previous step, and y is the actor id that you want to have added to the array.
When you are then ready to call the party select script, you can use this syntax:

Code:
@partySelect = PartySelector.new([locked_actor],$game_variables[x], min_party, max_party, level_up_to_actor)
Thanks for making me go and look to see if this is doable, because it makes it quite nice to be able to find that out. It should also be possible to just pop any of the actor id's out of the variable so they are no longer selectable (if they were killed or lost for example).
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top