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
> Actor Selection Script 1.0, Opens a menu that let's you choose one of your members.
ubergeek
post Aug 22 2008, 03:05 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Skilled




This is my first script. Basically, it let's you call a single line of code that opens up a menu. From this menu, you can select one of your party members. This stores the party member to $game_party.last_actor_index.

Call this command:
CODE
$scene = Scene_MemberSelect.new



CODE
#======================================================================
========
# ** Scene_MemberSelect
#------------------------------------------------------------------------------
# This class allows you to select one of your party members from a menu.
#==============================================================================

class Scene_MemberSelect < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@status_window = Window_MenuStatus.new(160, 0)
start_actor_selection
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@status_window.update
if @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@status_window.active = false
@status_window.index = -1
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
end_actor_selection
end
end


end


Compatibility:

Unknown. Although it requires testing, I am confident that this script is compatible with most, if not all, other scripts. If any compatibility issues are discovered, please either post them here or message me.

Version 1.0
In future versions, I will add an option to veiw the character's stats before selection. As a note, however, updating this script may not be my highest priority.

EDIT: Version 2 is almost complete. Unfortunately, it is currently expieriencing some difficulties. I'll get it out as soon as I can.

This post has been edited by ubergeek: Aug 22 2008, 03:41 PM


__________________________
A list of my completed Scripts: (All VX)

Call an actor, add their face, even if changed: Character Face Handler

Select a party member and store it as a variable: Actor Selection Tool

Enable a "Quicksave" Feature: Quicksave

============================================

My current project:
Titan's Army
Story: 60%
Maps: 5%
Classes: 40%
Items: 5%
Scripts: 30%
Go to the top of the page
 
+Quote Post
   
ubergeek
post Aug 22 2008, 04:42 PM
Post #2


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Skilled




I'm almost done with the second version of the script, but I've run into two small (read "big") problems.

1. Selecting an actor immediately moves to the status screen. Setting the selection button to different keys on the keyboard averts this problem. Likely, the computer registers the selection key is down for both menus y activates the default selection for the second.

2. The cursor in the command menu cannot be moved, even when cursor_movable? is force-set to "true".


I am including the current script for anyone that wants to take a crack at it and earn themselves the title of co-creator:

CODE
#======================================================================
========
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================

class Scene_MemberSelect < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
$event_select = true
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@status_window = Window_MenuStatus.new(160, 0)
#Now for the command selection
s1 = "Status"
s2 = "Skills"
s3 = "Confirm"
@command_window = Window_Command.new(160, [s1, s2, s3])
@command_window.index = 1
hide_command_menu
start_actor_selection

end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@status_window.dispose
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@status_window.update
if @status_window.active
update_actor_selection
end
if @command_window.active
update_command_selection
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@status_window.active = false
@status_window.index = -1
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
#$game_party.last_actor_index = @status_window.index
Sound.play_decision
command_menu
end
end



#--------------------------------------------------------------------------
# * Hide Command Menu
#--------------------------------------------------------------------------
def hide_command_menu
@status_window.active = true
@command_window.active = false
@command_window.visible = false
end



#--------------------------------------------------------------------------
# * Start Command Menu
#--------------------------------------------------------------------------
def command_menu
@status_window.active = false
@command_window.active = true
@command_window.visible = true
end


#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
hide_command_menu
@status_window.active = true
elsif Input.trigger?(Input::C)
Sound.play_decision
case @command_window.index
when 0 # status
$scene = Scene_Status.new(@status_window.index)
when 1 # skills
$scene = Scene_Skill.new(@status_window.index, -1)
when 2 # confirm
$game_party.last_actor_index = @status_window.index
end_actor_selection
end
end
end

end

#==============================================================================
# ** Scene_Skill
#------------------------------------------------------------------------------
# This class performs the skill screen processing.
#==============================================================================

class Scene_Skill < Scene_Base

#--------------------------------------------------------------------------
# * Return to Original Screen
#--------------------------------------------------------------------------
def return_scene
if $event_select #If called from Memberselect
$scene = Scene_MemberSelect.new
else #If called from the menu
$scene = Scene_Menu.new(1)
end
end
end

#==============================================================================
# ** Scene_Status
#------------------------------------------------------------------------------
# This class performs the status screen processing.
#==============================================================================

class Scene_Status < Scene_Base

#--------------------------------------------------------------------------
# * Return to Original Screen
#--------------------------------------------------------------------------
def return_scene
if $event_select #If called from Memberselect
$scene = Scene_MemberSelect.new
else #If called from the menu
$scene = Scene_Menu.new(3)
end
end
end



__________________________
A list of my completed Scripts: (All VX)

Call an actor, add their face, even if changed: Character Face Handler

Select a party member and store it as a variable: Actor Selection Tool

Enable a "Quicksave" Feature: Quicksave

============================================

My current project:
Titan's Army
Story: 60%
Maps: 5%
Classes: 40%
Items: 5%
Scripts: 30%
Go to the top of the page
 
+Quote Post
   
Grandhoug
post Aug 22 2008, 04:47 PM
Post #3


Level 5
Group Icon

Group: Member
Posts: 70
Type: Developer
RM Skill: Undisclosed




do you relize there's another script like this, but it's always good u posted it anyway


__________________________
Fly like a rhino, sting like shock paddles.
Go to the top of the page
 
+Quote Post
   
ubergeek
post Aug 22 2008, 05:01 PM
Post #4


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Skilled




QUOTE (Grandhoug @ Aug 22 2008, 05:09 PM) *
do you relize there's another script like this, but it's always good u posted it anyway


I'm sorry, I haven't seen this other script.

But you've piqued my interest. Could you provide a link?


__________________________
A list of my completed Scripts: (All VX)

Call an actor, add their face, even if changed: Character Face Handler

Select a party member and store it as a variable: Actor Selection Tool

Enable a "Quicksave" Feature: Quicksave

============================================

My current project:
Titan's Army
Story: 60%
Maps: 5%
Classes: 40%
Items: 5%
Scripts: 30%
Go to the top of the page
 
+Quote Post
   
Grandhoug
post Aug 22 2008, 05:25 PM
Post #5


Level 5
Group Icon

Group: Member
Posts: 70
Type: Developer
RM Skill: Undisclosed




QUOTE (ubergeek @ Aug 22 2008, 08:23 PM) *
QUOTE (Grandhoug @ Aug 22 2008, 05:09 PM) *
do you relize there's another script like this, but it's always good u posted it anyway


I'm sorry, I haven't seen this other script.

But you've piqued my interest. Could you provide a link?


sure (click the smiley)
thumbsup.gif


__________________________
Fly like a rhino, sting like shock paddles.
Go to the top of the page
 
+Quote Post
   
ubergeek
post Aug 22 2008, 05:44 PM
Post #6


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Skilled




QUOTE (Grandhoug @ Aug 22 2008, 05:47 PM) *
QUOTE (ubergeek @ Aug 22 2008, 08:23 PM) *
QUOTE (Grandhoug @ Aug 22 2008, 05:09 PM) *
do you relize there's another script like this, but it's always good u posted it anyway


I'm sorry, I haven't seen this other script.

But you've piqued my interest. Could you provide a link?


sure (click the smiley)
thumbsup.gif


Thanks for the link, but you realize these two scripts are not the same. Let me give you a scenario in which my script might be used:

Our heros wander into a monestary. They are greeted by a sensei, who, for a price, can teach one of the party members the ways of a monk. After paying the price, the game makes you select one party member that will become a monk.


__________________________
A list of my completed Scripts: (All VX)

Call an actor, add their face, even if changed: Character Face Handler

Select a party member and store it as a variable: Actor Selection Tool

Enable a "Quicksave" Feature: Quicksave

============================================

My current project:
Titan's Army
Story: 60%
Maps: 5%
Classes: 40%
Items: 5%
Scripts: 30%
Go to the top of the page
 
+Quote Post
   
Grandhoug
post Aug 22 2008, 06:36 PM
Post #7


Level 5
Group Icon

Group: Member
Posts: 70
Type: Developer
RM Skill: Undisclosed




QUOTE (ubergeek @ Aug 22 2008, 09:06 PM) *
QUOTE (Grandhoug @ Aug 22 2008, 05:47 PM) *
QUOTE (ubergeek @ Aug 22 2008, 08:23 PM) *
QUOTE (Grandhoug @ Aug 22 2008, 05:09 PM) *
do you relize there's another script like this, but it's always good u posted it anyway


I'm sorry, I haven't seen this other script.

But you've piqued my interest. Could you provide a link?


sure (click the smiley)
thumbsup.gif


Thanks for the link, but you realize these two scripts are not the same. Let me give you a scenario in which my script might be used:

Our heros wander into a monestary. They are greeted by a sensei, who, for a price, can teach one of the party members the ways of a monk. After paying the price, the game makes you select one party member that will become a monk.


oooooooo, well then ur description is alittle misleading
I'll try your system out wanna ask something if I end up answering my own question


__________________________
Fly like a rhino, sting like shock paddles.
Go to the top of the page
 
+Quote Post
   
Grandhoug
post Aug 22 2008, 09:38 PM
Post #8


Level 5
Group Icon

Group: Member
Posts: 70
Type: Developer
RM Skill: Undisclosed




hmm... seems that when i call it , it shows a little choice menu but then it goes straight into showing my skills


__________________________
Fly like a rhino, sting like shock paddles.
Go to the top of the page
 
+Quote Post
   
ubergeek
post Aug 23 2008, 04:52 AM
Post #9


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Skilled




QUOTE (Grandhoug @ Aug 22 2008, 10:00 PM) *
hmm... seems that when i call it , it shows a little choice menu but then it goes straight into showing my skills


That's a glitch in the second version that I can't seem to figure out. I believe it's because, by holding down the C button, it believes that we are confirming both the actor selection menu and the options menu. I've been looking at some other scripts but I can't seem to find a way around it.

Of course, that was last night at 10:00, so maybe I'll take another crack at it today.


__________________________
A list of my completed Scripts: (All VX)

Call an actor, add their face, even if changed: Character Face Handler

Select a party member and store it as a variable: Actor Selection Tool

Enable a "Quicksave" Feature: Quicksave

============================================

My current project:
Titan's Army
Story: 60%
Maps: 5%
Classes: 40%
Items: 5%
Scripts: 30%
Go to the top of the page
 
+Quote Post
   
Twilight27
post Aug 23 2008, 08:34 AM
Post #10


Level 19
Group Icon

Group: Revolutionary
Posts: 371
Type: Event Designer
RM Skill: Beginner




The reason this topic has a low amount of replies is because you didn't even explain what the script does exactly. Sure people like us know, but those (constantly asking for help - annoying!) newcomers will be puzzled.
Just to let you know n_n


__________________________

Fall to the power of the Emo!
We have cookies!


Notice!! Check out my topic (http://www.rpgrevolution.com/forums/index.php?showtopic=45736&st=0#entry454175) if you're interested in helping me make a script that limits the number of characters & items you use in battle AND also an item durability feature! Thanks for any help in advance!
Go to the top of the page
 
+Quote Post
   
ubergeek
post Aug 23 2008, 09:04 AM
Post #11


Level 2
Group Icon

Group: Member
Posts: 26
Type: Scripter
RM Skill: Skilled




QUOTE (Twilight27 @ Aug 23 2008, 07:56 AM) *
The reason this topic has a low amount of replies is because you didn't even explain what the script does exactly. Sure people like us know, but those (constantly asking for help - annoying!) newcomers will be puzzled.
Just to let you know n_n


I'll admit, the reason I could not explain what it did was because it was not fully implemented. In better news, version 2.0 is out, which does a much better job of explaining what the tool does.


__________________________
A list of my completed Scripts: (All VX)

Call an actor, add their face, even if changed: Character Face Handler

Select a party member and store it as a variable: Actor Selection Tool

Enable a "Quicksave" Feature: Quicksave

============================================

My current project:
Titan's Army
Story: 60%
Maps: 5%
Classes: 40%
Items: 5%
Scripts: 30%
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: 24th May 2013 - 02:20 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker