Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old June 12th, 2017, 05:59 AM
I had to fiddle a bit - seems like if the script is run in the early timing phases gets overwritten by the base race. When I was initially testing I was running the script without a base race selected yet so it would work until I selected a race....

So when I put the following in at Render 10000

if (field[abilActive].value <> 0) then
herofield[tReach].value += 5
endif

It seems to "work", the basic pane gets the 10' reach, but when you debug the individual weapons, they are stuck at 5' reach.
So as a hack I stuck the original weapon code after it and now both update. So final script running at Render 10000 (and it stays working after a client restart) is:
Code:
if (field[abilActive].value <> 0) then
  ~ adjust personal reach
  herofield[tReach].value += 5
  ~ adjust all the weapons
  foreach pick in hero from BaseWep where "wCategory.Melee"
    eachpick.field[wReach].value += 5
  nexteach
endif
It's always a PITA to figure out timing since there are so many moving parts. I'm pretty sure you could put the tReach code in somewhere earlier and you wouldn't have to use the weapon wReach code...
dungeonguru is offline   #11 Reply With Quote
furby076
Member
 
Join Date: Oct 2010
Posts: 74

Old June 12th, 2017, 04:21 PM
Thank you so much. I've added this to the ability Giant Growth and uploaded the latest version of Mystic v3. Only a few more items to go and the class is fully complete

Thanks Dungeon and thank you Shadow (again)
furby076 is offline   #12 Reply With Quote
Mjolnirh
Member
 
Join Date: Oct 2016
Posts: 39

Old June 21st, 2017, 02:02 PM
just tested with with a werebear template I've been working on. it increased the size and the reach

Code:
      ~if we've been replaced, get out now
      doneif (tagis[Helper.Disable] <> 0) 

     if (field[abilActive].value <> 0) then
         hero.findchild[BaseRace].field[rSizeMod].value + 1
      endif
Mjolnirh is offline   #13 Reply With Quote
Mjolnirh
Member
 
Join Date: Oct 2016
Posts: 39

Old June 21st, 2017, 02:56 PM
Missed a piece

Code:
      ~if we've been replaced, get out now
      doneif (tagis[Helper.Disable] <> 0) 

     if (field[abilActive].value <> 0) then
         hero.findchild[BaseRace].field[rSizeMod].value = hero.findchild[BaseRace].field[rSizeMod].value + 1
      endif
Mjolnirh is offline   #14 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 21st, 2017, 03:14 PM
Just FYI that increases size and reach. The OP wanted to just increase reach.

Also use += makes the script way shorter:
Code:
~if we've been replaced, get out now
doneif (tagis[Helper.Disable] <> 0) 
~ If not active get out now!
doneif (field[abilActive].value = 0)

~ Increase size by one step
hero.findchild[BaseRace].field[rSizeMod].value += 1
I like doneif for stop scripts instead of if/end statements. Just seems easier to read.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #15 Reply With Quote
Mjolnirh
Member
 
Join Date: Oct 2016
Posts: 39

Old June 21st, 2017, 06:37 PM
Awesome thanks for the tips! That should help alot
Mjolnirh is offline   #16 Reply With Quote
Reply

Thread Tools
Display Modes

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:56 AM.


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