• 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

Weapon Damage: the timing issue

Nightfox

Well-known member
...when the character hold a weapon of this type, blah blah blah <insert flavor text> altering the weapon <insert more lemony goodness> more deadly.

The gist is that, as certain levels, the damage die of a weapon would change.
for the most part this becomes a lather, rinse, repeat, but I can't seem to get the lather/rinse portion to work. Here's what I started with:

Post Level/1000
~at 5th level, our damage die with battle axes increases to 1d10
if (#levelcount[class] >= 5) then
perform hero.child[wBattleaxe].assign[wMain.1d10_304]
endif

2 problems.
1) This works fine for a regular battle axe, but enchanted battle axes still show as 1d8 damage. My first thought was that this was a timing issue, but...
2) this only seems to work at Post-levels. I've tried it at every phase thinking I needed to have it act after the enchanted axe was added, but when I change the phase it stops affecting the regular axe. Even changing to Post-Level(User) causes the regular battle axe to return to 1d8.

If I could get this to work, it would be a series of elseif statements, but I need to get the first statement to work or I'll just be copy pasting the problems.

My plan C is to to add new weapons with the appropriate damage dice. I'd prefer not to add redundant items (like d10 battle axe, d12 battle axe, etc) if I can avoid it. Please, oh mighty forum gurus, save the poor bits from redundancy.
 
Code:
~at 5th level, our damage die with battle axes increases to 1d10
if (#levelcount[class] >= 5) then
  ~find all our battleaxes and replace whatever damage they have with
  ~1d10
  foreach pick in hero from BaseWep where "IsWeapon.wBattleaxe"
    perform eachpick.tagreplace[wMain.?,wMain.1d10_304]
    nexteach
  endif

The problem wasn't related to timing - the problem was that when you create a custom weapon, it isn't that weapon - it's just pretending to be that weapon, so hero.child[] won't find it - hero.child[] finds only that specific thing (and only finds one of them, which would be a problem if you dual-wield your battleaxes).
 
As usual, the forum Heroes save the day.
Any idea why my script only worked on the post level phase with less then 10000 priority?
 
Back
Top