Increase number of players in the party (First Script) Rpg Maker MV

Hello to the whole community, I created this very small script just for my own needs, I needed a party identical to the one I have in my D&D session, otherwise whoever was left out would be disappointed......

I'll leave it here, and add an image too.

JavaScript:
(function() {
    Game_Party.prototype.maxBattleMembers = function() {
        return 6; // Change this number to the desired number of party members
    };
})();

Anyone who wants to use or modify it (adding options, or explaining to me how the players' positions can be modified) can do so freely.

And now I'm on to the requests part.....
How can I make a condition to see if a player is at a certain level?
I'll explain what I want to do:
I would like to create the Trap Detect ability
The thief of the group acquires more and more chances of success as he advances in level.
e.g. 1st Level 10%
2nd Level 15%....etc
I created a variable with the dice roll 1-100% but I have to make sure that the resulting result is congruent with the percentage that the character has in that specific experience level.
Thanks in advance
Greetings again everyone
Andrew
6 Players.jpg
1704146515792.png
Thanks, last question, I would like the "detect traps" to be activated everywhere by pressing the T key on the keyboard.........
Look up Yanfly's Button Common Events.

Original thread: https://forums.rpgmakerweb.com/threads/increase-number-of-players-in-the-party-first-script-rpg-maker-mv.164368/