How to Make a Repel?

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.
Using states to accomplish this comes with some minor problems, such as the states automatically removing themselves from a character when they are KO'ed and the player receiving no indication of when the Repel wears off.

Instead, you could use my Encounter Rate Items script, if you'd like.
Using states to accomplish this comes with some minor problems, such as the states automatically removing themselves from a character when they are KO'ed and the player receiving no indication of when the Repel wears off.

Instead, you could use my Encounter Rate Items script, if you'd like.
To get rid of the states removing themselves, you can just use Hime's Permanent State script. It makes life pretty easy.

But you would have to do some scripting for the indication part.
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...
smarty3b, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you want to add something and your own post is the last one, simply edit it.
I suppose there is some possibility to do it without scripts that I didn't consider.

Well, perhaps a line or two of in-event code, but I'm sure you can handle that.

Whenever you use repel, set a variable to Steps in the other category. Then, start looping through this event on a 10 frame basis, constantly checking if the delta of steps taken is more than the number of steps repel gives you, and displaying a message whenever that happens.

You may have to use some amount of scripting to do this, but you wont have to edit the primary scripts; just a couple lines to make it a bit easier and only take up one variable..

You can always check the script call collection for a little help with this, since RGSS3 can be a bit intimidating at first.

http://forums.rpgmakerweb.com/index.php?/topic/25759-script-call-collection-for-vxace/

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-repel.36554/