Choosing Between Multiple Heroes

From OHRRPGCE-Wiki
Jump to navigation Jump to search

From the original Final Fantasy way back in the NES days to recent games like Octopath Traveler, there's a long history of RPGs that don't start with a single specific hero, instead letting you choose between several from the outset. OHRRPGCE isn't really designed to work this way, but you can pull it off regardless, following this basic logic:

  1. Put a "dummy" hero as the starting hero.
  2. Before the player can actually do anything, have them pick one of the "real" heroes from some kind of list.
  3. When the player picks a hero, add that hero to the party, and remove the dummy hero.
  4. Once the correct hero is in the party, the game "really" starts--you play your opening cutscene or whatever and continue as normal.

The rest of this article will explain a few ways to do this.

Using NPCs (the really old way)[edit]

Some very old games (such as Final Fantasy H) needed to let you select a starting hero at a time before OHRRPGCE had some of the features it has now, and people came up with a method that involves a "menu" made of NPCs and a dummy hero that looks like an arrow. This method can be a little awkward since the arrow doesn't quite work the way you'd expect a menu cursor to work, but it'll get the job done.

To make your hero selection screen, you'll need to make heroes, text boxes, and a map, and then edit some settings.

Make heroes[edit]

  • Create the heroes you want the player to use in the game, of course!
  • Create an extra hero whose walkabout sprite looks like an arrow or a pointing hand or something. This hero doesn't need to have anything except HP. We'll call him Arrow Man for this example.

Make text boxes[edit]

  • Pick a tag to use for text box choices. Let's say tag 15 for this example.
  • Create a text box that says "Now, your adventure begins!" or something in a similar vein. This text box will appear after the player picks their starting hero.
    • Under Edit Conditionals for this text box, set the HEROES and DOOR options like this:
      • HEROES: Always do the following
        • remove Arrow Man from party
      • DOOR: Always do the following
        • instantly use door 0
  • For each of your possible starting heroes, create another text box.
    • The text should explain who this hero is and ask whether you want to start with them. Just using text is fine, but it wouldn't be a bad idea to include a portrait.
    • Under Edit Choices, set the options like this:
      • Choice: Enabled
      • Option 0 text: Confirm
      • Set tag 15=ON
      • Option 1 text: Cancel
      • Set tag 15=OFF
    • Under 'Edit Conditionals for each hero, set the HEROES and AFTER options like this:
      • HEROES: if tag 15 = ON
        • add (the hero this text box is for) to party
      • AFTER: if tag 15 = ON
        • jump to text box (the "Now, your adventure begins" one) next
  • Make one more text box that says something like "Select your starting character." This one doesn't need any special conditionals or anything. You technically don't have to do this, but you want the player to understand what's happening, right?

Make the map[edit]

  • On the map where you want the game to actually start, put a door where you want the player's chosen hero to appear at the beginning of the game. Let's call it door 47 for the sake of argument.
  • Create a new map to function as your menu screen. This doesn't have to look particularly fancy. In fact, it can just be all blank black tiles. We'll be calling it Character Select Map.
  • In the Local NPCs submenu for Character Select Map, create some NPCs, one for each of your starting heroes. Each NPC should use the same walkabout graphics as that hero, and should be set so that "on activation" they display the text box you created for that hero.
  • In the Link Doors submenu for Character Select Map, set Door 0 to lead to the door you created earlier where you want your hero to start.
  • Use the Wallmap submenu to restrict your hero to a certain part of this map. If you're not sure how much space to leave, leaving the middle four rows of the screen open should be good enough unless you have a really ridiculous number of heroes.
  • Use the NPC Locations submenu to place all of your NPCs on the map. Make sure they're all in that middle area, and none of them are completely blocked off by other NPCs.
  • Use the Doors submenu to place door number 0 somewhere in the part of the map that the hero can't reach.

Edit settings[edit]

  • Go to the Edit General Game Settings menu and open the New Game submenu under Major Settings.
    • Set Starting X, Starting Y, and Starting Map to the middle of the Character Select Map.
    • Set Starting Hero to Arrow Man.
    • Set Starting Textbox to your "Select your starting character" textbox.

With all this done, your players should now be able to pick a hero to start with at the beginning of the game.

Using text boxes and a menu[edit]

A better way of letting the player select a starting hero is by using one of OHRRPGCE's built-in custom menus.

Make heroes[edit]

As with the previous method, you'll need to create a temporary hero for your player to start the game with. (Technically there are ways to avoid this, but it involves making one of your regular heroes a weird special case that has to be handled differently and it'll just make things more complicated for not much benefit.) With this method the temporary hero doesn't need to have any particular appearance, but we'll keep calling him Arrow Man for the sake of having something to call him.

Make the menu[edit]

Go to Edit Menus and create a new menu. Call it "Character Menu" or something. Then go to "Edit bitsets" and turn "Disable player closing menu" on.

And then go back out to the main menu without adding any menu items. You're going to have menus and text boxes that point to each other in a circle, and CUSTOM won't let you try to open text boxes or menus that don't exist yet, so you're going to have to go back and forth a little bit. This is the order that involves the least backtracking.

Make text boxes[edit]

You'll need to make the same basic kinds of text boxes as before, but all of them are slightly different:

  • The "select your starting character" text box now needs a couple of things set under Edit Conditionals:
    • SETTAG: Always do the following
      • set tag 15=OFF
    • MENU: Always do the following
      • open menu (Character Menu)
  • The "Now, your adventure begins!" one needs the following to be set under Edit Conditionals:
      • INSTEAD: if tag 15 = OFF
        • use to text box (the "Select your starting character" one) instead
    • HEROES: Always do the following
      • remove Arrow Man from party
  • You should still create text boxes for each of your possible starting heroes. This is similar to the method from before, but not quite the same.
    • The text should explain who this hero is and ask whether you want to start with them. Just using text is fine, but it wouldn't be a bad idea to include a portrait.
    • Under Edit Choices, set the options like this:
      • Choice: Enabled
      • Option 0 text: Confirm
      • Set tag 15=ON
      • Option 1 text: Cancel
      • Set tag 15=OFF
    • Under 'Edit Conditionals for each hero, set the HEROES and AFTER options like this:
      • HEROES: if tag 15 = ON
        • add (the hero this text box is for) to party
      • AFTER: Always do the following
        • jump to text box (the "Now, your adventure begins" one) next

Make your menu items[edit]

Go back to the menu editor and choose your Character Menu, and from there go to Edit Items. For each of your heroes, add a new item with the following:

  • Caption: (the name of the hero)
  • Type: 3 Show Text Box
  • Subtype: (the text box you made for that hero)
  • Edit Bitsets: Turn "Close menu when activated" on.

Edit settings[edit]

  • Go to the Edit General Game Settings menu and open the New Game submenu under Major Settings.
    • Set Starting Hero to Arrow Man.
    • Set Starting Textbox to your "Select your starting character" textbox.

(With this method you can set your starting X, Y, and map to wherever you actually want your player to start the game.)

With all this done, your players should now be able to pick a hero to start with at the beginning of the game, using an actual menu that works like a menu.

Using plotscripting and a menu[edit]

Through the power of plotscripting, we can make an even nicer character select menu!

Make heroes, text boxes, and your menu[edit]

As in the previous examples:

  • Make a "dummy" hero (Arrow Man) and all your real heroes.
  • Make a text box for each hero. Unlike in the other examples, these should just be regular text boxes--don't add any choices or mess around with their conditionals.
  • Make a "Now, your adventure begins!" type text box. With this method the ID number of this text box actually matters. For this example we'll say it's 37.

Then, make your character select menu, and turn on "Allow gameplay and scripts" and "Disable player closing menu."

Menu scripts[edit]

Add these plotscripts to your game:

define constant (37, now your adventure begins)

plotscript, show character menu, begin
  
  variable (select menu)
  variable (right current box)
  
  # open the menu
  select menu := open menu (menu:character menu)
  
  while (menu is open (select menu)) do, begin
    # display appropriate text box for selected menu item
    right current box := get menu item extra (selected menu item (select menu), 1)
    if (right current box <> current text box) then, begin
      advance text box
      show text box (right current box)
    end
    wait(1)
  end
end

plotscript, starting character selected, starting hero, begin
  add hero (starting hero)
  delete hero (hero:Arrow Man)
  show text box (now your adventure begins)
end

Make your menu items[edit]

Go back to the menu editor and choose your Character Menu, and from there go to Edit Items. For each of your heroes, add a new item with the following:

  • Caption: (the name of the hero)
  • Type: 4 Run script
  • Subtype: starting character selected
  • Edit Bitsets: Turn "Close menu when activated" on.
  • Extra data 0: (the ID number of your hero)
  • Extra data 1: (the ID number of the text box describing your hero)

While you're in the menu editor, you should also use Reposition Menu to prevent your menu from overlapping with the text boxes.

Edit settings[edit]

  • Go to the Edit General Game Settings menu.
    • In the New Games submenu, set Starting Hero to Arrow Man.
    • In the Global Script Triggers submenu, set New game: to "show character menu."

With all this done, you should now have a nicer character select menu that shows descriptions of the potential heroes as the player moves through it.

Other ways[edit]

These aren't the only ways to solve this problem! You can try using slices to display information on the heroes with more flexibility, for example.

See also[edit]