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
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 343

Old July 10th, 2022, 02:00 PM
Has anyone set up a way to easily track the School of Abjuration Arcane ward?
Provos is offline   #1 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,621

Old July 17th, 2022, 12:54 AM
Set it up as a tracker ability, use an eval script to do the calculations for the trkMax field.
Bootstrap the tracker to the ability if needed.

You can store the wizard level in an abValue field, then use a script to double it.
Store the int mod as abValue2, then in a script have abValue3 add the two values together and set it equal to trkMax on your tracker.

You might need to play around a little with the script coding for timing but it should be pretty straightforward to code it.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #2 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,621

Old July 17th, 2022, 04:47 PM
You will have to figure out the timing on this to get it calculating correctly, I would start in Final 10000 to see if that picks off all the numbers correctly. Once its working you can just bootstrap the tracker to the ability.

These lines of code should be sufficient for a tracker to autocalculate what you need.

Code:
~our hit points are twice our wizard level plus int mod
field[trkMax].value += hero.childfound[cHelpWiz].field[cTotalLev].value * 2
field[trkMax].value += hero.child[aINT].field[aBonus].value
Or just build it as a class special.
Check the Show in Tracked Resources? checkbox to add the tracker, and do it with the abValue fields.

The advantage of doing it this way is that the abValue fields can be accessed from other scripts. So say you have an ability that further modifies this one which the wizard picks up later on, you can modify the abValue fields to deal with the add ons.
Eval Script 1
Code:
~our hit points are twice our wizard level plus int mod
~get our wizard level
field[abValue].value += hero.childfound[cHelpWiz].field[cTotalLev].value 
~double our wizard level for hit points (field[abValue2].value stores the multiplier)
field[abValue].value *= field[abValue2].value
~get our intelligence modifier
field[abValue3].value += hero.child[aINT].field[aBonus].value

~sum our doubled wizard level with our int mod to get the total hit points calculated.
field[trkMax].value += field[abValue].value + field[abValue3].value
In the above code, the *= line will act as a multiplier. field[abValue2].value should be set equal to 2 initially. If another ability comes out that increases the multiplier later on, you can then script it to change that field.

Another advantage of doing it this way is that you can do each part in different scripts if needed too.

I'd do each line of code there as its own script, in progressively later timings so the script can be modified later on if needed. It would be 4 scripts long but that will allow you to access and change it if a new book ability does so later without having to recode the scripts.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.

Last edited by RavenX; July 17th, 2022 at 05:23 PM.
RavenX is offline   #3 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 11:44 AM.


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