Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - 4th Edition

Notices

Reply
 
Thread Tools Display Modes
Daphne Pfister
Member
 
Join Date: Oct 2011
Posts: 66

Old November 18th, 2012, 09:27 AM
Quote:
Originally Posted by MagicSN View Post
Attached: Fey Beast Trainer Theme
Isn't it Fey Beast Tamer btw?
Daphne Pfister is offline   #41 Reply With Quote
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 207

Old November 18th, 2012, 12:10 PM
Quote:
Originally Posted by Daphne Pfister View Post
Isn't it Fey Beast Tamer btw?
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
Attached Files
File Type: email FeyTrainer.user (5.3 KB, 1 views)

Last edited by MagicSN; November 18th, 2012 at 12:13 PM.
MagicSN is offline   #42 Reply With Quote
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 207

Old November 18th, 2012, 01:45 PM
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
MagicSN is offline   #43 Reply With Quote
Daphne Pfister
Member
 
Join Date: Oct 2011
Posts: 66

Old November 18th, 2012, 02:25 PM
Quote:
Originally Posted by MagicSN View Post
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 ;-)
I thought about mentioning that. You can do it with a script, check some existing scripts for similar powers to see how it's done, or I'll try to dig up something after I finished bowling tonight.
Daphne Pfister is offline   #44 Reply With Quote
Daphne Pfister
Member
 
Join Date: Oct 2011
Posts: 66

Old November 18th, 2012, 06:03 PM
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]
Make sure that damage attribute and attack attribute of the power are not set to anything. This script will set both attributes.

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.
Daphne Pfister is offline   #45 Reply With Quote
cryptoknight
Senior Member
Volunteer Data File Contributor
 
Join Date: Dec 2008
Posts: 515

Old November 18th, 2012, 08:18 PM
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]
cryptoknight is offline   #46 Reply With Quote
Daphne Pfister
Member
 
Join Date: Oct 2011
Posts: 66

Old November 18th, 2012, 08:31 PM
Quote:
Originally Posted by cryptoknight View Post
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.
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]
Attached Images
File Type: png Screen Shot 2012-11-18 at 11.30.01 PM.png (191.4 KB, 3 views)
Daphne Pfister is offline   #47 Reply With Quote
MagicSN
Senior Member
 
Join Date: Nov 2012
Posts: 207

Old November 19th, 2012, 10:19 AM
Quote:
Originally Posted by Daphne Pfister View Post
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
MagicSN is offline   #48 Reply With Quote
Daphne Pfister
Member
 
Join Date: Oct 2011
Posts: 66

Old November 19th, 2012, 11:45 AM
Quote:
Originally Posted by MagicSN View Post
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
This is what is working for me.
Attached Images
File Type: png Screen Shot 2012-11-19 at 2.41.34 PM.png (174.4 KB, 7 views)
Attached Files
File Type: email WizzApp.user (5.2 KB, 0 views)
Daphne Pfister is offline   #49 Reply With Quote
cryptoknight
Senior Member
Volunteer Data File Contributor
 
Join Date: Dec 2008
Posts: 515

Old November 19th, 2012, 12:01 PM
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.
cryptoknight is offline   #50 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:34 AM.


Powered by vBulletin® - Copyright ©2000 - 2021, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.