Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> Window_Selectable_List request
Tsukihime
post Apr 30 2012, 02:10 PM
Post #1


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




EDIT: oops this should be in RGSS3 script request lol

I'm still pretty bad at coding windows, but see some "types" of windows that should exist as raw templates for others to use.

I would like the following window with at least the following class definition (or something like it)

Window_Selectable_List

CODE
class Window_Selectable_List < Window_Selectable

   def initialize
      ...
      @selected = [] #the items you have selected
      @data =[] #the options you have, generated from some other source
   end

   def required
      5 #Default required number of items before you can proceed
   end

   def max_slots
      5 #Default number of slots that should be drawn
   end

   def item?(index)
      @selected[index] != nil #check if it's not nil
   end

   #implement drawing like this or something
   def draw_all_items
      for i in 0 .. max_slots
         if item?(i)
            #draw the item
         else
            draw_text("---")
         end
      end
   end
end


This is an extension of a selectable window.
When you select an item, it should be added to a list of items you have selected.

The basic menu will contain at least two windows. The first window displays the list of items you can choose. The second window displays the items you have chosen.

Pressing "confirm" in the item_list_window will add the item to the selected_list
Pressing "cancel" in the item_list_window will remove the most recently added item from the selected_list

The selected_list_window will list the items you have selected.
When you press the OK button, that will pass the list to other logic processes.
When you select an item from the selected list, that item will be removed from the list (and the other items will be shifted up if necessary)

Define a max_slots attribute that will limit how many items can be selected. Once the max has been reached, the cursor will automatically go to "OK", for convenience.

If you try to select more items, it will not work and you get the buzzer sound effect.

Define a "required" attribute which will indicate how many items you *must* have in the list before you may proceed. The "OK" button will be grayed out if the requirement is not met, and will be white when you are able to confirm.

Example usage: you're enchanting a weapon, you might select up to 3 items: the base weapon, and maybe two enchantment items. You will then press OK to confirm your selection.

Here's a quick idea of how it will function



Also, provide a basic scene that will demonstrate this functionality.

You can adapt it from any existing script as long as it does not depend on anything except the default engine.

This post has been edited by Tsukihime: Apr 30 2012, 02:34 PM


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
rewells
post May 1 2012, 06:06 AM
Post #2


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




im also a coding noob and would like to see a script like this. I'll review my notes from the tutorial section and see what I can come up with


QUOTE (Tsukihime @ Apr 30 2012, 06:10 PM) *
EDIT: oops this should be in RGSS3 script request lol

I'm still pretty bad at coding windows, but see some "types" of windows that should exist as raw templates for others to use.

I would like the following window with at least the following class definition (or something like it)

Window_Selectable_List

CODE
class Window_Selectable_List < Window_Selectable

   def initialize
      ...
      @selected = [] #the items you have selected
      @data =[] #the options you have, generated from some other source
   end

   def required
      5 #Default required number of items before you can proceed
   end

   def max_slots
      5 #Default number of slots that should be drawn
   end

   def item?(index)
      @selected[index] != nil #check if it's not nil
   end

   #implement drawing like this or something
   def draw_all_items
      for i in 0 .. max_slots
         if item?(i)
            #draw the item
         else
            draw_text("---")
         end
      end
   end
end


This is an extension of a selectable window.
When you select an item, it should be added to a list of items you have selected.

The basic menu will contain at least two windows. The first window displays the list of items you can choose. The second window displays the items you have chosen.

Pressing "confirm" in the item_list_window will add the item to the selected_list
Pressing "cancel" in the item_list_window will remove the most recently added item from the selected_list

The selected_list_window will list the items you have selected.
When you press the OK button, that will pass the list to other logic processes.
When you select an item from the selected list, that item will be removed from the list (and the other items will be shifted up if necessary)

Define a max_slots attribute that will limit how many items can be selected. Once the max has been reached, the cursor will automatically go to "OK", for convenience.

If you try to select more items, it will not work and you get the buzzer sound effect.

Define a "required" attribute which will indicate how many items you *must* have in the list before you may proceed. The "OK" button will be grayed out if the requirement is not met, and will be white when you are able to confirm.

Example usage: you're enchanting a weapon, you might select up to 3 items: the base weapon, and maybe two enchantment items. You will then press OK to confirm your selection.

Here's a quick idea of how it will function



Also, provide a basic scene that will demonstrate this functionality.

You can adapt it from any existing script as long as it does not depend on anything except the default engine.



__________________________
Go to the top of the page
 
+Quote Post
   
rewells
post May 14 2012, 07:34 AM
Post #3


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




Hey, I haven't forgot about you - unfortunately I just don't know enough to do this. Can anyone else help?


QUOTE (rewells @ May 1 2012, 10:06 AM) *
im also a coding noob and would like to see a script like this. I'll review my notes from the tutorial section and see what I can come up with


QUOTE (Tsukihime @ Apr 30 2012, 06:10 PM) *
EDIT: oops this should be in RGSS3 script request lol

I'm still pretty bad at coding windows, but see some "types" of windows that should exist as raw templates for others to use.

I would like the following window with at least the following class definition (or something like it)

Window_Selectable_List

CODE
class Window_Selectable_List < Window_Selectable

   def initialize
      ...
      @selected = [] #the items you have selected
      @data =[] #the options you have, generated from some other source
   end

   def required
      5 #Default required number of items before you can proceed
   end

   def max_slots
      5 #Default number of slots that should be drawn
   end

   def item?(index)
      @selected[index] != nil #check if it's not nil
   end

   #implement drawing like this or something
   def draw_all_items
      for i in 0 .. max_slots
         if item?(i)
            #draw the item
         else
            draw_text("---")
         end
      end
   end
end


This is an extension of a selectable window.
When you select an item, it should be added to a list of items you have selected.

The basic menu will contain at least two windows. The first window displays the list of items you can choose. The second window displays the items you have chosen.

Pressing "confirm" in the item_list_window will add the item to the selected_list
Pressing "cancel" in the item_list_window will remove the most recently added item from the selected_list

The selected_list_window will list the items you have selected.
When you press the OK button, that will pass the list to other logic processes.
When you select an item from the selected list, that item will be removed from the list (and the other items will be shifted up if necessary)

Define a max_slots attribute that will limit how many items can be selected. Once the max has been reached, the cursor will automatically go to "OK", for convenience.

If you try to select more items, it will not work and you get the buzzer sound effect.

Define a "required" attribute which will indicate how many items you *must* have in the list before you may proceed. The "OK" button will be grayed out if the requirement is not met, and will be white when you are able to confirm.

Example usage: you're enchanting a weapon, you might select up to 3 items: the base weapon, and maybe two enchantment items. You will then press OK to confirm your selection.

Here's a quick idea of how it will function



Also, provide a basic scene that will demonstrate this functionality.

You can adapt it from any existing script as long as it does not depend on anything except the default engine.




__________________________
Go to the top of the page
 
+Quote Post
   
rewells
post May 14 2012, 07:47 AM
Post #4


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




Are you looking for something like this? It's similar to FFIX's equipment synthesis system.

[quote name='rewells' date='May 14 2012, 11:34 AM' post='559012']
Hey, I haven't forgot about you - unfortunately I just don't know enough to do this. Can anyone else help?



__________________________
Go to the top of the page
 
+Quote Post
   
Jonnie19
post May 14 2012, 11:49 AM
Post #5


Are you trying to rise from your lullaby?
Group Icon

Group: Global Mod
Posts: 1,311
Type: Developer
RM Skill: Intermediate
Rev Points: 45




Moved this to Script Requests for you. For future reference if you do post in the wrong section you can use the report button to let us know biggrin.gif and can move it for you


__________________________

Finished Projects:
Slenderman's Army:


Go to the top of the page
 
+Quote Post
   
Tsukihime
post May 14 2012, 02:22 PM
Post #6


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




I've written the window selectable list myself lol


http://www.rpgmakervxace.net/topic/3593-wi...electable-list/


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
rewells
post May 16 2012, 09:29 AM
Post #7


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




The link is broken.

QUOTE (Tsukihime @ May 14 2012, 06:22 PM) *
I've written the window selectable list myself lol


http://www.rpgmakervxace.net/topic/3593-wi...electable-list/



__________________________
Go to the top of the page
 
+Quote Post
   
Tsukihime
post May 16 2012, 01:10 PM
Post #8


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




Really works fine for me.


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
rewells
post May 16 2012, 04:08 PM
Post #9


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




Oh I think you need an account to view it.

QUOTE (Tsukihime @ May 16 2012, 05:10 PM) *
Really works fine for me.



__________________________
Go to the top of the page
 
+Quote Post
   
Tsukihime
post May 16 2012, 07:14 PM
Post #10


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




Interesting.

Anyways here's a direct link http://db.tt/4xmceWMd


__________________________
My Scripts
Go to the top of the page
 
+Quote Post
   
rewells
post May 17 2012, 03:13 AM
Post #11


Level 13
Group Icon

Group: Revolutionary
Posts: 222
Type: Event Designer
RM Skill: Skilled




Thanks. This is awesome!

QUOTE (Tsukihime @ May 16 2012, 11:14 PM) *
Interesting.

Anyways here's a direct link http://db.tt/4xmceWMd



__________________________
Go to the top of the page
 
+Quote Post
   
Tsukihime
post May 17 2012, 08:06 AM
Post #12


Level 25
Group Icon

Group: Revolutionary
Posts: 560
Type: None
RM Skill: Undisclosed
Rev Points: 25




I just realized the design is flawed after trying to fix another script that used this thing.

Selectable_List should function as an actual selectable list, rather than just a regular list.
The window should store both a selected list of data, as well as the regular list of data.

This post has been edited by Tsukihime: May 17 2012, 08:06 AM


__________________________
My Scripts
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: 19th May 2013 - 06:41 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker