EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   AA's at any level or other ways to halt level gains (https://www.eqemulator.org/forums/showthread.php?t=40067)

starblight 10-03-2015 03:11 PM

AA's at any level or other ways to halt level gains
 
One ability I was surprised how often I used in Vanguard was the ability to halt all exp gain. Having the ability to stop level progression allowed me to keep a dungeon relevant until I was ready to move on. I would like to add some form of that into my server. At first I figured turning on AA exp would be a easy way too do this while at the same time still giving the player something for there kills. But I read on another post that the clients might stop this from being a option?

So is it possible to give players the ability to turn there AA experience on at any level? Whether it be with a command, UI, or a item? If not can I allow players to turn off exp gain altogether?

Edit
I had a thought and manually adjusted character_data >> e_percent_to_aa to 100 but at some point while playing I think after one kill the client sets it back to 0

demonstar55 10-03-2015 04:44 PM

EQEmu doesn't have banked AA caps implemented.

starblight 10-03-2015 07:11 PM

Quote:

EQEmu doesn't have banked AA caps implemented.
Can you expand on this? I am not sure what banked AA caps are or how they effects what I am trying to do.

demonstar55 10-03-2015 07:30 PM

Quote:

Originally Posted by starblight (Post 243758)
Can you expand on this? I am not sure what banked AA caps are or how they effects what I am trying to do.

Means

Quote:

Originally Posted by starblight (Post 243751)
But I read on another post that the clients might stop this from being a option?

That is not an issue.

starblight 10-03-2015 08:49 PM

Googled banked AA's and it sounds like you are saying people are not limited on how many AA's they can have unspent. This could be good if I ever get the ability to turn AA's on before you hit level 51.

Quote:

Originally Posted by demonstar55
That is not an issue.

Any chance on more information? I was hoping it would be as easy as setting a script that would change your AA% inside the database. But after testing it by manual setting it and having it change back it dashed my hopes.

demonstar55 10-03-2015 11:24 PM

Sub 51 you're probably SOL.

What about adding a clicky with a permanent byff that has a -100% XP bonus? (I actually have no idea if this will work :P)

starblight 10-04-2015 03:02 AM

Quote:

Originally Posted by demonstar55 (Post 243768)
Sub 51 you're probably SOL.

What about adding a clicky with a permanent byff that has a -100% XP bonus? (I actually have no idea if this will work :P)

It is one idea I thought might work. I also figure I might need to make a change to the source code. I was hoping someone far smarter then me though could point me in the right direction.

Cilraaz 10-04-2015 10:20 AM

You could also create a quest that adds a character flag, then check for that character flag in the Client::CalcEXP function in zone/exp.cpp. If the check for the flag comes back true, return 0 instead of the actual xp amount.

I haven't tried anything like this, but logically, I think it should work.

Kingly_Krab 10-04-2015 03:51 PM

In sub EVENT_DEATH_COMPLETE you could have AA experience awarded to the killer/killers depending on mob level. Also, you could likely write your own rule for a cap on AAs in to the experience code so you cannot go beyond a certain amount and then you can increase it as time progresses or you can have different rulesets for your different zones of content so people can progress and gain more AAs as they go to new zones in your content progression line.

starblight 10-05-2015 12:43 AM

I have been looking over the code after the last 2 suggestion and I found this code in exp.cpp.

Code:

        if (GetLevel() < 51) {
                m_epp.perAA = 0;        // turn off aa exp if they drop below 51
        } else
                SendAlternateAdvancementStats();        //otherwise, send them an AA update

It seems like if I were to comment that part of the code out I might be able to set AA's on below 51? Before I tried it I was hoping for some feedback.

provocating 10-05-2015 10:02 AM

Instead of commenting, why not set it for maybe level 1? If you are indeed wanting AA's from a certain level. Just change it and do a recompile, what could it hurt?

rhyotte 10-05-2015 12:41 PM

Interesting. Tagging in to keep track.

starblight 10-05-2015 12:46 PM

I have some changes I want to make for trade skills at the same time. Once I get both changes made I will report back on how this worked.

Cilraaz 10-06-2015 06:33 PM

I threw something together and it happened to work. It's fairly non-intrusive, only using a small block of code in zone/exp.cpp and a global quest flag.

Edit zone/exp.cpp and add the following to the top of the AddEXP function:
Code:

        std::string query = StringFormat("SELECT value FROM quest_globals WHERE charid='%i' AND name='Halt_Exp_Gains_Toggle'", this->CharacterID());
        auto results = database.QueryDatabase(query);
        if(results.Success()) {
                auto row = results.begin();
                char* ExpOff = row[0];
                int8 ExpFlag = atoi(ExpOff);
                if (ExpFlag == 1)
                        return;
        }

I added the following quest code. Add it to whatever NPC you want to toggle the experience flag:
Code:

if($text=~/experience/i) {
                quest::say("Greetings, $name.  This is a test script. Do you want to [check your experience flag] or [toggle your experience flag]? and things");
}

if($text=~/check my exp/i) {
        if(defined $qglobals{Halt_Exp_Gains_Toggle}) {
                if($qglobals{Halt_Exp_Gains_Toggle} == 1) {
                        $expflag = "disabled";
                } else {
                        $expflag = "enabled";
                }
        } else {
                $expflag = "enabled";
        }

        quest::say("Well, $name, your ability to gain experience appears to be $expflag");
}

if($text=~/toggle my exp/i) {
        quest::say("Are you sure you [want to toggle] your experience flag?");
}

if($text=~/want to toggle/i) {
        if(defined $qglobals{Halt_Exp_Gains_Toggle}) {
                if($qglobals{Halt_Exp_Gains_Toggle} == 1) {
                        quest::setglobal("Halt_Exp_Gains_Toggle", 0, 5, "F");
                        $expflag = "enabled";
                } else {
                        quest::setglobal("Halt_Exp_Gains_Toggle", 1, 5, "F");
                        $expflag = "disabled";
                }
        } else {
                quest::setglobal("Halt_Exp_Gains_Toggle", 1, 5, "F");
                $expflag = "disabled";
        }

        quest::say("Your ability to gain experience is now $expflag. If you wish to alter this status, please talk to me again.");
}

Obviously, all of the quest text can be modified and the confirmation can be removed if wanted.

The code in exp.cpp should only need to go in AddEXP. There are also SetEXP and CalcEXP functions, but I believe SetEXP is only used by the #setxp and #setaaxp commands, while I have no idea where CalcEXP is used.

MarcusD 10-09-2015 01:16 AM

is it possible to change the level cap? For me I would want it for roleplaying, being the GM I would want to cap a group of friends to say lvl 20 temporarily so they don't leave each other behind for example.


All times are GMT -4. The time now is 04:05 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.