• 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

Legendary Items Activation

stuartwaring

Well-known member
My character has a legendary item, which has (amongst others) the foe-biting ability. Although it appears on the specials tab, are the any plans (from LW or Community) to add it to the in-play area so that it can be activated (a la Power Attack) so it modifies the damage etc automatically?

I could do it myself, but being as they are non-duplicatable, that seems like a lot of work as i have little spare time at the moment!

Thanks
Stuart
 
I don't think this ability can be done as an activate-able. The ability doubles the damage done. Meaning that the entire roll + modifiers is multiplied. The system doesn't know what the dice result was.

So a roll of 1d6+5 doesn't become a 2d6+10. It becomes a (1d6+5)*2 and this becomes even worse when you also have abilities like flaming on it where it becomes (1d6(weapon)+1d6(flaming)+5)*2.

To see the different results you would get from it you can check here: http://anydice.com/program/720e
 
Last edited:
I had interpreted it as rolling everything twice, but I see that you are right, as written. Of course statistically the average is still the same, but you do not get the Gaussian curve. I still think it would be wothwile me having a go at writing the code, I'd I get chance simply to make it easier to remember to use it, as I am constantly using the in play tab, but rarely look at specials in game.
 
So a roll of 1d6+5 doesn't become a 2d6+10. It becomes a (1d6+5)*2 and this becomes even worse when you also have abilities like flaming on it where it becomes (1d6(weapon)+1d6(flaming)+5)*2.
Actually I could totally make it display this way actually. I can't guarantee that the math works when rolled on the iPad. I think I have tried to do a multiplier on the iPad for weapons and it didn't like it.

But could totally make it display (1d6+1d6 fire+5) * 2.

@stuartwaring if you want to give this a go I would recommend looking at the deprecated "Vital Strike" Feat I did in the Basic Pack. You can still find it in the editor as it has script logic to break apart the weapon values into pieces so that I could double it for Vital and Mythic Vital strike. That would give you a good starting point to work from.
 
@ShadowChemosh - I just had the same idea, but couldn't figure out a way to edit the livename.

I am looking at your script and i can see what it is doing, but of course I don't want to change the number of dice or the bonuses - i just need to wrap the whole thing in those brackets and add in the multiplication.

Looking at the debug tasks for the rapier, i can see the livename is dealt with in the render phase, and its priority, but i do not know enough about the location of the weapon's livename (is it in BaseWep??) in order to edit it.

I want to use this kind of statement
Code:
doneif (field[abilActive].value = 0)

~checks if the weapons are legendary and equipped
if (hero.child[iMagWeapon].field[gIsLegend].value <> 0 ) then 
if (hero.child[iMagWeapon].field[gIsEquip].value <> 0) then

~Changes the damage shown
hero.child[iMagWeapon].field[livename].text = "(" & hero.child[iMagWeapon].field[wDamage].value & ") x2"
endif
endif

The issue is I am really not sure if the fields/children are correct (almost certainly not as it compiles, but nothing changes when i activate the ability!)

of course i could be going about it arse about face
 
Last edited:
I now have it sort of working - it works for my primary weapon, but if i add a different legendary weapon it no longer works.

Really stuck on this now!

Code:
doneif (field[abilActive].value = 0)

    	  var iX    as number
~     iX=0

      ~ Loop through all weapons on the hero except Touch Attacks
      ~ and any Ammunition.
         ~ Assume one handed damage
        iX = 0
        ~ If two handed weapon set to two-handed damage
        If (hero.child[iMagWeapon].tagis[wClass.TwoHanded] <> 0) Then
          iX = 1
        ~ If one handed and used in two hands then damage is two-handed
        ElseIf (hero.child[iMagWeapon].tagis[wClass.OneHanded] + hero.child[iMagWeapon].tagis[Hero.MainHand] + hero.child[iMagWeapon].tagis[Hero.OffHand] = 3) Then
          iX = 1
        ~ If used in off-hand
        ElseIf (hero.child[iMagWeapon].tagis[Hero.OffHand] - hero.child[iMagWeapon].tagis[Hero.MainHand] = 1) Then
          iX = 4
        Endif

    
~checks if the weapons are legendary and equipped
if (hero.child[iMagWeapon].field[gIsLegend].value <> 0 ) then 
if (hero.child[iMagWeapon].field[gIsEquip].value <> 0) then

~Changes the damage shown
hero.child[iMagWeapon].field[wFixDamage].text = "(" & hero.child[iMagWeapon].field[wDamageTbl].arraytext[iX] & ") x2"


endif
endif

any clues as to why it works with a rapier but not a battle axe or light mace???
 
Also noted that if it is flaming, it displays as (1d6+21 plus 1d6 fire) x2 plus 1d6 fire.

any idea why the "plus 1d6 fire) appears twice?

Edit Figured out a way to stop it

Code:
hero.child[iMagWeapon].field[wDamExtra].text = ""

Note the script is running in the Render phase, so it is only a visual thing.
 
Last edited:
I now have it sort of working - it works for my primary weapon, but if i add a different legendary weapon it no longer works.
This is because you are using "hero.child" instead of a foreach loop. So hero.child goes and gets your the "very" first iMagWeapon (custom weapon gizmo) on the character. That is it just the very first one.

Foreach loop does a Loop finding "each" weapon or Pick on the hero and does your change to each one. That would be the reason the VS feat script was doing the foreach loop so that I did the change to the Number of Weapons the character has (ie from one weapon to MANY weapons).

In your case you may wish to look for a specific tag in the foreach loop for weapons that have the foe-biting Ability. As really that is all you care about. Check the tags on the Weapon to see if any say "Foe-Biter" ability tag.
 
Also noted that if it is flaming, it displays as (1d6+21 plus 1d6 fire) x2 plus 1d6 fire.

any idea why the "plus 1d6 fire) appears twice?
The background component must be adding it to the display text.... Hmmm

You could loop through all the Extra Weapon arrays and set to blanks so that they are not added in again by the background component. I would do this in the Render timing really early.
 
This is because you are using "hero.child" instead of a foreach loop. So hero.child goes and gets your the "very" first iMagWeapon (custom weapon gizmo) on the character. That is it just the very first one.

Foreach loop does a Loop finding "each" weapon or Pick on the hero and does your change to each one. That would be the reason the VS feat script was doing the foreach loop so that I did the change to the Number of Weapons the character has (ie from one weapon to MANY weapons).

In your case you may wish to look for a specific tag in the foreach loop for weapons that have the foe-biting Ability. As really that is all you care about. Check the tags on the Weapon to see if any say "Foe-Biter" ability tag.

I was using a foreach loop, but that didnt work either, hence my attempt to change it to this. I could try and reinstate the foreach loop, but would I be searching in BaseWep for the Foe-Biting tag?

I also tried deleting the rapier, and it wouldnt apply to another weapon then either, hence my confusion!

I also fixed the 1d6 plus fire thing - see edited post
 
I was using a foreach loop, but that didnt work either, hence my attempt to change it to this. I could try and reinstate the foreach loop, but would I be searching in BaseWep for the Foe-Biting tag?
Yep. All weapons are part of the Component BaseWep. Foe-Biting sets an ability tag on the weapon as "HasAbility.laFoeBite" which can be searched for. I found this tag by adding a Foe-Biter weapon to a character and right clicking on the "?" and selecting "Show Debug Tags". Then in the search section I simply typed in "Foe-Biter" to see what I saw.

So taking the foreach loop from VS feat.
Code:
      ~ Loop through all weapons on the hero except Touch Attacks
      ~ and any Ammunition.
      foreach pick in hero from BaseWep where "!(thingid.wRay|wCategory.Ammunition|thingid.wTouch|wCategory.AmmoCart)"
      nexteach
We can see or read the comments that its going to find every weapon on the hero except touch attacks or ammunition.

We need to add logic so that we only find weapons that have the Foe-Biter ability:
Code:
      ~ Loop through all weapons that have Foe-Biter ability
      foreach pick in hero from BaseWep where "HasAbility.laFoeBite"
      nexteach

Then you can change your logic to not use hero.child[iMagWeapon] and instead use "eachpick". Eachpick represent the current weapon that the foreach loop is processing.

This should cause your logic to now run on any Foe-Biter weapon on your character.
 
I have changed it all around to use that logic - and now it does not do anything at all!

I cannot figure out why not - as far as i can see and am able to check this should work, unless it is because of the timing (it is Render phase, Priority 200,000)

Here is the current code

Code:
doneif (field[abilActive].value = 0)

    	  var iX    as number
     iX=1


  ~ Loop through all weapons that have Foe-Biter ability
      foreach pick in hero from BaseWep where "HasAbility.laFoeBite"
               
~ Assume one handed damage
        iX = 0
        ~ If two handed weapon set to two-handed damage
        If (eachpick.tagis[wClass.TwoHanded] <> 0) Then
          iX = 1
        ~ If one handed and used in two hands then damage is two-handed
        ElseIf (eachpick.tagis[wClass.OneHanded] + eachpick.tagis[Hero.MainHand] + eachpick.tagis[Hero.OffHand] = 3) Then
          iX = 1
        ~ If used in off-hand
        ElseIf (eachpick.tagis[Hero.OffHand] - eachpick.tagis[Hero.MainHand] = 1) Then
          iX = 4
        Endif

    
~checks if the weapons are legendary and equipped
if (eachpick.field[gIsLegend].value <> 0 ) then 
if (eachpick.field[gIsEquip].value <> 0) then

~Changes the damage shown
eachpick.field[wFixDamage].text = "(" & eachpick.field[wDamageTbl].arraytext[iX] & ") x2"

eachpick.field[wDamExtra].text = ""

endif
endif
nexteach
 
Sorted it out - IaFoeBite needed to be replace with the ID of my version.
oh I thought you where running this on a Mechanic or something not on the power itself. In that case you would actually want to use a parent.container with no foreach loop. It would work for all weapons then and be WAY less CPU intensive.

I try and never ever use the Replace Thing ID as it always comes back to bit me later. :( So I "assumed" this was on a Mechanic script that would be looking to Modify Foe-Bite weapons.
 
I have never tried that, or even known it was possible. how do you do it as a mechanic?
On the General tab in the Editor is a "Mechanic" tab. Basically what that means is that a "Mechanic" pick is always attached to the Hero. So you make a new one called "House-Rules" and restart HL. If you look at the Picks on the character you will see the "House-Rules" mechanic now on the hero.

This lets you setup or run "global" scripts for all characters. I have one of these setup for each and Every community Pack actually. In addition I use this as a place to define any "global" dynamic tags as a mechanic always loads and becomes live so those "Tags" then are always around and in a central place.

One step further on this logic is to not make new scripts ON the mechanic itself and instead make a "Simple" Thing to hold the script logic. Then I bootstrap the Simple Thing to the Mechanic Thing and the Simple Thing comes along and will also be "live" on all characters. What makes this so nice is you can then put a Source to the "Simple" thing and only when that "Source" is turned on does your Script execute now.

HERE
is a link to the Simple Thing used in the Campaign Pack to hide all non-Eberron Deities. Its source marked to a option called "Hide Non-Eberron Deities". If you look up further in that link you will see the Campaign Mechanic with different Simple Helper Things attached to it.

Guess that maybe more info than you wanted but hopefully it helps... :)
 
Hi Shadow,

I have tried putting it into a mechanic, but of course, i want this to be an activatable acitivity, and I am not sure how to get an activation checkbox to appear using the mechanic method.

When you talked about making that simple "Thing", where do you do that in the editor? I like the idea, but I have no experience of this sort of methodolgoy, though I am keen enough to lean!
 
When you talked about making that simple "Thing", where do you do that in the editor? I like the idea, but I have no experience of this sort of methodolgoy, though I am keen enough to lean!

"Simple" is one of the tabs in the "General" grouping in the editor.
 
Back
Top