Added New Character Sheet, Forge

This commit is contained in:
Ricky Martinez
2023-03-03 11:41:51 -06:00
parent 5973d3b226
commit 62c4e1b38d
4 changed files with 807 additions and 0 deletions
+139
View File
@@ -0,0 +1,139 @@
.wrapper {
background-color: antiquewhite;
padding: 10px;
}
/*Configure the tab buttons*/
.tabs {
margin-left: 5px;
width: 22%;
}
/* Chrome, Safari, Edge, Opera */
input.x::-webkit-outer-spin-button,
input.x::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
input[type=number].x {
-moz-appearance: textfield;
}
.col {
min-width: 10%;
}
.grid {
display: flex;
flex-wrap: wrap;
}
.colInput {
min-width: 30%;
min-width: 85%;
width: auto;
}
.pilot,
.info,
.inv,
.grim {
display: none;
margin-top: 5px;
}
.marginleft {
margin-left: 5%;
}
/* show the selected tab */
.tabstoggle[value="pilot"] ~ div.pilot,
.tabstoggle[value="info"] ~ div.info,
.tabstoggle[value="inv"] ~ div.inv,
.tabstoggle[value="grim"] ~ div.grim {
display: block;
}
.twocolumns {
display: flex;
}
.valuecolumn {
display: inline-grid;
}
textarea {
max-height: 50px;
height: 50px;
}
.weapon {
display: inline-flex;
}
.weapon > label {
width: 200px;
}
h3 {
margin-top: 2%;
}
.ui-dialog .charsheet input {
height: 24px;
}
.sheet-rolltemplate-rollhigh table,
.sheet-rolltemplate-rolllow table,
.sheet-rolltemplate-roll table,
.sheet-rolltemplate-spell table,
.sheet-rolltemplate-weapondmg table,
.sheet-rolltemplate-weapon table{
background-color:antiquewhite;
border:1px solid #c1875d;
text-align: middle;
font-size: 1em;
width: 100%;
padding-right:5%;
}
.sheet-rolltemplate-rollhigh table th,
.sheet-rolltemplate-rolllow table th,
.sheet-rolltemplate-roll table th,
.sheet-rolltemplate-spell table th,
.sheet-rolltemplate-weapondmg table th,
.sheet-rolltemplate-weapon table th{
background-color:antiquewhite;
text-align:center;
margin:0px;
font-size:1em;
}
.sheet-rolltemplate-rollhigh table td,
.sheet-rolltemplate-rolllow table td,
.sheet-rolltemplate-roll table td,
.sheet-rolltemplate-spell table td,
.sheet-rolltemplate-weapondmg table td,
.sheet-rolltemplate-weapon table td{
padding: 2px;
}
.sheet-rolltemplate-rollhigh table .inlinerollresult,
.sheet-rolltemplate-rolllow table .inlinerollresult,
.sheet-rolltemplate-roll table .inlinerollresult,
.sheet-rolltemplate-spell table .inlinerollresult,
.sheet-rolltemplate-weapondmg table .inlinerollresult,
.sheet-rolltemplate-weapon table .inlinerollresult{
border:none !important;
background-color:inherit;
}
.sheet-rolltemplate-spacer{
display:block;
width:calc(100%+2px);
border:1px solid #550000;
margin:-1px -3px 0px -3px;
padding:1px;
}
+659
View File
@@ -0,0 +1,659 @@
<div class="wrapper">
<input type="hidden" class="tabstoggle" name="attr_sheetTab" value="pilot"/>
<div>
<button type="action" name="act_pilot" class="tabs">Character</button>
<button type="action" name="act_info" class="tabs">Info</button>
<button type="action" name="act_inv" class="tabs">Inventory</button>
<button type="action" name="act_grim" class="tabs">Effects</button>
</div>
<div class="info">
<h2>Information</h2>
<div class="grid">
<div class="col">
<label>Name </label>
<input class="colInput" type="text" name="attr_character_name">
</div>
<div class="col">
<label>Race </label>
<input class="colInput" type="text" name="attr_race">
</div>
<div class="col">
<label>Class </label>
<input class="colInput" type="text" name="attr_class">
</div>
<div class="col">
<label>City of Origin </label>
<input class="colInput" type="text" name="attr_coo">
</div>
<div class="col">
<label>Age </label>
<input class="colInput" type="text" name="attr_age">
</div>
<div class="col">
<label>Notes </label>
<textarea class="colInput" name="attr_notes">
</div>
</div>
</div>
<div class="pilot">
<div class="tabstoggle">
<h2>High <button type="roll" value="&{template:rollhigh}{{name=@{character_name}}}{{roll=[[1d20]]}}"></button> or Low <button type="roll" value="&{template:rolllow}{{name=@{character_name}}}{{roll=[[1d20]]}}"></button> D20 <button type="roll" value="[[1d20]]"></button></h2>
</div>
<div class="twocolumns">
<div>
<h2 title="All stats cost 5 points. No need to roll if the difficulty is lower than the stat.">Stats</h2>
<div class="twocolumns">
<div class="valuecolumn">
<input type="number" min="-60" max="60" name="attr_targetr" value="10">
</div>
<div class="labels">
<label style="float: left;" title="Target is used against stat checks">Target </label>
</div>
</div>
<div class="twocolumns">
<div class="labels">
<label title="Tuf. Rolled for life saving throws (poison, drowning, etc.), Strength throws, HPx2, and Inventory slots (if used)">Toughness </label>
<label title="DX. Rolled for physical feats (attack, climbing/falling, picking locks, etc.)">Dexterity </label>
<label title="IQ. Rolled for magic and mental feats (perception, puzzles, knowledge, etc.)">Intelligence </label>
<label title="DMG. Rolled for breaking inanaimate objects. Adds to all damage dealt, and is the minimum damage you can do.&#10;1 : d2 | 11 : 2d8&#10;2 : d4 | 12 : d20&#10;3 : d6 | 13 : 2d10&#10;4 : d8 | 14 : 2d11&#10;5 : 2d4 | 15 : 2d12&#10;6 : d10 | 16 : 2d20&#10;7 : 2d5 | | : ''&#10;8 : d12 | | : ''&#10;9 : 2d6 | v : ''&#10;10 : 2d7 | 40 : ''">Damage </label>
</div>
<div class="valuecolumn">
<input type="number" min="0" max="40" name="attr_con" value="0">
<input type="number" min="0" max="40" name="attr_dx" value="0">
<input type="number" min="0" max="40" name="attr_iq" value="0">
<input type="number" min="0" max="40" name="attr_dmg" value="0">
</div>
<div class="valuecolumn">
<button style="height: 18px;" type="roll" title="Roll stat." value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + @{con}[Tuf] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Toughness'}}"></button>
<button style="height: 18px;" type="roll" title="Roll stat." value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + @{dx}[DX] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Dexterity'}}"></button>
<button style="height: 18px;" type="roll" title="Roll stat." value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + @{iq}[IQ] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Intelligence'}}"></button>
<button style="height: 18px;" type="roll" value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + @{dmg}[Dmg] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Damage'}}" title="Roll stat. (DMG Should only be used for breaking inanimate objects)"></button>
</div>
<div class="valuecolumn">
<button style="height: 18px; color: orange;" type="roll" title="Roll stat with mods." value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + ?{Modifier?|0}[Mod] + @{con}[Tuf] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Toughness'}}"></button>
<button style="height: 18px; color: orange;" type="roll" title="Roll stat with mods." value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + ?{Modifier?|0}[Mod] + @{dx}[DX] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Dexterity'}}"></button>
<button style="height: 18px; color: orange;" type="roll" title="Roll stat with mods." value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + ?{Modifier?|0}[Mod] + @{iq}[IQ] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Intelligence'}}"></button>
<button style="height: 18px; color: orange;" type="roll" value="&{template:roll}{{name=@{character_name}}}{{total=[[ [[1d20]] + ?{Modifier?|0}[Mod] + @{dmg}[Dmg] ]]}}{{roll=$[[0]]}}{{target=[[@{targetr}]]}}{{stat='Damage'}}" title="Roll stat with mods. (DMG Should only be used for breaking inanimate objects)"></button>
</div>
</div>
</div>
<div style="margin-left: 50px;">
<h2>Utility</h2>
<div class="twocolumns">
<div class="labels">
<label title="HP. The hit points you have left.">Hit Points </label>
<label title="This cannot be lower than 5. Derived form Tuf*2">Max HP </label>
<label title="Def (total from armor)">Defense </label>
<label title="MR. Increases difficulty of Effects that target you (2 points)">Magic Resistance </label>
<label title="The amount of mana you have left. Also listed in your Effects page">Mana </label>
<label title="Used to cast spells (1 point)">Max Mana </label>
<br>
<label>Silver </label>
</div>
<div class="valuecolumn">
<input type="number" name="attr_hp" value="5">
<input type="hidden" name="attr_foo_hpmax" value="5">
<input type="number" title="To increase, you must increase Tuf" disabled name="attr_hp_max" value="@{foo_hpmax}">
<input type="number" title="To increase, you must buy armor" disabled name="attr_totalar" title="Total Def: all your armor ACs." value="(@{foo_totalar})">
<input type="number" min="0" name="attr_mr" value="0">
<input type="number" min="0" name="attr_mana" value="0">
<input type="hidden" name="attr_mana_max" value="@{manamax}">
<input type="number" min="0" name="attr_manamax" value="0">
<br>
<input type="number" style="width: 80px;" step=".01" name="attr_gold" value="100">
</div>
</div>
</div>
<div style="margin-left: 50px;">
<h2>Points</h2>
<div class="twocolumns">
<div class="labels">
<label title="The points awarded to you by the gm">Total Worth </label>
<label title="The total points you have spent">Spent </label>
<label title="The remaining points" style="color: chartreuse;">Available </label>
<label title="The points you have spent on Stats">Stats </label>
<label title="The points you spent on Gear">Gear </label>
<label title="The points you have spent on abilites">Abilities </label>
<label title="Total number of spells. All spells cost 1">Spells </label>
</div>
<div class="valuecolumn">
<input type="number" name="attr_tw" value="100" style="width: 100px;">
<input type="number" disabled name="attr_totalspent" value="(@{stats} + @{gears} + @{abilities} + @{spells})" class="x">
<input type="number" disabled name="attr_avail" value="(@{tw}-@{totalspent})" class="x">
<input type="number" disabled name="attr_stats" title="5 points for each stat + 2 points for each MR + a point for each mana." value="((@{con})*5 + (@{dx})*5 + (@{iq})*5 + (@{dmg})*5 + (@{mr})*2 + @{manamax})" class="x">
<input type="hidden" name="attr_foo_wpns" value="0" />
<input type="hidden" name="attr_foo_armors" value="0" />
<input type="number" disabled name="attr_gears" value="(@{foo_wpns} + @{foo_armors})" class="x">
<input type="hidden" name="attr_foo_abils" value="0" />
<input type="number" disabled name="attr_abilities" value="@{foo_abils}" class="x">
<input type="hidden" name="attr_foo_spells" value="0" />
<input type="number" title="Total number of spells. All spells cost 1" disabled name="attr_spells" value="@{foo_spells}" class="x">
</div>
</div>
</div>
</div>
<div class="sheet-rolltemplate-spacer"></div>
<h2>Gear</h2>
<h3>Attacks</h3>
<div class="weapon">
<label title="Name of the Weapon">Name</label>
<label style="width: 63px;" title="Damage bonus this weapon gives (2 points)&#10;1 : d2 | 11 : 2d8&#10;2 : d4 | 12 : d20&#10;3 : d6 | 13 : 2d10&#10;4 : d8 | 14 : 2d11&#10;5 : 2d4 | 15 : 2d12&#10;6 : d10 | 16 : 2d20&#10;7 : 2d5 | | : ''&#10;8 : d12 | | : ''&#10;9 : 2d6 | v : ''&#10;10 : 2d7 | 40 : ''">Bonus DMG</label>
<label style="width: 68px;" title="Bonus to hit (2 points)">Accuracy</label>
<label title="Point cost of this weapon">Cost</label>
</div>
<div>
<fieldset class="repeating_weapons">
<div class="weapon">
<input type="text" name="attr_weaponname">
<input type="number" name="attr_damage" min="0" value="0">
<button type="roll" style="color: red;" name="attr_dmgbtn" title="Damage after hit" value="[[1d2]]}}"></button>
<input type="number" name="attr_acc" value="0">
<button type="roll" title="Use the Weapon" value="&{template:weapon}{{name=@{character_name}}}{{weaponname=@{weaponname}}}{{total=[[ [[1d20]] + @{dx}[DX] + @{acc}[Acc] ]]}}{{roll=$[[0]]}}"></button>
<button type="roll" style="color: orange;" title="Use the Weapon with mods" value="&{template:weapon}{{name=@{character_name}}}{{weaponname=@{weaponname}}}{{total=[[ [[1d20]] + ?{Modifiers?|0}[Mod] + @{dx}[DX] + @{acc}[Acc] ]]}}{{roll=$[[0]]}}"></button>
<input type="number" disabled name="attr_wpncost" title="Point cost of this weapon" value="(@{damage}*2+ @{acc}*2)" >
</div>
</fieldset>
</div>
<h3>Armor</h3>
<div class="weapon">
<label>Name</label>
<label title="The place on the body the armor resides. The most important spot is the body, since that's the default hit location.">Location</label>
<label title="Defense Bonus (2 points)" style="width: 38px;">Def</label>
<label title="Damage Reduciton for this location only (5 points)." style="width: 35px;">DR</label>
<label>Cost</label>
</div>
<div>
<fieldset class="repeating_armors">
<div class="weapon">
<input type="text" name="attr_armorname" title="Name of the Armor">
<input type="text" name="attr_armorloc" title="location of the Armor">
<input type="number" min="0" name="attr_armar" value="0">
<input type="number" min="0" name="attr_armas" value="0">
<input type="number" disabled name="attr_armorcost" title="cost of this Armor" value="(@{armar}*2 + @{armas}*5)" >
</div>
</fieldset>
<input type="hidden" name="attr_foo_totalar" value="0" />
<div class="weapon">
<label style="width: 80px;">Def</label><input type="number" disabled name="attr_totalar" title="Total Def: all your armor ACs." value="(@{foo_totalar})">
</div>
</div>
<div class="sheet-rolltemplate-spacer"></div>
<h3>Abilities</h3>
<div class="weapon">
<label style="width: 170px;">Name</label>
<label style="width: 190px;" title="Makes sure to put all details in this box (length, bonus, rolls, all of it)">Effect</label>
<label>Cost</label>
</div>
<fieldset class="repeating_abilities">
<div class="weapon">
<input type="text" name="attr_abilname" title="Name of the ability"><textarea name="attr_ability"></textarea> <input type="number" name="attr_abilcost" title="+ for advantage, - for disadvantage">
</div>
</fieldset>
</div>
<div class="grim">
<h2>Effects</h2>
<div class="weapon">
<label style="width: 170px">Name</label>
<label style="width: 190px" title="Makes ure to put all details in this box (length, bonus, rolls, multipliers, levels, all of it)">Effect</label>
<label style="width: 62px" title="Damage bonus (leave blank if the spell does no damage, put 0 for base damage)">Damage</label>
<label style="width: 63px" title="What you must roll (+ penalties) to use the spell">Difficulty</label>
<label style="width: 40px" title="Cost to cast the spell, derived from difficulty (5-9 = 0, 10-14 = 1, 15-19 = 2, 20-24 = 3, etc.).">Mana Cost</label>
</div>
<div class="weapon">
<button title="This will set all uses to their max use" type="action" name="act_restoreall">Restore Mana</button>
<input type="number" name="attr_mana" title="The mana you have left until you rest." min="0" value="0">
</div>
<div>
<fieldset class="repeating_spells">
<div class="weapon">
<input type="text" name="attr_weaponname" title="Name of the Spell">
<textarea type="text" name="attr_spelleffect" title="Effect of the Spell"></textarea>
<input type="number" name="attr_damage" min="0" value="">
<button style="height: 24px; color: red;" type="roll" name="attr_dmgbtn" title="Damage after hit" value="[[1d2]]]"></button>
<button style="height: 24px;" type="roll" title="Use the Spell" value="&{template:spell}{{name=@{character_name}}}{{weaponname=@{weaponname}}}{{cost=@{cost}}}{{total=[[ [[1d20]] + ?{Modifiers?|0}[Mod] + @{iq}[IQ] ]]}}{{roll=$[[0]]}}{{diff=[[@{spelldiff}]]}}{{effect=@{spelleffect}}}"></button>
<input type="number" min="5" max="60" name="attr_spelldiff" value="5">
<input type="hidden" name="attr_foo_cost" value="0">
<input type="number" disabled name="attr_cost" title="Cost to cast the spell, derived from difficulty." value="@{foo_cost}">
</div>
</fieldset>
</div>
</div>
<div class="inv">
<h2>Inventory</h2>
<div class="weapon">
<label>Name</label>
<label>Effect</label>
<label style="width: 35px;">#</label>
<label style="width: 35px;">Slots</label>
<label>Cost</label>
</div>
<div>
<fieldset class="repeating_items">
<div class="weapon">
<input type="text" name="attr_itemname" title="Name of the Item">
<input type="text" name="attr_itemeffect" title="Effect of the item">
<input type="number" name="attr_quantity" title="Number of this item you have. Most items can't have more than 10, and some can have fewer">
<input type="number" name="attr_slots" title="items don't have a weight, just a slot count. Most items take 1 slot">
<input type="number" name="attr_itemcost" title="The amount in silver the item costs">
</div>
</fieldset>
</div>
<div>
<input type="hidden" name="attr_foo_slotsused" value="0">
Slots used: <input name="attr_slotsused" type="number" disabled value="@{foo_slotsused}"> Slots available: <input type="number" name="attr_slotsavail" disabled value="(@{con}*2-@{foo_slotsused}+10)">
</div>
</div>
</div>
<script type="text/worker">
["pilot","info","grim","inv"].forEach(button => {
on(`clicked:${button}`, function() {
setAttrs({
"sheetTab": button
});
});
});
const dmgTable = ["1d2","1d4","1d6","1d8","2d4","1d10","2d5","1d12","2d6","2d7","2d8","1d20","2d10","2d11","2d12","2d20"];
//const spellCostTable = [.1, .2, .2, .333333, .333333, .333333, .5, .5, .5, .5, 1, 1, 1, 1, 1, 2, 3,3,3,3,3, 4,4,4,4,4, 5,5,5,5,5 ,6,6,6,6,6 ,7,7,7,7,7 ,8,8,8,8,8,8
//,9,9,9,9,9 ,10,10,10,10,10];
function getDamageRollStr(dmgAttr, callback){
getAttrs([
"dmg", dmgAttr
]
, function(values) {
const dmgV = Math.min(15, Math.max(0, sumFieldValues(values)-1));
callback(dmgTable[dmgV]);
});
}
function getCostOfSpell(spellDiff){
return Math.floor(parseInt(spellDiff)/5) - 1;
//const mult = spellCostTable[parseInt(spellDiff)-5];
//const fullCost = Math.ceil(mult*parseInt(maxUses))
//return [fullCost, Math.max(1,Math.round(fullCost*(1/mult)))];
}
on('change:manamax', function(eventInfo) {
getAttrs( ["mana"]
, function(values) {
console.log(eventInfo);
setAttrs({"mana": (parseInt(values.mana) + (parseInt(eventInfo.newValue) - (parseInt(eventInfo.previousValue)||0)))}, {silent:true});
});
});
on('clicked:restoreall', function() {
getAttrs([
"manamax"
]
, function(values) {
setAttrs({"mana":values.manamax}
, {silent:true}
);
});
});
// Changing damage
on("change:repeating_weapons change:repeating_spells", function(eventInfo) {
const btndmgAttr = eventInfo.triggerName + "_dmgbtn";
//document.getElementsByName(btndmgAttr)[0].disabled = false;
// set the attribute to a template with the updated die roll
let templateStr = "&{template:weapondmg}{{weaponname=@{weaponname}}}{{mindmg=[[@{dmg}+?{Mod? (Applies to min & dmg)|0}]]}}{{damage=[[";
getDamageRollStr(eventInfo.triggerName + "_damage", function(dmgroll){
templateStr += dmgroll + "+?{Mod? (Applies to min & dmg)|0}]]}}";
setAttrs({
[btndmgAttr]: templateStr
}
, {silent:true}
);
});
});
function sumFieldValues(fieldValues){
let sum = 0;
Object.values(fieldValues).forEach(element => sum += parseInt(element)||0);
return sum;
}
on("change:repeating_weapons:damage change:repeating_weapons:acc", function(eventInfo) {
getRepeatingFields("repeating_weapons", ["damage","acc"], function(fieldValues){
setAttrs({
"foo_wpns": sumFieldValues(fieldValues)*2
}
, {silent:true}
);
});
});
on("change:repeating_items:slots", function(eventInfo) {
getRepeatingFields("repeating_items", ["slots"], function(fieldValues){
setAttrs({
"foo_slotsused": sumFieldValues(fieldValues)
});
});
});
//
on("change:repeating_spells", function(eventInfo) {
// get total spell count
getRepeatingFields("repeating_spells", ["spelldiff"], function(fieldValues){
let sendValues = {"foo_spells":0};
let idName = "";
for (const property in fieldValues) {
idName = property.substring(0, property.lastIndexOf("_"));
sendValues[idName + "_foo_cost"] = getCostOfSpell(fieldValues[property]);
sendValues["foo_spells"] += 1;
}
setAttrs( sendValues , {silent:true} );
});
});
on("change:repeating_armors:armar change:repeating_armors:armas", function(eventInfo) {
getRepeatingFields("repeating_armors", ["armar","armas"], function(fieldValues){
let arSum = 0;
let asSum = 0;
for (const property in fieldValues) {
if(property.indexOf("_armar") != -1){
arSum += parseInt(fieldValues[property]);
}else{
asSum += parseInt(fieldValues[property]);
}
}
setAttrs({
"foo_armors": asSum*5 + arSum*2
, "foo_totalar": arSum
});
});
});
on("change:repeating_abilities:abilcost", function(eventInfo) {
getRepeatingFields("repeating_abilities", ["abilcost"], function(fieldValues){
setAttrs({
"foo_abils": sumFieldValues(fieldValues)
});
});
});
// function to get fields from a repeating section
function getRepeatingFields(sectionName, fieldNames, callback) {
getSectionIDs(sectionName, function (ids) {
if (ids.length === 0) {
callback(0);
return;
}
let fieldArray = [];
for (let j = 0; j < fieldNames.length; j++) {
for (let i = 0; i < ids.length; i++) {
fieldArray.push(sectionName + '_' + ids[i] + '_' + fieldNames[j]);
}
}
getAttrs(fieldArray, function (fieldValues) {
callback(fieldValues);
});
});
}
on("sheet:opened", function(eventInfo){
getAttrs([
"first"
]
, function(values) {
if(values.first == undefined){
setAttrs({
"con": 1
,"dmg":1
,"hp_max":5
,"foo_hpmax":5
,"hp":5
,"first":1
,"mana":0
,"manamax":0
,"gold":100
}
, {silent:true}
);
}
});
});
on("change:con", function(eventInfo) {
const newV = parseInt(eventInfo.newValue);
const oldV = parseInt(eventInfo.previousValue);
let diff4 = Math.max(5, newV*2) - Math.max(5, oldV*2);
getAttrs([
"hp",
"hp_max",
"foo_hpmax",
]
, function(values) {
setAttrs({
"hp": parseInt(values.hp) + diff4
, "hp_max": parseInt(values.hp_max) + diff4
, "foo_hpmax": parseInt(values.foo_hpmax) + diff4
}
, {silent:true}
);
});
});
//on("change:hp_max", function(eventInfo) {
// const newV = parseInt(eventInfo.newValue);
// const oldV = parseInt(eventInfo.previousValue);
// let diff = newV - oldV;
// getAttrs([
// "hp"
// ]
// , function(values) {
// setAttrs({
// "hp": parseInt(values.hp) + diff
// }
// , {silent:true}
// );
// });
// });
</script>
<rolltemplate class="sheet-rolltemplate-roll">
<table>
<tr>
<th>
{{name}} rolls {{stat}}:
</th>
</tr>
<tr>
<td>
<div class="sheet-rolltemplate-spacer"></div>
</td>
</tr>
<tr>
<td>
{{#rollTotal() roll 20}}
<strong style="color: green;">CRIT SUCCESS!</strong> ({{roll}}) <br>
You succeed, and get really lucky! Optionally you can gamble with a high or low. Success means you double the effect. Fail means you just succeed.
{{/rollTotal() roll 20}}
{{#rollBetween() roll 2 19}}
{{#rollGreater() total target}}
{{total}} is a <strong style="color: green;">Success</strong> against {{target}}
{{/rollGreater() total target}}
{{#rollTotal() total target}}
{{total}} is a <strong style="color: green;">Success</strong> against {{target}}
{{/rollTotal() total target}}
{{#rollLess() total target}}
{{total}} is a <strong style="color: red;">Fail</strong> against {{target}}
{{/rollLess() total target}}
{{/rollBetween() roll 2 19}}
{{#rollTotal() roll 1}}
<strong style="color: red;">CRIT FAIL!</strong> ({{roll}}) <br>
You auto fail. Succeed a "high or low" or something bad might happen to you
{{/rollTotal() roll 1}}
</td>
</tr>
</table>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-weapondmg">
<table>
<tr>
<th>
{{weaponname}} deals:
</th>
</tr>
<tr>
<td>
<div class="sheet-rolltemplate-spacer"></div>
</td>
</tr>
<tr>
<td>
{{damage}}
{{#rollLess() damage mindmg}}
Damage cannot be below your Damage stat: {{mindmg}}
{{/rollLess() damage mindmg}}
- DR
</td>
</tr>
</table>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-weapon">
<table>
<tr>
<th>
{{name}} attacks with {{weaponname}}
</th>
</tr>
<tr>
<td>
<div class="sheet-rolltemplate-spacer"></div>
</td>
</tr>
<tr>
<td>
{{#rollTotal() roll 20}}
<strong style="color: green;">CRIT SUCCESS!</strong> ({{roll}}) <br>
Your attack auto hits, and double Dmg or Add stun. Optionally you can gamble with a high or low. Success means you double the effect. Fail means you just succeed.
{{/rollTotal() roll 20}}
{{#rollBetween() roll 2 19}}
Compare {{total}} to target Def
{{/rollBetween() roll 2 19}}
{{#rollTotal() roll 1}}
<strong style="color: red;">CRIT FAIL!</strong> ({{roll}}) <br>
Your attack auto fails, succeed a "high or low" or you dorp your weapon or fall to the floor
{{/rollTotal() roll 1}}
</td>
</tr>
</table>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-spell">
<table>
<tr>
<th>
{{name}} attempts to cast spell {{weaponname}} Difficulty: {{diff}}
</th>
</tr>
<tr>
<td>
<div class="sheet-rolltemplate-spacer"></div>
</td>
</tr>
<tr>
<td>
{{#rollTotal() roll 20}}
<strong style="color: green;">CRIT SUCCESS!</strong> ({{roll}}) <br>
Your attack auto hits, you can double dmg or add an additional effect (the GM approves), and mana is NOT consumed.
Optionally you can gamble with a high or low. Success means you double the effect. Fail means you just succeed.
<br>
{{effect}}
{{/rollTotal() roll 20}}
{{#rollTotal() roll 1}}
<strong style="color: red;">CRIT FAIL!</strong> ({{roll}}) <br>
Your attack auto fails, succeed a "high or low" or your spell backfires. This also wastes mana.
{{/rollTotal() roll 1}}
{{#rollBetween() roll 2 19}}
{{#rollLess() total diff}}
{{total}} <strong style="color: red;">Fails...</strong>. maneuver wasted. do NOT subtract mana.
{{/rollLess() total diff}}
{{#rollGreater() total diff}}
{{total}} <strong style="color: green;">Success</strong>, apply effect! Roll Dmg if necessary. Subtract {{cost}} mana.
<div class="sheet-rolltemplate-spacer"></div>
{{effect}}
{{/rollGreater() total diff}}
{{#rollTotal() total diff}}
{{total}} <strong style="color: green;">Success</strong>, apply effect! Roll Dmg if necessary. Subtract {{cost}} mana.
<div class="sheet-rolltemplate-spacer"></div>
{{effect}}
{{/rollTotal() total diff}}
{{/rollBetween() roll 2 19}}
</td>
</tr>
</table>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-rollhigh">
<table>
<tr>
<th>
{{name}} rolls for high!
</th>
</tr>
<tr>
<td>
<div class="sheet-rolltemplate-spacer"></div>
</td>
</tr>
<tr>
<td>
{{#rollBetween() roll 11 20}}
<strong style="color: green;">Nailed It!</strong> ({{roll}})
{{/rollBetween() roll 11 20}}
{{#rollBetween() roll 1 10}}
<strong style="color: red;">fail...</strong> ({{roll}})
{{/rollBetween() roll 1 10}}
<br>
p.s. high/lows cannot crit
</td>
</tr>
</table>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-rolllow">
<table>
<tr>
<th>
{{name}} rolls for low!
</th>
</tr>
<tr>
<td>
<div class="sheet-rolltemplate-spacer"></div>
</td>
</tr>
<tr>
<td>
{{#rollBetween() roll 11 20}}
<strong style="color: red;">fail...</strong> ({{roll}})
{{/rollBetween() roll 11 20}}
{{#rollBetween() roll 1 10}}
<strong style="color: green;">Nailed It!</strong> ({{roll}})
{{/rollBetween() roll 1 10}}
<br>
p.s. high/lows cannot crit
</td>
</tr>
</table>
</rolltemplate>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

+9
View File
@@ -0,0 +1,9 @@
{
"html": "Forge.html",
"css": "Forge.css",
"authors": "Ricky Martinez",
"roll20userid": "2029206",
"preview": "Forge.jpg",
"instructions": "**Forge Community Sheet**\nFull Rulebook at ForgeRPS.com\n1 of the easiest systems ever invented.\nStats are explained by hovering over them.\nAttacks/Armor are bought with character points.\nInventory slots are optional, but you should record what you have.\nEffects are the most complicated thing, but still simple, and replace magic in most systems.\nWhen creating an effect, make sure it only has 1 effect and decide the difficulty with the GM.\nAbilities are considered passives and are always active. Abilities are what make you special.",
"legacy": true
}