Random Encounter On/Off Option

darksydex3226

Warper
Member
Joined
Aug 16, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
I would like a random encounter system similar to Bravely Default, where you can have the option to turn them on and off. I'm new to creating scripts but I found something like this...

$gameSystem.disableEncounter();

$gameSystem.enableEncounter();

I'm assuming a menu add on script plus that would do the trick? I don't know how to do this stuff yet, so a quick point in the right direction would really make my life better. Thanks!
 

Kenen

Veteran
Veteran
Joined
Apr 3, 2012
Messages
262
Reaction score
155
First Language
English
Primarily Uses
RMMV
Modifying the default options menu would probably be the cleanest implementation.

Otherwise, you could try installing Yanfly's Main Menu Manager (http://yanfly.moe/2015/10/17/yep-14-main-menu-manager/) and pinning a commen event to the menu that toggles an "Encounter None" state (Encounter None can be found in States, under the Other tab).
 

darksydex3226

Warper
Member
Joined
Aug 16, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Modifying the default options menu would probably be the cleanest implementation.

Otherwise, you could try installing Yanfly's Main Menu Manager (http://yanfly.moe/2015/10/17/yep-14-main-menu-manager/) and pinning a commen event to the menu that toggles an "Encounter None" state (Encounter None can be found in States, under the Other tab).
I like that idea (the menu one, I'll have to figure that out)

For now I just added an Item that calls a Common Event to switch it on and off. I'll look into how to add menu options later. Thanks for the input!
 

darksydex3226

Warper
Member
Joined
Aug 16, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
So I'm trying to add it to the options, I added this to the .js core in hopes it would work (Im just shooting in the dark, honestly...)

Window_Options.prototype.addGeneralOptions = function() {

    this.addCommand(Textmanager.disableEncounter, 'disableEncounter');

    this.addCommand(Textmanager.enableEncounter, 'enableEncounter');

 

It dont work tho, can anyone tell me the right way to handle this so I can just C&P? That'd be delicious
 

Uzuki

Kawaii on the streets, Senpai in the sheets
Veteran
Joined
Aug 18, 2012
Messages
1,933
Reaction score
1,326
First Language
English
Primarily Uses
RMMV
Yanfly, Hime, and Victor all have plugins that either adds a Common Event to the main menu or to the option menu. Hime even has a plugin that allows you to bind Common Events to keys/buttons so that would make it even easier for the player.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
You have to create and bind the option. 

this.addCommand('Disable Encounter', 'disableEncounter');^ once you do that on the Window part, you need to create a function for disableEncounter on your Scene_Menu that calls the $gameSystem function.

How does the Bravely Default show it though? I am curious to know.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
I've moved this thread to JS Plugin Requests. Please be sure to post your threads in the correct forum next time. Thank you.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,528
Reaction score
14,261
First Language
English
Primarily Uses
RMVXA
I did something like this in ACE, and you can find the script for it here: http://forums.rpgmakerweb.com/index.php?/topic/33348-random-encounter-control-version-041-updated-12615/

I don't know any Javascript, so can't help with the conversion, but maybe this will give you an idea how to implement it via a script? I also used Yanfly's System Manager to bind a switch to the options menu, so the player can turn it on and off.

Only thing to remember: The way I set it up, the fights only occur when the switch is ON. So you'll need to remember to turn the switch ON when you start the game.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,472
Members
137,822
Latest member
madelbylz
Top