How do I make an escape item?

From OHRRPGCE-Wiki
Jump to navigationJump to search

Introduction[edit]

In the old game, the escape item were used to help the player to go back safely to town after a long long way through the dungeon to save the boss. The item was really useful because as old rpg games had a few memory the player couldn't store many items in the inventory.

If he had used all the item on the way to the boss and the last potions in the inventory to defeat him the player could lose on the back because he had no Hp and no Mp left which was frustrating for the player because he/ she had managed to defeat the boss. To truly understand what I'm talking about I advise you to start to play to Phantasy Star 3. You'll see that the escape item is must have to finish even the first dungeons! (If you do you may also noticed that the escape item of phantasy star 3 has been programmed to detect the entry and the exit of the dungeon and can safely take you from the entry to the exit and from the entry to the exit according to the last door registered)

The escape item became even more useful, when your rpg has a random battle system from which you cannot escape. It was the case in most very old role player games. But you can find escape items even on Snes Rpg games which was less limited than previous consoles!

Anyway, to prevent the game quality for decreasing mainly because of memory limitation, the escape item was created!


So you would like to make an item that allows the player to escape from a dungeon?[edit]

Well it's perfectly possible to do so with the OHRRPGCE!

Before going further just check that it will be adapted to the gameplay. Escape items are recommanded with old gameplay. (see above for more details)I assume here that you have at least implement 2 different dungeons indoors on different maps and that you also have a potion shop. If you're are not an expert in plotscriting feel free to complete your plotscripting knowledge reading (several times if necessary) one of the article above in the section "see also" and to add on the forum all the questions that may appear appropriate to help you to add the escape item in your game.

To create the escape item, we'll combine plotscripting, text boxes, global variable and tags.

First we'll have some work under custom.Exe

Edit your game and go into the item menu. Create an item called "Escape" and any other name that could help the player to understand what is the item should be used for. You may add some description on the info line to be sure to 100% the player knows what to do with this item. Give it also a price and check that it stays on unlimited use. (The "consume by function" will be faked using plotscriting)

Now go back to the main menu and edit the text boxes. Pick up a free one in which you right

Would you like to escape?

Make choice enabled and pick up the tag you use for your yes/no questions. You can also choose to pick up a free one. We'll say that this is text box 34. Then go back to the main and edit the tag name menu. Pick up a free tag and name it "player is in dungeon" or any other name that will help you to remember what is the tag used for. If you don't want to use the tag you currently use for your yes no question, you may decide to pick up free one and name it "use escape item" but it would be a bad idea because you would use a tag for nothing.

When you use a tag for the yes/no question the tag is turned on (or off if you choose no) just before you need it. As a consequence you can use one tag for all your yes/no questions all along the game. If you have answered yes to somoene the tag will stay on and won't have any bad effect. Also remember that you have "only" 1000 tags. You may be happy in the futur when your game has became big to find a free tag!

Now that you have created the tags edit the tex box menu again and go back to text box 34. Edit the choices. If the player chooses yes, the tag is turned on and if the player chooses no the tag is turned off

Pick up another free text box in which you write

Sorry you cannot use this item here it would be useless.

We'll say that it's text box 35. Many changes have been made. Feel free to save your game datas here but don't exit custom.exe because we haven't finished. Now go back and edit the shop. Use the arrow to find your potion shop and add an new shop thing. Use the number line and the new item escape.

Edit again the item menu and choose escape. Go down to the line "when used out of battle" and use the left arrow. You should see "text 1". Press the left arrow so that you can see the text Sorry you cannot use this item here it would be useless and the figure 35.

You can now leave custom.exe and save your game datas and open your hss file. The little trouble we'll have here will concern the X, Y coordonates. We'll have to adapt them in each dungeon. To know in which dungeon the player is in we'll use a global variable. There's 2 way to use it!

1 we can use the global variable to store and detect the number of the map the player is on
2 we can use the global to count dungeons and then adapt the x,y coordonates.

As the first one is easier, we'll use it. Moreover, the global variable used to store the current map's number in other scripts.

Global variable (1,your M) # Your current map

define script, autorun map dungeon 1, none
define script, autorun map dungeon 1, none
define script, escape item, none

#-----------------------------------------
# dungeon 1 is on map 5
plotscript, autorun map dungeon 1, begin

set tag (tag: player is in dungeon, on)

end #end of the plotscript
#-----------------------------------------
# dungeon 2 is on map 6
plotscript, autorun map dungeon 2, begin

set tag (tag: player is in dungeon, on)

end #end of the plotscript
#-----------------------------------------
plotscript, escape item, begin

set variable (YourM,current map)  #allow to store the current map we're in.

if (current map == 5)then, begin
suspend player
fade screen out
set hero position (me, 5, 3) #entry x4, y3
delete item (12, 1)# remove one escape item
fade screen in
resume player
end, else, begin

if (current map == 6)then, begin
suspend player
fade screen out
set hero position (me, 3, 2) #entry x4, y2
delete item (12, 1)# remove one escape item
fade screen in
resume player
end
end


end #end of the plotscript
#-------------------------------------------------

The script is brings back to hero at the entry of the dungeon. Feel free to use a piece of paper to note the x,y coordonates for each dungeon. To do so edit the dungeon map and check the entry door. Be carefull NOT TO put the X, Y coordonates of the entry door. If you do, the player will be teleported on the door and when the script ends the hero will use the door and leaves automatically!

To finish with scripts; one very important thing . To make the system works correctly, the tag "player is in dungeon" stay turned off in all the other maps. That means that for each map (dungeon map excepted) you'll make the player go you'll have to create an autorun script in which you'll add the line :

set tag (tag: player is in dungeon, off)

If there's already an autorun script, just add the lines. Don't forget about the inner doors script. It would be strange if the player could see the message "would you like to escape?" inside a shop or a house. The item is for dungeons (and more generally vast area with ennemies) Now compile your script and launch custom.exe again. Go into the script management and import your hs file. Then edit the text boxes and edit text box 34.

In the conditionals make run that you see

instead if tag "yes no questions" is turned off
jump to text box 34 instead 

go down and put

after tag "yes no question" is turned on
escape item next

You can now save your game data and test the whole thing... after you have taken time to change all the figures (in particular those who concerns x,y coordonates, text boxes references and tag names!)

See also[edit]