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
Mongoose Traveller (English)
Author:
jorsca
Slug:
traveller_english
Type:
GameCharacter
System:
Traveller
DST Source Code
HTML Template
<div class="traveller_english_container" style="visibility:hidden"> <div style="margin:0px 4px 4px 4px;position:relative;z-index:3;float:right"> <span class="dsf dsf_avatar_image"></span> </div> <div class="basic_info"> <h3><span class="traveller_english_translate">basic_info</span></h3> <div> <h2> <span class="dsf dsf_name"></span> <a style="display:none" class="traveller_english_edit_button"><img alt="Edit" src="/images/icons/edit.png" title="Edit"></a> </h2> </div> <div> <span><span class="traveller_english_translate">player</span>:</span> <span class="dsf dsf_player"></span> </div> <div> <span><span class="traveller_english_translate">campaign</span>:</span> <span class="dsf dsf_campaign"></span> </div> <div> <span><span class="traveller_english_translate">age</span>:</span> <span class="dsf dsf_traveller_english_age"></span> </div> <div> <span><span class="traveller_english_translate">race</span>:</span> <span class="dsf dsf_traveller_english_race"></span> </div> <div> <span><span class="traveller_english_translate">homeworld</span>:</span> <span class="dsf dsf_traveller_english_homeworld"></span> </div> <div> <span><span class="traveller_english_translate">racial_traits</span>:</span> <span class="dsf dsf_traveller_english_racial_traits"></span> </div> </div> <br /> <div> <h3><span class="traveller_english_translate">characteristics</span></h3> <table style="width:0%;"> <tr> <th><span class="traveller_english_translate">characteristic</span></th> <th><span class="traveller_english_translate">score</span></th> <th><span class="traveller_english_translate">modifier</span></th> </tr> <tr> <td class="traveller_english_ability_score_name"><span class="traveller_english_translate">strength</span></td> <td class="dsf dsf_traveller_english_str"></td> <td class="dsf dsf_traveller_english_str_modifier"></td> </tr> <tr> <td class="traveller_english_ability_score_name"><span class="traveller_english_translate">dexterity</span></td> <td class="dsf dsf_traveller_english_dex"></td> <td class="dsf dsf_traveller_english_dex_modifier"></td> </tr> <tr> <td class="traveller_english_ability_score_name"><span class="traveller_english_translate">endurance</span></td> <td class="dsf dsf_traveller_english_end"></td> <td class="dsf dsf_traveller_english_end_modifier"></td> </tr> <tr class="ability_score intellect"> <td class="traveller_english_ability_score_name"><span class="traveller_english_translate">intellect</span></td> <td class="dsf dsf_traveller_english_int"></td> <td class="dsf dsf_traveller_english_int_modifier"></td> </tr> <tr> <td class="traveller_english_ability_score_name"><span class="traveller_english_translate">education</span></td> <td class="dsf dsf_traveller_english_edu"></td> <td class="dsf dsf_traveller_english_edu_modifier"></td> </tr> <tr> <td class="traveller_english_ability_score_name"><span class="traveller_english_translate">social</span></td> <td class="dsf dsf_traveller_english_soc"></td> <td class="dsf dsf_traveller_english_soc_modifier"></td> </tr> </table> </div> <div class="traveller_english_trained_skills"> <h3><span class="traveller_english_translate">skills</span><a onclick="traveller_english_hide_show_skills()" class="traveller_english_hide_show_link"><span style="font-size:10px" class="traveller_english_hide_show"><span class="traveller_english_translate">show</span></span></a></h3> <div class="traveller_english_table_trained_skills" style="display:none"></div> </div> <div> <h3><span class="traveller_english_translate">biography</span></h3> <span class="dsf dsf_bio"></span> </div> <br /> <div> <span class="traveller_english_translate">created_by</span> : <span class="dsf dsf_dst_author"></span> </div> </div>
CSS
.ds_traveller_english .ability_score_header span { font-weight: bold; } .ds_traveller_english .traveller_english_ability_score_name { font-weight: bold; } .ds_traveller_english td { border:1px solid black; padding: 0 0 0 0; } .ds_traveller_english th { border:1px solid black; } .ds_traveller_english table{ border-spacing: 0px; border-collapse: collapse; } .traveller_english_presentation_table { margin:0; width:100%; } .traveller_english_presentation_table td,th{ border:none; } .ds_traveller_english .traveller_english_trained_skills { margin-top: 30px; } .ds_traveller_english .traveller_english_table_trained_skills { font-size : 11px; } .ds_traveller_english .traveller_english_trained_skills ul { list-style-type: none; }
Javascript
var $j = jQuery.noConflict(); var traveller_english_slug; var traveller_english_container; var traveller_english_translations = { // basic info "basic_info" : "Basic info", "name" : "Name", "player" : "Player", "campaign" : "Campaign", "age" : "Age", "race" : "Race", "homeworld" : "Homeworld", "racial_traits" : "Racial traits", // abilities "characteristics" : "Characteristics", "characteristic" : "Characteristic", "score" : "Score", "modifier" : "Modifier", "strength" : "Strength", "intellect" : "Intellect", "dexterity" : "Dexterity", "education" : "Education", "endurance" : "Endurance", "social" : "Social", // Hide/Show "hide" : "(Hide)", "show" : "(Show)", // Skills "skills" : "Skills", "admin" : "Admin", "carouse" : "Carouse", "animals" : "Animals", "leadership" : "Leadership", "gun_combat" : "Gun Combat", "heavy_weapons" : "Heavy Weapons", "art" : "Art", "astrogation" : "Astrogation", "athletics" : "Athletics", "melee" : "Melee", "vacc_suit" : "Vacc Suit", "comms" : "Comms", "drive" : "Drive", "streetwise" : "Streetwise", "advocate" : "Advocate", "sensors" : "Sensors", "diplomat" : "Diplomat", "stealth" : "Stealth", "deception" : "Deception", "flyer" : "Flyer", "investigate" : "Investigate", "explosives" : "Explosives", "zero-g" : "Zero-G", "engineer" : "Engineer", "gambler" : "Gambler", "language" : "Language", "mechanic" : "Mechanic", "medic" : "Medic", "trade" : "Trade", "navigation" : "Navigation", "sea_farer" : "Seafarer", "broker" : "Broker", "remote_operations" : "Remote Operations", "computers" : "Computers", "persuade" : "Persuade", "pilot" : "Pilot", "recon" : "Recon", "battle_dresse" : "Battle Dress", "space_sciences" : "Space Sciences", "life_sciences" : "Life Sciences", "physical_sciences" : "Physical Sciences", "social_sciences" : "Social Sciences", "steward" : "Steward", "survival" : "Survival", "tactics" : "Tactics", "gunner" : "Gunner", "jack_of_all_trades" : "Jack of all Trades", // Bio "biography" : "Bio", // Created by "created_by" : "Created by" }; var traveller_english_skills = new Array( {"id": "admin","value": traveller_english_translations["admin"] , "specialty":false}, {"id": "advocate","value": traveller_english_translations["advocate"], "specialty":false}, {"id": "animals1","value": traveller_english_translations["animals"] , "specialty":true}, {"id": "animals2","value": traveller_english_translations["animals"] , "specialty":true}, {"id": "athletics1","value": traveller_english_translations["athletics"], "specialty":true}, {"id": "athletics2","value": traveller_english_translations["athletics"], "specialty":true}, {"id": "athletics3","value": traveller_english_translations["athletics"], "specialty":true}, {"id": "art1","value": traveller_english_translations["art"], "specialty":true}, {"id": "art2","value": traveller_english_translations["art"], "specialty":true}, {"id": "astrogation","value": traveller_english_translations["astrogation"], "specialty":false}, {"id": "battle_dresse","value": traveller_english_translations["battle_dresse"], "specialty":false}, {"id": "broker","value": traveller_english_translations["broker"], "specialty":false}, {"id": "carouse","value": traveller_english_translations["carouse"] , "specialty":false}, {"id": "comms","value": traveller_english_translations["comms"], "specialty":false}, {"id": "computers","value": traveller_english_translations["computers"], "specialty":false}, {"id": "deception","value": traveller_english_translations["deception"], "specialty":false}, {"id": "diplomat","value": traveller_english_translations["diplomat"], "specialty":false}, {"id": "drive1","value": traveller_english_translations["drive"], "specialty":true}, {"id": "drive2","value": traveller_english_translations["drive"], "specialty":true}, {"id": "engineer1","value": traveller_english_translations["engineer"], "specialty":true}, {"id": "engineer2","value": traveller_english_translations["engineer"], "specialty":true}, {"id": "explosives","value": traveller_english_translations["explosives"], "specialty":false}, {"id": "flyer1","value": traveller_english_translations["flyer"], "specialty":true}, {"id": "flyer2","value": traveller_english_translations["flyer"], "specialty":true}, {"id": "gambler","value": traveller_english_translations["gambler"], "specialty":false}, {"id": "gunner1","value": traveller_english_translations["gunner"], "specialty":true}, {"id": "gunner2","value": traveller_english_translations["gunner"], "specialty":true}, {"id": "gun_combat1","value": traveller_english_translations["gun_combat"] , "specialty":true}, {"id": "gun_combat2","value": traveller_english_translations["gun_combat"] , "specialty":true}, {"id": "gun_combat3","value": traveller_english_translations["gun_combat"] , "specialty":true}, {"id": "heavy_weapons1","value": traveller_english_translations["heavy_weapons"] , "specialty":true}, {"id": "heavy_weapons2","value": traveller_english_translations["heavy_weapons"] , "specialty":true}, {"id": "investigate","value": traveller_english_translations["investigate"], "specialty":false}, {"id": "jack_of_all_trades","value": traveller_english_translations["jack_of_all_trades"], "specialty":false}, {"id": "custom1","value": "custom", "specialty":true}, {"id": "custom2","value": "custom", "specialty":true}, {"id": "custom3","value": "custom", "specialty":true}, {"id": "custom4","value": "custom", "specialty":true}, {"id": "custom5","value": "custom", "specialty":true}, {"id": "custom6","value": "custom", "specialty":true}, {"id": "language1","value": traveller_english_translations["language"], "specialty":false}, {"id": "language2","value": traveller_english_translations["language"], "specialty":false}, {"id": "leadership","value": traveller_english_translations["leadership"] , "specialty":false}, {"id": "life_sciences1","value": traveller_english_translations["life_sciences"], "specialty":true}, {"id": "life_sciences2","value": traveller_english_translations["life_sciences"], "specialty":true}, {"id": "mechanic","value": traveller_english_translations["mechanic"], "specialty":false}, {"id": "medic","value": traveller_english_translations["medic"], "specialty":false}, {"id": "melee1","value": traveller_english_translations["melee"], "specialty":true}, {"id": "melee2","value": traveller_english_translations["melee"], "specialty":true}, {"id": "navigation","value": traveller_english_translations["navigation"], "specialty":false}, {"id": "persuade","value": traveller_english_translations["persuade"], "specialty":false}, {"id": "pilot1","value": traveller_english_translations["pilot"], "specialty":true}, {"id": "pilot2","value": traveller_english_translations["pilot"], "specialty":true}, {"id": "physical_sciences1","value": traveller_english_translations["physical_sciences"], "specialty":true}, {"id": "physical_sciences2","value": traveller_english_translations["physical_sciences"], "specialty":true}, {"id": "recon","value": traveller_english_translations["recon"], "specialty":false}, {"id": "remote_operations","value": traveller_english_translations["remote_operations"], "specialty":false}, {"id": "sea_farer1","value": traveller_english_translations["sea_farer"], "specialty":true}, {"id": "sea_farer2","value": traveller_english_translations["sea_farer"], "specialty":true}, {"id": "sensors","value": traveller_english_translations["sensors"], "specialty":false}, {"id": "social_sciences1","value": traveller_english_translations["social_sciences"], "specialty":true}, {"id": "social_sciences2","value": traveller_english_translations["social_sciences"], "specialty":true}, {"id": "space_sciences1","value": traveller_english_translations["space_sciences"], "specialty":true}, {"id": "space_sciences2","value": traveller_english_translations["space_sciences"], "specialty":true}, {"id": "stealth","value": traveller_english_translations["stealth"], "specialty":false}, {"id": "steward","value": traveller_english_translations["steward"], "specialty":false}, {"id": "streetwise","value": traveller_english_translations["streetwise"] , "specialty":false}, {"id": "survival","value": traveller_english_translations["survival"], "specialty":false}, {"id": "tactics1","value": traveller_english_translations["tactics"], "specialty":true}, {"id": "tactics2","value": traveller_english_translations["tactics"], "specialty":true}, {"id": "trade1","value": traveller_english_translations["trade"], "specialty":true}, {"id": "trade2","value": traveller_english_translations["trade"], "specialty":true}, {"id": "vacc_suit","value": traveller_english_translations["vacc_suit"], "specialty":false}, {"id": "zero-g","value": traveller_english_translations["zero-g"], "specialty":false}, {"id": "custom7","value": "custom", "specialty":true}, {"id": "custom8","value": "custom", "specialty":true}, {"id": "custom9","value": "custom", "specialty":true}, {"id": "custom10","value": "custom", "specialty":true}, {"id": "custom11","value": "custom", "specialty":true}, {"id": "custom12","value": "custom", "specialty":true} ); function traveller_english_hide_show_skills() { var show = false; var display = "none"; var table = $j("div.traveller_english_table_trained_skills"); var text = "show"; if (table.css("display") == "none") { show = true; text = "hide"; display = "block"; } var hideShowSpan = $j("span.traveller_english_hide_show"); hideShowSpan.text(traveller_english_translations[text]); table.css("display", display); } function traveller_english_init_skill_table() { var table_content = '<table class="traveller_english_table_trained_skills">'; for (i=0; i < 40; i++) { table_content += '<tr>'; for (j=0; j < 2; j++) { table_content += '<td nowrap="true" style="whitepace:nowrap"><div class="traveller_english_skill' + (j*40 + i) + '">'; var skill = traveller_english_skills[j*40 + i]; table_content += '<table class="traveller_english_presentation_table"><tr>'; if (skill.value == "custom") { table_content += '<td class="dsf traveller_english_skill_' + skill.id + '_name dsf_traveller_english_' + skill.id + 'name"></td>'; } else { table_content += '<td class="traveller_english_skill_' + skill.id + '_name">' + skill.value + '</td>'; } if (skill.specialty) { table_content += '<td>(<span class="dsf dsf_traveller_english_' + skill.id + '_specialty"></span>)</td>' } table_content += '<td width="100%" style="text-align:right;padding-right:5px;font-weight:bold;" class="dsf dsf_traveller_english_' + skill.id + '_score"></td>' table_content += '</tr></table>'; table_content += '</div></td>'; } table_content += '</tr>'; } table_content += '</table>'; $j("div.traveller_english_table_trained_skills").append(table_content); } function traveller_english_translate_page() { $j("span.traveller_english_translate").each(function(i) { var text = $j(this).text(); $j(this).replaceWith(traveller_english_translations[text]); //$j(this).css("visibility", "visible"); }); } function showHideEditButton() { var editable = $j("#" + traveller_english_containerId + ".editable").length != 0; if (editable) { $j("a.traveller_english_edit_button").css("display", "none"); } else { $j("a.traveller_english_edit_button").css("display", "inline"); } } function traveller_english_dataPreLoad(options) { traveller_english_slug = options.slug; traveller_english_containerId = options.containerId; showHideEditButton(); traveller_english_translate_page(); traveller_english_init_skill_table(); $j(".traveller_english_container").css("visibility", "visible"); } function traveller_english_dataPostLoad(options) { // Get the "Edit" button link var nameLink = $j("a.dst_character_name_link").attr("href"); $j("a.traveller_english_edit_button").attr("href", nameLink + "/edit/"); } function traveller_english_dataChange(options) { // Here, we use it to help with calculating the ability modifiers if the base // ability score changes. var field = options['fieldName']; var val = options['fieldValue']; // If it's one of the base scores, we just update its modifiers for(var i = 0; i < traveller_english_abilities.length; i++) { if(field == "traveller_english_" + traveller_english_abilities[i]) { traveller_english_recalculateAbilityBonus(traveller_english_abilities[i]); } } } function traveller_english_dataPreSave(options) { } var traveller_english_abilities = [ "str", "dex", "end", "int", "edu", "soc" ]; function traveller_english_recalculateAllAbilityBonuses() { for(var i = 0; i < traveller_english_abilities.length; i++) { traveller_english_recalculateAbilityBonus(traveller_english_abilities[i]); } } function traveller_english_recalculateAbilityBonus(ability) { var score = $j('.dsf_traveller_english_' + ability).html(); var mod = traveller_english_abilityMod(score); $j('.dsf_traveller_english_' + ability + '_modifier').html(mod); } function traveller_english_abilityMod(score) { var mod = 0; if (score <= 0) { mod = -3; } else if (score <= 2) { mod = -2; } else if (score <= 5) { mod = -1; } else if (score <= 8) { mod = 0; } else if (score <= 11) { mod = 1; } else if (score <= 14) { mod = 2; } else { mod = 3; } return mod; }
Submit Notes
Back