mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 03:40:32 +00:00
Merge pull request #15018 from Mongoose-Publishing/master
[Mongoose Traveller 2e Official] - Version 1.1.14 - Minor Ship Combat Tab Changes
This commit is contained in:
@@ -33,6 +33,7 @@ p {
|
||||
background-color: #ededed;
|
||||
font-family: "Rationale", sans-serif;
|
||||
font-size: 1.2em !important;
|
||||
min-width: 825px;
|
||||
}
|
||||
|
||||
/* Tabs */
|
||||
|
||||
+91
-47
@@ -7968,7 +7968,8 @@
|
||||
Hits</h5>
|
||||
<h5>
|
||||
Speed</h5>
|
||||
<input type="text" class="sheet-input" name="attr_animal_name"/>
|
||||
<input type="hidden" class="sheet-input" name="attr_animal_name"/>
|
||||
<input type="text" class="sheet-input" name="attr_character_name"/>
|
||||
<input type="number" class="sheet-input" name="attr_animal_hits" value="0"/>
|
||||
<span><input type="number" class="sheet-input" name="attr_animal_speed" value="0"/>m</span>
|
||||
</div>
|
||||
@@ -10631,8 +10632,8 @@
|
||||
<button class="sheet-laf-initbutton btn ui-draggable sheet-wide-button"
|
||||
style="background-color: lightcyan;"
|
||||
type="roll" name="roll_initiative"
|
||||
value="@{whispertoggle} &{template:skill-general-alt} {{skill=^{initiative-u}}} {{character= @{character_name} }} @{ro_default_rolltype_nodiff}+@{shipthrust}+@{ship_pilotmod}+@{initiative_effect}+@{ship_pilotcustom}+@{ship_pilotpenalty} @{ro_default_mod} &{tracker}]]}}">
|
||||
Roll Initiative (Uses Max Thrust + Pilot Skill + Ship DM + Temp DM)
|
||||
value="@{whispertoggle} &{template:skill-general-alt} {{skill=^{initiative-u}}} {{character= @{character_name} }} @{ro_default_rolltype_nodiff}+@{shipthrust}+@{ship_pilotmod}+@{initiative_effect}+@{ship_pilotdex}+@{ship_pilotcustom}+@{ship_pilotpenalty} @{ro_default_mod} &{tracker}]]}}">
|
||||
Roll Initiative (Uses Available Thrust + Pilot Skill + Charac. Mod + Ship DM + Temp DM)
|
||||
</button>
|
||||
</div>
|
||||
<br>
|
||||
@@ -10641,7 +10642,7 @@
|
||||
<!-- Default Skills -->
|
||||
<div class="sheet-laf-centredgrid sheet-laf-ship-combat-skills">
|
||||
<h4>Pilot Skill</h4>
|
||||
<span data-i18n="dexmod-u">DEX Mod</span>
|
||||
<span data-i18n="characteristicmod-u">Characteristic Mod</span>
|
||||
<span>Ship DM</span>
|
||||
<span>Temp DM</span>
|
||||
<span data-i18n="roll-u">Roll</span>
|
||||
@@ -11188,22 +11189,34 @@
|
||||
</h5>
|
||||
<br>
|
||||
<span class="sheet-redbold-noborder" name="attr_shipweapon_error"></span>
|
||||
<div class="sheet-laf-centredgrid sheet-laf-ship-hardpoint sheet-laf-ship-hardpoint-abs">
|
||||
<span data-i18n="hardpoint-u">Hardpoint</span>
|
||||
<span data-i18n="type-u">Type</span>
|
||||
<span data-i18n="shiptl-u">TL</span>
|
||||
<span data-i18n="skilltablepower-u">Power</span>
|
||||
<span data-i18n="weaponrange-u">Range</span>
|
||||
<span data-i18n="shipammunition-u">Ammo</span>
|
||||
<span data-i18n="damage-u">Damage</span>
|
||||
<span data-i18n="traits-u">Traits</span>
|
||||
<span data-i18n="skilltabledicemodifier-u">DM</span>
|
||||
<span>#</span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
<!-- <div class="sheet-laf-centredgrid sheet-laf-ship-hardpoint sheet-laf-ship-hardpoint-abs">-->
|
||||
<!-- <span data-i18n="hardpoint-u">Hardpoint</span>-->
|
||||
<!-- <span data-i18n="type-u">Type</span>-->
|
||||
<!-- <span data-i18n="shiptl-u">TL</span>-->
|
||||
<!-- <span data-i18n="skilltablepower-u">Power</span>-->
|
||||
<!-- <span data-i18n="weaponrange-u">Range</span>-->
|
||||
<!-- <span data-i18n="shipammunition-u">Ammo</span>-->
|
||||
<!-- <span data-i18n="damage-u">Damage</span>-->
|
||||
<!-- <span data-i18n="traits-u">Traits</span>-->
|
||||
<!-- <span data-i18n="skilltabledicemodifier-u">DM</span>-->
|
||||
<!-- <span>#</span>-->
|
||||
<!-- <span></span>-->
|
||||
<!-- <span></span>-->
|
||||
<!-- </div>-->
|
||||
<fieldset class="repeating_shipweapon">
|
||||
<div class="sheet-laf-centredgrid sheet-laf-ship-hardpoint">
|
||||
<span data-i18n="hardpoint-u">Hardpoint</span>
|
||||
<span data-i18n="type-u">Type</span>
|
||||
<span data-i18n="shiptl-u">TL</span>
|
||||
<span data-i18n="skilltablepower-u">Power</span>
|
||||
<span data-i18n="weaponrange-u">Range</span>
|
||||
<span data-i18n="shipammunition-u">Ammo</span>
|
||||
<span data-i18n="damage-u">Damage</span>
|
||||
<span data-i18n="traits-u">Traits</span>
|
||||
<span data-i18n="skilltabledicemodifier-u">DM</span>
|
||||
<span>#</span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
<input class="sheet-laf-ship-traitstext sheet-redbold" type="text" min="0"
|
||||
name="attr_w_hardpoint_name">
|
||||
<input class="sheet-redbold" type="text" name="attr_w_type">
|
||||
@@ -13008,7 +13021,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="sheet-tab-content sheet-help">
|
||||
<h3>Character Sheet Version 1.1.13</h3>
|
||||
<h3>Character Sheet Version 1.1.14</h3>
|
||||
<br>
|
||||
<h4>Assigning Attributes To Tokens</h4>
|
||||
<p style="margin-left: 10px; margin-top: 5px;">To represent the core character attributes on a token so they can be
|
||||
@@ -19520,7 +19533,7 @@
|
||||
attrs.animal_name = compendiumData["data-Name"];
|
||||
attrs.character_name = compendiumData["data-Name"];
|
||||
attrs.animal_hits = compendiumData["Hits"];
|
||||
attrs.animal_speed = compendiumData["Speed"];
|
||||
attrs.animal_speed = compendiumData["Speed"].replace('m', '');
|
||||
|
||||
console.log("- Processing animal skills: " + compendiumData["Skills"]);
|
||||
|
||||
@@ -19528,16 +19541,18 @@
|
||||
removeRepeatingRows("repeating_animalskills");
|
||||
// Bit hacky but sometimes we have 'Athletics (endurance)+2' so want to space out the mod for parsing
|
||||
let skills = compendiumData["Skills"].replace(")+", ") +").replace(")-", ") -").split(",");
|
||||
console.log("- Skills- " + skills);
|
||||
console.log("- Skills: " + skills);
|
||||
skills.forEach((skill, index) => {
|
||||
console.log("- Skill: " + skill);
|
||||
let skillRec = skill.trim().split(" ");
|
||||
let mod = skillRec.pop().replace("+", "");
|
||||
let skillName = skillRec.join(" ");
|
||||
if(skill.trim() !== "None" && skill.trim() !== "") {
|
||||
console.log("- Skill: " + skill);
|
||||
let skillRec = skill.trim().split(" ");
|
||||
let mod = skillRec.pop().replace("+", "");
|
||||
let skillName = skillRec.join(" ");
|
||||
|
||||
let slotId = generateRowID();
|
||||
attrs["repeating_animalskills_" + slotId + "_name"] = skillName;
|
||||
attrs["repeating_animalskills_" + slotId + "_mod"] = mod;
|
||||
let slotId = generateRowID();
|
||||
attrs["repeating_animalskills_" + slotId + "_name"] = skillName;
|
||||
attrs["repeating_animalskills_" + slotId + "_mod"] = mod;
|
||||
}
|
||||
});
|
||||
|
||||
// Process attacks (repeating)
|
||||
@@ -19547,14 +19562,39 @@
|
||||
let attacks = compendiumData["Attacks"].split(",");
|
||||
console.log("- Attacks: " + attacks);
|
||||
attacks.forEach((attack, index) => {
|
||||
console.log("- Attack: " + attack);
|
||||
let attackRec = attack.trim().split(" ");
|
||||
let damage = attackRec.pop().replace(")", "").replace("(", "");
|
||||
let attackName = attackRec.join(" ");
|
||||
if(attack.trim() !== "None" && attack.trim() !== "") {
|
||||
console.log("- Attack: " + attack);
|
||||
|
||||
let slotId = generateRowID();
|
||||
attrs["repeating_animalattacks_" + slotId + "_name"] = attackName;
|
||||
attrs["repeating_animalattacks_" + slotId + "_damage"] = damage.replace("D", "D6");
|
||||
// Check if we have damage and parse out
|
||||
let attackName = attack;
|
||||
let damage;
|
||||
|
||||
// On very rare occasions we may get damage as e.g. 1Dx1D or 1D6x1D6, process this first
|
||||
let match = /(\d+D6x\d+D6|\d+Dx\d+D)/.exec(attack);
|
||||
|
||||
if(match) {
|
||||
damage = match[1].replace("D6", "D").replace("x", "*");
|
||||
attackName = attackName.replace(match[0], "").replace(" ", " ").replace("()", "").replace("( ", "(").trim();
|
||||
}
|
||||
else {
|
||||
// Normal damage
|
||||
match = /(\d+D6|\d+D3|\d+D)/.exec(attack);
|
||||
|
||||
damage = match ? match[1] : undefined;
|
||||
if(!damage) {
|
||||
damage = "";
|
||||
}
|
||||
else {
|
||||
// Sometimes we have e.g. 2D, sometimes 2D6, we replace below so remove now
|
||||
damage = damage.replace("D6", "D");
|
||||
attackName = attackName.replace(match[0], "").replace(" ", " ").replace("()", "").replace("( ", "(").trim();
|
||||
}
|
||||
}
|
||||
|
||||
let slotId = generateRowID();
|
||||
attrs["repeating_animalattacks_" + slotId + "_name"] = attackName.trim();
|
||||
attrs["repeating_animalattacks_" + slotId + "_damage"] = damage.replace(/D$/, "D6").trim();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19563,18 +19603,20 @@
|
||||
|
||||
let traits = compendiumData["Traits"].split(",");
|
||||
traits.forEach((trait, index) => {
|
||||
let traitRec = trait.trim();
|
||||
let mod = "";
|
||||
let traitArr = traitRec.split(" ");
|
||||
if(traitRec.endsWith(")")) {
|
||||
// Has a modifier
|
||||
mod = traitArr.pop().replace(")", "").replace("(", "");
|
||||
}
|
||||
let traitName = traitArr.join(" ");
|
||||
if(trait !== "None") {
|
||||
let traitRec = trait.trim();
|
||||
let mod = "";
|
||||
let traitArr = traitRec.split(" ");
|
||||
if(traitRec.endsWith(")") || /\d/.test(traitRec)) {
|
||||
// Has a modifier
|
||||
mod = traitArr.pop().replace(")", "").replace("(", "");
|
||||
}
|
||||
let traitName = traitArr.join(" ");
|
||||
|
||||
let slotId = generateRowID();
|
||||
attrs["repeating_animaltraits_" + slotId + "_animaltraits-trait"] = traitName;
|
||||
attrs["repeating_animaltraits_" + slotId + "_animaltraits-mod"] = mod;
|
||||
let slotId = generateRowID();
|
||||
attrs["repeating_animaltraits_" + slotId + "_animaltraits-trait"] = traitName;
|
||||
attrs["repeating_animaltraits_" + slotId + "_animaltraits-mod"] = mod;
|
||||
}
|
||||
});
|
||||
|
||||
// Process Behaviour (repeating)
|
||||
@@ -19586,7 +19628,9 @@
|
||||
attrs["repeating_animalbehaviour_" + slotId + "_animalbehaviour"] = behaviour.trim();
|
||||
});
|
||||
|
||||
attrs.animal_notes = compendiumData["Description"];
|
||||
attrs.animal_notes = compendiumData["Description"].replaceAll("\n", " ");
|
||||
|
||||
console.log("FINAL ATTRS: " + JSON.stringify(attrs, null, 4));
|
||||
|
||||
setAttrs(attrs);
|
||||
});
|
||||
|
||||
@@ -140,5 +140,12 @@ This is the Official Mongoose Traveller 2nd Edition Character Sheet
|
||||
- Added max hits for robot so works on token
|
||||
- Added characteristics panel to Robot
|
||||
|
||||
### Version 1.1.14
|
||||
- Fixed weapon headers and fields width on resize on Ship Combat tab
|
||||
- Changed DEX Mod label on Ship Combat Pilot tab to 'Charac. Mod'
|
||||
- Added Characteristic Mod to initiative roll
|
||||
- Changed Ship Combat Initiative button text to specify 'Available Thrust'
|
||||
- Fixed Animal drag and drop parsing
|
||||
-
|
||||

|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@
|
||||
"gunnername-u": "Gunner Name",
|
||||
"gunnerskill-u": "Gunner Skill",
|
||||
"dexmod-u": "DEX Mod",
|
||||
"characteristicmod-u": "Charac. Mod",
|
||||
"custommod-u": "Custom Mod",
|
||||
"custom-u": "Custom",
|
||||
"powerreq-u": "Power Requirements",
|
||||
|
||||
Reference in New Issue
Block a user