Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Script:Numenera Natha

From Roll20 Wiki

Jump to: navigation, search
API ScriptAuthor: Natha
Version: 4.5
Last Modified: 2015-06-13
Code: Numenera_Natha
Dependencies: None
Conflicts: None

This script is meant to be used with Natha's Numenera character sheets (the red buttons in particular). The functions included in the script are aimed at making Numenera rolls, and updating the relative character stat Pools.


Sheet must be in version 4.5+: chat outputs and error messages are managed through the sheet's templates.

Contents

Chat commands

 !nathanum-macroroll token_or_character_id|stat name|Difficulty|Cost|Assets|Effort on Roll|Effort on Damage|Bonus|Skill level

New! Stat roll that can be called easier by macros.

Calls statRoll(character-objet,name-of-the-attibute,who-rolled, difficulty, Stat-expense,Assets,Effort-on-Roll,Effort-on-damage,Bonus-to-roll,Skill-level). (see the comments of the function below for details).

MIGHT ROLL MACRO EXAMPLE: !nathanum-macroroll @{selected|token_id}|might|?{Difficulty|0}|?{Cost|0}|?{Assets|0}|?{Effort on Roll|0}|?{Effort on Damage|0}|?{Bonus|0}|?{Skill Level (-1 to 2)|0}

SPEED ROLL MACRO EXAMPLE: !nathanum-macroroll @{selected|token_id}|speed|?{Difficulty|0}|?{Cost|0}|?{Assets|0}|?{Effort on Roll|0}|?{Effort on Damage|0}|?{Bonus|0|?{Skill Level (-1 to 2)|0}}

INTELLECT ROLL MACRO EXAMPLE: !nathanum-macroroll @{selected|token_id}|intellect|?{Difficulty|0}|?{Cost|0}|?{Assets|0}|?{Effort on Roll|0}|?{Effort on Damage|0}|?{Bonus|0}|?{Skill Level (-1 to 2)|0}

 !nathanum-numeneroll character_id|attribute

Stat roll (called from the sheet mainly, as it requires a character id).

Examples:

!nathanum-numeneroll @{character_id}|might

!nathanum-numeneroll @{character_id}|speed

!nathanum-numeneroll @{character_id}|intellect


Calls statRollFromSheet(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 statRollFromSheet, 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, and Special Damage) 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, and special damage.

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), skill level (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.

statRollFromSheet(character-objet,name-of-the-attibute,who-rolled):

Gets the necessary parameters for this function as attributes from the character sheet (except the stat name).

And then calls statRoll(character-objet,name-of-the-attibute,who-rolled, difficulty, Stat-expense,Assets,Effort-on-Roll,Effort-on-damage,Bonus-to-roll,Skill-level).

statRoll(character-objet,name-of-the-attibute,who-rolled, difficulty, Stat-expense,Assets,Effort-on-Roll,Effort-on-damage,Bonus-to-roll,,Skill-level):

Might/speed/intellect roll (with eventual roll effort, additionnal cost, damage effort, bonus and skill level) against a difficulty (optional).

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().

Skill level should go from -1 (Inability) to +2 (Specialized).

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.