The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Rogue on October 27, 2011, 09:00:59 AM

Title: Merging of a Menu script and a Quest Journal.
Post by: Rogue on October 27, 2011, 09:00:59 AM
Hey there everyone! :D

I'm posting here to get a little support if I could.
Whilst attempting to merge the Compact Menu system of Rubymatt's, with the
Quest Journal of the infamous Modern Algebra, I came up with a little snag.

See, the thing I liked best about the Compact Menu was that it placed the menu
smack-bang right in the middle. However, when I introduce the Quest script, it puts
it up in the upper left hand corner. :(


I don't suppose someone could help me put the menu in the middle, as in the default of the
Compact System, with the add-on of the Quest Journal?

Please and Thank you.

Rogue.



*Scripts found here*
http://rmrk.net/index.php/topic,27557.0.html (http://rmrk.net/index.php/topic,27557.0.html) (Compact System)

rmrk.net/index.php/topic,25533.0.html ( Quest Journal )



Title: Re: Merging of a Menu script and a Quest Journal.
Post by: Rogue on November 05, 2011, 11:24:03 AM
I don't suppose I'm able to bump this up?
Really hoping someone could help me out here.
Title: Re: Merging of a Menu script and a Quest Journal.
Post by: modern algebra on November 05, 2011, 12:50:58 PM
Assuming you're using 2.1 and not 1.1, then you can fix it by going to line 1604 of the IMPLEMENTATION part of the script. You should see this:


alias modrn_qusjrnl2_cmmndwin_5th9 create_command_window
    def create_command_window (*args)
      modrn_qusjrnl2_cmmndwin_5th9 (*args) # Run Original Method
      if $game_system.quest_menuaccess
        c = @command_window.commands.dup
        c.insert (QuestData::MENU_INDEX, QuestData::VOCAB_QUESTS)
        width = @command_window.width
        disabled = @command_window.ma_disabled_commands
        @command_window.dispose
        @command_window = @command_window.class.new (width, c)
        @command_window.index = @menu_index
        # Disable all of the old commands as well
        disabled.each { |i|
          i += 1 if i >= QuestData::MENU_INDEX
          @command_window.draw_item (i, false)
        }
        @command_window.draw_item (QuestData::MENU_INDEX, false) if $game_system.quest_disabled || $game_party.quests.list.empty?
      end
    end


Replace it with:


alias modrn_qusjrnl2_cmmndwin_5th9 create_command_window
    def create_command_window (*args)
      modrn_qusjrnl2_cmmndwin_5th9 (*args) # Run Original Method
      if $game_system.quest_menuaccess
        c = @command_window.commands.dup
        c.insert (QuestData::MENU_INDEX, QuestData::VOCAB_QUESTS)
        x, y, z = @command_window.x, @command_window.y, @command_window.z
        opac = @command_window.opacity
        width = @command_window.width
        disabled = @command_window.ma_disabled_commands
        @command_window.dispose
        @command_window = @command_window.class.new (width, c)
        @command_window.x, @command_window.y, @command_window.z = x, y - 12, z
        @command_window.opacity = opac
        @command_window.index = @menu_index
        # Disable all of the old commands as well
        disabled.each { |i|
          i += 1 if i >= QuestData::MENU_INDEX
          @command_window.draw_item (i, false)
        }
        @command_window.draw_item (QuestData::MENU_INDEX, false) if $game_system.quest_disabled || $game_party.quests.list.empty?
      end
    end
Title: Re: Merging of a Menu script and a Quest Journal.
Post by: Rogue on November 06, 2011, 07:16:14 AM
No dice, unfortunately. :(

Here are my copies of the scripts.



I really appreciate the help. :)
Title: Re: Merging of a Menu script and a Quest Journal.
Post by: modern algebra on November 06, 2011, 06:31:59 PM
Oh, well it's not working because you had modified the Compact Menu System in order to add Quests in manually, but that is not necessary. The Quest System is designed to add itself to the menu.

So, get a clean copy of the Compact Menu System and replace the copy you have. Then paste the Quest Journal (with the above stated modifications) into your project and below the Compact Menu System, though still above Main.

Actually, you also probably want to change the line:



        @command_window.x, @command_window.y, @command_window.z = x, y - 12, z


to:


        @command_window.x, @command_window.y, @command_window.z = x, y - 24, z


You might want to do more to change the positioning of everything in that script really, since adding commands tends to throw the positioning off. You probably want the targetting window to be taller too.