From bcbb76ad12934c75b8bf3ea39cd14d62b8d419b1 Mon Sep 17 00:00:00 2001 From: zoliking Date: Mon, 15 Jun 2026 17:51:52 +0200 Subject: [PATCH] Update mf_sheet.html Skill name changes and a function to transfer values from the old names to the new names. --- Millennium Freelancers/mf_sheet.html | 549 +++++++++++++++------------ 1 file changed, 301 insertions(+), 248 deletions(-) diff --git a/Millennium Freelancers/mf_sheet.html b/Millennium Freelancers/mf_sheet.html index 0175d3ecf4..11322e430e 100644 --- a/Millennium Freelancers/mf_sheet.html +++ b/Millennium Freelancers/mf_sheet.html @@ -8,7 +8,7 @@ async function log(entry) await setAttrsAsync({["repeating_log_" + id + "_log_entry"]: dateTime + entry}); } -var properties = ["skill_difficulty_offset", "attribute_cost", "max_attribute_points", "cc_skill_xp", "health_levels", "init", "spent_xp", "talent0", "talent1", "talent2", "territory_select", "talent3", "talent4", "str", "sta", "agi", "per", "int", "cha", "wil", "xp", "bridge_tech", "mounted_weaponry", "pilot", "vehicle_engineering", "drive_ground_vehicle", "knowledge_corporate", "knowledge_urban", "trade", "aim", "athletics", "endurance", "melee", "reaction", "throw", "notice", "hack_locks", "search", "sleight_of_hand", "sneak", "astronomy", "computer_science", "medicine", "natural_sciences", "robotics", "weapons_engineering", "xenobiology", "convince", "deceive", "empathy", "intimidate", "lead", "character_name", "gender", "description", "territory", "profession", "social_class", "planet", "total_xp", "str_territory", "str_planet", "str_social", "str_profession", "str_xp", "str_cc", "sta_territory", "sta_planet", "sta_social", "sta_profession", "sta_xp", "sta_cc", "agi_territory", "agi_planet", "agi_social", "agi_profession", "agi_xp", "agi_cc", "per_territory", "per_planet", "per_social", "per_profession", "per_xp", "per_cc", "int_territory", "int_planet", "int_social", "int_profession", "int_xp", "int_cc", "cha_territory", "cha_planet", "cha_social", "cha_profession", "cha_xp", "cha_cc", "wil_territory", "wil_planet", "wil_social", "wil_profession", "wil_xp", "wil_cc", "bought_hp", "hp", "max_hp", "pain_modifier", "pain_from_damage", "pain", "equipped_armor_id", "equipped_armor_da", "equipped_armor_cmr", "equipped_armor_slow", "equipped_armor_hp", "equipped_armor_bonus_hp", "shield", "shield_type", "equipped_weapon1_id", "equipped_weapon1_melee", "equipped_weapon1", "equipped_weapon2_melee", "equipped_weapon2_id", "equipped_weapon2", "equipped_weapon3_melee", "equipped_weapon3_id", "equipped_weapon3", "init_mod", "ap", "gf", "max_gf", "carried_gear", "quick_attribute", "quick_skill", "bridge_tech_talent", "bridge_tech_XP", "bridge_tech_bonus", "bridge_tech_training_time", "bridge_tech_difficulty", "mounted_weaponry_talent", "mounted_weaponry_XP", "mounted_weaponry_bonus", "mounted_weaponry_training_time", "mounted_weaponry_difficulty", "pilot_talent", "pilot_XP", "pilot_bonus", "pilot_training_time", "pilot_difficulty", "vehicle_engineering_talent", "vehicle_engineering_XP", "vehicle_engineering_bonus", "vehicle_engineering_training_time", "vehicle_engineering_difficulty", "drive_ground_vehicle_talent", "drive_ground_vehicle_XP", "drive_ground_vehicle_bonus", "drive_ground_vehicle_training_time", "drive_ground_vehicle_difficulty", "knowledge_corporate_talent", "knowledge_corporate_XP", "knowledge_corporate_bonus", "knowledge_corporate_training_time", "knowledge_corporate_difficulty", "knowledge_urban_talent", "knowledge_urban_XP", "knowledge_urban_bonus", "knowledge_urban_training_time", "knowledge_urban_difficulty", "trade_talent", "trade_XP", "trade_bonus", "trade_training_time", "trade_difficulty", "aim_talent", "aim_XP", "aim_bonus", "aim_training_time", "aim_difficulty", "athletics_talent", "athletics_XP", "athletics_bonus", "athletics_training_time", "athletics_difficulty", "endurance_talent", "endurance_XP", "endurance_bonus", "endurance_training_time", "endurance_difficulty", "melee_talent", "melee_XP", "melee_bonus", "melee_training_time", "melee_difficulty", "reaction_talent", "reaction_XP", "reaction_bonus", "reaction_training_time", "reaction_difficulty", "throw_talent", "throw_XP", "throw_bonus", "throw_training_time", "throw_difficulty", "notice_talent", "notice_XP", "notice_bonus", "notice_training_time", "notice_difficulty", "hack_locks_talent", "hack_locks_XP", "hack_locks_bonus", "hack_locks_training_time", "hack_locks_difficulty", "search_talent", "search_XP", "search_bonus", "search_training_time", "search_difficulty", "sleight_of_hand_talent", "sleight_of_hand_XP", "sleight_of_hand_bonus", "sleight_of_hand_training_time", "sleight_of_hand_difficulty", "sneak_talent", "sneak_XP", "sneak_bonus", "sneak_training_time", "sneak_difficulty", "astronomy_talent", "astronomy_XP", "astronomy_bonus", "astronomy_training_time", "astronomy_difficulty", "computer_science_talent", "computer_science_XP", "computer_science_bonus", "computer_science_training_time", "computer_science_difficulty", "medicine_talent", "medicine_XP", "medicine_bonus", "medicine_training_time", "medicine_difficulty", "natural_sciences_talent", "natural_sciences_XP", "natural_sciences_bonus", "natural_sciences_training_time", "natural_sciences_difficulty", "robotics_talent", "robotics_XP", "robotics_bonus", "robotics_training_time", "robotics_difficulty", "weapons_engineering_talent", "weapons_engineering_XP", "weapons_engineering_bonus", "weapons_engineering_training_time", "weapons_engineering_difficulty", "xenobiology_talent", "xenobiology_XP", "xenobiology_bonus", "xenobiology_training_time", "xenobiology_difficulty", "convince_talent", "convince_XP", "convince_bonus", "convince_training_time", "convince_difficulty", "deceive_talent", "deceive_XP", "deceive_bonus", "deceive_training_time", "deceive_difficulty", "empathy_talent", "empathy_XP", "empathy_bonus", "empathy_training_time", "empathy_difficulty", "intimidate_talent", "intimidate_XP", "intimidate_bonus", "intimidate_training_time", "intimidate_difficulty", "lead_talent", "lead_XP", "lead_bonus", "lead_training_time", "lead_difficulty", "art_talent", "art1_name", "art1_XP", "art1_bonus", "art1_training_time", "art1_difficulty", "art1", "art2_name", "art2_XP", "art2_bonus", "art2_training_time", "art2_difficulty", "art2", "hobby_talent", "hobby1_name_disabler", "hobby1_name", "hobby1_XP", "hobby1_bonus", "hobby1_training_time", "hobby1_difficulty", "hobby1", "hobby2_name", "hobby2_XP", "hobby2_bonus", "hobby2_training_time", "hobby2_difficulty", "hobby2", "language_talent", "language1_name_disabler", "language1_name", "language1_XP", "language1_bonus", "language1_training_time", "language1_difficulty", "language1", "language2_name_disabler", "language2_name", "language2_XP", "language2_bonus", "language2_training_time", "language2_difficulty", "language2", "language3_name", "language3_XP", "language3_bonus", "language3_training_time", "language3_difficulty", "language3", "language4_name", "language4_XP", "language4_bonus", "language4_training_time", "language4_difficulty", "language4", "profession_talent", "profession1_name", "profession1_XP", "profession1_bonus", "profession1_training_time", "profession1_difficulty", "profession1", "profession2_name", "profession2_XP", "profession2_bonus", "profession2_training_time", "profession2_difficulty", "profession2", "money", "other_gear", "jornual", "companions", "misc"]; +var properties = ["skill_difficulty_offset", "attribute_cost", "max_attribute_points", "cc_skill_xp", "health_levels", "init", "spent_xp", "talent0", "talent1", "talent2", "territory_select", "talent3", "talent4", "str", "sta", "agi", "per", "int", "cha", "wil", "xp", "bridge_tech", "mounted_weaponry", "piloting", "vehicle_engineering", "driving", "knowledge_corporate", "knowledge_urban", "trade", "aim", "athletics", "endurance", "melee", "reaction", "throw", "notice", "lock_hacking", "search", "sleight_of_hand", "stealth", "astronomy", "computer_science", "medicine", "natural_sciences", "robotics", "weapons_engineering", "xenobiology", "argumentation", "deception", "empathy", "intimidation", "leadership", "character_name", "gender", "description", "territory", "profession", "social_class", "planet", "total_xp", "str_territory", "str_planet", "str_social", "str_profession", "str_xp", "str_cc", "sta_territory", "sta_planet", "sta_social", "sta_profession", "sta_xp", "sta_cc", "agi_territory", "agi_planet", "agi_social", "agi_profession", "agi_xp", "agi_cc", "per_territory", "per_planet", "per_social", "per_profession", "per_xp", "per_cc", "int_territory", "int_planet", "int_social", "int_profession", "int_xp", "int_cc", "cha_territory", "cha_planet", "cha_social", "cha_profession", "cha_xp", "cha_cc", "wil_territory", "wil_planet", "wil_social", "wil_profession", "wil_xp", "wil_cc", "bought_hp", "hp", "max_hp", "pain_modifier", "pain_from_damage", "pain", "equipped_armor_id", "equipped_armor_da", "equipped_armor_cmr", "equipped_armor_slow", "equipped_armor_hp", "equipped_armor_bonus_hp", "shield", "shield_type", "equipped_weapon1_id", "equipped_weapon1_melee", "equipped_weapon1", "equipped_weapon2_melee", "equipped_weapon2_id", "equipped_weapon2", "equipped_weapon3_melee", "equipped_weapon3_id", "equipped_weapon3", "init_mod", "ap", "gf", "max_gf", "carried_gear", "quick_attribute", "quick_skill", "bridge_tech_talent", "bridge_tech_XP", "bridge_tech_bonus", "bridge_tech_training_time", "bridge_tech_difficulty", "mounted_weaponry_talent", "mounted_weaponry_XP", "mounted_weaponry_bonus", "mounted_weaponry_training_time", "mounted_weaponry_difficulty", "piloting_talent", "piloting_XP", "piloting_bonus", "piloting_training_time", "piloting_difficulty", "vehicle_engineering_talent", "vehicle_engineering_XP", "vehicle_engineering_bonus", "vehicle_engineering_training_time", "vehicle_engineering_difficulty", "driving_talent", "driving_XP", "driving_bonus", "driving_training_time", "driving_difficulty", "knowledge_corporate_talent", "knowledge_corporate_XP", "knowledge_corporate_bonus", "knowledge_corporate_training_time", "knowledge_corporate_difficulty", "knowledge_urban_talent", "knowledge_urban_XP", "knowledge_urban_bonus", "knowledge_urban_training_time", "knowledge_urban_difficulty", "trade_talent", "trade_XP", "trade_bonus", "trade_training_time", "trade_difficulty", "aim_talent", "aim_XP", "aim_bonus", "aim_training_time", "aim_difficulty", "athletics_talent", "athletics_XP", "athletics_bonus", "athletics_training_time", "athletics_difficulty", "endurance_talent", "endurance_XP", "endurance_bonus", "endurance_training_time", "endurance_difficulty", "melee_talent", "melee_XP", "melee_bonus", "melee_training_time", "melee_difficulty", "reaction_talent", "reaction_XP", "reaction_bonus", "reaction_training_time", "reaction_difficulty", "throw_talent", "throw_XP", "throw_bonus", "throw_training_time", "throw_difficulty", "notice_talent", "notice_XP", "notice_bonus", "notice_training_time", "notice_difficulty", "lock_hacking_talent", "lock_hacking_XP", "lock_hacking_bonus", "lock_hacking_training_time", "lock_hacking_difficulty", "search_talent", "search_XP", "search_bonus", "search_training_time", "search_difficulty", "sleight_of_hand_talent", "sleight_of_hand_XP", "sleight_of_hand_bonus", "sleight_of_hand_training_time", "sleight_of_hand_difficulty", "stealth_talent", "stealth_XP", "stealth_bonus", "stealth_training_time", "stealth_difficulty", "astronomy_talent", "astronomy_XP", "astronomy_bonus", "astronomy_training_time", "astronomy_difficulty", "computer_science_talent", "computer_science_XP", "computer_science_bonus", "computer_science_training_time", "computer_science_difficulty", "medicine_talent", "medicine_XP", "medicine_bonus", "medicine_training_time", "medicine_difficulty", "natural_sciences_talent", "natural_sciences_XP", "natural_sciences_bonus", "natural_sciences_training_time", "natural_sciences_difficulty", "robotics_talent", "robotics_XP", "robotics_bonus", "robotics_training_time", "robotics_difficulty", "weapons_engineering_talent", "weapons_engineering_XP", "weapons_engineering_bonus", "weapons_engineering_training_time", "weapons_engineering_difficulty", "xenobiology_talent", "xenobiology_XP", "xenobiology_bonus", "xenobiology_training_time", "xenobiology_difficulty", "argumentation_talent", "argumentation_XP", "argumentation_bonus", "argumentation_training_time", "argumentation_difficulty", "deception_talent", "deception_XP", "deception_bonus", "deception_training_time", "deception_difficulty", "empathy_talent", "empathy_XP", "empathy_bonus", "empathy_training_time", "empathy_difficulty", "intimidation_talent", "intimidation_XP", "intimidation_bonus", "intimidation_training_time", "intimidation_difficulty", "leadership_talent", "leadership_XP", "leadership_bonus", "leadership_training_time", "leadership_difficulty", "art_talent", "art1_name", "art1_XP", "art1_bonus", "art1_training_time", "art1_difficulty", "art1", "art2_name", "art2_XP", "art2_bonus", "art2_training_time", "art2_difficulty", "art2", "hobby_talent", "hobby1_name_disabler", "hobby1_name", "hobby1_XP", "hobby1_bonus", "hobby1_training_time", "hobby1_difficulty", "hobby1", "hobby2_name", "hobby2_XP", "hobby2_bonus", "hobby2_training_time", "hobby2_difficulty", "hobby2", "language_talent", "language1_name_disabler", "language1_name", "language1_XP", "language1_bonus", "language1_training_time", "language1_difficulty", "language1", "language2_name_disabler", "language2_name", "language2_XP", "language2_bonus", "language2_training_time", "language2_difficulty", "language2", "language3_name", "language3_XP", "language3_bonus", "language3_training_time", "language3_difficulty", "language3", "language4_name", "language4_XP", "language4_bonus", "language4_training_time", "language4_difficulty", "language4", "profession_talent", "profession1_name", "profession1_XP", "profession1_bonus", "profession1_training_time", "profession1_difficulty", "profession1", "profession2_name", "profession2_XP", "profession2_bonus", "profession2_training_time", "profession2_difficulty", "profession2", "money", "other_gear", "jornual", "companions", "misc"]; on("clicked:finish_json_import", finishImport); @@ -295,7 +295,7 @@ async function initTalentSelects() break; case "b": - planetFirst = "convince"; + planetFirst = "argumentation"; break; case "c": @@ -321,7 +321,7 @@ async function initTalentSelects() setTalentSelects({"sourceType": "player", "sourceAttribute": "9"}); } -var diffFours = ["endurance", "reaction", "astronomy", "deceive", "hack_locks", "knowledge_corporate", "trade", "knowledge_urban"]; +var diffFours = ["endurance", "reaction", "astronomy", "deception", "lock_hacking", "knowledge_corporate", "trade", "knowledge_urban"]; var skillCategories = {"a": [4,6], "b": [22,25], "c": [11,14], "d": [7,10], "e": [15,21], "f": [0,3]}; var pairs = {"0": 1, "1": 0, "3": 4, "4": 3}; @@ -329,7 +329,7 @@ var talents = [ {label: "Bridge Technology", value: "bridge_tech"}, {label: "Mounted Weaponry", value: "mounted_weaponry"}, - {label: "Pilot", value: "pilot"}, + {label: "Piloting", value: "piloting"}, {label: "Vehicle Engineering", value: "vehicle_engineering"}, {label: "Knowledge (Corporate)", value: "knowledge_corporate"}, {label: "Knowledge (Urban)", value: "knowledge_urban"}, @@ -341,7 +341,7 @@ var talents = {label: "Notice", value: "notice"}, {label: "Hack Security", value: "hack_security"}, {label: "Sleight of Hand", value: "sleight_of_hand"}, - {label: "Sneak", value: "sneak"}, + {label: "Stealth", value: "stealth"}, {label: "Astronomy", value: "astronomy"}, {label: "Computer Science", value: "computer_science"}, {label: "Medicine", value: "medicine"}, @@ -349,10 +349,10 @@ var talents = {label: "Robotics", value: "robotics"}, {label: "Weapons Engineering", value: "weapons_engineering"}, {label: "Xenobiology", value: "xenobiology"}, - {label: "Convince", value: "convince"}, - {label: "Deceive", value: "deceive"}, + {label: "Argumentation", value: "argumentation"}, + {label: "Deception", value: "deception"}, {label: "Empathy", value: "empathy"}, - {label: "Lead", value: "lead"} + {label: "Leadership", value: "leadership"} ]; on ("change:talent1 change:talent2 change:talent3 change:talent4 change:talent0", setTalentSelects); @@ -1337,7 +1337,7 @@ async function enableCCComplete() } } -on ("clicked:lead_cc_down clicked:intimidate_cc_down clicked:empathy_cc_down clicked:deceive_cc_down clicked:convince_cc_down clicked:xenobiology_cc_down clicked:weapons_engineering_cc_down clicked:robotics_cc_down clicked:natural_sciences_cc_down clicked:medicine_cc_down clicked:computer_science_cc_down clicked:astronomy_cc_down clicked:sneak_cc_down clicked:sleight_of_hand_cc_down clicked:search_cc_down clicked:hack_locks_cc_down clicked:notice_cc_down clicked:throw_cc_down clicked:reaction_cc_down clicked:melee_cc_down clicked:endurance_cc_down clicked:athletics_cc_down clicked:aim_cc_down clicked:trade_cc_down clicked:knowledge_urban_cc_down clicked:knowledge_corporate_cc_down clicked:drive_ground_vehicle_cc_down clicked:vehicle_engineering_cc_down clicked:pilot_cc_down clicked:mounted_weaponry_cc_down clicked:bridge_tech_cc_down", reduceSkillCC); +on ("clicked:leadership_cc_down clicked:intimidation_cc_down clicked:empathy_cc_down clicked:deception_cc_down clicked:argumentation_cc_down clicked:xenobiology_cc_down clicked:weapons_engineering_cc_down clicked:robotics_cc_down clicked:natural_sciences_cc_down clicked:medicine_cc_down clicked:computer_science_cc_down clicked:astronomy_cc_down clicked:stealth_cc_down clicked:sleight_of_hand_cc_down clicked:search_cc_down clicked:lock_hacking_cc_down clicked:notice_cc_down clicked:throw_cc_down clicked:reaction_cc_down clicked:melee_cc_down clicked:endurance_cc_down clicked:athletics_cc_down clicked:aim_cc_down clicked:trade_cc_down clicked:knowledge_urban_cc_down clicked:knowledge_corporate_cc_down clicked:driving_cc_down clicked:vehicle_engineering_cc_down clicked:piloting_cc_down clicked:mounted_weaponry_cc_down clicked:bridge_tech_cc_down", reduceSkillCC); async function reduceSkillCC(info) { @@ -1345,7 +1345,7 @@ async function reduceSkillCC(info) await enableCCComplete(); } -on ("clicked:lead_cc_up clicked:intimidate_cc_up clicked:empathy_cc_up clicked:deceive_cc_up clicked:convince_cc_up clicked:xenobiology_cc_up clicked:weapons_engineering_cc_up clicked:robotics_cc_up clicked:natural_sciences_cc_up clicked:medicine_cc_up clicked:computer_science_cc_up clicked:astronomy_cc_up clicked:sneak_cc_up clicked:sleight_of_hand_cc_up clicked:search_cc_up clicked:hack_locks_cc_up clicked:notice_cc_up clicked:throw_cc_up clicked:reaction_cc_up clicked:melee_cc_up clicked:endurance_cc_up clicked:athletics_cc_up clicked:aim_cc_up clicked:trade_cc_up clicked:knowledge_urban_cc_up clicked:knowledge_corporate_cc_up clicked:drive_ground_vehicle_cc_up clicked:vehicle_engineering_cc_up clicked:pilot_cc_up clicked:mounted_weaponry_cc_up clicked:bridge_tech_cc_up", raiseSkillCC); +on ("clicked:leadership_cc_up clicked:intimidation_cc_up clicked:empathy_cc_up clicked:deception_cc_up clicked:argumentation_cc_up clicked:xenobiology_cc_up clicked:weapons_engineering_cc_up clicked:robotics_cc_up clicked:natural_sciences_cc_up clicked:medicine_cc_up clicked:computer_science_cc_up clicked:astronomy_cc_up clicked:stealth_cc_up clicked:sleight_of_hand_cc_up clicked:search_cc_up clicked:lock_hacking_cc_up clicked:notice_cc_up clicked:throw_cc_up clicked:reaction_cc_up clicked:melee_cc_up clicked:endurance_cc_up clicked:athletics_cc_up clicked:aim_cc_up clicked:trade_cc_up clicked:knowledge_urban_cc_up clicked:knowledge_corporate_cc_up clicked:driving_cc_up clicked:vehicle_engineering_cc_up clicked:piloting_cc_up clicked:mounted_weaponry_cc_up clicked:bridge_tech_cc_up", raiseSkillCC); async function raiseSkillCC(info) { @@ -1399,8 +1399,8 @@ async function setSkillBonuses() switch (values.role_select) { - case "pilot": - skillBonuses.pilot = 2; + case "piloting": + skillBonuses.piloting = 2; break; case "weapons_officer": @@ -1451,7 +1451,7 @@ on ("clicked:cc2_complete", closeCC); async function closeCC() { - var values = await getAttrsAsync(["cc_points", "profession_select", "social_class_select", "territory_select", "role_select", "str", "pilot", "bridge_tech", "vehicle_engineering", "mounted_weaponry"]); + var values = await getAttrsAsync(["cc_points", "profession_select", "social_class_select", "territory_select", "role_select", "str", "piloting", "bridge_tech", "vehicle_engineering", "mounted_weaponry"]); var xpInfo = await getXPData(); console.log(xpInfo); await setAttrsAsync({"cc2_prompt_hider": 1, @@ -1518,7 +1518,7 @@ async function closeCC() await setAttrsAsync({["repeating_advantages_" + id + "_advantage_name"]: "Robot companion", ["repeating_advantages_" + id + "_advantage_cost"]: "0", ["repeating_advantages_" + id + "_advantage_description"]: "You have a robot."}); - await setAttrsAsync({"notes": "Mk 17 Scout Companion\nHardware: Frame I, Antigrav drive I, Camera * 2, Infrared Camera, Microphone, Chemical Analyzer, Brain II, Head, Broadband Radio, Battery III\nSoftware: Watcher, Remote control manager, Audio/video recorder, Broadband communicator"}); + await setAttrsAsync({"notes": "Mk 17 Scout Companion\nHardware: Frame I, Antigrav driving I, Camera * 2, Infrared Camera, Microphone, Chemical Analyzer, Brain II, Head, Broadband Radio, Battery III\nSoftware: Watcher, Remote control manager, Audio/video recorder, Broadband communicator"}); break; } break; @@ -1771,7 +1771,7 @@ async function closeCC() ccArmor = combatPolymerSuit; ccAmmo = ammoA; gear = "1 S.E.A.L., 1 combat com, standard clothes, 10m carbon fiber cable with serrated tips, ZX7, <1>"; - otherGear = "set of sneakwear"; + otherGear = "set of stealthwear"; break; case "swindler": @@ -1782,7 +1782,7 @@ async function closeCC() otherGear = "set of elegant clothing"; break; - case "pilot": + case "piloting": ccWeapon = arduloM2; ccArmor = lightMilitiaArmor; ccAmmo = ammoA; @@ -1960,7 +1960,7 @@ async function setCharacterInfo() { console.log("Setting character info."); var values = await getAttrsAsync(["str", "sta", "agi", "per", "int", "cha", "wil", "territory_select", "planet_select", "social_class_select", "profession_select", "role_select", "hobby1", "hobby1_name", "language1", "language1_name", "language2", "language2_name", "gavadai_genetic_origin", "saturnada_creature", "gt_choice", "zaidong_augmentation"]); - var skills = await getAttrsAsync(["bridge_tech", "mounted_weaponry", "pilot", "vehicle_engineering", "drive_ground_vehicle", "knowledge_corporate", "knowledge_urban", "trade", "aim", "athletics", "endurance", "reaction", "melee", "throw", "notice", "hack_locks", "search", "sleight_of_hand", "sneak", "astronomy", "computer_science", "medicine", "natural_sciences", "robotics", "weapons_engineering", "xenobiology", "convince", "deceive", "empathy", "intimidate", "lead"]); + var skills = await getAttrsAsync(["bridge_tech", "mounted_weaponry", "piloting", "vehicle_engineering", "driving", "knowledge_corporate", "knowledge_urban", "trade", "aim", "athletics", "endurance", "reaction", "melee", "throw", "notice", "lock_hacking", "search", "sleight_of_hand", "stealth", "astronomy", "computer_science", "medicine", "natural_sciences", "robotics", "weapons_engineering", "xenobiology", "argumentation", "deception", "empathy", "intimidation", "leadership"]); await setSkillBonuses(); var s = "Character stats:\n"; @@ -2153,15 +2153,15 @@ async function setCharacterInfo() break; case "thief": - s += "Thief.\nStarting gear: 1 S.E.A.L., combat com, combat polymer suit, Ardulo M2, 30 standard A type ammunition, Scorpion, 10m carbon fiber cable with serrated tips, ZX7, <1>, set of sneakwear."; + s += "Thief.\nStarting gear: 1 S.E.A.L., combat com, combat polymer suit, Ardulo M2, 30 standard A type ammunition, Scorpion, 10m carbon fiber cable with serrated tips, ZX7, <1>, set of stealthwear."; break; case "swindler": s += "Swindler.\nStarting gear: 1 S.E.A.L., combat com, combat polymer suit, Ardulo T4, 30 standard A type ammunition, bug, <2>, 1 focus, set of elegant clothing."; break; - case "pilot": - s += "Pilot.\nStarting gear: 1 S.E.A.L., combat com, light militia armor, Ardulo M2, 30 standard A type ammunition, civilian space suit, vehicle toolkit, <1>, set of protective workwear."; + case "piloting": + s += "Piloting.\nStarting gear: 1 S.E.A.L., combat com, light militia armor, Ardulo M2, 30 standard A type ammunition, civilian space suit, vehicle toolkit, <1>, set of protective workwear."; break; case "engineer": @@ -2957,7 +2957,7 @@ function skillCheckCallback(results) var skillToRoll; -on ("clicked:roll_bridge_tech clicked:roll_mounted_weaponry clicked:roll_pilot clicked:roll_vehicle_engineering clicked:roll_drive_ground_vehicle clicked:roll_knowledge_corporate clicked:roll_knowledge_urban clicked:roll_trade clicked:roll_aim clicked:roll_athletics clicked:roll_endurance clicked:roll_melee clicked:roll_reaction clicked:roll_throw clicked:roll_notice clicked:roll_hack_locks clicked:roll_search clicked:roll_sleight_of_hand clicked:roll_sneak clicked:roll_astronomy clicked:roll_computer_science clicked:roll_medicine clicked:roll_natural_sciences clicked:roll_robotics clicked:roll_weapons_engineering clicked:roll_xenobiology clicked:roll_convince clicked:roll_deceive clicked:roll_empathy clicked:roll_intimidate clicked:roll_lead clicked:roll_art1 clicked:roll_art2 clicked:roll_hobby1 clicked:roll_hobby2 clicked:roll_language1 clicked:roll_language2 clicked:roll_language3 clicked:roll_language4 clicked:roll_profession1 clicked:roll_profession2", openRollPrompt); +on ("clicked:roll_bridge_tech clicked:roll_mounted_weaponry clicked:roll_piloting clicked:roll_vehicle_engineering clicked:roll_driving clicked:roll_knowledge_corporate clicked:roll_knowledge_urban clicked:roll_trade clicked:roll_aim clicked:roll_athletics clicked:roll_endurance clicked:roll_melee clicked:roll_reaction clicked:roll_throw clicked:roll_notice clicked:roll_lock_hacking clicked:roll_search clicked:roll_sleight_of_hand clicked:roll_stealth clicked:roll_astronomy clicked:roll_computer_science clicked:roll_medicine clicked:roll_natural_sciences clicked:roll_robotics clicked:roll_weapons_engineering clicked:roll_xenobiology clicked:roll_argumentation clicked:roll_deception clicked:roll_empathy clicked:roll_intimidation clicked:roll_leadership clicked:roll_art1 clicked:roll_art2 clicked:roll_hobby1 clicked:roll_hobby2 clicked:roll_language1 clicked:roll_language2 clicked:roll_language3 clicked:roll_language4 clicked:roll_profession1 clicked:roll_profession2", openRollPrompt); async function openRollPrompt(info) { @@ -3017,14 +3017,14 @@ async function skillToName(skill) case "mounted_weaponry": return "Mounted Weaponry"; - case "pilot": - return "Pilot"; + case "piloting": + return "Piloting"; case "vehicle_engineering": return "Vehicle Engineering"; - case "drive_ground_vehicle": - return "Drive Ground Vehicle"; + case "driving": + return "Driving"; case "knowledge_corporate": return "Knowledge (Corporate)"; @@ -3056,8 +3056,8 @@ async function skillToName(skill) case "notice": return "Notice"; - case "hack_locks": - return "Hack Locks"; + case "lock_hacking": + return "Lock Hacking"; case "search": return "Search"; @@ -3065,8 +3065,8 @@ async function skillToName(skill) case "sleight_of_hand": return "Sleight of Hand"; - case "sneak": - return "Sneak"; + case "stealth": + return "Stealth"; case "astronomy": return "Astronomy"; @@ -3089,20 +3089,20 @@ async function skillToName(skill) case "xenobiology": return "Xenobiology"; - case "convince": - return "Convince"; + case "argumentation": + return "Argumentation"; - case "deceive": - return "Deceive"; + case "deception": + return "Deception"; case "empathy": return "Empathy"; - case "intimidate": - return "Intimidate"; + case "intimidation": + return "Intimidation"; - case "lead": - return "Lead"; + case "leadership": + return "Leadership"; case "art1": return values.art1_name; @@ -3138,7 +3138,7 @@ async function skillToName(skill) return "Skill name not found"; } -on ("clicked:edit_bridge_tech clicked:edit_mounted_weaponry clicked:edit_pilot clicked:edit_vehicle_engineering clicked:edit_drive_ground_vehicle clicked:edit_knowledge_corporate clicked:edit_knowledge_urban clicked:edit_trade clicked:edit_aim clicked:edit_athletics clicked:edit_endurance clicked:edit_melee clicked:edit_reaction clicked:edit_throw clicked:edit_notice clicked:edit_hack_locks clicked:edit_search clicked:edit_sleight_of_hand clicked:edit_sneak clicked:edit_astronomy clicked:edit_computer_science clicked:edit_medicine clicked:edit_natural_sciences clicked:edit_robotics clicked:edit_weapons_engineering clicked:edit_xenobiology clicked:edit_convince clicked:edit_deceive clicked:edit_empathy clicked:edit_intimidate clicked:edit_lead clicked:edit_art1 clicked:edit_art2 clicked:edit_hobby1 clicked:edit_hobby2 clicked:edit_language1 clicked:edit_language2 clicked:edit_language3 clicked:edit_language4 clicked:edit_profession1 clicked:edit_profession2", editSkill); +on ("clicked:edit_bridge_tech clicked:edit_mounted_weaponry clicked:edit_piloting clicked:edit_vehicle_engineering clicked:edit_driving clicked:edit_knowledge_corporate clicked:edit_knowledge_urban clicked:edit_trade clicked:edit_aim clicked:edit_athletics clicked:edit_endurance clicked:edit_melee clicked:edit_reaction clicked:edit_throw clicked:edit_notice clicked:edit_lock_hacking clicked:edit_search clicked:edit_sleight_of_hand clicked:edit_stealth clicked:edit_astronomy clicked:edit_computer_science clicked:edit_medicine clicked:edit_natural_sciences clicked:edit_robotics clicked:edit_weapons_engineering clicked:edit_xenobiology clicked:edit_argumentation clicked:edit_deception clicked:edit_empathy clicked:edit_intimidation clicked:edit_leadership clicked:edit_art1 clicked:edit_art2 clicked:edit_hobby1 clicked:edit_hobby2 clicked:edit_language1 clicked:edit_language2 clicked:edit_language3 clicked:edit_language4 clicked:edit_profession1 clicked:edit_profession2", editSkill); async function editSkill(info) { @@ -3515,10 +3515,10 @@ var customOptions = {label: "ASTRONAUTICS", value: "ASTRONAUTICS", disabled: "true"}, {label: "Bridge Technology", value: "bridge_tech"}, {label: "Mounted Weaponry", value: "mounted_weaponry"}, - {label: "Pilot", value: "pilot"}, + {label: "Piloting", value: "piloting"}, {label: "Vehicle Engineering", value: "vehicle_engineering"}, {label: "CIVILIZATIONAL", value: "CIVILIZATIONAL", disabled: "true"}, - {label: "Drive Ground Vehicle", value: "drive_ground_vehicle"}, + {label: "Driving", value: "driving"}, {label: "Knowledge (Corporate)", value: "knowledge_corporate"}, {label: "Knowledge (Urban)", value: "knowledge_urban"}, {label: "Trade", value: "trade"}, @@ -3531,10 +3531,10 @@ var customOptions = {label: "Throw", value: "throw"}, {label: "INFILTRATION", value: "INFILTRATION", disabled: "true"}, {label: "Notice", value: "notice"}, - {label: "Hack Locks", value: "hack_locks"}, + {label: "Lock Hacking", value: "lock_hacking"}, {label: "Search", value: "search"}, {label: "Sleight of Hand", value: "sleight_of_hand"}, - {label: "Sneak", value: "sneak"}, + {label: "Stealth", value: "stealth"}, {label: "SCIENCE", value: "SCIENCE", disabled: "true"}, {label: "Astronomy", value: "astronomy"}, {label: "Computer Science", value: "computer_science"}, @@ -3544,11 +3544,11 @@ var customOptions = {label: "Weapons Engineering", value: "weapons_engineering"}, {label: "Xenobiology", value: "xenobiology"}, {label: "SOCIAL", value: "SOCIAL", disabled: "true"}, - {label: "Convince", value: "convince"}, - {label: "Deceive", value: "deceive"}, + {label: "Argumentation", value: "argumentation"}, + {label: "Deception", value: "deception"}, {label: "Empathy", value: "empathy"}, - {label: "Intimidate", value: "intimidate"}, - {label: "Lead", value: "lead"} + {label: "Intimidation", value: "intimidation"}, + {label: "Leadership", value: "leadership"} ]; function findIndex(optionArray, value) @@ -3725,9 +3725,9 @@ async function resetSkills() { await setAttrsAsync({"bridge_tech": 0, "mounted_weaponry": 0, - "pilot": 0, + "piloting": 0, "vehicle_engineering": 0, - "drive_ground_vehicle": 0, + "driving": 0, "knowledge_corporate": 0, "knowledge_urban": 0, "trade": 0, @@ -3738,10 +3738,10 @@ async function resetSkills() "melee": 0, "throw": 0, "notice": 0, - "hack_locks": 0, + "lock_hacking": 0, "search": 0, "sleight_of_hand": 0, - "sneak": 0, + "stealth": 0, "astronomy": 0, "computer_science": 0, "medicine": 0, @@ -3749,11 +3749,11 @@ async function resetSkills() "robotics": 0, "weapons_engineering": 0, "xenobiology": 0, - "convince": 0, - "deceive": 0, + "argumentation": 0, + "deception": 0, "empathy": 0, - "intimidate": 0, - "lead": 0, + "intimidation": 0, + "leadership": 0, "hobby1": 0, "hobby1_name": "", "hobby1_name_disabler": 0}); @@ -3780,9 +3780,9 @@ async function setProfession() "custom_options_hider": 1, "bridge_tech_bonus": 0, "mounted_weaponry_bonus": 0, - "pilot_bonus": 0, + "piloting_bonus": 0, "vehicle_engineering_bonus": 0, - "drive_ground_vehicle_bonus": 0, + "driving_bonus": 0, "knowledge_corporate_bonus": 0, "knowledge_urban_bonus": 0, "trade_bonus": 0, @@ -3793,10 +3793,10 @@ async function setProfession() "melee_bonus": 0, "throw_bonus": 0, "notice_bonus": 0, - "hack_locks_bonus": 0, + "lock_hacking_bonus": 0, "search_bonus": 0, "sleight_of_hand_bonus": 0, - "sneak_bonus": 0, + "stealth_bonus": 0, "astronomy_bonus": 0, "computer_science_bonus": 0, "medicine_bonus": 0, @@ -3804,11 +3804,11 @@ async function setProfession() "robotics_bonus": 0, "weapons_engineering_bonus": 0, "xenobiology_bonus": 0, - "convince_bonus": 0, - "deceive_bonus": 0, + "argumentation_bonus": 0, + "deception_bonus": 0, "empathy_bonus": 0, - "intimidate_bonus": 0, - "lead_bonus": 0, + "intimidation_bonus": 0, + "leadership_bonus": 0, "hobby1_bonus": 0}); var bonuses = []; @@ -3820,7 +3820,7 @@ async function setProfession() await setAttrsAsync({ "aim": 2, "athletics": 1, "endurance": 1, - "lead": 1, + "leadership": 1, "medicine": 1, "hobby1": 1, "hobby1_name": "Gambling", @@ -3831,7 +3831,7 @@ async function setProfession() case "law_enforcer": bonuses = ["agi", "per"]; await setAttrsAsync({"notice": 2, - "drive_ground_vehicle": 1, + "driving": 1, "aim": 1, "melee": 1, "knowledge_urban": 1, @@ -3843,7 +3843,7 @@ async function setProfession() await setAttrsAsync({"notice": 1, "knowledge_corporate": 1, "scientist_options_hider": 0, - "convince": 1, + "argumentation": 1, "profession": "Scientist"}); await scienceSelectChanged(); @@ -3855,7 +3855,7 @@ async function setProfession() await setAttrsAsync({"medicine": 2, "empathy": 1, "natural_sciences": 1, - "convince": 1, + "argumentation": 1, "notice": 1, "profession": "Doctor"}); break; @@ -3863,8 +3863,8 @@ async function setProfession() case "spy": bonuses = ["cha", "per"]; await setAttrsAsync({"empathy": 2, - "convince": 1, - "deceive": 1, + "argumentation": 1, + "deception": 1, "notice": 1, "search": 1, "profession": "Spy"}); @@ -3872,18 +3872,18 @@ async function setProfession() case "smuggler": bonuses = ["agi", "cha"]; - await setAttrsAsync({"deceive": 2, + await setAttrsAsync({"deception": 2, "aim": 1, "knowledge_corporate": 1, - "pilot": 1, + "piloting": 1, "trade": 1, "profession": "Smuggler"}); break; case "thief": bonuses = ["agi", "per"]; - await setAttrsAsync({"sneak": 2, - "hack_locks": 1, + await setAttrsAsync({"stealth": 2, + "lock_hacking": 1, "search": 1, "knowledge_urban": 1, "sleight_of_hand": 1, @@ -3892,22 +3892,22 @@ async function setProfession() case "swindler": bonuses = ["cha", "per"]; - await setAttrsAsync({"deceive": 2, - "convince": 1, + await setAttrsAsync({"deception": 2, + "argumentation": 1, "empathy": 1, "knowledge_urban": 1, "sleight_of_hand": 1, "profession": "Swindler"}); break; - case "pilot": + case "piloting": bonuses = ["agi", "per"]; - await setAttrsAsync({"pilot": 2, + await setAttrsAsync({"piloting": 2, "astronomy": 1, "vehicle_engineering": 1, "notice": 1, "reaction": 1, - "profession": "Pilot"}); + "profession": "Piloting"}); break; case "engineer": @@ -3944,10 +3944,10 @@ async function setProfession() case "socialite": bonuses = ["cha", "wil"]; await setAttrsAsync({"empathy": 2, - "convince": 1, - "lead": 1, + "argumentation": 1, + "leadership": 1, "knowledge_urban": 1, - "deceive": 1, + "deception": 1, "profession": "Socialite"}); break; @@ -3956,7 +3956,7 @@ async function setProfession() await setAttrsAsync({"computer_science": 2, "knowledge_corporate": 1, "trade": 1, - "deceive": 1, + "deception": 1, "robotics": 1, "profession": "Hacker"}); break; @@ -4118,12 +4118,65 @@ async function hpBought() async function init() { await log("Sheet opened."); - var values = await getAttrsAsync(["cc1_prompt_hider", "cc2_prompt_hider", "cc0_prompt_hider", "total_xp", "talent_select_prompt_hider", "json_import_prompt_hider", "npc"]); + var values = await getAttrsAsync(["cc1_prompt_hider", "cc2_prompt_hider", "cc0_prompt_hider", "total_xp", "talent_select_prompt_hider", "json_import_prompt_hider", "npc", "pilot_aircraft", "pilot_areal_vehicle", "pilot", "intimidate", "convince", "deceive", "lead", "sneak", "hack_security", "hack_locks", "drive_ground_vehicle", "piloting_difficulty", "intimidation_difficulty", "argumentation_difficulty", "deception_difficulty", "leadership_difficulty", "stealth_difficulty", "lock_hacking_difficulty", "driving_difficulty", "skill_difficulty_offset"]); if (values.total_xp == "50" && values.cc1_prompt_hider == "1" && values.cc2_prompt_hider == "1" && values.cc0_prompt_hider == "1" && values.talent_select_prompt_hider == "1" && values.json_import_prompt_hider == "1" && values.npc == "0") { await setAttrsAsync({"cc0_prompt_hider": "0"}); } + var legacySkills = {"pilot_aircraft" : "piloting", "pilot_areal_vehicle": "piloting", "pilot": "piloting", "intimidate": "intimidation", "convince": "argumentation", "deceive": "deception", "lead": "leadership", "sneak": "stealth", "hack_security": "lock_haching", "hack_locks": "lock_hacking", "drive_ground_vehicle": "driving"}; + var xps = {}; + var xpRemainder = 0; + var legacySets = {}; + + for (legacySkill in legacySkills) + { + if (Object.hasOwn(legacySkills, legacySkill)) + { + var skill = Number(values[legacySkill]); + if (!isNaN(skill) && skill > 0) + { + var difficulty = Number(values[legacySkills[legacySkill] + "_difficulty"]) - Number(values.skill_difficulty_offset); + if (Object.hasOwn(xps, legacySkills[legacySkill])) + { + xps[legacySkills[legacySkill]] += difficulty * skill * (skill + 1) / 2; + } + else + { + xps[legacySkills[legacySkill]] = difficulty * skill * (skill + 1) / 2; + } + } + legacySets[legacySkill] = "0"; + } + } + + console.log(xps); + + for (skillName in xps) + { + if (Object.hasOwn(xps, skillName)) + { + var difficulty = Number(values[skillName + "_difficulty"]) - Number(values.skill_difficulty_offset); + var points = Math.floor(xps[skillName] / difficulty); + xpRemainder += xps[skillName] - points * difficulty; + var level = (-1 + Math.sqrt(1 + 8 * points))/2; + legacySets[skillName] = "" + level; + //console.log(skillName + "_difficulty: " + values[skillName+"_difficulty"] + " xps: " + xps[skillName]); + //console.log(difficulty + " - " + points + " - " + xpRemainder + " - " + level); + } + } + + if (xpRemainder > 0) + { + legacySets["total_xp"] = "" + (Number(values.total_xp) + xpRemainder); + } + + if (Object.keys(xps).length > 0) + { + //console.log(legacySets); + await setAttrsAsync(legacySets); + } + if (values.talent_select_prompt_hider == "0") { setTalentSelects({"sourceType": "player", "sourceAttribute": "9"}); @@ -4136,9 +4189,9 @@ async function init() setSocialClass(); await setAttrsAsync({"cc_bridge_tech_talent": "0", "cc_mounted_weaponry_talent": "0", - "cc_pilot_talent": "0", + "cc_piloting_talent": "0", "cc_vehicle_engineering_talent": "0", - "cc_drive_ground_vehicle_talent": "0", + "cc_driving_talent": "0", "cc_knowledge_corporate_talent": "0", "cc_knowledge_urban_talent": "0", "cc_trade_talent": "0", @@ -4149,10 +4202,10 @@ async function init() "cc_reaction_talent": "0", "cc_throw_talent": "0", "cc_notice_talent": "0", - "cc_hack_locks_talent": "0", + "cc_lock_hacking_talent": "0", "cc_search_talent": "0", "cc_sleight_of_hand_talent": "0", - "cc_sneak_talent": "0", + "cc_stealth_talent": "0", "cc_astronomy_talent": "0", "cc_computer_science_talent": "0", "cc_medicine_talent": "0", @@ -4160,11 +4213,11 @@ async function init() "cc_robotics_talent": "0", "cc_weapons_engineering_talent": "0", "cc_xenobiology_talent": "0", - "cc_convince_talent": "0", - "cc_deceive_talent": "0", + "cc_argumentation_talent": "0", + "cc_deception_talent": "0", "cc_empathy_talent": "0", - "cc_intimidate_talent": "0", - "cc_lead_talent": "0"}); + "cc_intimidation_talent": "0", + "cc_leadership_talent": "0"}); setSkillBonuses(); } @@ -4911,16 +4964,16 @@ function getSectionIDsAsync(sectionName){