Shadorun 5th Edition v3.01 (#5649)

* Shadorun v3.01

* fix translations

* fix en file
This commit is contained in:
Cassie Levett
2019-11-04 12:36:22 -06:00
committed by GitHub
parent 384023f403
commit dae9381192
30 changed files with 3915 additions and 3797 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+401 -69
View File
@@ -1,4 +1,4 @@
input(name='attr_version' type='hidden' value='3.0')
input(name='attr_version' type='hidden' value='3.01')
//- CHARACTER SHETE PAGE
input.sheet_type(name='attr_sheet_type' type='hidden' value='pc')
@@ -31,7 +31,7 @@ include src/pug/_variables.pug
label.switch(data-i18n-title=key title=key)
input.whisper-toggle(name='attr_'+key+'_toggle' type='checkbox' value=val)
span.slider
button(name='d6' title='Roll D6s' type='roll' value='@{gm_toggle} &{template:rolls}{{header=^{d6}}}{{base=^{d6}}}{{dice=[[(?{d6s|0}d6>5)]]}}') L
button(name='d6' title='Roll D6s' type='roll' value!='@{gm_toggle} &{template:rolls}{{header=^{d6}}}{{base=^{d6}}}{{dice=[[(?{d6s|0}d6>5)]]}}') L
input(name='attr_tab' type='hidden' value='core')
button.pictos(name='act_tab_options' title='@{tab}' type='action' ) y
each val in ['core', 'arms', 'augs', 'gear', 'magic', 'matrix', 'social', 'vehicle']
@@ -56,71 +56,279 @@ include src/pug/_variables.pug
h1(data-i18n='skills') Skills
.border-box.skill-box
.pc-box.medium-box
.row-long
each val in ['Skill', 'RTG', 'Attribute', 'Limit']
- const translationKey = val.toLowerCase();
h2(data-i18n=translationKey) #{val}
.rows.repeating-container
.row-long.headers
each val in ['Skill', 'RTG', 'Attribute', 'Limit']
- const translationKey = val.toLowerCase();
h2(data-i18n=translationKey) #{val}
input.tab-switch(name='attr_skill_toggle' type='hidden' value='active')
each val, key in {'active': ['active', 'Agility', 'Physical'],'knowledge':['know', 'Logic', 'Mental'], 'language': ['lang', 'Charisma', 'Social']}
div(class='skills-'+val[0])
if key === 'active'
.row-long
input(name='attr_default_display' type='hidden' value='Agility')
+rollButton('default', '@{default_display}', '@{default_attribute}+-1')
span.text-align-center -
select.attribute-select(name='attr_default_attribute' title='Skill attribute')
+attributeSelect('Agility')
select.limit-select(name='attr_limit' title='Skill limit')
+limitSelect('Physical')
fieldset(class='repeating_' + key)
input(name='attr_display_rating' type='hidden')
input(name='attr_display_specialization' type='hidden' value='')
input(name='attr_display_limit' type='hidden' value=val[2])
input(name='attr_display_attribute' type='hidden' value=val[1])
input(name='attr_dicepool' type='hidden' value='0')
.row-long
input.settings-toggle(name='attr_flag' type='hidden' value='settings' title='@{repeating_'+val[0]+'_${x}_flag')
.rows.repeating-container
if key === 'active'
.row-long
input(name='attr_default_display' type='hidden' value='Agility')
+rollButton('default', '@{default_display}', '@{default_attribute}+-1')
span.text-align-center -
select.attribute-select(name='attr_default_attribute' title='Skill attribute')
+attributeSelect('Agility')
select.limit-select(name='attr_limit' title='Skill limit')
+limitSelect('Physical')
fieldset(class='repeating_' + key)
- const skillsRepeatingSection = `@{repeating_${val[0]}`+'_${x}';
input(name='attr_display_rating' type='hidden')
input(name='attr_display_specialization' type='hidden' value='')
input(name='attr_display_limit' type='hidden' value=val[2])
input(name='attr_display_attribute' type='hidden' value=val[1])
input(name='attr_dicepool' type='hidden' value='0')
input.settings-flag(name='attr_flag' type='hidden' value='settings' title=`${repeatingSection}_flag}`)
.buttons
//- SKILL BUTTON
+skillButton(false)
//- SPECILIZATION BUTTON
+skillButton(true)
span.text-align-center(name='attr_display_rating' title='@{repeating_'+val[0]+'_${x}_display_rating}')
select.attribute-select(name='attr_attribute' title='@{repeating_'+val[0]+'_${x}_attribute}')
span.text-align-center(name='attr_display_rating' title=`${skillsRepeatingSection}_display_rating}`)
select.attribute-select(name='attr_attribute' title=`${repeatingSection}_attribute}`)
+attributeSelect(val[1])
select.limit-select(name='attr_limit' value='physical_limit' title='@{repeating_'+val[0]+'_${x}_limit}')
select.limit-select(name='attr_limit' value='physical_limit' title=`${repeatingSection}_limit}`)
+limitSelect(val[2])
button.pictos(name='act_skill' type='action') x
if key === 'active'
select.skill-select.settings(name='attr_skill' value='Close Combat Group' title='@{repeating_'+val[0]+'_${x}_skill}')
include src/pug/skillselect.html
else
label.settings(data-i18n-title='skill' title='skill')
input(name='attr_skill' placeholder=key type='text' title='@{repeating_'+val[0]+'_${x}_skill}')
label.settings(data-i18n-title='rating' title='rating')
input(name='attr_rating' min='0' placeholder='0' type='number' title='@{repeating_'+val[0]+'_${x}_rating}')
label.settings(data-i18n-title='ratingmodifier' title='Rating Modifier')
span(data-i18n='ratingmodifier') Rating Modifier
input(name='attr_rating_modifier' placeholder='0' type='number' title='@{repeating_'+val[0]+'_${x}_rating_modifier}')
label.settings(data-i18n-title='specializations' title='Specializations')
span(data-i18n='specializations') Specializations
input(name='attr_specialization}' placeholder='Specalizations' type='text' title='@{repeating_'+val[0]+'_${x}_specialization}')
label.settings(data-i18n-title='notes' title='notes')
span(data-i18n='notes') Notes
textarea(name='attr_notes' value='' placeholder='Notes' title='@{repeating_'+val[0]+'_${x}_notes}')
+repeatingSectionFlags()
.settings
if key === 'active'
select.skill-select(name='attr_skill' value='Close Combat Group' title=`${repeatingSection}_skill}`)
include src/html/skillselect.html
else
label(data-i18n-title='skill' title='skill')
input(name='attr_skill' placeholder=key type='text' title=`${repeatingSection}_skill}`)
label(data-i18n-title='rating' title='rating')
input(name='attr_rating' min='0' placeholder='0' type='number' title=`${repeatingSection}_rating}`)
label(data-i18n-title='ratingmodifier' title='Rating Modifier')
span(data-i18n='ratingmodifier') Rating Modifier
input(name='attr_rating_modifier' placeholder='0' type='number' title=`${repeatingSection}_rating_modifier}`)
label(data-i18n-title='specialization' title='specialization')
span(data-i18n='specialization') specialization
input(name='attr_specialization}' placeholder='Specalizations' type='text' title=`${repeatingSection}_specialization}`)
label(data-i18n-title='notes' title='notes')
span(data-i18n='notes') Notes
textarea(name='attr_notes' value='' placeholder='Notes' title=`${repeatingSection}_notes}`)
//- CORE TAB
include src/core.html
//- ARMS TAB
include src/arms.html
.arms.pc-col
.pc-row.weapons
.header.right-header
h1(data-i18n='weapons') Weapons
.right-tri
.header.right-header
.header.htab
.triangle
input.tab-switch(name='attr_weapon_type_toggle' type='radio' value='range' checked)
h1(data-i18n='ranged') Ranged
.right-tri
.header.htab
.triangle
input.tab-switch(name='attr_weapon_type_toggle' type='radio' value='melee')
h1(data-i18n='melee') Melee
.right-tri
.border-box
.pc-box.medium-box
input.tab-switch(name='attr_weapon_type_toggle' type='hidden' value='range')
.rows.repeating-container.weapon-range
- const rangeRepeatingSection = '@{repeating_range_${x}';
+h2Headers(pcRangeWeaponObject)
fieldset(class='repeating_range')
input(name='attr_dicepool' type='hidden' value='0')
input.flag-primary(name='attr_primary' type='hidden' value='')
+weaponRollButton(pcRangeWeaponButton)
each val in ['Dam', 'Acc', 'AP', 'Mode', 'RC', 'Ammo']
- const attrName = val === 'Dam' ? 'damage' : val === 'RC' ? 'recoil' : val.toLowerCase();
if val === 'Mode'
select(name='attr_mode' title='@{mode}' value='BF')
each val in weaponModes
option(data-i18n=val.toLowerCase() value=val) #{val}
else
span.center(name=`attr_${attrName}`)
+repeatingSectionFlags()
.settings
each val, key in pcRangeWeaponObject
- const attrName = key === 'Dam' ? 'damage' : key.toLowerCase();
if key === 'Mode'
select(name='attr_mode' title='@{mode}' value='BF')
each val in weaponModes
option(data-i18n=val.toLowerCase() value=val) #{val}
else
label(data-i18n-title=key.toLowerCase() title=key.toLowerCase())
input(name=`attr_${attrName}` placeholder=val['placeholder'] title=`${rangeRepeatingSection}_${attrName}}` type=val['type'] value='')
.row
h3(data-i18n="modeoptions") Mode Options
label(data-i18n-title="modeoptions" title="Mode Options")
input(name="attr_mode_options" placeholder="SA/BF/FA" type="text" title=`${rangeRepeatingSection}_mode_options}}`)
h3(data-i18n="range") range
label(data-i18n-title="range" title="Range")
input(name="attr_range" placeholder="25/150/350/550" type="text" title='')
h3(data-i18n="primary") primary
label(data-i18n-title="primary" title="Primary")
input(name="attr_primary" type="checkbox" title=`${rangeRepeatingSection}_primary}` value='primary')
.row
h3(data-i18n='skill') skill
select(name=`attr_skill` title=`${rangeRepeatingSection}_skill}` value='@{firearms}')
optgroup(label='Combat Skills' ) Combat Skills
option(data-i18n='firearms' value='@{firearms}' selected) Firearms Group
option(data-i18n='automatics' value='@{automatics}') Automatics
option(data-i18n='archery' value='@{archery}') Archery
option(data-i18n='exoticrange' value='0') Exotic Range
option(data-i18n='heavyweapons' value='@{heavyweapons}') Heavy Weapons
option(data-i18n='longarms' value='@{longarms}') Longarms
option(data-i18n='pistols' value='@{pistols}') Pistols
option(data-i18n='throwingweapons' value='@{throwingweapons}') Throwing Weapons
optgroup(label='Vehicle Skills') Vehicle Skills
option(data-i18n='gunnery' value='@{gunnery}') Gunnery
h3(data-i18n='specialization') specialization
label(data-i18n-title='specialization' title='specialization')
input(name='attr_spec' value='2' title=`${rangeRepeatingSection}_spec}` type='checkbox')
h3(data-i18n='modifier') modifier
label(data-i18n-title='modifier' title='modifier')
input(name='attr_dicepool_modifier' title=`${rangeRepeatingSection}_dicepool_modifier}` type='number')
input(name=`attr_skill` type='hidden' value='')
.exotic-warning
i(data-i18n="exoticnote") Exotic weapons are not linked to a skill. Use Modifier input to set dicepool.
+repeatingSectionNotes('range')
.rows.repeating-container.weapon-melee
- const meleeRepeatingSection = '@{repeating_melee_${x}';
+h2Headers(pcMeleeWeaponObject)
fieldset(class='repeating_melee')
input(name='attr_dicepool' type='hidden' value='0')
input.flag-primary(name='attr_primary' type='hidden' value='')
+weaponRollButton(pcMeleeWeaponButton)
each val in ['Dam', 'Acc', 'AP', 'Reach']
- const attrName = val === 'Dam' ? 'damage' : val.toLowerCase();
span.center(name=`attr_${attrName}`)
+repeatingSectionFlags()
.settings
each val, key in pcMeleeWeaponObject
- const attrName = key === 'Dam' ? 'damage' : key.toLowerCase();
label(data-i18n-title=key.toLowerCase() title=key.toLowerCase())
input(name=`attr_${attrName}` placeholder=val['placeholder'] title=`${meleeRepeatingSection}_${attrName}}` type=val['type'] value='')
h3(data-i18n="primary") primary
label(data-i18n-title="primary" title="Primary")
input(name="attr_primary" type="checkbox" title=`${meleeRepeatingSection}_primary}` value='primary')
.row
h3(data-i18n='skill') skill
select(name=`attr_skill` title=`${meleeRepeatingSection}_skill}` value='@{closecombat}')
optgroup(label='Combat Skills' ) Combat Skills
option(data-i18n='closecombat' value='@{closecombat}' selected) Close Combat Group
option(data-i18n='blades' value='@{blades}') Blades
option(data-i18n='clubs' value='@{clubs}') Clubs
option(data-i18n='exoticmelee' value='0') Blades
option(data-i18n='unarmedcombat' value='@{unarmedcombat}') Unarmed Combat
optgroup(label='Vehicle Skills') Vehicle Skills
option(data-i18n='gunnery' value='@{gunnery}') Gunnery
h3(data-i18n='specialization') specialization
label(data-i18n-title='specialization' title='specialization')
input(name='attr_spec' value='2' title=`${meleeRepeatingSection}_spec}` type='checkbox')
h3(data-i18n='modifier') modifier
label(data-i18n-title='modifier' title='modifier')
input(name='attr_dicepool_modifier' title=`${meleeRepeatingSection}_dicepool_modifier}` type='number')
input(name=`attr_skill` type='hidden' value='')
.exotic-warning
i(data-i18n="exoticnote") Exotic weapons are not linked to a skill. Use Modifier input to set dicepool.
+repeatingSectionNotes('melee')
.pc-row.armor
.header.right-header
h1(data-i18n='armor') Armor
.right-tri
.border-box
.pc-box.medium-box
.rows.repeating-container
- const armorRepeatingSection = '@{repeating_armor_${x}';
.row-long.headers
each val in ['Armor', 'Rating', 'Acid', 'Cold', 'Elec', 'Fire', 'Radi']
h2(data-i18n=`${val.toLowerCase()}`) #{val}
fieldset(class='repeating_armor')
input.flag-primary(name='attr_primary' type='hidden' value='')
button(name=`roll_soak` type='roll' value!=noWoundsRollBegining+'{{header=^{soak}}}{{base=^{body} ♦ ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier})'+noWoundsRollEnding)
span(name='attr_name')
button(name=`roll_armor` type='roll' value!=noWoundsRollBegining+'{{header=@{name}}}{{base= ^{armor}}}{{dice=[[((@{rating})'+noWoundsRollEnding)
span.center(name='attr_rating')
each val in ['Acid', 'Cold', 'Electrical', 'Fire', 'Radiation']
- const attrName = val.toLowerCase();
button(name=`roll_${attrName}` type='roll' value!=noWoundsRollBegining+`{{header=^{${attrName}protection}}}{{base= ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier}+@{${attrName}_modifier})`+noWoundsRollEnding)
span.center(name=`attr_${attrName}_modifier`)
+repeatingSectionFlags()
.settings
each val, key in pcArmorObject
- const attrName = key === 'Name' || key === 'Rating' ? key.toLowerCase() : `${key.toLowerCase()}_modifier`;
label(data-i18n-title=key.toLowerCase() title=key.toLowerCase())
input(name=`attr_${attrName}` placeholder=val['placeholder'] title=`@{repeating_armor_`+'${x}'+`_${attrName}}` type=val['type'] value='')
.row
h3(data-i18n="primary") primary
label(data-i18n-title="primary" title="Primary")
input(name="attr_primary" type="checkbox" title=`${armorRepeatingSection}_primary}` value='primary')
h3(data-i18n="modifier") modifier
label(data-i18n-title='modifier' title='modifier')
input(name='attr_dicepool_modifier' placeholder='0' title=`${armorRepeatingSection}_dicepool_modifier}` type='number' value='0')
+repeatingSectionNotes('armor')
//- AUGS TAB
include src/augs.html
.augs.pc-col
.pc-row
.header.right-header
h1(data-i18n='augmentations') Augmentations
.right-tri
.border-box
.pc-box.medium-box
.row-long.headers
each val in augementations
h2(data-i18n=`${val.toLowerCase()}`) #{val}
.rows.repeating-container
fieldset(class=`repeating_augementations`)
span(name=`attr_augementation`)
span.center(name=`attr_rating`)
span.center(name=`attr_essence`)
+repeatingSectionFlags()
.settings
each val in augementations
- const attrName = val === 'Augmentations' ? 'augementation' : val.toLowerCase();
- const type = val === 'Augmentations' ? 'text' : 'number';
- const placeholder = val === 'Augmentations' ? 'name' : '0';
label(data-i18n-title=val title=val)
input(name=`attr_${attrName}` placeholder=placeholder title=`@{repeating_augementations_`+'${x}'+`_${attrName}}` type=type value='')
+repeatingSectionNotes('augementations')
//- GEAR TAB
include src/gear.html
.gear.pc-col
.pc-row
.header.right-header
h1(data-i18n='gear') gear
.right-tri
.border-box
.pc-box.medium-box
.row-long.headers
each val in ['Item', 'Rating', 'Quantity']
h2(data-i18n=`${val.toLowerCase()}`) #{val}
.rows.repeating-container
fieldset(class=`repeating_items`)
span(name=`attr_item`)
span.center(name=`attr_rating`)
span.center(name=`attr_quantity`)
+repeatingSectionFlags()
.settings
label(data-i18n-title='item' title='item')
input(name=`attr_item` placeholder='Jammer' title=`@{repeating_items_`+'${x}'+`_item}` type='text' value='')
label(data-i18n-title='rating' title='rating')
input(name=`attr_rating` placeholder='3' title=`@{repeating_items_`+'${x}'+`_rating}` type='text' value='')
label(data-i18n-title='quantity' title='quantity')
input(name=`attr_quantity` placeholder='x3' title=`@{repeating_items_`+'${x}'+`_quantity}` type='text' value='')
+repeatingSectionNotes('items')
//- MAGIC TAB
.magic.pc-col
@@ -131,44 +339,167 @@ include src/pug/_variables.pug
.header.right-header
.header.htab
.triangle
input.magic-toggle(name="attr_magic_toggle" title="@{magic_toggle}" type="radio" value="spells" checked)
h1(data-i18n="spells") Spells
input.magic-toggle(name='attr_magic_toggle' title='@{magic_toggle}' type='radio' value='spells' checked)
h1(data-i18n='spells') Spells
.right-tri
.header.htab
.triangle
input.magic-toggle(name="attr_magic_toggle" title="@{magic_toggle}" type="radio" value="preps")
h1(data-i18n="prep") Prep...
input.magic-toggle(name='attr_magic_toggle' title='@{magic_toggle}' type='radio' value='preps')
h1(data-i18n='prep') Prep...
.right-tri
.header.htab
.triangle
input.magic-toggle(name="attr_magic_toggle" title="@{magic_toggle}" type="radio" value="rituals")
h1(data-i18n="rituals") Rituals
input.magic-toggle(name='attr_magic_toggle' title='@{magic_toggle}' type='radio' value='rituals')
h1(data-i18n='rituals') Rituals
.right-tri
.border-box.repeat-box
.border-box
.pc-box.medium-box
+fadeDrainSection('drain')
input.magic-toggle(name="attr_magic_toggle" type="hidden" value="spells")
include src/magic.html
.pc-row
include src/powers.html
input.magic-toggle(name='attr_magic_toggle' type='hidden' value='spells')
.row-long.headers
each val in ['spells', 'type', 'range', 'duration', 'drain']
h2(data-i18n=val) #{val}
.magic-spells.spellsForumlas
+pcSpells('spell')
.magic-preps.spellsForumlas
+pcSpells('preps')
.rows.repeating-container.prepared-preparations
h2(data-i18n='preperations') preperations
.row-long.headers
each val in ['name', 'force', 'potency', 'trigger']
h3(data-i18n=val) #{val}
fieldset(class='repeating_preperations')
+displayRollButton(prepButton, false)
each val in ['force', 'potency', 'trigger']
span.center(name=`attr_${val}`)
+repeatingSectionFlags()
.settings
label(data-i18n-title='name' title='name')
input(name='attr_name' placeholder='Name' title='@{repeating_preperations_${x}_name}' type='text' value='')
label(data-i18n-title='force' title='force')
input(name='attr_force' placeholder='1' title='@{repeating_preperations_${x}_force}' type='number' value='')
label(data-i18n-title='potency' title='potency')
input(name='attr_potency' placeholder='1' title='@{repeating_preperations_${x}_potency}' type='number' value='')
select(name='attr_trigger' title='@{repeating_preperations_${x}_trigger}' value='Command')
optgroup(label='Trigger') Trigger
option(data-i18n='command' value='Command') command
option(data-i18n='contact' value='Contact' selected) contact
option(data-i18n='time' value='Time') time
option(data-i18n='special' value='Special') special
+repeatingSectionNotes('preperations')
.magic-rituals
.rows.repeating-container
fieldset(class=`repeating_ritual`)
- const repeatingRitualSection = `@{repeating_${type}`+'_${x}';
input(name='attr_dicepool' type='hidden' value='0')
+displayRollButton(pcRitualButton, true)
each val in ['type', 'range', 'duration', 'drain']
span.center(name='attr_'+val)
+repeatingSectionFlags()
.settings
label(data-i18n-title='name' title='name')
input(name='attr_name' placeholder='Curse (MATERIAL LINK, SPELL)' title=`@{${repeatingRitualSection}_name}` type='text')
.rows
h3(data-i18n='skill') skill
select(name='attr_skill' title=`@{${repeatingRitualSection}_skill}`)
option(data-i18n='sorcerygroup' value='@{sorcery}') Sorcery Group
option(data-i18n='ritualspellcasting' value='@{ritualspellcasting}' selected) Ritual Spellcasting
h3(data-i18n='specialization') specialization
label(data-i18n-title='specialization' title='specialization')
input(name='attr_spec' title=`@{${repeatingRitualSection}_spec}` type='checkbox' value='2')
h3(data-i18n='modifier') modifier
label(data-i18n-title='modifier' title='modifier')
input(name='attr_dicepool_modifier' title=`@{${repeatingRitualSection}_dicepool_modifier}` type='number')
+repeatingSectionNotes('ritual')
.pc-row.powers
.header.right-header
h1(data-i18n='adeptpowers') Adept Powers or Other Abilities
.right-tri
.border-box
.pc-box.medium-box
+fadeDrainSection('drain', true)
.row-long.headers
h2(data-i18n='name') Name
h2.center(data-i18n='rating') Rating
.rows.repeating-container.powers
fieldset(class=`repeating_powers`)
span(name='attr_name')
span.center(name='attr_rating')
+repeatingSectionFlags()
.settings
label(data-i18n-title='name' title='name')
input(name='attr_name' placeholder='name' title='@{repeating_powers_${x}_name}' type='text' value='')
label(data-i18n-title='rating' title='rating')
input(name='attr_rating' placeholder='rating' title='@{repeating_powers_${x}_rating}' type='number' value='')
+repeatingSectionNotes('powers')
//- MATRIX TAB
.matrix.pc-col
.pc-row
include src/matrix.html
.pc-row.matrix-box
.header.right-header
h1(data-i18n='cyberdeck') Cyberdeck
.right-tri
.border-box
.pc-box.medium-box
.cyberdeck
include src/html/matrix.html
.rows.repeating-container.programs
h2(data-i18n='programs') Programs
fieldset(class=`repeating_programs`)
span(name='attr_program')
+repeatingSectionFlags()
.settings
label(data-i18n-title='programs' title='programs')
input(name='attr_program' placeholder='Program name' title='@{repeating_programs_${x}_program}' type='text' value='')
+repeatingSectionNotes('programs')
.pc-row
.header.right-header
h1(data-i18n='complexform') Complex Forms
.right-tri
.border-box.repeat-box.form-box
.border-box
.pc-box.medium-box
+fadeDrainSection('fade')
.row-long
h3(data-i18n="complexform") Complex Form
h3(data-i18n="target") Target
h3(data-i18n="duration") Duration
h3(data-i18n="fade") Fade
include src/complexforms.html
.rows.repeating-container.complex-forms
- const formsrepeatingSection = `@{repeating_forms`+'_${x}';
.row-long.headers
each val, key in {'Complex Form': 'complexform','Target':'target', 'Duration': 'duration', 'Fade': 'fade'}
h2(data-i18n=val) #{key}
fieldset(class=`repeating_forms`)
input(name='attr_dicepool' type='hidden' value='0')
+displayRollButton(pcComplexFormButton, true)
each val in ['target', 'duration', 'fade']
span.center(name=`attr_${val}`)
+repeatingSectionFlags()
.settings
label(data-i18n-title='name' title='name')
input(name='attr_name' placeholder='name' title=`${formsrepeatingSection}_name}` type='text' value='')
select(name=`attr_target` title=`${formsrepeatingSection}_target}` value='Device')
each val in formTargets
- const i18n = val.toLowerCase();
option(data-i18n=i18n value=val) #{val}
select(name=`attr_duration` title=`${formsrepeatingSection}_duration}` value='Instant')
each val in formDurations
- const i18n = val.toLowerCase();
option(data-i18n=i18n value=val) #{val}
label(data-i18n-title='fade' title='fade')
input(name='attr_fade' placeholder='-1' title=`${formsrepeatingSection}_fade}` type='number' value='')
.row
h3(data-i18n='skill') skill
select(name=`attr_skill` title=`${formsrepeatingSection}_skill}` value='@{software}')
option(data-i18n='electronicsgroup' value='@{electronics}') Electronics Group
option(data-i18n='software' value='@{software}' selected) Software
h3(data-i18n='specialization') specialization
label(data-i18n-title='specialization' title='specialization')
input(name='attr_spec' value='2' title=`${formsrepeatingSection}_spec}` type='checkbox')
h3(data-i18n='modifier') modifier
label(data-i18n-title='modifier' title='modifier')
input(name='attr_dicepool_modifier' title=`${formsrepeatingSection}_dicepool_modifier}` type='number')
+repeatingSectionNotes('forms')
//- SOCIAL TAB
include src/social.html
@@ -189,10 +520,11 @@ include src/footer.html
include src/rolltemplates.html
//- HIDDEN
include src/hidden.html
include src/html/hidden.html
//- SCRIPTS
include src/pug/scripts.js
//- CHUMMER IMPORTER
include src/importer.html
include src/html/importer.html
include src/js/importer.js
+521 -25
View File
@@ -6,6 +6,7 @@
$graytrans: rgba(28, 28, 28, 0.14902);
$grayshadow: #7c7c7c;
$blacker: #040404;
$ccc: #cccccc;
//- GRAY IN ROLL TEMPLATE
$blackish: #1c1c1c;
//-(primaryly on the NPC sheet)
@@ -25,6 +26,35 @@
============================= */
@import 'src/scss/_switch';
/* MIXIN
============================= */
@mixin repeatingInformation($endColumn, $longCollapseFlag) {
label[data-i18n-title='notes'],
h3[data-i18n='notes'],
div.sheet-collapse {
grid-column: 1 / #{$endColumn};
}
input.sheet-collapse-flag {
@if $longCollapseFlag {
grid-area: 1 / 1 / 1 / #{$endColumn - 1};
position: absolute;
width: 100%;
} @else {
grid-area: 1 / #{$endColumn - 2} / 1 / #{$endColumn - 1};
}
}
input.sheet-collapse-flag + span.sheet-pictos {
grid-area: 1 / #{$endColumn - 2} / 1 / #{$endColumn - 1};
}
input.sheet-settings-flag,
input.sheet-settings-flag + span.sheet-pictos {
grid-area: 1 / #{$endColumn - 1} / 1 / #{$endColumn};
}
}
/***** TABS FOR SHEETS *****/
.sheet-tabs {
button {
@@ -66,9 +96,9 @@
}
}
/***** TABS FOR SHEETS *****/
.sheet-settings-toggle {
.sheet-settings-toggle,
.sheet-settings-flag {
input { width: 3em;}
input[type='checkbox'] + span {
@@ -81,6 +111,8 @@
}
}
/***** GENERIC STYLES *****/
%parantheseNumbers {
vertical-align: middle;
@@ -113,8 +145,28 @@ input.sheet-toggle {
%borderBottom { border-bottom: 1px solid #333; }
.sheet-center { text-align: center; }
select {
&.sheet-attribute-select {
option:nth-of-type(1n+5) { color: $red; }
option:nth-of-type(1n+9) { color: #7a2593; }
}
&.sheet-limit-select {
option:nth-of-type(1n+5) { color: $red; }
}
}
@import 'src/scss/_matrixdevice';
/***** GRID *****/
%gridGap {
grid-column-gap: 1%;
grid-row-gap: 1%;
}
/******************************************************************************/
/********************************* VARIABLES *********************************/
/****************************************************************************/
@@ -134,19 +186,49 @@ $npcTypes: 'grunt', 'host', 'sprite', 'vehicle';
box-shadow : inset 0px 0px 3px 1px #7c7c7c;
margin-left : -1%;
padding-left : 0.5%;
button > h2:hover,
button > span:hover,
label > button[type='roll']:hover,
.sheet-repeat-box button[type='roll']:hover,
.sheet-con-track button[type='action']:hover,
button[data-i18n="default"]:hover {
button[data-i18n='default']:hover {
color : #fff;
text-shadow: 1px 1px 2px black, 0 0 25px red, 0 0 5px $red;
}
h1 {
background-color: $red;
color : #fff;
font-size : 1em;
letter-spacing : 2px;
line-height : 20px;
padding-left : 5px;
padding-right : 5px;
text-transform : uppercase;
}
h2 {
font-size : 0.9em;
line-height: 25px;
text-transform: capitalize;
@extend %display-inline-grid;
}
h3 {
color : hsla(0, 0%, 20%, 0.59);
font-size: 0.8em;
text-transform: capitalize;
@extend %display-inline-grid;
}
hr { margin: 7px 0px -2px 0px; }
input {
border-radius: 0px;
}
.sheet-tabs {
@extend %display-inline-grid;
grid-template-columns: 1fr 5em 1fr 5em 2.5em 5em 5em 5em 5em 5em 5em 5em;
@@ -215,7 +297,9 @@ $npcTypes: 'grunt', 'host', 'sprite', 'vehicle';
}
}
input[type='checkbox'],
input.sheet-settings-toggle,
input.sheet-settings-flag,
input.sheet-collapse-flag,
input[type='radio'] {
@extend %toggleRelative;
@@ -227,6 +311,7 @@ $npcTypes: 'grunt', 'host', 'sprite', 'vehicle';
select {
height: 1.8em;
padding: 0px;
color: $blacker;
}
div.sheet-core-info {
@@ -244,21 +329,115 @@ $npcTypes: 'grunt', 'host', 'sprite', 'vehicle';
input.sheet-display-flag { position: absolute; }
div.sheet-border-box {
button[type='roll'] {
font-size: 0.8em;
font-weight: bold;
}
}
.sheet-pc-row {
button[type='roll'] { color:$blacker }
}
/***** DECORATIVE BOX THAT ADDS THE RED OUTLINE ON PC SHEET *****/
div.sheet-border-box {
background-image: -moz-linear-gradient($red, transparent), -moz-linear-gradient($red, transparent);
background-image: -o-linear-gradient($red, transparent), -o-linear-gradient($red, transparent);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($red), to(transparent));
background-image: -webkit-linear-gradient($red, transparent);
background-image: linear-gradient($red, transparent), linear-gradient($red, transparent);
border-top : 2px solid $red;
clear : both;
border-top-right-radius: 10px;
border-top-left-radius : 0px;
div.sheet-pc-box {
border-top-right-radius: 10px;
border-top-left-radius : 0px;
}
}
/***** REPEATING CONTAINERS *****/
div.sheet-repeating-container {
div.repitem {
display: inline-grid;
padding: 1% 0.5%;
margin-bottom: 0px;
@extend %gridGap;
@extend %borderBottom;
button[type='roll'] {
text-align: left;
}
input {
&:nth-of-type(1n+2) { text-align: center; }
&[type='text'],
&[type='number'] {
@extend %borderBottom;
width: 100%;
}
}
label {
padding-right: 0px;
input[name='attr_name'],
input[name='attr_weapon'] {
text-align: left;
}
&[data-i18n-title='modifier'] {
width: 3em;
}
}
div.sheet-settings {
background-color: $ccc;
border-left: 2px solid $gray;
@extend %gridGap;
padding: 2% 1%;
width: 100%;
select { text-transform: capitalize; }
}
div.sheet-collapse { padding-left: 5%; }
}
}
div.repitem {
input[type='number'] {
text-align: center;
width: 2.5em;
width: 100%;
input[type='number'] { text-align: center; }
}
/***** ARMOR BUTTONS *****/
div.sheet-core {
div.sheet-armor-buttons {
display : inline-block;
font-size : 1.5em;
line-height: 20px;
margin-left: 1%;
width : 35%;
button {
&[type='roll'] { margin-right: -5px; }
&[name='roll_defense'] {
background-color: $gray;
color: $white;
}
}
span { font-size : 1em; }
}
}
/***** SKILLS *****/
div.sheet-skill-box {
button[type='roll'] {
font-size: 1em;
text-align: left;
}
$skillGrid: 1fr 3.5em 5em 5em 1em 1em;
h2:nth-of-type(1n+2) { text-align: center; }
@@ -267,9 +446,15 @@ $npcTypes: 'grunt', 'host', 'sprite', 'vehicle';
font-size : 0.8em;
text-transform: capitalize;
&[data-i18n-title='ratingmodifier'] { grid-area: 2 / 3 / 2 / 6; }
&[data-i18n-title='specializations'] { grid-area: 3 / 1 / 3 / 6; }
&[data-i18n-title='notes'], textarea { grid-area: 4 / 1 / 4 / 6; }
&[data-i18n-title='ratingmodifier'] {
grid-area: 1 / 3 / 1 / 7;
width: 100%;
input[type='number'] { width: 3em; }
}
&[data-i18n-title='specialization'] { grid-area: 3 / 1 / 3 / 7; }
&[data-i18n-title='notes'], textarea { grid-area: 4 / 1 / 4 / 7; }
& > input {
@extend %borderBottom;
@@ -281,29 +466,340 @@ $npcTypes: 'grunt', 'host', 'sprite', 'vehicle';
input[name='attr_skill'] { @extend %borderBottom; }
input[name='attr_rating_modifier'] { width: 3.5em; }
input[name='attr_display_specialization'][value=''] ~ div.sheet-buttons button[name*='specialization'] { @extend %display-none; }
div.sheet-row-long {
display: inline-grid;
grid-column-gap: 1%;
grid-row-gap: 2%;
grid-template-columns: 1fr 3.5em 5em 5em 1.5em;
padding: 1%;
grid-template-columns: $skillGrid;
padding: 1% 0.5%;
width: 100%;
@extend %display-inline-grid;
@extend %gridGap;
h3:nth-of-type(1n+2) { text-align: center; }
}
select.sheet-attribute-select {
option:nth-of-type(1n+9) { color: #7a2593; }
option:nth-of-type(1n+5) { color: $red; }
div.repitem {
grid-template-columns: $skillGrid;
@include repeatingInformation(7, false);
input[name='attr_damage'],
input[name='attr_dicepool_modifier'] {
width: 3.5em;
}
div.sheet-settings {
grid-column: 1 / 7;
grid-template-columns: $skillGrid;
}
}
}
/*** ARMS ****/
div.sheet-arms {
div.sheet-headers {
display: grid;
@extend %gridGap;
h2:nth-of-type(1n+2) { text-align: center; }
}
select.sheet-limit-select {
option:nth-of-type(1n+5) { color: $red; }
div.repitem {
h3 { color: $blacker; }
input {
&:nth-of-type(1n+2) { text-align: center; }
&.sheet-flag-primary[value='primary'] + button {
background-color: $gold;
border-bottom: 2px solid $blacker;
}
}
}
div.sheet-weapons {
$weaponsGrid: 25% 1.25fr 3em 2.5em 3em 1fr 1fr 1em 1em;
div.sheet-headers { grid-template-columns:$weaponsGrid; }
div.repitem {
grid-template-columns: $weaponsGrid;
@include repeatingInformation(10, false);
div.sheet-settings {
grid-column: 1 / 10;
grid-template-columns: $weaponsGrid;
}
}
div.sheet-weapon-range,
div.sheet-weapon-melee {
width: 100%;
div.sheet-row {
grid-column: 1 / 9;
label[data-i18n-title="modeoptions"],
label[data-i18n-title="range"]{
width: 25%;
}
input[type='number'] {width: 3em;}
select {width: 30%;}
};
div.sheet-exotic-warning { display: none; }
input[value='0'] + div.sheet-exotic-warning { display: block; }
}
}
div.sheet-armor {
$armorGrid: 30% 3.5em 2.5em 2.5em 2.5em 2.5em 2.5em 1em 1em;
div.sheet-headers { grid-template-columns:$armorGrid; }
div.repitem {
grid-template-columns: $armorGrid;
@include repeatingInformation(11, false);
div.sheet-settings {
grid-column: 1 / 11;
grid-template-columns: $armorGrid;
div.sheet-row {
grid-column: 1 / 11;
}
}
}
}
}
/*** AUGS ****/
div.sheet-augs {
$augsGrid: 1fr 5em 5em 1em 1em;;
div.sheet-headers {
display: grid;
grid-template-columns:$augsGrid;
}
div.repitem {
grid-template-columns: $augsGrid;
@include repeatingInformation(6, true);
input[name='attr_augementation'] { text-align: left; }
div.sheet-settings {
grid-column: 1 / 6;
grid-template-columns: $augsGrid;
}
}
}
/*** GEAR ****/
div.sheet-gear {
$gearGrid: 1fr 5em 5em 1em 1em;;
div.sheet-headers {
display: grid;
grid-template-columns:$gearGrid;
}
div.repitem {
grid-template-columns: $gearGrid;
@include repeatingInformation(6, true);
input[name='attr_item'] { text-align: left; }
div.sheet-settings {
grid-column: 1 / 6;
grid-template-columns: $gearGrid;
}
}
}
/***** MAGIC *****/
div.sheet-magic {
$magicGrid: 30% 1.5fr 1.5fr 2fr 2em 1em 1em;
input.sheet-magic-toggle[value='rituals'] ~ .sheet-headers h2:nth-of-type(1n+2) {
@extend %display-none;
}
h2:nth-of-type(1n+2) { text-align: center; }
h3 { color: $blacker; }
div.sheet-headers {
display: grid;
@extend %gridGap;
grid-template-columns:$magicGrid;
h3:nth-of-type(1n+2) { text-align: center; }
}
/***** SPELLS & PREPARTATIONS *****/
div.sheet-spellsForumlas {
div.repitem {
grid-template-columns: $magicGrid;
@include repeatingInformation(8, false);
input[name='attr_damage'],
input[name='attr_dicepool_modifier'] {
width: 3.5em;
}
select[name='attr_category'] { grid-row: 2; }
div.sheet-row { grid-column: 1 / 6; }
div.sheet-settings {
grid-column: 1 / 8;
grid-template-columns: $magicGrid;
}
}
}
/***** RITUALS *****/
div.sheet-magic-rituals {
$ritualsGrid: 1fr 1em 1em;
@include repeatingInformation(4, false);
div.repitem {
grid-template-columns: $ritualsGrid;
label {
&[data-i18n-title='name'] { grid-column: 1 / 4; }
}
div.sheet-row { grid-column: 1 / 4; }
}
div.sheet-settings {
grid-template-columns: $ritualsGrid;
grid-column: 1 / 4;
}
}
div.sheet-magic-preps, div.sheet-magic-spells {
textarea { width: 93%; }
}
/***** PREPARATIONS *****/
div.sheet-magic-preps {
/* READIED PREPARATIONS */
div.sheet-prepared-preparations {
$preparationsGrid: 40% 1fr 1fr 2fr 1em 1em;
div.sheet-headers {
grid-template-columns:$preparationsGrid ;
}
div.repitem {
grid-template-columns: $preparationsGrid ;
@include repeatingInformation(7, false);
div.sheet-settings {
grid-column: 1 / 7;
grid-template-columns: $preparationsGrid;
select { grid-column: 4 / 7; }
textarea { width: 100%; }
}
}
}
}
/***** ADEPT POWERS *****/
div.sheet-powers {
$powersGrid: 1fr 3em 1em 1em;;
div.sheet-headers {
grid-template-columns:$powersGrid;
}
div.repitem {
grid-template-columns: $powersGrid;
@include repeatingInformation(5, true);
div.sheet-settings {
grid-column: 1 / 5;
grid-template-columns: $powersGrid;
}
}
}
}
/*** MATRIX ****/
div.sheet-matrix {
h3 { color: $blacker; }
div.sheet-programs {
$programGrid: 1fr 1em 1em;
div.repitem {
grid-template-columns: $programGrid;
@extend %borderBottom;
@include repeatingInformation(4, true);
}
div.sheet-settings {
grid-column: 1 / 4;
input[type='text'] {
grid-column: 1 / 4;
text-align: left;
}
label {
grid-column: 1 / 4;
}
}
}
div.sheet-complex-forms {
$complexFormsGrid: 30% 1fr 1fr 4em 1em 1em;
div.sheet-headers {
display: grid;
@extend %gridGap;
grid-template-columns: $complexFormsGrid;
h2:nth-of-type(1n+2) { text-align: center; }
}
div.repitem {
grid-template-columns: $complexFormsGrid;
@include repeatingInformation(7, false);
div.sheet-row {
grid-column: 1 / 7;
}
div.sheet-settings {
grid-column: 1 / 7;
grid-template-columns: $complexFormsGrid;
}
}
}
}
}
@import 'src/scss/_pc';
/******************************************************************************************/
/**************************** START OF THE NPC SHEET *************************************/
/****************************************************************************************/
Binary file not shown.

Before

Width:  |  Height:  |  Size: 785 KiB

After

Width:  |  Height:  |  Size: 315 KiB

-222
View File
@@ -1,222 +0,0 @@
<div class="arms pc-col">
<div class="pc-row weapon-box"><!-- ~~~~~~~~ Start of the Weapon Section ~~~~~~~~ -->
<div class="header right-header"><h1 data-i18n="weapons">Weapons</h1><div class="right-tri"></div></div>
<div class="header right-header">
<div class="header htab">
<div class="triangle"></div>
<input class="tab-switch" type="radio" name="attr_weapon_type_toggle" value="range" checked="checked" title="Range weapons" /><h1 data-i18n="ranged">Ranged</h1>
<div class="right-tri"></div>
</div>
<div class="header htab">
<div class="triangle"></div>
<input class="tab-switch" type="radio" name="attr_weapon_type_toggle" value="melee" title="Melee weapons" /><h1 data-i18n="melee">Melee</h1>
<div class="right-tri"></div>
</div>
</div>
<div class="border-box repeat-box">
<div class="pc-box medium-box">
<input class="tab-switch" type="hidden" name="attr_weapon_type_toggle" value="range" />
<div class="weapon-range row-long">
<h3 data-i18n="weapon">Weapon</h3><h3 data-i18n="dam">Dam</h3><h3 data-i18n="acc">Acc</h3><h3 data-i18n="ap">AP</h3><h3 data-i18n="mode">Mode</h3><h3 data-i18n="rc">RC</h3><h3 data-i18n="ammo">Ammo</h3>
</div>
<div class="weapon-range">
<fieldset class="repeating_range">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_weapon" placeholder="Ares Alpha" title="Weapon name" />
<input type="text" name="attr_damage" placeholder="11P" style="width: 11%;" title="Damage" />
<input type="number" name="attr_acc" placeholder="5" title="Accuracy" />
<input type="number" name="attr_ap" placeholder="-2" title="Armor Penetration" />
<select name="attr_mode" title="Current mode" >
<option value="BF" data-i18n="bf">BF</option>
<option value="FA" data-i18n="fa">FA</option>
<option value="Other" data-i18n="other">Other</option>
<option value="SA" data-i18n="sa">SA</option>
<option value="SS" data-i18n="ss">SS</option>
</select>
<input type="number" name="attr_recoil" placeholder="2" title="Recoil Compensation" />
<input type="number" name="attr_ammo" placeholder="42" title="Ammo per clip" />
<div class="settings-row">
<label data-i18n="modeoptions">Mode Options</label><input type="text" name="attr_mode_options" placeholder="SA/BF/FA" title="Available modes" />
<label data-i18n="range">Range</label><input type="text" name="attr_range" placeholder="25/150/350/550" title="Range" />
<label data-i18n="primary">Primary</label><input type="checkbox" class="skill-select" name="attr_primary" value="primary" title="Add to Core tab as primary range" />
</div>
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="combatskill">Combat Skill</label>
<select class="skill-select" name="attr_skill" title="Weapon skill" >
<option class="option-headers" disabled="true" data-i18n="combatskills">Combat Skills</option>
<option class="option-groups" value="@{firearms}" data-i18n="firearms">Firearms Group</option>
<option value="@{archery}" data-i18n="archery">Archery</option>
<option value="@{automatics}" data-i18n="automatics">Automatics</option>
<option value="0" data-i18n="exoticrange">Exotic Range</option>
<option value="@{heavyweapons}" data-i18n="heavyweapons">Heavy Weapons</option>
<option value="@{longarms}" data-i18n="longarms">Longarms</option>
<option value="@{pistols}" data-i18n="pistols">Pistols</option>
<option value="@{throwingweapons}" data-i18n="throwingweapons">Throwing Weapons</option>
<option class="option-headers" disabled="true" data-i18n="vehicleskills">Vehicle Skills</option>
<option value="@{gunnery}" data-i18n="gunnery">Gunnery</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
<input class="skill-select" type="hidden" name="attr_skill" /><br />
<div class="exotic-warning">
<span><i data-i18n="exoticnote">Exotics are not linked to skills. Use Modifier Dice input to set skill dice.</i></span>
</div>
</div>
<div class="settings-row">
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
</div>
<div class="display">
<div class="display-row" title="Roll attack">
<input class="flag-primary" type="hidden" name="attr_primary" value="" /><div title="Primary"><span>S</span></div>
<button type="roll" name="range" value="@{gm_toggle} &{template:rolls}{{header=@{weapon}}}{{base=^{agility}}}{{dice=[[((@{skill}+@{dicepool}+@{agility})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=@{mode}, ACC @{acc}, DV @{damage}, AP @{ap}}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_weapon"></span></button>
</div>
<div class="display-row" title="Damage"><span name="attr_damage"></span></div>
<div class="display-row" title="Accuracy"><span name="attr_acc"></span></div>
<div class="display-row" title="Armor Penetration"><span name="attr_ap"></span></div>
<select name="attr_mode" title="Current mode">
<option value="BF" data-i18n="bf">BF</option>
<option value="FA" data-i18n="fa">FA</option>
<option value="Other" data-i18n="other">Other</option>
<option value="SA" data-i18n="sa">SA</option>
<option value="SS" data-i18n="ss">SS</option>
</select>
<div class="display-row" title="Recoil Compensation"><span name="attr_recoil"></span></div>
<div class="display-row" title="Armor per clip"><span name="attr_ammo"></span></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc" title="Mode options"><i><span name="attr_mode_options"></span></i></div>
<div class="desc" title="Range"><i><span name="attr_range"></span></i></div>
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_range" type="action">x</button>
</fieldset>
</div>
<div class="weapon-melee row-long">
<h3 data-i18n="weapon">Weapon</h3><h3 data-i18n="reach">Reach</h3><h3 data-i18n="dam">Dam</h3><h3 data-i18n="acc">Acc</h3><h3 data-i18n="ap">AP</h3>
</div>
<div class="weapon-melee">
<fieldset class="repeating_melee">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_weapon" placeholder="Katana" title="Weapon name" />
<input type="number" name="attr_reach" placeholder="1" title="Reach"/>
<input type="text" name="attr_damage" placeholder="6P" title="Damage"/>
<input type="number" name="attr_acc" placeholder="7" title="Accuracy"/>
<input type="number" name="attr_ap" placeholder="-3" title="Armor Penetration"/>
<label data-i18n="primary">Primary</label><input type="checkbox" class="skill-select" name="attr_primary" value="primary" title="Add to Core tab as primary melee"/>
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="combatskill">Combat Skill</label>
<select class="skill-select" name="attr_skill" title="Weapon skill">
<option class="option-headers" disabled="true" data-i18n="combatskills">Combat Skills</option>
<option class="option-groups" value="@{closecombat}" data-i18n="closecombat">Close Combat Group</option>
<option value="@{blades}" data-i18n="blades">Blades</option>
<option value="@{clubs}" data-i18n="clubs">Clubs</option>
<option value="0" data-i18n="exoticmelee">Exotic Melee</option>
<option value="@{unarmedcombat}" data-i18n="unarmedcombat">Unarmed Combat</option>
<option class="option-headers" disabled="true" data-i18n="vehicleskills">Vehicle Skills</option>
<option value="@{gunnery}" data-i18n="gunnery">Gunnery</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="+2" title="Applicable specialization"/>
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus"/>
<div class="exotic-warning">
<span><i data-i18n="exoticnote">Exotic weapons are currently not linked to the skills section. Use Modifier Dice input to set dicepool.</i></span>
</div>
</div>
<div class="settings-row">
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
</div>
<div class="display">
<div class="display-row" title="Roll attack">
<input class="flag-primary" type="hidden" name="attr_primary" value="" /><div title="Primary"><span>S</span></div>
<button type="roll" name="melee" value="@{gm_toggle} &{template:rolls}{{header=@{weapon}}}{{base=^{agility}}}{{dice=[[((@{skill}+@{dicepool}+@{agility})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=ACC @{acc}, DV @{damage}, AP @{ap}, Reach @{reach}}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_weapon"></span></button>
</div>
<div class="display-row" title="Reach"><span name="attr_reach"></span></div>
<div class="display-row" title="Damage"><span name="attr_damage"></span></div>
<div class="display-row" title="Accuracy"><span name="attr_acc"></span></div>
<div class="display-row" title="Armor Penetration"><span name="attr_ap"></span></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_melee" type="action">x</button>
</fieldset>
</div>
</div>
</div>
</div><!-- ~~~~~~~~ End of the WEAPON Section ~~~~~~~~ -->
<div class="pc-row"><!-- ~~~~~~~~ Start of the ARMOR Section ~~~~~~~~ -->
<div class="header right-header"><h1>Armor</h1><div class="right-tri"></div></div>
<div class="border-box repeat-box armor-box">
<div class="pc-box medium-box">
<div class="row-long">
<h3 data-i18n="armor">Armor</h3><h3 data-i18n="rating">Rating</h3><h3 data-i18n="acid">Acid</h3><h3 data-i18n="cold">Cold</h3><h3 data-i18n="elec">Elec.</h3><h3 data-i18n="fire">Fire</h3><h3 data-i18n="radi">Radi.</h3>
</div>
<fieldset class="repeating_armor">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Armor Jacket" title="Armor name" />
<input type="number" name="attr_rating" min="0" value="0" placeholder="12" title="Rating" />
<input type="number" name="attr_acid_modifier" min="0" value="0" placeholder="+5" title="Acid modifier" />
<input type="number" name="attr_cold_modifier" min="0" value="0" placeholder="0" title="Cold modifier" />
<input type="number" name="attr_electrical_modifier" min="0" value="0" placeholder="+5" title="Electrical modifier" />
<input type="number" name="attr_fire_modifier" min="0" value="0" placeholder="0" title="Fire modifier" />
<input type="number" name="attr_radiation_modifier" min="0" value="0" placeholder="0" title="Radiation modifier" />
<div class="settings-row">
<label data-i18n="primary">Primary</label><input type="checkbox" class="skill-select" name="attr_primary" value="primary" title="Add to Core tab as primary armor" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" min="0" value="0" title="Additional dicepool bonus" />
</div>
<div class="settings-row">
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
</div>
<div class="display">
<div class="display-row" title="Soak roll">
<input class="flag-primary" type="hidden" name="attr_primary" value="" /><div title="Primary"><span>S</span></div>
<button type="roll" name="soak" value="@{gm_toggle} &{template:rolls}{{header=^{soak}}}{{base=^{body} ♦ ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button>
</div>
<div class="display-row hoverswitch" title="Armor roll">
<button type="roll" name="armor" value="@{gm_toggle} &{template:rolls}{{header=@{armor}}}{{base= Armor}}{{dice=[[((@{rating})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<span class="default" name="attr_rating"></span><!--<span class="hover" name="attr_soak"></span>--></button>
</div>
<div class="display-row hoverswitch" title="Acid protection roll"><button type="roll" name="acid protection" value="@{gm_toggle} &{template:rolls}{{header=^{acidprotection}}}{{base=^{body} ♦ ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier}+@{acid_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<span class="default" name="attr_acid_modifier"></span><!--<span class="hover" name="attr_acid_protection"></span>--></button>
</div>
<div class="display-row hoverswitch" title="Cold protection roll"><button type="roll" name="cold protection" value="@{gm_toggle} &{template:rolls}{{header=^{coldprotection}}}{{base=^{body} ♦ ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier}+@{cold_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<span class="default" name="attr_cold_modifier"></span><!--<span class="hover" name="attr_cold_protection"></span>--></button>
</div>
<div class="display-row hoverswitch" title="Electrical protection roll"><button type="roll" name="electrical protection" value="@{gm_toggle} &{template:rolls}{{header=^{electricalprotection}}}{{base=^{body} ♦ ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier}+@{electrical_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<span class="default" name="attr_electrical_modifier"></span><!--<span class="hover" name="attr_electrical_protection"></span>--></button>
</div>
<div class="display-row hoverswitch" title="Fire protection roll"><button type="roll" name="fire protection" value="@{gm_toggle} &{template:rolls}{{header=^{fireprotection}}}{{base=^{body} ♦ ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier}+@{fire_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<span class="default" name="attr_fire_modifier"></span><!--<span class="hover" name="attr_fire_protection"></span>--></button>
</div>
<div class="display-row hoverswitch" title="Radiation protection roll"><button type="roll" name="radiation protection" value="@{gm_toggle} &{template:rolls}{{header=^{radiationprotection}}}{{base=^{body} ♦ ^{armor}}}{{dice=[[((@{body}+@{rating}+@{dicepool_modifier}+@{radiation_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<span class="default" name="attr_radiation_modifier"></span><!--<span class="hover" name="attr_radiation_protection"></span>--></button>
</div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_armor" type="action">x</button>
</fieldset>
</div>
</div>
</div><!-- ~~~~~~~~ End of the ARMOR Section ~~~~~~~~ -->
</div>
-34
View File
@@ -1,34 +0,0 @@
<div class="augs pc-col">
<div class="pc-row">
<div class="header right-header"><h1 data-i18n="augmentations">Augmentations</h1><div class="right-tri"></div></div>
<div class="border-box repeat-box aug-box">
<div class="pc-box medium-box">
<div class="row-long">
<h3 data-i18n="augmentations">Augementation</h3><h3 data-i18n="rating">Rating</h3><h3 data-i18n="essence">Essence</h3>
</div>
<fieldset class="repeating_augementations">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_augmentation" placeholder="Augementation" title="Augementation name" />
<input type="number" name="attr_rating" placeholder="#" title="Rating" />
<input type="text" name="attr_essence" placeholder="6" style="width: 10%" title="Essence cost" />
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display settings" />
<div class="display-row" title="Augementation"><span name="attr_augmentation"></span></div>
<div class="display-row" title="Rating"><span name="attr_rating"></span></div>
<div class="display-row" title="Essence"><span name="attr_essence"></span></div>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_augementations" type="action">x</button>
</fieldset>
</div>
</div>
</div>
</div>
-51
View File
@@ -1,51 +0,0 @@
<fieldset class="repeating_forms">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Editor" title="Complex Form name" />
<select name="attr_target" title="Target">
<option class="option" value="Device" selected="selected" data-i18n="device">Device</option>
<option class="option" value="File" data-i18n="file">File</option>
<option class="option" value="Host" data-i18n="host">Host</option>
<option class="option" value="IC" data-i18n="ic">IC</option>
<option class="option" value="Persona" data-i18n="persona">Persona</option>
<option class="option" value="Other" data-i18n="other">Other</option>
<option class="option" value="Self" data-i18n="self">Self</option>
<option class="option" value="Sprite" data-i18n="sprite">Sprite</option>
</select>
<select name="attr_duration" title="Duration">
<option value="Extended" data-i18n="extended">Extended</option>
<option value="Instant" data-i18n="instant">Instant</option>
<option value="Permanent" data-i18n="permanent">Permanent</option>
<option value="Other" data-i18n="other">Other</option>
<option value="Sustained" data-i18n="sustained">Sustained</option>
</select>
<input type="number" name="attr_fade" value="" placeholder="-1" title="Fade code" />
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label>Tech. Skill</label>
<select class="skill-select" name="attr_skill" title="Technical skill" >
<option class="option-headers" disabled="true" data-i18n="technicalskills">Technical Skills</option>
<option class="option-groups" value="@{electronics}" data-i18n="electronicsgroup">Electronics Group</option>
<option value="@{software}" selected="selected" data-i18n="software">Software</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
</div>
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" />
<div class="display-row"><button type="roll" name="complex form" value="@{gm_toggle} &{template:rolls}{{header=@{name}}}{{base=^{resonance}}}{{dice=[[((@{skill}+@{dicepool}+@{resonance})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=Level ?{Level|}, Fade [[?{Level|}+(@{fade})]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button></div>
<div class="display-row" title="Target"><span name="attr_target"></span></div>
<div class="display-row" title="Duration"><span name="attr_duration"></span></div>
<div class="display-row" style="text-align: center;" title="Fade code"><span name="attr_fade"></span></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_forms" type="action">x</button>
</fieldset>
+8 -8
View File
@@ -5,18 +5,18 @@
<div class="pc-box small-box core-combat">
<div class="row-long cc-arm">
<h2 data-i18n="primaryarmor">Primary Armor</h2>
<button type="roll" name="soak" value="@{gm_toggle} &{template:rolls}{{header=^{soak}}}{{base=^{base}}}{{dice=[[((@{soak})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}} style="width: 32%;">
<button type="roll" name="roll_soak" value="@{gm_toggle} &{template:rolls}{{header=^{soak}}}{{base=^{base}}}{{dice=[[((@{soak})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}} style="width: 32%;">
<span name="attr_armor_name" title="@{soak}"></span></button>
<h3 data-i18n="rating">Rating</h3>
<button type="roll" name="armor" value="@{gm_toggle} &{template:rolls}{{header=^{armor}}}{{base=^{armor}}}{{dice=[[((@{armor_rating})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<button type="roll" name="roll_armor" value="@{gm_toggle} &{template:rolls}{{header=^{armor}}}{{base=^{armor}}}{{dice=[[((@{armor_rating})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}">
<span name="attr_armor_rating" title="@{armor_rating}"></span></button>
<div class="armor-buttons">
<button type="roll" name="defense" value="@{gm_toggle} &{template:rolls}{{header=^{defense}}}{{base=^{base}}}{{dice=[[((@{defense})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Defense Roll"><span class="pictosC" title="@{defense}">e</span></button>
<button type="roll" name="acid protection" value="@{gm_toggle} &{template:rolls}{{header=^{acidprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{acid_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Acid Protection"><span class="pictos3" title="@{acid_modifier}">d</span></button>
<button type="roll" name="cold protection" value="@{gm_toggle} &{template:rolls}{{header=^{coldprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{cold_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Cold Protection"><span class='pictos' title="@{cold_modifier}">b</span></button>
<button type="roll" name="electrical protection" value="@{gm_toggle} &{template:rolls}{{header=^{electricalprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{electrical_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Electrical Protection"><span class='pictos' title="@{electrical_modifier}">e</span></button>
<button type="roll" name="fire protection" value="@{gm_toggle} &{template:rolls}{{header=^{fireprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{fire_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Fire Protection"><span class="pictos3" title="@{fire_modifier}">j</span></button>
<button type="roll" name="radiation protection" value="@{gm_toggle} &{template:rolls}{{header=^{radiationprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{radiation_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Radiation Protection"><span class="pictos3" title="@{radiation_modifier}">l</span></button>
<button type="roll" name="roll_defense" value="@{gm_toggle} &{template:rolls}{{header=^{defense}}}{{base=^{base}}}{{dice=[[((@{defense})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Defense Roll"><span class="pictosC" title="@{defense}">e</span></button>
<button type="roll" name="roll_acid_protection" value="@{gm_toggle} &{template:rolls}{{header=^{acidprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{acid_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Acid Protection"><span class="pictos3" title="@{acid_modifier}">d</span></button>
<button type="roll" name="roll_cold_protection" value="@{gm_toggle} &{template:rolls}{{header=^{coldprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{cold_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Cold Protection"><span class='pictos' title="@{cold_modifier}">b</span></button>
<button type="roll" name="roll_electrical_protection" value="@{gm_toggle} &{template:rolls}{{header=^{electricalprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{electrical_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Electrical Protection"><span class='pictos' title="@{electrical_modifier}">e</span></button>
<button type="roll" name="roll_fire_protection" value="@{gm_toggle} &{template:rolls}{{header=^{fireprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{fire_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Fire Protection"><span class="pictos3" title="@{fire_modifier}">j</span></button>
<button type="roll" name="roll_radiation_protection" value="@{gm_toggle} &{template:rolls}{{header=^{radiationprotection}}}{{base=^{base}}}{{dice=[[((@{soak}+@{radiation_modifier})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Radiation Protection"><span class="pictos3" title="@{radiation_modifier}">l</span></button>
</div>
</div>
<div class="row-long cc-row">
-30
View File
@@ -1,30 +0,0 @@
<div class="gear pc-col">
<div class="header right-header"><h1 data-i18n="gear">Gear</h1><div class="right-tri"></div></div>
<div class="border-box repeat-box item-box">
<div class="pc-box medium-box">
<div class="row-long">
<h3 data-i18n="item">Item</h3><h3 data-i18n="rating">Rating</h3>
</div>
<fieldset class="repeating_items">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_item" placeholder="Item name" title="Item name" />
<input type="number" name="attr_rating" placeholder="#" title="Rating"/>
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Settings toggle" />
<div class="display-row" title="Item name"><span name="attr_item"></span></div>
<div class="display-row" title="Rating"><span name="attr_rating"></span></div>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_items" type="action">x</button>
</fieldset>
</div>
</div>
</div>
@@ -45,7 +45,7 @@
Chummer frequently has the wrong information for <strong>Weapons</strong>. Review them in the Arms tab after clicking apply.
</li>
<li>
<strong>Specializations</strong> will not be applied to Weapons or Magic. You will need to manually update the checkbox.
<strong>specialization</strong> will not be applied to Weapons or Magic. You will need to manually update the checkbox.
</li>
<li>
<strong>Vehicles</strong> will not be imported.
+113
View File
@@ -0,0 +1,113 @@
<div class="row-long">
<label data-i18n="model">Model</label><input type="text" name="attr_cyberdeck" value="" placeholder="Sony CYI-720" title="Cyberdeck name" />
</div>
<div class="row-long">
<label><button type="roll" name="device rating" value="&{template:rolls}{{header=^{matrixsoak}}}{{base=^{devicerating}}}{{dice=[[((@{device_rating}+@{firewall})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll matrix soak" data-i18n="devicerating">Device Rating</button></label><input type="number" name="attr_device_rating" min="0" value="" placeholder="4" style="margin-right: 15%;" title="@{device_rating}" />
<label data-i18n="attributearray">Attribute Array</label>
<input type="number" name="attr_attribute_1" min="0" value="" placeholder="7" />
<input type="number" name="attr_attribute_2" min="0" value="" placeholder="6" />
<input type="number" name="attr_attribute_3" min="0" value="" placeholder="5" />
<input type="number" name="attr_attribute_4" min="0" value="" placeholder="4" />
</div>
<div class="row-long">
<h3 data-i18n="total">Total</h3><h3 data-i18n="temp">Temp</h3><h3 data-i18n="modifier">modifier</h3><h3 data-i18n="base">Base</h3><h3 data-i18n="baseslider">Base slider</h3><br />
<label><button type="roll" name="attack" value="&{template:rolls}{{header=^{attack}}}{{base=^{attack}}}{{dice=[[(@{attack}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll attack" data-i18n="attack">Attack</button>
</label>
<div class="matrix-tot" title="@{attack}" ><span name="attr_attack"></span></div><span> = </span>
<input type="number" name="attr_attack_temp" min="0" value="" placeholder="0" title="@{attack_temp}" /><spam> + </spam>
<input type="number" name="attr_attack_modifier" min="0" value="" placeholder="0" title="@{attack_modifier}" /><spam> + </spam>
<input type="number" name="attr_attack_base" min="0" value="" placeholder="7" title="@{attack_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixAttack">
<input type="radio" name="attr_attack_base" value="1" /><span></span>
<input type="radio" name="attr_attack_base" value="2" /><span></span>
<input type="radio" name="attr_attack_base" value="3" /><span></span>
<input type="radio" name="attr_attack_base" value="4" /><span></span>
<input type="radio" name="attr_attack_base" value="5" /><span></span>
<input type="radio" name="attr_attack_base" value="6" /><span></span>
<input type="radio" name="attr_attack_base" value="7" /><span></span>
<input type="radio" name="attr_attack_base" value="8" /><span></span>
<input type="radio" name="attr_attack_base" value="9" /><span></span>
<input type="radio" name="attr_attack_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="row-long">
<label><button type="roll" name="sleaze" value="&{template:rolls}{{header=^{sleaze}}}{{base=^{base}}}{{dice=[[(@{sleaze}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll sleaze" data-i18n="sleaze">Sleaze</button></label>
<div class="matrix-tot" title="@{sleaze}" ><span name="attr_sleaze"></span></div><span> = </span>
<input type="number" name="attr_sleaze_temp" min="0" value="" placeholder="0" title="@{sleaze_temp}" /><spam> + </spam>
<input type="number" name="attr_sleaze_modifier" min="0" value="" placeholder="0" title="@{sleaze_modifier}" /><spam> + </spam>
<input type="number" name="attr_sleaze_base" min="0" value="" placeholder="6" title="@{sleaze_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixSleaze">
<input type="radio" name="attr_sleaze_base" value="1" /><span></span>
<input type="radio" name="attr_sleaze_base" value="2" /><span></span>
<input type="radio" name="attr_sleaze_base" value="3" /><span></span>
<input type="radio" name="attr_sleaze_base" value="4" /><span></span>
<input type="radio" name="attr_sleaze_base" value="5" /><span></span>
<input type="radio" name="attr_sleaze_base" value="6" /><span></span>
<input type="radio" name="attr_sleaze_base" value="7" /><span></span>
<input type="radio" name="attr_sleaze_base" value="8" /><span></span>
<input type="radio" name="attr_sleaze_base" value="9" /><span></span>
<input type="radio" name="attr_sleaze_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="row-long">
<label><button type="roll" name="data processing" value="&{template:rolls}{{header=^{data_processing}}}{{base=^{base}}}{{dice=[[(@{data_processing}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll data processing" data-i18n="dataproc">Data Proc.</button></label>
<div class="matrix-tot" title="@{data_processing}" ><span name="attr_data_processing"></span></div><span> = </span>
<input type="number" name="attr_data_processing_temp" min="0" alue="" placeholder="0" title="@{data_processing_temp}" /><spam> + </spam>
<input type="number" name="attr_data_processing_modifier" min="0" value="" placeholder="0" title="@{data_processing_modifier}" /><spam> + </spam>
<input type="number" name="attr_data_processing_base" min="0" value="" placeholder="5" title="@{data_processing_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixData">
<input type="radio" name="attr_data_processing_base" value="1" /><span></span>
<input type="radio" name="attr_data_processing_base" value="2" /><span></span>
<input type="radio" name="attr_data_processing_base" value="3" /><span></span>
<input type="radio" name="attr_data_processing_base" value="4" /><span></span>
<input type="radio" name="attr_data_processing_base" value="5" /><span></span>
<input type="radio" name="attr_data_processing_base" value="6" /><span></span>
<input type="radio" name="attr_data_processing_base" value="7" /><span></span>
<input type="radio" name="attr_data_processing_base" value="8" /><span></span>
<input type="radio" name="attr_data_processing_base" value="9" /><span></span>
<input type="radio" name="attr_data_processing_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="row-long">
<label><button type="roll" name="firewall" value="&{template:rolls}{{header=^{firewall}}}{{base=^{base}}}{{dice=[[(@{firewall}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll firewall" data-i18n="firewall">Firewall</button></label>
<div class="matrix-tot" title="@{firewall}" ><span name="attr_firewall"></span></div><span> = </span>
<input type="number" name="attr_firewall_temp" min="0" value="" placeholder="0" title="@{firewall_temp}" /><spam> + </spam>
<input type="number" name="attr_firewall_modifier" min="0" value="" placeholder="0" title="@{firewall_modifier}" /><spam> + </spam>
<input type="number" name="attr_firewall_base" min="0" value="" placeholder="4" title="@{firewall_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixFirewall">
<input type="radio" name="attr_firewall_base" value="1" /><span></span>
<input type="radio" name="attr_firewall_base" value="2" /><span></span>
<input type="radio" name="attr_firewall_base" value="3" /><span></span>
<input type="radio" name="attr_firewall_base" value="4" /><span></span>
<input type="radio" name="attr_firewall_base" value="5" /><span></span>
<input type="radio" name="attr_firewall_base" value="6" /><span></span>
<input type="radio" name="attr_firewall_base" value="7" /><span></span>
<input type="radio" name="attr_firewall_base" value="8" /><span></span>
<input type="radio" name="attr_firewall_base" value="9" /><span></span>
<input type="radio" name="attr_firewall_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="con-hex">
<input type="radio" name="attr_matrix_con" value="0" /><h2 data-i18n="conditionmonitor">Condition Monitor</h2>
<input type="radio" name="attr_matrix_con" value="1" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="2" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="3" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="4" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="5" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="6" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="7" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="8" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="9" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="10" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="11" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="12" /><span class="hexagon"></span>
</div>
+777
View File
@@ -0,0 +1,777 @@
<script>
//IMPORTERS
const importHeroLab = (character) => {
console.log(`%c HERO LAB IMPORTER:`, "color: purple; font-weight:bold");
};
const importChummer = (character) => {
//Match Chummer JSON keys with their sheet attribute.
//Chummer name is on the left, Roll20 sheet atribute on right.
const jsonKeys = {
"name": "name"
,"adept": "flag_special"
,"age" : "age"
,"alias": "character_name"
,"armor": "armor"
,"calculatednotoriety": "notoriety"
,"calculatedpublicawareness": "public_awareness"
,"calculatedstreetcred": "street_cred"
,"cmoverflow": "overflow"
,"composure" : "composure"
,"height": "height"
,"initdice": "initiative_dice"
,"initvalue": "initiative_mod"
,"judgeintentions" : "judge_intentions"
,"karma": "karma"
,"liftandcarry": "lift_carry"
,"limitmental": "mental_limit"
,"limitphysical": "physical_limit"
,"limitsocial": "social_limit"
,"magician": "flag_special"
,"memory": "memory"
,"nuyen":"primary_nuyen"
,"physicalcm": "physical_max"
//,"physicalcmfilled": "physical_damage" //RESULTING IN INFINATE LOOP
,"playername": "player_name"
,"sex": "sex"
,"stuncm": "stun_max"
//,"stuncmfilled": "stun_damage"
,"technomancer": "flag_special"
,"totaless": "essence"
,"totalkarma": "total_karma"
,"weight": "weight"
,"indirectdefenseresist": "defense"
};
const attributeKeys = {
"BOD": "body"
,"AGI": "agility"
,"REA": "reaction"
,"STR": "strength"
,"CHA": "charisma"
,"INT": "intuition"
,"LOG": "logic"
,"WIL": "willpower"
,"EDG": "edge"
,"MAG": "magic"
,"RES": "resonance"
};
const processChummer = new Promise((resolve, reject) => {
console.log(`%c CHUMMER IMPORTER`, "color: purple; font-weight:bold");
const sortedKeys = alphabatizeKeys(jsonKeys);
let setText = {
"error": "",
"results": "",
"ignored": ""
};
let update = {};
//MATRIX
const setCyberdeck = (cyberdeck) => {
update["cyberdeck"] = cyberdeck.name;
update["device_rating"] = cyberdeck.devicerating;
update["attribute_1"] = cyberdeck.attack;
update["attribute_2"] = cyberdeck.sleaze;
update["attribute_3"] = cyberdeck.dataprocessing;
update["attribute_4"] = cyberdeck.firewall;
update["matrix_con"] = 0;
}
// PROCESS TOP LEVEL KEYS
Object.keys(sortedKeys).forEach((key) => {
try {
const charSheetAttr = jsonKeys[key];
const chummerValue = character[key];
if ((key === "adept" || key === "magician" || key === "technomancer")) {
if (chummerValue.toUpperCase() === "TRUE") {
update[`${charSheetAttr}`] = (key === "technomancer") ? "resonance" : "magic";
} else if (!update.hasOwnProperty(`${charSheetAttr}`)) { // if we don't have the property set already otherwise keys get overriden
update[`${charSheetAttr}`] = "mundane";
};
} else if (key === "totaless") {
const essence = chummerValue.includes(",") ? chummerValue.replace(",", ".") : chummerValue;
update[`${charSheetAttr}`] = parseFloat(essence) || 6;
} else if (chummerValue && chummerValue != null) {
update[`${charSheetAttr}`] = chummerValue;
} else {
setText["error"] += addFeedback(charSheetAttr, chummerValue);
};
const textUpdate = (update[`${charSheetAttr}`]) ? "results" : "ignored";
const feedbackText = addFeedback(jsonKeys[key].replace("_"," "), update[`${charSheetAttr}`]);
(setText[`results`].includes(feedbackText) || setText[`ignored`].includes(feedbackText)) ? false : setText[`${textUpdate}`] += feedbackText;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(key), error);
};
});
// PROCESS METATYPE
try {
update[`metatype`] = character.metatype;
if (character.metavariant) {
update[`metatype`] += ` (${character.metavariant})`
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(character.metatype), error);
};
// PROCESS ATTRIBUTES
const attributes = character.attributes[1].attribute;
let attributeTotals = {
"essence": update["essence"]
}; // USED FOR LIMITS BELOW
attributes.forEach((object) => {
try {
const charSheetAttr = attributeKeys[object.name];
if (charSheetAttr === "edge") {
update[`${charSheetAttr}`] = object.base;
} else {
update[`${charSheetAttr}_base`] = object.base;
update[`${charSheetAttr}_modifier`] = object.total - object.base;
};
// USED FOR LIMITS BELOW
attributeTotals[`${charSheetAttr}`] = parseInt(object.total) || 0;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(object), error);
};
});
//PROCESS LIMITS
const limitKeys = {
"limitmental": "mental_limit"
,"limitphysical": "physical_limit"
,"limitsocial": "social_limit"
};
Object.keys(limitKeys).forEach((key) => {
//CALCULATE THE BASE FOR LIMIT
const limitCalculate = (attrsArray) => {
return Math.ceil(((attrsArray[0] + attrsArray[1] + (attrsArray[2] * 2))/3))
};
try {
let attrs = [];
if (key === "limitmental") {
attrs.push(attributeTotals["intuition"], attributeTotals["willpower"], attributeTotals["logic"]);
} else if (key === "limitphysical") {
attrs.push(attributeTotals["body"], attributeTotals["reaction"], attributeTotals["strength"]);
} else {
attrs.push(attributeTotals["essence"], attributeTotals["willpower"], attributeTotals["charisma"]);
};
//SET LIMIT MODIFIER EQUAL TO THE TOTAL IN CHUMMER - THE CALCULATED BASE LIMIT
update[`${limitKeys[key]}_modifier`] = parseInt(character[key]) - limitCalculate(attrs);
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(`${key}`), error);
};
});
// LOOP THROUGHT QUALITIES
if (character.qualities != null && character.qualities.quality != null) {
const qualitiesList = getArray(character.qualities.quality);
qualitiesList.forEach((quality) => {
try {
const id = generateRowID();
update[`repeating_quality_${id}_flag`] = "display";
update[`repeating_quality_${id}_quality`] = quality.name;
update[`repeating_quality_${id}_type`] = (quality.qualitytype === "Positive") ? "P" : "N";
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(quality), error);
};
});
}
// LOOP THROUGH SKILLS & GENERATE REPEATING FIELDS
if (character.skills != null && character.skills.skill != null) {
const skillsList = getArray(character.skills.skill);
skillsList.forEach((skill) => {
try {
const rating = parseInt(skill.rating) || 0;
if (rating > 0) {
const id = generateRowID();
const type =
(skill.knowledge.toUpperCase() === "TRUE" && skill.islanguage.toUpperCase() === "TRUE") ? "language" :
(skill.knowledge.toUpperCase() === "TRUE") ? "knowledge" :
"active";
const exotic = skill.exotic.toUpperCase();
const section = `repeating_${type}_${id}`
// Exotic Weapons need their name in Specialization
update[`${section}_flag`] = "display";
update[`${section}_skill`] =
(skill.name === "Exotic Melee Weapon") ? "Exotic Melee" :
(skill.name === "Exotic Ranged Weapon") ? "Exotic Range" :
skill.name;
update[`${section}_display`] =
(skill.name === "Exotic Melee Weapon") ? "Exotic Melee" :
(skill.name === "Exotic Ranged Weapon") ? "Exotic Range" :
skill.name;
update[`${section}_rating`] = skill.rating;
update[`${section}_rating_modifier`] = skill.ratingmod;
const skilltotal = parseInt(skill.rating) + parseInt(skill.ratingmod);
update[`${section}_dicepool`] = skilltotal;
//ACTIVE SKILLS HAVE THEIR TOTAL SAVED IN A HIDDEN ATTRIBUTE
if (type === "active") {
update[skill.name.toLowerCase().replace(/ /g, "")] = skilltotal;
};
//This needs to be verified with multiple specialization
if (skill.skillspecialization && skill.skillspecialization != null) {
const chummerSpecialization = skill.skillspecialization.skillspecialization.name;
const specialization = (chummerSpecialization.includes("[")) ? chummerSpecialization.slice(1, -1) : chummerSpecialization;
update[`${section}_specialization`] = specialization;
} else if (exotic === "TRUE") {
update[`${section}_specialization`] = skill.spec;
};
//CREATE THE DISPLAYS FOR SKILLS
if (update[`${section}_specialization`]) {
update[`${section}_display_specialization`] = `(${update[`${section}_specialization`]})`;
};
//DISPLAY FOR RTG
update[`${section}_display_rating`] = (skill.ratingmod != 0) ? `${skill.rating} (${skilltotal})` : `${skill.rating}`;
const attribute = skill.attribute;
update[`${section}_attribute`] = `@{${attributeKeys[attribute]}}`;
update[`${section}_display_attribute`] = attributeKeys[attribute];
update[`${section}_limit`] =
(attribute === "AGI" || attribute === "BOD" || attribute === "STR" || attribute === "REA") ? `@{physical_limit}` :
(attribute === "WIL" || attribute === "LOG" || attribute === "INT") ? `@{mental_limit}` :
(attribute === "CHA") ? `@{social_limit}` : "none";
};
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(skill), error);
};
});
}
//MOVEMENT
try {
const movement = character.movementwalk.split(",")[0].split("/");
update[`walk`] = movement[0];
update[`run`] = movement[1];
} catch (error) {
setText["error"] += addFeedback("movement", error);
};
//MARTIAL ARTS
if (character.martialarts != null && character.martialarts.martialart != null) {
const martialartsList = getArray(character.martialarts.martialart);
martialartsList.forEach((art) => {
const techniqueList = getArray(art.martialarttechniques.martialarttechnique);
techniqueList.forEach((tech) => {
try {
const id = generateRowID();
update[`repeating_martial_${id}_flag`] = "display";
update[`repeating_martial_${id}_technique`] = tech.name;
update[`repeating_martial_${id}_style`] = art.name;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(art), error);
};
});
});
};
//WEAPON KEYS
const weaponKeys = {
"name": "weapon"
,"damage": "damage"
,"ap": "ap"
,"dicepool": "dicepool"
,"skill": "skill"
,"reach": "reach"
,"rc": "recoil"
,"mode": "mode_options"
,"accuracy": "acc"
};
//WEAPONS
if (character.weapons != null && character.weapons.weapon != null) {
const weaponsList = getArray(character.weapons.weapon);
weaponsList.forEach((weapon) => {
try {
const id = generateRowID();
const section = (weapon.type.toUpperCase() === "MELEE") ? `repeating_melee_${id}` : `repeating_range_${id}`;
const npcWeapon = `repeating_weapon_${id}`;
const category = weapon.category.toUpperCase();
Object.keys(weaponKeys).forEach((key) => {
if (weapon[`${key}`] && weapon[`${key}`] != null) {
update[`${section}_${weaponKeys[key]}`] =
(key != "damage" && weapon[`${key}`].includes("(")) ? getValInParen(weapon[`${key}`]) :
(key === "skill") ? `@{${weapon[`${key}`].toLowerCase().replace(" ", "")}}` :
weapon[`${key}`];
} else if (key === "skill" && category.includes("EXOTIC")) {
update[`${section}_skill`] = 0;
};
});
//EXOTIC WEAPONS NEED SPECIAL HANDLING
if (category.includes("EXOTIC")) {
update[`${section}_dicepool_modifier`] = weapon.dicepool;
};
//RANGED WEAPONS NEED CLIP & RANGES
if (weapon.type.toUpperCase() === "RANGED") {
if (weapon.clips != null && weapon.clips.clip != null) {
const clips = Array.isArray(weapon.clips.clip) ? weapon.clips.clip : [ weapon.clips.clip ];
update[`${section}_ammo`] = clips[0].count;
} else if (weapon.name.includes("Grenade")) {
const gearsList = getArray(character.gears.gear);
gearsList.forEach((gear) => {
if (weapon.name === gear.name) {
update[`${section}_ammo`] = gear.qty || 1;
};
});
} else if (weapon.ammo) {
update[`${section}_ammo`] = weapon.ammo;
};
//RANGE
const rangeList = weapon.ranges;
let range = "";
Object.keys(rangeList).forEach((key) => {
if (key != "name" && rangeList[key] != null) {
const rangeNumber = rangeList[key].split("-")[1];
range += (key === "short") ? `${rangeNumber}` : `/${rangeNumber}`;
};
});
update[`${section}_range`] = range;
};
//ACCESSORIES
if (weapon.accessories) {
let accessories = "";
const accessoriesList = getArray(weapon.accessories.accessory);
accessoriesList.forEach((accessory) => {
accessories += `${accessory["name"]}, `
});
update[`${section}_notes`] = accessories;
};
// TOGGLE THE SETTINGS OFF
update[`${section}_flag`] = "display";
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(weapon), error);
};
});
}
//ARMOR
if (character.armors != null && character.armors.armor != null) {
const armorsList = getArray(character.armors.armor);
armorsList.forEach((armor) => {
try {
const id = generateRowID();
if (armor.category != "Clothing") {
const section = `repeating_armor_${id}`;
let armorMods = "";
let armorGear = "";
// ARMOR NAME
update[`${section}_name`] = armor.name;
// ARMOR sometimes has a bonus
update[`${section}_rating`] = (armor.armor.includes("/+")) ? armor.armor.split("/+")[0] : armor.armor;
// ARMOR MODS
if (armor.armormods && armor.armormods != null) {
const modsList = getArray(armor.armormods.armormod);
modsList.forEach((modification) => {
armorMods += `${modification.name}, `;
if (modification.name === "Nonconductivity") {
update[`${section}_electrical_modifier`] = modification.rating;
} else if (modification.name === "Thermal Damping" || modification === "Insulation") {
update[`${section}_cold_modifier`] = modification.rating;
} else if (modification.name === "Radiation Shielding") {
update[`${section}_radiation_modifier`] = modification.rating;
} else if (modification.name === "Chemical Protection") {
update[`${section}_acid_modifier`] = modification.rating;
} else if (modification.name === "Fire Resistance") {
update[`${section}_fire_modifier`] = modification.rating;
};
});
};
// ARMOR GEAR
if (armor.gears && armor.gears != null) {
const gearList = getArray(armor.gears.gear);
gearList.forEach((gear) => {
if (gear.children) {
const childrenList = getArray(gear.children.gear);
childrenList.forEach((child) => {
armorGear += `${gear.name} (${child.name}), `;
});
} else {
armorGear += `${gear.name}, `;
};
});
};
// HIDE SETTINGS
update[`${section}_flag`] = "display";
update[`${section}_notes`] =
(armorMods && armorGear) ? `Modification: ${armorMods} Gear: ${armorGear}` :
(armorMods) ? `Modification: ${armorMods}` :
(armorGear) ? `Gear: ${armorGear}` : "";
} else {
// Chummer puts Clothing in with armor
const section = `repeating_items_${id}`;
update[`${section}_item`] = armor.name;
update[`${section}_flag`] = "display";
};
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(armor), error);
}
});
}
//AUGMENTATIONS
if (character.cyberwares != null && character.cyberwares.cyberware != null) {
const cyberwaresList = getArray(character.cyberwares.cyberware);
cyberwaresList.forEach((ware) => {
const id = generateRowID();
try {
const section = `repeating_augementations_${id}`;
update[`${section}_flag`] = "display";
update[`${section}_augmentation`] = ware.name;
update[`${section}_rating`] = ware.rating;
update[`${section}_essence`] = ware.ess;
update[`${section}_notes`] = `Grade: ${ware.grade}`;
if (ware.gears != null && ware.gears.gear != null) {
const wareGearList = getArray(ware.gears.gear);
wareGearList.forEach((gear) => {
if (gear.category.toLowerCase().includes("cyberdeck")) {
setCyberdeck(gear);
}
});
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(ware.name), error);
}
});
};
console.log(character);
// GEAR
if (character.gears != null && character.gears.gear != null) {
const gearsList = getArray(character.gears.gear);
gearsList.forEach((gear) => {
const id = generateRowID();
try {
if (gear.name.toLowerCase() === "fake sin") {
const section = `repeating_lifestyle_${id}`;
update[`${section}_name`] = `${gear.extra} (rating ${gear.rating})`;
update[`${section}_lifestyle`] = (gear.location != null) ? `${gear.location},` : "";
update[`${section}_flag`] = "display";
update[`${section}_licenses`] = "";
if (gear.children && gear.children.gear != null) {
const childrenList = getArray(gear.children.gear);
childrenList.forEach((child) => {
update[`${section}_licenses`] += `${child.extra} (rating ${child.rating}), `;
});
}
} else if (gear.category.toLowerCase().includes("cyberdeck")) {
setCyberdeck(gear);
} else if (gear.category.toLowerCase().includes("programs")) {
const section = `repeating_programs_${id}`;
update[`${section}_program`] = gear.name;
update[`${section}_flag`] = "display";
} else {
const section = `repeating_items_${id}`;
let gearNotes = "";
update[`${section}_item`] = gear.name;
update[`${section}_flag`] = "display";
update[`${section}_rating`] = (gear.rating > 0) ? gear.rating : "";
//NAME
update[`${section}_item`] += (gear.name.includes("Ammo:")) ? ` (${gear.extra}) ` : "";
update[`${section}_item`] += (gear.qty > 1) ?` x${gear.qty}` : "";
//NOTES
gearNotes += (gear.location != null) ? `Location: ${gear.location},` : "";
gearNotes += (gear.qty != null) ? ` Qty: ${gear.qty},` : "";
gearNotes += (gear.extra != null) ? ` Extra: ${gear.extra},` : "";
if (gear.children && gear.children != null) {
const childrenList = getArray(gear.children.gear);
childrenList.forEach((child) => {
gearNotes += `${child.name}, `;
});
};
update[`${section}_notes`] = gearNotes;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(gear.name), error);
};
});
};
//SPELL KEYS
const spellKeys = {
"category": "category"
,"name": "name"
,"range": "range"
};
// SPELLS
if (character.spells != null && character.spells.spell != null) {
const spellsList = getArray(character.spells.spell);
spellsList.forEach((spell) => {
try {
const id = generateRowID();
const type = (spell.alchemy.toUpperCase() === "TRUE") ? "preps" : "spell";
const section = `repeating_${type}_${id}`;
Object.keys(spellKeys).forEach((key) => {
if (spell[`${key}`] && spell[`${key}`] != null) {
update[`${section}_${spellKeys[key]}`] = spell[`${key}`];
};
});
// FLAG
update[`${section}_flag`] = "display";
// TYPE
update[`${section}_type`] = (spell.type === "P") ? "Physical" : "Mana";
// DRAIN
update[`${section}_drain`] = spell.dv.replace("F", "");
// SET COMBAT TYPE
if (spell.category.toUpperCase() === "COMBAT") {
const combatType = spell.descriptors.toUpperCase();
update[`${section}_combat_type`] =
(combatType.includes("DIRECT")) ? "Direct, Force " :
(combatType.includes("INDIRECT")) ? "Indirect, Force ?{Force|}, AP -" :
"Force ";
update[`${section}_damage`] = spell.damage;
}
// DURATION
const duration = spell.duration.toUpperCase();
update[`${section}_duration`] =
(duration === "S") ? "Sustained" :
(duration === "I") ? "Instant" :
(duration === "P") ? "Permanent" :
"Special";
// NOTES
if (spell.descriptors != null) {
update[`${section}_notes`] = spell.descriptors;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(spell.name), error);
}
});
}
// POWERS
if (character.powers != null && character.powers.power != null) {
const powersList = getArray(character.powers.power);
powersList.forEach((power) => {
try {
const id = generateRowID();
const section = `repeating_powers_${id}`;
update[`${section}_name`] = (power.fullname != null) ? power.fullname : power.name;
update[`${section}_rating`] = power.rating;
if (power.totalpoints != null) {
update[`${section}_notes`] = `Total Points: ${power.totalpoints}.`;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(power.name), error);
}
});
}
// LIFESTYLES
if (character.lifestyles != null && character.lifestyles.lifestyle != null) {
const lifestyleList = getArray(character.lifestyles.lifestyle);
lifestyleList.forEach((lifestyle) => {
try {
const id = generateRowID();
const section = `repeating_lifestyle_${id}`;
update[`${section}_name`] = lifestyle.name;
update[`${section}_flag`] = "display";
if (lifestyle.qualities != null && lifestyle.qualities.quality) {
const lqualitiesList = getArray(lifestyle.qualities.quality);
let lifestyleQualities = "";
lqualitiesList.forEach((quality) => {
try {
lifestyleQualities += (quality.fullname != null) ? quality.fullname : quality.name;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(quality.name), error);
}
});
update[`${section}_lifestyle`] = lifestyleQualities;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(lifestyle.name), error);
}
});
}
// CONTACTS
if (character.contacts != null && character.contacts.contact != null) {
const contactList = getArray(character.contacts.contact);
contactList.forEach((contact) => {
try {
const id = generateRowID();
const section = `repeating_contacts_${id}`;
let contactNotes = "";
update[`${section}_name`] = (contact.role != null) ? `${contact.name} (${contact.role})` : `${contact.name}`;
update[`${section}_loyalty`] = contact.loyalty;
update[`${section}_connection`] = contact.connection;
update[`${section}_flag`] = "display";
["metatype", "sex", "age", "preferredpayment", "hobbiesvice", "personallife"].forEach((detail) => {
if (contact[`${detail}`] != null) {
contactNotes += `${contact[`${detail}`]}. `
}
});
update[`${section}_notes`] = contactNotes;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(contact.name), error);
}
});
}
// VEHICLE KEYS
const vehicleKeys = {
"handling": "handling_base"
,"accel": "acceleration_base"
,"speed": "speed_base"
,"body": "body_base"
,"armor": "armor_base"
,"sensor": "sensor_base"
,"pilot": "pilot_base"
};
// VEHICLES
/* if (character.vehicles != null && character.vehicles.vehicle != null) {
const vehicleList = getArray(character.vehicles.vehicle);
vehicleList.forEach((vehicle) => {
try {
const id = generateRowID();
const section = `repeating_vehicle_${id}`;
let vehicleNotes = "";
update[`${section}_name`] = vehicle.name;
update[`${section}_flag`] = "display";
Object.keys(vehicleKeys).forEach((key) => {
if (vehicle[`${key}`] && vehicle[`${key}`] != null) {
update[`${section}_${vehicleKeys[`${key}`]}`] =
(vehicle[`${key}`].includes("/")) ? getSplitNum(vehicle[`${key}`]) :
vehicle[`${key}`];
};
});
["attack", "sleaze", "dataprocessing", "firewall", "devicerating"].forEach((matrixAttr) => {
vehicleNotes += (matrixAttr === "devicerating") ? `Device Rating (${vehicle[`${matrixAttr}`]}) ` :
(matrixAttr === "firewall") ? `${vehicle[`${matrixAttr}`]} ` : `${vehicle[`${matrixAttr}`]}/`;
});
if (vehicle.mods != null && vehicle.mods.mod != null) {
const vehicleModsList = getArray(vehicle.mods.mod);
vehicleNotes += "Mods: "
vehicleModsList.forEach((mod) => {
vehicleNotes += (mod.fullname != null) ? `${mod.fullname}, ` : `${mod.name}, `;
});
}
if (vehicle.gears != null && vehicle.gears.gear != null) {
const vehicleGearList = getArray(vehicle.gears.gear);
vehicleNotes += "Gear: "
vehicleGearList.forEach((gear) => {
if (gear.children != null && gear.children.gear != null) {
const vehicleChildrenList = getArray(gear.children.gear);
let vehicleChildrenNotes = "";
vehicleChildrenList.forEach((child) => {
vehicleChildrenNotes += `${child.name}, `;
});
vehicleNotes += `${gear.name} (${vehicleChildrenNotes}), `;
} else {
vehicleNotes += `${gear.name}, `;
};
});
}
update[`${section}_notes`] = vehicleNotes;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(vehicle.name), error);
}
});
}
*/
setCharmancerText(setText);
resolve(update);
console.log(update);
}).then((update) => {
let setText = {
"hidden": ""
};
//GENERATE INPUTS TO SAVE THE DATA
Object.keys(update).forEach((key) => {
const label = (key.includes("_")) ? key.replace("_", " ") : key;
const input = `<label><div>${label}</div><input type="text" name="comp_${key}" value="${update[key]}" /></label>`;
setText[`hidden`] += (setText[`hidden`].includes(input)) ? "" : input;
const feedbackLabel =
(key.includes("repeating")) ? key.split("_")[3] :
(key.includes("_")) ? key.replace("_", " ") : key;
(feedbackLabel === "flag" || feedbackLabel === "display") ? false : setText["results"] += addFeedback(feedbackLabel, update[key]);
});
setAttrs(update);
return setText;
}).then((result) => {
setCharmancerText(result);
});
};
// APPLY Changes
on("mancerfinish:apply", () => {
const mancerData = getCharmancerData();
const mancerValues = mancerData["importer"].values;
Object.keys(mancerValues).forEach((key) => {
if (key == "builder" || key == "jsonData" || key == "hidden") {
delete mancerValues[key];
};
});
clean();
setAttrs(mancerValues, () => {
console.log(`%c APPLY IMPORTER:`, "color: blue; font-weight:bold");
console.log(mancerValues);
deleteCharmancerData(["importer"]);
finishCharactermancer();
});
});
</script>
-192
View File
@@ -1,192 +0,0 @@
<div class="row-long">
<h3 data-i18n="spells">Spells</h3><h3 data-i18n="type">Type</h3><h3 data-i18n="range">Range</h3><h3 data-i18n="duration">Duration</h3><h3 data-i18n="drain">Drain</h3>
</div>
<div class="magic-spells">
<fieldset class="repeating_spell">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Fireball" title="Spell name" />
<select name="attr_type" title="Type">
<option value="Mana" selected="selected" data-i18n="mana">Mana</option>
<option value="Physcial" data-i18n="physical">Physical</option>
</select>
<select name="attr_range" title="Range">
<option value="LOS" selected="selected" data-i18n="los">LOS</option>
<option value="LOS (A)" data-i18n="los (a)">LOS (A)</option>
<option value="Special" data-i18n="special">Special</option>
<option value="T" data-i18n="t">T</option>
<option value="T (A)" data-i18n="t (a)">T (A)</option>
</select>
<select name="attr_duration" title="Duration">
<option value="Instant" selected="selected" data-i18n="instant">Instant</option>
<option value="Permanent" data-i18n="permanent">Permanent</option>
<option value="Special" data-i18n="special">Special</option>
<option value="Sustained" data-i18n="sustained">Sustained</option>
</select>
<input type="number" name="attr_drain" value="" placeholder="-1" title="Drain code" />
<div class="settings-row">
<label data-i18n="category">Spell Category</label>
<select name="attr_category" title="Category">
<option class="option" value="Combat" selected="selected" data-i18n="combat">Combat</option>
<option class="option" value="Detection" data-i18n="detection">Detection</option>
<option class="option" value="Health" data-i18n="health">Health</option>
<option class="option" value="Illusion" data-i18n="illusion">Illusion</option>
<option class="option" value="Manipulation" data-i18n="manipulation">Manipulation</option>
<option class="option" value="Other" data-i18n="other">Other</option>
</select>
<input class="category" name="attr_category" type="hidden" value="Combat">
<div class="combat-type-hide">
<label data-i18n="combattype">Combat Type</label>
<select class="combat-type" name="attr_combat_type" title="Combat type">
<option class="option" value="Force " selected="selected"></option>
<option class="option" value="Direct, Force " data-i18n="direct">Direct</option>
<option class="option" value="Indirect, Force ?{Force|}, AP -" data-i18n="indirect">Indirect</option>
</select>
<label class="combat-type" data-i18n="damagetype">Combat Damage</label><input class="spell-input" type="text" name="attr_damage" value="" placeholder="P" title="Damage type" style="width: 8%;"/>
</div>
</div>
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="magicalskill">Magic Skill</label>
<select class="skill-select" name="attr_skill" title="Magic skill">
<option class="option-headers" disabled="true" data-i18n="magicalskills">Magic Skills</option>
<option class="option-groups" value="@{sorcery}" data-i18n="sorcerygroup">Sorcery Group</option>
<option value="@{spellcasting}" selected="selected" data-i18n="spellcasting">Spellcasting</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
</div>
<div class="settings-row">
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
</div>
<div class="display">
<div class="display-row" title="Spell roll">
<button type="roll" name="spell" value="@{gm_toggle} &{template:rolls}{{header=@{name}}}{{base=^{magic}}}{{dice=[[((@{skill}+@{dicepool}+@{magic})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=@{combat_type}?{Force|}}}{{drain=[[?{Force|}+(@{drain})]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button>
</div>
<div class="display-row" title="Type"><span name="attr_type"></span></div>
<div class="display-row" title="Range"><span name="attr_range"></span></div>
<div class="display-row" title="Duration"><span name="attr_duration"></span></div>
<div class="display-row" style="text-align: center;" title="Drain code"><span name="attr_drain"></span></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><i><span name="attr_category" title="Category"></span></i></div>
<div class="desc"><i><input class="combat-type" type="hidden" name="attr_combat_type" title="Combat type" /><span></span></i></div>
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_spell" type="action">x</button>
</fieldset>
</div>
<div class="magic-preps">
<fieldset class="repeating_preps">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Fireball" title="Spell name" />
<select name="attr_type" title="Type">
<option value="Mana" selected="selected" data-i18n="mana">Mana</option>
<option value="Physcial" data-i18n="physical">Physical</option>
</select>
<select name="attr_range" title="Range">
<option value="LOS" selected="selected" data-i18n="los">LOS</option>
<option value="LOS (A)" data-i18n="losa">LOS (A)</option>
<option value="Special" data-i18n="special">Special</option>
<option value="T" data-i18n="t">T</option>
<option value="T (A)" data-i18n="ta">T (A)</option>
</select>
<select name="attr_duration" title="Duration">
<option value="Instant" selected="selected" data-i18n="instant">Instant</option>
<option value="Permanent" data-i18n="permanent">Permanent</option>
<option value="Special" data-i18n="special">Special</option>
<option value="Sustained" data-i18n="sustained">Sustained</option>
</select>
<input type="number" name="attr_drain" value="" placeholder="-1" title="Drain code" />
<div class="settings-row">
<label data-i18n="category">Spell Category</label>
<select name="attr_category" title="Category">
<option class="option" value="Combat" selected="selected" data-i18n="combat">Combat</option>
<option class="option" value="Detection" data-i18n="detection">Detection</option>
<option class="option" value="Health" data-i18n="health">Health</option>
<option class="option" value="Illusion" data-i18n="illusion">Illusion</option>
<option class="option" value="Manipulation" data-i18n="manipulation">Manipulation</option>
<option class="option" value="Other" data-i18n="other">Other</option>
</select>
<input class="category" name="attr_category" type="hidden" value="Combat">
<div class="combat-type-hide">
<label data-i18n="combattype">Combat Type</label>
<select class="combat-type" name="attr_combat_type" title="Combat type">
<option class="option" value="Force " selected="selected"></option>
<option class="option" value="Direct, Force " data-i18n="direct">Direct</option>
<option class="option" value="Indirect, Force ?{Force|}, AP -" data-i18n="indirect">Indirect</option>
</select>
<label class="combat-type" data-i18n="damagetype">Combat Damage</label><input class="spell-input" type="text" name="attr_damage" value="" placeholder="P" title="Damage type" style="width: 8%;"/>
</div>
</div>
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="magicalskill">Magic Skill</label>
<select class="skill-select" name="attr_skill" title="Magic skill">
<option class="option-headers" disabled="true" data-i18n="magicalskills">Magic Skills</option>
<option class="option-groups" value="@{enchanting}" data-i18n="enchantinggroup">Enchanting Group</option>
<option value="@{alchemy}" selected="selected" data-i18n="alchemy">Alchemy</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
</div>
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Alchemy notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" />
<div class="display-row" title="Spell roll"><button type="roll" name="alchemic" value="@{gm_toggle} &{template:rolls}{{header=@{name}}}{{base=^{magic}}}{{dice=[[((@{skill}+@{dicepool}+@{magic})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=@{combat_type}?{Force|}}}{{drain=[[?{Force|}+(@{drain})]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button></div>
<div class="display-row" title="Type"><span name="attr_type"></span></div>
<div class="display-row" title="Range"><span name="attr_range"></span></div>
<div class="display-row" title="Duration"><span name="attr_duration"></span></div>
<div class="display-row" style="text-align: center;" title="Drain code"><span name="attr_drain"></span></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><i><span name="attr_category" title="Category"></span></i></div>
<div class="desc"><i><input class="combat-type" type="hidden" name="attr_combat_type" title="Combat type"/><span></span></i></div>
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_preps" type="action">x</button
</fieldset>
</div>
<div class="magic-rituals">
<fieldset class="repeating_ritual">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Curse (MATERIAL LINK, SPELL)" title="Ritual name" />
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="magicalskill">Magic Skill</label>
<select class="skill-select" name="attr_skill" title="Magic skill">
<option class="option-headers" disabled="true" data-i18n="magicalskills">Magic Skills</option>
<option class="option-groups" value="@{sorcery}" data-i18n="sorcerygroup">Sorcery Group</option>
<option value="@{ritualspell}" selected="selected" data-i18n="ritualspellcasting">Ritual Spellcasting</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
</div>
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Ritual notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" />
<div class="display-row" class="Ritual roll"><button type="roll" name="ritual" value="@{gm_toggle} &{template:rolls}{{header=@{name}}}{{base=^{magic}}}{{dice=[[((@{skill}+@{dicepool}+@{magic})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=Force ?{Force|}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_ritual" type="action">x</button>
</fieldset>
</div>
-138
View File
@@ -1,138 +0,0 @@
<div class="header right-header"><h1 data-i18n="cyberdeck">Cyberdeck</h1><div class="right-tri"></div></div>
<div class="border-box repeat-box matrix-box">
<div class="pc-box medium-box cyberdeck">
<div class="row-long">
<label data-i18n="model">Model</label><input type="text" name="attr_cyberdeck" value="" placeholder="Sony CYI-720" title="Cyberdeck name" />
</div>
<div class="row-long">
<label><button type="roll" name="device rating" value="&{template:rolls}{{header=^{matrixsoak}}}{{base=^{devicerating}}}{{dice=[[((@{device_rating}+@{firewall})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll matrix soak" data-i18n="devicerating">Device Rating</button></label><input type="number" name="attr_device_rating" min="0" value="" placeholder="4" style="margin-right: 15%;" title="@{device_rating}" />
<label data-i18n="attributearray">Attribute Array</label>
<input type="number" name="attr_attribute_1" min="0" value="" placeholder="7" />
<input type="number" name="attr_attribute_2" min="0" value="" placeholder="6" />
<input type="number" name="attr_attribute_3" min="0" value="" placeholder="5" />
<input type="number" name="attr_attribute_4" min="0" value="" placeholder="4" />
</div>
<div class="row-long">
<h3 data-i18n="total">Total</h3><h3 data-i18n="temp">Temp</h3><h3 data-i18n="modifier">modifier</h3><h3 data-i18n="base">Base</h3><h3 data-i18n="baseslider">Base slider</h3><br />
<label><button type="roll" name="attack" value="&{template:rolls}{{header=^{attack}}}{{base=^{attack}}}{{dice=[[(@{attack}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll attack" data-i18n="attack">Attack</button>
</label>
<div class="matrix-tot" title="@{attack}" ><span name="attr_attack"></span></div><span> = </span>
<input type="number" name="attr_attack_temp" min="0" value="" placeholder="0" title="@{attack_temp}" /><spam> + </spam>
<input type="number" name="attr_attack_modifier" min="0" value="" placeholder="0" title="@{attack_modifier}" /><spam> + </spam>
<input type="number" name="attr_attack_base" min="0" value="" placeholder="7" title="@{attack_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixAttack">
<input type="radio" name="attr_attack_base" value="1" /><span></span>
<input type="radio" name="attr_attack_base" value="2" /><span></span>
<input type="radio" name="attr_attack_base" value="3" /><span></span>
<input type="radio" name="attr_attack_base" value="4" /><span></span>
<input type="radio" name="attr_attack_base" value="5" /><span></span>
<input type="radio" name="attr_attack_base" value="6" /><span></span>
<input type="radio" name="attr_attack_base" value="7" /><span></span>
<input type="radio" name="attr_attack_base" value="8" /><span></span>
<input type="radio" name="attr_attack_base" value="9" /><span></span>
<input type="radio" name="attr_attack_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="row-long">
<label><button type="roll" name="sleaze" value="&{template:rolls}{{header=^{sleaze}}}{{base=^{base}}}{{dice=[[(@{sleaze}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll sleaze" data-i18n="sleaze">Sleaze</button></label>
<div class="matrix-tot" title="@{sleaze}" ><span name="attr_sleaze"></span></div><span> = </span>
<input type="number" name="attr_sleaze_temp" min="0" value="" placeholder="0" title="@{sleaze_temp}" /><spam> + </spam>
<input type="number" name="attr_sleaze_modifier" min="0" value="" placeholder="0" title="@{sleaze_modifier}" /><spam> + </spam>
<input type="number" name="attr_sleaze_base" min="0" value="" placeholder="6" title="@{sleaze_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixSleaze">
<input type="radio" name="attr_sleaze_base" value="1" /><span></span>
<input type="radio" name="attr_sleaze_base" value="2" /><span></span>
<input type="radio" name="attr_sleaze_base" value="3" /><span></span>
<input type="radio" name="attr_sleaze_base" value="4" /><span></span>
<input type="radio" name="attr_sleaze_base" value="5" /><span></span>
<input type="radio" name="attr_sleaze_base" value="6" /><span></span>
<input type="radio" name="attr_sleaze_base" value="7" /><span></span>
<input type="radio" name="attr_sleaze_base" value="8" /><span></span>
<input type="radio" name="attr_sleaze_base" value="9" /><span></span>
<input type="radio" name="attr_sleaze_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="row-long">
<label><button type="roll" name="data processing" value="&{template:rolls}{{header=^{data_processing}}}{{base=^{base}}}{{dice=[[(@{data_processing}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll data processing" data-i18n="dataproc">Data Proc.</button></label>
<div class="matrix-tot" title="@{data_processing}" ><span name="attr_data_processing"></span></div><span> = </span>
<input type="number" name="attr_data_processing_temp" min="0" alue="" placeholder="0" title="@{data_processing_temp}" /><spam> + </spam>
<input type="number" name="attr_data_processing_modifier" min="0" value="" placeholder="0" title="@{data_processing_modifier}" /><spam> + </spam>
<input type="number" name="attr_data_processing_base" min="0" value="" placeholder="5" title="@{data_processing_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixData">
<input type="radio" name="attr_data_processing_base" value="1" /><span></span>
<input type="radio" name="attr_data_processing_base" value="2" /><span></span>
<input type="radio" name="attr_data_processing_base" value="3" /><span></span>
<input type="radio" name="attr_data_processing_base" value="4" /><span></span>
<input type="radio" name="attr_data_processing_base" value="5" /><span></span>
<input type="radio" name="attr_data_processing_base" value="6" /><span></span>
<input type="radio" name="attr_data_processing_base" value="7" /><span></span>
<input type="radio" name="attr_data_processing_base" value="8" /><span></span>
<input type="radio" name="attr_data_processing_base" value="9" /><span></span>
<input type="radio" name="attr_data_processing_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="row-long">
<label><button type="roll" name="firewall" value="&{template:rolls}{{header=^{firewall}}}{{base=^{base}}}{{dice=[[(@{firewall}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}" title="Roll firewall" data-i18n="firewall">Firewall</button></label>
<div class="matrix-tot" title="@{firewall}" ><span name="attr_firewall"></span></div><span> = </span>
<input type="number" name="attr_firewall_temp" min="0" value="" placeholder="0" title="@{firewall_temp}" /><spam> + </spam>
<input type="number" name="attr_firewall_modifier" min="0" value="" placeholder="0" title="@{firewall_modifier}" /><spam> + </spam>
<input type="number" name="attr_firewall_base" min="0" value="" placeholder="4" title="@{firewall_base}" />
<div class="device-attr">
<div class="matrix-bubble matrixFirewall">
<input type="radio" name="attr_firewall_base" value="1" /><span></span>
<input type="radio" name="attr_firewall_base" value="2" /><span></span>
<input type="radio" name="attr_firewall_base" value="3" /><span></span>
<input type="radio" name="attr_firewall_base" value="4" /><span></span>
<input type="radio" name="attr_firewall_base" value="5" /><span></span>
<input type="radio" name="attr_firewall_base" value="6" /><span></span>
<input type="radio" name="attr_firewall_base" value="7" /><span></span>
<input type="radio" name="attr_firewall_base" value="8" /><span></span>
<input type="radio" name="attr_firewall_base" value="9" /><span></span>
<input type="radio" name="attr_firewall_base" value="10" /><span></span>
</div>
</div>
</div>
<div class="con-hex">
<input type="radio" name="attr_matrix_con" value="0" /><h2 data-i18n="conditionmonitor">Condition Monitor</h2>
<input type="radio" name="attr_matrix_con" value="1" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="2" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="3" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="4" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="5" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="6" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="7" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="8" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="9" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="10" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="11" /><span class="hexagon"></span>
<input type="radio" name="attr_matrix_con" value="12" /><span class="hexagon"></span>
</div>
<h3>Programs</h3>
<div class="program-box">
<fieldset class="repeating_programs">
<input type="checkbox" class="settings-toggle" name="attr_flag" checked="checked" title="Settings toggle" /><span>x</span>
<div class="settings">
<div>
<input type="text" name="attr_program" value="" placeholder="Program name" title="Program name" />
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" placeholder="Program description"></textarea>
</div>
</div>
<div class="display">
<input type="checkbox" class="program-toggle" name="attr_program_on" checked="checked" title="Program loaded" /><span class="program-toggle" style="color: #000;">Q</span>
<input class="display-flag" type="checkbox" name="attr_display_flag" />
<div class="display-row" title="Program name"><span name="attr_program"></span></div>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
</fieldset>
</div>
</div>
</div>
-31
View File
@@ -1,31 +0,0 @@
<div class="header right-header">
<h1>Adept Powers or Other Abilities</h1>
<div class="right-tri"></div>
</div>
<div class="border-box repeat-box powers-box">
<div class="pc-box medium-box">
<div class="row-long">
<h3>Name</h3><h3>Rating</h3>
</div>
<fieldset class="repeating_powers">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Adept powers or other ability" title="Ability or power name" />
<input type="number" name="attr_rating" placeholder="#" title="Rating" />
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Power notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" />
<div class="display-row" title="Ability or power name"><span name="attr_name"></span></div>
<div class="display-row" title="Rating"><span name="attr_rating"></span></div>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_powers" type="action">x</button>
</fieldset>
</div>
</div>
+123 -16
View File
@@ -1,6 +1,6 @@
//- ROLL BUTTON
mixin rollButton(header, base, rollFormula)
button(data-i18n=header name=header type='roll' value!=rollBeginging+'{{header=^{'+header+'}}}{{base='+base+'}}{{dice=[[(('+rollFormula+')'+rollEnding) #{header}
button(data-i18n=header name=`roll_${header}` type='roll' value!=rollBeginging+'{{header=^{'+header+'}}}{{base='+base+'}}{{dice=[[(('+rollFormula+')'+rollEnding) #{header}
//- SKILL BUTTON
mixin skillButton(specialization)
@@ -8,27 +8,39 @@ mixin skillButton(specialization)
- const rollFormula = specialization === true ? '@{dicepool}+@{attribute}+2' : '@{dicepool}+@{attribute}';
- const desc = specialization === true ? 'Spec: @{specialization}, @{display_limit}' : '@{display_limit}';
- const display = specialization === true ? 'attr_display_specialization' : 'attr_display';
button(name=rollName type='roll' value!=rollBeginging+'{{header=@{skill}}}{{base=@{display_attribute}}}{{dice=[[(('+rollFormula+')'+rollEnding+'{{desc='+desc+'}}')
button(name=`roll_${rollName}` type='roll' value!=rollBeginging+'{{header=@{skill}}}{{base=@{display_attribute}}}{{dice=[[(('+rollFormula+')'+rollEnding+'{{desc='+desc+'}}')
span(name=display)
//- ROLLS
mixin displayRollButton(button, wounds)
- const rollTemplateBeginning = wounds ? rollBeginging : noWoundsRollBegining;
- const rollTemplateEnding = wounds ? rollEnding : noWoundsRollEnding;
button(name=`roll_${button['name']}` type='roll' value!=rollTemplateBeginning+'{{header='+button['header']+'}}{{base=^{base}}}{{dice=[[(('+button['rollFormula']+')'+rollTemplateEnding+button['desc'])
span(name='attr_'+button['display'])
//- ROLLS
mixin spellRollButton(button)
button(name=`roll_${button['name']}` type='roll' value!=rollBeginging+'{{header='+button['header']+'}}{{base=^{magic}}}{{dice=[[(('+button['rollFormula']+')'+rollEnding+button['desc'])
span(name='attr_'+button['display'])
//- PC WEAPON ROLL BUTTON
mixin weaponRollButton(button)
button(name=`roll_${button['name']}` type='roll' value!=`${rollBeginging}{{header=${button['header']}}}{{base=^{agility}}}`+'{{dice=[[(('+button['rollFormula']+')'+rollEnding+button['desc'])
span(name=`attr_${button['display']}`)
//- SOAK ROLL
mixin soakRoll(header, base, rollForumla)
button(data-i18n=header name=header type='roll' value!=soakRollBeginging+'{{header=^{'+header+'}}}{{base='+base+'}}{{dice=[[(('+rollForumla+')'+soakRollEnding) #{name}
button(data-i18n=header name=`roll_${header}` type='roll' value!=noWoundsRollBegining+'{{header=^{'+header+'}}}{{base='+base+'}}{{dice=[[(('+rollForumla+')'+noWoundsRollEnding) #{name}
//- SPRITE BUTTONS
mixin spriteButton(header, display)
button(name=header type='roll' value!=rollBeginging+'{{header=@{'+header+'}}}{{base=^{level}}}{{dice=[[((@{level}+@{level})'+rollEnding)
button(name=`roll_${header}` type='roll' value!=rollBeginging+'{{header=@{'+header+'}}}{{base=^{level}}}{{dice=[[((@{level}+@{level})'+rollEnding)
span(name='attr_'+display)
//- BUTTONS FOR NPCS
mixin npcButton(button)
button(name=button['name'] type='roll' value!=rollBeginging+'{{header=@{'+button['header']+'}}}{{base=^{base}}}{{dice=[[(('+button['rollFormula']+')'+rollEnding+button['desc'])
span(name='attr_'+button['display'])
//- NPC ATTRIBUTE ROLLS
mixin npcAttributeButton(attribute, rollFormula)
- const abbreviation = attribute.slice(0,1).toLowerCase();
button(data-i18n=abbreviation name=attribute type='roll' value!=rollBeginging+'{{header=^{'+attribute+'}}}{{base=^{base}}}{{dice=[[(('+rollFormula+')'+rollEnding) #{abbreviation}
button(data-i18n=abbreviation name=`roll_${attribute}` type='roll' value!=rollBeginging+'{{header=^{'+attribute+'}}}{{base=^{base}}}{{dice=[[(('+rollFormula+')'+rollEnding) #{abbreviation}
//- ATTRIBUTE SELECTS
mixin attributeSelect(selectedDefault)
@@ -76,14 +88,109 @@ mixin conditionMonitor(conditionTypes)
span /
//- PC FADE & DRAIN ROLLS
mixin fadeDrainSection(fadeOrDrain)
- const defaultFirstAttribute = fadeOrDrain === 'fade' ? 'Resonance' : 'Logic';
+soakRoll(fadeOrDrain, '^{base}', '@{'+fadeOrDrain+'_attribute_1}+@{'+fadeOrDrain+'_attribute_2}+@{'+fadeOrDrain+'_modifier}')
select.attribute-select(name='attr_'+fadeOrDrain+'_attribute_1' title='@{'+fadeOrDrain+'_attribute_1}')
mixin fadeDrainSection(fadeOrDrain, adept)
- const defaultFirstAttribute = fadeOrDrain === 'fade' ? 'Resonance' : adept ? 'Body' : 'Logic';
- const nameFadeorDrain = adept ? 'drain' : fadeOrDrain;
+soakRoll(nameFadeorDrain, '^{base}', `@{${nameFadeorDrain}_attribute_1}+@{${nameFadeorDrain}_attribute_2}+@{${nameFadeorDrain}_modifier}`)
select.attribute-select(name=`attr_${nameFadeorDrain}_attribute_1` title=`@{${nameFadeorDrain}_attribute_1}`)
+attributeSelect(defaultFirstAttribute)
span +
select.attribute-select(name='attr_'+fadeOrDrain+'_attribute_2' title='@{'+fadeOrDrain+'_attribute_2}')
select.attribute-select(name=`attr_${nameFadeorDrain}_attribute_2` title=`@{${nameFadeorDrain}_attribute_2}`)
+attributeSelect('Willpower')
h3(data-i18n='modifier') modifier
label(data-i18n-title='modifier' title='modifier')
input(name='attr_'+fadeOrDrain+'_modifier' title='@{'+fadeOrDrain+'_modifier}' type="number" value=0)
input(name=`attr_${nameFadeorDrain}_modifier` title=`@{${nameFadeorDrain}_modifier}` type='number' value=0)
//- PC SPELLS AND PREPARATIONS
mixin pcSpells(type)
- const rollInfoObject = type === 'preps' ? pcAlchemySpellObject : pcSorcerySpellObject;
- const repeatingSection = `@{repeating_${type}`+'_${x}';
.rows.repeating-container
fieldset(class=`repeating_`+type)
input(name='attr_dicepool' type='hidden' value='0')
button(name=`roll_${type}}` type='roll' value!=rollBeginging+'{{header=@{name}}}{{base=^{magic}}}{{dice=[[((@{skill}+@{dicepool}+@{magic})'+rollEnding+'{{desc=@{combat_type}?{Force|}}}{{drain=[[?{Force|}+(@{drain})]]}}')
span(name='attr_name')
each val in ['type', 'range', 'duration', 'drain']
span.center(name='attr_'+val)
input.collapse-flag(name='attr_display_flag' type='checkbox' checked)
span.pictos i
input.settings-flag(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
.collapse
span(name='attr_notes')
.settings
each val, key in pcCoreSpellObject
- const translationKey = key.toLowerCase();
- const attrName = key.toLowerCase();
if val['type'] === 'select'
select(name=`attr_${attrName}` title=`${repeatingSection}_${attrName}}` value=val['default'])
each type in val['array']
- const i18n = type.toLowerCase();
if val['default'] === i18n
option(data-i18n=i18n value=type 'selected') #{i18n}
else
option(data-i18n=i18n value=type) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name=`attr_${attrName}` placeholder=val['placeholder'] title=`${repeatingSection}_${attrName}}` type=val['type'])
.row
each val, key in pcCatagorySpellObject
- const translationKey = key.toLowerCase().replace(' ', '');
- const attrName = key === 'Combat' ? 'combat_type' : key.toLowerCase();
h3(data-i18n=translationKey) #{key}
if val['type'] === 'select'
select(name=`attr_${attrName}` title=`${repeatingSection}_${attrName}}` value=val['default'])
each type in val['array']
- const i18n = key === 'Combat' ? type.split(' ')[0].replace(',','').toLowerCase() : type.toLowerCase();
if val['default'] === i18n
option(data-i18n=i18n value=type 'selected') #{i18n}
else if i18n === 'force'
option(value=type 'selected')
else
option(data-i18n=i18n value=type) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name=`attr_${attrName}` placeholder=val['placeholder'] title=`${repeatingSection}_${attrName}}` type=val['type'])
.row
each val, key in rollInfoObject
- const translationKey = key.toLowerCase().replace(' ', '');
- const attrName = key === 'modifier dice' ? 'dicepool_modifier' : key.includes('Group') ? key.split(' ')[0].toLowerCase() : key === 'Notes' ? 'note' : key.toLowerCase();
h3(data-i18n=translationKey) #{key}
if val['type'] === 'select'
select(name=`attr_${attrName}` title=`${repeatingSection}_${attrName}}` value=val['default'])
each skill in val['array']
- const i18n = skill.includes('Group') ? skill.toLowerCase().replace(' ', '') : skill.toLowerCase();
- const attrName = skill.includes('Group') ? skill.toLowerCase().split(' ')[0] : skill.toLowerCase();
if val['default'] === `@{${attrName}}`
option(data-i18n=i18n value=`@{${attrName}}` 'selected') #{i18n}
else
option(data-i18n=i18n value=`@{${attrName}}`) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name=`attr_${attrName}` placeholder=val['placeholder'] title=`${repeatingSection}_${attrName}}` type=val['type'])
h3(data-i18n='notes') notes
label(data-i18n-title='notes' title='notes')
textarea(name='attr_notes' placeholder='Notes' title=`${repeatingSection}_notes}` type='text' value='')
//- PC ARMS
mixin h2Headers(headerObject)
.row-long.headers
each val, key in headerObject
h2(data-i18n=`${key.toLowerCase()}`) #{key}
//- REPEATING SECTIONS FLAGS
mixin repeatingSectionFlags()
input.collapse-flag(name='attr_display_flag' type='checkbox')
span.pictos i
input.settings-flag(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
.collapse
span(name='attr_notes')
//- REPEATING SECTIONS NOTES
mixin repeatingSectionNotes(section)
h3(data-i18n='notes') notes
label(data-i18n-title='notes' title='notes')
textarea(name='attr_notes' placeholder='Notes' title=`@{repeating_preperations_${section}`+'${x}_notes}' type='text' value='')
+52 -46
View File
@@ -26,9 +26,9 @@
+npcAttributeButton(attrName, '@{'+attrName+'}+@{attribute_roll}')
span(name='attr_display_'+attrName)
label.settings(data-i18n-title=val title=val)
input(name='attr_'+attrName+'_base' placeholder='3' title='@{'+attrName+'_base}' type='number' value='3')
input(name=`attr_${attrName}`+'_base' placeholder='3' title='@{'+attrName+'_base}' type='number' value='3')
label.settings(data-i18n-title='modifier' title='modifier')
input(name='attr_'+attrName+'_modifier' placeholder='+' title='@{'+attrName+'_modifier}' type='number' value='')
input(name=`attr_${attrName}`+'_modifier' placeholder='+' title='@{'+attrName+'_modifier}' type='number' value='')
//- EDGE
+npcAttributeButton('edge', '@{edge}+@{attribute_roll}')
span(name='attr_edge')
@@ -122,9 +122,9 @@
- const attrName = val.toLowerCase();
h2(data-i18n=attrName) val
label.settings(data-i18n-title='modifier' title='modifier')
input(name='attr_'+attrName+'_limit_modifier' placeholder='0' title='@{'+attrName+'_limit_modifier}' type='number' value='0')
input(name=`attr_${attrName}`+'_limit_modifier' placeholder='0' title='@{'+attrName+'_limit_modifier}' type='number' value='0')
span.settings.tiny-span() =
span(name='attr_'+attrName+'_limit' title='@{'+attrName+'_limit}')
span(name=`attr_${attrName}`+'_limit' title='@{'+attrName+'_limit}')
//- PAIN TOLERANCE
.rows.grunt.pain-tolerance
@@ -148,10 +148,14 @@
.column
h1.settings(data-i18n='modifier') Modifier
.rows
+rollButton('armorrating', 'base', '@{soak}')
+rollButton('armorrating', 'base', '@{armor_rating}')
label.settings(data-i18n-title='armorrating' title='armorrating')
input(,ame='attr_armor_rating' placeholder='9' title='@{armor_rating}' type='number' value='0')
each val, key in {'Defense': ['defense', 'defense'], 'Soak': ['soak', 'soak'], 'Acid Protection': ['acid', 'acidprotection'], 'Cold Protection': ['cold', 'coldprotection'], 'Electrical Protection': ['electrical', 'electricalprotection'], 'Fire Protection': ['fire', 'fireprotection'], 'Radiation Protection': ['radiation', 'radiationprotection']}
input(name='attr_armor_rating' placeholder='9' title='@{armor_rating}' type='number' value='0')
.rows
+rollButton('defense', 'base', '@{defense}')
label.settings(data-i18n-title='defense' title='defense')
input(name='attr_defense_modifier' placeholder='9' title='@{defense_modifier}' type='number' value='0')
each val, key in {'Soak': ['soak', 'soak'], 'Acid Protection': ['acid', 'acidprotection'], 'Cold Protection': ['cold', 'coldprotection'], 'Electrical Protection': ['electrical', 'electricalprotection'], 'Fire Protection': ['fire', 'fireprotection'], 'Radiation Protection': ['radiation', 'radiationprotection']}
.rows
+rollButton(val[1], 'base', '@{soak}+@{'+val[0]+'_modifier}')
label.settings(data-i18n-title=val[1] title=val[1])
@@ -182,21 +186,21 @@
//- TEXTBOXES
each val, key in {'Qualities': 'grunt', 'Augmentations': 'grunt', 'Gear': 'grunt vehicle', 'Programs': 'vehicle', 'Modifications': 'vehicle', 'Powers': 'grunt hide-magic', 'Weakness': 'grunt hide-magic'}
- const attrName = key === 'Qualities' ? 'quality' : key.toLowerCase();
input(name='attr_'+attrName type='hidden' value='')
input(name=`attr_${attrName}` type='hidden' value='')
.textrow(class=val)
h1(data-i18n=attrName) key
span(name='attr_'+attrName)
span(name=`attr_${attrName}`)
label.settings(data-i18n-title=attrName title=key)
textarea(name='attr_'+attrName placeholder=key title='@{'+attrName+'}')
textarea(name=`attr_${attrName}` placeholder=key title='@{'+`${attrName}}`)
each val, key in {'Initiate': ['grunt hide-magic', 'metamagic'],'Submersion': ['grunt hide-resonance', 'echos']}
- const attrName = key.toLowerCase();
.textrow(class=val[0])
input(name='attr_'+attrName type='hidden' value='')
input(name=`attr_${attrName}` type='hidden' value='')
h1(data-i18n=attrName) key
span(name='attr_'+attrName)
span(name=`attr_${attrName}`)
label.settings(data-i18n-title=attrName title=key)
input(name='attr_'+attrName placeholder=attrName type='number' title='@{'+attrName+'}')
input(name=`attr_${attrName}` placeholder=attrName type='number' title='@{'+`${attrName}}`)
br
span(name='attr_'+val[1])
label.settings(data-i18n-title=val[1] title=val[1])
@@ -226,22 +230,22 @@
h2(data-i18n='attribute') Attribute
h2(data-i18n='limit') Limit
if key === 'active'
select.skill-select(name='attr_skill' title='@{repeating_'+key+'_${x}_skill}' value='Close Combat Group')
include skillselect.html
select.skill-select(name='attr_skill' title=`@{repeating_${key}`+'_${x}_skill}' value='Close Combat Group')
include ../html/skillselect.html
else
label(data-i18n-title='skill' title='skill')
input(name='attr_skill' placeholder=key title='@{repeating_'+key+'_${x}_skill}' type='text' )
input(name='attr_skill' placeholder=key title=`@{repeating_${key}`+'_${x}_skill}' type='text' )
label(data-i18n-title='rating' title='rating')
input(name='attr_rating' min='0' placeholder='0' title='@{repeating_'+key+'_${x}_rating}' type='number')
input(name='attr_rating' min='0' placeholder='0' title=`@{repeating_${key}`+'_${x}_rating}' type='number')
label(data-i18n-title='ratingmodifier' title='Rating Modifier')
input(name='attr_rating_modifier' min='0' placeholder='0' title='@{repeating_'+key+'_${x}_rating_modifier}' type='number' )
select.attribute-select(name='attr_attribute' title='@{repeating_'+key+'_${x}_attribute}')
input(name='attr_rating_modifier' min='0' placeholder='0' title=`@{repeating_${key}`+'_${x}_rating_modifier}' type='number' )
select.attribute-select(name='attr_attribute' title=`@{repeating_${key}`+'_${x}_attribute}')
+attributeSelect(val[1])
select.limit-select(name='attr_limit' title='@{repeating_'+key+'_${x}_limit}' value='physical_limit')
select.limit-select(name='attr_limit' title=`@{repeating_${key}`+'_${x}_limit}' value='physical_limit')
+limitSelect(val[2])
h2.full-row(data-i18n='specializations') Specializations
label.full-row(data-i18n-title='specializations' title='Specializations')
input(name='attr_specialization' placeholder='Specalizations' title='@{repeating_'+key+'_${x}_specialization}' type='text')
h2.full-row(data-i18n='specialization') specialization
label.full-row(data-i18n-title='specialization' title='specialization')
input(name='attr_specialization' placeholder='Specalizations' title=`@{repeating_${key}`+'_${x}_specialization}' type='text')
//- SPRITE ACTIVE SKILLS
.rows.sprite.repeating.inline-repeating
@@ -253,8 +257,8 @@
+spriteButton('skill', 'display')
.settings
h2.full-row(data-i18n='skill') Skill
select.skill-select(name='attr_skill' title='@{repeating_'+key+'_${x}_skill}')
include skillsselectsprite.html
select.skill-select(name='attr_skill' title=`@{repeating_active`+'_${x}_skill}')
include ../html/skillsselectsprite.html
//- SPRITE POWERS
.rows.sprite.repeating.inline-repeating
@@ -279,7 +283,8 @@
span.pictos x
input(name='attr_weapon' type='hidden' value='')
span(name='attr_weapon_dice')
+npcButton(weaponButton)
+displayRollButton(weaponButton, true)
span(name='attr_weapon')
.settings
input(name='attr_weapon_range' type='hidden' value='range')
each val, key in npcWeaponsObject
@@ -289,13 +294,14 @@
each val, key in npcWeaponsObject
- const translationKey = key.toLowerCase();
- const attrName = key === 'Dam' ? 'dv' : key === 'Modes' ? 'mode' : key === 'Notes' ? 'note' : key.toLowerCase();
- const defaultValue = key === 'Reach' ? 0 : '';
if (key === 'Range')
select(name='attr_weapon_'+attrName title='@{repeating_weapon_${x}_weapon_'+attrName+'}' value=val['default'])
select(name='attr_weapon_'+attrName title='@{repeating_weapon_${x}_weapon_'+`${attrName}}` value=val['default'])
option(data-i18n='range' value='range' selected) range
option(data-i18n='melee' value='melee') melee
else
label(data-i18n-title=translationKey title=key)
input(name='attr_weapon_'+attrName placeholder=val['placeholder'] title='@{repeating_weapon_${x}_weapon_'+attrName+'}' type=val['type'])
input(name='attr_weapon_'+attrName placeholder=val['placeholder'] title='@{repeating_weapon_${x}_weapon_'+`${attrName}}` type=val['type'] value=defaultValue)
span (c)
//- SPELLS
@@ -306,7 +312,7 @@
span.pictos x
input(name='attr_spell' type='hidden' value='')
span(name='attr_dice')
+npcButton(spellButton)
+displayRollButton(npcSpellButton, true)
span(name='attr_spell')
.settings
input(name='attr_category' type='hidden' value='')
@@ -318,7 +324,7 @@
- const translationKey = key.toLowerCase();
- const attrName = key === 'Dam' ? 'damage' : key === 'Combat' ? 'combat_type' : key === 'Notes' ? 'note' : key.toLowerCase();
if val['type'] === 'select'
select(name='attr_'+attrName title='@{repeating_NPCspell_${x}_'+attrName+'}' value=val['default'])
select(name=`attr_${attrName}` title='@{repeating_NPCspell_${x}_'+`${attrName}}` value=val['default'])
each type in val['array']
- const i18n = key === 'Combat' ? type.split(' ')[0].replace(',','').toLowerCase() : type.toLowerCase();
- const value = key === 'Type' ? type.slice(0,1) : type;
@@ -330,7 +336,7 @@
option(data-i18n=i18n value=value) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name='attr_'+attrName placeholder=val['placeholder'] title='@{repeating_NPCspell_${x}_'+attrName+'}' type=val['type'])
input(name=`attr_${attrName}` placeholder=val['placeholder'] title='@{repeating_NPCspell_${x}_'+`${attrName}}` type=val['type'])
//- COMPLEX FORMS
.rows.grunt.repeating.forms.hide-resonance
@@ -340,7 +346,7 @@
span.pictos x
input(name='attr_form' type='hidden' value='')
span(name='attr_form_dice')
+npcButton(formButton)
+displayRollButton(formButton, true)
span(name='attr_form')
.settings
each val, key in npcComplexFormsObject
@@ -351,7 +357,7 @@
- const translationKey = key.toLowerCase();
- const attrName = key === 'Notes' ? 'form_note' : 'form_' + key.toLowerCase();
if val['type'] === 'select'
select(name='attr_'+attrName title='@{repeating_form_${x}_'+attrName+'}' value=val['default'])
select(name=`attr_${attrName}` title='@{repeating_form_${x}_'+`${attrName}}` value=val['default'])
each type in val['array']
- const i18n = type.toLowerCase();
- const value = type;
@@ -361,7 +367,7 @@
option(data-i18n=i18n value=value) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name='attr_'+attrName placeholder=val['placeholder'] title='@{repeating_form_${x}_'+attrName+'}' type=val['type'])
input(name=`attr_${attrName}` placeholder=val['placeholder'] title='@{repeating_form_${x}_'+`${attrName}}` type=val['type'])
//- IC
.rows.host.repeating.ic
@@ -370,7 +376,7 @@
input(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
input(name='attr_IC' type='hidden' value='')
+npcButton(icButton)
+displayRollButton(icButton, false)
span(name='attr_IC')
.settings
each val, key in icObject
@@ -381,7 +387,7 @@
- const translationKey = key.toLowerCase();
- const attrName = key === 'IC Limit' ? 'limit' : key === 'Defense Attribute' ? 'attribute' : key === 'Defense Matrix Attribute' ? 'matrix' : key === 'Notes' ? 'note' : key.toLowerCase();
if val['type'] === 'select'
select(name='attr_IC_'+attrName title='@{repeating_IC_${x}_'+attrName+'}' value=val['default'])
select(name='attr_IC_'+attrName title='@{repeating_IC_${x}_'+`${attrName}}` value=val['default'])
each type in val['array']
- const i18n = type === 'Data Processing' ? 'data_processing' : type.toLowerCase();
- const value = type;
@@ -391,7 +397,7 @@
option(data-i18n=i18n value=value) #{i18n}
else
label(data-i18n-title=translationKey title=key)
input(name='attr_IC_'+attrName placeholder=val['placeholder'] title='@{repeating_IC_${x}_'+attrName+'}' type=val['type'])
input(name='attr_IC_'+attrName placeholder=val['placeholder'] title='@{repeating_IC_${x}_'+`${attrName}}` type=val['type'])
//- MATRIX DEVICE
input(name='attr_flag_matrix' type='hidden' value='')
@@ -409,27 +415,27 @@
- const matrixClass = val === 'Data Processing' ? 'Data' : val;
.rows
button(data-i18n=attrName name=val value!='&{template:rolls}{{header=^{'+attrName+'}}}{{base=^{base}}}{{dice=[[(@{'+attrName+'}+(?{Attribute|Willpower,@{willpower}|Logic,@{logic}|Intuition,@{intuition}})+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}' type='roll') #{val}
.matrix-bubble(class='matrix'+matrixClass)
.matrix-bubble(class=`matrix${matrixClass}`)
- let i = 1;
while i < 21
input(name="attr_"+attrName value=i++ type="radio")
input(name=`attr_${attrName}` value=i++ type='radio')
span
label.round(data-i18n-title=attrName title=attrName)
input(name='attr_'+attrName placeholder='4' type='number' value='')
input(name=`attr_${attrName}` placeholder='4' type='number' value='')
.rows.repeating
h1(data-i18n='programs') Programs
fieldset(class='repeating_programs')
input.toggle(name='attr_flag' title='Settings toggle' type='checkbox' checked)
span.pictos x
input.toggle(name="attr_program_on" type="checkbox" checked)
input.toggle(name='attr_program_on' type='checkbox' checked)
span.pictos Q
button(name="program" type="roll" value="@{gm_toggle} &{template:rolls}{{header=@{program}}}{{desc=@{program_note}}}")
span(name="attr_program")
span(name="attr_program_note")
button(name='roll_program' type='roll' value='@{gm_toggle} &{template:rolls}{{header=@{program}}}{{desc=@{program_note}}}')
span(name='attr_program')
span(name='attr_program_note')
.settings
h2(data-i18n='name') name
label(data-i18n-title='name' title='name')
input(name="attr_program" placeholder="Program Name" title="@{repeating_programs_${x}_program}" type="text" value="")
input(name='attr_program' placeholder='Program Name' title='@{repeating_programs_${x}_program}' type='text' value='')
h2(data-i18n='notes') notes
label(data-i18n-title='notes' title='notes')
textarea(name="attr_program_note" placeholder="Program Description" title="@{repeating_programs_${x}_program_note}" type="text" value="")
textarea(name='attr_program_note' placeholder='Program Description' title='@{repeating_programs_${x}_program_note}' type='text' value='')
+38 -6
View File
@@ -10,6 +10,13 @@
//- COMPLEX FORM ARRAY
- const formTargets = ['Device', 'File', 'Host', 'IC', 'Persona', 'Self', 'Sprite'];
- const formDurations = ['Extended', 'Instant', 'Permanent', 'Other', 'Sustained'];
//- AUGEMENATATIONS ARRAY
- const augementations = ['Augmentations', 'Rating', 'Essence'];
//- WEAPON ARRAY
- const weaponModes = ['BF', 'FA', 'SA', 'SS', 'Other'];
//- LOOP OBJECTS
- const limitObject = {'Mental':'mental_limit', 'Physical':'physical_limit', 'Social':'social_limit', 'Attack':'attack', 'Data Processing':'data_processing', 'Firewall':'firewall', 'Sleaze':'sleaze'};
@@ -20,15 +27,40 @@
- const npcComplexFormsObject = {'Dice': {'type': 'number', 'placeholder': '18'}, 'Name': {'type': 'text', 'placeholder': 'Editor'}, 'Target': {'type': 'select', 'default': 'device', 'array': formTargets}, 'Duration': {'type': 'text', 'placeholder': 'Permanent'}, 'Fade': {'type': 'number', 'placeholder': '+2'}, 'Notes': {'type': 'text', 'placeholder': 'edit files'}};
- const icObject = {'Name': {'type': 'text', 'placeholder': 'Black'}, 'IC Limit': {'type': 'select', 'default': 'attack', 'array':['Attack', 'Data Processing']}, 'Defense Attribute': {'type': 'select', 'default': 'willpower', 'array':['Willpower', 'Intuition', 'Logic']}, 'Defense Matrix Attribute': {'type': 'select', 'default': 'firewall', 'array':['Attack', 'Sleaze', 'Data Processing', 'Firewall']}, 'Notes': {'type': 'text', 'placeholder': 'deploy the ic'}};
//- BUTTON OBJECTS
- const formButton = {'name': 'complex form', 'header': 'form_name', 'rollFormula': '@{form_dice}', 'desc': '{{desc=?{Level|}, Fade [[?{Level|}+(@{form_fade})]]}}', 'display': 'form_name'};
- const spellButton = {'name': 'spell', 'header': 'name', 'rollFormula': '@{dice}', 'desc': '{{desc=@{combat_type}?{Force|}, Drain [[?{Force|}+(@{drain})]]}}', 'display': 'name'};
- const weaponButton = {'name': 'weapon', 'header': 'weapon_type', 'rollFormula': '@{weapon_dice}', 'desc': '{{desc=ACC @{weapon_acc}, DV @{weapon_dv}, AP @{weapon_ap}}}{{rea=[[@{weapon_reach}]]}}', 'display': 'weapon_name'};
//- PC MAGIC
- const pcCoreSpellObject = {'Name': {'type': 'text', 'placeholder': 'Fireball'}, 'Type': {'type': 'select', 'default': 'physical', 'array': spellTypes}, 'Range': {'type': 'select', 'default': 'los', 'array':spellRanges}, 'Duration': {'type': 'select', 'default': 'instant', 'array':spellDurations}, 'Drain': {'type': 'number', 'placeholder': '-1'}};
- const pcCatagorySpellObject = {'Category': {'type': 'select', 'default': 'combat', 'array': spellCatagories}, 'Combat': {'type': 'select', 'default': 'force', 'array':spellCombatTypes}, 'Damage': {'type': 'text', 'placeholder': 'P'}};
- const pcAlchemySpellObject = {'Skill': {'type': 'select', 'default': '@{alchemy}', 'array':['Enchanting Group', 'Alchemy']}, 'Specialization': {'type': 'checkbox'}, 'modifier dice': {'type': 'number', 'placeholder': '0'}};
- const pcSorcerySpellObject = {'Skill': {'type': 'select', 'default': '@{spellcasting}', 'array':['Sorcery Group', 'Spellcasting']}, 'Specialization': {'type': 'checkbox'}, 'modifier dice': {'type': 'number', 'placeholder': '0'}};
//- PC MATRIX
- const pcComplexFormButton = {'name': 'complex_form', 'header': '@{name}', 'rollFormula': '@{skill}+@{dicepool}+@{resonance}', 'desc': '{{desc=Level ?{Level|}, Fade [[?{Level|}+(@{fade})]]}}', 'display': 'name'};
//- PC WEAPONS
- const pcRangeWeaponObject = {'Weapon': {'type': 'text', 'placeholder': 'Ares Predator'}, 'Dam': {'type': 'text', 'placeholder': '9P'}, 'ACC': {'type': 'text', 'placeholder': '5'}, 'AP': {'type': 'number', 'placeholder': '-2'}, 'Mode': {'type': 'select', 'default': 'SS', 'array':weaponModes}, 'Recoil': {'type': 'number', 'placeholder': '+2'},'Ammo': {'type': 'number', 'placeholder': '15'}};
- const pcMeleeWeaponObject = {'Weapon': {'type': 'text', 'placeholder': 'Katana'}, 'Dam': {'type': 'text', 'placeholder': '5P'}, 'ACC': {'type': 'text', 'placeholder': '7'}, 'AP': {'type': 'number', 'placeholder': '-3'}, 'Reach': {'type': 'number', 'placeholder': '1'}};
//- PC ARMOR
- const pcArmorObject = {'Name': {'type': 'text', 'placeholder': 'Armor Jacket'}, 'Rating': {'type': 'number', 'placeholder': '12'}, 'Acid': {'type': 'number', 'placeholder': '+5'}, 'Cold': {'type': 'number', 'placeholder': '0'}, 'Electrical': {'type': 'number', 'placeholder': '0'}, 'Fire': {'type': 'number', 'placeholder': '0'} , 'Radiation': {'type': 'number', 'placeholder': '0'}};
//- Weapons
- const weaponButton = {'name': 'weapon', 'header': '@{weapon_type}', 'rollFormula': '@{weapon_dice}', 'desc': '{{desc=ACC @{weapon_acc}, DV @{weapon_dv}, AP @{weapon_ap}}}{{rea=[[@{weapon_reach}]]}}', 'display': 'weapon_name'};
- const pcRangeWeaponButton = {'name': 'range_weapon', 'header': '@{weapon}', 'rollFormula': '@{skill}+@{dicepool}+@{agility}', 'desc': '{{desc=@{mode}, ACC @{acc}, DV @{damage}, AP @{ap}}}', 'display': 'weapon'};
- const pcMeleeWeaponButton = {'name': 'melee_weapon', 'header': '@{weapon}', 'rollFormula': '@{skill}+@{dicepool}+@{agility}', 'desc': '{{desc=ACC @{acc}, DV @{damage}, AP @{ap}, Reach @{reach}}}', 'display': 'weapon'};
//- MAGIC
- const npcSpellButton = {'name': 'spell', 'header': '@{name}', 'rollFormula': '@{dice}', 'desc': '{{desc=@{category}?{Force|}, Drain [[?{Force|}+(@{drain})]]}}', 'display': 'name'};
- const pcSpellButton = {'name': 'spell', 'header': '@{name}', 'rollFormula': '@{skill}+@{dicepool}+@{magic}', 'desc': '{{desc=@{combat_type}?{Force|}}}{{drain=[[?{Force|}+(@{drain})]]}}', 'display': 'name'};
- const prepButton = {'name': 'preparation', 'header': '@{name}', 'rollFormula': '@{force}+@{potency}', 'display': 'name'};
- const pcRitualButton = {'name': 'ritual', 'header': '@{name}', 'rollFormula': '@{skill}+@{dicepool}+@{magic}', 'desc': '{{desc=Force ?{Force|}}}', 'display': 'name'};
//- MATRIX
- const formButton = {'name': 'complex form', 'header': 'f@{orm_name}', 'rollFormula': '@{form_dice}', 'desc': '{{desc=?{Level|}, Fade [[?{Level|}+(@{form_fade})]]}}', 'display': 'form_name'};
- const icButton = {'name': 'IC', 'header': 'Intrusion Countermeasures', 'rollFormula': '@{IC_attack}', 'desc': '', 'display': 'IC_name'};
//- DIE ROLL VARIABLES
- const rollBeginging = '@{gm_toggle} &{template:rolls}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}';
- const rollEnding = '+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}';
- const soakRollBeginging = '@{gm_toggle} &{template:rolls}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}';
- const soakRollEnding = '+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}';
- const noWoundsRollBegining = '@{gm_toggle} &{template:rolls}{{mod=[[@{modifiers_toggle}]]}}{{edge=[[@{edge_toggle}]]}}';
- const noWoundsRollEnding = '+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}';
+8 -779
View File
@@ -553,9 +553,10 @@
}
on("change:repeating_weapon", () => {
getAttrs(["repeating_weapon_weapon_range", "repeating_weapon_weapon_melee", "repeating_weapon_weapon_type", "repeating_weapon_weapon_reach", "repeating_weapon_weapon_acc", "repeating_weapon_weapon_dv", "repeating_weapon_weapon_ap", "repeating_weapon_weapon_mode", "repeating_weapon_weapon_rc", "repeating_weapon_weapon_ammo", "repeating_weapon_weapon_note"], (v) => {
const source = "repeating_weapon_weapon";
getAttrs([`${source}_range`, `${source}_type`, `${source}_reach`, `${source}_acc`, `${source}_dv`, `${source}_ap`, `${source}_mode`, `${source}_rc`, `${source}_ammo`, `${source}_note`, `${source}_primary`], (v) => {
// Local builder putting the needed variables into scope for repeatingStringBuilder
const b = repeatingStringBuilder(v, 'repeating_weapon_weapon_');
const b = repeatingStringBuilder(v, `${source}_`);
// Determine fields to display and in their proper order and formatting
// Anonymous function is purely stylistic and adds more overhead than just a simple switch/case. Personally I find the function looks cleaner and hides any internal scope that might conflict with outside
const display = (() => {
@@ -596,11 +597,15 @@
// Concat all the strings and add comma between
.join(', ');
let update = {};
update[`${source}`] = `[${display}]`;
// Finally wrap square brackets around the weapon display
setAttrs({repeating_weapon_weapon: `[${display}]`});
setAttrs(update);
});
});
//Spell displays set into an Array
on("change:repeating_NPCspell", () => {
getAttrs(["repeating_NPCspell_combat_type", "repeating_NPCspell_type", "repeating_NPCspell_range", "repeating_NPCspell_damage", "repeating_NPCspell_duration", "repeating_NPCspell_drain", "repeating_NPCspell_note"], (v) =>{
@@ -1026,780 +1031,4 @@
const getSplitNum = (value) => {
return value.split("/")[0];
}
//IMPORTERS
const importHeroLab = (character) => {
console.log(`%c HERO LAB IMPORTER:`, "color: purple; font-weight:bold");
};
const importChummer = (character) => {
//Match Chummer JSON keys with their sheet attribute.
//Chummer name is on the left, Roll20 sheet atribute on right.
const jsonKeys = {
"name": "name"
,"adept": "flag_special"
,"age" : "age"
,"alias": "character_name"
,"armor": "armor"
,"calculatednotoriety": "notoriety"
,"calculatedpublicawareness": "public_awareness"
,"calculatedstreetcred": "street_cred"
,"cmoverflow": "overflow"
,"composure" : "composure"
,"height": "height"
,"initdice": "initiative_dice"
,"initvalue": "initiative_mod"
,"judgeintentions" : "judge_intentions"
,"karma": "karma"
,"liftandcarry": "lift_carry"
,"limitmental": "mental_limit"
,"limitphysical": "physical_limit"
,"limitsocial": "social_limit"
,"magician": "flag_special"
,"memory": "memory"
,"nuyen":"primary_nuyen"
,"physicalcm": "physical_max"
//,"physicalcmfilled": "physical_damage" //RESULTING IN INFINATE LOOP
,"playername": "player_name"
,"sex": "sex"
,"stuncm": "stun_max"
//,"stuncmfilled": "stun_damage"
,"technomancer": "flag_special"
,"totaless": "essence"
,"totalkarma": "total_karma"
,"weight": "weight"
,"indirectdefenseresist": "defense"
};
const attributeKeys = {
"BOD": "body"
,"AGI": "agility"
,"REA": "reaction"
,"STR": "strength"
,"CHA": "charisma"
,"INT": "intuition"
,"LOG": "logic"
,"WIL": "willpower"
,"EDG": "edge"
,"MAG": "magic"
,"RES": "resonance"
};
const processChummer = new Promise((resolve, reject) => {
console.log(`%c CHUMMER IMPORTER`, "color: purple; font-weight:bold");
const sortedKeys = alphabatizeKeys(jsonKeys);
let setText = {
"error": "",
"results": "",
"ignored": ""
};
let update = {};
//MATRIX
const setCyberdeck = (cyberdeck) => {
update["cyberdeck"] = cyberdeck.name;
update["device_rating"] = cyberdeck.devicerating;
update["attribute_1"] = cyberdeck.attack;
update["attribute_2"] = cyberdeck.sleaze;
update["attribute_3"] = cyberdeck.dataprocessing;
update["attribute_4"] = cyberdeck.firewall;
update["matrix_con"] = 0;
}
// PROCESS TOP LEVEL KEYS
Object.keys(sortedKeys).forEach((key) => {
try {
const charSheetAttr = jsonKeys[key];
const chummerValue = character[key];
if ((key === "adept" || key === "magician" || key === "technomancer")) {
if (chummerValue.toUpperCase() === "TRUE") {
update[`${charSheetAttr}`] = (key === "technomancer") ? "resonance" : "magic";
} else if (!update.hasOwnProperty(`${charSheetAttr}`)) { // if we don't have the property set already otherwise keys get overriden
update[`${charSheetAttr}`] = "mundane";
};
} else if (key === "totaless") {
const essence = chummerValue.includes(",") ? chummerValue.replace(",", ".") : chummerValue;
update[`${charSheetAttr}`] = parseFloat(essence) || 6;
} else if (chummerValue && chummerValue != null) {
update[`${charSheetAttr}`] = chummerValue;
} else {
setText["error"] += addFeedback(charSheetAttr, chummerValue);
};
const textUpdate = (update[`${charSheetAttr}`]) ? "results" : "ignored";
const feedbackText = addFeedback(jsonKeys[key].replace("_"," "), update[`${charSheetAttr}`]);
(setText[`results`].includes(feedbackText) || setText[`ignored`].includes(feedbackText)) ? false : setText[`${textUpdate}`] += feedbackText;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(key), error);
};
});
// PROCESS METATYPE
try {
update[`metatype`] = character.metatype;
if (character.metavariant) {
update[`metatype`] += ` (${character.metavariant})`
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(character.metatype), error);
};
// PROCESS ATTRIBUTES
const attributes = character.attributes[1].attribute;
let attributeTotals = {
"essence": update["essence"]
}; // USED FOR LIMITS BELOW
attributes.forEach((object) => {
try {
const charSheetAttr = attributeKeys[object.name];
if (charSheetAttr === "edge") {
update[`${charSheetAttr}`] = object.base;
} else {
update[`${charSheetAttr}_base`] = object.base;
update[`${charSheetAttr}_modifier`] = object.total - object.base;
};
// USED FOR LIMITS BELOW
attributeTotals[`${charSheetAttr}`] = parseInt(object.total) || 0;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(object), error);
};
});
//PROCESS LIMITS
const limitKeys = {
"limitmental": "mental_limit"
,"limitphysical": "physical_limit"
,"limitsocial": "social_limit"
};
Object.keys(limitKeys).forEach((key) => {
//CALCULATE THE BASE FOR LIMIT
const limitCalculate = (attrsArray) => {
return Math.ceil(((attrsArray[0] + attrsArray[1] + (attrsArray[2] * 2))/3))
};
try {
let attrs = [];
if (key === "limitmental") {
attrs.push(attributeTotals["intuition"], attributeTotals["willpower"], attributeTotals["logic"]);
} else if (key === "limitphysical") {
attrs.push(attributeTotals["body"], attributeTotals["reaction"], attributeTotals["strength"]);
} else {
attrs.push(attributeTotals["essence"], attributeTotals["willpower"], attributeTotals["charisma"]);
};
//SET LIMIT MODIFIER EQUAL TO THE TOTAL IN CHUMMER - THE CALCULATED BASE LIMIT
update[`${limitKeys[key]}_modifier`] = parseInt(character[key]) - limitCalculate(attrs);
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(`${key}`), error);
};
});
// LOOP THROUGHT QUALITIES
if (character.qualities != null && character.qualities.quality != null) {
const qualitiesList = getArray(character.qualities.quality);
qualitiesList.forEach((quality) => {
try {
const id = generateRowID();
update[`repeating_quality_${id}_flag`] = "display";
update[`repeating_quality_${id}_quality`] = quality.name;
update[`repeating_quality_${id}_type`] = (quality.qualitytype === "Positive") ? "P" : "N";
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(quality), error);
};
});
}
// LOOP THROUGH SKILLS & GENERATE REPEATING FIELDS
if (character.skills != null && character.skills.skill != null) {
const skillsList = getArray(character.skills.skill);
skillsList.forEach((skill) => {
try {
const rating = parseInt(skill.rating) || 0;
if (rating > 0) {
const id = generateRowID();
const type =
(skill.knowledge.toUpperCase() === "TRUE" && skill.islanguage.toUpperCase() === "TRUE") ? "language" :
(skill.knowledge.toUpperCase() === "TRUE") ? "knowledge" :
"active";
const exotic = skill.exotic.toUpperCase();
const section = `repeating_${type}_${id}`
// Exotic Weapons need their name in Specialization
update[`${section}_flag`] = "display";
update[`${section}_skill`] =
(skill.name === "Exotic Melee Weapon") ? "Exotic Melee" :
(skill.name === "Exotic Ranged Weapon") ? "Exotic Range" :
skill.name;
update[`${section}_display`] =
(skill.name === "Exotic Melee Weapon") ? "Exotic Melee" :
(skill.name === "Exotic Ranged Weapon") ? "Exotic Range" :
skill.name;
update[`${section}_rating`] = skill.rating;
update[`${section}_rating_modifier`] = skill.ratingmod;
const skilltotal = parseInt(skill.rating) + parseInt(skill.ratingmod);
update[`${section}_dicepool`] = skilltotal;
//ACTIVE SKILLS HAVE THEIR TOTAL SAVED IN A HIDDEN ATTRIBUTE
if (type === "active") {
update[skill.name.toLowerCase().replace(/ /g, "")] = skilltotal;
};
//This needs to be verified with multiple specializations
if (skill.skillspecializations && skill.skillspecializations != null) {
const chummerSpecialization = skill.skillspecializations.skillspecialization.name;
const specialization = (chummerSpecialization.includes("[")) ? chummerSpecialization.slice(1, -1) : chummerSpecialization;
update[`${section}_specialization`] = specialization;
} else if (exotic === "TRUE") {
update[`${section}_specialization`] = skill.spec;
};
//CREATE THE DISPLAYS FOR SKILLS
if (update[`${section}_specialization`]) {
update[`${section}_display_specialization`] = `(${update[`${section}_specialization`]})`;
};
//DISPLAY FOR RTG
update[`${section}_display_rating`] = (skill.ratingmod != 0) ? `${skill.rating} (${skilltotal})` : `${skill.rating}`;
const attribute = skill.attribute;
update[`${section}_attribute`] = `@{${attributeKeys[attribute]}}`;
update[`${section}_display_attribute`] = attributeKeys[attribute];
update[`${section}_limit`] =
(attribute === "AGI" || attribute === "BOD" || attribute === "STR" || attribute === "REA") ? `@{physical_limit}` :
(attribute === "WIL" || attribute === "LOG" || attribute === "INT") ? `@{mental_limit}` :
(attribute === "CHA") ? `@{social_limit}` : "none";
};
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(skill), error);
};
});
}
//MOVEMENT
try {
const movement = character.movementwalk.split(",")[0].split("/");
update[`walk`] = movement[0];
update[`run`] = movement[1];
} catch (error) {
setText["error"] += addFeedback("movement", error);
};
//MARTIAL ARTS
if (character.martialarts != null && character.martialarts.martialart != null) {
const martialartsList = getArray(character.martialarts.martialart);
martialartsList.forEach((art) => {
const techniqueList = getArray(art.martialarttechniques.martialarttechnique);
techniqueList.forEach((tech) => {
try {
const id = generateRowID();
update[`repeating_martial_${id}_flag`] = "display";
update[`repeating_martial_${id}_technique`] = tech.name;
update[`repeating_martial_${id}_style`] = art.name;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(art), error);
};
});
});
};
//WEAPON KEYS
const weaponKeys = {
"name": "weapon"
,"damage": "damage"
,"ap": "ap"
,"dicepool": "dicepool"
,"skill": "skill"
,"reach": "reach"
,"rc": "recoil"
,"mode": "mode_options"
,"accuracy": "acc"
};
//WEAPONS
if (character.weapons != null && character.weapons.weapon != null) {
const weaponsList = getArray(character.weapons.weapon);
weaponsList.forEach((weapon) => {
try {
const id = generateRowID();
const section = (weapon.type.toUpperCase() === "MELEE") ? `repeating_melee_${id}` : `repeating_range_${id}`;
const npcWeapon = `repeating_weapon_${id}`;
const category = weapon.category.toUpperCase();
Object.keys(weaponKeys).forEach((key) => {
if (weapon[`${key}`] && weapon[`${key}`] != null) {
update[`${section}_${weaponKeys[key]}`] =
(key != "damage" && weapon[`${key}`].includes("(")) ? getValInParen(weapon[`${key}`]) :
(key === "skill") ? `@{${weapon[`${key}`].toLowerCase().replace(" ", "")}}` :
weapon[`${key}`];
} else if (key === "skill" && category.includes("EXOTIC")) {
update[`${section}_skill`] = 0;
};
});
//EXOTIC WEAPONS NEED SPECIAL HANDLING
if (category.includes("EXOTIC")) {
update[`${section}_dicepool_modifier`] = weapon.dicepool;
};
//RANGED WEAPONS NEED CLIP & RANGES
if (weapon.type.toUpperCase() === "RANGED") {
if (weapon.clips != null && weapon.clips.clip != null) {
const clips = Array.isArray(weapon.clips.clip) ? weapon.clips.clip : [ weapon.clips.clip ];
update[`${section}_ammo`] = clips[0].count;
} else if (weapon.name.includes("Grenade")) {
const gearsList = getArray(character.gears.gear);
gearsList.forEach((gear) => {
if (weapon.name === gear.name) {
update[`${section}_ammo`] = gear.qty || 1;
};
});
} else if (weapon.ammo) {
update[`${section}_ammo`] = weapon.ammo;
};
//RANGE
const rangeList = weapon.ranges;
let range = "";
Object.keys(rangeList).forEach((key) => {
if (key != "name" && rangeList[key] != null) {
const rangeNumber = rangeList[key].split("-")[1];
range += (key === "short") ? `${rangeNumber}` : `/${rangeNumber}`;
};
});
update[`${section}_range`] = range;
};
//ACCESSORIES
if (weapon.accessories) {
let accessories = "";
const accessoriesList = getArray(weapon.accessories.accessory);
accessoriesList.forEach((accessory) => {
accessories += `${accessory["name"]}, `
});
update[`${section}_notes`] = accessories;
};
// TOGGLE THE SETTINGS OFF
update[`${section}_flag`] = "display";
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(weapon), error);
};
});
}
//ARMOR
if (character.armors != null && character.armors.armor != null) {
const armorsList = getArray(character.armors.armor);
armorsList.forEach((armor) => {
try {
const id = generateRowID();
if (armor.category != "Clothing") {
const section = `repeating_armor_${id}`;
let armorMods = "";
let armorGear = "";
// ARMOR NAME
update[`${section}_name`] = armor.name;
// ARMOR sometimes has a bonus
update[`${section}_rating`] = (armor.armor.includes("/+")) ? armor.armor.split("/+")[0] : armor.armor;
// ARMOR MODS
if (armor.armormods && armor.armormods != null) {
const modsList = getArray(armor.armormods.armormod);
modsList.forEach((modification) => {
armorMods += `${modification.name}, `;
if (modification.name === "Nonconductivity") {
update[`${section}_electrical_modifier`] = modification.rating;
} else if (modification.name === "Thermal Damping" || modification === "Insulation") {
update[`${section}_cold_modifier`] = modification.rating;
} else if (modification.name === "Radiation Shielding") {
update[`${section}_radiation_modifier`] = modification.rating;
} else if (modification.name === "Chemical Protection") {
update[`${section}_acid_modifier`] = modification.rating;
} else if (modification.name === "Fire Resistance") {
update[`${section}_fire_modifier`] = modification.rating;
};
});
};
// ARMOR GEAR
if (armor.gears && armor.gears != null) {
const gearList = getArray(armor.gears.gear);
gearList.forEach((gear) => {
if (gear.children) {
const childrenList = getArray(gear.children.gear);
childrenList.forEach((child) => {
armorGear += `${gear.name} (${child.name}), `;
});
} else {
armorGear += `${gear.name}, `;
};
});
};
// HIDE SETTINGS
update[`${section}_flag`] = "display";
update[`${section}_notes`] =
(armorMods && armorGear) ? `Modification: ${armorMods} Gear: ${armorGear}` :
(armorMods) ? `Modification: ${armorMods}` :
(armorGear) ? `Gear: ${armorGear}` : "";
} else {
// Chummer puts Clothing in with armor
const section = `repeating_items_${id}`;
update[`${section}_item`] = armor.name;
update[`${section}_flag`] = "display";
};
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(armor), error);
}
});
}
//AUGMENTATIONS
if (character.cyberwares != null && character.cyberwares.cyberware != null) {
const cyberwaresList = getArray(character.cyberwares.cyberware);
cyberwaresList.forEach((ware) => {
const id = generateRowID();
try {
const section = `repeating_augementations_${id}`;
update[`${section}_flag`] = "display";
update[`${section}_augmentation`] = ware.name;
update[`${section}_rating`] = ware.rating;
update[`${section}_essence`] = ware.ess;
update[`${section}_notes`] = `Grade: ${ware.grade}`;
if (ware.gears != null && ware.gears.gear != null) {
const wareGearList = getArray(ware.gears.gear);
wareGearList.forEach((gear) => {
if (gear.category.toLowerCase().includes("cyberdeck")) {
setCyberdeck(gear);
}
});
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(ware.name), error);
}
});
};
console.log(character);
// GEAR
if (character.gears != null && character.gears.gear != null) {
const gearsList = getArray(character.gears.gear);
gearsList.forEach((gear) => {
const id = generateRowID();
try {
if (gear.name.toLowerCase() === "fake sin") {
const section = `repeating_lifestyle_${id}`;
update[`${section}_name`] = `${gear.extra} (rating ${gear.rating})`;
update[`${section}_lifestyle`] = (gear.location != null) ? `${gear.location},` : "";
update[`${section}_flag`] = "display";
update[`${section}_licenses`] = "";
if (gear.children && gear.children.gear != null) {
const childrenList = getArray(gear.children.gear);
childrenList.forEach((child) => {
update[`${section}_licenses`] += `${child.extra} (rating ${child.rating}), `;
});
}
} else if (gear.category.toLowerCase().includes("cyberdeck")) {
setCyberdeck(gear);
} else if (gear.category.toLowerCase().includes("programs")) {
const section = `repeating_programs_${id}`;
update[`${section}_program`] = gear.name;
update[`${section}_flag`] = "display";
} else {
const section = `repeating_items_${id}`;
let gearNotes = "";
update[`${section}_item`] = gear.name;
update[`${section}_flag`] = "display";
update[`${section}_rating`] = (gear.rating > 0) ? gear.rating : "";
//NAME
update[`${section}_item`] += (gear.name.includes("Ammo:")) ? ` (${gear.extra}) ` : "";
update[`${section}_item`] += (gear.qty > 1) ?` x${gear.qty}` : "";
//NOTES
gearNotes += (gear.location != null) ? `Location: ${gear.location},` : "";
gearNotes += (gear.qty != null) ? ` Qty: ${gear.qty},` : "";
gearNotes += (gear.extra != null) ? ` Extra: ${gear.extra},` : "";
if (gear.children && gear.children != null) {
const childrenList = getArray(gear.children.gear);
childrenList.forEach((child) => {
gearNotes += `${child.name}, `;
});
};
update[`${section}_notes`] = gearNotes;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(gear.name), error);
};
});
};
//SPELL KEYS
const spellKeys = {
"category": "category"
,"name": "name"
,"range": "range"
};
// SPELLS
if (character.spells != null && character.spells.spell != null) {
const spellsList = getArray(character.spells.spell);
spellsList.forEach((spell) => {
try {
const id = generateRowID();
const type = (spell.alchemy.toUpperCase() === "TRUE") ? "preps" : "spell";
const section = `repeating_${type}_${id}`;
Object.keys(spellKeys).forEach((key) => {
if (spell[`${key}`] && spell[`${key}`] != null) {
update[`${section}_${spellKeys[key]}`] = spell[`${key}`];
};
});
// FLAG
update[`${section}_flag`] = "display";
// TYPE
update[`${section}_type`] = (spell.type === "P") ? "Physical" : "Mana";
// DRAIN
update[`${section}_drain`] = spell.dv.replace("F", "");
// SET COMBAT TYPE
if (spell.category.toUpperCase() === "COMBAT") {
const combatType = spell.descriptors.toUpperCase();
update[`${section}_combat_type`] =
(combatType.includes("DIRECT")) ? "Direct, Force " :
(combatType.includes("INDIRECT")) ? "Indirect, Force ?{Force|}, AP -" :
"Force ";
update[`${section}_damage`] = spell.damage;
}
// DURATION
const duration = spell.duration.toUpperCase();
update[`${section}_duration`] =
(duration === "S") ? "Sustained" :
(duration === "I") ? "Instant" :
(duration === "P") ? "Permanent" :
"Special";
// NOTES
if (spell.descriptors != null) {
update[`${section}_notes`] = spell.descriptors;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(spell.name), error);
}
});
}
// POWERS
if (character.powers != null && character.powers.power != null) {
const powersList = getArray(character.powers.power);
powersList.forEach((power) => {
try {
const id = generateRowID();
const section = `repeating_powers_${id}`;
update[`${section}_name`] = (power.fullname != null) ? power.fullname : power.name;
update[`${section}_rating`] = power.rating;
if (power.totalpoints != null) {
update[`${section}_notes`] = `Total Points: ${power.totalpoints}.`;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(power.name), error);
}
});
}
// LIFESTYLES
if (character.lifestyles != null && character.lifestyles.lifestyle != null) {
const lifestyleList = getArray(character.lifestyles.lifestyle);
lifestyleList.forEach((lifestyle) => {
try {
const id = generateRowID();
const section = `repeating_lifestyle_${id}`;
update[`${section}_name`] = lifestyle.name;
update[`${section}_flag`] = "display";
if (lifestyle.qualities != null && lifestyle.qualities.quality) {
const lqualitiesList = getArray(lifestyle.qualities.quality);
let lifestyleQualities = "";
lqualitiesList.forEach((quality) => {
try {
lifestyleQualities += (quality.fullname != null) ? quality.fullname : quality.name;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(quality.name), error);
}
});
update[`${section}_lifestyle`] = lifestyleQualities;
}
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(lifestyle.name), error);
}
});
}
// CONTACTS
if (character.contacts != null && character.contacts.contact != null) {
const contactList = getArray(character.contacts.contact);
contactList.forEach((contact) => {
try {
const id = generateRowID();
const section = `repeating_contacts_${id}`;
let contactNotes = "";
update[`${section}_name`] = (contact.role != null) ? `${contact.name} (${contact.role})` : `${contact.name}`;
update[`${section}_loyalty`] = contact.loyalty;
update[`${section}_connection`] = contact.connection;
update[`${section}_flag`] = "display";
["metatype", "sex", "age", "preferredpayment", "hobbiesvice", "personallife"].forEach((detail) => {
if (contact[`${detail}`] != null) {
contactNotes += `${contact[`${detail}`]}. `
}
});
update[`${section}_notes`] = contactNotes;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(contact.name), error);
}
});
}
// VEHICLE KEYS
const vehicleKeys = {
"handling": "handling_base"
,"accel": "acceleration_base"
,"speed": "speed_base"
,"body": "body_base"
,"armor": "armor_base"
,"sensor": "sensor_base"
,"pilot": "pilot_base"
};
// VEHICLES
/* if (character.vehicles != null && character.vehicles.vehicle != null) {
const vehicleList = getArray(character.vehicles.vehicle);
vehicleList.forEach((vehicle) => {
try {
const id = generateRowID();
const section = `repeating_vehicle_${id}`;
let vehicleNotes = "";
update[`${section}_name`] = vehicle.name;
update[`${section}_flag`] = "display";
Object.keys(vehicleKeys).forEach((key) => {
if (vehicle[`${key}`] && vehicle[`${key}`] != null) {
update[`${section}_${vehicleKeys[`${key}`]}`] =
(vehicle[`${key}`].includes("/")) ? getSplitNum(vehicle[`${key}`]) :
vehicle[`${key}`];
};
});
["attack", "sleaze", "dataprocessing", "firewall", "devicerating"].forEach((matrixAttr) => {
vehicleNotes += (matrixAttr === "devicerating") ? `Device Rating (${vehicle[`${matrixAttr}`]}) ` :
(matrixAttr === "firewall") ? `${vehicle[`${matrixAttr}`]} ` : `${vehicle[`${matrixAttr}`]}/`;
});
if (vehicle.mods != null && vehicle.mods.mod != null) {
const vehicleModsList = getArray(vehicle.mods.mod);
vehicleNotes += "Mods: "
vehicleModsList.forEach((mod) => {
vehicleNotes += (mod.fullname != null) ? `${mod.fullname}, ` : `${mod.name}, `;
});
}
if (vehicle.gears != null && vehicle.gears.gear != null) {
const vehicleGearList = getArray(vehicle.gears.gear);
vehicleNotes += "Gear: "
vehicleGearList.forEach((gear) => {
if (gear.children != null && gear.children.gear != null) {
const vehicleChildrenList = getArray(gear.children.gear);
let vehicleChildrenNotes = "";
vehicleChildrenList.forEach((child) => {
vehicleChildrenNotes += `${child.name}, `;
});
vehicleNotes += `${gear.name} (${vehicleChildrenNotes}), `;
} else {
vehicleNotes += `${gear.name}, `;
};
});
}
update[`${section}_notes`] = vehicleNotes;
} catch (error) {
setText["error"] += addFeedback(JSON.stringify(vehicle.name), error);
}
});
}
*/
setCharmancerText(setText);
resolve(update);
console.log(update);
}).then((update) => {
let setText = {
"hidden": ""
};
//GENERATE INPUTS TO SAVE THE DATA
Object.keys(update).forEach((key) => {
const label = (key.includes("_")) ? key.replace("_", " ") : key;
const input = `<label><div>${label}</div><input type="text" name="comp_${key}" value="${update[key]}" /></label>`;
setText[`hidden`] += (setText[`hidden`].includes(input)) ? "" : input;
const feedbackLabel =
(key.includes("repeating")) ? key.split("_")[3] :
(key.includes("_")) ? key.replace("_", " ") : key;
(feedbackLabel === "flag" || feedbackLabel === "display") ? false : setText["results"] += addFeedback(feedbackLabel, update[key]);
});
setAttrs(update);
return setText;
}).then((result) => {
setCharmancerText(result);
});
};
// APPLY Changes
on("mancerfinish:apply", () => {
const mancerData = getCharmancerData();
const mancerValues = mancerData["importer"].values;
Object.keys(mancerValues).forEach((key) => {
if (key == "builder" || key == "jsonData" || key == "hidden") {
delete mancerValues[key];
};
});
clean();
setAttrs(mancerValues, () => {
console.log(`%c APPLY IMPORTER:`, "color: blue; font-weight:bold");
console.log(mancerValues);
deleteCharmancerData(["importer"]);
finishCharactermancer();
});
});
</script>
+8 -1
View File
@@ -10,7 +10,7 @@
&[type='roll'],
&[type='action'] {
font-size: 1em;
margin: 0px;
margin: 0px !important;
padding: 1px 2px;
border: {
@@ -25,6 +25,13 @@
&:before {display: none;}
&:hover, &:focus, &:active { font-weight : bold; }
& > span {
display: block;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
}
div {background-color: transparent;}
+21 -17
View File
@@ -28,7 +28,8 @@
.sheet-options_toggle[value='#{$tab}'] ~ .sheet-#{$tab} { @extend %display-inline-block; }
}
/***** SETTINGS *****/
/***** SETTINGS *****/
div.sheet-collapse,
.sheet-settings { @extend %display-none; }
input[name='attr_stats_toggle'][value='settings'] ~ .sheet-attribute .sheet-settings,
@@ -59,23 +60,14 @@
width : 100%;
}
/* NEW REPEATING CONTAINER WAY TO SHOW & HIDE SETTINGS */
/* SLOWLY ELIMINATE ALL TRACES OF SETTINGS-TOGGLE WITH THIS WAY OF DOING THINGS */
input.sheet-settings-flag:checked ~ div.sheet-settings { display : inherit; }
input.sheet-collapse-flag:checked ~ div.sheet-collapse { display: block; }
/* OLD WAY TO SHOW & HIDE THINGS */
input.sheet-settings-toggle[value='display'] ~ div.sheet-display,
input.sheet-settings-toggle[value='settings'] ~ div.sheet-settings {
display: inline-block;
}
/* NEW WAY TO HIDE THINGS */
input.sheet-settings-toggle[value='display'] ~ .sheet-settings {
@extend %display-none;
}
input.sheet-settings-toggle[value='settings'] ~ .sheet-settings {
@extend %display-inline-block;
}
/* SHOW COLLAPSABLE DESCRIPTIONS AFTER CLICKING HIDDEN CHECKBOX */
input.sheet-display-flag ~ div.sheet-collapsable { height: auto; }
input.sheet-settings-toggle[value='display'] ~ .sheet-settings { @extend %display-none; }
input.sheet-settings-toggle[value='settings'] ~ .sheet-settings { @extend %display-inline-block; }
@each $specialAttribute in $specialCharacters {
//-PCs
@@ -90,6 +82,18 @@
}
}
/***** PC WEAPONS *****/
div.sheet-weapon-range,
div.sheet-weapon-melee {
@extend %display-none;
}
input.sheet-tab-switch[value='range'] ~ .sheet-weapon-range,
input.sheet-tab-switch[value='melee'] ~ .sheet-weapon-melee {
@extend %display-inline-block;
}
/***** NPC TYPES *****/
@each $npcType in $npcTypes {
.sheet-#{$npcType} { @extend %display-none; }
+14 -7
View File
@@ -282,7 +282,6 @@
}
span[name='attr_weapon_dice'] {
margin-left: 3%;
@extend %parantheseNumbers;
}
}
@@ -295,7 +294,6 @@
}
span[name='attr_dice'] {
margin-left: 3%;
@extend %parantheseNumbers;
}
@@ -393,21 +391,30 @@
h2[data-i18n='notes'] { grid-row: 3; }
label[data-i18n-title='notes'] { grid-row: 4; }
input.sheet-toggle {
top: 3%;
}
div.repitem {
display: inline-block;
width: 100%;
input[name="attr_program_on"] {
button > span, span { opacity: 0.2; }
input.sheet-toggle,
span.sheet-pictos {
position: absolute;
top: 2%;
}
input[name='attr_program_on'] {
left: 2%;
& + span { left: 2.5%;}
&:checked ~ button > span,
&:checked ~ span { opacity: 1; }
}
button { margin-left: 5%; }
button[type="roll"] { margin-left: 5% !important; }
}
}
}
+45 -470
View File
@@ -5,32 +5,6 @@
vertical-align: top;
width : calc(50% - 5px);
h1 {
background-color: $red;
color : #fff;
font-size : 1em;
letter-spacing : 2px;
line-height : 20px;
padding-left : 5px;
padding-right : 5px;
text-transform : uppercase;
}
h2, h3 {
display : inline-block;
text-transform: capitalize;
}
h2 {
font-size : 0.9em;
line-height: 25px;
}
h3 {
color : hsla(0, 0%, 20%, 0.59);
font-size: 0.8em;
}
&:first-child {
margin-right: 1.5%;
width : calc(50% - 10px);
@@ -45,24 +19,6 @@
select.sheet-skill-select {width: 29%;}
}
/***** DECORATIVE BOX THAT ADDS THE RED OUTLINE ON PC SHEET *****/
.sheet-border-box {
background-image: -moz-linear-gradient($red, transparent), -moz-linear-gradient($red, transparent);
background-image: -o-linear-gradient($red, transparent), -o-linear-gradient($red, transparent);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($red), to(transparent));
background-image: -webkit-linear-gradient($red, transparent);
background-image: linear-gradient($red, transparent), linear-gradient($red, transparent);
border-top : 2px solid $red;
clear : both;
border-top-right-radius: 10px;
border-top-left-radius : 0px;
.sheet-pc-box {
border-top-right-radius: 10px;
border-top-left-radius : 0px;
}
}
.sheet-static {
margin-right: 0.5%;
@@ -74,22 +30,27 @@
}
/***** HEADERS AND TRIANGLES *****/
.sheet-header {
div.sheet-header {
display: inline-flex;
float: right;
height: 20px;}
height: 20px;
}
.sheet-triangle,
.sheet-right-tri {
border-top: 20px solid transparent;}
div.sheet-triangle,
div.sheet-right-tri {
border-top: 20px solid transparent;
}
.sheet-triangle {border-right: 30px solid $red;}
.sheet-right-tri {border-left: 30px solid $red;}
div.sheet-triangle {border-right: 30px solid $red;}
div.sheet-right-tri {border-left: 30px solid $red;}
.sheet-right-header {float: left;}
div.sheet-right-header {
margin-right: -8%;
float: left;
}
/***** SECONDARY HEADERS LIKE ON SKILLS *****/
.sheet-htab {
div.sheet-htab {
margin-right: -47px;
input {
@@ -170,6 +131,17 @@
text-align: left;}
h2, h3 { margin-right: 0px; }
button[name="roll_soak"] {
max-width: 27%;
& > span {
display: block;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
}
}
}
.sheet-flag-primary {
@@ -185,19 +157,6 @@
}
}
/***** PRIMARY ARMOR *****/
.sheet-armor-buttons {
display : inline-block;
font-size : 1.2em;
line-height: 20px;
margin-left: 1%;
width : 30%;
button[type='roll'] { margin-right: -5px; }
span { font-size : 1em; }
}
/***** PRIMARY WEAPON *****/
.sheet-cc-row {
button {
@@ -238,8 +197,6 @@
h3 + span {
display : inline-block;
margin-left: 1%;
text-align : center;
width : 8%;
}
/** Ammo display */
@@ -654,27 +611,13 @@
height : 100%;
}
$displayFlags: 'quality-box', 'contacts', 'item-box', 'spell-box', 'powers-box', 'program-box', 'aug-box', 'form-box', 'social-box', 'vehicle-box';
$displayFlags: 'quality-box', 'contacts', 'social-box', 'vehicle-box';
@each $flag in $displayFlags {
.sheet-#{$flag} .sheet-display-flag { @extend %display-flag;}
}
%arms-display-flag {
height : 12px;
position: absolute;
top : 2px;
width : 12px;
left: 93%;
}
@each $flag in 'arms', 'spell-box', 'matrix' {
.sheet-#{$flag} input.sheet-display-flag,
.sheet-#{$flag} input.sheet-display-flag + span {
@extend %arms-display-flag;
}
.sheet-#{$flag} input.sheet-display-flag { top: 2px; }
.sheet-#{$flag} input.sheet-display-flag + span { top: -2px; }
div.sheet-augs div.sheet-repeat-box {
.sheet-display-flag { @extend %display-flag;}
}
/***** DISPLAY ROWS *****/
@@ -693,11 +636,7 @@
/***** DISPLAY & SETTINGS *****/
.sheet-skills-row,
.sheet-lifestyle .sheet-settings div,
.sheet-magic-rituals .sheet-settings div,
.sheet-spell-box .sheet-display,
.sheet-aug-box .sheet-display,
.sheet-powers-box .sheet-display {
.sheet-lifestyle .sheet-settings div {
display: inline-block;
width : 100%;
}
@@ -710,36 +649,6 @@
}
/***** SKILLS *****/
/***** SKILLS REPEATING SECTION *****/
.sheet-skills-row {
select.sheet-skill-select,
.sheet-settings input[type='text'] {
width: 50%;
}
.sheet-settings {
input[type='text'] {text-align: left;}
input[type='number'] {
margin-left : 3px;
margin-right : 5px;
margin-bottom: 2px;
}
}
/***** SKILLS SETTINGS ROWS *****/
label {
font-size : 0.8em;
font-weight : 700;
margin-bottom: -3px;
}
.sheet-settings-row {
div {width: 70%;}
input[type='text'] {width: 45%;}
}
}
option.sheet-option-headers {opacity: 0.2;}
@@ -753,121 +662,6 @@
width: 3%;
}
/***** ARMS *****/
.sheet-arms {
.sheet-htab {
margin-right: -40px;
&:first-child {margin-left: -35px;}
}
.sheet-display {
@extend %display-inline-block;
margin-left: -1%;
.sheet-display-row {
text-align: center;
width : 8%;
&:first-child {
text-align : left;
width : 36%;
}
&:nth-of-type(2) {width: 12%;}
}
}
input[type='text'] {
text-align: center;
width : 8%;
&:first-child {
text-align : left;
width : 36%;
}
}
h3 {
text-align: center;
width : 8%;
&:first-child {
text-align: left;
margin-right: 2%;
}
&[data-i18n='weapon'] {width: 34%;}
&[data-i18n='armor'] { width: 38%;}
}
}
/***** WEAPONS *****/
.sheet-pc .sheet-weapon-range,
.sheet-pc .sheet-weapon-melee {
display: none;
width : 100%;}
.sheet-tab-switch[value='range'] ~ .sheet-weapon-range,
.sheet-tab-switch[value='melee'] ~ .sheet-weapon-melee {
display: inline-block;
}
/***** WEAPON SETTINGS *****/
.sheet-weapon-box select {width: 10%;}
.sheet-weapon-box .sheet-settings-row {margin-top: 5px;}
.sheet-weapon-range h3 {
margin-right: 3px;}
.sheet-weapon-melee {
h3 {
margin-right: 10px;
&:first-child { width: 40%; }
}
input[type='text']:first-child { width: 40%; }
input,
.sheet-display-row {
margin-right: 5px;
}
}
.sheet-weapon-range h3:nth-child(2),
.sheet-weapon-range h3:nth-child(5) {
width: 11%;}
.sheet-weapon-box label + input[type='text'] {width: 27%;}
.sheet-exotic-warning {
display : none;
font-size: 0.8em;
.sheet-skill-select[value='0'] ~ & {
display: inline;
}
}
/***** ARMOR *****/
.sheet-armor-box {
h3 {margin-right: 5.5px;}
/***** ARMOR SETTINGS *****/
.sheet-settings {
input[name='attr_name'] {width: 40%;}
}
/***** ARMOR DISPLAY *****/
.sheet-display {
.sheet-display-row {
margin-right: 3px;
&:nth-of-type(7) {margin-right: 0px;}
}
}
}
/***** QUALITIES *****/
.sheet-quality-box {
@@ -974,100 +768,7 @@
margin-right: 2%;
width : 53%;}
/***** GEAR *****/
.sheet-item-box h3:first-child{ margin-right: 80%; }
/***** GEAR SETTINGS *****/
.sheet-item-box input[type='text'] {width: 85%;}
/***** GEAR DISPLAY *****/
.sheet-item-box .sheet-display-row,
.sheet-aug-box .sheet-settings input[type='number'] {
width: 10%;}
.sheet-aug-box .sheet-display-row,
.sheet-aug-box .sheet-display-row:nth-of-type(1),
.sheet-item-box .sheet-display-row:nth-of-type(1) {
margin-right: 2%;}
.sheet-item-box .sheet-display-row:nth-of-type(1) {
width: 82%;}
/***** AUGMENTATIONS (AUGS) *****/
.sheet-aug-box h3:nth-of-type(1) {margin-right: 55%;}
.sheet-aug-box h3:nth-of-type(2) {margin-right: 3%;}
/***** AUGMENTATIONS SETTINGS *****/
.sheet-aug-box .sheet-settings input[type='text'],
.sheet-aug-box .sheet-display-row:nth-of-type(1) {
width: 75%;}
.sheet-aug-box .sheet-settings input[type='number'] {margin-right: 1%;}
/***** AUGMENTATIONS DIPLAY *****/
.sheet-aug-box .sheet-display-flag {top: 1px;}
.sheet-aug-box .sheet-display-row {
text-align: center;
width: 8%;}
.sheet-aug-box .sheet-display-row:nth-of-type(1) {text-align: left;}
/***** MAGIC & POWERS *****/
.sheet-magic .sheet-htab {margin-right: -45px;}
.sheet-magic .sheet-htab:first-child {margin-left: -45px;}
div.sheet-spell-box {
h3[data-i18n="modifier"] { width: 12%; }
}
.sheet-spell-box h3,
.sheet-spell-box .sheet-display .sheet-display-row,
.sheet-powers-box h3,
.sheet-powers-box .sheet-settings input[type='text'],
.sheet-powers-box .sheet-display .sheet-display-row:nth-of-type(1) {
margin-right: 1%;}
.sheet-spell-box h3 {width: 13%;}
.sheet-powers-box h3,
.sheet-powers-box input[type='number'],
.sheet-spell-box h3:nth-of-type(5),
.sheet-powers-box h3:nth-of-type(3),
.sheet-powers-box .sheet-display .sheet-display-row:nth-of-type(2) {
width: 8%;}
.sheet-spell-box h3:nth-of-type(1),
.sheet-spell-box input[type='text'] {
width: 40%;}
.sheet-spell-box h3:nth-of-type(5),
.sheet-powers-box h3:nth-of-type(3),
.sheet-powers-box .sheet-display .sheet-display-row:nth-of-type(2) {
margin-right: 0px;}
.sheet-powers-box h3:nth-of-type(1),
.sheet-powers-box .sheet-settings input[type='text'],
.sheet-powers-box .sheet-display .sheet-display-row:nth-of-type(1) {
width: 85%;}
/***** MAGIC & POWERS SETTINGS *****/
.sheet-powers-box .sheet-settings {width: 100%;}
/***** RITUAL SETTINGS *****/
.sheet-magic-rituals input[type='text'] {width: 95%;}
.sheet-magic-rituals .sheet-settings select {width: 32%;}
/***** MAGIC DISPLAY *****/
.sheet-spell-box .sheet-display .sheet-display-row {
text-align: left;
width: 14%;}
.sheet-spell-box .sheet-display .sheet-display-row:nth-of-type(1) {width: 39%;}
.sheet-spell-box .sheet-display .sheet-display-row:nth-of-type(3) {width: 13%;}
.sheet-spell-box .sheet-display .sheet-display-row:nth-of-type(4) {width: 16%;}
.sheet-spell-box .sheet-display .sheet-display-row:nth-of-type(5) {width: 6%;}
.sheet-combat-type-hide {display: none;}
.sheet-combat-type[value*='Direct'] + span:after,
@@ -1121,14 +822,23 @@
}
}
.sheet-cyberdeck h3 {line-height: 20px;}
.sheet-cyberdeck h3:nth-of-type(2) {margin-left: 5%;}
.sheet-cyberdeck h3:nth-of-type(3) {margin-left: 1%;}
.sheet-cyberdeck h3:nth-of-type(4) {
margin-left : 0%;
margin-right: 15%;}
.sheet-cyberdeck h3 {
line-height: 20px;
.sheet-cyberdeck .sheet-row-long h3:first-child {margin-left: 15%;}
&[data-i18n="total"] {margin-left: 15%;}
&[data-i18n="temp"] { margin-left: 5%; }
&[data-i18n="modifier"] {
margin-left: 2%;
margin-right: 2%;
}
&[data-i18n="base"] {
margin-left : 0%;
margin-right: 15%;
}
}
.sheet-cyberdeck input[type='number'] {
border : none;
@@ -1221,97 +931,6 @@
-moz-box-shadow : inset 0px 1px 5px 2px #470101;
box-shadow : inset 0px 1px 5px 2px #470101;}
/***** MATRIX PROGRAMS *****/
.sheet-program-box {
.sheet-repeating-indent {
padding-left: 0em;
text-indent : -1em;
}
input.sheet-program-toggle {
left : 5px;
top : 2px;
width: 15px;
}
span.sheet-program-toggle {
left: 5px;
top : -3px;
}
/***** MATRIX PROGRAM SETTINGS *****/
.sheet-settings div {
display: inline-block;
width : 100%;
}
input[type='text'] {
border-radius: 0px;
border-bottom: 1px solid #000;
width : 98%;
}
}
/***** MATRIX PROGRAM DISPLAY *****/
.sheet-matrix-box .sheet-display {
display: inline-block;}
.sheet-program-box .sheet-repeat-box .sheet-display {
margin-left: 0px;}
.sheet-program-box .sheet-display-row {
margin-left: 25px;
width: 95%;}
.sheet-program-box .sheet-program-toggle {
position: absolute !important;}
.sheet-program-box .sheet-program-toggle:checked span,
.sheet-program-box .sheet-program-toggle:checked ~ .sheet-display-row,
.sheet-program-box .sheet-program-toggle:checked ~ .sheet-collapsable {
opacity: 0.3;}
.sheet-program-box input.sheet-display-flag {
left: 5%;
width: 90%;}
.sheet-program-box .sheet-collapsable {
padding-left: 0em;}
/***** COMPLEX FORMS *****/
.sheet-form-box {
h3 {
margin-right: 1%;
width : 16%;
&:nth-of-type(1) {width: 48%;}
&:nth-of-type(5) {
margin-right: 0px;
width : 7%;}
&:nth-of-type(4) {width: 10%;}
&[data-i18n="modifier"] { width: 12%; }
}
input[type='text'] {width: 50%;}
.sheet-settings div {width: 100%;}
select {
margin-right: 1%;
width : 17%;}
.sheet-display {
display: inline-block;
.sheet-display-row {
margin-right: 1%;
text-align : left;
width : 16%;
&:nth-of-type(1) {width: 48%;}
&:nth-of-type(4) {width: 10%;}
&:nth-of-type(5) {width: 7%;}
}
}
}
/***** VEHICLE *****/
.sheet-vehicle-box .sheet-settings div,
.sheet-vehicle-box .sheet-display {
@@ -1527,10 +1146,6 @@
.sheet-repeating button.sheet-display {
text-align: left;}
.sheet-repeating input[type='checkbox'],
.sheet-repeating input[type='checkbox'] + span {
position: absolute;}
.sheet-repeating input[type='checkbox'] {
width: 15px;
height: 15px;}
@@ -1572,51 +1187,11 @@
.sheet-repeat-dice {font-size: 12px;}
/*:+:+:+: NPC WEAPONS :+:+:+:*/
.sheet-repeat-row.sheet-weapon-range,
.sheet-repeat-row.sheet-weapon-melee {
display: none;}
input.sheet-range-toggle,
input.sheet-melee-toggle {
left : 28px;
margin-left: -32px;
position : relative;}
input.sheet-melee-toggle:checked ~ div.sheet-weapon-melee,
input.sheet-range-toggle:checked ~ div.sheet-weapon-range {
display: inherit;}
input.sheet-melee-toggle + span {margin-right: 0px !important;}
.sheet-weapon-note {
display : inherit;
margin-top: 3px;
width : 100%;}
/*:+:+:+: NPC SPELLS :+:+:+:*/
input.sheet-spell-toggle {margin: 0px -38px 0px 5px;}
.sheet-magic .sheet-repeating select {width: 100%;}
/*:+:+:+: NPC MATRIX :+:+:+:*/
input.sheet-program-toggle {
left: 15px;
top : 5px;}
.sheet-host input.sheet-program-toggle {
left: 5px;
top : 2px;}
span.sheet-program-toggle {
font-size: 15px !important;
left : 24px;
top : 2px;}
.sheet-program-toggle[value='0'] + div.sheet-repeat-indent {opacity: 0.3;}
/*:+:+:+: HIDE SECTOINS WHEN NOT IN USE :+:+:+:*/
.sheet-matrix,
.sheet-magic,
-192
View File
@@ -1,192 +0,0 @@
<div class="row-long">
<h3 data-i18n="spells">Spells</h3><h3 data-i18n="type">Type</h3><h3 data-i18n="range">Range</h3><h3 data-i18n="duration">Duration</h3><h3 data-i18n="drain">Drain</h3>
</div>
<div class="magic-spells">
<fieldset class="repeating_spell">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Fireball" title="Spell name" />
<select name="attr_type" title="Type">
<option value="Mana" selected="selected" data-i18n="mana">Mana</option>
<option value="Physcial" data-i18n="physical">Physical</option>
</select>
<select name="attr_range" title="Range">
<option value="LOS" selected="selected" data-i18n="los">LOS</option>
<option value="LOS (A)" data-i18n="los (a)">LOS (A)</option>
<option value="Special" data-i18n="special">Special</option>
<option value="T" data-i18n="t">T</option>
<option value="T (A)" data-i18n="t (a)">T (A)</option>
</select>
<select name="attr_duration" title="Duration">
<option value="Instant" selected="selected" data-i18n="instant">Instant</option>
<option value="Permanent" data-i18n="permanent">Permanent</option>
<option value="Special" data-i18n="special">Special</option>
<option value="Sustained" data-i18n="sustained">Sustained</option>
</select>
<input type="number" name="attr_drain" value="" placeholder="-1" title="Drain code" />
<div class="settings-row">
<label data-i18n="category">Spell Category</label>
<select name="attr_category" title="Category">
<option class="option" value="Combat" selected="selected" data-i18n="combat">Combat</option>
<option class="option" value="Detection" data-i18n="detection">Detection</option>
<option class="option" value="Health" data-i18n="health">Health</option>
<option class="option" value="Illusion" data-i18n="illusion">Illusion</option>
<option class="option" value="Manipulation" data-i18n="manipulation">Manipulation</option>
<option class="option" value="Other" data-i18n="other">Other</option>
</select>
<input class="category" name="attr_category" type="hidden" value="Combat">
<div class="combat-type-hide">
<label data-i18n="combattype">Combat Type</label>
<select class="combat-type" name="attr_combat_type" title="Combat type">
<option class="option" value="Force " selected="selected"></option>
<option class="option" value="Direct, Force " data-i18n="direct">Direct</option>
<option class="option" value="Indirect, Force ?{Force|}, AP -" data-i18n="indirect">Indirect</option>
</select>
<label class="combat-type" data-i18n="damagetype">Combat Damage</label><input class="spell-input" type="text" name="attr_damage" value="" placeholder="P" title="Damage type" style="width: 8%;"/>
</div>
</div>
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="magicalskill">Magic Skill</label>
<select class="skill-select" name="attr_skill" title="Magic skill">
<option class="option-headers" disabled="true" data-i18n="magicalskills">Magic Skills</option>
<option class="option-groups" value="@{sorcery}" data-i18n="sorcerygroup">Sorcery Group</option>
<option value="@{spellcasting}" selected="selected" data-i18n="spellcasting">Spellcasting</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
</div>
<div class="settings-row">
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Notes"></textarea>
</div>
</div>
</div>
<div class="display">
<div class="display-row" title="Spell roll">
<button type="roll" name="spell" value="@{gm_toggle} &{template:rolls}{{header=@{name}}}{{base=^{magic}}}{{dice=[[((@{skill}+@{dicepool}+@{magic})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=@{combat_type}?{Force|}}}{{drain=[[?{Force|}+(@{drain})]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button>
</div>
<div class="display-row" title="Type"><span name="attr_type"></span></div>
<div class="display-row" title="Range"><span name="attr_range"></span></div>
<div class="display-row" title="Duration"><span name="attr_duration"></span></div>
<div class="display-row" style="text-align: center;" title="Drain code"><span name="attr_drain"></span></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><i><span name="attr_category" title="Category"></span></i></div>
<div class="desc"><i><input class="combat-type" type="hidden" name="attr_combat_type" title="Combat type" /><span></span></i></div>
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_spell" type="action">x</button>
</fieldset>
</div>
<div class="magic-preps">
<fieldset class="repeating_preps">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Fireball" title="Spell name" />
<select name="attr_type" title="Type">
<option value="Mana" selected="selected" data-i18n="mana">Mana</option>
<option value="Physcial" data-i18n="physical">Physical</option>
</select>
<select name="attr_range" title="Range">
<option value="LOS" selected="selected" data-i18n="los">LOS</option>
<option value="LOS (A)" data-i18n="losa">LOS (A)</option>
<option value="Special" data-i18n="special">Special</option>
<option value="T" data-i18n="t">T</option>
<option value="T (A)" data-i18n="ta">T (A)</option>
</select>
<select name="attr_duration" title="Duration">
<option value="Instant" selected="selected" data-i18n="instant">Instant</option>
<option value="Permanent" data-i18n="permanent">Permanent</option>
<option value="Special" data-i18n="special">Special</option>
<option value="Sustained" data-i18n="sustained">Sustained</option>
</select>
<input type="number" name="attr_drain" value="" placeholder="-1" title="Drain code" />
<div class="settings-row">
<label data-i18n="category">Spell Category</label>
<select name="attr_category" title="Category">
<option class="option" value="Combat" selected="selected" data-i18n="combat">Combat</option>
<option class="option" value="Detection" data-i18n="detection">Detection</option>
<option class="option" value="Health" data-i18n="health">Health</option>
<option class="option" value="Illusion" data-i18n="illusion">Illusion</option>
<option class="option" value="Manipulation" data-i18n="manipulation">Manipulation</option>
<option class="option" value="Other" data-i18n="other">Other</option>
</select>
<input class="category" name="attr_category" type="hidden" value="Combat">
<div class="combat-type-hide">
<label data-i18n="combattype">Combat Type</label>
<select class="combat-type" name="attr_combat_type" title="Combat type">
<option class="option" value="Force " selected="selected"></option>
<option class="option" value="Direct, Force " data-i18n="direct">Direct</option>
<option class="option" value="Indirect, Force ?{Force|}, AP -" data-i18n="indirect">Indirect</option>
</select>
<label class="combat-type" data-i18n="damagetype">Combat Damage</label><input class="spell-input" type="text" name="attr_damage" value="" placeholder="P" title="Damage type" style="width: 8%;"/>
</div>
</div>
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="magicalskill">Magic Skill</label>
<select class="skill-select" name="attr_skill" title="Magic skill">
<option class="option-headers" disabled="true" data-i18n="magicalskills">Magic Skills</option>
<option class="option-groups" value="@{enchanting}" data-i18n="enchantinggroup">Enchanting Group</option>
<option value="@{alchemy}" selected="selected" data-i18n="alchemy">Alchemy</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
</div>
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Alchemy notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" />
<div class="display-row" title="Spell roll"><button type="roll" name="alchemic" value="@{gm_toggle} &{template:rolls}{{header=@{name}}}{{base=^{magic}}}{{dice=[[((@{skill}+@{dicepool}+@{magic})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=@{combat_type}?{Force|}}}{{drain=[[?{Force|}+(@{drain})]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button></div>
<div class="display-row" title="Type"><span name="attr_type"></span></div>
<div class="display-row" title="Range"><span name="attr_range"></span></div>
<div class="display-row" title="Duration"><span name="attr_duration"></span></div>
<div class="display-row" style="text-align: center;" title="Drain code"><span name="attr_drain"></span></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><i><span name="attr_category" title="Category"></span></i></div>
<div class="desc"><i><input class="combat-type" type="hidden" name="attr_combat_type" title="Combat type"/><span></span></i></div>
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_preps" type="action">x</button
</fieldset>
</div>
<div class="magic-rituals">
<fieldset class="repeating_ritual">
<input type="hidden" class="settings-toggle" name="attr_flag" value="settings" />
<div class="settings">
<div>
<input type="text" name="attr_name" placeholder="Curse (MATERIAL LINK, SPELL)" title="Ritual name" />
<div class="settings-row">
<input type="hidden" name="attr_dicepool" value="0" />
<label data-i18n="magicalskill">Magic Skill</label>
<select class="skill-select" name="attr_skill" title="Magic skill">
<option class="option-headers" disabled="true" data-i18n="magicalskills">Magic Skills</option>
<option class="option-groups" value="@{sorcery}" data-i18n="sorcerygroup">Sorcery Group</option>
<option value="@{ritualspell}" selected="selected" data-i18n="ritualspellcasting">Ritual Spellcasting</option>
</select>
<label data-i18n="specializations">Specialization</label><input class="skill-select" type="checkbox" name="attr_spec" value="2" title="Applicable specialization" />
<label data-i18n="modifierdice">modifier dice</label><input type="number" name="attr_dicepool_modifier" title="Additional dicepool bonus" />
</div>
<label data-i18n="notes">Notes</label>
<textarea name="attr_notes" value="" placeholder="Ritual notes"></textarea>
</div>
</div>
<div class="display">
<input class="display-flag" type="checkbox" name="attr_display_flag" />
<div class="display-row" class="Ritual roll"><button type="roll" name="ritual" value="@{gm_toggle} &{template:rolls}{{header=@{name}}}{{base=^{magic}}}{{dice=[[((@{skill}+@{dicepool}+@{magic})+@{wounds_toggle}+@{modifiers_toggle}+@{edge_toggle})d6>5@{explode_toggle}]]}}{{desc=Force ?{Force|}]]}}{{mod=[[@{modifiers_toggle}]]}}{{wound=[[@{wounds_toggle}]]}}{{edge=[[@{edge_toggle}]]}}"><span name="attr_name"></span></button></div>
<input class="display-flag" type="checkbox" name="attr_display_flag" title="Display notes" /><span>i</span>
<div class="collapsable">
<div class="desc"><span name="attr_notes"></span></div>
</div>
</div>
<button class="pictos settings-button" name="act_ritual" type="action">x</button>
</fieldset>
</div>
+11 -3
View File
@@ -122,7 +122,7 @@
"ethnicity": "Ethnicity",
"etiquette": "Etiquette",
"exoticmelee": "Exotic Melee",
"exoticnote": "Exotics are not linked to skills. Use modifier Dice input to set skill dice.",
"exoticnote": "Exotic weapons are not linked to a skill. Use Modifier input to set dicepool",
"exoticrange": "Exotic Range",
"extended": "Extended",
"f": "F",
@@ -200,7 +200,6 @@
"m": "M",
"magic": "Magic",
"magicalskill": "Magical Skill",
"magicalskills": "Magical Skills",
"magicres": "Magic/Resonance",
"mana": "Mana",
"manipulation": "Manipulation",
@@ -286,6 +285,7 @@
"publicawareness": "Public Awereness",
"qualities": "Qualities",
"quality": "Quality",
"quantity": "Quantity",
"r": "R",
"radi": "Radi.",
"radiationprotection": "Radiation Protection",
@@ -328,7 +328,7 @@
"sorcery": "Sorcery",
"sorcerygroup": "Sorcery Group",
"special": "Special",
"specializations": "Specializations",
"specialization": "Specialization",
"speed": "Speed",
"speedoff": "Speed (Off)",
"spellcasting": "Spellcasting",
@@ -388,4 +388,12 @@
, "walk modifier": "walk modifier"
,"run modifier": "run modifier"
,"movement modifier": "movement modifier"
,"preperations": "preperations"
,"force": "force"
,"potency": "potency"
,"trigger": "trigger"
,"command": "command"
,"contact": "contact"
,"time":"time"
,"adeptpowers": "Adept Powers or Other Abilities"
}
+1 -1
View File
@@ -122,7 +122,7 @@
"ethnicity": "Ethnicity",
"etiquette": "Etiquette",
"exoticmelee": "Exotic Melee",
"exoticnote": "Exotics are not linked to skills. Use modifier Dice input to set skill dice.",
"exoticnote": "Exotic weapons are not linked to a skill. Use Modifier input to set dicepool",
"exoticrange": "Exotic Range",
"extended": "Extended",
"f": "F",