Lone Wolf Development Forums Automatic calculations help???
 User Name Remember Me? Password
 Register FAQ Members List Search Today's Posts Mark Forums Read

 Notices 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

 Thread Tools Display Modes
Junior Member

Join Date: Feb 2018
Posts: 7

December 2nd, 2020, 04:21 AM
So, I am trying to create an automatic calculation for unique subclass i am creating. Basically, I need a calculation that goes like this:

1+attribute bonus/2 (rounded down if possible)

Any help would be greatly appreciated.

Thank you in advance.
#1
dungeonguru
Senior Member

Join Date: May 2016
Posts: 598

December 2nd, 2020, 04:35 AM
In the editor's local help files you can find an example in the eval scripts link:

Quote:
 field[abValue].value = round(field[abValue].value, number of decimals, round behavior) rounds the value of the field to some number of digits (defined by the second aspect in the parenthesis, 0 meaning to whole numbers). Round behavior of 0 means "round up if .5 or greater", 1 means "always round up", and -1 means "always round down". The first aspect can include some manipulation of its own.
In your specific case it would be something like this for Intelligence:

field[abValue].value = 1 + round(#attrmod[aINT]/2,0,-1)

you might want to make it cleaner looking by declaring a variable that grabs the attribute modifier first before putting it into the math.

var attrbonus as number
var answer as number
attrbonus = #attrmod[aINT]
answer = 1 + round(attrbonus/2,0,-1)
#2
WhyteOne
Junior Member

Join Date: Feb 2018
Posts: 7

December 2nd, 2020, 04:40 AM
Quote:
 Originally Posted by dungeonguru In the editor's local help files you can find an example in the eval scripts link: In your specific case it would be something like this for Intelligence: field[abValue].value = 1 + round(#attrmod[aINT]/2,0,-1) you might want to make it cleaner looking by declaring a variable that grabs the attribute modifier first before putting it into the math. var attrbonus as number var answer as number attrbonus = #attrmod[aINT] answer = 1 + round(attrbonus/2,0,-1)

Ok, so I am trying to link this to the Charisma modifier. So would this be correct?

field[abValue].value = 1 + round(#attrmod[aCHA]/2,0,-1)
#3
Junior Member

Join Date: Feb 2018
Posts: 7

December 2nd, 2020, 06:22 AM
So, I have watched every tutorial video i can find and no where is it covered how to add something like this to the automatic calculations list. Am I missing this somewhere?
#4
Senior Member

Join Date: Sep 2017
Posts: 412

December 2nd, 2020, 11:34 AM
You won't be able to add this to the automatic calculations. Those dump their result into the trkMax field. Are you doing this calculation to get a number of uses for a particular feature? That's what the trkMax field is for.

So instead of using the automatic calculations, do it with an eval script. I'd set the phase so time time Post-Attributes or later. Instead of dumping it into abValue (which is just a free-floating variable for use in abilities and their scripts), send it to that trkMax field.

Code:
`field[trkMax].value = 1 + round(#attrmod[aCHA]/2,0,-1)`

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!
#5

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Lone Wolf Development Web Site Announcements Realm Works Forums     Realm Works Discussion         Realm Works in Action         Realm Works Feature Requests     Realm Works in Action     Realm Works Feature Requests Hero Lab Online Forums     Hero Lab Online Discussion     HLO - Pathfinder 1st Edition     HLO - Pathfinder 2nd Edition     HLO - Starfinder     HLO - Shadowrun Hero Lab Forums     HL - Pathfinder Roleplaying Game     HL - D&D 5th Edition SRD     HL - Shadowrun     HL - Mutants & Masterminds     HL - d20 System     HL - World of Darkness     HL - Call of Cthulhu     HL - 4th Edition     HL - Savage Worlds     HL - Cortex System     HL - Authoring Kit     HL - User Projects     HL - Alternity (user-created)     Hero Lab Discussion Army Builder Forums     Army Builder Army Builder Data Files     Babylon 5: A Call to Arms     Battlefleet Gothic     Blood Bowl     Black Powder, Bolt Action, Hail Caesar, Judge Dredd, and Pike & Shotte     Confrontation - English     Kings of War (2nd Edition)     Lord of the Rings (Tabletop)     Mordheim     Necromunda     Starship Troopers     Star Wars: X-Wing and Armada Miniatures Game     The 9th Age     Warhammer Ancient Battles     Warhammer 40,000     Warhammer Fantasy 8th Ed.     Warhammer Historical: The Great War     Warhammer Fantasy 3rd Ed.     Warlord     Warmachine & Hordes     Warmaster Card Vault Forums     Card Vault Card Vault Data Files     MLB Showdown     Lord of the Rings CCG     .hack//ENEMY     Vs. System     Yu-Gi-Oh!     D&D Miniatures

All times are GMT -8. The time now is 07:26 AM.

 -- Default Style -- Majestic Contact Us - Lone Wolf Development Forums - Archive - Top