• 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

Proficiency Bonus on an item

Imastir

New member
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
 
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.
 
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.
 
Wow, thanks for the quick response, the last code seems to work :D
Saves, abilities, spell casting,... all seem to change correctly.

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

Ty,
Imastir
 
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.
 
@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. :D

@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:
Back
Top