• 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

Edge increasing weapon damage

Gumbytie

Well-known member
Finally figured out what I was trying to do and what to ask regarding this issue. So part of an Edge from Hellfost setting. The Augment Staff Edge.

I have broken the options out into different Edges, all work except the damage boosting one.

The staff ’s damage increases to Str+d6 and has AP 1. This Edge may be taken twice, with the damage rising to Str+d8 and AP 2 the second time it is chosen. The usual rules for minimum Strength apply, however.

So I don't get any errors but the damage portion not working. I have tried two different methods.

Method one script: (Pre-Traits 5000)
Code:
foreach pick in hero from WeapMelee
if (eachpick.tagis[User.Staff] <> 0) then
eachpick.field[wpDamage].text = "Str+d6"
eachpick.field[wpPiercing].value += 1
endif
nexteach

Method two script: (Init 3000)
Code:
perform hero.child[wpKNStaff].setfocus
focus.field[livename].text = "Staff"
if (focus.tagis[WeaponDie.?] <> 0) then
var newdie as number
newdie = focus.tagvalue[WeaponDie.?] + 1
perform focus.delete[WeaponDie.?]
perform focus.assignstr["WeaponDie." & newdie]
else
perform focus.assign[WeaponDie.2]
endif

So I am stumped at the moment. Most other feats and on Code Examples are for bonus damage, which I can do easy enough. It is boosting the actual damage.
 
Hmmm. That second method should work for melee weapons.
The first one would be for ranged weapons, they don't use WeaponDie. Although that timing may not work, that usually gets done at Effects/5000.
The second gets done at Initialize/1000 or 3000. But the code itself should work. The only hitch I could see is in the SetFocus perhaps? Are you sure it's finding it? I usually use childfound if I'm not sure it's going to be there, BTW. Set some debugs and ensure it's running all the code you think it is. Is the livename substitution working?
 
Okay, so I tweaked code from Martial Warrior (what I actually wanted to simulate I think) and added back in my debug:

Code:
perform hero.child[wpKNStaff].setfocus
if (focus.tagis[WeaponDie.?] <> 0) then
var newdie as number
newdie = focus.tagvalue[WeaponDie.?] + 1
debug "Damage:" & newdie
perform focus.delete[WeaponDie.?]
perform focus.assignstr["WeaponDie." & newdie]
endif

And the debug window shows, Damage:3, so it is pulling the correct number for new damage value I believe. But still not adjusting the damage on the staff weapon.

I used the martial warrior as it was the closest example I could find. I am not sure how to change up the code from SetFocus (from martial warrior) to using childfound. I should point out that the SetFocus is all throughout the above code from martial warrior. Replaces stuff, etc. so wasn't sure how important it is to lose that stuff.

I tried looking through the forums but this new look and colour scheme is making my eyes bleed and giving me a headache. I need to see if there are settings to adjust colour scheme (a side issue).

If you could direct me to good example of how to swap SetFocus into childfound for above code would be much appreciated.

On another "rant" on new forums, it is really hard to tell at a glance that someone has replied to a question. The old style white whitish background bolded the response which stood out from normal font. It is really hard to tell bold from natural font on new scheme. End rant :)
 
Back
Top