Hello I need a feat script that adds 2 points to an attribute when attained, will improve to 3 points at 8th level and max out to 4points at 16th level. I have this thus far:
Hello I need a feat script that adds 2 points to an attribute when attained, will improve to 3 points at 8th level and max out to 4points at 16th level. I have this thus far:
If you're sure you want to use an effect rather than a permanent ability increase then you should assign the effect a spell ID (use the feat ID) and work with that instead of a local int.
In the future you'll want to post to the Scripting forum.
but there seems to be something wrong with the formula. Despite the character leveling up, it never increases past a +2 bonus.If you're sure you want to use an effect rather than a permanent ability increase then you should assign the effect a spell ID (use the feat ID) and work with that instead of a local int.
You're not checking the character level, you're calling GetCasterLevel, that function doesn't do what you think it does.
GetCasterLevel // Get the level at which this creature cast it's last spell (or spell-like ability)
* Return value on error, or if oCreature has not yet cast a spell: 0;
If you're purely checking the total level, you probably want GetHitDice. If you're checking level of a specific class, you probably want GetLevelByClass.
You're not checking the character level, you're calling GetCasterLevel, that function doesn't do what you think it does.
GetCasterLevel // Get the level at which this creature cast it's last spell (or spell-like ability)
* Return value on error, or if oCreature has not yet cast a spell: 0;
If you're purely checking the total level, you probably want GetHitDice. If you're checking level of a specific class, you probably want GetLevelByClass.
Thanks, that is what I did not know and this will help me with so many other scripts for this custom class I am building.
but there seems to be something wrong with the formula. Despite the character leveling up, it never increases past a +2 bonus.
If you want it permanent, and you have no problem for characters becoming illegal (or how it's called for PW, I don't know), the this function works pretty good. I use it in conversations.
void main(int iAbility)
{
object oPC = GetPCSpeaker();
int iMyCurrentAbilityScore = GetAbilityScore(oPC, iAbility, TRUE);
int iNewAbilityScore = iMyCurrentAbilityScore - 1;
SetBaseAbilityScore(oPC, iAbility, iNewAbilityScore);
}