Daphne Pfister
Well-known member
Attached: Fey Beast Trainer Theme
Isn't it Fey Beast Tamer btw?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Attached: Fey Beast Trainer Theme
Isn't it Fey Beast Tamer btw?
BTW, one thing I just remembered... on my Wizard's Apprentice Theme there is still the issue that Color Orb is supposed to use the "stat which is highest" as basis for hitting and for the damage bonus. Currently I just used "Int" as this is the highest ability for my wizard ;-)
var bonus as number
var attridstring as string
~ Use Int as default - this might not be necessary
bonus = #attrbonus[attrInt]
attridstring = "attrInt"
~ Find highest bonus
foreach pick in hero from Attribute
if (eachpick.field[attrBonus].value > bonus) then
bonus = eachpick.field[attrBonus].value
attridstring = eachpick.field[name].idstring
endif
nexteach
~ Use that as the damage and attack attributes
perform assignstr["DamageAttr." & attridstring]
perform assignstr["Attack." & attridstring]
var bonus as number
var attidstr as string
~ Use Int as default - this might not be necessary
bonus = #attrbonus[attrInt]
attidstr = "attrInt"
~ Find highest bonus
foreach pick in hero from Attribute
if (eachpick.field[attrBonus].value > bonus) then
bonus = eachpick.field[attrBonus].value
attidstr = eachpick.field[name].idstring
endif
nexteach
~ Use that as the damage and attack attributes
perform assignstr["DamageAttr." & attidstr]
perform assignstr["Attack." & attidstr]
It's close but I ran into 1 problem.
attridstring is an invalid identifier, I think variables are capped at 8 characters for their names.... I renamed them to attidstr and that goes away.
var bonus as number
var attidstr as string
~ Use Int as default - this might not be necessary
bonus = #attrbonus[attrInt]
attidstr = "attrInt"
~ Find highest bonus
foreach pick in hero from Attribute
if (eachpick.field[attrBonus].value > bonus) then
bonus = eachpick.field[attrBonus].value
attidstr = eachpick.idstring
endif
nexteach
~ Use that as the damage and attack attributes
perform assignstr["DamageAttr." & attidstr]
perform assignstr["Attack." & attidstr]
I found the problem try I should have used eachpick.idstring instead of eachpick.field[name].idstring.
Seemed to work when I tried it.
Code:var bonus as number var attidstr as string ~ Use Int as default - this might not be necessary bonus = #attrbonus[attrInt] attidstr = "attrInt" ~ Find highest bonus foreach pick in hero from Attribute if (eachpick.field[attrBonus].value > bonus) then bonus = eachpick.field[attrBonus].value attidstr = eachpick.idstring endif nexteach ~ Use that as the damage and attack attributes perform assignstr["DamageAttr." & attidstr] perform assignstr["Attack." & attidstr]
Hmmm, something is still wrong. It is now ALWAYS using the Default Attribute, no matter how high the other attributes are.
Maybe I did the part with the timing wrong? I wrote "Calc attrBonus" into the window which was labeled "After Scripts:" and nothing else there (and I entered the version of the script which I am citing in this email, and set the Phase to "Traits". And I set "Damage attribute" and "Attack Ability" to None.
MagicSN
levelb = if(#level[] < 11) then 2
else if(#level[]<21) then 4
else 6 endif endif
Next question... trying to come up with a way to assign a bonus based on the character's level. Such as the secondary power of Blazing Corona Firecrafter power
not sure if we have access to CASE, so I went with nested If's
Code:levelb = if(#level[] < 11) then 2 else if(#level[]<21) then 4 else 6 endif endif
But I don't know how to get at Fields.pwAtkMod to set it to the levelb value.
And FWIW I'm apparently not allowed ot use #level[] at that point in time either.![]()