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

WFRP Group Observation Macro - Determining how many things they spot.

1548542172

Edited 1548765797
The WFRP observation test states that a player rolls 1D100 and their character will spot one thing for every 10 or fraction of 10 they score below their initiative. So, Felix (Initiative = 34) and Rom (Initiative =26) walk into a tavern and the GM rolls a passive observation test. To see what they notice. (e.g. There is a pool of blood under the table by the door, the halfing sitting at the bar is clearly petrified, and the tall man standing over him clearly has something hidden under his cloak)  But how much do the adventurers notice. To spot anything at all Felix would have to roll <34 and Rom <26. I can get that part working to produce a basic success or failure result. /w gm &{template:default} {{name=Group Observation Check}} {{Felix=[[(1d100<34)]]}}{{Romerich=[[(1d100<26)]]}} Where I'm stumped is how to convert a success into the number of things observed. The minimum would be 1 x observation, but if Felix rolled less than 24, he would spot 2 things and a roll of 14 or less would spot all three. Is there anyway of achieving this or do I have to do the maths myself for each success?
1548631671

Edited 1548631703
There may be a way to do this.  It's complicated, so hear me out.  When coding the chance of success, you can use crit fails and crit successes to yield more than one result on a dieroll.  If you were to set success at the highest target number, i.e. 34 in this case, the in-line diceroll would register the number one in a yellow field for a result of 25 to 34 on the d100 roll. this result would reflect only one thing spotted.   If you were to set crit success at less than 24, any roll on d100 from 15 to 24 would result in an in-line roll of 1 in green.  This result would reflect 2 things spotted.   Furthermore, if you were to set crit failure of 14 or less on the d100 roll, any d100 roll of 1 to 14 would yield an inline roll of 1 in blue. This result would reflect 3 things spotted. The syntax would look something like this: [[d100cf<14cs<24<34]] or [[d100cf<14cs<24<@{Felix|initiative}]] or [[d100cf<14cs<24<?{What is the character's initiative?}]] Here is a link to the pertinent wiki page:  Critical Success and Fumble Points
1548640188
GiGs
Pro
Sheet Author
API Scripter
There is a way to do this, it's not intuitive. Here are the steps in english: First, you subtract the 1d00 from the skill. Then you divide the result by 10 Unfortunately, you can't say "if the roll is skill or less, divide by 10".  Roll20 doesnt support conditionals. So you have to divide the (skill-roll) by 10, on all results, even failures. So you need to use another operation (keep highest), to ensure results below 0 are discarded. And there;'s one additional complication: if you do (skill-100)/10, when the roll exact;y matches skill, it will report a failure. So you have tp do (skill+1-100). Here is the formula {{Felix=[[{ceil((34+1-100)/10,0}kh1]]}} If you are using character sheets, you can use the attributes on the sheet {{Felix=[[{ceil((@{Felix|Perception}+1-100)/10,0}kh1]]}} Replace whatever the character name is, and the attribute's actual name, in the above.
1548766376

Edited 1548766644
Thanks! I'll give these ideas a try and see if i can make them work.  I must admit I've already tried fiddling around with calculations that involved deducting the die roll from the Initiative and trying to convert the result into a figure representing the number of observations.  But I couldn't get it to work.  However, I'll give it another go.    The CS idea is simpler in concept and will work, but it would mean that every character would have to have their own macro as the thresholds are hard coded and dependant upon the characters initiative.  Not a big deal as my current macro has them hardcoded anyway, and Initiative doesn't change that often. These passive perception tests are probably the most common rolls in WFRPv1, in fact its almost certainly going to be the first test I make in the game as the party emerge onto the village street and look around to see what they can see.  So, having a nice little macro that does most of the work will be really nice.
1548768269
GiGs
Pro
Sheet Author
API Scripter
The CS approach looks flawed to me, because it only gives you 4 possible outcomes: success, critical, failure, fumble. There's no way to count successes beyond 2 or 3. That said, if you do use it, the numbers don't have to be hardcoded. You could use:  [[d100cf<[[@{Felix|initiative}-20]]cs<[[@{Felix|initiative}-10]]<@{Felix|initiative}]]
1548771629

Edited 1548772179
Hi GiGs I'm not sure why but I'm getting errors trynig to make this work. I can get as far as /10 and everything is working fine, /w gm &{template:default} {{name=TEST Group Observation Check}} {{Felix=[[((34+1)-1d100)/10)]]}} but as soon as I add the rest I get errors. /w gm &{template:default} {{name=TEST Group Observation Check}} {{Felix=[[{ceil(34+1)-1d100)/10,0)Kh1}]]}} It seems to be a bracket error but I've checked off the pairings and everything looks fine. ++++ Ok! I realsied what was wrong and corrected it. /w gm &{template:default} {{name=TEST Group Observation Check}} {{Felix=[[{ceil((34+1)-100)/10,0}Kh1]]}} Unfortunately, what I seem to be getting now is a constant result of zero.  Shouldn't the minus 100 be minus a random d100 dice roll? It the input value is always 100 it will never produce a success will it? I tried changing 100 to 1d100 but that just produced the 'Cannot mix sum and M rolls' error shown above.
1548776316
GiGs
Pro
Sheet Author
API Scripter
Sorry about that, I made an error in the formula, forgetting about "cannot mix" error. I also cleaned up your brackets in your formula. It should be: /w gm &{template:default} {{name=TEST Group Observation Check}} {{Felix=[[{ceil((34+1-1d100)/10),0d0}kh1}]]}} The {one thing,another thing}kh1 expression needs curly brackets around it, and if one of the things is a die roll, both must be. If one is a number with no die roll, both must be. That's what the "cannot mix sum and M rolls in a roll group" error is referring to. So i replaced the 0 with 0d0  which fools roll20 into thinking its a die roll. The ceil function needs to have a closing bracket after the /10 to make sure you get whole number results.
1548848080

Edited 1548848271
Yes! That works perfectly. Got quite a nice range of results during the testing above, includng a CRITICAL FAIL.  So that's brilliant, thank you very much. Now, I'd like to add some 'bells and whistles'.   The most obvious being to get each test to reference the characters initiative from their character sheet, so I can avoid having to make adjustments to the macro if they become more perceptive during play.  I tried substituting {Felix|I} for the 34 in the macro but that produced an error. SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "F" found. I solved that by changing the backets to: /w gm &{template:default} {{name=TEST Group Observation Check}} {{Felix=[[{ceil(([Felix|I]+1-1d100)/10),0d0}kh1}]]}} And the macro now runs, but I'm getting odd results now. It looks as though the macro is not picking up the initiative from the characters sheet. I'm just getting the 1 from the +1 Tried substituting {Felix|I}, [Felix|I] and (Felix|I) and get an error on everything except the square brackets, but still not actually picking up the value on the character sheet.  I had a quick look at the wiki and I get the impression that this might be a step too far.  I think it would only work if I had a target character token selected and use something like @{selected|Intelligence}.  There doesn't seem to be a way of simply reference a character sheet directly from a macro.  Which is fair enough the macro still works without it. The only other thing I wanted to try was to add the word 'observations' after the result, but thats purely cosmetic. 
1548848433

Edited 1548848604
GiGs
Pro
Sheet Author
API Scripter
Is the Initiative attribute just called I? You need to use this syntax for attributes: @{character|attribute} so it would be /w gm &{template:default} {{name=TEST Group Observation Check}} {{Felix=[[{ceil((@{Felix|I}+1-1d100)/10),0d0}kh1}]] Observations}} You can use selected or target in place of the character name, when you are making a macro you want to use for any character. But for things like this, where you know which character it will be ahead of time, use the character name.
1548876852

Edited 1548877414
Thats what I figured.  I remember when Sylverie was helping me put together the WFRP Standard Tests macro it always relied upon having the appropriate character token selected to make it work.  So, there does not seem to be a way of referencing a character sheet by name to obtain an attribute.  Thats fair enough, I'll just have to hard code the attribute values into the macro and edit it if they change. I'll add the  {{Felix=[[{ceil((34+1-1d100)/10),0d0}kh1}]] Observations}}  bit though as that should work. ++++ Ok! All done. I'm really pleased with that, it's almost a shame that most of the time that macro will be run as a background check and not be seen by the players.
1548877121

Edited 1548877218
GiGs
Pro
Sheet Author
API Scripter
There is  a way to refer to character by name. Please reread my last post. The code I provided does that. Just replace the 34 with  @{Felix|I} (assuming I is a valid attribute)
1548877510

Edited 1548878341
Oh! Hang on then I'll give it a try.  I completely misunderstood what you meant.  I thought the @ sign was a selection criteria. ++++ Hmm! Nope it didn't like it. /w gm &{template:default} {{name=Group Observation Check}}{{Felix=[[{ceil((@{Felix|I}+1-1d100)/10),0d0}kh1}]] Observations}}{{Romerich=[[{ceil((@{Romerich|I}+1-1d100)/10),0d0}kh1}]] Observations}} What does the macro use to reference the character sheet? Elsewhere I've only needed to put in enough of the characters name to make it unique e.g. 'Felix' rather than 'Felix Schwarzdorn' and it managed to find the character ok.  But even entering the full name it still can't find the sheet. I just thought I'd post images of the character sheet in case its something wrong at that end.
1548877763
GiGs
Pro
Sheet Author
API Scripter
The @ symbol tells roll20 that what follows is an Attribute. You can call attributes with a character, like @{attribute} but that will only work if you run it from an Ability on the character sheet. Otherwise you need to supply one of target , selected , or the character sheet name , as in the code I showed.