This may be a moot point, but
BONUS:CASTERLEVEL|Wizard|SomeVar-var("BL=Wizard") completely nukes SomeVar to where the value is 0.
Aggravating to say the least... I can work around the issue, but it makes for another var for each class I'm supporting.
Scratch that... it is inconsistent. Apparently ANY underscore in the variable name trying to grab a BL=x can cause an issue.
Could you provide a concrete example that reliably demonstrates the problem please?
Reproduction is sketchy currently.
This code is working:
However, this code had issues:
This was built with a Level 2 Wizard, Level 2 Cleric, Level 1 Mystic Theurge and inventory item equipped "Ioun Stone Orange"
That gave me a value of 4 total, a BL stripped total of 3.
Caster_Level_BL_Stripped_Wizard =3 (Will display 0)
What would happen is Caster_Level_BL_Wizard would be 0 or Caster_Level_Wizard would be 0. Very inconsistent.
I grabbed this from the higher log setting:
James, there is definitely something that seems to be order dependent breaking. I tried the "working" version, and it was broken. The only factor I can find is the BL=XXX factor. It is a daisy chained variable to account for issues.
Caster_Level_Classname is derived from ClassLVL+Caster_Level_Bonus+CasterLevelBLClassname
Caster_Level_BL_Stripped_Classname is Caster_Level_Classname-CasterLevelBLClassname
CasterLevelBLClassname is from the var("BL=Classname")
Oddly, BL=Classname always displays the correct result. One of the subsequent vars does not attach the correct value though.
I have to both ADD and REMOVE the BL=Classname to get correct results. I add it to the Caster_Level_Classname to get a correct Value for the total caster level Arcane and highest caster level. I remove it from Cast_Level_BL_Stripped to avoid an incorrect value added by the BL via ADD:SPELLCASTER choice.
Sorry, there is no quick fix for this in the code that I can see. A suggestion is to replace VAR("BL=WIZARD") with charbonusto("PCLEVEL", "WIZARD") which may break the dependency cycle that the code is reporting.
Also, you may find it more readable to rename Caster_Level_BL_Wizard to something like WixzardBonusLevel or BonusLevelWizard to make it distinct from the host of casterlevel variables. Also, my personal preference for readability is to use camel case variables rather than having embedded underscores.