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.

Creating a picture & event based menu

Seda

Member

I am currently using RPG Maker XP and am trying to create a menu using pictures and events only. I can do this with a custom menu no problem (Made a tutorial menu before). I've run into a slight problem. I have no idea how to go about using the "Script" command to call any other menus. I was wondering if anyone would happen to know how to go about calling each menu?
I know it starts with something like " $Scene = ".

I am currently trying to call these menus:
Item
Skill (and how to call for each actor in the party)
Equip (and how to call for each actor in the party)
Status (and how to call for each actor in the party)

Thanks in advance for the help! :grin:
 
$scene = Scene_Item.new
$scene = Scene_Skill.new(@status_window.index)
$scene = Scene_Equip.new(@status_window.index)
$scene = Scene_Status.new(@status_window.index)
$scene = Scene_Save.new
$scene = Scene_End.new

The (@status_window.index) marking which character is selected. You know, when the cursor moves from the menu commands over to the status window. Select character 2, it'll load the skills menu with character 2's skills.
Edit: It depends how you set it up, but you may just enter the status index manually. $scene = Scene_Skill.new(0) will open the skill menu for party member 0. 0 being the the first party member, 1 would be the second, 2 is third ect...Thats just how indexes work.
 

Seda

Member

That's exactly what I was looking for, thank you so much for the help!
While I was trying this out I did notice that capitals matter as well. That could be why it wasn't initially working for me. :haha:
 

Seda

Member

I apologize for the double post, but I just had a thought. Let's say I want to display an actors HP, SP, and EXP on my custom menu. Is there any scene call I could use to get those to show?
 

Seda

Member

You wouldn't happen to know of a tutorial I can follow to learn how to accomplish this menu, would you? Only reason I ask is because I'm starting to notice that this might be a bit of a bigger project then I initially anticipated (I have no clue what a "window class update method" would even look like).
 
Except he's building this with pictures and events.

Probably the most complicated part of making a CMS with events and pictures is displaying the numbers. Because each digit is it's own picture. I wrote a tutorial AGES ago without using script commands.
viewtopic.php?f=48&t=37201

I'm a terrible teacher. It sounds complicated and was really only done in the RM2k and RM2003 days before scripting was available. If any of those forums are still around they might explain it better then me.
It basically involves using divide and modulo to break a number (like the character's current hp) into units and store into variables.
Ex: Hp: 9823 into 9 8 2 3

9823 (div) 1000 = 9. (Store as var Thousands)
9823 (mod) 1000 = 823
823 (div) 100 = 8. (Store as var Hundreds)
823 (mod) 100 = 23
23 (div) 10 = 2. (save as var tens)
23 (mod) 10 = 3 (save as var ones)

Then you go through a series of conditional branches:
...
If the value of the ones equals 3 then show picture "3"
...
If the value of the tens digit equals 2 then show picture "2"
...
If the value of the hundreds digit equals 8 then show picture "8"

The event pages get very long. A lot of copy and pasting.
 

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