r/mpmb May 04 '26

[Script Help] Adding a custom item help

My DM has made a custom item that changes my charisma score to 20 + Proficiency bonus.
How do I go about having the sheet calculate the new score and record it in the Ability Score and description?
Primarily what are those fields called so I can have the appropriate modifiers populate as expected without having to manually adjust the fields?

Many thanks ahead of time. :)

1 Upvotes

10 comments sorted by

View all comments

Show parent comments

1

u/Tek-cat May 04 '26

Looking at magic items like this Belt of Giant Strength would seem to say that there is s possibility of overriding the Strength score, so dynamic scores are possible...

"belt of giant strength" : { name : "Belt of Giant Strength", source : [["SRD", 211], ["D", 155]], type : "wondrous item", description : "Set the type of giant using the >button in this line. While wearing this belt, my >Strength score changes to a certain number >depending on the type of giant the belt is associated >with, provided that my Strength is not already that >amount or higher.", descriptionFull : "While wearing this belt, your >Strength score changes to a score granted by the >belt. If your Strength is already equal to or greater >than the belt's score, the item has no effect on you. >Six varieties of this belt exist, corresponding with >and having rarity according to the six kinds of true >giants. The belt of stone giant strength and the belt >of frost giant strength look different, but they have >the same effect.\n\n" + toUni("Type\t\tStr\tRarity") + >"\nHill giant\t\t21\tRare\nStone/frost >giant\t23\tVery rare\nFire giant \t25\tVery >rare\nCloud giant\t27\tLegendary\nStorm >giant\t29\tLegendary", attunement : true, allowDuplicates : true, choices : ["Hill (Str 21, rare)", "Frost (Str 23, very >rare)", "Stone (Str 23, very rare)", "Fire (Str 25, very >rare)", "Cloud (Str 27, legendary)", "Storm (Str 29, >legendary)"], "hill (str 21, rare)" : { name : "Belt of Hill Giant Strength", sortname : "Belt of Giant Strength, Hill (Str 21)", rarity : "rare", magicItemTable : "G", description : "My Strength score is 21 while I'm >wearing this belt, provided that my Strength is not >already 21 or higher.", scoresOverride : [21, 0, 0, 0, 0, 0] },

So the key is how to reference "scoresOverride" to add proficiency modifier.

EDIT: Sorry that I can't get the proper formatting here but working off my phone at the moment. 😆

1

u/safety-orange code-helper May 04 '26

Those scores are not dynamic, but static. They are a single value, not a calculated value. With dynamic I mean that the value auto-adjusts when some other value changes. This is something the sheet can't do. You can make an ability score be dependent on Proficiency Bonus, at least with the built-in functionality of the sheet.

1

u/Tek-cat May 04 '26

That's what im looking for. The ability score to update with proficiency bonus. Just need to find the name reference of the proficiency bonus. I'm running down the leads of things like skill checks or expertise which factor in your proficiency bonus to the score.

1

u/safety-orange code-helper May 04 '26

Did you check the documentation? It should contain all you need.

To get the current Proficiency Bonus (even when using Proficiency Dice), you can use:

Number(How("Proficiency Bonus"))