Hi, everyone!
I'm working on my game Legend of Mages, and I can't seem to figure out how to make repels like in Pokémon. Could anybody who reads this and knows how to make them help me?
Please describe what a repel is - it doesn't help to compare it to a game that only part of the community has played.
Repels are items in Pokémon that, when used, prevent encounters in the wild, but still allow major enemy encounters like bosses, sentient enemies, and other battles that are not randomly generated.
Have it so that when repel is used, it adds a state. For that state, set encounter none. Now, all fights that are not randomly generated are avoided until the state wears off.
You'll want an item that adds an out-of-combat State.
The State has a Party Ability (last tab under Features) which says "Encounter Half" or "Encounter None".
That's pretty much it.
EDIT: Beat me to it. 😛
If a state doesn't have an icon, it won't show up on the display, right?
How do you change a state so that it will not show in-game?
Through what I've seen, if you don't give your state an icon, it indeed will not show up.
I've been using a state-based perk system in my own project, and it seems to not cause any issue with this.
Though, it could be useful to your player to show if repel is in effect or not, or how many steps they have left. Just throwing it out there.
I tried scripting once, and I actually managed to mess everything up so bad that the renderer threw out something like one of those old arcade kill screens. I just don't really trust scripting anymore. Is there any way to change the state's icon without scripting so that it won't show in battle, but will show from the menu?
Would it be possible to use a common event to operate everything, tell you when the repel has run out, check if you have any left in your inventory, and, if you do, ask you if you would like to use another?
The easiest, most reliable way to do it, of course, would probably be to just make an amulet or something of it. Someone's wearing the Gem of Peace? Party encounter rate is dropped to nil. Someone's wearing the Gem of Fury? Party encounter rate is doubled.
No need for scripts, but if you prefer to rely on consumables, well...