Fixes and Updates

1) Added Ship section that was missing from original sheet
2) Added flavor text for Ranged, Melee, and Psy attacks to make uniform
3) Various fixes to bad syntax/practices
4) Change to Degrees_Weapons to separate Psy from Weapon attacks
5) Added storage for Psy Rating used so it can be added to the damage roll
6) Added list option query to Psy Damage Roll asking to add Rating

Didn't see any issues created by changes that would impact current games using the sheet.  New Weapons API will be necessary to replace current or API will not execute.
This commit is contained in:
Dustin Spates
2021-10-30 16:52:57 -05:00
parent 67d242ea98
commit 12b34dd58a
7 changed files with 467 additions and 94 deletions
@@ -11,33 +11,72 @@
//Rolls a d100 and calculates the success or fail results to the chat window.
var Roll40k = Roll40k || (function(){
var rollResultForRoll40k = function (token, attribute, modifier) {
var roll = randomInteger(100);
var modTarget = parseInt(attribute) + parseInt(modifier);
var output1 = token + ' has a modified target of <B>' + modTarget + '</B> and rolled a <B>' + roll + '</B>. ';
var output2, degOfSuc;
//Form output message based on result
if (roll === 1) {
output2 = '<span style="color:green">' + token + ' rolled a 1 and automatically succeeds by <B>1 degree</B>.</span>';
}
else if (roll === 100) {
output2 = '<span style="color:red">' + token + ' rolled a 100 and automatically fails by <B>1 degree</B>.</span>';
}
else if (roll <= modTarget) {
degOfSuc = Math.floor((modTarget - roll) / 10) + 1;
output2 = '<span style="color:green">' + token + ' succeeds by <B>' + degOfSuc + ' degree(s)</B>.</span>';
}
else {
degOfSuc = Math.floor((roll - modTarget) / 10) + 1;
output2 = '<span style="color:red">' + token + ' fails by <B>' + degOfSuc + ' degree(s)</B></span>.';
}
//Return output
return output1 + '<br><br>' + output2;
},
processInlinerolls = function(msg) {
if (_.has(msg, 'inlinerolls')) {
return _.chain(msg.inlinerolls)
//Addition of tracking for used Psy Rating to use in flavor text and for Psy Damage roll if needed. Created by Oosh.
on('ready', () => {
const rxRoll = /^!roll40k\s/i;
const rxLabel = /(\d+)\[mymod\]/i;
on('chat:message', (msg) => {
if (rxRoll.test(msg.content) && msg.inlinerolls) {
let sender = msg.who.replace(/\(gm\)/i, '');
// Grab and verify data proceeding [mymod] is added.
reqRoll = msg.inlinerolls.find(r => rxLabel.test(r.expression));
if (!reqRoll) return /*sendChat('modifierBot', `/w "${sender}" Something went horribly wrong in reqRoll. Please reinstall universe.`)*/;
// Grab the query value and set to a variable.
psyU = reqRoll.expression.match(rxLabel)[1];
if (!psyU) return /*sendChat('modifierBot', `/w "${sender}" Something went horribly wrong in psyU. Please reinstall universe.`)*/;
// Grab the @{character_name} reference from the roll expression
let charName = msg.content.match(/^!roll40k\s+([^,]+)/i)[1];
let char = (findObjs({type: 'character', name: charName})||[])[0]
if (!char) return sendChat('modifierBot', `/w "${sender}" Something went horribly wrong. Please reinstall universe.`);
let charId = char.id;
// Update the attribute if it exists, or create it if it doesn't
let attr = (findObjs({type: 'attribute', characterid: charId, name: 'psyuse'})||[])[0];
if (!attr) createObj('attribute', {characterid: charId, name:'psyuse', current: psyU});
else attr.set({current: psyU});
}
});
var rollResultForRoll40k = function (token, attribute, modifier) {
var roll = randomInteger(100);
var modTarget = parseInt(attribute) + parseInt(modifier);
var output2 = token + ' has a modified target of <B>' + modTarget + '</B> and rolled a <B>' + roll + '</B>. ';
var output3, degOfSuc;
//Form output message based on result
if (roll === 1) {
degOfSuc = Math.floor((modTarget - roll) / 10) + 1;
output3 = '<span style="color:green">' + token + ' rolled a 1 and critically succeeds with <B>' + degOfSuc + ' degree(s)</B>!</span>';
}
else if (roll === 100) {
degOfSuc = Math.floor((roll - modTarget) / 10) + 1;
output3 = '<span style="color:red">' + token + ' rolled a 100 and critically fails with <B>' + degOfSuc + ' degree(s)</B>!</span>';
}
else if (roll <= modTarget) {
degOfSuc = Math.floor((modTarget - roll) / 10) + 1;
output3 = '<span style="color:#002e00">' + token + ' succeeds by <B>' + degOfSuc + ' degree(s)</B>.</span>';
}
else {
degOfSuc = Math.floor((roll - modTarget) / 10) + 1;
output3 = '<span style="color:#570000">' + token + ' fails by <B>' + degOfSuc + ' degree(s)</B></span>.';
}
//Return output: modified to have psy and non-psy output.
if (!reqRoll) {
log("weapon output");
return output2 + '<br><br>' + output3;
}else {
log("psy output");
var output1 = '<span style="color:#ad00ad">Psy Rating: ' + psyU + '</span>';
return output1 + '<br><br>' + output2 + '<br><br>' + output3;
}
},
processInlinerolls = function(msg) {
if (_.has(msg, 'inlinerolls')) {
return _.chain(msg.inlinerolls)
.reduce(function(previous, current, index) {
previous['$[[' + index + ']]'] = current.results.total || 0;
return previous;
@@ -46,27 +85,29 @@ var Roll40k = Roll40k || (function(){
return previous.replace(index, current);
}, msg.content)
.value();
} else {
return msg.content;
}
};
} else {
return msg.content;
}
};
/** Interpret the chat commands. **/
on('chat:message', function (msg) {
'use strict';
var cmdName = '!roll40k ';
if (msg.type === 'api' && msg.content.indexOf(cmdName) !== -1) {
let content = processInlinerolls(msg);
var paramArray = content.slice(cmdName.length).split(',');
if (paramArray.length !== 3) {
sendChat(msg.who, '/w ' + msg.who + ' You must specify three comma-separated ' +
'parameters for the !roll40k command.');
/** Interpret the chat commands. **/
on('chat:message', function (msg) {
'use strict';
var cmdName = '!roll40k ';
if (msg.type === 'api' && msg.content.indexOf(cmdName) !== -1) {
let content = processInlinerolls(msg);
var paramArray = content.slice(cmdName.length).split(',');
if (paramArray.length !== 3) {
sendChat(msg.who, '/w ' + msg.who + ' You must specify three comma-separated ' +
'parameters for the !roll40k command.');
}
else {
log("Success!");
var result = rollResultForRoll40k(paramArray[0].trim(),
paramArray[1].trim(), paramArray[2].trim());
sendChat(msg.who, result);
}
}
else {
var result = rollResultForRoll40k(paramArray[0].trim(),
paramArray[1].trim(), paramArray[2].trim());
sendChat(msg.who, result);
}
}
});
});
}())
@@ -13,7 +13,8 @@
.charsheet input.sheet-tab5:checked ~ div.sheet-section-journal,
.charsheet input.sheet-tab6:checked ~ div.sheet-section-vehicles,
.charsheet input.sheet-tab7:checked ~ div.sheet-section-psykana,
.charsheet input.sheet-tab8:checked ~ div.sheet-section-social {
.charsheet input.sheet-tab8:checked ~ div.sheet-section-social,
.charsheet input.sheet-tab9:checked ~ div.sheet-section-ship {
display: block;
}
@@ -63,6 +64,7 @@
.charsheet input.sheet-tab6:checked + span.sheet-tab6,
.charsheet input.sheet-tab7:checked + span.sheet-tab7,
.charsheet input.sheet-tab8:checked + span.sheet-tab8,
.charsheet input.sheet-tab9:checked + span.sheet-tab9,
.charsheet input.sheet-tab99:checked + span.sheet-tab99 {
background: #6d131b;
color: #eaeaea;
@@ -22,6 +22,9 @@
<input type="radio" class="sheet-tab sheet-tab8" name="attr_core-tab" value="8" title="Social" />
<span data-i18n="social-u" class="sheet-tab sheet-tab8" style="line-height: 40px;">Social</span>
<input type="radio" class="sheet-tab sheet-tab9" name="attr_core-tab" value="9" title="Ship" />
<span data-i18n="ship-u" class="sheet-tab sheet-tab9" style="line-height: 40px;">Ship</span>
<br><br>
<!-- End Main Tab setup -->
@@ -739,7 +742,7 @@
<!-- Strength (S) -->
<div class="sheet-2colrow">
<div class="sheet-col">
<button name="roll_S" type="roll" value="/em rolls strength: [[1d100]] Target: [[@{strength}+ ?{Modifier|0}]]."><span data-i18n="strength-(s)-u">Strength (S)</span></button>
<button name="roll_S" type="roll" value="/em rolls Strength: [[1d100]] Target: [[@{strength}+ ?{Modifier|0}]]."><span data-i18n="strength-(s)-u">Strength (S)</span></button>
</div>
<div class="sheet-col">
<div class="sheet-unnatural_box">
@@ -2721,7 +2724,7 @@
</div>
<br>
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Section separator"><!-- Divider -->
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Divider"><!-- Divider -->
<div class="sheet-2colrow">
<div class="sheet-fate"> <!-- Experience Totals -->
<br>
@@ -2782,7 +2785,7 @@
</div>
</fieldset>
<br>
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Section separator"><!-- Divider -->
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Divider"><!-- Divider -->
<div class="sheet-2colrow">
<!-- Left Column (Insanity and Corruption) -->
@@ -2899,7 +2902,7 @@
<div class="sheet-item" style="width:10%"><span data-i18n="personality-u">Personality:</span></div>
<div class="sheet-item" style="width:50%"><input name="attr_NPCPersonality" type="text"></div>
</div>
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Section separator"><!-- Divider -->
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Divider"><!-- Divider -->
<div class="sheet-2colrow">
<div class="sheet-col"><!--Left Column for individual NPC Profile-->
<br>
@@ -3423,7 +3426,7 @@
</div>
</div>
<!--Player entry for basic notes and journal keeping-->
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Section separator"> <!-- Divider -->
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Divider"> <!-- Divider -->
<h3 data-i18n="journal-entry-u">Journal Entry</h3>
<div>
<input style="font-size: 18pt; height: 35px;" align="middle" name="attr_JournalTitle" type="text">
@@ -3493,7 +3496,7 @@
<div class="sheet-item sheet-DHBtn" style="width: 33%; text-align: center;"><button name="roll_PsyniscienceCharacteristic" type="roll" value="!roll40k @{character_name}'s channelled Perception, @{PsyniscienceCharacteristic},[[(@{PsyRating} - ?{Psy Use?|1}) *10 + ?{Modifier|0}]]"> <span data-i18n="psyniscience-u">Psyniscience</span> </button></div>
</div>
<br>
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Section separator"><!-- Divider -->
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Divider"><!-- Divider -->
<h3 data-i18n="psychic-powers-u">Psychic Powers</h3>
<div class="sheet-2colrow">
<!-- Psychic Powers Left Column -->
@@ -3546,8 +3549,11 @@
<div class="sheet-item" style="width: 23%;"><input name="attr_PsyDamage" type="text" /></div>
<div class="sheet-item" style="width: 7%;"><span data-i18n="penetration-u">Pen:</span></div>
<div class="sheet-item" style="width: 23%;"><input name="attr_PsyPen" type="text" /></div>
<div class="sheet-item sheet-redbgns" style="width: 17%;"><button name="roll_PsyDamage" type="roll" value="/me does [[@{PsyDamage}]] damage! (Pen: @{PsyPen})"> <span data-i18n="damage-u">Damage</span> </button></div>
<div class="sheet-item sheet-redbgns" style="width: 15%;"><button name="roll_PsyHit" type="roll" value="!roll40k @{character_name}, ?{Focus Power Characteristic | Willpower,@{Willpower} | Perception,@{Perception} | Psyniscience,@{PsyniscienceCharacteristic}}, [[(@{PsyRating} - ?{Psy Use?|1}) *10 + ?{Modifier|0}]]"> <span data-i18n="hit-u">Hit</span> </button></div>
<div class="sheet-item sheet-redbgns" style="width: 17%;"><button name="roll_PsyDamage" type="roll" value="/me does [[@{PsyDamage} + ?{Use Rating? | Yes,@{psyuse} | No,0}]] damage! (Pen: @{PsyPen})"> <span data-i18n="damage-u">Damage</span> </button></div>
<div class="sheet-item sheet-redbgns" style="width: 15%;">
<button name="roll_PsyHit" type="roll" value="***@{character_name} attempts to Focus @{PsyName}!***
!roll40k @{character_name}, ?{Focus Power Characteristic | Willpower,@{Willpower} | Perception,@{Perception} | Psyniscience,@{PsyniscienceCharacteristic}}, [[(@{PsyRating} - ?{Psy Use?|1}[myMod]) *10 + ?{Modifier|0}]]"> <span data-i18n="hit-u">Hit</span> </button>
</div>
</div>
<div><textarea name="attr_PsyPowersEffectRe"></textarea></div>
</div>
@@ -3598,8 +3604,11 @@
<div class="sheet-item" style="width: 23%;"><input name="attr_PsyPowerDamageRi" type="text" /></div>
<div class="sheet-item" style="width: 7%;"><span data-i18n="penetration-u">Pen:</span></div>
<div class="sheet-item" style="width: 23%;"><input name="attr_PsyPenRi" type="text" /></div>
<div class="sheet-item sheet-redbgns" style="width: 17%;"><button name="roll_PsyDamageRi" type="roll" value="/me does [[@{PsyPowerDamageRi}]] damage! (Pen: @{PsyPenRi})"> <span data-i18n="damage-u">Damage</span> </button></div>
<div class="sheet-item sheet-redbgns" style="width: 15%;"><button name="roll_PsyHitRi" type="roll" value="!roll40k @{character_name}, ?{Focus Power Characteristic | Willpower,@{Willpower} | Perception,@{Perception} | Psyniscience,@{PsyniscienceCharacteristic}}, [[(@{PsyRating} - ?{Psy Use?|1}) *10 + ?{Modifier|0}]]"> <span data-i18n="hit-u">Hit</span> </button></div>
<div class="sheet-item sheet-redbgns" style="width: 17%;"><button name="roll_PsyDamageRi" type="roll" value="/me does [[@{PsyPowerDamageRi} + ?{Use Rating? | Yes,@{psyuse} | No,0}]] damage! (Pen: @{PsyPenRi})"> <span data-i18n="damage-u">Damage</span> </button></div>
<div class="sheet-item sheet-redbgns" style="width: 15%;">
<button name="roll_PsyHitRi" type="roll" value="***@{character_name} attempts to Focus @{PsyNameRi}!***
!roll40k @{character_name}, ?{Focus Power Characteristic | Willpower,@{Willpower} | Perception,@{Perception} | Psyniscience,@{PsyniscienceCharacteristic}}, [[(@{PsyRating} - ?{Psy Use?|1}[myMod]) *10 + ?{Modifier|0}]]"> <span data-i18n="hit-u">Hit</span> </button>
</div>
</div>
<div>
<textarea name="attr_PsyPowersEffectRI"></textarea>
@@ -3672,9 +3681,11 @@
<div class="sheet-row">
<div class="sheet-item" style="width: 15%;"><span data-i18n="special-u">Special:</span></div>
<div class="sheet-item" style="width: 76%;"><input name="attr_Rangedweaponspecial" type="text" /></div>
<div class="sheet-item sheet-redbgns" style="width: 9%;"><button name="roll_Rangedhit" type="roll" value="***@{character_name} fires @{rangedweaponname}!***
<div class="sheet-item sheet-redbgns" style="width: 9%;">
<button name="roll_Rangedhit" type="roll" value="***@{character_name} fires @{rangedweaponname}!***
!roll40k @{character_name}, @{BallisticSkill}, [[(?{Aim | Half aim (+10),+10| No aim (+0),+0 | Full aim (+20),+20} + ?{Range | Point Blank (+30),+30 | Short Range (+10),+10 | Standard range (+0),+0 | Long Range (-10),-10 | Extreme Range (-30),-30} + ?{Rate of Fire/Attack Type|Standard (+10),+10 | Semi auto (+0),+0 | Full Auto (-10),-10 | Called Shot (-20),-20 | Suppressing Fire (-20),-20} + ?{Modifier|0})]]
!ammo @{character_id} repeating_Rangedweapons_@{my_hidden_row_id}_Rangedweaponclip [[?{Ammo?|Single,-1|Semi-Auto,-@{Rangedweaponsemi}|Full Auto,-@{Rangedweaponfull}}*?{Firing Mode?|Normal,1|Overcharge,2|Maximal,3|Overload,4}]]"> <span data-i18n="hit-u">Hit</span> </button></div>
!ammo @{character_id} repeating_Rangedweapons_@{my_hidden_row_id}_Rangedweaponclip [[?{Ammo?|Single,-1|Semi-Auto,-@{Rangedweaponsemi}|Full Auto,-@{Rangedweaponfull}}*?{Firing Mode?|Normal,1|Overcharge,2|Maximal,3|Overload,4}]]"> <span data-i18n="hit-u">Hit</span> </button>
</div>
</div>
</div>
</fieldset>
@@ -3712,7 +3723,10 @@
<div class="sheet-row">
<div class="sheet-item" style="width: 15%;"><span data-i18n="special-u">Special:</span></div>
<div class="sheet-item" style="width: 76%;"><input name="attr_meleeweaponspecial" type="text" /> </div>
<div class="sheet-item sheet-redbgns" style="width: 9%;"><button name="roll_meleehit" type="roll" value="!roll40k @{character_name}, @{WeaponSkill}, [[(?{Aim | Half aim (+10),+10| No aim (+0),+0| Full aim (+20),+20} + ?{Attack Type | All out (+30),+30| Charge (+20),+20| Standard (+10),+10| Swift Attack (+0),+0| Lighting (-10),-10} + ?{Modifier|0})]]"> <span data-i18n="hit-u">Hit</span> </button></div>
<div class="sheet-item sheet-redbgns" style="width: 9%;">
<button name="roll_meleehit" type="roll" value="***@{character_name} attacks with @{meleeweaponname}!***
!roll40k @{character_name}, @{WeaponSkill}, [[(?{Aim | Half aim (+10),+10| No aim (+0),+0| Full aim (+20),+20} + ?{Attack Type | All out (+30),+30| Charge (+20),+20| Standard (+10),+10| Swift Attack (+0),+0| Lighting (-10),-10} + ?{Modifier|0})]]"> <span data-i18n="hit-u">Hit</span> </button>
</div>
</div>
</div>
</fieldset>
@@ -3877,7 +3891,7 @@
</div>
</div>
</div>
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Section separator">
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Divider">
<div class="sheet-2colrow">
<!--Left Column: Backpack Items-->
<div class="sheet-col">
@@ -3952,6 +3966,331 @@
</div>
</div>
<!-- Shipsheet begin -->
<div class="sheet-section-ship">
<div class="sheet-wrapper">
<div style="width:100%;text-align:center">
<div class="sheet-col" style="width:100%">
<input name="attr_ShipName" type="text" style="height:50px;font-size:30px; font-weight:bold; text-align:center;width:100%" placeholder="Ship Name" />
</div>
</div>
<br>
<div class="sheet-2colrow">
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 12%;"><label>Hull:</label></div>
<div class="sheet-item" style="width: 88%;"><input name="attr_ShipHull" type="text" /></div>
</div>
<div class="sheet-2colrow">
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 22%;"><label>Speed:</label></div>
<div class="sheet-item" style="width: 78%;"><input name="attr_ShipSpeed" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 54%;"><label>Manoeuvrability:</label></div>
<div class="sheet-item" style="width: 46%;"><input name="attr_ShipManoeuvrability" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 38%;"><label>Detection:</label></div>
<div class="sheet-item" style="width: 62%;"><input name="attr_ShipDetection" type="text" /></div>
</div>
</div>
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 28%;"><label>Shields:</label></div>
<div class="sheet-item" style="width: 34%;"><input name="attr_ShipShields1" type="text" /></div>
<div class="sheet-item" style="width: 4%;"><label>/</label></div>
<div class="sheet-item" style="width: 34%;"><input name="attr_ShipShields2" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 28%;"><label>Armour:</label></div>
<div class="sheet-item" style="width: 72%;"><input name="attr_ShipArmour" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 50%;"><label>Hull Integrity:</label></div>
<div class="sheet-item" style="width: 23%;"><input name="attr_ShipIntegrity1" type="text" /></div>
<div class="sheet-item" style="width: 4%;"><label>/</label></div>
<div class="sheet-item" style="width: 23%;"><input name="attr_ShipIntegrity2" type="text" /></div>
</div>
</div>
</div>
</div>
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 12%;"><label>Class:</label></div>
<div class="sheet-item" style="width: 58%;"><input name="attr_ShipClass" type="text" /></div>
<div class="sheet-item" style="width: 22%;"><label>Turn Rating:</label></div>
<div class="sheet-item" style="width: 8%;"><input name="attr_ShipTurnRating" type="text" /></div>
</div>
<div class="sheet-2colrow">
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 80%;"><button name="roll_CR" type="roll" value="/em rolls Crew Rating: [[1d100]] Target: [[@{ShipCrewRating} + [[?{Modifier|0}]]]]."><label>Crew Rating</label></button></div>
<div class="sheet-item" style="width: 20%;"><input name="attr_ShipCrewRating" type="number" value="0"></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 80%;"><label>Unnatural Crew Rating:</label></div>
<div class="sheet-item" style="width: 20%;"><input name="attr_ShipUnCrewRating" type="number" value="0"></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 50%;"><label>Turret Rating:</label></div>
<div class="sheet-item" style="width: 50%;"><input name="attr_ShipTurretRating" type="text" /></div>
</div>
</div>
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 34%;"></div>
<div class="sheet-item" style="width: 33%;"><label>Current:</label></div>
<div class="sheet-item" style="width: 33%;"><label>Max:</label></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 28%;"><label>Crew:</label></div>
<div class="sheet-item" style="width: 34%;"><input name="attr_ShipCrew1" type="text" /></div>
<div class="sheet-item" style="width: 4%;"><label>/</label></div>
<div class="sheet-item" style="width: 34%;"><input name="attr_ShipCrew2" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 28%;"><label>Morale:</label></div>
<div class="sheet-item" style="width: 34%;"><input name="attr_ShipMoral1" type="text" /></div>
<div class="sheet-item" style="width: 4%;"><label>/</label></div>
<div class="sheet-item" style="width: 34%;"><input name="attr_ShipMoral2" type="text" /></div>
</div>
</div>
</div>
</div>
</div>
<div class="sheet-2colrow">
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-2colrow">
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 60%;"><label>Power Max:</label></div>
<div class="sheet-item" style="width: 40%;"><input name="attr_ShipPowerMax" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 60%;"><label>Power Used:</label></div>
<div class="sheet-item" style="width: 40%;"><input disabled="true" name="attr_ShipPowerUsed" type="text" value="@{ShipSupplementalComponentsPowerTotal} + @{ShipEssentialComponentsPowerTotal}"/></div>
</div>
</div>
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 60%;"><label>Space Max:</label></div>
<div class="sheet-item" style="width: 40%;"><input name="attr_ShipSpaceMax" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 60%;"><label>Space Used:</label></div>
<div class="sheet-item" style="width: 40%;" ><input disabled="true" name="attr_ShipSpaceUsed" type="text" value="@{ShipSupplementalComponentsSpaceTotal} + @{ShipEssentialComponentsSpaceTotal}"/></div>
</div>
</div>
</div>
</div>
<div class="sheet-col sheet-col2" style="width:100%">
<div class="sheet-row">
<div class="sheet-item" style="width: 34%;"><label>Weapon Capacity:</label></div>
<div class="sheet-item" style="width: 12%;"><label>Dorsal:</label></div>
<div class="sheet-item" style="width: 10%;"><input name="attr_ShipWeaponDorsal" type="text" /></div>
<div class="sheet-item" style="width: 12%;"><label>Prow:</label></div>
<div class="sheet-item" style="width: 10%;"><input name="attr_ShipWeaponProw" type="text" /></div>
<div class="sheet-item" style="width: 12%;"><label>Keel:</label></div>
<div class="sheet-item" style="width: 10%;"><input name="attr_ShipWeaponKeel" type="text" /></div>
</div>
<div class="sheet-row">
<div class="sheet-item" style="width: 34%;"><label></label></div>
<div class="sheet-item" style="width: 12%;"><label>Port:</label></div>
<div class="sheet-item" style="width: 10%;"><input name="attr_ShipWeaponPort" type="text" /></div>
<div class="sheet-item" style="width: 18%;"><label>Starboard:</label></div>
<div class="sheet-item" style="width: 10%;"><input name="attr_ShipWeaponStarboard" type="text" /></div>
</div>
</div>
</div>
<br>
<div style="width:100%">
<h3>Weapons Components</h3>
<fieldset class="repeating_ShipWeapons" name="attr_repeating_ShipWeapons">
<table style="width:100%">
<tr>
<td style="width:30%">
<h2 style="width:100%;text-align:center">Name</h2>
</td>
<td style="width:11%">
<h2 style="width:100%;text-align:center">Type</h2>
</td>
<td style="width:8%">
<h2 style="width:100%;text-align:center">Strength</h2>
</td>
<td style="width:7%">
<h2 style="width:100%;text-align:center">Crit</h2>
</td>
<td style="width:10%">
<h2 style="width:100%;text-align:center">Damage</h2>
</td>
<td style="width:7%">
<h2 style="width:100%;text-align:center">Range</h2>
</td>
<td style="width:15%">
<h2 style="width:100%;text-align:center">Location</h2>
</td>
<td style="width:5%">
</td>
</tr>
</table>
<div style="width:100%">
<div class="sheet-item" style="width:30%; text-align:center">
<input type="text" name="attr_ShipWeaponsName" style="width:100%;text-align:center" />
</div>
<div class="sheet-item" style="width:15%; text-align:center">
<select name="attr_ShipWeaponsType" style="height:25px; width:100%" class="sheet-input-selectbox">
<option value="0" >Unknown</option>
<option value="1" selected>Macro Battery</option>
<option value="2">Lance</option>
<option value="3">Bay</option>
<option value="4">Torpedoes</option>
</select>
</div>
<div class="sheet-item" style="width:8%; text-align:center">
<input type="text" name="attr_ShipWeaponsStrength" />
</div>
<div class="sheet-item" style="width:7%; text-align:center">
<input type="text" name="attr_ShipWeaponsCrit" />
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<input type="text" name="attr_ShipWeaponsDamage" />
</div>
<div class="sheet-item" style="width:15px;">
<button type="roll" name="roll_shipDamage" value="/me attacks with @{ShipName}'s weapon @{ShipWeaponsName}! Damage: [[ @{ShipWeaponsDamage} + [[?{Modifier|0}]] ]].">
<label>R</label>
</button>
</div>
<div class="sheet-item" style="width:15%; text-align:center">
<input type="text" name="attr_ShipWeaponsRange" />
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<select name="attr_ShipWeaponsLocation" style="height:25px; width:100%" class="sheet-input-selectbox">
<option value="0">Unknown</option>
<option value="1" selected>Dorsal</option>
<option value="2">Prow</option>
<option value="3">Keel</option>
<option value="4">Port</option>
<option value="5">Starboard</option>
</select>
</div>
<div class="sheet-body">
<textarea name="attr_ShipWeaponsdesc" ></textarea>
</div>
</div>
</fieldset>
</div>
<div class="sheet-2colrow">
<!-- left col -->
<div class="sheet-col sheet-col2" style="width:100%">
<input type="hidden" name="attr_ShipEssentialComponentsPowerTotal" value="0">
<input type="hidden" name="attr_ShipEssentialComponentsSpaceTotal" value="0">
<h3>Essential Components</h3>
<fieldset class="repeating_ShipEssentialComponents" name="attr_repeating_ShipEssentialComponents">
<table style="width:100%">
<tr>
<td style="width:60%">
<h2 style="width:100%;text-align:center">Name</h2>
</td>
<td style="width:10%">
<h2 style="width:100%;text-align:center">Power</h2>
</td>
<td style="width:10%">
<h2 style="width:100%;text-align:center">Space</h2>
</td>
<td style="width:10%">
<h2 style="width:100%;text-align:center">SP</h2>
</td>
<td style="width:10%">
</td>
</tr>
</table>
<div style="width:100%">
<div class="sheet-item" style="width:60%"><input type="text" name="attr_ShipEssentialComponentName" style="width:100%;text-align:left" />
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<input type="number" name="attr_ShipEssentialComponentPower" value="0"/>
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<input type="number" name="attr_ShipEssentialComponentSpace" value="0" />
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<input type="text" name="attr_ShipEssentialComponentSP" />
</div>
<div class="sheet-body">
<textarea name="attr_ShipEssentialComponentsdesc" ></textarea>
</div>
</div>
</fieldset>
</div>
<!-- right col -->
<div class="sheet-col sheet-col2">
<h3>Supplemental Components</h3>
<input type="hidden" name="attr_ShipSupplementalComponentsPowerTotal" value="0">
<input type="hidden" name="attr_ShipSupplementalComponentsSpaceTotal" value="0">
<fieldset class="repeating_ShipSupplementalComponents" name="attr_repeating_ShipSupplementalComponents">
<table style="width:100%">
<tr>
<td style="width:60%"><h2 style="width:100%;text-align:center">Name</h2>
</td>
<td style="width:10%"><h2 style="width:100%;text-align:center">Power</h2>
</td>
<td style="width:10%"><h2 style="width:100%;text-align:center">Space</h2>
</td>
<td style="width:10%"><h2 style="width:100%;text-align:center">SP</h2>
</td>
<td style="width:10%"></td>
</tr>
</table>
<div style="width:100%">
<div class="sheet-item" style="width:60%">
<input type="text" name="attr_ShipSupplementalComponentName"/>
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<input type="number" name="attr_ShipSupplementalComponentPower" value="0" />
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<input type="number" name="attr_ShipSupplementalComponentSpace" value="0" />
</div>
<div class="sheet-item" style="width:10%; text-align:center">
<input type="text" name="attr_ShipSupplementalComponentSP" />
</div>
<div class="sheet-body">
<textarea name="attr_ShipSupplementalComponentsdesc"></textarea>
</div>
</div>
</fieldset>
</div>
</div>
<br>
<div>
<h3>Complications/Past History</h3>
<textarea name="attr_ShipComplications" style="width:95%"></textarea>
</div>
<br>
<div>
<h3>Skill Modifiers</h3>
<textarea name="attr_ShipSkillModifiers" style="width:95%"></textarea>
</div>
<br>
<div>
<h3>Special Actions</h3>
<textarea name="attr_ShipSpecialActions" style="width:95%"></textarea>
</div>
<div>
<h3>Notes</h3>
<textarea name="attr_ShipNotes" style="width:95%"></textarea>
</div>
</div>
</div>
<!-- Social Tab -->
<div class="sheet-section-social sheet-watermark">
<!-- This section contains Social and Influence Related entries -->
@@ -4029,7 +4368,7 @@
</div>
</div>
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Section separator"><!-- Divider, seperates tabs from permenant space-->
<img src="http://i.imgur.com/TKfHnQ9.png" alt="Divider"><!-- Divider, seperates tabs from permenant space-->
</div>
@@ -4038,14 +4377,14 @@
<rolltemplate class="sheet-rolltemplate-darkheresy2">
<table >
<tr><th>{{name}}</th></tr>
<td><img src="http://i.imgur.com/g1SVcwZ.png" alt="Section separator" height="100%" width="auto" max-width="100px"></td>
<td><img src="http://i.imgur.com/g1SVcwZ.png" alt="Divider" height="100%" width="auto" max-width="100px"></td>
<tr><td><span class="tcat">{{dhdescription}} </span> </td></tr>
</table>
</rolltemplate>
<rolltemplate class="sheet-rolltemplate-scattergram">
<table >
<tr><th data-i18n="scatter-diagram-u">Scatter Diagram</th></tr>
<td><img src="http://i.imgur.com/g1SVcwZ.png" alt="Section separator" height="100%" width="auto" max-width="100px"></td>
<td><img src="http://i.imgur.com/g1SVcwZ.png" alt="Divider" height="100%" width="auto" max-width="100px"></td>
<tr><td><span class="tcat"><img src="http://i.imgur.com/3Tvp7Ay.png" alt="Scatter Diagram"></span> </td></tr>
</table>
</rolltemplate>
@@ -4151,17 +4490,15 @@ on('change:strength change:toughness sheet:opened',function()
});
});
/*on('change:repeating_ShipEssentialComponents',function(){
TAS.repeatingSimpleSum('ShipEssentialComponents','ShipEssentialComponentPower','ShipEssentialComponentsPowerTotal');
on('change:repeating_ShipEssentialComponents change:repeating_ShipSupplementalComponents sheet:opened', function()
{
/* Finds total power for ship based off usage from Essential and Supplemental Components */
repeatingSum('ShipEssentialComponentsPowerTotal','ShipEssentialComponents','ShipEssentialComponentPower');
repeatingSum('ShipSupplementalComponentsPowerTotal','ShipSupplementalComponents','ShipSupplementalComponentPower');
/* Finds total space for ship based off usage from Eseential and Supplemental Components */
repeatingSum('ShipEssentialComponentsSpaceTotal','ShipEssentialComponents','ShipEssentialComponentSpace');
repeatingSum('ShipSupplementalComponentsSpaceTotal','ShipSupplementalComponents','ShipSupplementalComponentSpace');
});
on('change:repeating_ShipSupplementalComponents',function(){
TAS.repeatingSimpleSum('ShipSupplementalComponents','ShipSupplementalComponentPower','ShipSupplementalComponentsPowerTotal');
});
on('change:repeating_ShipEssentialComponents',function(){
TAS.repeatingSimpleSum('ShipEssentialComponents','ShipEssentialComponentSpace','ShipEssentialComponentsSpaceTotal');
});
on('change:repeating_ShipSupplementalComponents',function(){
TAS.repeatingSimpleSum('ShipSupplementalComponents','ShipSupplementalComponentSpace','ShipSupplementalComponentsSpaceTotal');
});
*/
</script>
+7 -7
View File
@@ -17,12 +17,12 @@ o Gear
o Backpack/Vest
o Stored Gear
> Gear Calculations: All calculations are done for you regarding Gear now. The information is also displayed so that you can verify that it is working correctly, these calculations include:
o Finding Strength and Toughness Bonus and adding them together ( SB+TB: )
o Using the SB+TB modifier to give your character’s starting weight ( Base: )
o Location to insert Backpack/Vest weight bonuses ( Pack Bonus: | Vest Bonus: )
o Adding up the different sections’ total weight ( Pack Weight: | Total Stored Weight: | Total Weight: )
o Character’s maximum carry weight ( Max: )
o Remaining weight before being encumbered ( Available: )
o Finding Strength and Toughness Bonus and adding them together (SB+TB:)
o Using the SB+TB modifier to give your character’s starting weight (Base:)
o Location to insert Backpack/Vest weight bonuses (Pack Bonus: | Vest Bonus:)
o Adding up the different sections’ total weight (Pack Weight: | Total Stored Weight: | Total Weight:)
o Character’s maximum carry weight (Max:)
o Remaining weight before being encumbered (Available:)
If you have ides for changes or need something fixed in the DH2E Advanced Character Sheet you are welcome to DM Dustin S on Roll20
If you have ideas for changes or need something fixed in the DH2E Advanced Character Sheet you are welcome to DM Dustin S on Roll20
> Dustin S. | Roll20: Online virtual tabletop
@@ -7,6 +7,7 @@
"vehicles-u":"Vehicles",
"psykana-u":"Psykana",
"social-u":"Social",
"ship-u":"Ship",
"character-name-u":"Character Name:",
"home-world-u":"Home World:",
"homeworlds-u":"Homeworlds",
@@ -437,10 +438,10 @@
"lost-foot-u":"Lost Foot",
"lost-leg-u":"Lost Leg",
"cybernetic-modifiers-u":"Cybernetics Modifiers",
"bionic-left-arm-u":"Bionic Arm (left): ",
"bionic-left-arm-u":"Bionic Arm (Left): ",
"bionic-right-arm-u":"Bionic Arm (Right): ",
"machine-trait-u":"Machine Trait: ",
"left-leg-bionic-u":"Bionic Leg Toughness Bonus(left): ",
"left-leg-bionic-u":"Bionic Leg (Left): ",
"right-leg-bionic-u":"Bionic Leg (Right): ",
"special-abilities-u":"Special Abilities",
"skills-u":"Skills",
Binary file not shown.
@@ -1,8 +0,0 @@
This is an Advanced character sheet for the Dark Heresy 2nd Edition role-playing game. It differs greatly from the standard character sheet available and utilizes API scripts to accurately (and correctly) provide dice rolls measuring Degrees of Success and Degrees of Failure. It has been redesigned to include a multitude of differing features and organizations.
The changes include tabbed divisions for organization, repeatable fields added to gear items, cybernetics, psychic powers, skills and talents, provided an 'Other skill' field for overflow of Trade/Lore/Specializations of Operate, and built-in macros for variable initiative rolls.
Note: The following API Scripts must be utilized in your API console for this sheet to work properly;
- DH Degrees of Success for Skill by Jack D: https://github.com/Roll20/roll20-character-sheets/blob/master/Dark%20Heresy%20Advanced%202nd%20Edition/API%20Scripts/DH_Degrees_Skills.js
- DH Degrees of Success for Weapons by Jack D: https://github.com/Roll20/roll20-character-sheets/blob/master/Dark%20Heresy%20Advanced%202nd%20Edition/API%20Scripts/DH_Degrees_Weapons.js
- Ammo Count by Aaron C. Meadow: https://github.com/shdwjk/Roll20API/blob/master/Ammo/Ammo.js