• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Trying to have a feat add caster levels

pippin_nl

Well-known member
What am I doing wrong?

Eval script:

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

field[abValue].value += maximum(herofield[tHitDice].value, 1)

~ add that bonus to our magic levels
hero.child[pCasterLev].field[Bonus].value += field[abValue].value
hero.child[pExtraMag].field[Bonus].value += field[abValue].value
 
Have you looked at the "Adjustment" called "Caster Level"? That has an existing script that works.

In the above case I have no idea what child pCasterLev is? Caster level is specific to a class its not a "Global" or Hero field.

Does the feat only work with a specific class that you pick when you take the feat? Or do you want this to affect all classes on the character? Or only Divine caster or only Arcane Caster?

The script is very different based on the above questions.

If new to scripting my advice is to start with watching the Four Intro Videos. Video 3 is very useful at this stage as it shows you can find "Things", fields, and tags.
 
Have you looked at the "Adjustment" called "Caster Level"? That has an existing script that works.

In the above case I have no idea what child pCasterLev is? Caster level is specific to a class its not a "Global" or Hero field.

Does the feat only work with a specific class that you pick when you take the feat? Or do you want this to affect all classes on the character? Or only Divine caster or only Arcane Caster?

The script is very different based on the above questions.

If new to scripting my advice is to start with watching the Four Intro Videos. Video 3 is very useful at this stage as it shows you can find "Things", fields, and tags.

I want the feat to add a caster level for every level the character has, regardless of which spellcaster the character has levels in. Just Divine or Arcane would also be great, I will make two separate feats in that case.

I did look at the adjustment, but if I wish to do that for many NPC's, it will become quite a bit of work.
 
Ok this script will affect all Divine and Arcane classes with a bonus to the CL equal to the characters total level. It needs to run at Post-Levels/10000
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

field[abValue].value += maximum(herofield[tHitDice].value, 1)

~ Loop through all Arcane/Divine classes
foreach pick in hero from Class where "CasterSrc.Divine|CasterSrc.Arcane"
   ~ increase caster level
   eachpick.field[cCasterLev].value += field[abValue].value
nexteach
So this means if you have level 1 cleric it has a CL of 2. If you add another level of wizard you get a CL of 3 for both Cleric/Wizard.

Hope that helps...

Note: anything with a "~" in front is a comment...
 
Ok this script will affect all Divine and Arcane classes with a bonus to the CL equal to the characters total level. It needs to run at Post-Levels/10000
Code:
~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)

field[abValue].value += maximum(herofield[tHitDice].value, 1)

~ Loop through all Arcane/Divine classes
foreach pick in hero from Class where "CasterSrc.Divine|CasterSrc.Arcane"
   ~ increase caster level
   eachpick.field[cCasterLev].value += field[abValue].value
nexteach
So this means if you have level 1 cleric it has a CL of 2. If you add another level of wizard you get a CL of 3 for both Cleric/Wizard.

Hope that helps...

Note: anything with a "~" in front is a comment...

Thanks, it works.
 
Back
Top