Page 1 of 1

[REQ] Configurable Level Cap

Posted: Tue Sep 30, 2008 11:25 am
by John Adams
Add an option to the `variables` table to set the maximum level a player can achieve via normal game play or the use of the /level command.
This could encompass adventure, tradeskill, AA, and guild levels. Am I missing any?

Posted: Sun Oct 26, 2008 4:28 pm
by Image
Would we want admin's to be able to go past this limit? We would either need a variable for who can bypass it or hardcode a admin status.

Posted: Mon Oct 27, 2008 6:18 am
by John Adams
Hey Image, good to see you. :)
I like the idea, but I will clarify what I meant by /level command caps - obviously, admins can do whatever they want on their servers, so you would have to allow for that. My example would be a Guide/GM of a server who uses /level to set a player above the expected level cap of the server. Currently, I believe /level is self-only, but eventually I imagine it to be a GM option. Keeping honest GMs honest is the goal.
The main point was to introduct level caps in general for XP gained by players. Like if I wanted my server to cap out at level 50, etc. Players could not advance beyond level 50(.999 heh) and GMs could not /level 51+ that player blah blah.
Maybe offering an option that if GM status > 'x', they can set a player or themselves to level 255 if they want? The more configurable, the better. :)

Posted: Mon Oct 27, 2008 6:22 am
by Image
I could see that for regular levelling by XP. But if we modify the /level command it would mean everyone is restricted across the board.
If you want to limit the /level command as well we should probably have some sort of bypass for admins, my question is should this be hardcoded or not.
Also, can you send me your current eq2emu database sometime? image.emagi@gmail.com. I need it to test out some of the bugs that you guys are experiencing.

Posted: Tue Nov 25, 2008 2:22 pm
by John Adams
Here is my implementation of the level cap for the /level command. I haven't gone into the regular XP leveling since that is dangerous waters for me (grin)... this is also just for Adventure XP, since that's the only one we support at the moment. Hopefully it's a base to implement the other level caps.
Patch: Download
OPTIONAL SQL updates:
insert into `variables`(`variable_name`,`variable_value`,`comment`) values ( 'level_cap','80','Maximum level allowed on this server');
insert into `variables`(`variable_name`,`variable_value`,`comment`) values ( 'level_cap_status_override','100','admin_status required to override level_cap');
How it works:
Client types /level 255, first the COMMAND_LEVEL checks if there is a level_cap value in `variables`, if not, it ignores the entire code block and levels the client up.
If there is a level_cap value, it then compares the admin_status of the client to the level_cap_override_status value in `variables`. If that passes, the client is leveled up. If not, the client is set to the level set in the level_cap variable value.
Please feel free to tweak, as this is just what I needed to get by for now. I was also unsure of the including of Variables.h and the extern stuff, I just saw that's how Image did it for zone access and mimicked him. :)