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

Ceil no longer supported with roll20

1576546987

Edited 1576549969
I am attempting to get the trained skills that have 0 skill ranks in them to return 0, the macro examples shows: /w gm ?{Trained Skills| Disable Device, Disable Device [[1d20 + @{selected|Disable-Device} *ceil(@{selected|Disable-Device-Ranks}/100)] ]|} as the syntax. I cannot for the life of me get it to operate correctly. It's also not applying the math correctly, it's adding negative numbers. when goofing around I found that: /w gm ?{Trained Skills| Disable Device, Disable Device [[1d20 + @{selected|Disable-Device} ** ceil(@{selected|Disable-Device-Ranks}/100) ]]|} SEEMS to return the appropriate result, including the addition. Syntax says that is an exponent symbol... I'm confused. and adding this line: Spellcraft, Spellcraft [[1d20 + @{selected|Spellcraft} ** ceil(@{selected|Spellcraft-ranks}/100)]]| with 0 points applied, (it should return 0) it rolled a 12 and output 13... This is the full macro I'm putting together. Every other skill returns 0 sans Spellcraft. /w gm ?{Trained Skills| Disable Device, Disable Device [[1d20 + @{selected|Disable-Device} ** ceil(@{selected|Disable-Device-ranks}/100)]]| Handle Animal, Handle Animal [[1d20 + @{selected|Handle-Animal}** ceil(@{selected|Handle-Animal-ranks}/100)]]| @{selected|Profession-Name}, @{selected|Profession-Name} [[1d20 + @{selected|Profession}** ceil(@{selected|Profession-ranks}/100)]]| Sleight of Hand, Sleight of Hand [[1d20 + (@{selected|Sleight-Of-Hand}** ceil(@{selected|Sleight of Hand-ranks}/100)]]| Spellcraft, Spellcraft [[1d20 + @{selected|Spellcraft} ** ceil(@{selected|Spellcraft-ranks}/100)]]| Use Magic Device, Use Magic Device [[1d20 + @{selected|Use-Magic-Device} ** ceil(@{selected|Use-Magic-Device-ranks}/100)]]|} And, moving through my other players character tokens returns different results on all of them. I am really stumped. I am using Pathfinder Community Sheet.
1576550940

Edited 1576551648
vÍnce
Pro
Sheet Author
Hi Johnathan, Ceil(and floor) still works as expected.  So if your goal is to show a "0" for Disable Device if there are no ranks in Disable Device..., this macro Disable Device [[1d20 + @{selected|Disable-Device}*ceil(@{selected|Disable-Device-Ranks}/100)]] should be slightly changed to this; Disable Device [[ ( 1d20 + @{selected|Disable-Device} ) *ceil(@{selected|Disable-Device-Ranks}/100)]] Note how the roll and the total modifier is wrapped in quotes( order of operations )  then multiplied by the ceil formula... I would guess your other macros should be changed similarly. /w gm ?{Trained Skills| Disable Device, Disable Device [[(1d20 + @{selected|Disable-Device})*ceil(@{selected|Disable-Device-ranks}/100)]]| Handle Animal, Handle Animal [[(1d20 + @{selected|Handle-Animal})*ceil(@{selected|Handle-Animal-ranks}/100)]]| @{selected|Profession-Name}, @{selected|Profession-Name} [[(1d20 + @{selected|Profession}** ceil(@{selected|Profession-ranks}/100)]]| Sleight of Hand, Sleight of Hand [[(1d20 + (@{selected|Sleight-Of-Hand})*ceil(@{selected|Sleight-of-Hand-ranks}/100)]]| Spellcraft, Spellcraft [[(1d20 + @{selected|Spellcraft})*ceil(@{selected|Spellcraft-ranks}/100)]]| Use Magic Device, Use Magic Device [[(1d20 + @{selected|Use-Magic-Device})*ceil(@{selected|Use-Magic-Device-ranks}/100)]]| }
sweet, thanks. Ill give it a try. 
1576953564

Edited 1576953587
How would you use floor() in a max calc field? For example the max calc for lay on hands for a paladin in pathfinder would be floor((@{level}/2)+(@{CHA-mod}))  but this doesn't actually round anything. The max number shown is still a fraction in decimal form.
1576959951
vÍnce
Pro
Sheet Author
DANIEL said: How would you use floor() in a max calc field? For example the max calc for lay on hands for a paladin in pathfinder would be floor((@{level}/2)+(@{CHA-mod}))  but this doesn't actually round anything. The max number shown is still a fraction in decimal form. Try this; [[ [[ floor(@{level}/2) ]] + [[ {CHA-mod,0}kh1 ]] ]]