I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.
If you want to do something with scripting, please post in the Script Requests forum (for new script requests) or RGSSx Script Support (if you have a script already and just need some help with it).
If you want to do it via custom scripts, the below is my snippet for this:
#==============================================================================|# ** 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
He wants the max level to be 50 at some parts of his game and 99 at some of its other parts. In other words the max level needs to be changed from 50 to 99 at some instances.
But sinece in the default RMVXA settings max level is supposed to be constant(doesn't change thorough the entire game), some tricks or custom scripts are definitely needed
Yes I missed that last part when I first read it. I had been looking at the actor page, and the answer seemed way to obvious. I should have known better then to just post the most obvious thing that came to mind without rereading what he said. Especially after some of the more complicated answers.
Personally I've been wondering whether it would be better to simply make script calls like
change_max_level(actor_id, amount)set_max_level(actor_id, amount)As that would be "easier" to work with than applying features.Though, since the feature uses variables, it would just be a matter of managing your variables properly...
Personally I've been wondering whether it would be better to simply make script calls like
change_max_level(actor_id, amount)set_max_level(actor_id, amount)As that would be "easier" to work with than applying features.Though, since the feature uses variables, it would just be a matter of managing your variables properly...
Well I think it depends on the project really. The variable controls actually would help me out more, as i can set specific groups of characters that share a variable to change their max level.
There is one other thing that might be possible. (I' not sure I haven't tested it)
And that is that you double up your actors. Where one set has a level cap of 50, and the other has a level cap of 99.
And you can trigger the switch to the second block both when the trigger event (to break the level cap) has be activated, and when the character reaches level 50 (by a variable). The only problem I can think of with this is the equipment transfer. But other then that I see no reason it wouldn't work.
@Kain Oborin: Not only equipment transfer (that could easily be handled), but the main problem are other bonuses.
Your method only works if all quest rewards are XP - as soon as a quest rewards a skill or parameter bonus that is not part of the actor/class combination, that reward would have to be stored for the replacement actor as well or get lost.
That makes your idea too limiting (if you don't make such rewards) or too complex (storing and checking all quest rewards)
Well I thought about it a bit more (over the last 5 minutes) and including what you said... you're most likely right... it would probably be quite a task to complete.
@Kain Oborin: Not only equipment transfer (that could easily be handled), but the main problem are other bonuses.
Your method only works if all quest rewards are XP - as soon as a quest rewards a skill or parameter bonus that is not part of the actor/class combination, that reward would have to be stored for the replacement actor as well or get lost.
That makes your idea too limiting (if you don't make such rewards) or too complex (storing and checking all quest rewards)
In my game, my workaround is to quietly add the skill or bonus to both Actors which represent the same character, since at one point the main character learns several dark magic spells, and I wanted him to retain them when transferring back to his normal form. This only works if the bonus is given out explicitly by an NPC, rather than implicitly from an item.
In my game, my workaround is to quietly add the skill or bonus to both Actors which represent the same character, since at one point the main character learns several dark magic spells, and I wanted him to retain them when transferring back to his normal form. This only works if the bonus is given out explicitly by an NPC, rather than implicitly from an item.
Honestly, i'd like my project to be a lot more linear than that, and id rather set it up with Hime's script then have to create more actors. As it is I already have a large amount of actors present in different parties across the story, and adding anymore would just over-complicate a process that can be completed much easier with the variable control given by the script.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
Yay, now back in action Happy Christmas time, coming back!
Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.