Member
Join Date: Oct 2011
Posts: 66
|
|
#41 |
Senior Member
Join Date: Nov 2012
Posts: 208
|
Oh, just checked. You are right ;-) Fixed (file is still named FeyTrainer.user, though).
BTW: What about starting off a repository or such to contain all themes people put together? MagicSN Last edited by MagicSN; November 18th, 2012 at 11:13 AM. |
#42 |
Senior Member
Join Date: Nov 2012
Posts: 208
|
Hi!
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 ;-) Anyone who has a better solution to the problem, some script or such so that actually the highest ability is used? It is actually a problem which is not only for Color Orb, I think several themes have this issue with their powers. MagicSN |
#43 |
Member
Join Date: Oct 2011
Posts: 66
|
Quote:
|
|
#44 |
Member
Join Date: Oct 2011
Posts: 66
|
Okay this is dry coded ( and untested ) but should be close.
Add an eval script phase Traits, timing should be after Calc attrBonus With this code: Code:
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] Note that I am using attrBonus which should include level/2 as well as some other possible modifiers to pick which attribute to use. This might pick wrong if somehow the attack modifier is better for one attribute and the damage is better for a different attribute. |
#45 |
Senior Member
Volunteer Data File Contributor
Join Date: Dec 2008
Posts: 523
|
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. It's now telling me that eachpick doesn't exist. I set the priority to 5000 index 1 After: Calc attrBonus 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.field[name].idstring endif nexteach ~ Use that as the damage and attack attributes perform assignstr["DamageAttr." & attidstr] perform assignstr["Attack." & attidstr] |
#46 |
Member
Join Date: Oct 2011
Posts: 66
|
Quote:
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] |
|
#47 |
Senior Member
Join Date: Nov 2012
Posts: 208
|
Quote:
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 |
|
#48 |
Member
Join Date: Oct 2011
Posts: 66
|
Quote:
|
|
#49 |
Senior Member
Volunteer Data File Contributor
Join Date: Dec 2008
Posts: 523
|
I was going to step in here and say. Did you set the Priority high enough?
The Priority number governs when in the Traits phase things happen. It needs to be high enough and set to run after a given script in order to work right. |
#50 |
|
|