Skill Check Macro. Jack of all trades error 5e

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
betavash
Kobold
Posts: 4
Joined: Fri Oct 16, 2020 10:14 pm

Skill Check Macro. Jack of all trades error 5e

Post by betavash »

So I have this macro that does skill checks for my players. It takes the ability modifier and checks skill proficiency and adds it to a roll. It then shows the result:

Skill: result1(Adv/Dis: result2)

Code: Select all

[H: skillChoice = input(	
"Skill| Acrobatics, Animal Handling ,Arcana, Athletics, Deception, History, Insight, Intimidation, Investigation, Medicine, Nature, Perception, Performance, Persuasion, Religion, Sleight of Hand, Stealth, Survival |Skill|LIST|VALUE=STRING"
)]

[H: abort(skillChoice)]
[H: roll1 = 1d20]
[H: roll2 = 1d20]
[H: check = 0]

[H, if(Skill == "Acrobatics"): 			check = Dex + (proficiency*Acrobatics)]
[H, if(Skill == "Animal Handling"):		check = Wis + (proficiency*Animal Handling)]
[H, if(Skill == "Arcana"): 			check = Int + (proficiency*Arcana)]
[H, if(Skill == "Athletics"): 			check = Str + (proficiency*Athletics)]
[H, if(Skill == "Deception"): 			check = Cha + (proficiency*Deception)]
[H, if(Skill == "History"): 			check = Int + (proficiency*History)]
[H, if(Skill == "Insight"): 			check = Wis + (proficiency*Insight)]
[H, if(Skill == "Intimidation"): 		check = Cha + (proficiency*Intimidation)]
[H, if(Skill == "Investigation"): 		check = Int + (proficiency*Investigation)]
[H, if(Skill == "Medicine"): 			check = Wis + (proficiency*Medicine)]
[H, if(Skill == "Nature"): 			check = Int + (proficiency*Nature)]
[H, if(Skill == "Perception"): 			check = Wis + (proficiency*Perception)]
[H, if(Skill == "Performance"): 		check = Cha + (proficiency*Performance)]
[H, if(Skill == "Persuasion"): 			check = Cha + (proficiency*Persuasion)]
[H, if(Skill == "Religion"): 			check = Int + (proficiency*Religion)]
[H, if(Skill == "Sleight of Hand"):		check = Dex + (proficiency*Sleight of Hand)]
[H, if(Skill == "Stealth"): 			check = Dex + (proficiency*Stealth)]
[H, if(Skill == "Survival"): 			check = Wis + (proficiency*Survival)]

<br>
[R: strformat("<b>%{Skill}</b> Check: ")]
{if(roll1>=20, '<span style="font-size:1.5em; color: #31B404;">', '<span>')}
	{if(roll1==1, '<span style="font-size:1.5em; color: #DF0101;">', '<span>')}
	
[t:roll1+check] </span></span></b></span>

(Adv/Dis: {if(roll2>=20, '<span style="font-size:1.5em; color: #31B404;">', '<span>')}
	{if(roll2==1, '<span style="font-size:1.5em; color: #DF0101;">', '<span>')}
	[t:roll2+check]</span></span></b></span>)

I calculate the modifier from the stat and I have a list of the skills on the token properties. Each skill has either a 1=proficiency, 2=expertise, or 0= not proficient. I then enter the character's proficiency and it does the rest.

It works great and my players enjoy using it, but my bard has been having trouble with his because of the Jack of all trades ability, which adds half your proficiency, rounded down, to any skill you're not proficient in. I originally got around this by altering it like this:

Code: Select all

[H: skillChoice = input(	
"Skill| Acrobatics, Animal Handling ,Arcana, Athletics, Deception, History, Insight, Intimidation, Investigation, Medicine, Nature, Perception, Performance, Persuasion, Religion, Sleight of Hand, Stealth, Survival |Skill|LIST|VALUE=STRING"
)]

[H: abort(skillChoice)]
[H: roll1 = 1d20]
[H: roll2 = 1d20]
[H: check = 0]

[H, if(Skill == "Acrobatics"): 			check = Dex + floor(proficiency*Acrobatics)]
[H, if(Skill == "Animal Handling"):		check = Wis + floor(proficiency*Animal handling)]
[H, if(Skill == "Arcana"): 			check = Int + floor(proficiency*Arcana)]
[H, if(Skill == "Athletics"): 			check = Str + floor(proficiency*Athletics)]
[H, if(Skill == "Deception"): 			check = Cha + floor(proficiency*Deception)]
[H, if(Skill == "History"): 			check = Int + floor(proficiency*History)]
[H, if(Skill == "Insight"): 			check = Wis + floor(proficiency*Insight)]
[H, if(Skill == "Intimidation"): 		check = Cha + floor(proficiency*Intimidation)]
[H, if(Skill == "Investigation"): 		check = Int + floor(proficiency*Investigation)]
[H, if(Skill == "Medicine"): 			check = Wis + floor(proficiency*Medicine)]
[H, if(Skill == "Nature"): 			check = Int + floor(proficiency*Nature)]
[H, if(Skill == "Perception"): 			check = Wis + floor(proficiency*Perception)]
[H, if(Skill == "Performance"): 		check = Cha + floor(proficiency*Performance)]
[H, if(Skill == "Persuasion"): 			check = Cha + floor(proficiency*Persuasion)]
[H, if(Skill == "Religion"): 			check = Int + floor(proficiency*Religion)]
[H, if(Skill == "Sleight of Hand"):		check = Dex + floor(proficiency*Sleight of hand)]
[H, if(Skill == "Stealth"): 			check = Dex + floor(proficiency*Stealth)]
[H, if(Skill == "Survival"): 			check = Wis + floor(proficiency*Survival)]

<br>
[R: strformat("<b>%{Skill}</b> Check: ")]
{if(roll1>=20, '<span style="font-size:1.5em; color: #31B404;">', '<span>')}
	{if(roll1==1, '<span style="font-size:1.5em; color: #DF0101;">', '<span>')}
	
[t:roll1+check] </span></span></b></span>

(Adv/Dis: {if(roll2>=20, '<span style="font-size:1.5em; color: #31B404;">', '<span>')}
	{if(roll2==1, '<span style="font-size:1.5em; color: #DF0101;">', '<span>')}
	[t:roll2+check]</span></span></b></span>)
But now its asking me for a value when I select Animal Handling or Sleight of Hand and giving me an error message if I put in a value or not adding the proficiency if I don't. The other skills work fine and add the half proficiency. Since it asks for the value of the first word in the skill i.e. "Value for Animal" I figured it has to be because there is more than one word for the skills.

Is there something I'm missing, because I tested every skill on every character before running games.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Skill Check Macro. Jack of all trades error 5e

Post by aliasmask »

Code: Select all

[H, if(Skill == "Sleight of Hand"):		check = Dex + (proficiency*Sleight of Hand)]
"Sleight of Hand" is not a valid variable name to multiply proficiency by. You need to change it or use getProperty("Sleight of Hand"). Same with Animal Handling.

Post Reply

Return to “Macros”