Change Max Level

Status
Not open for further replies.

EchoingClock

Veteran
Veteran
Joined
Mar 23, 2014
Messages
31
Reaction score
3
First Language
English
Primarily Uses
Hello again! I am looking for a way to change max level.

More specifically, I want all my characters to have a Level Cap of 50, and only after a certain trigger can the characters then progress to level 99.

Is there a way to do this with scripting or otherwise?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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).
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
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 :)
 
Last edited by a moderator:

Kain.Oborin

The Original One
Member
Joined
Jun 26, 2014
Messages
23
Reaction score
0
First Language
English
Primarily Uses
I apologize. I just reread the message, and I've found that it wasn't that obvious. I thought that was strange.

Apologies, Oborin.

(don't know how to delete... so... you'll have to live with this)
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
I apologize. I just reread the message, and I've found that it wasn't that obvious. I thought that was strange.

Apologies, Oborin.

(don't know how to delete... so... you'll have to live with this)
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 :)
 
Last edited by a moderator:

Kain.Oborin

The Original One
Member
Joined
Jun 26, 2014
Messages
23
Reaction score
0
First Language
English
Primarily Uses
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.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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...
 
Last edited by a moderator:

EchoingClock

Veteran
Veteran
Joined
Mar 23, 2014
Messages
31
Reaction score
3
First Language
English
Primarily Uses
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. 
 

Kain.Oborin

The Original One
Member
Joined
Jun 26, 2014
Messages
23
Reaction score
0
First Language
English
Primarily Uses
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. 
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,358
Reaction score
7,671
First Language
German
Primarily Uses
RMMV
@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)
 

Kain.Oborin

The Original One
Member
Joined
Jun 26, 2014
Messages
23
Reaction score
0
First Language
English
Primarily Uses
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. 
 
Last edited by a moderator:

whitesphere

Veteran
Veteran
Joined
Mar 14, 2014
Messages
1,688
Reaction score
784
First Language
English
@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.
 

EchoingClock

Veteran
Veteran
Joined
Mar 23, 2014
Messages
31
Reaction score
3
First Language
English
Primarily Uses
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. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.


at OP's request
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
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
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top