Announcement
Announcement
| 2nd Quarter Contest Announcement posted! See the Community Announcements section. |
New threads (complete scripts) here will go into a moderation queue. You will not see your thread appear when you create it. A moderator will decide if it will be approved or denied.
![]() ![]() |
Jul 12 2009, 02:43 AM
Post
#1
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
Custom List & Pages Version 1.3 Author: Aindra If you decide to use this script in your project, you must credit me. Introduction This script will allow you to include the list in your menu (or you can call it from the map if you do not wish to see it in the menu.) Inside the list holds several pages that is full with information you chose to include. It's entirely up to you to do whatever you want with the pages. Please check the screenshots or demo to see what kind of things you can do with your pages. Updates 1.3 Version - You can now call a branch list only in the event, and you can limit the main list's selections (allowing you to hide some branch lists so the player can only view them in the events you prepare.) Features
Screenshots - Beware: 6 pics Spoiler: How to Use WARNING: It is not a beginner-friendly! I tried my best to make it easy for beginners to understand. If you know nothing about RGSS2 scripts, chances is decent that you may get frustated. And also, it is NOT a plug 'n' play (sort of). You can use it and it'll work fine. But you will have to make an effort to set up the pages way you want it be. I made few templates to help you if you don't wish (or don't know how) to make your own templates. You can modify my templates. I recommend getting the latest demo. It has a documented instructions you can read to set up this script. Custom List v1.3 Demo Custom List v1.2 Demo Custom List v1.1 Demo Custom List v1.0 Demo Scripts You have to take all three scripts. Custom Page & Block Spoiler: Page Templates Spoiler: Custom List Spoiler: Above script will attach "Custom List" at end of the menu list. If you do not like it being under "Game End", you can take this KGC_CustomCommandMenu script, and put it above my scripts. It'll allow you to insert it anywhere you want in the list. NOTE: That script is made by Tomy and translated by MrAnonymous, not me! Spoiler: Fake FAQ Q: Should I download the demo or just take the scripts from this topic? A: If you're a RGSS2 beginner, I suggest getting the demo. The detailed instructions are included in the demo only, it isn't included in this topic. If you're already experienced with RGSS2 (mostly window-related) you probably don't really need the instructions so you can grab the scripts from the topic instead. It still have some instructions and examples, so you can get by. Credit - Aindra - Tomy / MrAnonymous if you use KGC_CustomMenuCommand script along with my scripts. Thanks - MrAnonymous (for helping me with putting the scene script into the menu.) - #rmvx IRC chat for testing my script and reported a bug. Author's Notes This is my first public script. Please do excuse me if there are some bugs in my script, or the codes aren't that streamlined. I did my best and I'm willing to accept any criticism, no matter how harsh it is. I'm also willing to listen to any suggestion. I would like to make the templates but I'm not sure what type of the templates you might be interested to have. So I probably won't be making new templates until somebody give me a template suggestion. -------------------- |
|
|
|
Jul 12 2009, 03:49 AM
Post
#2
|
|
![]() どのような ![]() Type: Writer Alignment: Chaotic Neutral |
Ahh, pretty nice stuff. It can be anything from a synopsis to an encyclopedia.
What I'm really liking is the diversity to make it what you want. This is good stuff. I've been looking for something simple like this for a phone system, though I failed at scripting it on my own. Thanks. |
|
|
|
Jul 12 2009, 03:56 AM
Post
#3
|
|
![]() Back from the ethereal slumber ![]() Type: Spriter Alignment: Chaotic Good |
this is cool,when i checked the npc part,it reminded me of the game radiata stories,and it wasnt hard to make it work,thx aindra for this script
-------------------- ![]() ![]() Click here so i can kick your ass! ![]() Projects Come on,join "Anima Sword" team Progress Spoiler: My Works Check out Aeon's Time Rift of Sprites--Now it's a shop! Just check this out Spoiler: |
|
|
|
Jul 12 2009, 05:17 AM
Post
#4
|
|
|
*O* ~(>_<)~ ![]() Type: Coder |
Nice
You're finally write your own script. -------------------- |
|
|
|
Jul 12 2009, 05:28 AM
Post
#5
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
Sasame Kiryu
Thank you. I was worried that my explanation isn't that clear enough but I'm glad you know how diverse it is. Good luck! Aeon-XIII That's a relief that you found it easy. ^_^ Woratana Hey there! :D Nice to see you again. Yup, I finally made my own script. Hehe. I learned a lot by making it. Bye bye! :) -------------------- |
|
|
|
Jul 12 2009, 09:44 AM
Post
#6
|
|
![]() Warrior of the Light ![]() Type: Undisclosed Alignment: Unaligned |
Hey Aindra great work I love this script. Only one question but, how do I remove it from the menu and have it popup during a conversation?
To bring it up in a conversation I'd just call it right? -------------------- |
|
|
|
Jul 12 2009, 10:13 AM
Post
#7
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
You can call it but... it's binded to the menu. It'll exit to the menu, not map. I'll update the script to make it possible for you to call it from the map and have it exit to the map.
Unfortunately, it's pretty late so I'm going to sleep now. I'll do it tomorrow. Please be patient. :) -------------------- |
|
|
|
Jul 12 2009, 10:45 AM
Post
#8
|
|
![]() Warrior of the Light ![]() Type: Undisclosed Alignment: Unaligned |
You can call it but... it's binded to the menu. It'll exit to the menu, not map. I'll update the script to make it possible for you to call it from the map and have it exit to the map. Unfortunately, it's pretty late so I'm going to sleep now. I'll do it tomorrow. Please be patient. Ok sweet thanks, I didn't expect so fast a reply -------------------- |
|
|
|
Jul 12 2009, 09:20 PM
Post
#9
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
All right. I updated the demo and scripts with 1.1 version. Grab it from there if you want.
If you want to update your 1.0 scripts, read this: Spoiler: -------- New Features in v1.1 You can now disable Custom List menu access if you do not want it to appear in the menu. You can now call Custom List from the map, and it will exit to the map when the player is done looking at it. You can now call Custom Page from the map. It'll bring a specific page up, and exit to the map when the player is done looking at it. CODE QUICK REFERENCES: - Call Custom List $scene = Scene_Custom_List.new(0, 0, false) - Call Custom Page $scene = Scene_Custom_List.new(list, index, true) -------- rentual, when you call it in the event, the event will wait until the player exits, then continue. It will not cancel the event. -------------------- |
|
|
|
Jul 13 2009, 01:06 AM
Post
#10
|
|
![]() Warrior of the Light ![]() Type: Undisclosed Alignment: Unaligned |
All right. I updated the demo and scripts with 1.1 version. Grab it from there if you want. If you want to update your 1.0 scripts, read this: Spoiler: -------- New Features in v1.1 You can now disable Custom List menu access if you do not want it to appear in the menu. You can now call Custom List from the map, and it will exit to the map when the player is done looking at it. You can now call Custom Page from the map. It'll bring a specific page up, and exit to the map when the player is done looking at it. CODE QUICK REFERENCES: - Call Custom List $scene = Scene_Custom_List.new(0, 0, false) - Call Custom Page $scene = Scene_Custom_List.new(list, index, true) -------- rentual, when you call it in the event, the event will wait until the player exits, then continue. It will not cancel the event. -------------------- |
|
|
|
Jul 13 2009, 02:07 AM
Post
#11
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
rentual, no problem. :)
I added a couple templates (Shop and Statistics) into Page Templates. You can find them in new script and add them into yours if you wish to use them. You can view the screenshots to see them or play the demo. I'm out of the ideas of what to do with this script so I probably won't do anything now and after, unless somebody make some suggestions or bug reports. -------------------- |
|
|
|
Jul 13 2009, 02:45 AM
Post
#12
|
|
![]() Warrior of the Light ![]() Type: Undisclosed Alignment: Unaligned |
Hey Aindra its not appearing ingame when I call it all the pages are blank. I've probly done it wrong but I cant see anything that looks wrong. Sorry to take anymore of your time but heres my page script could you have a quick look at it please?
CODE =begin
______________________________________________________________________________ | Custom List & Pages Script ]----[ Author: Aindra ]----[ v1.1 ]----[ 07/11/09 | |______________________________________________________________________________| ============================================================================== Custom Page & Customizable Block ============================================================================== In this script, you can change many settings, add the list objects, and add different pages. Use the templates if you want to set up your pages quicker. You'll have to read/customize this whole script (well except parts I clearly marked to say not touch them) from start to end. QUICK REFERENCES: - Call Custom List $scene = Scene_Custom_List.new(0, 0, false) - Call Custom Page $scene = Scene_Custom_List.new(list, index, true) ============================================================================== =end module AI_L #=============================================================================== # Customize Lists #=============================================================================== # All numbers that ends with "1" is the main list. # All numbers that ends with "2" is the branch list. #------------------------------------------------------------------------------- # If you don't want Custom List to appear on the menu, use DISABLE_MENU = true # Note: If you disable it, you can still call it from the map. DISABLE_MENU = false # Change Custom List's menu title MENU_NAME = "Custom List" # When you exit Custom List, if it doesn't return to a correct selection in # menu, you can adjust this number to fix the issue. MENU_EXIT_INDEX = 4 # Set the font name. Default is Verdana / Arial / Courier New LIST_FONT_NAME_1 = ["Verdana", "Arial", "Courier New"] LIST_FONT_NAME_2 = ["Verdana", "Arial", "Courier New"] # Set the font size. Default is 20. LIST_FONT_SIZE_1 = 20 LIST_FONT_SIZE_2 = 20 #--- # Do not worry if you make bad mistake with X/Y/W/ROW_H. This script will # automatically resize them so they won't be cut off by screen's edges. #--- # If you increase X, the list will move right. It'll go left if you decrease. X1 = 0 X2 = 0 # If you increase Y, the list will move down. It'll go up if you decrease. Y1 = 0 Y2 = 56 # W is the list's width. Higher it is, the list will be wider. You can fit # more text or columns if you do. W1 = 544 # Max is 544 W2 = 544 # ROW_H is the list's row height. If you want it to have 6 rows, put in 6. # It can go up to 16 rows. Nothing more. ROW_H1 = 1 # Max is 16 ROW_H2 = 16 # COLUMNS is the list's columns. You can add or remove columns here. COLUMNS_1 = 5 COLUMNS_2 = 2 # If COLUMN_SPACE is set to 10, the columns will be 10 pixels apart. COLUMN_SPACE = 10 # If ROW_RESIZE is set to true, it will resize the window to fit the rows, # so you won't be looking at empty space of rows. (It won't be resized # larger than ROW_H value you set. It only works for branch list. Reason is # the main list is well static so it doesn't really need it.) ROW_RESIZE = true # If ROW_CENTER is set to true, it will be centered on Y position. ROW_CENTER_1 = false ROW_CENTER_2 = false # When the selection is locked, it will let the player know. Default is ??? LOCKED_TEXT = "???" #=============================================================================== # [ MAIN LIST ] - When the player select a "List" in the menu, he will see this # list first. #------------------------------------------------------------------------------- Custom_List = [[ # <- Do not touch this! #- - - - - - - - - - - # You can type in anything you want in the main list. You can add more # than 5 objects per a list if you want. It can be 20 or whatever. "Classes", # Index = 0 #- - - - - - - - - - - ], # <- Do not touch this! #=============================================================================== # [ BRANCH LIST ] - When the player select one from the list, it will create # the second list. #------------------------------------------------------------------------------- # If you do not want one, few or all on the list to have branch list, just set # it to false, and move on. Remember, the list here have to be ordered exactly # same as above list. If above list starts with "NPC Data", then you will # have to put the NPC branch list at top first, and work your way down. # # Again, you can add or remove the objects from the branch list. It can have # 30 or whatever. It's really up to you. #------------------------------------------------------------------------------- # INDEX: 0 [ NPC Data ] ["Paladin", "Knight", "Beserker", "Survivalist", "Pikeman", "Warrior"], #- - - - - - - - - - - - ] # <- Do not touch #============================================================================== # Enable Switches #------------------------------------------------------------------------------ # If you wish some objects remains locked until the player "encounters" it, you # can use the switches. It may be little hard to set up, considering the # possible confusion but try your best! NOTE: You can also turn the switches # off if you want the player to lose his access to some information in gameplay. # # The switch list here is ordered exactly same as the main and branch lists # are ordered. So you just have to follow the list/index number so it matches # with the main/branch lists. # # Put in "nil" if you don't want it to be locked. # Put in switch ID if you want it to be locked. #------------------------------------------------------------------------------ Enable_Switches = [ # <- Do not touch #- - - - - - - - - - - - [nil,nil,nil,nil,1], # MAIN LIST [nil,nil,nil,nil,nil], # This list and next lists are BRANCH LISTS nil, [nil,nil,nil,nil], [nil,nil,nil,nil,nil,nil], [nil,2,3,3,3,3,3,3] #- - - - - - - - - - - - ]# <- Do not touch end #============================================================================== # Custom Individual Pages #------------------------------------------------------------------------------ # Do not touch this section unless you know what are you doing class Custom_Page < Window_Base def initialize super(0, 0, 544, 416) self.back_opacity = 255 end #============================================================================== # Connect to the Custom Page #------------------------------------------------------------------------------ # Do not touch this part def goto(list, index, branch) contents.clear list = index + 1 unless branch case list #------------------------------ # If you wish to add more lists here, you can add "when 6" and add whatever # you named your method page below. Omit (index) if it doesn't have the # branch list because it is not really needed. when 1 Classes(index) #------------------------------ end # <- do not touch end # <- do not touch #============================================================================== # Individual Custom Pages #----------------------------------------------------------------------------- # You can create "pages" in this section. If the player selects anything on # the list, it will bring this page up so s/he can see the detailed information # # WARNING: When creating or renaming your page, it is very important # that name is EXACTLY same as above list. # # For an example, if there is "def npc_data(index)" here, then you should # use same name for "npc_data(index)" under "when n" # # For ones that have the branch list, you can use the "index" case to find # which page in that branch list. It's easier to think of it as the book chapters # The player chooses, say, the NPC data book, and wish to see Ralph, he skips # to the 2 chapter with Ralph. Which is index 1 (index starts with 0, not 1) #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Classes #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ def Classes(index) case index when 0 contents = ["Paladins are the warriors of the light.", "Many a fiece warrior has fled from the sight of a", "Paladin charging at them shimmering longsword held high.", "Paladins are strong fighters and great healers."] when 1 contents = ["Knights are a force to be rekoned with.", "A knight boasts strong armor and can take alot of", "damage, a knight can still fight well, and even if", "an enemy manages to break through a knights guard", "his heavy armor will be marked with only a scratch."] when 2 contents = ["Beserkers are the opposite of knights,", "while knights stand there and take the damage with", "a smug grin on their face a beserker deals it out.", "Beserkers have one aim in battle, deal as much damage", "as possible as fast as possible, these hardy fighters", "dont care if they get cut at stabbed sliced or lose libs."] when 3 contents = ["Survivalists are the most durable of all the", "starter classes, while they know very little magic, they", "will use any kind of weapon, shield or armor at their", "disposable to keep themselves alive. It is hard to kill", "a surivalist, you disarm him and send his sword flying", "across the room, he will spring on you with a dagger", "in each hand."] when 4 contents = ["Pikemen are not always men dispite the name, but", "originaly they were. Pikemen use strong spears and heavy blows", "to pierce their enemys armor, Pikemen can use their spears in", "close combat or throw them from afar to strike a fleeing enemy", "down, and prevent him bringing reinforcements."] when 5 contents = ["Warriors are the backbone of any army, they fight", "with a sword in each hand or with massive battleaxes that", "dwarf normal weaponry. Warriors use bows to strike at an", "enemy thats far out of the range of a sword."] #---------------- spacing = 20 #---------------- draw_list(10, 40, spacing, 478, contents) self.contents.font.size = 30 self.contents.font.bold = true self.contents.font.color = system_color self.contents.draw_text(10, 10, width - 30, WLH + 10, title) self.contents.font.size, self.contents.font.bold, self.contents.font.color = Font.default_size, Font.default_bold, normal_color end end #=============================================================================== end # <- Do not touch! -------------------- |
|
|
|
Jul 13 2009, 03:09 AM
Post
#13
|
|
![]() Back from the ethereal slumber ![]() Type: Spriter Alignment: Chaotic Good |
Rentual,i was just looking your code,and im not sure(im a noob in scripting),but your text you added look like the example aindra put in the demo,the one about the "cooking book"and you're missing a line in the code
![]() i repeat it again,im not 100% sure this is your problem,but its a posibility, -------------------- ![]() ![]() Click here so i can kick your ass! ![]() Projects Come on,join "Anima Sword" team Progress Spoiler: My Works Check out Aeon's Time Rift of Sprites--Now it's a shop! Just check this out Spoiler: |
|
|
|
Jul 13 2009, 03:26 AM
Post
#14
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
rentual
Yes, you did it wrong. Don't worry about bothering me. :) I like to help people. By the way, can you please put your script behind the spoiler? It's long. You did not put anything in the title, so it will crash on you when it works properly. I suggest you to do something about it. :) And another problem, way it lays out, your draw_line (and font settings) are in when 5 page. So you need to take that end and move it above spacing and directly under when 5 contents. It's like this: CODE when 5 contents = ["your stuff here"] end # <=========== #---------------- spacing = 20 #---------------- draw_list(10, 40, spacing, 478, contents) self.contents.font.size = 30 self.contents.font.bold = true self.contents.font.color = system_color self.contents.draw_text(10, 10, width - 30, WLH + 10, title) self.contents.font.size, self.contents.font.bold, self.contents.font.color = Font.default_size, Font.default_bold, normal_color <======== end was here end Aeon-XIII Nah, he doesn't need to do that if he already put it underneath all when index. I admit, it's pretty handy move so you don't have to repeat the line for every page if they all use same template. -------------------- |
|
|
|
Jul 13 2009, 03:49 AM
Post
#15
|
|
![]() Back from the ethereal slumber ![]() Type: Spriter Alignment: Chaotic Good |
well,good for me,i did learned something new today,XD
-------------------- ![]() ![]() Click here so i can kick your ass! ![]() Projects Come on,join "Anima Sword" team Progress Spoiler: My Works Check out Aeon's Time Rift of Sprites--Now it's a shop! Just check this out Spoiler: |
|
|
|
Jul 13 2009, 05:01 AM
Post
#16
|
|
![]() Warrior of the Light ![]() Type: Undisclosed Alignment: Unaligned |
Sweet thanks guys I'll try it right now
Edit: It keeps coming up with this error: Script 'Custom Page & Block' line 236: NameError occured undefined local variable or method 'title' for #<Custom_Page:0x181c6d8> this is my new script Spoiler: This post has been edited by rentual: Jul 13 2009, 05:21 AM -------------------- |
|
|
|
Jul 13 2009, 05:50 AM
Post
#17
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
I already warned you that would happen. :)
QUOTE You did not put anything in the title, so it will crash on you when it works properly. I suggest you to do something about it. :) Why it happened is because of this line: self.contents.draw_text(10, 10, width - 30, WLH + 10, title) It tries to draw the title you did not specify. If you don't wish to have a title for pages, you can remove it. Or go to your pages, and insert this line: title = "Warrior" something like it. -------------------- |
|
|
|
Jul 13 2009, 05:53 AM
Post
#18
|
|
![]() Warrior of the Light ![]() Type: Undisclosed Alignment: Unaligned |
-------------------- |
|
|
|
Jul 16 2009, 06:16 PM
Post
#19
|
|
![]() Type: Undisclosed |
Is there anyway to call a branched list and limit the player selection only for that branched list?
The idea is to call directly a branched list without using the main list... Is it possible? Thanks. This post has been edited by Friederic: Jul 16 2009, 06:16 PM |
|
|
|
Jul 17 2009, 03:02 AM
Post
#20
|
|
|
• Inactive ![]() Type: Undisclosed Alignment: Unaligned |
Nope, you can't do it with current version.
I'll add that feature. It might take a while because I'm pretty busy in next few days so I'll see if I can find some time for it. -------------------- |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 21st May 2013 - 11:43 PM |
|
|