Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Making an extra menu button

How do I make an extra menu button that will show some text about a character's various skills (Such as Mining, Smithing, etc)?

A full tutorial would be much appreciated.

BTW, for those who know me, I am back, baby! And I have no intentions of leaving any time soon, even though I fell into the abyss, and came back for a post and fell back into the abyss!
 
If you go into Scene_Menu it's very self explanatory.

You first of all need to add one to:

s1 = "Items"
s2 = "Skills"

etc, with the name of your tab.

Then you need to find "Input: C" or something like, and find the whens:

when 0
----> scene_items
when 1
----> scene_skills

It will look something like that.

Add one for:

when x
$scene = Scene_MyScene

To go to your scene (with your shiz in).
 
let's see if i can explain this in another way:

Code:
def main

    # Make command window

    s1 = $data_system.words.item

    s2 = $data_system.words.skill

    s3 = $data_system.words.equip

    s4 = "Status"

    s5 = "Save"

    s6 = "End Game"

    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])

    @command_window.index = @menu_index
LINE BY LINE:
1. don't care for this one
2. ---||---
3. this is the first option. what is happening here is the following: "s1" is a variable. the word you define in your database for "item" is assigned to the variable "s1". (variables can contain more than just numbers)
4. second option. same thing as above
5. third option.
6. fourth option.
7. ---||---
8.---||---

Add a new option here: write
Code:
s7 = "Info"
(or exchange "info" with wahtever you like)

9. exchange that line with this: @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
10. don't care about this.




Code:
    # If C button was pressed

    if Input.trigger?(Input::C)

      # If command other than save or end game, and party members = 0

      if $game_party.actors.size == 0 and @command_window.index < 4

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Branch by command window cursor position

      case @command_window.index

      when 0  # item

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to item screen

        $scene = Scene_Item.new

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.active = true

        @status_window.index = 0

      when 2  # equipment

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.active = true

        @status_window.index = 0

      when 3  # status

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.active = true

        @status_window.index = 0

      when 4  # save

        # If saving is forbidden

        if $game_system.save_disabled

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to save screen

        $scene = Scene_Save.new

      when 5  # end game

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_End.new

      end

      return

    end

go straight down to line 52.

between "$scene = Scene_End.new" and "end" create some new lines, no matter how many. add the following in these lines:
Code:
 

 

when 6

$scene = Scene_Info.new

 

 
exchange Scene_info with whatever you called the scene.

maybe you would like it to show a list of the actors first so that the player can choose what actor he wants to check out. like "status" "equip" and "skill".

if that is what you want, tell me, i can show you how tomorow.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top