Obsidian Portal
Menu
Sign In / Create Account
JavaScript is currently disabled. Obsidian Portal has a lot of really cool features that use JavaScript. You should check them out. We think you'll have a much more enjoyable experience.
Home
Campaigns
Games Nearby
Plans
Community
Help
Resources
Call of Cthulhu 7th Edition
Author:
barrelv
Slug:
coc7
Type:
GameCharacter
System:
Call of Cthulhu
DST Source Code
HTML Template
<div class="wrapper coc7"> <div class="main" style="display:block;"> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-top-left.png" class="corner_top_left" /> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-top-right.png" class="corner_top_right" /> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-bottom-left.png" class="corner_bottom_left" /> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-bottom-right.png" class="corner_bottom_right" /> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-bottom.png" class="brass_bottom" /> <div class="pagehead"> <div class="head"> <span class="name readonly dsf dsf_campaign singlerow">Campaign Name</span> </div> <span class="singlerow" style="text-align:right;">Membership Application</span> </div> <div class="page page_crunch active"> <div class="head"> <span class="name singlerow">Investigator</span> </div> <div class="column thirdwidth colspace"> <!-- Investigator Info --> <div class="section thirdwidth"> <dl><dt>Name</dt><dd><span class=" dsf dsf_name"></span></dd></dl> <dl><dt>Player</dt><dd><span class=" dsf dsf_player"></span></dd></dl> <dl><dt>Occupation</dt><dd><span class=" dsf dsf_occupation"></span></dd></dl> <dl><dt>Age</dt><dd><span class=" dsf dsf_age"></span></dd></dl> <dl><dt>Sex</dt><dd><span class=" dsf dsf_sex"></span></dd></dl> <dl><dt>Birthplace</dt><dd><span class=" dsf dsf_birth"></span></dd></dl> <dl><dt>Residence</dt><dd><span class=" dsf dsf_residence"></span></dd></dl> </div> </div> <div class="column thirdwidth"> <!-- Characteristics --> <div class="section thirdwidth"> <dl><dt>STR:</dt><dd><span class="dsf dsf_str"></span>%</dd></dl> <dl><dt>CON:</dt><dd><span class="dsf dsf_con"></span>%</dd></dl> <dl><dt>SIZ </dt><dd><span class="dsf dsf_siz"></span>%</dd></dl> <dl><dt>DEX</dt><dd><span class="dsf dsf_dex"></span>%</dd></dl> <dl><dt>APP</dt><dd><span class="dsf dsf_app"></span>%</dd></dl> <dl><dt>INT</dt><dd><span class="dsf dsf_int"></span>%</dd></dl> <dl><dt>POW</dt><dd><span class="dsf dsf_pow"></span>%</dd></dl> <dl><dt>EDU</dt><dd><span class="dsf dsf_edu"></span>%</dd></dl> <dl><dt>Move Rate</dt><dd><span class= "readonly dsf dsf_move"></span></dd></dl> </div> </div> <div class="column thirdwidth"> <!-- Investigator Info --> <div class="section thirdwidth"> <dl><dt>Hit Points:</dt><dd><span class="dsf dsf_hpCurrent"></span> of <span class="readonly dsf dsf_hpMax"></span></dd></dl> <dl><dt>Magic Points:</dt><dd><span class="dsf dsf_magicCurrent"></span> of <span class="readonly dsf dsf_magicMax"></span></dd></dl> <dl><dt>Sanity:</dt><dd><span class="dsf dsf_sanityCurrent"></span> of <span class="readonly dsf dsf_sanityMax"></span></dd></dl> <dl><dt>Luck</dt><dd><span class="dsf dsf_luckCurrent"></span> of <span class="dsf dsf_luckMax"></span></dd></dl> </div> </div> <!-- Investigator Skills --> <div class="fullwidth"> <div class="readonly singlerow head">Investigator Skills</div> </div> <div class="column thirdwidth colspace"> <div class="section thirdwidth"> <dl><dt>Accounting</dt><dd><span class="dsf dsf_accounting">5</span>%</dd></dl> <dl><dt>Anthropology</dt><dd><span class="dsf dsf_anthropology">1</span>%</dd></dl> <dl><dt>Appraise</dt><dd><span class=" dsf dsf_appraise">5</span>%</dd></dl> <dl><dt>Archaeology</dt><dd><span class=" dsf dsf_archeology">1</span>%</dd></dl> <dl><dt>Art / Craft</dt><dd><span class=" dsf dsf_art">5</span>%</dd></dl> <dl><dt><span class=" dsf dsf_artName1"></span></dt><dd><span class=" dsf dsf_art1">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_artName2"></span></dt><dd><span class=" dsf dsf_art2">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_artName3"></span></dt><dd><span class=" dsf dsf_art3">0</span>%</dd></dl> <dl><dt>Charm</dt><dd><span class=" dsf dsf_charm">15</span>%</dd></dl> <dl><dt>Climb</dt><dd><span class=" dsf dsf_climb">20</span>%</dd></dl> <dl><dt>Credit Rating</dt><dd><span class=" dsf dsf_creditRating">0</span>%</dd></dl> <dl><dt>Cthulhu Mythos</dt><dd><span class=" dsf dsf_cthulhuMythos">0</span>%</dd></dl> <dl><dt>Disguise</dt><dd><span class=" dsf dsf_disguise">5</span>%</dd></dl> <dl><dt>Dodge</dt><dd><span class=" dsf dsf_dodge"></span>%</dd></dl> <dl><dt>Drive Auto</dt><dd><span class=" dsf dsf_driveAuto">20</span>%</dd></dl> <dl><dt>Elec Repair</dt><dd><span class=" dsf dsf_elecRepair">10</span>%</dd></dl> <dl><dt>Fast Talk</dt><dd><span class=" dsf dsf_fastTalk">5</span>%</dd></dl> <dl><dt>Fighting (Brawl)</dt><dd><span class=" dsf dsf_fightBrawl">25</span>%</dd></dl> <dl><dt><span class=" dsf dsf_fightName1"></span></dt><dd><span class=" dsf dsf_fight1">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_fightName2"></span></dt><dd><span class=" dsf dsf_fight2">0</span>%</dd></dl> </div> </div> <div class="column thirdwidth"> <div class="section thirdwidth"> <dl><dt>Firearms (Pistol)</dt><dd><span class=" dsf dsf_firearmPistol">20</span>%</dd></dl> <dl><dt>Firearms <br/>(Rifle/Shotgun)</dt><br/><dd><span class=" dsf dsf_firearmsRifle">25</span>%</dd></dl> <dl><dt><span class=" dsf dsf_fightName3"></span></dt><dd><span class=" dsf dsf_fight3">0</span>%</dd></dl> <dl><dt>First Aid</dt><dd><span class=" dsf dsf_firstAid">30</span>%</dd></dl> <dl><dt>History</dt><dd><span class=" dsf dsf_history">5</span>%</dd></dl> <dl><dt>Intimidate</dt><dd><span class=" dsf dsf_intimidate">15</span>%</dd></dl> <dl><dt>Jump</dt><dd><span class=" dsf dsf_jump">20</span>%</dd></dl> <dl><dt><span class=" dsf dsf_languageName1">Language(other)</span></dt><dd><span class=" dsf dsf_language1">1</span>%</dd></dl> <dl><dt><span class=" dsf dsf_languageName2"></span></dt><dd><span class=" dsf dsf_language2">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_languageName3"></span></dt><dd><span class=" dsf dsf_language3">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_languageName4"></span></dt><dd><span class=" dsf dsf_language4">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_languageOwnName">Language (own)</span></dt><dd><span class=" dsf dsf_languageOwn"></span>%</dd></dl> <dl><dt>Law</dt><dd><span class=" dsf dsf_Law">5</span>%</dd></dl> <dl><dt>Library Use</dt><dd><span class=" dsf dsf_libraryUse">20</span>%</dd></dl> <dl><dt>Listen</dt><dd><span class=" dsf dsf_Listen">20</span>%</dd></dl> <dl><dt>Locksmith</dt><dd><span class=" dsf dsf_Locksmith">1</span>%</dd></dl> <dl><dt>Mech. Repair</dt><dd><span class=" dsf dsf_mechRepair">10</span>%</dd></dl> <dl><dt>Medicine</dt><dd><span class=" dsf dsf_medicine">1</span>%</dd></dl> <dl><dt>Natural World</dt><dd><span class=" dsf dsf_naturalWorld">10</span>%</dd></dl> <dl><dt>Navigate</dt><dd><span class=" dsf dsf_navigate">10</span>%</dd></dl> <dl><dt>Occult</dt><dd><span class=" dsf dsf_occult">5</span>%</dd></dl> </div> </div> <div class="column thirdwidth"> <div class="section thirdwidth"> <dl><dt>Op. Hv. Machine</dt><dd><span class=" dsf dsf_opHvMachine">1</span>%</dd></dl> <dl><dt>Persuade</dt><dd><span class=" dsf dsf_pursuade">10</span>%</dd></dl> <dl><dt><span class=" dsf dsf_pilotName">Pilot</span></dt><dd><span class=" dsf dsf_pilot">1</span>%</dd></dl> <dl><dt>Psychology</dt><dd><span class=" dsf dsf_psychology">10</span>%</dd></dl> <dl><dt>Psychoanalysis</dt><dd><span class=" dsf dsf_psychoanalysis">1</span>%</dd></dl> <dl><dt>Ride</dt><dd><span class=" dsf dsf_ride">5</span>%</dd></dl> <dl><dt><span class=" dsf dsf_scienceName1">Science</span></dt><dd><span class=" dsf dsf_science1">1</span>%</dd></dl> <dl><dt><span class=" dsf dsf_scienceName2"></span></dt><dd><span class=" dsf dsf_science2">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_scienceName3"></span></dt><dd><span class=" dsf dsf_science3">0</span>%</dd></dl> <dl><dt>Sleight of Hand</dt><dd><span class=" dsf dsf_sleightOfHand">10</span>%</dd></dl> <dl><dt>Spot Hidden</dt><dd><span class=" dsf dsf_spotHidden">25</span>%</dd></dl> <dl><dt>Stealth</dt><dd><span class=" dsf dsf_stealth">20</span>%</dd></dl> <dl><dt><span class=" dsf dsf_survivalName">Survival</span></dt><dd><span class=" dsf dsf_survival">10</span>%</dd></dl> <dl><dt>Swim</dt><dd><span class=" dsf dsf_swim">20</span>%</dd></dl> <dl><dt>Throw</dt><dd><span class=" dsf dsf_throw">20</span>%</dd></dl> <dl><dt>Track</dt><dd><span class=" dsf dsf_track">10</span>%</dd></dl> <dl><dt><span class=" dsf dsf_skillName1"></span></dt><dd><span class=" dsf dsf_skill1">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_skillName2"></span></dt><dd><span class=" dsf dsf_skill2">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_skillName3"></span></dt><dd><span class=" dsf dsf_skill3">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_skillName4"></span></dt><dd><span class=" dsf dsf_skill4">0</span>%</dd></dl> <dl><dt><span class=" dsf dsf_skillName5"></span></dt><dd><span class=" dsf dsf_skill5">0</span>%</dd></dl> </div> </div> <!-- Attacks --> <div class="fullwidth"> <div class="readonly singlerow head">Weapons</div> </div> <div class="column threequarterwidth"> <div class="section attacks threequarterwidth"> <div class="labelrow"> <span class="weaponName">Weapon</span> <span class="weaponAccuracy">R/H/E</span> <span class="tags">Dmg</span> <span class="weaponAccuracy">Rng</span> <span class="tags">Attks</span> <span class="tags">Ammo</span> <span class="tags">Malf</span> </div> <div class="row"> <span class="weaponName dsf dsf_weaponName1">Unarmed</span> <span class="weaponAccuracy dsf dsf_weaponAccuracy1">25/12/5</span> <span class="tags dsf dsf_weaponDamage1">1d3+db</span> <span class="weaponAccuracy dsf dsf_weaponRange1">-</span> <span class="tags dsf dsf_weaponAttacks1">1</span> <span class="tags dsf dsf_weaponAmmo1">-</span> <span class="tags dsf dsf_weaponMalf1">-</span> </div> <div class="row"> <span class="weaponName dsf dsf_weaponName2">-</span> <span class="weaponAccuracy dsf dsf_weaponAccuracy2">-</span> <span class="tags dsf dsf_weaponDamage2">-</span> <span class="weaponAccuracy dsf dsf_weaponRange2">-</span> <span class="tags dsf dsf_weaponAttacks2">-</span> <span class="tags dsf dsf_weaponAmmo2">-</span> <span class="tags dsf dsf_weaponMalf2">-</span> </div> <div class="row"> <span class="weaponName dsf dsf_weaponName3">-</span> <span class="weaponAccuracy dsf dsf_weaponAccuracy3">-</span> <span class="tags dsf dsf_weaponDamage3">-</span> <span class="weaponAccuracy dsf dsf_weaponRange3">-</span> <span class="tags dsf dsf_weaponAttacks3">-</span> <span class="tags dsf dsf_weaponAmmo3">-</span> <span class="tags dsf dsf_weaponMalf3">-</span> </div> <div class="row"> <span class="weaponName dsf dsf_weaponName4">-</span> <span class="weaponAccuracy dsf dsf_weaponAccuracy4">-</span> <span class="tags dsf dsf_weaponDamage4">-</span> <span class="weaponAccuracy dsf dsf_weaponRange4">-</span> <span class="tags dsf dsf_weaponAttacks4">-</span> <span class="tags dsf dsf_weaponAmmo4">-</span> <span class="tags dsf dsf_weaponMalf4">-</span> </div> </div> </div> <div class="column quarterwidth"> <div class="head">Combat</div> <div class="section quarterwidth"> <dl><dt>Damage Bonus</dt><dd><span class="readonly dsf dsf_damageBonus">0</span></dd></dl> <dl><dt>Build</dt><dd><span class="readonly dsf dsf_build">0</span></dd></dl> <dl><dt>Dodge</dt><dd><span class="readonly dsf dsf_dodge2"></span>%</dd></dl> </div> </div> <!-- Biography --> <div class="section"> <div class="head">BIOGRAPHY</div> <div class="group"> <div class="portraitholder"> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-top-left.png" class="topleft" /> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-top-right.png" class="topright" /> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-bottom-left.png" class="bottomleft" /> <img alt="" src="https://chainsawxiv.github.io/DST/sheets/chainsawxiv_exalted/images/brass-corner-bottom-right.png" class="bottomright" /> <div class="portrait readonly dsf dsf_avatar_image"></div> </div> <span class="dsf dsf_bio fullwidth readonly">Edit Biography below...</span> </div> </div> <!-- Appearance --> <div class="section"> <div class="head">APPEARANCE</div> <div class="group"> <span class="dsf dsf_tagline fullwidth "></span> </div> </div> </div> </div> <div class="page_foot"> <div class="head"></div> Character By <span class="align_right dsf dsf_player readonly">Player</span> • Sheet By <span class="align_left dsf dsf_dst_author readonly">Author</span> • Adapted from the work of <a href="/profile/ChainsawXIV">ChainsawXIV</a> </div> </div>
CSS
/* Font Imports */ @import url(https://fonts.googleapis.com/css?family=Cutive); /* Edit Fields */ .coc7 .dsf, .coc7 .edit{ position:relative; display:inline-block; cursor:default; } .coc7 .dsf p, .coc7 .edit p{ margin:0px; line-height:inherit; } .coc7 .dsf:not(.readonly), .coc7 .edit:not(.readonly){ } .editable .coc7 .dsf, .editable .coc7 .edit{ cursor:text; } .editable .coc7 .dsf:hover:not(.readonly), .editable .coc7 .edit:hover:not(.readonly){ background-color:rgba(0,0,0,0.02); } .editable .coc7 .dsf:focus, .editable .coc7 .edit:focus, .editable .coc7 .dsf:focus:hover, .editable .coc7 .edit:focus:hover{ background-color:rgba(0,0,0,0.05); } .coc7 .dsf ul, .coc7 .edit ul{ margin:0px; padding: 0px 0px 0px 20px; list-style: url('https://chainsawxiv.github.io/DST/common/images/bullet.png'); } .coc7 .dsf ul li, .coc7 .edit ul li{ margin:0px; display:list-item; } /* Sheet Content */ .wrapper.coc7{ position:relative; width:730px; margin:0px auto; } .coc7 .main{ position:relative; width:708px; padding:0px 10px 80px 10px; margin:40px 0px 20px 0px; min-height: 795px; background-position:top left; background-repeat:no-repeat; background-color:#e4e5d5; border-style:solid; border-width:1px; border-color:#554220; font-family:'Cutive', palatino, serif; font-size:13px; line-height:20px; color:black; } .coc7 .list.twocolumn .column{ width:343px; } .coc7 .twocolumn li.item{ width:345px; } .coc7 .threecolumn .column{ width:223px; } .coc7 .twothreecolumn .column{ width:440px; } .coc7 .threecolumn li.item{ width:226px; } .coc7 .list .column.colspace{ margin-right:10px; } .coc7 .group{ margin:0px 0px 8px 0px; padding:0px 3px 0px 3px; position:relative; } .coc7 .section{ display:inline-block; width:100%; padding:0px 0px 0px 0px; margin:0px 0px 2px 1px; min-height:30px; } .coc7 .halfwidth{ width:348px; } .coc7 .thirdwidth{ width:219px; } .coc7 .quarterwidth{ width:170px; } .coc7 .threequarterwidth{ width:500px; } .coc7 .column{ vertical-align:top; display:inline-block; margin-right:15px; } .coc7 .colspace{ margin-right:10px; } .coc7 .head{ font-size:14pt; font-weight:normal; letter-spacing:3px; border-bottom:solid 1px #554220; margin-bottom:5px; } .coc7 .pagehead{ text-align:center; width:600px; margin:22px auto 30px auto; text-transform: uppercase; } .coc7 .hidden{ display:none; } .coc7 .page{ display:none; } .coc7 .page.active{ display:block; } .coc7 .page_foot{ text-align:center; width:600px; margin:22px 0px 0px 55px; padding:0px 0px 30px 0px; position:absolute; bottom:12px; } .coc7 a{ text-decoration:none; color:#554220; } .coc7 .section a{ text-decoration:underline; } .coc7 .right{ float:right; text-align:right; white-space: nowrap; } .coc7 .justify{ text-align: right; } /* Corner Brass */ .coc7 .corner_top_left{ position:absolute; left:-7px; top:-7px; z-index:4; } .coc7 .corner_top_right{ position:absolute; right:-7px; top:-7px; z-index:4; } .coc7 .corner_bottom_left{ position:absolute; left:-7px; bottom:-7px; z-index:4; } .coc7 .corner_bottom_right{ position:absolute; right:-7px; bottom:-7px; z-index:4; } .coc7 .brass_bottom{ position:absolute; left:262px; bottom:-7px; z-index:4; } /* Portrait */ .coc7 .portraitholder{ display:inline-block; position:relative; float:right; padding:0px 0px 0px 0px; margin:3px 3px 5px 10px; border-style:solid; border-width:1px; border-color:#554220; } .coc7 .portraitholder .portrait .avatar_image { min-height: 140px; min-width: 140px; background-color: white; margin: 0px; padding: 0px; max-height: 300px; max-width: 300px; } .coc7 .portraitholder .topleft{ position:absolute; left:-4px; top:-4px; width:64px; height:64px; z-index:4; } .coc7 .portraitholder .topright{ position:absolute; right:-4px; top:-4px; width:64px; height:64px; z-index:4; } .coc7 .portraitholder .bottomleft{ position:absolute; left:-4px; bottom:-4px; width:64px; height:64px; z-index:4; } .coc7 .portraitholder .bottomright{ position:absolute; right:-4px; bottom:-4px; width:64px; height:64px; z-index:4; } /* Editable Fields */ .coc7 .dsf:not(.readonly), .coc7 .edit:not(.readonly){ } .coc7 .dsf.fullcolumn, .coc7 .edit.fullcolumn{ width:312px; } .coc7 .threecolumn .dsf.fullcolumn, .coc7 .threecolumn .edit.fullcolumn{ width:190px; } .coc7 .dsf.fullwidth, .coc7 .edit.fullwidth{ width:704px; min-height:50px; display:inline-block; line-height:17px; text-align:justify; } .editable .coc7 .list .dsf.fullwidth, .editable .coc7 .list .edit.fullwidth{ width:684px; } .coc7 .list .dsf.fullwidth, .coc7 .list .edit.fullwidth{ min-height:0px; line-height:14px; } .coc7 .dsf.right, .coc7 .edit.right{ max-width:180px; min-width:100px; } .editable .coc7 .dsf:hover:not(.readonly), .editable .coc7 .edit:hover:not(.readonly){ color:#957438; background-color:rgba(0,0,0,0.02); } .editable .coc7 .dsf:focus, .editable .coc7 .edit:focus, .editable .coc7 .dsf:focus:hover, .editable .coc7 .edit:focus:hover{ color:#957438; background-color:rgba(0,0,0,0.05); } /* Attack List */ .coc7 .attacks .weaponName{ width:135px; margin-left:3px; } .editable .coc7 .attacks .weapon{ width:135px; margin-left:3px; } .editable .coc7 .attacks .labelrow .weapon{ margin-left:5px; } .coc7 .attacks .labelrow span{ display:inline-block; border-bottom:1px solid #A59270; line-height:12px; } .coc7 .attacks .weaponDamage, .coc7 .attacks .weaponRange, .coc7 .attacks .weaponAttacks, .coc7 .attacks .weaponAmmo, .coc7 .attacks .weaponMalf, .coc7 .attacks .tags{ font-size:12px; display:inline-block; width:50px; text-align:center; margin-left:0px; } .coc7 .attacks .weaponAccuracy{ font-size:12px; display:inline-block; width:70px; text-align:center; margin-left:0px; } .coc7 .list li.item.highlight,.coc7 .list .column li.item.highlight{ background-color:rgba(255,255,255,0.4); } /* Misc */ .coc7 .name{ display:inline-block; font-size:18pt; margin:0px 0px 9px 0px; width: 600px; height:16px; } .coc7 .dsf.dsf_type{ font-family:'Cinzel', palatino, serif; font-size:14px; line-height:17px; } .coc7 .dsf.dsf_bio{ width: auto; display:block; } .coc7 .dsf.dsf_bio p{ margin-top:17px; } .coc7 .dsf.dsf_bio p:first-of-type{ margin-top:0px; } .editable .coc7 .list_combos .edit.fullwidth{ width:672px; } .coc7 .check.autobalance .checkMark{ background-position: 1px 3px; position: relative; left: 2px; } /* * Custom CSS unique to this project and not gathered from elsewhere */ .coc7 dl dt { font-weight: normal; margin-bottom: 0; } .coc7 dl { overflow: hidden; margin: 0; font-weight: normal; } .coc7 dt { float: left; padding: 0 .4em 0 0; margin: 0; font-weight: normal; } .coc7 dd { float: right; padding: 0 0 0 .4em; margin: 0; font-weight: normal; } /* That's the leader! */ .coc7 dl:after { content: ""; display: block; overflow: hidden; height: 1em; border-bottom: 2px dotted; font-weight: normal; }
JavaScript
/* * This is the javascript specific to the coc7 DST */ function coc7_dataPreLoad(options) { // Called just before the data is loaded. // alert("dataPreLoad"); } function coc7_dataPostLoad(options) { // Called just after the data is loaded. // alert("dataPostLoad"); coc7_recalculateAllAbilityBonuses() coc7_recalculateDerivedStats() } function coc7_dataChange(options) { // Called immediately after a data value is changed. // alert("dataChange. " + options['fieldName'] + " = " + options['fieldValue']); coc7_recalculateDerivedStats() } function coc7_dataPreSave(options) { // Called just before the data is saved to the server. // alert("dataPreSave"); } // You can define your own variables...just make sure to namespace them! var coc7_abilities = [ "str", "dex", "con", "siz", "app", "int", "pow", "edu" ]; function coc7_recalculateAllAbilityBonuses() { for(var i = 0; i < coc7_abilities.length; i++) { coc7_recalculateAbilityBonus(coc7_abilities[i]); } } function coc7_recalculateAbilityBonus(ability) { var score = jQuery('.dsf_' + ability).html(); var mod = coc7_abilityHalf(score); jQuery('.dsf_' + ability + '_half').html(mod); var mod = coc7_abilityFifth(score); jQuery('.dsf_' + ability + '_fifth').html(mod); } function coc7_abilityHalf(score) { return Math.floor(parseInt(score) / 2.0); } function coc7_abilityFifth(score) { return Math.floor(parseInt(score) / 5.0); } function coc7_recalculateDerivedStats() { //Common variables var str = parseInt(jQuery('.dsf_str').html()); var pow = parseInt(jQuery('.dsf_pow').html()); var siz = parseInt(jQuery('.dsf_siz').html()); var con = parseInt(jQuery('.dsf_con').html()); var dex = parseInt(jQuery('.dsf_dex').html()); //Magic value var magic = coc7_abilityFifth(pow) jQuery('.dsf_magicMax').html(magic); //Sanity values var mythos = parseInt(jQuery('.dsf_cthulhuMythos').html()); if (isNaN(mythos)){ mythos = 0 } jQuery('.dsf_sanityMax').html(100-mythos); //Hit Point values jQuery('.dsf_hpMax').html(Math.floor((siz + con)/ 10.0)); //Build and damage bonus values var strPlusSiz = str + siz var build = -2 var damageBonus = '' if (strPlusSiz >= 2 && strPlusSiz <= 64){ build = -2 damageBonus = '-2' } else if (strPlusSiz >= 65 && strPlusSiz <= 84){ build = -1 damageBonus = -1 } else if (strPlusSiz >= 85 && strPlusSiz <= 124){ build = 0 damageBonus = 0 } else if (strPlusSiz >= 125 && strPlusSiz <= 164){ build = 1 damageBonus = '+1D4' } else if (strPlusSiz >= 164 && strPlusSiz <= 204){ build = 2 damageBonus = '+1D6' } jQuery('.dsf_build').html(build); jQuery('.dsf_damageBonus').html(damageBonus); // Dodge value for Combat Section. // Also sets Dodge Skill to zero if not a number or not defined. var dodge = parseInt(jQuery('.dsf_dodge').html()); if (isNaN(dodge)){ dodge = 0 jQuery('.dsf_dodge').html(dodge); } jQuery('.dsf_dodge2').html(dodge); // Determining Move Rate var move = 8; var age = parseInt(jQuery('.dsf_age').html()); if (dex < siz && str < siz){ move = 7; } else if (dex > siz && str > siz){ move = 9; } if (age >= 40){ move = move - ((Math.floor((age)/ 10.0))-3); } jQuery('.dsf_move').html(move); }
Submit Notes
Modified html to fix an extra div tag, changed CSS to properly control the size of the character image, corrected SAN calculation mistake in Javascript.
Back