Special Items Separate Menu - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Games Development (https://www.save-point.org/forum-4.html) +--- Forum: Code Support (https://www.save-point.org/forum-20.html) +--- Thread: Special Items Separate Menu (/thread-6727.html) |
RE: Special Items Separate Menu - DerVVulfman - 07-19-2017 So BASICALLY, there is no difference between the Normal Item menu and the Special Item menu other than one generates a list of items 'except' special items and the other 'only' special items. The two work the same otherwise. And you may not know this, but you can already call the default Item menu with a script call: Code: $scene = Scene_Item.new Script calls can be made by selecting the very very very very very VERY last option in the list of map events. So I guess... um... Code: #============================================================================== That alters the Item system itself so ONE Item menu can do the work of both! Just adding a second Item menu option as described is all you need. RE: Special Items Separate Menu - kyonides - 07-21-2017 Instead of things like... Code: for i in 1...$data_armors.size It could have been like this... Code: 1.upto($data_armors.size -1) do |i| Just my two cents on the way some portions of that script were implemented XD RE: Special Items Separate Menu - Diorm - 07-21-2017 Hey since you guys were so kind as to answer, I wanted to respond to this before I go on vacation. So I'm having this error when I'm trying my event call: "ArgumentError occurred while running script. wrong number of arguments(1 for 0)" So yeah, what's an argument and how do I fix it? It's not the usual "error on this line blablabla". RE: Special Items Separate Menu - DerVVulfman - 07-21-2017 That can happen if you have placed this script in your Script Library incorrectly, and/or have another Item Menu script which conflicts. This script 'assumes' you have no other Item Menu script, and that you have it below Scene_Debug and above Main. If you have another script that also alters the Item Menu, then it would likely need to be placed below the other... something we call 'script placement'. The script supplied (above) overrides the normal entry of the Scene_Item.new method, adding the ability to have a new value (or parameter) in the way it is called: Scene_Item.new(true). BUT.... if you have another script 'below this one' that alters either the Scene_Item class or the Window_Item class, it overrides THIS script... causing the error. RE: Special Items Separate Menu - Diorm - 08-06-2017 Ok good now it seems to work with the manual call in an event. Now what do I do to make the items appear in this menu? RE: Special Items Separate Menu - DerVVulfman - 08-07-2017 Ah, that's the beauty of what I did. In the main menu, ala Scene_Menu, it activates the Item menu with a call like $scene=Scene_Item.new. The rewrite/script allows that statement to still be used, though it would 'remove' all the special items you designate. But if you instead use $scene=Scene_Item.new(true), you only get the special items. What I am assuming you want is to have 'two' Item menu options in the main menu. This requires that YOU add a new option for the special item menu. FIRST.... look at the block in Scene_Menu within the main method which looks like this: Code: # Make command window This makes the 6 items in your menu. Let's assume you are adding the 2nd item menu below the first item menu... change it to THIS Code: # Make command window In the update command method, you normally have this: Code: # If command other than save or end game, and party members = 0 Code: # If command other than save or end game, and party members = 0 Note that I added a new ITEM option with the 'when 1' block, and changed the Skill to work for 'when 2'. Change all other 'when' values down one more value to match. Now that you did that, go into the update_status methods and advance all the when values by one as well.... when 2 # Skill when 3 # equipment when 4 #status Hopefully, you can follow this. If you need to add/remove menu options like adding other features like 'party order', 'crafting' or the like, you'd need to know about this. We learn by doing, so I suggest a little practice on a test project. RE: Special Items Separate Menu - kyonides - 08-08-2017 Or you, DerVV, could offer him a modified case statement that includes symbols instead of numbers, that would make it easier to identify and make sure every single comparison is as unique as the menues they have to open... RE: Special Items Separate Menu - DerVVulfman - 08-09-2017 We learn by doing. And if he needs to adapt the menu a second time, it would be good for him to learn. And in that, in the manner the default scripts are initially written instead of a new style which could confuse. The instructions I gave display before/after examples. With that, he should see where changes are made within each section so he doesn't just see what to change, but why the change is made. Give him the basics in math before sending him into calculus (which my idiot College Advisor did...Threw me into Calculus II before I ever took Trig.). RE: Special Items Separate Menu - Diorm - 08-10-2017 Wait, I already know how to add a new menu in the main menu script, but is this the only way to make the special items appear in the second itemĀ menu? Because I wanted to try first with only a call in event for starter. So does that mean the second item menu wont show special itemsĀ unless it is set in the main menu? RE: Special Items Separate Menu - DerVVulfman - 08-11-2017 The suggestion in adding the second menu which only shows the special items assumed you did not know how to add a new option to the menu. But it looks like you may not have read the script itself. As I stated on the 19th last month, you could normally bring up the item menu in a script call with: $scene = Scene_Item.new And the script which I supplied that same day stated you may use the script call of... $scene = Scene_Item.new to show items other than special objects, and a script call of ... $scene = Scene_Item.new(true) which only shows the special objects. I altered the Item system so just adding (true) to the end of the statement shows only the special items, while it regularly hides them instead. |