-
Notifications
You must be signed in to change notification settings - Fork 0
INQTest.js.display.js
A method for rolling, or displaying the results of a roll, in a Roll20 Template. A string of the template will not be returned. This method uses Announce.js to display the test.
- playerid - A string. The Roll20 ID of the player that is rolling the test.
- name - A string. The name of the character making the test.
- gm - A boolean. If true, the INQTest will be shown only to the GM. However, the player rolling that test will be informed what kind of test they are making.
- extraLines - An array of Objects. Those objects are expected to have a Name and Content property. Each object will be added onto the roll template as an extra line.
The roll template will have the following lines
- Title - Lists the characteristic being used/tested against. Lists the name of the character making the test, if that name was included.
- Skill - Lists the name of the skill being tested against. If a skill is not being tested against, this line is not included. If a skill group is being tested against, it will also be included in this line.
-
Successes - Contains an inline of the test. If the D100 was rolled ahead of time, it will be replaced with the pre-rolled die, stored in
this.Die, in parentheses. - Unnatural - Contains an inline of the bonus Successes from any Unnatural Characteristics. If an Unnatural Characteristic does not exist, for the Characteristic being used, this line will not be included.
- Modifiers - Lists the modifiers applied in Successes with the names of the modifiers. If there are no modifiers, this line will not be included.
- Extra Lines - Any extra lines are added at this point.
The anatomy of the Successes inline is '[[0.1 * (Test_Target - 1D100)]]'. Test_Target is the sum of the characteristic with all of the modifiers, including those from the Skill being tested against. The difference between Test_Target is divided by ten to calculate the number of successes. The result is not rounded so that it can easily be distinguished when a player gets 0 Failures vs. 0 Successes.
The anatomy of the Unnatural inline is '[[ceil(Unnatural / 2)]]'. The Unnatural Bonus is divided in half. Players can see the original bonus, before rounding, by looking in the inline.
Suppose Kyle wanted to roll a Logic test for the Character Kalius with a bonus of 30 for the test being Easy. Kalius does not have the Logic Skill and suffers a penalty of -20. It would appear as the following.
