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
Imastir
Junior Member
 
Join Date: Jun 2018
Posts: 4

Old September 24th, 2019, 11:14 PM
Hi all,
I'm trying to create a ring that gives a general proficiency bonus to a char.
But i have tried to find out the coding behind it but i'm not too great in programming, could someone provide me the code to insert so the bonus is Added to all the stats where proficiency comes into play ?

Thanks in advance,
Imastir
Imastir is offline   #1 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old September 25th, 2019, 07:05 AM
This is a head scratcher.

It should be as easy as:

Code:
hero.child[ProfBonus].field[Bonus].value += 1
but that's not working for me... It might be that the proficiency bonus can't be globally modified or I haven't figured out timing yet.

You can try a workaround like:

Timing - post-attributes/10000
Code:
      doneif (field[gIsEquip].value = 0)
      doneif (field[gIsAttuned].value = 0)

      foreach pick in hero where "Helper.Proficient"
        eachpick.field[Bonus].value += 1
        nexteach
The code snippet won't change the proficiency bonus globally shown, but every thing you have a proficiency for will reflect it, and it probably won't work for tools.
dungeonguru is offline   #2 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old September 25th, 2019, 08:26 AM
Followup, I figured out you can manipulate the end total directly, just not the way that makes the most sense:

Post-levels/10000 timing:
Code:
      doneif (field[gIsEquip].value = 0)
      doneif (field[gIsAttuned].value = 0)
      ~ add 1 to total proficiency bonus. 
      hero.child[ProfBonus].field[tProfBonus].value += 1
The first two lines check to see if the item is equipped and attuned, then it adds 1 to the total bonuses added to proficiency.
dungeonguru is offline   #3 Reply With Quote
Imastir
Junior Member
 
Join Date: Jun 2018
Posts: 4

Old September 26th, 2019, 04:05 AM
Wow, thanks for the quick response, the last code seems to work
Saves, abilities, spell casting,... all seem to change correctly.

Thanks for that, wouldn't have figured it out by myself

Ty,
Imastir
Imastir is offline   #4 Reply With Quote
Lj Stephens
Senior Member
Lone Wolf Staff
 
Join Date: Jun 2019
Posts: 166

Old September 26th, 2019, 05:21 AM
Awesome! Thanks Dungeonguru!
Lj Stephens is offline   #5 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old September 26th, 2019, 05:33 AM
Guru, I'm curious how your code will interact with stuff like Jack of All Trades and Remarkable Athlete. Granted, I'm not sure OP has thought about that either. Just something to mull over.

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!
Fenris447 is offline   #6 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old September 26th, 2019, 05:48 AM
One way to find out is to play with the Proficincy adjustment added by ShadowChemosh.

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #7 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old September 26th, 2019, 06:15 AM
@Fenris477: Jack of all Trades & Remarkable Athlete add the tag Helper.ProfHalf to the skills at post-level 10000. The timing of my example is set at the same time, so I suspect it would be better to run the proficiency adjustment earlier than Post-Level 10000.

@Mergon: I forget about the adjustments, but I see ShadowChemosh put his in during the First timing phase. ALSO, as a disclaimer, I don't use the community files so I forget to look at them unless I hit something I can't figure out after fooling with it for a while.

End of day, should probably run it when ShadowChemosh puts it in timing although in my mind there are some reasons to run it post-levels (maybe at 5000).

Last edited by dungeonguru; September 26th, 2019 at 06:19 AM. Reason: Edited timing statement for clarification
dungeonguru is offline   #8 Reply With Quote
Mergon
Senior Member
 
Join Date: Sep 2012
Location: Ottawa, Canada
Posts: 788

Old September 26th, 2019, 06:18 AM
<smile>

Watch your back, Conserve your ammo,
and NEVER cut a deal with a dragon!
Mergon is offline   #9 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 04:09 AM.


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