If you want to do it via custom scripts, the below is my snippet for this:
Spoiler
#==============================================================================|# ** You only need to edit this part as it's about what this snippet does |#------------------------------------------------------------------------------|module Level_Cap # The level cap of all actors when game switch with id CAP_SWITCH_ID is true LEVEL_CAP = 50 # Id of game switch used to apply LEVEL_CAP to all actors # Setting CAP_SWITCH_ID as 0 disables the entire feature CAP_SWITCH_ID = 0end # Level_Cap#==============================================================================|#==============================================================================|# ** You need not edit this part as it's about how this snippet works |#------------------------------------------------------------------------------|class Game_Actor < Game_Battler #----------------------------------------------------------------------------| # Alias method: max_level | #----------------------------------------------------------------------------| alias max_level_cap max_level def max_level # This part is rewritten by this snippet to use LEVEL_CAP if switch with id CAP_SWITCH_ID is true cap_switch_id = Level_Cap::CAP_SWITCH_ID cap_switch_id > 0 && $game_switches[cap_switch_id] ? Level_Cap::LEVEL_CAP : max_level_cap # end # max_levelend # Game_Actor#==============================================================================|
There's 1 extremely dirty way I can think of that requires no custom script at all. The idea is to set the EXR of all actors having level 50 as 0 as long as that certain trigger isn't set. The below is 1 implementation:
(Thing will get more complicated if any actor can jump from under level 50 to over level 50 in 1 instant but it's extremely unlikely in your case as the max level is 99 there)
Add an event running continuously to call a common event in every map.
That common event can read all actors' levels using 1 game variable per actor:
Control Variable: variable x = actor x's level
In that common event, use conditional branches to check if any actor has level being 50 but EXR non-zero. Setting EXR as 0 is done by using a state, say state x. So the conditional branch maybe like this:
Conditional Branch: variable x >= level cap
Conditional Branch: actor x has state x inflicted
else
Change state: actor x add state x
Branch End
Branch End
level cap is 50 and 99 before and after setting that certain trigger respectively. When that certain trigger is set, just use another 1 time use event to remove state x from all actors.
Similar conditional branches needs to be in battle events for every battles too, as in the default RMVXA setting, all states will be removed upon death.
Unless you use events or custom scripts, the only way for an actor to level up is to gain exp, but now when they hit level 50, their EXR becomes 0 and they can't gain exp anymore. This effectively cap their level at 50.
Another similar idea and implementation is to use 1 variable per actor to store their levels. Again add an event running continuously to call another common event in every map. That common event may look like this:
Control Variable: variable x = actor x's level
Conditional Branch: variable x > level cap
Control Variable:variable x -= actor x's level
Change level: actor x - variable x
Branch End
Now whenever any actor having level above the level cap(again set as 50 and 99 before and after setting that certain trigger respectively), it'll be set as that level cap. This again effectively cap their level at 50.
Maybe my ways are ineffective and tedious but I hope at least it works
🙂