mirror of
https://github.com/Nighthawk42/roll20-character-sheets.git
synced 2026-08-30 11:42:29 +00:00
218 lines
7.1 KiB
HTML
218 lines
7.1 KiB
HTML
<div class="sheet-roundcube">
|
|
<h1>Character</h1>
|
|
<hr>
|
|
|
|
<!-- standard d20 ability scores -->
|
|
<input type="hidden" name="attr_strength">
|
|
<input type="hidden" name="attr_dexterity">
|
|
<input type="hidden" name="attr_constitution">
|
|
<input type="hidden" name="attr_intelligence">
|
|
<input type="hidden" name="attr_wisdom">
|
|
<input type="hidden" name="attr_charisma">
|
|
|
|
<!-- standard d20 saving throws -->
|
|
<input type="hidden" name="attr_fortitude">
|
|
<input type="hidden" name="attr_reflex">
|
|
<input type="hidden" name="attr_will">
|
|
|
|
<input type="hidden" name="attr_death_ray">
|
|
<input type="hidden" name="attr_magic_wand">
|
|
<input type="hidden" name="attr_paralysis">
|
|
<input type="hidden" name="attr_dragons_breath">
|
|
<input type="hidden" name="attr_rod_staff_spell">
|
|
|
|
<!-- standard d20 statistics -->
|
|
<input type="hidden" name="attr_xp">
|
|
<input type="hidden" name="attr_hp">
|
|
<input type="hidden" name="attr_hp_max">
|
|
<input type="hidden" name="attr_thac0">
|
|
<input type="hidden" name="attr_bab">
|
|
|
|
<div class="sheet-grid-container">
|
|
|
|
<div class="sheet-attributes sheet-roundcube sheet-colorcube1">
|
|
<h3>Attributes</h3>
|
|
<fieldset class="repeating_attributes">
|
|
<input type="text" name="attr_name" class="sheet-namelineinthirdblock" placeholder="name">
|
|
<input type="text" name="attr_score" class="sheet-scorelineinthirdblock" placeholder="score">
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-statistics sheet-roundcube sheet-colorcube1">
|
|
<h3>Statistics</h3>
|
|
<fieldset class="repeating_statistics">
|
|
<input type="text" name="attr_name" class="sheet-namelineinthirdblock" placeholder="name">
|
|
<input type="text" name="attr_note" class="sheet-notelineinthirdblock" placeholder="notes">
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-description sheet-roundcube sheet-colorcube1">
|
|
<h3>Description</h3>
|
|
<fieldset class="repeating_description">
|
|
<input type="text" name="attr_name" class="sheet-namelineinthirdblock" placeholder="name">
|
|
<input type="text" name="attr_note" class="sheet-notelineinthirdblock" placeholder="notes">
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-weapons sheet-roundcube sheet-colorcube2">
|
|
<h3>Weapons</h3>
|
|
<fieldset class="repeating_weapons">
|
|
<input type="text" name="attr_name" class="sheet-namelineinhalfblock" placeholder="name">
|
|
<input type="text" name="attr_score" class="sheet-scorelineinhalfblock" placeholder="score">
|
|
<br>
|
|
<input type="text" name="attr_note" class="sheet-notelineinhalfblock" placeholder="notes">
|
|
<div class="sheet-lineseparator"></div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-armor sheet-roundcube sheet-colorcube2">
|
|
<h3>Armor</h3>
|
|
<fieldset class="repeating_armor">
|
|
<input type="text" name="attr_name" class="sheet-namelineinhalfblock" placeholder="name">
|
|
<input type="text" name="attr_score" class="sheet-scorelineinhalfblock" placeholder="score">
|
|
<br>
|
|
<input type="text" name="attr_note" class="sheet-notelineinhalfblock" placeholder="notes">
|
|
<div class="sheet-lineseparator"></div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-skills sheet-roundcube sheet-colorcube3">
|
|
<h3>Skills</h3>
|
|
<fieldset class="repeating_skills">
|
|
<input type="text" name="attr_name" class="sheet-namelineinhalfblock" placeholder="name">
|
|
<input type="text" name="attr_score" class="sheet-scorelineinhalfblock" placeholder="score">
|
|
<br>
|
|
<input type="text" name="attr_note" class="sheet-notelineinhalfblock" placeholder="notes">
|
|
<div class="sheet-lineseparator"></div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-items sheet-roundcube sheet-colorcube2">
|
|
<h3>Items</h3>
|
|
<fieldset class="repeating_items">
|
|
<input type="text" name="attr_name" class="sheet-namelineinhalfblock" placeholder="name">
|
|
<input type="text" name="attr_score" class="sheet-scorelineinhalfblock" placeholder="score">
|
|
<br>
|
|
<input type="text" name="attr_note" class="sheet-notelineinhalfblock" placeholder="notes">
|
|
<div class="sheet-lineseparator"></div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-powers sheet-roundcube sheet-colorcube3">
|
|
<h3>Powers</h3>
|
|
<fieldset class="repeating_powers">
|
|
<input type="text" name="attr_name" class="sheet-namelineinhalfblock" placeholder="name">
|
|
<input type="text" name="attr_score" class="sheet-scorelineinhalfblock" placeholder="score">
|
|
<br>
|
|
<input type="text" name="attr_note" class="sheet-notelineinhalfblock" placeholder="notes">
|
|
<div class="sheet-lineseparator"></div>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div class="sheet-notes sheet-roundcube sheet-colorcube1">
|
|
<h3>Notes</h3>
|
|
<fieldset class="repeating_notes">
|
|
<textarea name="attr_note" class="sheet-notebox" placeholder="notes"></textarea>
|
|
</fieldset>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script type="text/worker">
|
|
on("change:repeating_attributes:name change:repeating_attributes:score", function() {
|
|
getAttrs([
|
|
"repeating_attributes_name",
|
|
"repeating_attributes_score"
|
|
], function(values) {
|
|
let t_name = values.repeating_attributes_name.trim().toLowerCase().replace(/ /g,"_");
|
|
let t2_name = t_name.replace(/[\W]+/g,"");
|
|
let conversion_list = {
|
|
"str":"strength",
|
|
"dex":"dexterity",
|
|
"con":"constitution",
|
|
"int":"intelligence",
|
|
"wis":"wisdom",
|
|
"cha":"charisma"
|
|
};
|
|
let t3_name = conversion_list.hasOwnProperty(t2_name) ? conversion_list[t2_name] : t2_name;
|
|
let predefined_list = [
|
|
"strength",
|
|
"dexterity",
|
|
"constitution",
|
|
"intelligence",
|
|
"wisdom",
|
|
"charisma"
|
|
];
|
|
if(predefined_list.includes(t3_name)) {
|
|
setAttrs({
|
|
[t3_name]: values.repeating_attributes_score
|
|
});
|
|
}
|
|
});
|
|
});
|
|
|
|
on("change:repeating_statistics:name change:repeating_statistics:note", function() {
|
|
getAttrs([
|
|
"repeating_statistics_name",
|
|
"repeating_statistics_note"
|
|
], function(values) {
|
|
let t_name = values.repeating_statistics_name.trim().toLowerCase().replace(/ /g,"_");
|
|
let t2_name = t_name.replace(/[\W]+/g,"");
|
|
let conversion_list = {
|
|
"save_vs_fortitude":"fortitude",
|
|
"fort":"fortitude",
|
|
"reflexes":"reflex",
|
|
"save_vs_reflex":"reflex",
|
|
"willpower":"will",
|
|
"save_vs_willpower":"will",
|
|
"deathray":"death_ray",
|
|
"deathrays":"death_ray",
|
|
"death_rays":"death_ray",
|
|
"magicwand":"magic_wand",
|
|
"magicwands":"magic_wand",
|
|
"magic_wands":"magic_wand",
|
|
"save_vs_paralys":"paralysis",
|
|
"dragonsbreath":"dragons_breath",
|
|
"dragonbreath":"dragons_breath",
|
|
"dragon_breath":"dragons_breath",
|
|
"save_vs_dragons_breath":"dragons_breath",
|
|
"rods_staves_spells":"rod_staff_spell",
|
|
"save_vs_rod_staff_spell":"rod_staff_spell",
|
|
"experience_point":"xp",
|
|
"experience_points":"xp",
|
|
"hit_point":"hp",
|
|
"hit_points":"hp",
|
|
"hit_point_max":"hp_max",
|
|
"hit_points_max":"hp_max",
|
|
"thaco":"thac0",
|
|
"to_hit_ac_zero":"thac0",
|
|
"attack_bonus":"bab",
|
|
"basic_attack_bonus":"bab"
|
|
};
|
|
let t3_name = conversion_list.hasOwnProperty(t2_name) ? conversion_list[t2_name] : t2_name;
|
|
let predefined_list = [
|
|
"fortitude",
|
|
"reflex",
|
|
"will",
|
|
"death_ray",
|
|
"magic_wand",
|
|
"paralysis",
|
|
"dragons_breath",
|
|
"rod_staff_spell",
|
|
"xp",
|
|
"hp",
|
|
"hp_max",
|
|
"thac0",
|
|
"bab"
|
|
];
|
|
if(predefined_list.includes(t3_name)) {
|
|
setAttrs({
|
|
[t3_name]: values.repeating_statistics_note
|
|
});
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|