ConversationDiceRoll ​
Inherits: Resource
Dice roll / skill check node for conversation branching Supports multiple dice types and stat modifier calculations
Properties ​
int | id | 0 |
RollType | roll_type | RollType.D20 |
int | dc | 10 |
ModifierType | modifier_type | ModifierType.ADDITIVE |
int | modifier_stat | 0 |
bool | accepts_critical_success_fail | false |
int | pass_chat_id | 0 |
int | fail_chat_id | 0 |
Methods ​
String | get_dice_notation() |
Vector2i | get_dice_range() |
int | roll_dice() |
Dictionary | evaluate_roll( stat_value: float ) |
String | get_modifier_type_name() |
Enumerations ​
enum RollType ​
========== ENUMS ==========
- D4 =
0 - D6 =
1 - D8 =
2 - D10 =
3 - D12 =
4 - D20 =
5 - D100 =
6 - TWO_D6 =
7 - THREE_D6 =
8 - FOUR_D6 =
9
enum ModifierType ​
The options of modifier type: none, additive, percentage, dnd style.
- NONE =
0 - ADDITIVE =
1 - PERCENTAGE =
2 - DND_STYLE =
3
Property descriptions ​
int id = 0 ​
========== EXPORTED PROPERTIES ==========
RollType roll_type = RollType.D20 ​
Type of dice to roll
int dc = 10 ​
Difficulty Class / Target Number
ModifierType modifier_type = ModifierType.ADDITIVE ​
How stat modifiers are calculated
int modifier_stat = 0 ​
Which stat to use as modifier (empty = no modifier)
bool accepts_critical_success_fail = false ​
Whether rolling min (1) is automatic failure, max is automatic success
int pass_chat_id = 0 ​
Chat ID to proceed to on success
int fail_chat_id = 0 ​
Chat ID to proceed to on failure
Method descriptions ​
String get_dice_notation() ​
Returns human-readable dice notation (e.g., '1d20', '2d6')
Vector2i get_dice_range() ​
Returns min and max possible roll values
int roll_dice() ​
Execute the dice roll and return raw result (no modifiers)
Dictionary evaluate_roll( stat_value: float ) ​
Perform the complete roll with modifiers and return results.
String get_modifier_type_name() ​
Returns human-readable modifier type name