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

Difference between revisions of "Script:Numenera Natha"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "This script is meant to be used with Natha's Numenera character sheets: - [https://github.com/Roll20/roll20-character-sheets/tree/master/Numenera_NathasNumenera_English Engli...")
 
Line 1: Line 1:
This script is meant to be used with Natha's Numenera character sheets:
+
This script is meant to be used with Natha's Numenera character sheets (the red buttons in particular).
- [https://github.com/Roll20/roll20-character-sheets/tree/master/Numenera_NathasNumenera_English English%20sheet%20"Numenera%20(tabbed)"]
+
The functions included in the script are aimed at making Numenera rolls, and updating the relative character stat Pools.
- [https://github.com/Roll20/roll20-character-sheets/tree/master/Numenera_NathasNumenera_French French sheet "Numenera (French)"]
+
  
Sheet must be in version 4+ : chat outputs and error messages are managed through the sheet's templates.
+
* [https://github.com/Roll20/roll20-character-sheets/tree/master/Numenera_NathasNumenera_English English sheet "Numenera (tabbed)"]
 +
* [https://github.com/Roll20/roll20-character-sheets/tree/master/Numenera_NathasNumenera_French French sheet "Numenera (French)"]
 +
 
 +
 
 +
'''Sheet must be in version 4+''': chat outputs and error messages are managed through the '''sheet's templates'''.
  
 
== Chat commands ==
 
== Chat commands ==
Line 9: Line 12:
 
=== !nathanum-numeneroll character_id|attribute ===
 
=== !nathanum-numeneroll character_id|attribute ===
 
Stat roll.
 
Stat roll.
 +
 
''Example: !nathanum-numeneroll @{character_id}|speed''
 
''Example: !nathanum-numeneroll @{character_id}|speed''
Calls statRoll(character-objet,name-of-the-attibute,who-rolled).
+
 
 +
Calls statRoll(character-objet,name-of-the-attibute,who-rolled)
 +
 
 
(see the comments of the function below for details).
 
(see the comments of the function below for details).
  
 
=== !nathanum-recoveryroll character_id ===
 
=== !nathanum-recoveryroll character_id ===
 
Recovery roll (see the comments of the function below for details).
 
Recovery roll (see the comments of the function below for details).
 +
 
''Example: !nathanum-recoveryroll @{character_id}''
 
''Example: !nathanum-recoveryroll @{character_id}''
 +
 
Calls recoveryRoll(character-object).
 
Calls recoveryRoll(character-object).
 +
 
(see the comments of the function below for details).
 
(see the comments of the function below for details).
  
 
=== !nathanum-initroll character_id ===
 
=== !nathanum-initroll character_id ===
 
Initiative roll.
 
Initiative roll.
 +
 
''Example: !nathanum-initroll @{character_id}''
 
''Example: !nathanum-initroll @{character_id}''
 +
 
Calls initRoll(character-object).
 
Calls initRoll(character-object).
 +
 
(see the comments of the function below for details).
 
(see the comments of the function below for details).
  
 
=== !nathanum-restchar character_id OR token_id ===
 
=== !nathanum-restchar character_id OR token_id ===
 
Full rest/reset of the character.
 
Full rest/reset of the character.
 +
 
''Example with token id: !nathanum-restchar @{selected|token_id}''
 
''Example with token id: !nathanum-restchar @{selected|token_id}''
 +
 
''Example with character id: !nathanum-restchar @{character_id}''
 
''Example with character id: !nathanum-restchar @{character_id}''
 +
 
Calls restChar(character-object).
 
Calls restChar(character-object).
 +
 
(see the comments of the function below for details).
 
(see the comments of the function below for details).
  
 
=== !nathanum-checkchar character_id ===
 
=== !nathanum-checkchar character_id ===
 
Verifies and sets damage track and token markers according to stat pools.
 
Verifies and sets damage track and token markers according to stat pools.
 +
 
''Example: !nathanum-checkchar @{character_id}''
 
''Example: !nathanum-checkchar @{character_id}''
 +
 
Calls checkCharStates(character object).
 
Calls checkCharStates(character object).
 +
 
(see the comments of the function below for details).
 
(see the comments of the function below for details).
  
 
=== !nathanum-npcdmg token_id|damage-dealt|apply-armor ===
 
=== !nathanum-npcdmg token_id|damage-dealt|apply-armor ===
 
Apply damage (or healing if damage-dealt is negative ...) to Numenera NPC/Creature.
 
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}''
 
''Example: !nathanum-npcdmg @{selected|token_id}|?{Damage +/-|0}|?{Apply Armor (y/n)|y}''
 +
 
Calls npcDamage(character-object,token-object,damage-dealt, apply-armor).
 
Calls npcDamage(character-object,token-object,damage-dealt, apply-armor).
 +
 
(see the comments of the function below for details).
 
(see the comments of the function below for details).
  
Line 48: Line 70:
 
=== General notes: ===
 
=== 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.
 
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 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).
 
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.
 
Errors and/or alert messages (insufficient stat pool points for example) are output in the chat using the "nathaNumMsg" roll template.
  
 
=== checkCharStates(character-object): ===
 
=== checkCharStates(character-object): ===
 
Checks and/or changes the character's damage track and token markers, based on her current stat pools attributes.
 
Checks and/or changes the character's damage track and token markers, based on her current stat pools attributes.
 +
 
No chat output.
 
No chat output.
  
 
=== restChar(character-object): ===
 
=== restChar(character-object): ===
 
Complete rest/reset of the character.
 
Complete rest/reset of the character.
 +
 
Chat output uses the "nathaNumRecovery" roll template.
 
Chat output uses the "nathaNumRecovery" roll template.
  
 
=== initRoll(character-object): ===
 
=== initRoll(character-object): ===
 
BEWARE: Not the standard Numenera initiative roll!
 
BEWARE: Not the standard Numenera initiative roll!
 +
 
The initiative roll is meant to be sorted/compared to (Level*3) of the NPCs/Creatures.
 
The initiative roll is meant to be sorted/compared to (Level*3) of the NPCs/Creatures.
  
Line 70: Line 98:
  
 
Every necessary parameters for this function are attributes of the character sheet.
 
Every necessary parameters for this function are attributes of the character sheet.
 +
 
Damage track and token state are checked/updated by calling checkCharStates().
 
Damage track and token state are checked/updated by calling checkCharStates().
 +
 
Chat output uses the "nathaNumInit" roll template.
 
Chat output uses the "nathaNumInit" roll template.
  
 
=== statRoll(character-objet,name-of-the-attibute,who-rolled): ===
 
=== 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).
 
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).
 
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.
 
Difficulty is the level of difficulty, not the target number.
 +
 
The target number is calculated by the function.
 
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.
 
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).
 
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().
 
Damage track and token state are checked/updated by calling checkCharStates().
 +
 
Chat output uses the "nathaNumRoll" roll template.
 
Chat output uses the "nathaNumRoll" roll template.
  
 
=== recoveryRoll(character-object): ===
 
=== recoveryRoll(character-object): ===
 
Rolls a recovery rolls and advances the recovery track.
 
Rolls a recovery rolls and advances the recovery track.
 +
 
Chat output uses the "nathaNumRecovery" roll template.
 
Chat output uses the "nathaNumRecovery" roll template.
  
Line 97: Line 135:
  
 
Armor will diminish damage unless the "apply-armor" parameter equals 'n'.
 
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.
 
Chat output uses the plain old "sendChat" function (no template), visible to GM only.

Revision as of 17:02, 11 April 2015

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+: 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.