• 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

My tweaks to support Themes

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
 
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.
 
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.
 
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]
 
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]
 

Attachments

  • Screen Shot 2012-11-18 at 11.30.01 PM.png
    Screen Shot 2012-11-18 at 11.30.01 PM.png
    191.4 KB · Views: 3
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
 
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.
 

Attachments

  • Screen Shot 2012-11-19 at 2.41.34 PM.png
    Screen Shot 2012-11-19 at 2.41.34 PM.png
    174.4 KB · Views: 7
  • WizzApp.user
    WizzApp.user
    5.2 KB · Views: 0
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.
 
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. :(
 
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. :(

I wonder how hard it would be to split Attack Bonus into Attack Bonus Heroic, Attack Bonus Paragon, Attack Bonus Epic. And likewise for Weapon Damage and Base Damage Dice. Then have a calculation that uses the right values based on the tier, defaulting to the Heroic values if nothing is specified for Paragon and Epic The heroic values would go in identical tags fields as the current system does. Doesn't seem like it would be that hard, and seems like a better solution as there are a lot of powers that vary by level. Biggest done side would be forking even more of the 4e game system code unless I could get them to integrate it.
 
Do we have a place where all user-edited Themes are put BTW? Assuming more people did some, this might be nice.
 
Hello!

Two new questions (for the Theme I am currently implementing, Sohei):

1. How do I do this:

"You gain a +1 power bonus to saving throws against fear effects and effects that render you dazed, dominated or stunned." Well, thinking of it, there is no place on the char sheet where this would listed, so just making it a text as it is now is probably okay? ^^

2. A general question (with Sohei and other themes): Is there any way to make the number of dice dependent on the level (as the "built in" powers like Scorching burst do not support this and just write it into the text, I guess not).

Attached is my current version of "Sohei" (Thanks again for all the help with scripts !!!)

MagicSN
 

Attachments

Last edited:
And the next Themes implemented: Noble and Disgraced Noble (in one file).

BTW: Feel free to add the files from my added Themes to the starting post, so they are easier to find!
 

Attachments

Last edited:
Four more Themes.

Infernal Prince, Chevalier, Knight Hospitaler and Guttersnipe inside this one (decided to put more themes into a file to make the amount of files not so big ^^). Also some small Bugfixes on Guardian and Disgraced Noble (skill bonus was not calculated before) - The Noble.user as before contains both Noble and Disgraced Noble.

Anyone has an idea what I did wrong in the +1 to fire attack powers Feature's Script for the Infernal Prince? It seems to be not working. If anybody has an idea how I could fix it this would be great!
 

Attachments

Last edited:
How do I implement this: Use Intelligence or Charisma (the highest) for this power.

I tried basing it on this which was posted earlier

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["Attack." & attidstr]

My idea was to put into the foreach something like

if ((eachpick.idstring == "Charisma") || (eachpick.idstring == "Intelligence"))

but how is the correct syntax ???

Thanks in advance.

MagicSN
 
I can answer my own question:

It seems though that code like this should be included into a LOT of
powers, they always took the easy way and used just one of the options and wrote the rest down as text. Note, that a third variable (attidstr3) is needed, originally I had "attidstr = "attrCha"" etc. in this example overwriting the old value and then it always used the default, when I was using a third variable it works correctly (for both cases, Int>Cha and Cha>Int)

var bonus as number
var bonus2 as number
var attidstr as string
var attidstr2 as string
var attidstr3 as string

bonus = #attrbonus[attrInt]
attidstr = "attrInt"
bonus2 = #attrbonus[attrCha]
attidstr2 = "attrCha"

if (#attrbonus[attrCha]>#attrbonus[attrInt]) then
bonus = #attrbonus[attrCha]
attidstr3 = "attrCha"
else
bonus = #attrbonus[attrInt]
attidstr3 = "attrInt"
endif



~ Use that as the damage and attack attributes
perform assignstr["DamageAttr." & attidstr3]
perform assignstr["Attack." & attidstr3]
 
Back
Top