The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: 104251 on February 25, 2010, 04:52:32 PM

Title: MOG & SEL STYLED MENUS editing
Post by: 104251 on February 25, 2010, 04:52:32 PM
Hi there!
Lets go straight to the point. I am using mog & sel styled menus in my project.
http://rmrk.net/index.php/topic,30304.0.html (http://rmrk.net/index.php/topic,30304.0.html)
I tweaked it alot - made custom graphics, sounds, placed pieces of the interface just as i want them to be (done that by randomely changing the numbers in the scripts and watching what each one of them doing :P yeah i know im a total noob at scripting - all these text piles are real nightmare to me).
Well i got almost everything like i want. Almost. There is one problem that i am uncapable to solve by myself (i dont know, maybe it is really easy, but like i said, im a NOOB). So heres what it is.

If you try the demo, enter the menu and select any option except the first one (for example, the Equip command), go to the character selection mode and then in the actual equip menu. So if you press Escape button you will go back to main menu screen. I want the command that was highlighted when i was entering the equip menu (the Equip line in this case) remain in that position. But instead it switches to first one (Items) and only then goes to previously highlighted tab (Equip). This flickering is almost not noticable in the original version of the menu system, but in my case it ruins all of the experience.
Sorry for my awful explanation - the english is not my native language.

I hope somebody will help me)
Title: Re: Need help with MOG & SEL STYLED MENUS editing
Post by: modern algebra on February 25, 2010, 06:37:23 PM
Yeah, it's because it starts at that no matter what. If you go into the menu scene and find this in the start method of Scene_Menu:

    @menu_com = Sprite.new
    @menu_com.bitmap = Cache.menu ("Menu_Com01")


It is because it automatically starts out at Menu_Com01 that there is a delay. You could replace that with something like this:

   
    @menu_com = Sprite.new 
    @menu_com.bitmap = case @menu_index
    when 0 then Cache.menu("Menu_Com01") # Item
    when 1 then Cache.menu("Menu_Com02") # Status
    when 2 then Cache.menu("Menu_Com03") # Equip
    when 3 then Cache.menu("Menu_Com04") # Skill
    when 4 then Cache.menu("Menu_Com05") # Save   
    when 5 then Cache.menu("Menu_Com06") # Game End
    end   


Where the Menu_Com, etc.. is replaced with whatever you have those graphics named as for as many possibilities as you have. I don't know what edits you've made, so you figure it out from there.
Title: Re: Need help with MOG & SEL STYLED MENUS editing
Post by: 104251 on February 25, 2010, 07:04:36 PM
Wow, it actually works! So it was really easy but due to my ignorance i couldn't figure that out  ;D
Thank you, Modern Algebra, you really are almighty.

Now its all smooth and clean) mmm) Solved i guess.
Title: Re: Need help with MOG & SEL STYLED MENUS editing
Post by: 104251 on February 26, 2010, 08:16:11 PM
---bump---

Ouch, its solved, yes, but i have another problem. I decided to make a key items tab in the items menu. I found this script: http://rmrk.net/index.php/topic,36904.msg435419.html#msg435419 (http://rmrk.net/index.php/topic,36904.msg435419.html#msg435419)
and used it to make the 4-th tab. I succeeded in making the actual tab, but the rest is messed up.
Demo here: http://www.mediafire.com/?r5k3mmf4dm2 (http://www.mediafire.com/?r5k3mmf4dm2). I cut out all graphics and sounds and packed the default ones, so layout is really messy now. I only added the new tab right there:
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg683.imageshack.us%2Fimg683%2F5909%2Fhelp1u.jpg&hash=483a68d0ae30c42eeb127bb3dd1479053ac7c45f)[/spoiler]
Tabs are switching properly, but when i enter the items screen it shows two tabs instead of one -
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg90.imageshack.us%2Fimg90%2F513%2Fhelp2.jpg&hash=404e3fa96bf2d3ba60da85c198adf56f33e3090d)[/spoiler]
But thats not important, i can find the cause of that one. The major stuff is that the fourth tab must show only the key items, but it shows all of them. Maybe theres something missing, maybe i messed something up, i dont know. What can I do to fix it?
Title: Re: MOG & SEL STYLED MENUS editing
Post by: 104251 on March 02, 2010, 02:58:45 PM
*bump*  :stick:
Title: Re: MOG & SEL STYLED MENUS editing
Post by: modern algebra on March 02, 2010, 09:17:29 PM
Both of your problems are arising from the start method of your Scene_Item.

First problem:


   @key_window.visible = true
   @key_window.active = true


That makes the key window visible and active when you open Scene_Item. The item window is already visible and active. Thus you have two separate windows, both visible and active. Turn those values to false and it will only show the Item window when you first enter the scene.

Second problem:


   @key_window = Window_Key.new(250, 70, 295, 280)


Note that the initialize method of Window_Key class has these arguments:

def initialize(x, y, width, height, relic=false)

Therefore, if you don't put a fifth argument when you create the window, relic (and therefore @relic) will be false. The following:


     if @relic
       next unless item.note.include?("KEY")
     else
       next if item.note.include?("KEY")
     end

shows that when @relic is false, the window will draw only non-key items, while if @relic is true, it will only draw key items. What is happening in your scene is that you are not specifying that relic should be true when you create the window, and therefore it defaults to false. SO, to solve this problem is really easy, all you have to do is replace:


   @key_window = Window_Key.new(250, 70, 295, 280)

with:


   @key_window = Window_Key.new(250, 70, 295, 280, true)



Title: Re: MOG & SEL STYLED MENUS editing
Post by: 104251 on March 03, 2010, 11:07:00 AM
Haha, i have nothing to say. Thanks, M.A.)

===================================================================
                               ___      ___                   ____
                             |     \    /     |                /   _  \
                             |      \  /      |               /   / \   \
                             |       \/       |              |   |_ |  |
                             |   |\     /|   |              |     __   |
                             |   | \__/ |   |             |   |   |   |
                             |   |        |   |   __      |   |    |   |   __
                             |__|        |__|  |_|    |__|    |__|  |_|
===================================================================