Okay, I'll try and explain what I did. First, start with Yanfly's script. There is this section, starting at line 106
COMMANDS =[ :window_red, # Changes the red tone for all windows. :window_grn, # Changes the green tone for all windows. :window_blu, # Changes the blue tone for all windows. :volume_bgm, # Changes the BGM volume used. :volume_bgs, # Changes the BGS volume used. :volume_sfx, # Changes the SFX volume used. :blank, :autodash, # Sets the player to automatically dash. :instantmsg, # Sets message text to appear instantly. :animations, # Enables battle animations or disables them. # :switch_1, # Custom Switch 1. Adjust settings below. # :switch_2, # Custom Switch 2. Adjust settings below. :variable_1, # Custom Variable 1. Adjust settings below. # :variable_2, # Custom Variable 2. Adjust settings below. :blank, :to_title, # Returns to the title screen. :shutdown, # Shuts down the game. ] # Do not remove this.You will see that at line 119, I removed the #
This makes that line 'active'.
Then a little lower down, in the section on Custom Variables, starting at line 156 you will see this:
CUSTOM_VARIABLES ={ # ------------------------------------------------------------------------- # :variable => [Switch, Name, Colour1, Colour2, Min, Max, # Help Window Description # ], # Do not remove this. # ------------------------------------------------------------------------- :variable_1 => [ 50, "Encounter Rate", 9, 1, 10, 40, "Slide bar to adjust encounter rate. For INVISIBLE enemies only. Minimum = 10, Maximum = 40, Default = 25" ], # ------------------------------------------------------------------------- :variable_2 => [ 2, "Custom Variable 2", 10, 2, -10, 10, "Help description used for custom variable 2." ],Starting at line 162 is where I edited to put in the details of what I wanted. The words in quote marks are what shows up when the player selects that option.
So then it is a question of setting the default.
In the default scripts, go to Game_Player and you will find a section Creat Encounter Count, starting at line 191
# * Create Encounter Count #-------------------------------------------------------------------------- def make_encounter_count n = $game_map.encounter_step @encounter_count = rand(n) + rand(n) + 1 + $game_variables[50] endI altered that section so that it looks like the snippet I posted. This does 2 things. It stops the "take 3 steps and have a battle; take 4 steps and have another one" problem and it sets up the variable I use to set what the default will be. That's the [50] at the end of the line. You, obviously, would put in whatever variable switch you assign to this task.
Then, and this is the final step, I promise
At the very beginning of the game, immediately after the title screen, I have an event on the opening map where I set various switches. I set variable switch 50 to equal 25.
I hope I've explained this clearly. It looks like a lot of work, but in fact it's dead easy if you go through and do each bit methodically.