RMVXA: Sykval's Ring Menu as a separate menu problem

shaynec1981

Veteran
Veteran
Joined
Jun 10, 2014
Messages
88
Reaction score
21
First Language
English
Primarily Uses
I am using my own custom menu system that overwrites Scene_Menu. I also want to use Sykva'ls Ring Menu while in game except as a different key trigger. Problem is Sykval's Ring Menu also overwrites Scene_Menu. I tried copying Scene_Menu as well as every other class that his script aliases and renamed them and changed every instance of aliased classes in his code to point to the new, renamed classes. My custom menu works fine like this, however when I call the ring menu scene, SceneManager.call(Ring_Scene_Menu), I get the error message:

Script 'Ring Menu' line 404: ArgumentError occurred.

wrong number of arguments (6 for 4)

Here is a screenshot of said line 404:

What really throws me is that method does ask for 6 arguments but the error is telling me its only asking for 4? Anyhow, the game crashes whenever I call this scene. Any help?
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
place the ring menu below the other custom scripts. I'm assuming you have another script that does something with that method and it's causing a conflict. Try placing the ring menu below the other ones, if that doesn't fix it, you'll have to post what scripts your using and see if someone can come up with a solution

edit: On second thought.. I'm pretty sure the ring menu overwrites that method so placing it below the script won't work. You'll have to say what other script your using the may alter the character's sprite.
 
Last edited by a moderator:

shaynec1981

Veteran
Veteran
Joined
Jun 10, 2014
Messages
88
Reaction score
21
First Language
English
Primarily Uses
place the ring menu below the other custom scripts. I'm assuming you have another script that does something with that method and it's causing a conflict. Try placing the ring menu below the other ones, if that doesn't fix it, you'll have to post what scripts your using and see if someone can come up with a solution

edit: On second thought.. I'm pretty sure the ring menu overwrites that method so placing it below the script won't work. You'll have to say what other script your using the may alter the character's sprite.
Well, I disabled literally every other script I had added except my custom menu script and what I had done with this script. My menu script does absolutely nothing with the character sprite yet I still get the same exact error message. :\ 

Maybe I'm just going about how to get Sykval's Ring Menu to work when you press a different key and leave the default menu for when you press Esc?

Even disabling my custom menu script still throws the same error.
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
hmm do a global search for "def draw_character". Global searches are doing by cntl+alt+f incase you didn't know.

Then see how many of those defs pop up. The orginal should be in Window_Base. The ring menu should also have one. See if any others pop up
 

shaynec1981

Veteran
Veteran
Joined
Jun 10, 2014
Messages
88
Reaction score
21
First Language
English
Primarily Uses
The results are only the original Window_Base, Ring_Window_Base (which is a carbon copy of Window_Base but renamed due to Ring Menu pointing to this renamed one), the Ring_Menu, and modern algebra's Extra Movement Frames (which I have disabled and probably am not going to use anyway)

Hmm, looking over it now... Ring_Menu is asking for 6 arguments while Ring_Window_Base is only asking for 4. But since Ring_Menu is under Ring_Window_Base, shouldn't the method be overwritten and it should be the 6 argument method?

*Edit - On line 404 of the script that was throwing the error, I commented out the last two arguments, which according to the draw_character method changed 'enabled' from true to false and 'centred' from false to true. Not sure what the significance of these two arguments actually are but when I did this, the game didn't crash and the menu kind of worked except it was a normal command window on the upper left side of the screen instead of the ring menu that is supposed to show up.
 
Last edited by a moderator:

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
Ok that's your problem :) the changed def needs to be in Window_Base. When you were renaming your classes you probably only had to rename the Scene and not the windows, but I'm not 100% as I'm not THAT familiar with the ring menu and haven't looked at it in a while. Check Ring_Window_Base back to Window_Base and see if that will fix everything :)
 

shaynec1981

Veteran
Veteran
Joined
Jun 10, 2014
Messages
88
Reaction score
21
First Language
English
Primarily Uses
Ok that's your problem :) the changed def needs to be in Window_Base. When you were renaming your classes you probably only had to rename the Scene and not the windows, but I'm not 100% as I'm not THAT familiar with the ring menu and haven't looked at it in a while. Check Ring_Window_Base back to Window_Base and see if that will fix everything :)
Ok, ignore my last post... it was pretty convoluted. I did what you said and changed all instances of Ring_Window_Base in Ring_Menu back to Window_Base and both menus work again. Only problem is that the ring menu doesn't pop up as the ring menu but instead a normal command window in the upper left corner. I have an idea I'll try out and see if this takes care of it but any more ideas would be much appreciated! And thanks so much for you help, trying to achieve that AH-HAH moment while learning scripting, y'know what I mean? :)

*Edit - I was wondering if I didn't need that extra Ring_Window_MenuCommand but apparently I still did because when I took it out and pointed Ring_Menu back to Window_MenuCommand, neither menus worked at all... 
 
Last edited by a moderator:

shaynec1981

Veteran
Veteran
Joined
Jun 10, 2014
Messages
88
Reaction score
21
First Language
English
Primarily Uses
Oh yeah, been chewing my way through those and they have been most helpful! I'm to the point where I understand the potential of what all can be done using RGSS3 and have a vague idea of how to do it but I just don't know enough to actually implement it and work out bugs like this ring menu... if there were a good lesson on how to debug for intermediate users that would be very helpful too, or a decent backtracing script that I could actually understand the logs of. lol

Anyway, with this, do you have any idea why it would revert back to a regular command window instead of initializing the icons in the ring menu? How would I even begin to debug why this is happening?
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
debugging trace script

http://www.himeworks.com/2013/06/09/custom-main-full-error-backtrace/

the print and p commands are your friends for debugging. Well you've seen some of the things they can do in the tutorials. DP3 message box prints, I forget the commands for them, but it's the same thing only it prints the info to the console box.

As for the Command window.. both of your scripts are probably fighting over it. You might try making subclasses of it for each one like..

#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------# Converted into a Ring Menu.#==============================================================================class Window_RingMenuCommand < Window_MenuCommand edit:

or you could leave them both using Window_MenuCommand and compare them.

For example, maybe the window widths are different in each menu you could do something like

#-------------------------------------------------------------------------- # * Get Window Width #-------------------------------------------------------------------------- def window_width return 160 if if SceneManager.scene_is?(Scene_Menu) return 300 if if SceneManager.scene_is?(Scene_RingMenu) endThen it checks if the scene is active before doing something. So your custom Menu would have a width of 160 and the RingMenu would be 300 wide.
 
Last edited by a moderator:

shaynec1981

Veteran
Veteran
Joined
Jun 10, 2014
Messages
88
Reaction score
21
First Language
English
Primarily Uses
Nice! TY. Its getting late so I'll try to figure this out again in the morning. Thanks for helping me so much! I really, really appreciate it. :)  
 

Venka

Veteran
Veteran
Joined
Jun 20, 2012
Messages
945
Reaction score
365
First Language
English
Primarily Uses
np :) can post with more questions or pm. Folks are generally helpful here. Have a good night
 

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

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top