On the server I'm working on, I've tinkered with the code to allow players to earn AA xp as they gain normal XP. Its still a work in progress but it does work. Again I'm no programmer but I do enjoy tinkering (I must be a gnome...). The mod will allow players to start Spending AA's around 10th level... and yes you will have to compile your own code
There are a few things you will have to mod before this will work.
First mods will be in the
exp.cpp
Look for:
Code:
//figure out how much of this goes to AAs
add_aaxp = add_exp * m_epp.perAA / 100;
//take that ammount away from regular exp
add_exp -= add_aaxp;
Replace with:
Code:
//figure out how much of this goes to AAs
//Krugus mod: AA xp gained now = xp gained before modifiers. Gain AA's as you level!
add_aaxp = add_exp; // krugus mod: was add_aaxp = add_exp * m_epp.perAA / 100;
//take that ammount away from regular exp
//add_exp -= add_aaxp;
Next in
exp.cpp
look for:
Code:
void Client::SetEXP(int32 set_exp, int32 set_aaxp, bool isrezzexp) {
max_AAXP = GetEXPForLevel(52) - GetEXPForLevel(51);
if (max_AAXP == 0 || GetEXPForLevel(GetLevel()) == 0xFFFFFFFF) {
Message(13, "Error in Client::SetEXP. EXP not set.");
return; // Must be invalid class/race
}
Replace with:
Code:
void Client::SetEXP(int32 set_exp, int32 set_aaxp, bool isrezzexp) {
//max_AAXP = GetEXPForLevel(10) - GetEXPForLevel(9); // krugus mod: was 52 and 51. changed it to 10 and 9 to start off with
//start of AA MOD Adjusting AA xp based on character level. Easier to gain them at lower levels but the required xp goes up every 10 lvls
if(GetLevel() >= 71) {
max_AAXP = GetEXPForLevel(27) - GetEXPForLevel(26);//2,107,000 xp
}
else if(GetLevel() >= 61) {
max_AAXP = GetEXPForLevel(23) - GetEXPForLevel(22); //1,519,000 xp
}
else if(GetLevel() >= 51) {
max_AAXP = GetEXPForLevel(19) - GetEXPForLevel(18); //1,027,000 xp
}
else if(GetLevel() >= 41) {
max_AAXP = GetEXPForLevel(17) - GetEXPForLevel(16); //817,000 xp
}
else if(GetLevel() >= 31) {
max_AAXP = GetEXPForLevel(15) - GetEXPForLevel(14); //631,000 xp
}
else if(GetLevel() >= 21) {
max_AAXP = GetEXPForLevel(13) - GetEXPForLevel(12); //469,000 xp
}
else if(GetLevel() >= 1) {
max_AAXP = GetEXPForLevel(10) - GetEXPForLevel(9); //271,000 xp
}
//END of AA MOD
if (max_AAXP == 0 || GetEXPForLevel(GetLevel()) == 0xFFFFFFFF) {
Message(13, "Error in Client::SetEXP. EXP not set.");
return; // Must be invalid class/race
}
Next in
exp.cpp
Look for:
Code:
if (GetLevel() < 51) {
m_epp.perAA = 0; // turn off aa exp if they drop below 51
} else
SendAAStats(); //otherwise, send them an AA update
Replace with:
Code:
if (GetLevel() < 10) { // krugus mod was < 51
m_epp.perAA = 0; // turn off aa exp if they drop below 10 (krugus mod was 51)
} else
SendAAStats(); //otherwise, send them an AA update
Next mod will be in
client_packet.cpp
Look for the following, it should be listed twice in the client_packet.cpp .......
Code:
//Send AA Exp packet:
if(GetLevel() >= 51)
SendAAStats();
......and change the 51 to 10 in both spots.
The last change is a simple db query:
Code:
update altadv_vars set class_type = 10 where class_type = 51;
update altadv_vars set class_type = 25 where class_type = 55;
update altadv_vars set class_type = 40 where class_type = 59;
update altadv_vars set class_type = class_type - 10 where class_type > 59;
This will allow:
General AA's to be bought at 10th
Arch Type AA's at 25th
Class AA's at 40th
the rest from 49th on up.
As far as the % AA bar goes, yea its more than likely hard coded in the Client but with this... its not needed.
Anyways hope this helps.