How can I make it so that an inn restores HP, but not MP?
In most RPGs, when your characters stay at an inn (or a hotel, or a Pokémon Center, or whatever the game's equivalent is), the party's HP and MP are both restored. The OHRRPGCE's built-in inns follow this model, so if you want to restore only HP at an inn, you'll have to take matters into your own plotscripty hands.
There are a few ways to do this, but the easiest involves making two text boxes. Make one of them be something the innkeeper will say to greet the heroes, like "Welcome, travelers!" and the other something like "I'm sorry, you don't seem to have enough money."
Next, make a plotscript like this:
define constant (47, cant afford text box) # set this to the ID of your "you don't have enough money" text box define constant (100, inn fee) # set this to what you want your inn to cost plotscript, hp only inn, begin if (pay money (inn fee)) then, begin # heal each hero variable (which hero) for (which hero, 0, 3) do, begin # set hero's HP back to maximum set hero stat (which hero, stat:HP, get hero stat (which hero, stat:HP, maximum stat)) end # fade screen out and back in, like when you use a normal inn fade screen out wait(8) fade screen in end, else, begin show text box (cant afford text box) end end
Now, after importing your scripts, open up the text box editor again and go back to your "Welcome, travelers!" text box.
- Go to Edit Choices, and change Choice: Disabled to Choice: Enabled. Set Option 0 text to something like "Stay," and pick a tag for it to set ON (for this example we'll say it's tag 76). Then set Option 1 text to something like "Cancel," and have it turn the same tag OFF.
- Now, go to Edit Conditionals, and go down to the very last section. Change "AFTER: Never do the following" to "If (your tag) = ON," and change "use [text box or script] next" to "run hp only inn next."
If you want, you can also make a version of the script that replaces stat:HP with stat:MP and make an "inn" that only restores MP.