Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

PF 1E Lay on Hands Macro issue

I'm trying to complete a lay-on-hands macro that will roll based on the character level. Nothing i try will return any results.  the macros i have tried using are: /r [[ floor( @{level} / 2 ) ]]d6  /r @{level}/2)]]d6]]  both of these return an error of : TypeError: Cannot read properties of undefined (reading 'substring')
1676007814
Kraynic
Pro
Sheet Author
Where are you putting this macro?  If you are putting this in the effect line of an entry in the spell-like abilities section, you can't use /r in those fields.  They can only take inline roll syntax.  You might also want to use the exact level for a specific class, since @{level} is the overall character level.  Of course, it doesn't matter if you don't ever pick up another class.  This should work for the lay on hands, assuming that paladin is on the first line: [[[[floor(@{class1_level}/2)]]d6]] I am also assuming this is the Pathfinder by Roll20 sheet.  If you are using the community, simple, or legacy sheets, then this probably doesn't work.
I'm attempting to use it from the macro link in the collections tab. and yes its for pathfinder and i am using the pathfidner by roll 20 sheet. is there a different sheet that would allow this to work?
1676011828

Edited 1676011966
Gauss
Forum Champion
Dreadmyst said: I'm attempting to use it from the macro link in the collections tab. and yes its for pathfinder and i am using the pathfidner by roll 20 sheet. is there a different sheet that would allow this to work? You need to put it in the Attributes and Abilities tab in an Ability OR include character identification for the attribute you are using.  You are calling for an attribute  ( @{level} )  without telling the system who's attribute you are calling for.  Ability: @{level} it will automatically input the character name where it belongs.  Collection tab: @{charactername|level} Either one (requires token linked to the sheet) : @{selected|level}
1676016177

Edited 1676016209
I made a new game to play around with this and have now set a token to the sheet and if  looked in attributes and abilities and its listed there i think.  shows a 2 since the character is level 2.  with the following i get the return of 2 but its not rolling a die its just giving me a value of 2 /r @{selected|level}(/2-.5)] d6 Now when i combine what Kraynic and Gauss mention i am able to get it to work for level 2 since 2/2 is 1d6 with the following formula: /r [[[[floor(@{selected|level}/2) ]]d6]] Advanced it to level 3 and it rolled 1d6 as expected then at lvl 4 it rolled 2d6 as expected so between the two posts i found something that works.  Thank you guys.  Now i just need the GM in the game to ensure that the token is assigned to the character sheet lol 
1676042985
Kraynic
Pro
Sheet Author
You can set it up however you wish, but I would recommend enabling the spells tab (if it isn't already), and creating an entry under the Spell-like abilities section to store your lay on hands (and channel energy as well). That way the abilities will all go with the character when moved by way of character vault or transmogrifier without needing to be recreated if the character is moved to a new game. Note that channel energy will use ceil (round up) instead of floor in that calculation.