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 (French)
Author:
jorsca
Slug:
traveller_french
Type:
GameCharacter
System:
Traveller
DST Source Code
HTML Template
<div class="traveller_french_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_french_translate">basic_info</span></h3> <div> <h2> <span class="dsf dsf_name"></span> <a style="display:none" class="traveller_french_edit_button"><img alt="Edit" src="/images/icons/edit.png" title="Edit"></a> </h2> </div> <div> <span><span class="traveller_french_translate">player</span>:</span> <span class="dsf dsf_player"></span> </div> <div> <span><span class="traveller_french_translate">campaign</span>:</span> <span class="dsf dsf_campaign"></span> </div> <div> <span><span class="traveller_french_translate">age</span>:</span> <span class="dsf dsf_traveller_french_age"></span> </div> <div> <span><span class="traveller_french_translate">race</span>:</span> <span class="dsf dsf_traveller_french_race"></span> </div> <div> <span><span class="traveller_french_translate">homeworld</span>:</span> <span class="dsf dsf_traveller_french_homeworld"></span> </div> <div> <span><span class="traveller_french_translate">racial_traits</span>:</span> <span class="dsf dsf_traveller_french_racial_traits"></span> </div> </div> <br /> <div> <h3><span class="traveller_french_translate">characteristics</span></h3> <table style="width:0%;"> <tr> <th><span class="traveller_french_translate">characteristic</span></th> <th><span class="traveller_french_translate">score</span></th> <th><span class="traveller_french_translate">modifier</span></th> </tr> <tr> <td class="traveller_french_ability_score_name"><span class="traveller_french_translate">strength</span></td> <td class="dsf dsf_traveller_french_str"></td> <td class="dsf dsf_traveller_french_str_modifier"></td> </tr> <tr> <td class="traveller_french_ability_score_name"><span class="traveller_french_translate">dexterity</span></td> <td class="dsf dsf_traveller_french_dex"></td> <td class="dsf dsf_traveller_french_dex_modifier"></td> </tr> <tr> <td class="traveller_french_ability_score_name"><span class="traveller_french_translate">endurance</span></td> <td class="dsf dsf_traveller_french_end"></td> <td class="dsf dsf_traveller_french_end_modifier"></td> </tr> <tr class="ability_score intellect"> <td class="traveller_french_ability_score_name"><span class="traveller_french_translate">intellect</span></td> <td class="dsf dsf_traveller_french_int"></td> <td class="dsf dsf_traveller_french_int_modifier"></td> </tr> <tr> <td class="traveller_french_ability_score_name"><span class="traveller_french_translate">education</span></td> <td class="dsf dsf_traveller_french_edu"></td> <td class="dsf dsf_traveller_french_edu_modifier"></td> </tr> <tr> <td class="traveller_french_ability_score_name"><span class="traveller_french_translate">social</span></td> <td class="dsf dsf_traveller_french_soc"></td> <td class="dsf dsf_traveller_french_soc_modifier"></td> </tr> </table> </div> <div class="traveller_french_trained_skills"> <h3><span class="traveller_french_translate">skills</span><a onclick="traveller_french_hide_show_skills()" class="traveller_french_hide_show_link"><span style="font-size:10px" class="traveller_french_hide_show"><span class="traveller_french_translate">show</span></span></a></h3> <div class="traveller_french_table_trained_skills" style="display:none"></div> </div> <div> <h3><span class="traveller_french_translate">biography</span></h3> <span class="dsf dsf_bio"></span> </div> <br /> <div> <span class="traveller_french_translate">created_by</span> : <span class="dsf dsf_dst_author"></span> </div> </div>
CSS
.ds_traveller_french .ability_score_header span { font-weight: bold; } .ds_traveller_french .traveller_french_ability_score_name { font-weight: bold; } .ds_traveller_french td { border:1px solid black; padding: 0 0 0 0; } .ds_traveller_french th { border:1px solid black; } .ds_traveller_french table{ border-spacing: 0px; border-collapse: collapse; } .traveller_french_presentation_table { margin:0; width:100%; } .traveller_french_presentation_table td,th{ border:none; } .ds_traveller_french .traveller_french_trained_skills { margin-top: 30px; } .ds_traveller_french .traveller_french_table_trained_skills { font-size : 11px; } .ds_traveller_french .traveller_french_trained_skills ul { list-style-type: none; }
JavaScript
var $j = jQuery.noConflict(); var traveller_french_slug; var traveller_french_container; var traveller_french_translations = { // basic info "basic_info" : "Informations", "name" : "Nom", "player" : "Joueur", "campaign" : "Campagne", "age" : "Âge", "race" : "Race", "homeworld" : "Monde d'origine", "racial_traits" : "Traits raciaux", // abilities "characteristics" : "Caractéristiques", "characteristic" : "Caractéristique", "score" : "Valeur", "modifier" : "Modificateur", "strength" : "Force", "intellect" : "Intelligence", "dexterity" : "Dextérité", "education" : "Éducation", "endurance" : "Endurance", "social" : "Statut social", // Hide/Show "hide" : "(Cacher)", "show" : "(Montrer)", // Skills "skills" : "Compétences", "admin" : "Administration", "carouse" : "Amuseur", "animals" : "Animaux", "leadership" : "Aptitude au commandement", "gun_combat" : "Arme de tir", "heavy_weapons" : "Arme lourde", "art" : "Art", "astrogation" : "Astrogation", "athletics" : "Athlétisme", "melee" : "Attaque de mêlée", "vacc_suit" : "Combinaison spatiale", "comms" : "Communications", "drive" : "Conduite", "streetwise" : "Connaissance de la Rue", "advocate" : "Défense Légale", "sensors" : "Détecteurs", "diplomat" : "Diplomate", "stealth" : "Discretion", "deception" : "Duperie", "flyer" : "Engin volant", "investigate" : "Enquête", "explosives" : "Explosifs", "zero-g" : "Impesanteur", "engineer" : "Ingénieur", "gambler" : "Joueur", "language" : "Langage", "mechanic" : "Mécanique", "medic" : "Médecine", "trade" : "Métier", "navigation" : "Navigation", "sea_farer" : "Navigateur des Mers", "broker" : "Négociant", "remote_operations" : "Opération à Distance", "computers" : "Ordinateurs", "persuade" : "Persuasion", "pilot" : "Pilote", "recon" : "Reconnaissance", "battle_dresse" : "Scaphandre de Combat", "space_sciences" : "Sciences de l'Espace", "life_sciences" : "Sciences de la Vie", "physical_sciences" : "Sciences Physiques", "social_sciences" : "Sciences Sociales", "steward" : "Steward", "survival" : "Survie", "tactics" : "Tactiques", "gunner" : "Tir au Canon", "jack_of_all_trades" : "Touche-à-tout", // Bio "biography" : "Biographie", // Created by "created_by" : "Fiche créée par" }; var traveller_french_skills = new Array( {"id": "admin","value": traveller_french_translations["admin"] , "specialty":false}, {"id": "carouse","value": traveller_french_translations["carouse"] , "specialty":false}, {"id": "animals1","value": traveller_french_translations["animals"] , "specialty":true}, {"id": "animals2","value": traveller_french_translations["animals"] , "specialty":true}, {"id": "leadership","value": traveller_french_translations["leadership"] , "specialty":false}, {"id": "gun_combat1","value": traveller_french_translations["gun_combat"] , "specialty":true}, {"id": "gun_combat2","value": traveller_french_translations["gun_combat"] , "specialty":true}, {"id": "gun_combat3","value": traveller_french_translations["gun_combat"] , "specialty":true}, {"id": "heavy_weapons1","value": traveller_french_translations["heavy_weapons"] , "specialty":true}, {"id": "heavy_weapons2","value": traveller_french_translations["heavy_weapons"] , "specialty":true}, {"id": "art1","value": traveller_french_translations["art"], "specialty":true}, {"id": "art2","value": traveller_french_translations["art"], "specialty":true}, {"id": "astrogation","value": traveller_french_translations["astrogation"], "specialty":false}, {"id": "athletics1","value": traveller_french_translations["athletics"], "specialty":true}, {"id": "athletics2","value": traveller_french_translations["athletics"], "specialty":true}, {"id": "athletics3","value": traveller_french_translations["athletics"], "specialty":true}, {"id": "melee1","value": traveller_french_translations["melee"], "specialty":true}, {"id": "melee2","value": traveller_french_translations["melee"], "specialty":true}, {"id": "vacc_suit","value": traveller_french_translations["vacc_suit"], "specialty":false}, {"id": "comms","value": traveller_french_translations["comms"], "specialty":false}, {"id": "drive1","value": traveller_french_translations["drive"], "specialty":true}, {"id": "drive2","value": traveller_french_translations["drive"], "specialty":true}, {"id": "streetwise","value": traveller_french_translations["streetwise"] , "specialty":false}, {"id": "advocate","value": traveller_french_translations["advocate"], "specialty":false}, {"id": "sensors","value": traveller_french_translations["sensors"], "specialty":false}, {"id": "diplomat","value": traveller_french_translations["diplomat"], "specialty":false}, {"id": "stealth","value": traveller_french_translations["stealth"], "specialty":false}, {"id": "deception","value": traveller_french_translations["deception"], "specialty":false}, {"id": "flyer1","value": traveller_french_translations["flyer"], "specialty":true}, {"id": "flyer2","value": traveller_french_translations["flyer"], "specialty":true}, {"id": "investigate","value": traveller_french_translations["investigate"], "specialty":false}, {"id": "explosives","value": traveller_french_translations["explosives"], "specialty":false}, {"id": "zero-g","value": traveller_french_translations["zero-g"], "specialty":false}, {"id": "engineer1","value": traveller_french_translations["engineer"], "specialty":true}, {"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": "engineer2","value": traveller_french_translations["engineer"], "specialty":true}, {"id": "gambler","value": traveller_french_translations["gambler"], "specialty":false}, {"id": "language1","value": traveller_french_translations["language"], "specialty":false}, {"id": "language2","value": traveller_french_translations["language"], "specialty":false}, {"id": "mechanic","value": traveller_french_translations["mechanic"], "specialty":false}, {"id": "medic","value": traveller_french_translations["medic"], "specialty":false}, {"id": "trade1","value": traveller_french_translations["trade"], "specialty":true}, {"id": "trade2","value": traveller_french_translations["trade"], "specialty":true}, {"id": "navigation","value": traveller_french_translations["navigation"], "specialty":false}, {"id": "sea_farer1","value": traveller_french_translations["sea_farer"], "specialty":true}, {"id": "sea_farer2","value": traveller_french_translations["sea_farer"], "specialty":true}, {"id": "broker","value": traveller_french_translations["broker"], "specialty":false}, {"id": "remote_operations","value": traveller_french_translations["remote_operations"], "specialty":false}, {"id": "computers","value": traveller_french_translations["computers"], "specialty":false}, {"id": "persuade","value": traveller_french_translations["persuade"], "specialty":false}, {"id": "pilot1","value": traveller_french_translations["pilot"], "specialty":true}, {"id": "pilot2","value": traveller_french_translations["pilot"], "specialty":true}, {"id": "recon","value": traveller_french_translations["recon"], "specialty":false}, {"id": "battle_dresse","value": traveller_french_translations["battle_dresse"], "specialty":false}, {"id": "space_sciences1","value": traveller_french_translations["space_sciences"], "specialty":true}, {"id": "space_sciences2","value": traveller_french_translations["space_sciences"], "specialty":true}, {"id": "life_sciences1","value": traveller_french_translations["life_sciences"], "specialty":true}, {"id": "life_sciences2","value": traveller_french_translations["life_sciences"], "specialty":true}, {"id": "physical_sciences1","value": traveller_french_translations["physical_sciences"], "specialty":true}, {"id": "physical_sciences2","value": traveller_french_translations["physical_sciences"], "specialty":true}, {"id": "social_sciences1","value": traveller_french_translations["social_sciences"], "specialty":true}, {"id": "social_sciences2","value": traveller_french_translations["social_sciences"], "specialty":true}, {"id": "steward","value": traveller_french_translations["steward"], "specialty":false}, {"id": "survival","value": traveller_french_translations["survival"], "specialty":false}, {"id": "tactics1","value": traveller_french_translations["tactics"], "specialty":true}, {"id": "tactics2","value": traveller_french_translations["tactics"], "specialty":true}, {"id": "gunner1","value": traveller_french_translations["gunner"], "specialty":true}, {"id": "gunner2","value": traveller_french_translations["gunner"], "specialty":true}, {"id": "jack_of_all_trades","value": traveller_french_translations["jack_of_all_trades"], "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_french_hide_show_skills() { var show = false; var display = "none"; var table = $j("div.traveller_french_table_trained_skills"); var text = "show"; if (table.css("display") == "none") { show = true; text = "hide"; display = "block"; } var hideShowSpan = $j("span.traveller_french_hide_show"); hideShowSpan.text(traveller_french_translations[text]); table.css("display", display); } function traveller_french_init_skill_table() { var table_content = '<table class="traveller_french_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_french_skill' + (j*40 + i) + '">'; // table_content += 'toto</td>'; var skill = traveller_french_skills[j*40 + i]; table_content += '<table class="traveller_french_presentation_table"><tr>'; if (skill.value == "custom") { table_content += '<td class="dsf traveller_french_skill_' + skill.id + '_name dsf_traveller_french_' + skill.id + 'name"></td>'; } else { table_content += '<td class="traveller_french_skill_' + skill.id + '_name">' + skill.value + '</td>'; } if (skill.specialty) { table_content += '<td>(<span class="dsf dsf_traveller_french_' + skill.id + '_specialty"></span>)</td>'; } table_content += '<td width="100%" style="text-align:right;padding-right:5px;font-weight:bold;" class="dsf dsf_traveller_french_' + skill.id + '_score"></td>'; table_content += '</tr></table>'; table_content += '</div></td>'; } table_content += '</tr>'; } table_content += '</table>'; $j("div.traveller_french_table_trained_skills").append(table_content); } function traveller_french_translate_page() { $j("span.traveller_french_translate").each(function(i) { var text = $j(this).text(); $j(this).replaceWith(traveller_french_translations[text]); //$j(this).css("visibility", "visible"); }); } function showHideEditButton() { var editable = $j("#" + traveller_french_containerId + ".editable").length != 0; if (editable) { $j("a.traveller_french_edit_button").css("display", "none"); } else { $j("a.traveller_french_edit_button").css("display", "inline"); } } function traveller_french_dataPreLoad(options) { traveller_french_slug = options.slug; traveller_french_containerId = options.containerId; showHideEditButton(); traveller_french_translate_page(); traveller_french_init_skill_table(); $j(".traveller_french_container").css("visibility", "visible"); } function traveller_french_dataPostLoad(options) { // Get the "Edit" button link var nameLink = $j("a.dst_character_name_link").attr("href"); $j("a.traveller_french_edit_button").attr("href", nameLink + "/edit/"); } function traveller_french_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_french_abilities.length; i++) { if(field == "traveller_french_" + traveller_french_abilities[i]) { traveller_french_recalculateAbilityBonus(traveller_french_abilities[i]); } } } function traveller_french_dataPreSave(options) { } var traveller_french_abilities = [ "str", "dex", "end", "int", "edu", "soc" ]; function traveller_french_recalculateAllAbilityBonuses() { for(var i = 0; i < traveller_french_abilities.length; i++) { traveller_french_recalculateAbilityBonus(traveller_french_abilities[i]); } } function traveller_french_recalculateAbilityBonus(ability) { var score = $j('.dsf_traveller_french_' + ability).html(); var mod = traveller_french_abilityMod(score); $j('.dsf_traveller_french_' + ability + '_modifier').html(mod); } function traveller_french_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