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:Blood and Honor"

From Roll20 Wiki

Jump to: navigation, search
 
(switch place on page/redirect)
Line 1: Line 1:
#REDIRECT [[Script:Blood And Honor: Automatic blood spatter, pooling and trail effects]]
+
{{notebox|This is an API made in '''2105''', and isn't any longer in the one-click install menu}}
 +
 
 +
'''Blood and Honor''' is an automatic way to add lightweight blood effects to your campaign, without any animations or commands.
 +
 
 +
Any token in the object layer that has a bar3 (health) value less than or equal to its max has a chance to bleed. The chance goes up depending on how severe the damage is. Any time a token's health bar is changed so that it's total value is half or less of its maximum, a randomly selected, offset and rotated blood graphic will be placed on the map layer beneath it. The exact chance for a blood spatter to appear is: <code>(max - current) / max</code>. In other words, the percentage of ''missing'' heath is the chance to water the fields with blood. The larger the amount of damage taken at once, the bigger the spatter will be.
 +
 
 +
If a token moves while at or below half health, a smaller blood graphic will appear where it moves to based on the chances described above. Less health creates more blood. If a token's bar3 value falls to 0 or below, a large pool of blood graphic appears on the map layer beneath it.
 +
 
 +
 
 +
* {{repo|Roll20/roll20-api-scripts/tree/62567387701eca0c99fe73384259f556c4f4064e/Blood-and-Honor v.0.8.1 sourcecode}} (2015 version)
 +
* {{fpl|1477230/ forum post & usage examples}}
 +
* <strike><nowiki>https://www.youtube.com/watch?v=b-BhZRLwOZU</nowiki> Explanation</strike> unavailable
 +
=== Syntax ===
 +
{{syntaxbox top|Blood And Honor: Automatic blood spatter, pooling and trail effects}}
 +
{{API command|clearblood}}
 +
{{syntaxbox end}}
 +
 
 +
If [[Script:IsGM Auth Module|IsGM Auth Module]] is installed and <code>useIsGM</code> is set to <code>true</code>, the <code>!clearblood</code> command will be restricted to GM use only.
 +
 
 +
The <code>!clearblood</code> command will move all of the blood splatter graphics to the top left corner of the map so that they can be quickly deleted.
 +
 
 +
=== Configuration ===
 +
Adding the text <code>noblood</code> in any token's GM Notes will cause it to never bleed.
 +
 
 +
Add one of the following keywords into the GM Notes of a token if you want the token to bleed a color other than red: <code>bloodcolor_orange</code>, <code>bloodcolor_purple</code>, <code>bloodcolor_blue</code>
 +
 
 +
'''NOTE: YOU MUST SET YOUR OWN IMAGE URLS IN THE SCRIPT! You can put as many of either type (spatters or pools) as you wish, and it will choose from them randomly. See [https://wiki.roll20.net/API:Objects#imgsrc_and_avatar_property_restrictions this page] for more details.'''
 +
 
 +
=== Changelog ===
 +
 
 +
{{changelog version|0.8.1|2015-09-28|* Patch: playerIsGM, createObj, randomInteger crash [[The Aaron]] }}
 +
{{changelog version|0.8|2015-01-08|* Switched order of GM Auth module checks (thanks Brian)
 +
* [bugfix] ironed out a syntax error}}
 +
{{changelog version|0.7|2015-01-08|* Size of spatters determined by amount of damage received
 +
* Addressed stability issue (trails) with cooldown timer}}
 +
{{changelog version|0.6|2015-01-07|* Added support for TheAaron's GM Auth module}}
 +
{{changelog version|0.5|2015-01-06|* Added on "ready" event to keep funny things from happening
 +
* !clearblood command will move all blood to top left corner of map}}
 +
{{changelog version|0.4|2015-01-05|* [bugfix] "noblood" check now properly passes all bleeding types}}
 +
{{changelog version|0.3|2015-01-05|* [bugfix] blood pools now appear properly
 +
* Adding to bar3_value will no longer cause bleeding if the token is still below half health}}
 +
{{changelog version|0.2|2015-01-05|* Added layer check to make sure nothing bleeds on the non-object layers.
 +
* Fixed tabs and spacing}}
 +
{{changelog version|0.1|2015-01-05|* Release}}
 +
 
 +
 
 +
[[Category:Discontinued API Scripts]]

Revision as of 11:52, 21 May 2021


Blood and Honor is an automatic way to add lightweight blood effects to your campaign, without any animations or commands.

Any token in the object layer that has a bar3 (health) value less than or equal to its max has a chance to bleed. The chance goes up depending on how severe the damage is. Any time a token's health bar is changed so that it's total value is half or less of its maximum, a randomly selected, offset and rotated blood graphic will be placed on the map layer beneath it. The exact chance for a blood spatter to appear is: (max - current) / max. In other words, the percentage of missing heath is the chance to water the fields with blood. The larger the amount of damage taken at once, the bigger the spatter will be.

If a token moves while at or below half health, a smaller blood graphic will appear where it moves to based on the chances described above. Less health creates more blood. If a token's bar3 value falls to 0 or below, a large pool of blood graphic appears on the map layer beneath it.


Syntax

!clearblood

If IsGM Auth Module is installed and useIsGM is set to true, the !clearblood command will be restricted to GM use only.

The !clearblood command will move all of the blood splatter graphics to the top left corner of the map so that they can be quickly deleted.

Configuration

Adding the text noblood in any token's GM Notes will cause it to never bleed.

Add one of the following keywords into the GM Notes of a token if you want the token to bleed a color other than red: bloodcolor_orange, bloodcolor_purple, bloodcolor_blue

NOTE: YOU MUST SET YOUR OWN IMAGE URLS IN THE SCRIPT! You can put as many of either type (spatters or pools) as you wish, and it will choose from them randomly. See this page for more details.

Changelog

v0.8.1 (2015-09-28)

  • Patch: playerIsGM, createObj, randomInteger crash The Aaron


v0.8 (2015-01-08)

  • Switched order of GM Auth module checks (thanks Brian)
  • [bugfix] ironed out a syntax error


v0.7 (2015-01-08)

  • Size of spatters determined by amount of damage received
  • Addressed stability issue (trails) with cooldown timer


v0.6 (2015-01-07)

  • Added support for TheAaron's GM Auth module


v0.5 (2015-01-06)

  • Added on "ready" event to keep funny things from happening
  •  !clearblood command will move all blood to top left corner of map


v0.4 (2015-01-05)

  • [bugfix] "noblood" check now properly passes all bleeding types


v0.3 (2015-01-05)

  • [bugfix] blood pools now appear properly
  • Adding to bar3_value will no longer cause bleeding if the token is still below half health


v0.2 (2015-01-05)

  • Added layer check to make sure nothing bleeds on the non-object layers.
  • Fixed tabs and spacing


v0.1 (2015-01-05)

  • Release