Skip to main content
EpicCleric
Participating Frequently
June 10, 2021
Question

If x then y for a Custom Character Sheet for Table Top RPG Game

  • June 10, 2021
  • 1 reply
  • 5219 views

Hello all,

I am in the process of creating a Custom Character sheet as a PDF form using Acrobat Pro X but I need a Javascript that will help me fill in some cells properly.

 

I want a modifier (Ability Mod) that shows to be generated from the Ability Score. When I say that, what I mean is the characters get a bonus (or negative in some cases) to things they do depending on their Ability Score. Like, if a Character has a score of 15 for their Strength, they get a bonus of 2 for things they will do that use Strength. So, I am trying to figure out how to make it so that when the Ability Score is determined, it will AUTOMATICALLY put in the Ability Modifier into it's respective spot depending on what the Ability Score is. 

 

I have attached an image in hope that it helps explain what I need better.

This topic has been closed for replies.

1 reply

EpicCleric
Participating Frequently
June 10, 2021

Here is the closest I have gotten with Code but as you can see it's showing -5 instead of what it should show. So I just don't know what I am doing wrong.

See attached image.

Bernd Alheit
Community Expert
Community Expert
June 10, 2021

To compare values for equal values use ==, not only =.

EpicCleric
Participating Frequently
June 10, 2021

Thank you thank you thank you thank you.
😄