#include "tk_hips_inc" // ***Farchilde's Advanced Level Control System*** //************************************************************************************ //*****************written by Farchilde (email farchilde@yahoo.ca)********************* //************************************************************************************ // introduction: //----- //this one script presents you with many options for controlling how players level //up in your PW. With this you can prevent powergaming if desired by restricting //the maximums of the four skills that lead to major imbalances by class, //disallowing, or allowing both devastating critical and disarm, and the ability to //simply disallow certain prestige classes based on level, or entirely, or you //can include a combination of all of these if you wish for your world. //----- //***A special note*** this system automatically unequips any item equipped on the //player which has any sort of skill bonus as a property. -do not- change this, as //changing it would force low level players with skill bonus items to relevel everytime //as they would forget to unequip the item in alot of cases. it does not remove items with //ability bonuses though, as they way I see it, if you have +10 to attributes items in //your module, you probably do not care about powergaming anyway. //----- // instructions: //----- //to install import the erf, and add the script "far_alcs" to your module's On Player //Level Up event in module properties, by going edit / module properties then to the events //tab. Set the setting as per the guide below, then go to the build tab and rebuild your //module (be sure to check compile all scripts), then save your module. //----- //checking for skill stacking: //----- //to check for skill stacking for the purposes of powergaming I included the four //skills that powergamers mainly focus on, discipline, spellcraft, tumble, and //use magic device. I also included pick pocket as a bonus. This system, customizable //by you, prevents the common practice of a player taking one level or rogue simply for //use magic device or tumble, or two levels of bard for discipline and spellcraft, etc. //It works by checking these five skills against the player's level in the classes specific //to that skill each time they level up. You can set both the maximum level checked and the //check DC as you will see below. You can also choose which of these four skills are checked. //----- //the player is forced to relevel on a -successful- skill check, remember that. it may //seem odd but just think that a level one bard say should not pass a DC 40 use magic //device check. if they fail the can relevel normally. //----- //this is the total percentage of the level a player has in the classes that have the //skill being checked as a class skill. So for example a 20th level rogue and 20th level //cleric would not be checked for use magic device, but a 10th level rogue and 20th level //cleric and 10th level fighter would. set the percentage as high or as low as you wish. //----- const float pPc = 0.0; //----- //max DC of each skill check, to set higher or lower, simply change the number on //the right hand side to the desired DC. //----- const int cUd = 0; //use magic device const int cDc = 0; //discipline const int cTm = 0; //tumble const int cSp = 0; //spellcraft const int cPp = 0; //pick pocket //----- //to disable each skill check entirely, simply set the number on the right hand side //to zero. //----- const int dUd = 0; //use magic device const int dDc = 0; //discipline const int dTm = 0; //tumble const int dSp = 0; //spellcraft const int dPp = 0; //pick pocket //----- //to allow devastating critical, simply switch the number on the right hand side to //zero. //----- const int dDv = 0; //----- //to allow disarm, simply switch the number on the right hand side to zero. //----- const int dDs = 0; //----- //to allow all presitge classes set the number on the right hand side to zero. to allow //prestige classes of your choice, you -must keep this switch at 1 and set the switches //below as instructed. //----- const int dPr = 0; //----- //prestige class control switches below, to set the maximum level for each //class simply change the number on the right hand side of each line (Note //if you want all prestige classes available, ses the switch above, for harper //scout, set to 6). ***important, for demo purposes all prestige classes are disabled, //stay within the range of one to 40 -do not- switch to zero*** //----- const int nAr = 20; //arcane archer const int nAs = 20; //assassin const int nBg = 1; //blackguard const int nHs = 6; //harper scout const int nCt = 20; //champion of torm const int nWm = 20; //weapon master const int nDd = 20; //dwarven defender const int nSd = 20; //shadowdancer const int nSh = 20; //shifter const int nPm = 20; //pale master const int nRd = 20; //red dragon disciple //----- //************************************************************************************ //*********************do not alter -any- of these lines below************************ //************************************************************************************ float UseMagicDeviceClassCheck(object oPc){ int iTl=GetHitDice(oPc); if(iTl==0) return 0.0; else{ int iUd=GetLevelByClass(CLASS_TYPE_BARD,oPc)+ GetLevelByClass(CLASS_TYPE_ROGUE,oPc)+ GetLevelByClass(CLASS_TYPE_ASSASSIN,oPc); float fUd=IntToFloat(iUd)/IntToFloat(iTl); return fUd;}} float DisciplineClassCheck(object oPc){ int iTl=GetHitDice(oPc); if(iTl==0) return 0.0; else{ int iDc=GetLevelByClass(CLASS_TYPE_BARBARIAN,oPc)+ GetLevelByClass(CLASS_TYPE_BARD,oPc)+ GetLevelByClass(CLASS_TYPE_FIGHTER,oPc)+ GetLevelByClass(CLASS_TYPE_MONK,oPc)+ GetLevelByClass(CLASS_TYPE_PALADIN,oPc)+ GetLevelByClass(CLASS_TYPE_RANGER,oPc)+ GetLevelByClass(CLASS_TYPE_BLACKGUARD,oPc)+ GetLevelByClass(CLASS_TYPE_HARPER,oPc)+ GetLevelByClass(CLASS_TYPE_DWARVENDEFENDER,oPc)+ GetLevelByClass(CLASS_TYPE_WEAPON_MASTER,oPc)+GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE,oPc)+ GetLevelByClass(CLASS_TYPE_DIVINECHAMPION,oPc); float fDc=IntToFloat(iDc)/IntToFloat(iTl); return fDc;}} float TumbleClassCheck(object oPc){ int iTl=GetHitDice(oPc); if(iTl==0) return 0.0; else{ int iTm=GetLevelByClass(CLASS_TYPE_BARD,oPc)+ GetLevelByClass(CLASS_TYPE_HARPER,oPc)+ GetLevelByClass(CLASS_TYPE_MONK,oPc)+ GetLevelByClass(CLASS_TYPE_ROGUE,oPc)+ GetLevelByClass(CLASS_TYPE_SHADOWDANCER,oPc); float fTm=IntToFloat(iTm)/IntToFloat(iTl); return fTm;}} float SpellCraftClassCheck(object oPc){ int iTl=GetHitDice(oPc);if(iTl==0) return 0.0; else{ int iSp=GetLevelByClass(CLASS_TYPE_BARD,oPc)+ GetLevelByClass(CLASS_TYPE_CLERIC,oPc)+ GetLevelByClass(CLASS_TYPE_DRUID,oPc)+ GetLevelByClass(CLASS_TYPE_SORCERER,oPc)+ GetLevelByClass(CLASS_TYPE_WIZARD,oPc)+ GetLevelByClass(CLASS_TYPE_PALEMASTER,oPc)+ GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE,oPc); float fSp=IntToFloat(iSp)/IntToFloat(iTl); return fSp;}} float PickPocketClassCheck(object oPc){ int iTl=GetHitDice(oPc);if(iTl==0) return 0.0; else{ int iPp=GetLevelByClass(CLASS_TYPE_BARD,oPc)+ GetLevelByClass(CLASS_TYPE_ROGUE,oPc)+ GetLevelByClass(CLASS_TYPE_ASSASSIN,oPc)+ GetLevelByClass(CLASS_TYPE_HARPER,oPc)+ GetLevelByClass(CLASS_TYPE_SHADOWDANCER,oPc); float fPp=IntToFloat(iPp)/IntToFloat(iTl); return fPp;}} void main() { //TK_HiPS_OnFeatChange(GetPCLevellingUp()); object oPc=GetPCLevellingUp(); SetLocalInt(oPc,"mDv",1); SetLocalInt(oPc,"mDs",1); SetLocalInt(oPc,"mPr",1); SetLocalInt(oPc,"mUd",1); SetLocalInt(oPc,"mDc",1); SetLocalInt(oPc,"mTm",1); SetLocalInt(oPc,"mSp",1); object oIm; int nHd=GetHitDice(oPc)-1; int nXp=GetXP(oPc); int nSt; for (nSt=0;nSt