Script:Numenera Natha
From Roll20 Wiki
This script is meant to be used with Natha's Numenera character sheets:
- English%20sheet%20"Numenera%20(tabbed)" - French sheet "Numenera (French)"
Sheet must be in version 4+ : chat outputs and error messages are managed through the sheet's templates.
Contents |
Chat commands
!nathanum-numeneroll character_id|attribute
Stat roll. Example: !nathanum-numeneroll @{character_id}|speed Calls statRoll(character-objet,name-of-the-attibute,who-rolled). (see the comments of the function below for details).
!nathanum-recoveryroll character_id
Recovery roll (see the comments of the function below for details). Example: !nathanum-recoveryroll @{character_id} Calls recoveryRoll(character-object). (see the comments of the function below for details).
!nathanum-initroll character_id
Initiative roll. Example: !nathanum-initroll @{character_id} Calls initRoll(character-object). (see the comments of the function below for details).
!nathanum-restchar character_id OR token_id
Full rest/reset of the character. Example with token id: !nathanum-restchar @{selected|token_id} Example with character id: !nathanum-restchar @{character_id} Calls restChar(character-object). (see the comments of the function below for details).
!nathanum-checkchar character_id
Verifies and sets damage track and token markers according to stat pools. Example: !nathanum-checkchar @{character_id} Calls checkCharStates(character object). (see the comments of the function below for details).
!nathanum-npcdmg token_id|damage-dealt|apply-armor
Apply damage (or healing if damage-dealt is negative ...) to Numenera NPC/Creature. Example: !nathanum-npcdmg @{selected|token_id}|?{Damage +/-|0}|?{Apply Armor (y/n)|y} Calls npcDamage(character-object,token-object,damage-dealt, apply-armor). (see the comments of the function below for details).
Functions
General notes:
Functions statRoll, recoveryRoll, initRoll and restChar are for players (or GM), and can be called by clicking the RED buttons on the sheet. Function checkCharStates is called by all the functions that modify stat pools (might, speed and intellect attributes) or when stat pools are manually modified (on the sheet or character). Function npcDamage is for the GM and meant to be called via macros with an NPC token selected (these characters require HEALTH and ARMOR attributes). Errors and/or alert messages (insufficient stat pool points for example) are output in the chat using the "nathaNumMsg" roll template.
checkCharStates(character-object):
Checks and/or changes the character's damage track and token markers, based on her current stat pools attributes. No chat output.
restChar(character-object):
Complete rest/reset of the character. Chat output uses the "nathaNumRecovery" roll template.
initRoll(character-object):
BEWARE: Not the standard Numenera initiative roll! The initiative roll is meant to be sorted/compared to (Level*3) of the NPCs/Creatures.
The function:
- Rolls 1d20, adds the optional efforts (multiplied by 3) and bonus,
- Expends the optional speed points from effort and initial cost (using edge),
- Then add the character, or its token (if on the map on the object layer), to the tracker, or replace the initiative value if it's already in the tracker
Every necessary parameters for this function are attributes of the character sheet. Damage track and token state are checked/updated by calling checkCharStates(). Chat output uses the "nathaNumInit" roll template.
statRoll(character-objet,name-of-the-attibute,who-rolled):
Might/speed/intellect roll (with eventual roll effort, additionnal cost, damage effort and bonus) against a difficulty (optional). Every necessary parameters for this function are attributes of the character sheet (except the stat name). Difficulty is the level of difficulty, not the target number. The target number is calculated by the function. If difficulty equals 0, the roll still happens, but is not confronted to any difficulty: instead of calculating success, it calculates the highest difficulty beaten. Unless d20 rolls a natural 20, pool points cost is calculted (using edge) and expended, if necessary and if possible (not enough stat Pool points ends in an error message). Damage track and token state are checked/updated by calling checkCharStates(). Chat output uses the "nathaNumRoll" roll template.
recoveryRoll(character-object):
Rolls a recovery rolls and advances the recovery track. Chat output uses the "nathaNumRecovery" roll template.
npcDamage(character-object,token-object,damage-dealt, apply-armor):
Applies damage (or healing if damage-dealt is negative) to a Numenera NPC/Creature. And sets "death" marker if health is 0 or less.
The Mook or Non Player Character must have the following attributes :
- LEVEL (token bar1)
- HEALTH (token bar2)
- ARMOR (token bar3)
Armor will diminish damage unless the "apply-armor" parameter equals 'n'. Chat output uses the plain old "sendChat" function (no template), visible to GM only.