33
44
55 < div class ="nav ">
6- < input type ="hidden " class ="mooktoggle " name ="attr_mooksheet_flag " value =' 0 ' />
6+ < input type ="hidden " class ="mooktoggle " name ="attr_mooksheet_flag " value =" 0 " />
77
88 < div class ="character-mode "> < button type ="action " name ="act_character " > CHARACTER</ button > </ div >
99 < div class ="mook-mode "> < button type ="action " name ="act_mook " > MOOK</ button > </ div >
@@ -86,7 +86,8 @@ <h3>ROLE ABILITIES</h3><input type=text spellcheck=false name="attr_RoleAbility"
8686 < div class ="bg-white skill-rank "> < input type ="number " name ="attr_rankMoto " placeholder ="0 "/> </ div >
8787 </ div >
8888
89- < div class ="flex-table ">
89+ < input type ="hidden " class ="settings-toggle-show-initiative-modifier " name ="attr_initiative_modifier_flag " value ="0 " />
90+ < div class ="flex-table initiative-modifier ">
9091 < div class ="bg-black-2 skill-name "> Initiative Modifier</ div >
9192 < div class ="bg-white skill-rank "> < input type ="number " name ="attr_initiative_modifier " value ="0 "/> </ div >
9293 </ div >
@@ -912,7 +913,8 @@ <h3>ROLE ABILITIES</h3><input type=text spellcheck=false name="attr_RoleAbility"
912913 < button type ="roll " name ="roll_weapon_dmg " style ="display: none; " value ="@{DMG} "> </ button >
913914 < input type ="hidden " name ="attr_WeaponMod " value ="@{Total_Melee} ">
914915 < div class ="bg-white weapon-name ">
915- < button name ="roll_aimed_shot " type ="roll " class ="txt-btn " value ="&{template:attack} {{critroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+10+1d10]]}} {{@{Weapontype}=true}} {{rollname=[@{Weaponname}](~repeating_weapons_weapon_dmg)}} {{failroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1-1d10]]}} {{weapontype=@{Weapontype}}} {{aimed_shot=1}} {{roll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1d10]]}} " title ="Aimed Shot "> ⌖</ button >
916+ < input type ="hidden " class ="settings-toggle-show-aimed-shot-button " name ="attr_aimed_shot_flag " value ="0 " />
917+ < button name ="roll_aimed_shot " type ="roll " class ="txt-btn aimed-shot-icon " value ="&{template:attack} {{critroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+10+1d10]]}} {{@{Weapontype}=true}} {{rollname=[@{Weaponname}](~repeating_weapons_weapon_dmg)}} {{failroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1-1d10]]}} {{weapontype=@{Weapontype}}} {{aimed_shot=1}} {{roll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1d10]]}} " title ="Aimed Shot "> ⌖</ button >
916918 < button name ="roll_attack " type ="roll " class ="txt-btn " value ="&{template:attack} {{critroll=[[@{WeaponMod}+@{WeaponBonus}+10+1d10]]}} {{@{Weapontype}=true}} {{rollname=[@{Weaponname}](~repeating_weapons_weapon_dmg)}} {{failroll=[[@{WeaponMod}+@{WeaponBonus}+1-1d10]]}} {{weapontype=@{Weapontype}}} {{roll=[[@{WeaponMod}+@{WeaponBonus}+1d10]]}} "> Attack:</ button >
917919 < input type =text spellcheck =false name ="attr_Weaponname " placeholder ="Type here... ">
918920 </ div >
@@ -1603,31 +1605,66 @@ <h2>NOTES</h2>
16031605 </ div >
16041606
16051607 < div class ="settings ">
1606-
1607- < div class ="nav ">
1608- < div > < button class ="options " type ="action " name ="act_resetbase " > RESET BASE SKILLS</ button > </ div >
1609- < div > < button class ="options " type ="action " name ="act_newcharacter " > TOGGLE STAT/SKILLPOINT TRACKER</ button > </ div >
1610- </ div >
1611-
16121608 < div class ="my-settings ">
1613- < div class ="option ">
1614- < div class ="settings-title "> ENABLE MOOK SHEET</ div >
1615- < div class ='settings-checkbox '>
1616- < input type ="hidden " class ="mooktoggle " name ="attr_mooksheet_flag " value =0/ >
1617- < button type ="action " name ="act_mooksheet " class ="mooktoggle ">
1618- < span class ="checked "> ✓</ span >
1619- </ button >
1609+
1610+ < div class ="settings-row ">
1611+ < h3 > CHARACTER SHEET OPTIONS</ h3 >
1612+ < div class ="nav ">
1613+ < div > < button class ="options " type ="action " name ="act_resetbase " > RESET BASE SKILLS</ button > </ div >
1614+ < div > < button class ="options " type ="action " name ="act_newcharacter " > TOGGLE STAT/SKILLPOINT TRACKER</ button > </ div >
1615+ </ div >
1616+ < div class ="settings-option ">
1617+ < div class ="settings-title "> ENABLE MOOK SHEET</ div >
1618+ < div class ="settings-value ">
1619+ < div class ="settings-checkbox ">
1620+ < input type ="hidden " class ="mooktoggle " name ="attr_mooksheet_flag " value ="0 " />
1621+ < button type ="action " name ="act_mooksheet " class ="mooktoggle ">
1622+ < span class ="checked "> ✓</ span >
1623+ </ button >
1624+ </ div >
1625+ </ div >
1626+ </ div >
1627+ < div class ="settings-option ">
1628+ < div class ="settings-title "> SHOW INITIATIVE MODIFIER</ div >
1629+ < div class ="settings-value ">
1630+ < div class ="settings-checkbox ">
1631+ < input type ="hidden " class ="settings-toggle settings-toggle-show-initiative-modifier " name ="attr_initiative_modifier_flag " value ="0 " />
1632+ < button type ="action " name ="act_initiative_modifier " class ="settings-toggle ">
1633+ < span class ="checked "> ✓</ span >
1634+ </ button >
1635+ </ div >
1636+ </ div >
16201637 </ div >
16211638 </ div >
16221639
1623- < div class ="option ">
1624- < div class ="settings-title "> AIMED SHOT PENALTY</ div >
1625- < div class ='settings-text '>
1626- < input type ="number " name ="attr_aimed_shot_penalty " value ="-8 " />
1640+ < div class ="settings-row ">
1641+ < h3 > AIMED SHOT OPTIONS</ h3 >
1642+ < div class ="settings-help ">
1643+ When enabled, an aimed shot button is displayed next to the "Attack" button for each weapon.
1644+ The button will be displayed as a crosshair icon that looks like this: "< span class ="aimed-shot-icon "> ⌖</ span > ".
1645+ </ div >
1646+ < div class ="settings-option ">
1647+ < div class ="settings-title settings-title-show-aimed " name ="title_show_aimed_button "> SHOW AIMED SHOT BUTTON</ div >
1648+ < div class ="settings-value ">
1649+ < div class ="settings-checkbox ">
1650+ < input type ="hidden " class ="settings-toggle settings-toggle-show-aimed-shot-button " name ="attr_aimed_shot_flag " value ="0 " />
1651+ < button type ="action " name ="act_aimed_shot " class ="settings-toggle ">
1652+ < span class ="checked "> ✓</ span >
1653+ </ button >
1654+ </ div >
1655+ </ div >
1656+ </ div >
1657+ < div class ="settings-option ">
1658+ < div class ="settings-title "> AIMED SHOT PENALTY</ div >
1659+ < div class ="settings-value ">
1660+ < div class ="settings-number ">
1661+ < input type ="number " name ="attr_aimed_shot_penalty " value ="-8 " />
1662+ </ div >
1663+ </ div >
16271664 </ div >
16281665 </ div >
1629- </ div >
16301666
1667+ </ div >
16311668 </ div >
16321669
16331670 < div class ="mook ">
@@ -1717,7 +1754,8 @@ <h2>NOTES</h2>
17171754 < button type ="roll " name ="roll_weapon_dmg " style ="display: none; " value ="@{DMG} "> </ button >
17181755 < input type ="hidden " name ="attr_WeaponMod " value ="@{Total_Melee} ">
17191756 < div class ="bg-white weapon-name ">
1720- < button name ="roll_aimed_shot " type ="roll " class ="txt-btn " value ="&{template:attack} {{critroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+10+1d10]]}} {{@{Weapontype}=true}} {{rollname=[@{Weaponname}](~repeating_weapons_weapon_dmg)}} {{failroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1-1d10]]}} {{weapontype=@{Weapontype}}} {{aimed_shot=1}} {{roll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1d10]]}} " title ="Aimed Shot "> ⌖</ button >
1757+ < input type ="hidden " class ="settings-toggle-show-aimed-shot-button " name ="attr_aimed_shot_flag " value ="0 " />
1758+ < button name ="roll_aimed_shot " type ="roll " class ="txt-btn aimed-shot-icon " value ="&{template:attack} {{critroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+10+1d10]]}} {{@{Weapontype}=true}} {{rollname=[@{Weaponname}](~repeating_weapons_weapon_dmg)}} {{failroll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1-1d10]]}} {{weapontype=@{Weapontype}}} {{aimed_shot=1}} {{roll=[[@{WeaponMod}+@{WeaponBonus}+@{aimed_shot_penalty}+1d10]]}} " title ="Aimed Shot "> ⌖</ button >
17211759 < button name ="roll_attack " type ="roll " class ="txt-btn " value ="&{template:attack} {{critroll=[[@{WeaponMod}+@{WeaponBonus}+10+1d10]]}} {{@{Weapontype}=true}} {{rollname=[@{Weaponname}](~repeating_weapons_weapon_dmg)}} {{failroll=[[@{WeaponMod}+@{WeaponBonus}+1-1d10]]}} {{weapontype=@{Weapontype}}} {{roll=[[@{WeaponMod}+@{WeaponBonus}+1d10]]}} "> Attack:</ button >
17221760 < input type =text spellcheck =false name ="attr_Weaponname " placeholder ="Type here... "> </ div >
17231761 < div class ="bg-white weapon-type ">
@@ -3231,7 +3269,10 @@ <h2>Inventory and Notes</h2>
32313269 } ) ;
32323270 } ) ;
32333271
3234- const toggleList = [ "cbaudio" , "lefteye" , "righteye" , "rightarm" , "leftarm" , "neurallink" , "rightleg" , "leftleg" , "mooksheet" ] ;
3272+ const toggleList = [
3273+ "cbaudio" , "lefteye" , "righteye" , "rightarm" , "leftarm" , "neurallink" , "rightleg" , "leftleg" , "mooksheet" ,
3274+ "initiative_modifier"
3275+ ] ;
32353276 toggleList . forEach ( function ( button ) {
32363277 on ( `clicked:${ button } ` , function ( ) {
32373278 const flag = `${ button } _flag` ;
@@ -3242,6 +3283,22 @@ <h2>Inventory and Notes</h2>
32423283 } ) ;
32433284 } ) ;
32443285 } ) ;
3286+ on ( 'clicked:aimed_shot' , function ( ) {
3287+ getAttrs ( [ 'aimed_shot_flag' ] , function ( v ) {
3288+ const flag_value = v [ 'aimed_shot_flag' ] !== "1" ? "1" : "0" ;
3289+ setAttrs ( {
3290+ [ 'aimed_shot_flag' ] : flag_value
3291+ } ) ;
3292+
3293+ getSectionIDs ( "repeating_weapons" , function ( idarray ) {
3294+ const output = { } ;
3295+ idarray . forEach ( id => {
3296+ output [ `repeating_weapons_${ id } _aimed_shot_flag` ] = flag_value ;
3297+ } ) ;
3298+ setAttrs ( output ) ;
3299+ } ) ;
3300+ } ) ;
3301+ } ) ;
32453302
32463303</ script >
32473304
0 commit comments