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:Cypher System Sheet"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "{{script overview |name=Cypher System Sheet |author={{user profile|75857|Natha}} |version=1.2 |lastmodified=2015-10-07 }} This script is meant to be used with the Cypher Syst...")
 
 
Line 1: Line 1:
 
{{script overview
 
{{script overview
|name=Cypher System Sheet
+
|name=CypherSystemSheet
 
|author={{user profile|75857|Natha}}
 
|author={{user profile|75857|Natha}}
 
|version=1.2
 
|version=1.2

Latest revision as of 05:24, 21 December 2018

API ScriptAuthor: Natha
Version: 1.2
Last Modified: 2015-10-07
Code: CypherSystemSheet
Dependencies: None
Conflicts: None

This script is meant to be used with the Cypher System Sheet (red buttons on the sheet, pink buttons in the roll template and/or macros), both the "English" and "French" versions.

The functions included in the script enables the applying of stat cost, recovery roll advance, auto calculation of PC state and damage track.

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

Contents

[edit] Chat commands

[edit]  !cypher-restchar character_id OR token_id

Full rest/reset of the character.

Example with token id: !cypher-restchar @{selected|token_id}

Example with character id: !cypher-restchar @{character_id}

Calls restChar(character-object).

(see the comments of the function below for details).

[edit]  !cypher-checkchar character_id

Verifies and sets damage track and token markers according to stat pools.

Example: !cypher-checkchar @{character_id}

Calls checkCharStates(character object).

(see the comments of the function below for details).

[edit]  !cypher-modstat character_id|stat|cost

Modifies one of the stat (might, speed, intellect or recovery-rolls) of a character and cycle through as per the rulebook if one stat already equals zero (not the recovery-rolls though). Then checks and eventually modifies the character's damage track and token markers.

Calls modStat(character-object,stat, cost).

(see the comments of the function below for details).

[edit]  !cypher-resetaction character_id

Resets the action section parameters (attributes) of the sheet.

Calls resetAction(character-object).

(see the comments of the function below for details).

[edit]  !cypher-npcdmg token_id|damage-dealt|apply-armor

Apply damage (or healing if damage-dealt is negative ...) to an NPC/Creature.

Example: !cypher-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).

[edit] Functions

[edit] General notes:

Functions resetAction, modStat 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 "cyphMsg" roll template.

[edit] modStat(character-object, stat, cost):

Modifies one of the stat (might, speed, intellect or recovery-rolls) of a character and cycle through as per the rulebook (might -> speed -> intellect) if one stat already equals zero (not the recovery-rolls though). Then checks and eventually modifies the character's damage track and token markers by calling checkCharStates(character-object).

Chat output uses the plain old "sendChat" function (no template).

[edit] 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.

[edit] restChar(character-object):

Complete rest/reset of the character.

Chat output uses the "cyphRecovery" roll template.

[edit] npcDamage(character-object,token-object,damage-dealt, apply-armor):

Applies damage (or healing if damage-dealt is negative) to a 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.