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
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 272

Old February 27th, 2020, 11:56 AM
I'm making solid progress on the class feature variants.

The absolute biggest issue is the Ranger. The other classes replace one-off class abilities or simply add things, like extra ways to use Bardic Inspiration or swapping the Barbarian's Danger Sense for Survival Instinct.

The Ranger, on the other hand, replaces some of what Hero Lab calls Primary and Quaternary abilities. There is no single Thing called "Natural Explorer" in the files. Instead, there is a Thing for each possible terrain, all of which are labeled as part of the Natural Explorer quaternary ability. The Ranger class itself has a variable that states how many quaternary abilities it can pick from that pool.

So while we can just "turn off" something like Danger Sense, we cannot simply "turn off" Natural Explorer; there's nothing to turn off.

Instead, my idea is to have the new variant ability go and set that quaternary ability variable to 0. By default, the Ranger Class says "I can pick 1 favored terrain right now." The objective is to make it so that if you select the variant Deft Explorer ability, a script on Deft Explorer will go and tell the Ranger Class "no, you can't pick any favored terrain."

In the code for the Ranger, the quaternary abilities are controlled like this:
Code:
    <arrayval field="cCustQuTot" index="0" value="1"/>
    <arrayval field="cCustQuTot" index="5" value="2"/>
    <arrayval field="cCustQuTot" index="9" value="3"/>
The value is how many quaternary abilities can be selected and the index is at what level (0=1st level, 19=20th level). So at level 1, you get 1. Level 6, another, and a third at level 10.

How do we have the Deft Explorer variant ability set this value to zero? I basically just need to understand the script required for this. I've got everything else about it covered...I think.

"Ooooooooh, he's tryin'!"
Fenris447 is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,725

Old February 27th, 2020, 12:04 PM
Code:
~ Manual way
field[cCustQuTot].arrayvalue[0] = 0
field[cCustQuTot].arrayvalue[5] = 0

~ Automated loop way
var iX as number

for iX = 0 to field[tcCustQuTot].arrayrows - 1
  field[cCustQuTot].arrayvalue[iX] = 0
  next

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   #2 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 272

Old February 27th, 2020, 12:17 PM
I could kiss you, sir. So I'm looking at the full manual version being this?

Code:
hero.child[cHelpRgr].field[cCustQuTot].arrayvalue[0] = 0 
hero.child[cHelpRgr].field[cCustQuTot].arrayvalue[5] = 0
hero.child[cHelpRgr].field[cCustQuTot].arrayvalue[9] = 0
I'm just getting my feet wet with container transitions in my scripts, so thanks for the assist!

"Ooooooooh, he's tryin'!"
Fenris447 is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,725

Old February 27th, 2020, 12:40 PM
Quote:
Originally Posted by Fenris447 View Post
I could kiss you, sir. So I'm looking at the full manual version being this?
Correct...

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   #4 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 272

Old March 4th, 2020, 09:01 AM
For posterity's sake, I can confirm this code worked beautifully. I had to play with the timings a bit for the script. I found it worked on the Post-Levels Phase with a timing between 500 and 5000. It might work outside that, but I'm going with what works. Neither Final nor First worked.

"Ooooooooh, he's tryin'!"
Fenris447 is offline   #5 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 03:00 AM.


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