Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old May 10th, 2012, 04:32 PM
...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.
Nightfox is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 10th, 2012, 05:02 PM
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).
Mathias is online now   #2 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old May 10th, 2012, 05:28 PM
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?
Nightfox is offline   #3 Reply With Quote
Reply


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:52 PM.


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