Tweaked XP System

Tweaked XP System.
Full compile.
This commit is contained in:
Jaysyn904
2025-06-07 01:07:52 -04:00
parent 368fbb25aa
commit 0ab4e8d565
12 changed files with 362 additions and 304 deletions

View File

@@ -2917,7 +2917,7 @@
},
"Version": {
"type": "dword",
"value": 50
"value": 51
},
"Width": {
"type": "int",

View File

@@ -1203,7 +1203,7 @@
},
"Mod_OnNuiEvent": {
"type": "resref",
"value": ""
"value": "prc_onplayernui"
},
"Mod_OnPlrChat": {
"type": "resref",
@@ -1295,7 +1295,7 @@
},
"Mod_XPScale": {
"type": "byte",
"value": 100
"value": 0
},
"VarTable": {
"type": "list",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -32,7 +32,7 @@ const float GP_REWARD_MULTIPLIER = 7.0;
// Default is 0.1 = 10%
// If the REWARD_GP const above is set to FALSE then ONLY an XP bonus is given
// * Note * Changed so this will only apply if the killer is in party
const float KILLER_XP_GP_BONUS = 0.1;
const float KILLER_XP_GP_BONUS = 0.3;
// This will give an XP/GP bonus per player in the party
// Default is 0.1 = 10% per player
@@ -127,7 +127,27 @@ LEVEL_36_MAX_XP = 800,
LEVEL_37_MAX_XP = 800,
LEVEL_38_MAX_XP = 800,
LEVEL_39_MAX_XP = 800,
LEVEL_40_MAX_XP = 900; // No need for this really
LEVEL_40_MAX_XP = 900,
LEVEL_41_MAX_XP = 900,
LEVEL_42_MAX_XP = 900,
LEVEL_43_MAX_XP = 900,
LEVEL_44_MAX_XP = 900,
LEVEL_45_MAX_XP = 900,
LEVEL_46_MAX_XP = 900,
LEVEL_47_MAX_XP = 900,
LEVEL_48_MAX_XP = 900,
LEVEL_49_MAX_XP = 900,
LEVEL_50_MAX_XP = 1000,
LEVEL_51_MAX_XP = 1000,
LEVEL_52_MAX_XP = 1000,
LEVEL_53_MAX_XP = 1000,
LEVEL_54_MAX_XP = 1000,
LEVEL_55_MAX_XP = 1000,
LEVEL_56_MAX_XP = 1000,
LEVEL_57_MAX_XP = 1000,
LEVEL_58_MAX_XP = 1000,
LEVEL_59_MAX_XP = 1000,
LEVEL_60_MAX_XP = 1000; // No need for this really
////////////////////////////////////////////////////////////////////////////////
//:: DO NOT TOUCH ANYTHING BELOW HERE !!!!!
@@ -360,6 +380,26 @@ int GetMaxXP(object oPC)
case 38: iMaxXP = LEVEL_38_MAX_XP; break;
case 39: iMaxXP = LEVEL_39_MAX_XP; break;
case 40: iMaxXP = LEVEL_40_MAX_XP; break;
case 41: iMaxXP = LEVEL_41_MAX_XP; break;
case 42: iMaxXP = LEVEL_42_MAX_XP; break;
case 43: iMaxXP = LEVEL_43_MAX_XP; break;
case 44: iMaxXP = LEVEL_44_MAX_XP; break;
case 45: iMaxXP = LEVEL_45_MAX_XP; break;
case 46: iMaxXP = LEVEL_46_MAX_XP; break;
case 47: iMaxXP = LEVEL_47_MAX_XP; break;
case 48: iMaxXP = LEVEL_48_MAX_XP; break;
case 49: iMaxXP = LEVEL_49_MAX_XP; break;
case 50: iMaxXP = LEVEL_50_MAX_XP; break;
case 51: iMaxXP = LEVEL_51_MAX_XP; break;
case 52: iMaxXP = LEVEL_52_MAX_XP; break;
case 53: iMaxXP = LEVEL_53_MAX_XP; break;
case 54: iMaxXP = LEVEL_55_MAX_XP; break;
case 55: iMaxXP = LEVEL_55_MAX_XP; break;
case 56: iMaxXP = LEVEL_56_MAX_XP; break;
case 57: iMaxXP = LEVEL_57_MAX_XP; break;
case 58: iMaxXP = LEVEL_58_MAX_XP; break;
case 59: iMaxXP = LEVEL_59_MAX_XP; break;
case 60: iMaxXP = LEVEL_60_MAX_XP; break;
}
return iMaxXP;
}
@@ -373,52 +413,70 @@ int GetLevelFromXP(object oPC)
//If we are checking their XP to consider what level they are..
if(XP_CHECK)
{
iXP = GetXP(oPC);
if (iXP >= 780000) iXP = 40;
else if (iXP >= 741000) iXP = 39;
else if (iXP >= 703000) iXP = 38;
else if (iXP >= 666000) iXP = 37;
else if (iXP >= 630000) iXP = 36;
else if (iXP >= 595000) iXP = 35;
else if (iXP >= 561000) iXP = 34;
else if (iXP >= 528000) iXP = 33;
else if (iXP >= 496000) iXP = 32;
else if (iXP >= 465000) iXP = 31;
else if (iXP >= 435000) iXP = 30;
else if (iXP >= 406000) iXP = 29;
else if (iXP >= 378000) iXP = 28;
else if (iXP >= 351000) iXP = 27;
else if (iXP >= 325000) iXP = 26;
else if (iXP >= 300000) iXP = 25;
else if (iXP >= 276000) iXP = 24;
else if (iXP >= 253000) iXP = 23;
else if (iXP >= 231000) iXP = 22;
else if (iXP >= 210000) iXP = 21;
else if (iXP >= 190000) iXP = 20;
else if (iXP >= 171000) iXP = 19;
else if (iXP >= 153000) iXP = 18;
else if (iXP >= 136000) iXP = 17;
else if (iXP >= 120000) iXP = 16;
else if (iXP >= 105000) iXP = 15;
else if (iXP >= 91000) iXP = 14;
else if (iXP >= 78000) iXP = 13;
else if (iXP >= 66000) iXP = 12;
else if (iXP >= 55000) iXP = 11;
else if (iXP >= 45000) iXP = 10;
else if (iXP >= 36000) iXP = 9;
else if (iXP >= 28000) iXP = 8;
else if (iXP >= 21000) iXP = 7;
else if (iXP >= 15000) iXP = 6;
else if (iXP >= 10000) iXP = 5;
else if (iXP >= 6000) iXP = 4;
else if (iXP >= 3000) iXP = 3;
else if (iXP >= 1000) iXP = 2;
else iXP = 1;
iXP = GetXP(oPC);
if (iXP >= 1770000) iXP = 60;
else if (iXP >= 1711000) iXP = 59;
else if (iXP >= 1653000) iXP = 58;
else if (iXP >= 1596000) iXP = 57;
else if (iXP >= 1540000) iXP = 56;
else if (iXP >= 1485000) iXP = 55;
else if (iXP >= 1431000) iXP = 54;
else if (iXP >= 1378000) iXP = 53;
else if (iXP >= 1326000) iXP = 52;
else if (iXP >= 1275000) iXP = 51;
else if (iXP >= 1225000) iXP = 50;
else if (iXP >= 1176000) iXP = 49;
else if (iXP >= 1128000) iXP = 48;
else if (iXP >= 1081000) iXP = 47;
else if (iXP >= 1035000) iXP = 46;
else if (iXP >= 990000) iXP = 45;
else if (iXP >= 946000) iXP = 44;
else if (iXP >= 903000) iXP = 43;
else if (iXP >= 861000) iXP = 42;
else if (iXP >= 820000) iXP = 41;
else if (iXP >= 741000) iXP = 39;
else if (iXP >= 703000) iXP = 38;
else if (iXP >= 666000) iXP = 37;
else if (iXP >= 630000) iXP = 36;
else if (iXP >= 595000) iXP = 35;
else if (iXP >= 561000) iXP = 34;
else if (iXP >= 528000) iXP = 33;
else if (iXP >= 496000) iXP = 32;
else if (iXP >= 465000) iXP = 31;
else if (iXP >= 435000) iXP = 30;
else if (iXP >= 406000) iXP = 29;
else if (iXP >= 378000) iXP = 28;
else if (iXP >= 351000) iXP = 27;
else if (iXP >= 325000) iXP = 26;
else if (iXP >= 300000) iXP = 25;
else if (iXP >= 276000) iXP = 24;
else if (iXP >= 253000) iXP = 23;
else if (iXP >= 231000) iXP = 22;
else if (iXP >= 210000) iXP = 21;
else if (iXP >= 190000) iXP = 20;
else if (iXP >= 171000) iXP = 19;
else if (iXP >= 153000) iXP = 18;
else if (iXP >= 136000) iXP = 17;
else if (iXP >= 120000) iXP = 16;
else if (iXP >= 105000) iXP = 15;
else if (iXP >= 91000) iXP = 14;
else if (iXP >= 78000) iXP = 13;
else if (iXP >= 66000) iXP = 12;
else if (iXP >= 55000) iXP = 11;
else if (iXP >= 45000) iXP = 10;
else if (iXP >= 36000) iXP = 9;
else if (iXP >= 28000) iXP = 8;
else if (iXP >= 21000) iXP = 7;
else if (iXP >= 15000) iXP = 6;
else if (iXP >= 10000) iXP = 5;
else if (iXP >= 6000) iXP = 4;
else if (iXP >= 3000) iXP = 3;
else if (iXP >= 1000) iXP = 2;
else iXP = 1;
}
else
{
iXP = GetHitDice(oPC);
iXP = GetHitDice(oPC);
}
return iXP;