From 4e36dd505a7f1b401ec3bd9e481d5c30be3aed0b Mon Sep 17 00:00:00 2001 From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com> Date: Thu, 12 Sep 2024 22:43:03 -0600 Subject: [PATCH 1/8] Version 2.2 begins with trim error fix and dispel false ID fix --- .../2.2/HeroSystem6eHeroic.hde | 3533 ++++++++++++ .../2.2/HeroSystem6eHeroic_HDImporter.js | 4829 +++++++++++++++++ .../2.2/Sample_Character.TXT | 1 + .../2.2/Sample_Character.hdc | Bin 0 -> 127396 bytes .../2.2/Sample_Character_MA.TXT | 1 + .../2.2/Sample_Character_MA.hdc | Bin 0 -> 108576 bytes 6 files changed, 8364 insertions(+) create mode 100644 HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde create mode 100644 HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js create mode 100644 HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT create mode 100644 HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.hdc create mode 100644 HeroSystem6eHeroic_HDImporter/2.2/Sample_Character_MA.TXT create mode 100644 HeroSystem6eHeroic_HDImporter/2.2/Sample_Character_MA.hdc diff --git a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde new file mode 100644 index 000000000..de38df75d --- /dev/null +++ b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde @@ -0,0 +1,3533 @@ +HeroSystem6eHeroic

HeroSystem6eHeroic

Version 2.0

Export format for the Roll20 API script HeroSystem6eHeroic_HDImporter, which imports Hero Designer characters into the HeroSystem6eHeroic character sheet.

For documentation see https://github.com/Roll20/roll20-api-scripts/tree/master/HeroSystem6eHeroic_HDImporter

By Villain In Glasses (Roll20 ID 633423)

+txt +!hero --import { + "character":{ + "character_name":"", + "character_title":"", + "height":"", + "weight":"", + "eyes":"", + "hair":"", + "backgroundText":"", + "historyText":"", + "appearance":"", + "tactics":"", + "campaignUse":"", + "quote":"", + "experience":"", + "experienceBenefit":"", + "strength":"", + "dexterity":"", + "constitution":"", + "intelligence":"", + "ego":"", + "presence":"", + "ocv":"", + "dcv":"", + "omcv":"", + "dmcv":"", + "speed":"", + "pd":"", + "ed":"", + "body":"", + "stun":"", + "endurance":"", + "recovery":"", + "running":"", + "leaping":"", + "swimming":"", + "equipment":{ + "equipment01":{1 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 1}, + "equipment02":{2 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 2}, + "equipment03":{3 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 3}, + "equipment04":{4 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 4}, + "equipment05":{5 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 5}, + "equipment06":{6 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 6}, + "equipment07":{7 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 7}, + "equipment08":{8 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 8}, + "equipment09":{9 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 9}, + "equipment10":{10 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 10}, + "equipment11":{11 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 11}, + "equipment12":{12 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 12}, + "equipment13":{13 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 13}, + "equipment14":{14 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 14}, + "equipment15":{15 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 15}, + "equipment16":{16 + + + "name":"(Multipower) ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"(MPSlot ", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + + + "name":"", + "text":"", + "damage":"", + "end":"", + "range":"", + "mass":"", + "attack":"true", + "defense":"true", + "notes":"" + + + 16} + }, + "maneuvers":{ + "maneuver01":{ + + 1 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 1 + + }, + "maneuver02":{ + + 2 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 2 + + }, + "maneuver03":{ + + 3 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 3 + + }, + "maneuver04":{ + + 4 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 4 + + }, + "maneuver05":{ + + 5 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 5 + + }, + "maneuver06":{ + + 6 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 6 + + }, + "maneuver07":{ + + 7 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 7 + + }, + "maneuver08":{ + + 8 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 8 + + }, + "maneuver09":{ + + 9 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 9 + + }, + "maneuver10":{ + + 10 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 10 + + }, + "maneuver11":{ + + 11 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 11 + + }, + "maneuver12":{ + + 12 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 12 + + }, + "maneuver13":{ + + + + 1 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 1 + + + + }, + "maneuver14":{ + + + + 2 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 2 + + + + }, + "maneuver15":{ + + + + 3 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 3 + + + + }, + "maneuver16":{ + + + + 4 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 4 + + + + }, + "maneuver17":{ + + + + 5 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 5 + + + + }, + "maneuver18":{ + + + + 6 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 6 + + + + }, + "maneuver19":{ + + + + 7 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 7 + + + + }, + "maneuver20":{ + + + + 8 + "name":"", + "points":"", + "phase":"", + "ocv":"", + "dcv":"", + "effect":"", + "notes":"" + 8 + + + + } + }, + "perks":{ + "perk01":{ + + 1 + "type":"", + "points":"", + "text":"", + "notes":"" + 1 + }, + "perk02":{ + + 2 + "type":"", + "points":"", + "text":"", + "notes":"" + 2 + }, + "perk03":{ + + 3 + "type":"", + "points":"", + "text":"", + "notes":"" + 3 + }, + "perk04":{ + + 4 + "type":"", + "points":"", + "text":"", + "notes":"" + 4 + }, + "perk05":{ + + 5 + "type":"", + "points":"", + "text":"", + "notes":"" + 5 + }, + "perk06":{ + + 6 + "type":"", + "points":"", + "text":"", + "notes":"" + 6 + }, + "perk07":{ + + 7 + "type":"", + "points":"", + "text":"", + "notes":"" + 7 + }, + "perk08":{ + + 8 + "type":"", + "points":"", + "text":"", + "notes":"" + 8 + }, + "perk09":{ + + 9 + "type":"", + "points":"", + "text":"", + "notes":"" + 9 + }, + "perk10":{ + + 10 + "type":"", + "points":"", + "text":"", + "notes":"" + 10 + } + }, + "talents":{ + "talent01":{ + + 1 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 1 + }, + "talent02":{ + + 2 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 2 + }, + "talent03":{ + + 3 + "type":"", + "points":"", + "text":"", + "notes":"" + 3 + }, + "talent04":{ + + 4 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 4 + }, + "talent05":{ + + 5 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 5 + }, + "talent06":{ + + 6 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 6 + }, + "talent07":{ + + 7 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 7 + }, + "talent08":{ + + 8 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 8 + }, + "talent09":{ + + 9 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 9 + }, + "talent10":{ + + 10 + "type":"", + "points":"", + "text":" + ", + "notes":"" + 10 + } + }, + "complications":{ + "complication01":{ + + 1 + "type":"", + "points":"", + "text":"", + "notes":"" + 1 + }, + "complication02":{ + + 2 + "type":"", + "points":"", + "text":"", + "notes":"" + 2 + }, + "complication03":{ + + 3 + "type":"", + "points":"", + "text":"", + "notes":"" + 3 + }, + "complication04":{ + + 4 + "type":"", + "points":"", + "text":"", + "notes":"" + 4 + }, + "complication05":{ + 5 + "type":"", + "points":"", + "text":"", + "notes":"" + 5 + }, + "complication06":{ + 6 + "type":"", + "points":"", + "text":"", + "notes":"" + 6 + }, + "complication07":{ + 7 + "type":"", + "points":"", + "text":"", + "notes":"" + 7 + }, + "complication08":{ + 8 + "type":"", + "points":"", + "text":"", + "notes":"" + 8 + }, + "complication09":{ + 9 + "type":"", + "points":"", + "text":"", + "notes":"" + 9 + }, + "complication10":{ + 10 + "type":"", + "points":"", + "text":"", + "notes":"" + 10 + }, + "complication11":{ + 11 + "type":"", + "points":"", + "text":"", + "notes":"" + 11 + }, + "complication12":{ + 12 + "type":"", + "points":"", + "text":"", + "notes":"" + 12 + }, + "complication13":{ + 13 + "type":"", + "points":"", + "text":"", + "notes":"" + 13 + }, + "complication14":{ + 14 + "type":"", + "points":"", + "text":"", + "notes":"" + 14 + }, + "complication15":{ + 15 + "type":"", + "points":"", + "text":"", + "notes":"" + 15 + }, + "complication16":{ + 16 + "type":"", + "points":"", + "text":"", + "notes":"" + 16 + }, + "complication17":{ + 17 + "type":"", + "points":"", + "text":"", + "notes":"" + 17 + }, + "complication18":{ + 18 + "type":"", + "points":"", + "text":"", + "notes":"" + 18 + }, + "complication19":{ + 19 + "type":"", + "points":"", + "text":"", + "notes":"" + 19 + }, + "complication20":{ + 20 + "type":"", + "points":"", + "text":"", + "notes":"" + 20 + } + }, + "powers":{ + "power01":{ + 1 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 1 + }, + "power02":{ + 2 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 2 + }, + "power03":{ + 3 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 3 + }, + "power04":{ + 4 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 4 + }, + "power05":{ + 5 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 5 + }, + "power06":{ + 6 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 6 + }, + "power07":{ + 7 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 7 + }, + "power08":{ + 8 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 8 + }, + "power09":{ + 9 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 9 + }, + "power10":{ + 10 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 10 + }, + "power11":{ + 11 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 11 + }, + "power12":{ + 12 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 12 + }, + "power13":{ + 13 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 13 + }, + "power14":{ + 14 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 14 + }, + "power15":{ + 15 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 15 + }, + "power16":{ + 16 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 16 + }, + "power17":{ + 17 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 17 + }, + "power18":{ + 18 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 18 + }, + "power19":{ + 19 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 19 + }, + "power20":{ + 20 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 20 + }, + "power21":{ + 21 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 21 + }, + "power22":{ + 22 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 22 + }, + "power23":{ + 23 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 23 + }, + "power24":{ + 24 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 24 + }, + "power25":{ + 25 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 25 + }, + "power26":{ + 26 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 26 + }, + "power27":{ + 27 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 27 + }, + "power28":{ + 28 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 28 + }, + "power29":{ + 29 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 29 + }, + "power30":{ + 30 + + + "name":"(Multipower) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"(MPSlot ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + + "name":"", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + + "name":"(VPP) ", + "base":"", + "text":"", + "notes":"", + "cost":"", + "endurance":"", + "damage":"", + + + "compound":"true" + + + "compound":"false" + + 30 + } + }, + "skills": { + "skill01": { + 1 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 1 + }, + "skill02": { + 2 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 2 + }, + "skill03": { + 3 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 3 + }, + "skill04": { + 4 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 4 + }, + "skill05": { + 5 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 5 + }, + "skill06": { + 6 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 6 + }, + "skill07": { + 7 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 7 + }, + "skill08": { + 8 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 8 + }, + "skill09": { + 9 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 9 + }, + "skill10": { + 10 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 10 + }, + "skill11": { + 11 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 11 + }, + "skill12": { + 12 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 12 + }, + "skill13": { + 13 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 13 + }, + "skill14": { + 14 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 14 + }, + "skill15": { + 15 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 15 + }, + "skill16": { + 16 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 16 + }, + "skill17": { + 17 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 17 + }, + "skill18": { + 18 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 18 + }, + "skill19": { + 19 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 19 + }, + "skill20": { + 20 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 20 + }, + "skill21": { + 21 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 21 + }, + "skill22": { + 22 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 22 + }, + "skill23": { + 23 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 23 + }, + "skill24": { + 24 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 24 + }, + "skill25": { + 25 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 25 + }, + "skill26": { + 26 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 26 + }, + "skill27": { + 27 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 27 + }, + "skill28": { + 28 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 28 + }, + "skill29": { + 29 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 29 + }, + "skill30": { + 30 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 30 + }, + "skill31": { + 31 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 31 + }, + "skill32": { + 32 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 32 + }, + "skill33": { + 33 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 33 + }, + "skill34": { + 34 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 34 + }, + "skill35": { + 35 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 35 + }, + "skill36": { + 36 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 36 + }, + "skill37": { + 37 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 37 + }, + "skill38": { + 38 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 38 + }, + "skill39": { + 39 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 39 + }, + "skill40": { + 40 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 40 + }, + "skill41": { + 41 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 41 + }, + "skill42": { + 42 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 42 + }, + "skill43": { + 43 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 43 + }, + "skill44": { + 44 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 44 + }, + "skill45": { + 45 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 45 + }, + "skill46": { + 46 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 46 + }, + "skill47": { + 47 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 47 + }, + "skill48": { + 48 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 48 + }, + "skill49": { + 49 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 49 + }, + "skill50": { + 50 + "name":"", + "enhancer":"true", + "text":"", + "display":"", + "attribute":"getCharacteristicString", + "base":"", + "levels":"", + "cost":"" + 50 + } + }, + "playerName":"", + "gmName":"", + "characterFile":"", + "versionHD":"", + "timeStamp":"", + "genre":"", + "campaign":"", + "version":"2.1", + "HeroSystem6eHeroic":"true" + } +} + +\\/ +Flight (\d*)"Flight $1m +within (\d*)"within $1m +Range \((\d*)"\)Range \($1m\) +(?<=[^\^\t:])(")(?=[^\>\}\]\:\n][^\n])'' +(\n)+ +(\t)+ +(\s)+ \ No newline at end of file diff --git a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js new file mode 100644 index 000000000..db071d256 --- /dev/null +++ b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js @@ -0,0 +1,4829 @@ +/* HeroSystem6eHeroic_HDImporter.js +* Hero Designer Importer for the Roll20 Hero System 6e Heroic character sheet +* Version: 2.1 +* By Villain in Glasses +* villaininglasses@icloud.com +* Discord: Villain#0604 +* Roll20: https://app.roll20.net/users/633423/villain-in-glasses +* Hero Games Forum Thread: +* https://www.herogames.com/forums/topic/101627-new-roll20-character-sheet-hero-system-6e-heroic/ +* +* Purpose: Imports characters created in Hero Designer into a Roll20 HeroSystem6eHeroic campaign. +* +* Installation: Paste this script into the API setup area of your Roll20 HeroSystem6eHeroic campaign. +* +* Copy "HeroSystem6eHeroic.hde" into your Hero Designer export format folder. +* +* Use: from Hero Designer export a character using HeroSystem6eHeroic.hde found in this repository as the selected format. +* This will produce a text file with the name of the character (e.g., myCharacter.txt). +* +* Open the exported file in your favorite text editor. Select all of the contents and copy it. +* Paste the copied text in the chat window of your Roll20 HeroSystem6eHeroic campaign. Hit enter. +* +* Commands: +* Import character: "!hero --import {character text}" +* Help: "!hero --help" +* Config: "!hero --config" +* +* Based on BeyondImporter Version O.4.0 by +* Robin Kuiper +* Discord: Atheos#1095 +* Roll20: https://app.roll20.net/users/1226016/robin +* +* Matt DeKok +* Discord: Sillvva#2532 +* Roll20: https://app.roll20.net/users/494585/sillvva +* +* Ammo Goettsch +* Discord: ammo#7063 +* Roll20: https://app.roll20.net/users/2990964/ammo +*/ + +(function() { + // Constants + const versionMod = "2.2"; + const versionSheet = "3.16"; // Note that a newer sheet will make upgrades as well as it can. + const needsExportedVersion = new Set(["1.0", "2.0", "2.1"]); // HeroSystem6eHeroic.hde versions allowed. + + const defaultAttributes = { + + // Bio + character_title: "hero", + backgroundText: "", + historyText: "", + experience: 0, + money: 0, + + // Tally Bar + characteristicsCost: 0, + + // Primary Attributes. + // We need to define strengthNet for weapons. + strength: 10, + strengthNet: 10, + dexterity: 10, + constitution: 10, + intelligence: 10, + ego: 10, + presence:10, + + // Combat Attributes + ocv: 3, + dcv: 3, + omcv: 3, + dmcv: 3, + speed: 2, + pd: 2, + ed: 2, + body: 10, + stun: 20, + endurance: 20, + recovery: 4, + + // Movement Attributes + running: 12, + leaping: 4, + swimming: 4, + + // Health Status Attributes + CurrentBODY: 10, + CurrentSTUN: 20, + CurrentEND: 20, + gearCurrentBODY: 10, + gearCurrentSTUN: 20, + gearCurrentEND: 20, + + // Make characteristic maximums default to no. + useCharacteristicMaximums: 0, + optionTakesNoSTUN: 0, + + // Skill levels + skillLevels38: 0, + skillLevels39: 0, + skillLevels40: 0, + interactionLevelsCP: 0, + intellectLevelsCP: 0, + agilityLevelsCP: 0, + noncombatLevelsCP: 0, + overallLevelsCP: 0 + } + + let hero_caller = {}; + let object; // This is the character object. + + + // Styling for the chat responses. + const style = "margin-left: 0px; overflow: hidden; background-color: royalblue; border: 2px solid #fff990; padding: 5px; border-radius: 5px; color: white; div#home a:link { color: #70DB93; }"; + const buttonStyle = "background-color: dodgerblue; border: 1px solid #292929; width: 25%; border-radius: 3px; padding: 5px; color: #fff; text-align: center; float: right;"; + const altButtonStyle = "background-color: orange; border: 1px solid #292929; border-radius: 3px; padding: 5px; color: #fff; text-align: center; float: right;"; + const linkStyle = "color: green;" + + const script_name = 'HDImporter'; + const state_name = 'HDIMPORTER'; + var verbose = false; + + + // Start messages + on('ready', function() { + checkInstall(); + log(script_name + ' Ready! Command: !hero'); + //sendChat(script_name, script_name + ' Ready!\n For help enter "!hero --help"', null, {noarchive:true}); + sendChat(script_name, '

' + script_name + ' Ready!

For help enter "!hero --help"

', null, {noarchive:true}); + }); + + + on('chat:message', (msg) => { + if (msg.type != 'api') return; + + // Split the message into command and argument(s) + let args = msg.content.split(/ --(help|reset|config|imports|import) ?/g); + let command = args.shift().substring(1).trim(); + + if (command === "") { + return; + } + + hero_caller = getObj('player', msg.playerid); + + if (command !== 'hero') { + return; + } + + let importData = ""; + if(args.length < 1) { sendHelpMenu(hero_caller); return; } + + let config = state[state_name][hero_caller.id].config; + + for(let i = 0; i < args.length; i+=2) { + let k = args[i].trim(); + let v = args[i+1] != null ? args[i+1].trim() : null; + let check; + + v = cleanQuotes(v, script_name); + + check = Array.from(v.replace(/\s/g, '')); + + switch(k) { + case 'help': + sendHelpMenu(hero_caller); + return; + + case 'reset': + state[state_name][hero_caller] = {}; + setDefaults(true); + sendConfigMenu(hero_caller); + return; + + case 'config': + if(args.length > 0){ + let setting = v.split('|'); + let key = setting.shift(); + let value = (setting[0] === 'true') ? true : (setting[0] === 'false') ? false : (setting[0] === '[NONE]') ? '' : setting[0]; + + if(key === 'prefix' && value.charAt(0) !== '_' && value.length > 0) { value = value + ' ';} + if(key === 'suffix' && value.charAt(0) !== '_' && value.length > 0) { value = ' ' + value} + + state[state_name][hero_caller.id].config[key] = value; + } + + sendConfigMenu(hero_caller); + return; + + case 'imports': + if(args.length > 0){ + let setting = v.split('|'); + let key = setting.shift(); + let value = (setting[0] === 'true') ? true : (setting[0] === 'false') ? false : (setting[0] === '[NONE]') ? '' : setting[0]; + + state[state_name][hero_caller.id].config.imports[key] = value; + } + + sendConfigMenu(hero_caller); + return; + + case 'import': + if (check.length < 2100) { + // Intended character data length is safely less than the minimum character file size if exported with HDE format version 1.0. + // This is likely an error. + sendChat(script_name, '
Hero Importer finished early because the import command does not appear to contain valid character data.
' ); + return; + } else if ( (check[0] !== "{") && (check[check.length - 1] !== "}")) { + // Improper JSON format. + sendChat(script_name, '
Hero Importer finished early because the import command does not appear to contain valid character data.
' ); + return; + } + + importData = v.replace(/[\n\r]/g, ''); + break; + + default: + sendHelpMenu(hero_caller); + return; + } + } + + if ((importData === '') || (typeof importData === "undefined")) { + return; + } + + var json = importData; + var character = null; + + // Try to catch some bad input. Doesn't currently catch no input. + try { + character = JSON.parse(json).character; + } + + catch(error) { + let message = ""; + needsExportedVersion.forEach(function(value) { + message += value + ", "; + }); + + // Drop the last comma. + message = message.slice(0, -2); + + sendChat(script_name, '
Hero Importer ended early due to a source content error.
' ); + sendChat(script_name, "Please verify that the character file was exported using HeroSystem6eHeroic.hde (acceptable versions: "+message+"). For help use the command !hero --help."); + return; + } + + // Verify that the character was exported with the latest version of HeroSystem6eHeroic.hde. If not, report error and abort. + if (needsExportedVersion.has(character.version) === false) { + var last; + needsExportedVersion.forEach(k => { last = k }); + + sendChat(script_name, '
Import of ' + character.character_name + ' ended early due to version mismatch error.
' ); + sendChat(script_name, "Please download and install the latest version of HeroSystem6eHeroic.hde (version: "+last+" recommended) into your Hero Designer export formats folder. Export your character and try HD Importer again. For help use the command !hero --help." ); + + return; + } + + sendChat(script_name, '
Import of ' + character.character_name + ' started.
', null, {noarchive:true}); + + if (character.version === "1.0") { + sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v1.0. \n Version 2.1 supports additional content."); + } else if (character.version === "2.0") { + sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v2.0. \n Version 2.1 supports additional content."); + } + + object = null; + + // Assign a random name if the character doesn't have one. + if ((character.character_name).length === 0) { + character.character_name = createRandomString(7); + } + + // Remove characters with the same name if overwrite is enabled. + if(state[state_name][hero_caller.id].config.overwrite) { + let objects = findObjs({ + _type: "character", + name: state[state_name][hero_caller.id].config.prefix + character.character_name + state[state_name][hero_caller.id].config.suffix + }, {caseInsensitive: true}); + + if(objects.length > 0) { + object = objects[0]; + for(let i = 1; i < objects.length; i++){ + objects[i].remove(); + } + } + } + + if(!object) { + // Create character object + object = createObj("character", { + name: state[state_name][hero_caller.id].config.prefix + character.character_name + state[state_name][hero_caller.id].config.suffix, + inplayerjournals: playerIsGM(msg.playerid) ? state[state_name][hero_caller.id].config.inplayerjournals : msg.playerid, + controlledby: playerIsGM(msg.playerid) ? state[state_name][hero_caller.id].config.controlledby : msg.playerid + }); + } + + // Set base character sheet values. + setAttrs(object.id, defaultAttributes); + + // Import Page 1: Characteristics and Bio + importCharacteristics(object, character, script_name); + + // Import Page 2: Martial Arts Maneuvers + // Maneuvers over the sheet maximum will be prepended to excess perks and talents in the treasures field. + character.overflow = importManeuvers(object, character, script_name); + + // Import Page 2: Equipment + importEquipment(object, character, script_name); + + // Import Page 3: Skills + importAllSkills(object, character, script_name); + + // Import Page 4: Powers + // Powers over the sheet maximum will be prepended to excess perks and talents in a text field. + character.overflow = importPowers(object, character, script_name); + + // Import Page 5: Perks and Talents + importPerksAndTalents(object, character, script_name); + + // Import Page 5: Complications + importComplications(object, character, script_name); + + // Version + applyVersion(object, character, script_name, versionSheet); + + // Finished notification + sendChat(script_name, '
Import of ' + character.character_name + ' finished.
', null, {noarchive:true}); + }); + + // END MAIN + + +/* **************************************** */ +/* *** Begin Import Functions *** */ +/* **************************************** */ + + var importCharacteristics = function(object, character, script_name) { + + /* ************************************************* */ + /* *** Import Function: Characteristics *** */ + /* ************************************************* */ + + // Set sticky note to importer details. + let importInfoString = "HDImporter for Roll20\n"; + importInfoString = importInfoString + "Version: " + versionMod + "\n"; + if (typeof character.playerName !== "undefined") { + importInfoString = importInfoString + "Player: " + character.playerName + "\n"; + } + if (typeof character.gmName !== "undefined") { + importInfoString = importInfoString + "GM: " + character.gmName + "\n"; + } + if (typeof character.genre !== "undefined") { + importInfoString = importInfoString + "Genre: " + character.genre + "\n"; + } + if (typeof character.campaign !== "undefined") { + importInfoString = importInfoString + "Campaign: " + character.campaign + "\n"; + } + if (typeof character.versionHD !== "undefined") { + importInfoString = importInfoString + "Hero Designer version: " + character.versionHD + "\n"; + } + importInfoString = importInfoString + "HeroSystem6eHeroic.hde version: " + character.version + "\n"; + if (typeof character.characterFile !== "undefined") { + importInfoString = importInfoString + "Original file: " + character.characterFile + "\n"; + } + if (typeof character.timeStamp !== "undefined") { + importInfoString = importInfoString + "Export date: \n " + character.timeStamp + "\n"; + } + + setAttrs(object.id, {portraitStickyNote: importInfoString}); + + + // Set sticky window as visible portrait. + setAttrs(object.id, {portraitSelection: 2}); + + // Set bio-type attributes and experience points. + + let description = ""; + let quote = ""; + + if (character.version >= 1.2) { + quote = character.quote; + quote = quote.trim(); + + description += ((character.appearance).length > 0) ? character.appearance : ""; + description += ((character.backgroundText).length > 0) ? '\n' + '\n' + character.backgroundText : ""; + description += ((character.historyText).length > 0) ? '\n' + '\n' + character.historyText : ""; + description += ((character.tactics).length > 0) ? '\n' + '\n' + character.tactics : ""; + description += ((character.campaignUse).length > 0) ? '\n' + '\n' + character.campaignUse : ""; + description = description.trim(); + description += '\n' + '\n' + character.height + " and " + Math.round(Number((character.weight).replace(/[^0-9.]/g,''))) + " kg."; + description = description.trim(); + } else { + quote = ""; + + description += ((character.historyText).length > 0) ? character.historyText : ""; + description = description.trim(); + } + + let bio_attributes = { + character_title: character.character_title, + backgroundText: quote, + historyText: description, + experience: parseInt(character.experience)||0, + experienceBenefit: parseInt(character.experienceBenefit)||0 + } + + setAttrs(object.id, bio_attributes); + + if(verbose) { + sendChat(script_name, "Imported bio and experience."); + } + + // Set primary attributes. + let primary_attributes = { + strength: parseInt(character.strength)||10, + strengthNet: parseInt(character.strength)||10, + dexterity: parseInt(character.dexterity)||10, + constitution: parseInt(character.constitution)||10, + intelligence: parseInt(character.intelligence)||10, + ego: parseInt(character.ego)||10, + presence: parseInt(character.presence)||10 + } + + setAttrs(object.id, primary_attributes); + + if(verbose) { + sendChat(script_name, "Imported core attributes."); + } + + // Set combat attributes. + let combat_attributes = { + ocv: parseInt(character.ocv)||3, + dcv: parseInt(character.dcv)||3, + omcv: parseInt(character.omcv)||3, + dmcv: parseInt(character.dmcv)||3, + speed: parseInt(character.speed)||2, + pd: parseInt(character.pd)||0, + ed: parseInt(character.ed)||0, + body: parseInt(character.body)||10, + stun: parseInt(character.stun)||0, + hiddenSTUN: parseInt(character.stun)||0, + endurance: parseInt(character.endurance)||0, + recovery: parseInt(character.recovery)||0 + } + + if (character.stun !== "") { + combat_attributes.stun = parseInt(character.stun); + } else { + combat_attributes.stun = 0; + } + + setAttrs(object.id, combat_attributes); + + if(verbose) { + sendChat(script_name, "Imported combat attributes."); + } + + // Set movement attributes. + + let movement_attributes = { + running: parseInt(character.running)||0, + leaping: parseInt(character.leaping)||0, + swimming: parseInt(character.swimming)||0 + }; + + setAttrs(object.id, movement_attributes); + + if(verbose) { + sendChat(script_name, "Imported movement."); + } + + // Set status attributes to starting values + let health_attributes = { + CurrentBODY: character.body, + CurrentSTUN: character.stun, + CurrentEND: character.endurance, + gearCurrentBODY: character.body, + gearCurrentSTUN: character.stun, + gearCurrentEND: character.endurance + } + + setAttrs(object.id, health_attributes); + + if(verbose) { + sendChat(script_name, "Configured health status."); + } + + return; + } + + + function createRandomString(length) { + // random character name from https://sentry.io/answers/generate-random-string-characters-in-javascript/ + const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + let result = ""; + for (let i = 0; i < length; i++) { + result += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return result; + } + + + var applyVersion = function(object, character, script_name, version) { + // Set version data to avoid improper sheet auto updates. + let version_attributes = { + version: version, + validateMay23: 1, + + // Show the Treasures slide where equipment will appear. + gearSlideSelection : "gearTreasures" + } + + setAttrs(object.id, version_attributes); + } + + + var importManeuvers = function(object, character, script_name) { + + /* ************************************************* */ + /* *** Import Function: Import Maneuvers *** */ + /* ************************************************* */ + + + // Overall list of maneuvers + let maneuverArray = new Array(); + let maneuverArrayIndex = 0; + let temp = 0; + let tempString = ""; + let diceString = ""; + let tempPosition = 0; + const maxManeuvers = 20; + const maneuverSlots = 10; + let importCount = 0; + let ID = "01"; + + // Imports twenty martial arts maneuvers, skipping empty slots. + // Only the first 10 are imported into sheet slots. + + for (importCount = 1; importCount < maxManeuvers; importCount++) { + + ID = String(importCount).padStart(2,'0'); + + if ((typeof character.maneuvers["maneuver"+ID] !== "undefined") && (typeof character.maneuvers["maneuver"+ID].name !== "undefined")) { + maneuverArray[maneuverArrayIndex] = character.maneuvers["maneuver"+ID]; + + maneuverArrayIndex++; + } + + } + + let importedManeuvers = {}; + importCount = 0; + const nameMax = 16; + + while ( (importCount < maneuverSlots) && (importCount < maneuverArrayIndex) ) { + if (importCount < maneuverArrayIndex) { + ID = String(importCount+1).padStart(2,'0'); + + if ( maneuverArray[importCount].name.length > nameMax) { + importedManeuvers["martialManeuverName"+ID] = maneuverArray[importCount].name.slice(0, nameMax); + importedManeuvers["martialManeuverEffect"+ID] = maneuverArray[importCount].name + '\n' + maneuverArray[importCount].effect; + } else { + importedManeuvers["martialManeuverName"+ID] = maneuverArray[importCount].name; + importedManeuvers["martialManeuverEffect"+ID] = maneuverArray[importCount].effect; + } + + importedManeuvers["martialManeuverCP"+ID] = maneuverArray[importCount].points; + importedManeuvers["martialManeuverPhase"+ID] = maneuverArray[importCount].phase; + temp = Number(maneuverArray[importCount].ocv); + importedManeuvers["martialManeuverOCV"+ID] = isNaN(temp) ? 0 : temp; + temp = Number(maneuverArray[importCount].dcv); + importedManeuvers["martialManeuverDCV"+ID] = isNaN(temp) ? 0 : temp; + + tempString = maneuverArray[importCount].effect.toLowerCase(); + if ( tempString.includes("weapon") ) { + if ( tempString.includes("strike") ) { + importedManeuvers["martialManeuverType"+ID] = "weaponAttack"; + + tempString = maneuverArray[importCount].effect; + + if ( tempString.includes("DC") ) { + tempPosition = tempString.indexOf("DC"); + diceString = tempString.slice(0, tempPosition); + diceString = diceString.slice(-3).replace(/[^0-9.-]/g, ''); + importedManeuvers["martialManeuverDC"+ID] = Math.max(-2, Math.min(2, parseInt(diceString)||0)); + } + } else if ( tempString.includes("block") ) { + importedManeuvers["martialManeuverType"+ID] = "weaponBlock"; + } else { + importedManeuvers["martialManeuverType"+ID] = "weaponContest"; + } + } else { + if ( tempString.includes("strike") ) { + importedManeuvers["martialManeuverType"+ID] = "attack"; + } else if ( tempString.includes("hka") ) { + importedManeuvers["martialManeuverType"+ID] = "attack"; + importedManeuvers["martialManeuverNormal"+ID] = "0"; + } else if ( tempString.includes("block") ) { + importedManeuvers["martialManeuverType"+ID] = "block"; + } else if ( tempString.includes("dodge") ) { + importedManeuvers["martialManeuverType"+ID] = "dodge"; + } else { + importedManeuvers["martialManeuverType"+ID] = "contest"; + } + + // Damage or STR adds. + if ( tempString.includes("d6") ) { + tempPosition = tempString.indexOf("d6"); + diceString = tempString.slice(0, tempPosition); + diceString = diceString.slice(-2).replace(/\D/g,"") + "d6"; + + if (tempString.includes("d3")) { + diceString += "+1d3"; + } else if (tempString.includes("+1")) { + diceString += "+1"; + } else if (tempString.includes("-1")) { + diceString += "-1"; + } + + importedManeuvers["martialManeuverDamage"+ID] = diceString; + } else if ( tempString.includes("str") ) { + tempPosition = tempString.indexOf("str"); + diceString = tempString.slice(0, tempPosition); + diceString = diceString.slice(-3).replace(/\D/g,""); + importedManeuvers["martialManeuverStrMod"+ID] = parseInt(diceString)||0; + } + } + + importCount++; + } + } + + // Import maneuvers. + setAttrs(object.id, importedManeuvers); + + if(verbose) { + if (importCount === 1) { + sendChat(script_name, "Imported 1 maneuver."); + } else { + sendChat(script_name, "Imported " + importCount + " maneuvers."); + } + } + + // Display additional maneuvers in the treasures text box. + if (maneuverArrayIndex > maneuverSlots) { + let extras = 0; + + for (let i = maneuverSlots; i < maneuverArrayIndex; i++) { + tempString = tempString + maneuverArray[i].name + "\n"; + tempString = tempString + "CP: " + maneuverArray[i].points + "\n"; + if (maneuverArray[i].ocv !== "") { + tempString = tempString + "OCV: " + maneuverArray[i].ocv + "\n"; + } + if (maneuverArray[i].dcv !== "") { + tempString = tempString + "DCV: " + maneuverArray[i].dcv + "\n"; + } + if (maneuverArray[i].phase !== "") { + tempString = tempString + "Phase: " + maneuverArray[i].phase + "\n"; + } + tempString = tempString + maneuverArray[i].effect + "\n" + "\n"; + extras++; + } + + if(verbose) { + if (extras === 1) { + sendChat(script_name, extras + " maneuver placed in treasures."); + } else { + sendChat(script_name, extras + " maneuvers placed in treasures."); + } + } + + if ( (typeof character.treasures != "undefined") && (character.treasures !== "")) { + tempString = character.treasures + '\n' + '\n' + tempString.trim(); + } else { + tempString = tempString.trim(); + } + + // Place additional maneuvers in the treasures text box. + setAttrs(object.id, {treasures: tempString}); + } + + // Make the Maneuver window visible. + if (importCount>0) { + setAttrs(object.id, {gearSlideSelection: 2}); + } + + return tempString; + } + + + var importEquipment = function(object, character, script_name) { + + /* ************************************************* */ + /* *** Import Function: Import Equipment *** */ + /* ************************************************* */ + + // Imports equipment and sets carried weight. + // Similar to the way perks and talents are handled, we will parse the imported equipment into temporary arrays. + + const strength = parseInt(character.strength)||10; + let gearTextBox = ""; + + let tempString; + let tempPosition; + let secondPosition; + let subStringA; + let subStringB; + let sampleSize; + + // Needed for adjusted damage. + let advantage = 0; + + // Overall array of equipment. + let equipmentArray = new Array(); + let equipmentArrayIndex = 0; + + // Array of items of equipment that are not weapons, armor, or shields. + let equipmentListArray = new Array(); + let equipmentListArrayIndex = 0; + + // Array of items of equipment that are weapons. + let weaponsArray = new Array(); + let weaponsArrayIndex = 0; + + // Array of items of equipment that are weapons. + let armorArray = new Array(); + let armorArrayIndex = 0; + + // Array for multipowers, which need to be independent from others. + let multipowerArray = new Array(); + let multipowerArrayIndex = 0; + + // Read equipment + const maxEquipment = 16; + let importCount = 0; + let imported = 0; + let ID = "01"; + + // Imports sixteen martial arts maneuvers, skipping empty slots. + + for (importCount = 1; importCount <= maxEquipment; importCount++) { + + ID = String(importCount).padStart(2,'0'); + + if ((typeof character.equipment["equipment"+ID] !== "undefined") && (typeof character.equipment["equipment"+ID].name !== "undefined")) { + + equipmentArray[equipmentArrayIndex]=character.equipment["equipment"+ID]; + + tempString = equipmentArray[equipmentArrayIndex].name; + + if ((tempString !== "") && tempString.length) { + if ((equipmentArray[equipmentArrayIndex].name.includes("Multipower")) || (equipmentArray[equipmentArrayIndex].name.includes("MPSlot"))) { + // Then place in multipower array. + multipowerArray[multipowerArrayIndex]=equipmentArray[equipmentArrayIndex]; + multipowerArrayIndex++; + + } else if ((equipmentArray[equipmentArrayIndex].attack !== "") && (equipmentArray[equipmentArrayIndex].damage !== "") && (equipmentArray[equipmentArrayIndex].attack === "true")) { + // If the item is a damage attack add it to the weapon list. + weaponsArray[weaponsArrayIndex]=equipmentArray[equipmentArrayIndex]; + weaponsArrayIndex++; + + } else if ((equipmentArray[equipmentArrayIndex].defense !== "") && (equipmentArray[equipmentArrayIndex].defense === "true")) { + // If the item is a defense add it to the armor list. + // This will need to be updated for shields. + armorArray[armorArrayIndex]=equipmentArray[equipmentArrayIndex]; + armorArrayIndex++; + + } else { + // If the item is not an attack or defense add it to the equipment list. + equipmentListArray[equipmentListArrayIndex]=equipmentArray[equipmentArrayIndex]; + equipmentListArrayIndex++; + } + } + + equipmentArrayIndex++; + } + } + + // Write raw details of imported equipment to the treasures slide. + if (equipmentArrayIndex > 0) { + + // Get current contents of the treasures text box. + tempString = character.overflow + '\n' + '\n'; + + // Add equipment to treasures. + for (let i = 0; i < equipmentArrayIndex; i++) { + tempString += equipmentArray[i].name + '\n'; + if (equipmentArray[i].damage !== "") { + tempString += "Damage: " + equipmentArray[i].damage + ", "; + } + if (equipmentArray[i].end !== "") { + tempString += "END: " + equipmentArray[i].end + ", "; + } + if (equipmentArray[i].range !== "") { + tempString += "Range: " + equipmentArray[i].range + ", "; + } + if (equipmentArray[i].text !== "") { + tempString += equipmentArray[i].text; + if (equipmentArray[i].notes !== "") { + tempString += ", " + equipmentArray[i].notes; + } + } else if (equipmentArray[i].notes !== "") { + tempString += ", " + equipmentArray[i].notes; + } + if (equipmentArray[i].mass !== "") { + tempString += ", Mass: " + equipmentArray[i].mass; + } + if (i < (equipmentArrayIndex + 2)) { + tempString += '\n' + '\n'; + } + } + + if ( (typeof character.treasures != "undefined") && (character.treasures !== "")) { + tempString = character.treasures + '\n' + '\n' + tempString.trim(); + } else { + tempString = tempString.trim(); + } + + setAttrs(object.id, {treasures: tempString}); + + // Show the Treasures Gear Tab slide where the multipower equipment will appear. + setAttrs(object.id, {gearSlideSelection: 3}); + } + + // Prepare object of items that are not weapons or armor. + // Assign to character sheet Equipment List. + + let importedEquipment = new Array(); + importCount = 0; + imported = 0; + + // Prepare Items + for (importCount = 0; importCount < maxEquipment; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + + if (importCount < equipmentListArrayIndex) { + imported += 1; + + // Check for charges. + if (equipmentListArray[importCount].end != "") { + tempString = equipmentListArray[importCount].end; + if (tempString.includes("[")) { + tempString = " (" + parseInt(tempString.replace(/[^\d.-]/g, "")) +")"; + } else { + tempString = ""; + }; + } + + importedEquipment["equipText"+ID] = equipmentListArray[importCount].name; + + // Get item mass. + if (equipmentListArray[importCount].mass !== "") { + tempString = equipmentListArray[importCount].mass; + importedEquipment["equipMass"+ID] = getItemMass(tempString, script_name); + } else { + importedEquipment["equipMass"+ID] = 0; + } + } + } + + // Import equipment. + setAttrs(object.id, importedEquipment); + + if(verbose) { + if (imported === 1) { + sendChat(script_name, "Imported 1 piece of equipment."); + } else { + sendChat(script_name, "Imported "+ imported +" pieces of equipment."); + } + } + + // Prepare objects of weapons. Assign to character sheet Weapon List. + + let importedWeapons = new Array(); + const maxAdvantage = 1; + const maxWeapons = 5; + let tempValue = 0; + + importCount = 0; + imported = 0; + + for (importCount = 0; importCount < maxWeapons; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + + if (importCount < weaponsArrayIndex) { + imported += 1; + + importedWeapons["weaponName"+ID] = weaponsArray[importCount].name; + + // Assign weapon base damage. + importedWeapons["weaponDamage"+ID] = getWeaponDamage(weaponsArray[importCount].damage, script_name); + + tempString = weaponsArray[importCount].text; + if ((typeof tempString !== "undefined") && (tempString !== "")) { + // Look for weapon advantages. + tempValue = findDamageAdvantages(tempString, script_name); + if (tempValue > maxAdvantage) { + importedWeapons["weaponAdvantage"+ID] = maxAdvantage; + } else { + importedWeapons["weaponAdvantage"+ID] = tempValue; + } + + // Check for Killing Attack. + if (tempString.includes("Killing Attack") || tempString.includes("RKA") || tempString.includes("HKA")) { + // importedWeapons.weaponNormalDamage01= "off"; + } else { + importedWeapons["weaponNormalDamage"+ID]= "on"; + } + + // Get OCV bonus or penalty. + importedWeapons["weaponOCV"+ID] = getOCVmodifier(tempString, script_name); + + // Check for range mod adjustment. + if (tempString.includes("vs. Range Modifier")) { + tempPosition=tempString.indexOf("vs. Range Modifier"); + importedWeapons["weaponRangeMod"+ID]= parseInt(tempString.substr(tempPosition-3, 2)); + } else { + importedWeapons["weaponRangeMod"+ID]= 0; + } + + // Check for the thrown weapon advantage. + importedWeapons["rangeBasedOnStr"+ID] = (tempString.includes("Range Based On STR")) ? "on" : 0; + + // Check for modified STUN multiplier. + importedWeapons["weaponStunMod"+ID] = getStunModifier(tempString, script_name); + + // Get STR minimum and apply strength. + importedWeapons["weaponStrengthMin"+ID] = getWeaponStrMin(tempString, script_name); + importedWeapons["weaponEnhancedBySTR"+ID] = ( checkDamageBySTR(tempString, script_name) ? "on" : 0); + importedWeapons["weaponStrength"+ID] = ( importedWeapons["weaponEnhancedBySTR"+ID] === "on" ) ? getWeaponStrength(importedWeapons["weaponStrengthMin"+ID], strength, script_name) : Math.min(getWeaponStrMin(tempString, script_name), character.strength); + + // Check for AoE. + importedWeapons["weaponAreaEffect"+ID] = (tempString.includes("Area Of Effect")) ? "on" : 0; + } + + // Check for charges. + tempString = weaponsArray[importCount].end; + if ((typeof tempString !== "undefined") && (tempString !== "")) { + if (tempString.includes("[")) { + importedWeapons["weaponShots"+ID] = parseInt(tempString.replace(/[^\d.-]/g, "")); + } else { + importedWeapons["weaponShots"+ID] = 0; + } + } + + // Get weapon mass. + if (weaponsArray[importCount].mass !== "") { + tempString = weaponsArray[importCount].mass; + importedWeapons["weaponMass"+ID] = getItemMass(tempString, script_name); + } else { + importedWeapons["weaponMass"+ID] = 0; + } + + // Calculate thrown weapon range or assign range without units. + importedWeapons["weaponRange"+ID] = getWeaponRange(weaponsArray[importCount].range, character.strength, importedWeapons["weaponMass"+ID], script_name); + } + + } + + // Import weapons. + + setAttrs(object.id, importedWeapons); + + if(verbose) { + if (imported === 1) { + sendChat(script_name, "Imported 1 weapon."); + } else { + sendChat(script_name, "Imported "+ imported +" weapons."); + } + } + + // Prepare object of armor defenses. Assign to character sheet Armor List. + + let importedArmor = new Array(); + const maxArmor = 4; // The 4th may be overwritten if the character has resistant protection. + + importCount = 0; + imported = 0; + + for (importCount = 0; importCount < maxArmor; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + tempString = "none"; + + if (importCount < armorArrayIndex) { + imported += 1; + + importedArmor["armorName"+ID] = armorArray[importCount].name; + + // Find resistant protection values. + // This needs to be adjusted so that it doesn't pick out other PD/ED stats from elsewhere in the text. + if (typeof armorArray[importCount].text !== "undefined") { + tempString = armorArray[importCount].text; + } + + if (tempString.includes("Resistant Protection")) { + tempPosition = tempString.indexOf("Resistant Protection"); + sampleSize = 14; + subStringA = tempString.substr(tempPosition+20, sampleSize); + + if (subStringA.includes("PD")) { + tempPosition = subStringA.indexOf("PD"); + subStringB = subStringA.slice(Math.max(0, tempPosition-3), tempPosition); + importedArmor["armorPD"+ID] = parseInt(subStringB.replace(/[^\d.-]/g, "")); + importedArmor["totalPD"+ID] = importedArmor["armorPD"+ID] + parseInt(character.pd); + } else { + importedArmor["armorPD"+ID] = 0; + importedArmor["totalPD"+ID] = parseInt(character.pd); + }; + + if (subStringA.includes("ED")) { + tempPosition = subStringA.indexOf("ED"); + subStringB = subStringA.slice(Math.max(0, tempPosition-3), tempPosition); + importedArmor["armorED"+ID] = parseInt(subStringB.replace(/[^\d.-]/g, "")); + importedArmor["totalED"+ID] = importedArmor["armorED"+ID] + parseInt(character.ed); + } else { + importedArmor["armorED"+ID] = 0; + importedArmor["totalED"+ID] = parseInt(character.ed); + }; + }; + + // Activation roll + tempString = armorArray[importCount].text; + + if (tempString.includes("Requires A Roll")) { + tempPosition = tempString.indexOf("Requires A Roll"); + + sampleSize = 4; + subStringA = tempString.substr(tempPosition+15, sampleSize); + subStringB = subStringA.replace(/[^\d]/g, ""); + importedArmor["armorActivation"+ID] = parseInt(subStringB); + } + + // Armor locations. Sometimes locations are stored in the notes field. + if (armorArray[importCount].notes !== "") { + tempString += ", " + armorArray[importCount].notes; + } + importedArmor["armorLocations"+ID] = getArmorLocations(tempString, script_name); + importedArmor["armorEND"+ID] = getArmorEND(tempString, script_name); + + // Get armor mass. + if (armorArray[importCount].mass !== "") { + tempString = armorArray[importCount].mass; + importedArmor["armorMass"+ID] = getItemMass(tempString, script_name); + } else { + importedArmor["armorMass"+ID] = 0; + } + } + } + + // Import armor. + + setAttrs(object.id, importedArmor); + + if(verbose) { + if (imported === 1) { + sendChat(script_name, "Imported 1 piece of armor."); + } else { + sendChat(script_name, "Imported " + imported + " pieces of armor."); + } + } + + // Identify independent multipowers. + let equipmentMultipowers = []; + let shieldSearchIndex; + + for (let i=0; i< multipowerArray.length; i++) { + //sendChat(script_name, "Multipower search "+ i +"."); + if (multipowerArray[i].name.includes("Multipower")) { + equipmentMultipowers.push(i); + } + } + + // Find first shield if any. + let shieldFound = false; + let importedShield = new Array(); + let shieldID = "06"; + + for (let i=0; i < equipmentMultipowers.length; i++) { + // Get next multipower index. + shieldSearchIndex=equipmentMultipowers[i]; + tempString = multipowerArray[shieldSearchIndex].name; + tempString = tempString.toLowerCase(); + + if ( (tempString.includes("shield") || tempString.includes("buckler")) && !shieldFound) { + // Shield found + shieldFound = true; + + if(verbose) { + if (equipmentMultipowers !== "undefined") { + sendChat(script_name, "Found shield multipower."); + } + } + + // Get shield name. + importedShield["weaponName"+shieldID] = multipowerArray[shieldSearchIndex].name.replace("(Multipower)",""); + + // Get STR minimum. + tempString = multipowerArray[shieldSearchIndex].text; + importedShield["weaponStrengthMin"+shieldID] = getWeaponStrMin(tempString, script_name); + + // Get weapon mass. + if (multipowerArray[shieldSearchIndex].mass !== "") { + tempString = multipowerArray[shieldSearchIndex].mass; + importedShield.shieldMass = getItemMass(tempString, script_name); + } else { + importedShield.shieldMass = 0; + } + + // Search for multipower slot that grants DCV. + let foundShieldDCV = false; + + if (i+2 > equipmentMultipowers.length) { + // Shield is the last multipower in the list. + for (let j = shieldSearchIndex; j equipmentMultipowers.length) { + // Shield is the last multipower in the list. + for (let j = shieldSearchIndex; j equipmentMultipowers.length) { + // Item is the last multipower in the list. + for (let j = shieldSearchIndex; j 0) { + + for (importCount = 0; importCount < maxImport; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + + importedTalents["talentName"+ID] = perksAndTalentsArray[importCount].type; + importedTalents["talentText"+ID] = perksAndTalentsArray[importCount].text; + importedTalents["talentCP"+ID] = perksAndTalentsArray[importCount].points; + + if (typeof importedTalents["talentText"+ID] !== "undefined") { + + tempString = importedTalents["talentText"+ID]; + + + // Many of the following roll chances won't be used, but are here for completeness. + + if (tempString.includes("10-")) { + importedTalents["talentRollChance"+ID] = 10; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("11-")) { + importedTalents["talentRollChance"+ID] = 11; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("12-")) { + importedTalents["talentRollChance"+ID] = 12; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("13-")) { + importedTalents["talentRollChance"+ID] = 13; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("14-")) { + importedTalents["talentRollChance"+ID] = 14; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("15-")) { + importedTalents["talentRollChance"+ID] = 15; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("16-")) { + importedTalents["talentRollChance"+ID] = 16; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("17-")) { + importedTalents["talentRollChance"+ID] = 17; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("18-")) { + importedTalents["talentRollChance"+ID] = 18; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("19-")) { + importedTalents["talentRollChance"+ID] = 19; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("20-")) { + importedTalents["talentRollChance"+ID] = 20; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("21-")) { + importedTalents["talentRollChance"+ID] = 21; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("3-")) { + importedTalents["talentRollChance"+ID] = 3; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("4-")) { + importedTalents["talentRollChance"+ID] = 4; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("5-")) { + importedTalents["talentRollChance"+ID] = 5; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("6-")) { + importedTalents["talentRollChance"+ID] = 6; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("7-")) { + importedTalents["talentRollChance"+ID] = 7; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("8-")) { + importedTalents["talentRollChance"+ID] = 8; + importedTalents["talentActivate"+ID] = "on"; + } else if (tempString.includes("9-")) { + importedTalents["talentRollChance"+ID] = 9; + importedTalents["talentActivate"+ID] = "on"; + } + + if ( tempString.includes("d6") ) { + tempPosition = tempString.indexOf("d6") + diceString = tempString.slice(0, tempPosition); + diceString = diceString.slice(-2).replace(/\D/g,"") + "d6"; + importedTalents["talentDice"+ID] = diceString; + } else { + importedTalents["talentDice"+ID] = "0"; + } + } + } + + // Display additional perks and talents in the complications text box. + if (perksAndTalentsIndex > maxCombinedSheet) { + let i = maxCombinedSheet; + let extras = 0; + + for (let i = maxCombinedSheet; i= 1.2) ? 10 : 0; + + let tempString; + let damageString; + let tempPosition; + let tempValue = 0; + let endPosition; + let subStringA; + let subStringB; + let subStringC; + let theEffect = ""; + let sampleSize; + let control = 0; + let base = 0; + let active = 0; + let cost = 0; + let advantages = 0; + let limitations = 0; + let count = 0; + let ID = ""; + + let testObject = { + testString : "", + testEndurance : 0, + powerReducedEND : "standard" + } + + var tempObject = new Object(); + + // Overall list of powers + var importedPowers = new Object(); + let powerArray = new Array(); + let powerArrayIndex = 0; + + let importCount = 0; + + /* ------------------------- */ + /* Read Powers */ + /* ------------------------- */ + + for (importCount; importCount < maxPowers; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + + if ((typeof character.powers["power"+ID] !== "undefined") && (typeof character.powers["power"+ID].name !== "undefined")) { + + tempString = character.powers["power"+ID].name; + + if (tempString.includes("(VPP)")) { + // Varriable Power Pool found. + // The pool needs to be split into control and base parts. + tempString = character.powers["power"+ID].text; + subStringA = tempString.toLowerCase(); + + if (subStringA.includes("base")) { + subStringA = subStringA.slice(tempString.indexOf("base")-4, tempString.indexOf("base")); + subStringA = subStringA.replace(/\D/g, ''); + base = Number(subStringA); + } else { + // Error + base = 0; + } + + control = Math.round(base/2); + + character.powers["power"+ID].base = heroRoundDown(control, 2); + + // Create entry for Control Cost + powerArray[powerArrayIndex]={ + name: character.powers["power"+ID].name + "(control)", + base: control.toString(), + text: character.powers["power"+ID].text, + cost: control.toString(), + endurance: character.powers["power"+ID].endurance, + damage: character.powers["power"+ID].damage, + compound: false + } + powerArrayIndex++; + + // Create entry for Pool Cost + powerArray[powerArrayIndex]={ + name: character.powers["power"+ID].name, + base: base.toString(), + text: JSON.stringify(base) + "-point Power Pool.", + cost: base.toString(), + endurance: character.powers["power"+ID].endurance, + damage: character.powers["power"+ID].damage, + compound: false + } + powerArrayIndex++; + + } else if (tempString.includes("(Multipower)") || tempString.includes("(MPSlot")) { + // Import multipower or multipower slot. + powerArray[powerArrayIndex]=character.powers["power"+ID]; + + powerArrayIndex++; + } else if (character.powers["power"+ID].compound === "true") { + // Check for compound power and import sub power part separately if found. + + tempString = character.powers["power"+ID].text; + count = (tempString.match(/plus/g) || []).length+1; + + // Remove total costs. + if (tempString.includes("(Total:")) { + tempString = tempString.substring(tempString.indexOf(" Real Cost)") + 12); + } + + if(verbose) { + sendChat(script_name, "Compound power with " + JSON.stringify(count) + " parts."); + } + + damageString = character.powers["power"+ID].damage + for (let i=0; i 0) { + + for (importCount = 0; importCount < maxImport; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + + // First fix some known typos. + powerArray[importCount].text = fixKnownSpellingErrors(powerArray[importCount].text, script_name); + + // Assign power effect type. + theEffect = findEffectType(powerArray[importCount].text, script_name); + importedPowers["powerEffect"+ID] = theEffect; + + // If the power does not have a name assign it the effect type. + if (powerArray[importCount].name === "") { + importedPowers["powerName"+ID] = importedPowers["powerEffect"+ID]; + } else { + importedPowers["powerName"+ID] = powerArray[importCount].name; + } + + // Special cases or base cost. + tempCostArray = getPowerBaseCost(character, powerArray[importCount].base, theEffect, powerArray[importCount].text, bonusCP, importedPowers.optionTakesNoSTUN, script_name); + importedPowers["powerBaseCost"+ID] = tempCostArray[0]; + bonusCP = tempCostArray[1]; + + // Determine endurance type, advantages, and limitations. + testObject.testString = powerArray[importCount].text; + testObject.testEndurance = powerArray[importCount].endurance; + + // Get powerReducedEND level and separate endurance limitation or advantage cost. + testObject = findEndurance(testObject); + importedPowers["powerReducedEND"+ID] = testObject.powerReducedEND; + + // Find advantages and limitations values. + importedPowers["powerAdvantages"+ID] = findAdvantages(testObject.testString); + importedPowers["powerLimitations"+ID] = findLimitations(testObject.testString); + importedPowers["powerDamageAdvantage"+ID] = findDamageAdvantages(testObject.testString, script_name); + importedPowers["powerAoE"+ID] = isAoE(testObject.testString) ? "on" : 0; + + // Power descriptions + importedPowers["powerText"+ID] = (powerArray[importCount].text).trim(); + if ( (character.version >= 2.1) && (typeof powerArray[importCount].notes !== "undefined") ) { + importedPowers["powerText"+ID] += '\n'+'\n'+(powerArray[importCount].notes).trim(); + } + + // Search for skill roll. + tempObject = requiresRoll(testObject.testString); + importedPowers["powerActivate"+ID] = tempObject.hasRoll ? "on" : 0; + importedPowers["powerSkillRoll"+ID] = tempObject.hasRoll ? tempObject.skillRoll : 18; + + // Search for reduced DCV due to the Concentration limitation. + importedPowers["powerDCV"+ID] = reducedDCV(testObject.testString); + + // Search for zero, half, or full range modifiers. + importedPowers["powerRMod"+ID] = reducedRMod(testObject.testString); + + // Search for a STUNx mod. + importedPowers["powerStunMod"+ID] = modifiedSTUNx(testObject.testString); + + // Assign effect dice. + importedPowers["powerDice"+ID] = getPowerDamage(powerArray[importCount].damage, theEffect, character.strength, script_name); + + // Find and assign power type. Remove export notes from names. + tempString = powerArray[importCount].name; + if (tempString.includes("(Multipower)")) { + // Remove note from name. + importedPowers["powerName"+ID] = tempString.replace("(Multipower) ", ""); + importedPowers["powerType"+ID] = "multipower"; + importedPowers["powerEffect"+ID] = "Multipower"; + } else if (tempString.includes("(MPSlot")) { + subStringA = powerArray[importCount].cost; + if (subStringA.includes("v")) { + // Remove note from name. + importedPowers["powerName"+ID] = tempString.replace("(MPSlot", ""); + importedPowers["powerType"+ID] = "variableSlot"; + } else { + // Remove note from name. + importedPowers["powerName"+ID] = tempString.replace("(MPSlot", ""); + importedPowers["powerType"+ID] = "fixedSlot"; + } + } else if (tempString.includes("(VPP)")) { + if (tempString.includes("control")) { + // Remove notes from name. + tempString = tempString.replace("(VPP) ", ""); + importedPowers["powerName"+ID] = tempString.replace("(control)", ""); + importedPowers["powerType"+ID] = "powerPool"; + importedPowers["powerEffect"+ID] = "VPP Control"; + importedPowers["powerAction"+ID] = "false"; + importedPowers["powerBaseCost"+ID] = powerArray[importCount].base; + } else { + // Remove note from name. + importedPowers["powerName"+ID] = tempString.replace("(VPP) ", ""); + importedPowers["powerType"+ID] = "powerPool"; + importedPowers["powerEffect"+ID] = "VPP Pool"; + importedPowers["powerAction"+ID] = "false"; + } + } else if (powerArray[importCount].compound === true) { + importedPowers["powerType"+ID] = "compound"; + } else if ( (typeof powerArray[importCount].text != "undefined") && (powerArray[importCount].text != "") && ((powerArray[importCount].text).includes("Unified Power")) ) { + importedPowers["powerType"+ID] = "unified"; + } else { + importedPowers["powerType"+ID] = "single"; + } + + // Set attack checkbox for attacks. + importedPowers["powerAttack"+ID] = isAttack(theEffect) ? "on" : 0; + + // Set power type. + importedPowers["powerDamageType"+ID] = getPowerDamageType(theEffect); + + // If Power's effect is Resistant Protection create armor in Armor Slot 4 with a combination of ED and PD. + tempString = (powerArray[importCount].text).toLowerCase(); + + if (theEffect === "Resistant Protection") { + if ( (typeof powerArray[importCount].text != "undefined") && (powerArray[importCount].text != "") ) { + if(verbose) { + sendChat(script_name, "Created Resistant Protection armor."); + } + + tempValue = getResistantPD(powerArray[importCount].text, script_name); + if (tempValue > 0) { + charMod.armorPD04 += tempValue; + if ( (specialArray.some(v => tempString.includes(v))) != true) { + // We don't want to add overall modifications for special cases. + charMod.pdMod += tempValue; + } + if (!pdAddedToTotal) { + charMod.totalPD04 = tempValue + parseInt(character.pd); + pdAddedToTotal = true; + } else { + charMod.totalPD04 += tempValue; + } + charMod.armorName04 = importedPowers["powerName"+ID]; + charMod.armorLocations04 = "3-18"; + tempObject = (requiresRoll(powerArray[importCount].text)); + if (tempObject.hasRoll) { + charMod.armorActivation04 = tempObject.skillRoll; + } else { + charMod.armorActivation04 = 18; + } + } + + tempValue = getResistantED(powerArray[importCount].text, script_name); + if (tempValue > 0) { + charMod.armorED04 += tempValue; + if ( (specialArray.some(v => tempString.includes(v))) != true) { + // We don't want to add overall modifications for special cases. + charMod.edMod += tempValue; + } + if (!edAddedToTotal) { + charMod.totalED04 = tempValue + parseInt(character.ed); + edAddedToTotal = true; + } else { + charMod.totalED04 += tempValue; + } + charMod.armorName04 = importedPowers["powerName"+ID]; + charMod.armorLocations04 = "3-18"; + tempObject = (requiresRoll(powerArray[importCount].text)); + if (tempObject.hasRoll) { + charMod.armorActivation04 = tempObject.skillRoll; + } else { + charMod.armorActivation04 = 18; + } + } + } + } else if (theEffect === "Base PD Mod") { + if ( (typeof powerArray[importCount].text != "undefined") && (powerArray[importCount].text != "") ) { + if(verbose) { + sendChat(script_name, "Added Resistant PD to armor."); + } + + if ( (powerArray[importCount].text).includes("Resistant")) { + charMod.armorPD04 += parseInt(character.pd); + if (!pdAddedToTotal) { + charMod.totalPD04 += parseInt(character.pd); + pdAddedToTotal = true; + } + charMod.armorName04 = importedPowers["powerName"+ID]; + charMod.armorLocations04 = "3-18"; + tempObject = (requiresRoll(powerArray[importCount].text)); + if (tempObject.hasRoll) { + charMod.armorActivation04 = tempObject.skillRoll; + } else { + charMod.armorActivation04 = 18; + } + } + } + } else if (theEffect === "Base ED Mod") { + if ( (typeof powerArray[importCount].text != "undefined") && (powerArray[importCount].text != "") ) { + if(verbose) { + sendChat(script_name, "Added Resistant ED to armor."); + } + + if ( (powerArray[importCount].text).includes("Resistant") ) { + charMod.armorED04 += parseInt(character.ed); + if (!edAddedToTotal) { + charMod.totalED04 += parseInt(character.ed); + edAddedToTotal = true; + } + charMod.armorName04 = importedPowers["powerName"+ID]; + charMod.armorLocations04 = "3-18"; + tempObject = (requiresRoll(powerArray[importCount].text)); + if (tempObject.hasRoll) { + charMod.armorActivation04 = tempObject.skillRoll; + } else { + charMod.armorActivation04 = 18; + } + } + } + } + + // Apply characteristic mods granted by enhancement powers or movement. + tempString = powerArray[importCount].text; + + if ( (typeof tempString != "undefined") && (tempString != "") ) { + switch (theEffect) { + case "Base STR Mod": if (tempString.includes("0 END")) { + importedPowers["optionUntiring"] = "on"; + } + break; + case "Running": charMod.runningMod += getCharacteristicMod(tempString, "Running", script_name); + break; + case "Leaping": charMod.leapingMod += getCharacteristicMod(tempString, "Leaping", script_name); + break; + case "Swimming": charMod.swimmingMod += getCharacteristicMod(tempString, "Swimming", script_name); + break; + case "Flight": charMod.flightMod += getCharacteristicMod(tempString, "Flight", script_name); + break; + case "Enhanced STR": charMod.strengthMod += getCharacteristicMod(tempString, "STR", script_name); + break; + case "Enhanced DEX": charMod.dexterityMod += getCharacteristicMod(tempString, "DEX", script_name); + break; + case "Enhanced CON": charMod.constitutionMod += getCharacteristicMod(tempString, "CON", script_name); + break; + case "Enhanced INT": charMod.intelligenceMod += getCharacteristicMod(tempString, "INT", script_name); + break; + case "Enhanced EGO": charMod.egoMod += getCharacteristicMod(tempString, "EGO", script_name); + break; + case "Enhanced PRE": charMod.presenceMod += getCharacteristicMod(tempString, "PRE", script_name); + break; + case "Enhanced OCV": charMod.ocvMod += getCharacteristicMod(tempString, "OCV", script_name); + break; + case "Enhanced DCV": charMod.dcvMod += getCharacteristicMod(tempString, "DCV", script_name); + break; + case "Enhanced OMCV": charMod.omcvMod += getCharacteristicMod(tempString, "OMCV", script_name); + break; + case "Enhanced DMCV": charMod.dmcvMod += getCharacteristicMod(tempString, "DMCV", script_name); + break; + case "Enhanced BODY": charMod.bodyMod += getCharacteristicMod(tempString, "BODY", script_name); + break; + case "Enhanced PD": charMod.pdMod += getCharacteristicMod(tempString, "PD", script_name); + break; + case "Enhanced ED": charMod.edMod += getCharacteristicMod(tempString, "ED", script_name); + break; + case "Enhanced STUN": charMod.stunMod += getCharacteristicMod(tempString, "STUN", script_name); + break; + case "Enhanced END": charMod.endMod += getCharacteristicMod(tempString, "END", script_name); + break; + case "Enhanced REC": charMod.recMod += getCharacteristicMod(tempString, "REC", script_name); + break; + case "Enhanced PER": if ( tempString.includes("all Sense") ) { + charMod.enhancedPerceptionModifier += getCharacteristicMod(tempString, "PER", script_name); + if ( (tempString.includes("except Sight")) || (tempString.includes("but Sight")) ) { + charMod.perceptionModifierVision += -getCharacteristicMod(tempString, "PER", script_name); + } + if ( (tempString.includes("except Hearing")) || (tempString.includes("but Hearing")) ) { + charMod.perceptionModifierHearing += -getCharacteristicMod(tempString, "PER", script_name); + } + if ( (tempString.includes("except Smell")) || (tempString.includes("but Smell")) ) { + charMod.perceptionModifierSmell += -getCharacteristicMod(tempString, "PER", script_name); + } + } else { + charMod.perceptionModifierVision += (tempString.includes("Sight")) ? getCharacteristicMod(tempString, "PER", script_name) : 0; + charMod.perceptionModifierHearing += (tempString.includes("Hearing")) ? getCharacteristicMod(tempString, "PER", script_name) : 0; + charMod.perceptionModifierSmell += (tempString.includes("Smell")) ? getCharacteristicMod(tempString, "PER", script_name) : 0; + if ( !(tempString.includes("Sight")) && !(tempString.includes("Hearing")) && !(tempString.includes("Smell")) ) { + charMod.enhancedPerceptionModifier += getCharacteristicMod(tempString, "PER", script_name); + } + } + break; + default: break; + } + } + } + } + + // Display additional powers in the talents text box. + tempString = ""; + if (powerArrayIndex > maxPowers) { + let extras = 0; + + for (let i = maxPowers; i < powerArrayIndex; i++) { + tempString += powerArray[i].name + "\n"; + if (powerArray[i].damage !== "") { + tempString += " Damage: " + powerArray[i].damage + "\n"; + } + tempString += " END: " + powerArray[i].endurance + "\n"; + tempString += " Base CP: " + powerArray[i].base + ", " + " Real CP: " + powerArray[i].cost + "\n"; + tempString += powerArray[i].text + "\n" + "\n"; + extras++; + } + + if(verbose) { + sendChat(script_name, extras + " powers placed in notes."); + } + + importedPowers.complicationsTextLeft = tempString; + } + + // Import powers and bonus points to sheet. + importedPowers.bonusBenefit = bonusCP; + + const importedPowersAndMods = Object.assign({}, importedPowers, charMod); + setAttrs(object.id, importedPowersAndMods); + + if(verbose) { + if (powerArrayIndex === 1) { + sendChat(script_name, "Imported 1 power."); + } else { + sendChat(script_name, "Imported " + powerArrayIndex + " powers."); + } + } + + return tempString.trim(); + }; + + + var importComplications = function(object, character, script_name) { + + /* ************************************************* */ + /* *** Import Function: Import Complications *** */ + /* ************************************************* */ + + // Imports the first six complications. + let importCount = 0; + let imported = 0; + let ID = ""; + let tempString = ""; + let diceString = ""; + let tempPosition = 0; + const maxComplications = 10; + const maxOverflow = 10; + let overflowString = ""; + var importedComplications = new Object(); + + /* ------------------------- */ + /* Read Complications */ + /* ------------------------- */ + + for (importCount = 0; importCount < maxComplications + maxOverflow; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + + if (importCount < maxComplications) { + if ((typeof character.complications["complication"+ID] !== "undefined") && (typeof character.complications["complication"+ID].type !== "undefined")) { + importedComplications["complicationName"+ID] = character.complications["complication"+ID].type; + importedComplications["complicationText"+ID] = character.complications["complication"+ID].text + '\n' + character.complications["complication"+ID].notes; + importedComplications["complicationCP"+ID] = character.complications["complication"+ID].points; + + // Type + tempString = character.complications["complication"+ID].type; + tempString = tempString.toLowerCase(); + + if (tempString.includes("accidental change")) { + importedComplications["complicationType"+ID] = "accidental"; + } else if (tempString.includes("dependence")) { + importedComplications["complicationType"+ID] = "dependence"; + } else if (tempString.includes("dependent")) { + importedComplications["complicationType"+ID] = "dependent"; + } else if (tempString.includes("distinctive")) { + importedComplications["complicationType"+ID] = "distinctive"; + } else if ((tempString.includes("enraged")) || (tempString.includes("berserk"))) { + importedComplications["complicationType"+ID] = "enraged"; + } else if (tempString.includes("hunted")) { + importedComplications["complicationType"+ID] = "hunted"; + } else if (tempString.includes("reputation")) { + importedComplications["complicationType"+ID] = "reputation"; + } else if (tempString.includes("physical")) { + importedComplications["complicationType"+ID] = "physical"; + } else if (tempString.includes("psychological")) { + importedComplications["complicationType"+ID] = "psychological"; + } else if (tempString.includes("rival")) { + importedComplications["complicationType"+ID] = "rival"; + } else if (tempString.includes("social")) { + importedComplications["complicationType"+ID] = "social"; + } else if (tempString.includes("susceptibility")) { + importedComplications["complicationType"+ID] = "susceptibility"; + } else if (tempString.includes("unluck")) { + importedComplications["complicationType"+ID] = "unluck"; + } else if (tempString.includes("vulnerability")) { + importedComplications["complicationType"+ID] = "vulnerability"; + } else { + importedComplications["complicationType"+ID] = "custom"; + } + + // Activation Roll + tempString = character.complications["complication"+ID].text + " " + character.complications["complication"+ID].notes; + tempString = tempString.toLowerCase(); + + // Most of these roll options will never be used, but are here for completeness. + + if (tempString.includes("10-")) { + importedComplications["complicationRollChance"+ID] = 10; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("11-")) { + importedComplications["complicationRollChance"+ID] = 11; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("12-")) { + importedComplications["complicationRollChance"+ID] = 12; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("13-")) { + importedComplications["complicationRollChance"+ID] = 13; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("14-")) { + importedComplications["complicationRollChance"+ID] = 14; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("15-")) { + importedComplications["complicationRollChance"+ID] = 15; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("16-")) { + importedComplications["complicationRollChance"+ID] = 16; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("17-")) { + importedComplications["complicationRollChance"+ID] = 17; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("18-")) { + importedComplications["complicationRollChance"+ID] = 18; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("3-")) { + importedComplications["complicationRollChance"+ID] = 3; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("4-")) { + importedComplications["complicationRollChance"+ID] = 4; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("5-")) { + importedComplications["complicationRollChance"+ID] = 5; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("6-")) { + importedComplications["complicationRollChance"+ID] = 6; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("7-")) { + importedComplications["complicationRollChance"+ID] = 7; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("8-")) { + importedComplications["complicationRollChance"+ID] = 8; + importedComplications["complicationActivate"+ID] = "on"; + } else if (tempString.includes("9-")) { + importedComplications["complicationRollChance"+ID] = 9; + importedComplications["complicationActivate"+ID] = "on"; + } + + // Dice + if ( tempString.includes("d6") ) { + tempPosition = tempString.indexOf("d6") + diceString = tempString.slice(0, tempPosition); + diceString = diceString.slice(-2).replace(/\D/g,"") + "d6"; + importedComplications["complicationDice"+ID] = diceString; + } else { + importedComplications["complicationDice"+ID] = "0"; + } + + imported += 1; + } + } else if (importCount < maxComplications + maxOverflow) { + if ((typeof character.complications["complication"+ID] !== "undefined") && (typeof character.complications["complication"+ID].type !== "undefined")) { + overflowString += character.complications["complication"+ID].type + '\n'; + overflowString += character.complications["complication"+ID].text + '\n' + character.complications["complication"+ID].notes + '\n'; + overflowString += "("+character.complications["complication"+ID].points + " points)\n\n"; + + imported += 1; + } + } + } + + importedComplications["complicationsTextRight"] = overflowString; + + if(verbose) { + if (imported === 1) { + sendChat(script_name, "Imported 1 complication."); + } else { + sendChat(script_name, "Imported " + imported + " complications."); + } + } + + // Import complications to sheet. + setAttrs(object.id, importedComplications); + + return; + }; + + + var importAllSkills = function(object, character, script_name) { + + /* ************************************************* */ + /* *** Import Function: Import Skills *** */ + /* ************************************************* */ + + // Struct for counting processed skills. + + let sheetSkillIndexes={ + skillIndex: 0, + generalSkillIndex: 0, + combatSkillIndex: 0, + languageSkillIndex: 0 + } + + const maxSkills = 50; + + for (let importCount = 0; importCount < maxSkills; importCount++) { + + ID = String(importCount+1).padStart(2,'0'); + + if (typeof character.skills["skill"+ID] !== "undefined") {sheetSkillIndexes = importSkill(object, character, script_name, sheetSkillIndexes, character.skills["skill"+ID]);} + } + + return; + }; + + + /* ------------------------- */ + /* Import Helper Functions */ + /* ------------------------- */ + + var cleanQuotes = function(inputString, script_name) { + // Look for double quotes in text that shouldn't be there. Remove them. + + let detailString; + let cleanString; + let frontMatter; + let backMatter; + let startPosition; + let endPosition; + let count = 0; + let matches = 0; + let engagePosition = inputString.indexOf('\"backgroundText\":\"'); + let exitPosition = inputString.indexOf('\"experience\":') - 10; + + for (let i = engagePosition; i < exitPosition; i+=1) { + startPosition = inputString.indexOf('\":\"', i)+1; + endPosition = inputString.indexOf('\", \"', i); + detailString = inputString.slice(startPosition+2, endPosition); + matches = detailString.match(/["]/g); + count = matches ? matches.length : 0; + + if (matches) { + frontMatter = inputString.slice(0, startPosition+2); + backMatter = inputString.slice(endPosition+1); + cleanString = detailString.replace(/["]+/g, ""); + inputString = frontMatter + cleanString + '\"' + backMatter; + + exitPosition -= count; + } + + i += detailString.length - count; + } + + return inputString; + } + + + var importSkill = function(object, character, script_name, sheetSkillIndexes, theSkill) { + // Assign skill to general, combat, language, enhancer, etc. + + if (Object.keys(theSkill).length === 0) { + // Empty Skill. + return sheetSkillIndexes; + + } else if (theSkill.enhancer === "true") { + // Invoke Skill Enhancer Function + importSkillEnhancer(object, character, script_name, theSkill.text); + + } else if (theSkill.display === "Language") { + // Call import language function. + importLanguage(object, character, script_name, theSkill, sheetSkillIndexes.languageSkillIndex); + sheetSkillIndexes.languageSkillIndex++; + + } else if (theSkill.display === "Combat Skill Levels"){ + // Import weapon levels. The combat skill index may or may not be increased. + // This needs to be decided by the function as more general skill levels + // use prepared slots on the character sheet. + sheetSkillIndexes.combatSkillIndex = importWeaponSkill(object, character, script_name, theSkill, sheetSkillIndexes.combatSkillIndex); + + } else if (theSkill.display === "Penalty Skill Levels") { + // Import penalty skill levels. + sheetSkillIndexes.combatSkillIndex = importWeaponSkill(object, character, script_name, theSkill, sheetSkillIndexes.combatSkillIndex); + + } else if (theSkill.display === ("Weapon Familiarity")) { + // Weapon familiarity skill line. + // There should be only one line since Hero Designer lumps them together. + // We need to break them up. + let tempString = theSkill.text; + tempString = tempString.replace(/\s\s+/g, " "); + tempString = tempString.replace("WF: ", ""); + let weaponFamArrayLength = (tempString.split(",").length - 1); + let weaponFamArray = new Array(weaponFamArrayLength); + + for (let i = 0; i <= weaponFamArrayLength; i++) { + // Split up string into weapon groups. + if (i < weaponFamArrayLength) { + // Get first weapon group before a comma. + weaponFamArray[i] = tempString.substr(0, tempString.indexOf(",")); + + // Remove that weapon group from the string. + tempString = tempString.replace(weaponFamArray[i] + ", ", ""); + } else { + // There is only one group left to get. + weaponFamArray[i] = tempString; + } + } + + // Process the skills in weaponFamArray as individual skills. + // The combatSkillIndex will advance each time. + for (let i = 0; i <= weaponFamArrayLength; i++) { + let tempSkill = { + name: "", + enhancer: "", + text: weaponFamArray[i], + display:"Weapon Familiarity", + cost: 0 + } + if (tempSkill.text.includes("Common") || tempSkill.text.includes("Small Arms") || tempSkill.text.includes("Emplaced Weapons") || tempSkill.text.includes("Beam Weapons") || tempSkill.text.includes("Energy Weapons") || tempSkill.text.includes("Early Firearms") || tempSkill.text.includes("Siege Engines")) { + tempSkill.cost = 2; + } else { + tempSkill.cost = 1; + } + + sheetSkillIndexes.combatSkillIndex = importWeaponSkill(object, character, script_name, tempSkill, sheetSkillIndexes.combatSkillIndex); + } + } else if (theSkill.display === ("Transport Familiarity")) { + // Transport familiarity skill line. + // There should be only one line since Hero Designer lumps them together. + // We need to break them up. + let tempString = theSkill.text; + tempString = tempString.replace(/\s\s+/g, " "); + tempString = tempString.replace("TF: ", ""); + let transportFamArrayLength = (tempString.split(",").length - 1); + let transportFamArray = new Array(transportFamArrayLength); + + for (let i = 0; i <= transportFamArrayLength; i++) { + // Split up string into transport groups. + if (i < transportFamArrayLength) { + // Get first weapon group before a comma. + transportFamArray[i] = tempString.substr(0, tempString.indexOf(",")); + + // Remove that weapon group from the string. + tempString = tempString.replace(transportFamArray[i]+", ", ""); + } else { + // There is only one group left to get. + transportFamArray[i] = tempString; + } + } + + // Process the skills in transportFamArray as individual skills. + // The generalSkillIndex will advance each time. + for (let i = 0; i <= transportFamArrayLength; i++) { + let tempSkill = { + name: transportFamArray[i], + enhancer: "", + text: "TF: " + transportFamArray[i], + display:"Transport Familiarity", + cost: 1 + } + + // Find 2-point TF groups. + if (tempSkill.text.includes("Common") || tempSkill.text.includes("Riding") || tempSkill.text.includes("Space Vehicles") || tempSkill.text.includes("Mecha")) { + tempSkill.cost = 2; + } + + sheetSkillIndexes.generalSkillIndex = importGeneralSkill(object, character, script_name, tempSkill, sheetSkillIndexes.generalSkillIndex); + } + } else if (theSkill.display === "Skill Levels") { + // Import non-combat skill levels. + // Groups of three skills will be a challenge. + + if (theSkill.text.includes("three pre-defined Skills")) { + // This type of skill level is recorded along with general skills. + sheetSkillIndexes.generalSkillIndex = importGeneralSkill(object, character, script_name, theSkill, sheetSkillIndexes.generalSkillIndex); + } else if (parseInt(theSkill.cost/theSkill.levels) === 3) { + // This type of skill level is recorded along with general skills. + + sheetSkillIndexes.generalSkillIndex = importGeneralSkill(object, character, script_name, theSkill, sheetSkillIndexes.generalSkillIndex); + } else { + importSkillLevels(object, character, script_name, theSkill); + } + } else { + // Import general skill + + sheetSkillIndexes.generalSkillIndex = importGeneralSkill(object, character, script_name, theSkill, sheetSkillIndexes.generalSkillIndex); + } + + sheetSkillIndexes.skillIndex++; + + return sheetSkillIndexes; + } + + + var importSkillEnhancer = function(object, character, script_name, enhancerString) { + // This function is called when a skill is identified as an enhancer. + // The skills' text will determine which enhancer it is. + let enhancer; + + switch(enhancerString) { + case "Jack of All Trades": + enhancer = { + enhancerJack: "on", + enhancerJackCP: 3 + } + break; + case "Linguist": + enhancer = { + enhancerLing: "on", + enhancerLingCP: 3 + } + break; + case "Scholar": + enhancer = { + enhancerSch: "on", + enhancerSchCP: 3 + } + break; + case "Scientist": + enhancer = { + enhancerSci: "on", + enhancerSciCP: 3 + } + break; + case "Traveler": + enhancer = { + enhancerTrav: "on", + enhancerTravCP: 3 + } + break; + default: + // Well-Connected + enhancer = { + enhancerWell: "on", + enhancerWellCP: 3 + } + } + + setAttrs(object.id, enhancer); + + return; + } + + + var importLanguage = function(object, character, script_name, languageObject, languageIndex) { + // This function is called when a skill is identified as an enhancer. + // The skills' text will determine which enhancer it is. + // let languages; + + let language; + let name = languageObject.name; + let tempString = languageObject.text; + if (name === "") { + if (tempString.includes("Language:")) { + name = tempString.replace("Language:", ""); + } + if (name.includes("(") && name.includes(")")) { + let endPosition = name.indexOf("("); + name = name.slice(0, endPosition-1); + } + } + + let fluency; + let literacy; + let cost = languageObject.cost; + + // Determine fluency. + if (tempString.includes("native")) { + fluency = "native"; + } else if (cost == 0) { + fluency = "native"; + } else if ((cost == 1) && (tempString.includes("literate"))) { + fluency = "native"; + } else if (tempString.includes("basic")) { + fluency = "basic"; + } else if (tempString.includes("completely")) { + fluency = "accent"; + } else if (tempString.includes("fluent")) { + fluency = "fluent"; + } else if (tempString.includes("idiomatic")) { + fluency = "idiomatic"; + } else if (tempString.includes("imitate")) { + fluency = "imitate"; + } else { + fluency = "none"; + } + + // Determine literacy. + if (tempString.includes("literate")) { + literacy = "on"; + } + else { + literacy = 0; + } + + // Assign this language to the character sheet. + + switch(languageIndex) { + case 0: + language = { + skillName41: name, + skillFluency41: fluency, + skillLiteracy41: literacy + } + break; + case 1: + language = { + skillName42: name, + skillFluency42: fluency, + skillLiteracy42: literacy + } + break; + case 2: + language = { + skillName43: name, + skillFluency43: fluency, + skillLiteracy43: literacy + } + break; + case 3: + language = { + skillName44: name, + skillFluency44: fluency, + skillLiteracy44: literacy + } + break; + case 4: + language = { + skillName45: name, + skillFluency45: fluency, + skillLiteracy45: literacy + } + break; + case 5: + language = { + skillName46: name, + skillFluency46: fluency, + skillLiteracy46: literacy + } + break; + case 6: + language = { + skillName47: name, + skillFluency47: fluency, + skillLiteracy47: literacy + } + break; + case 7: + language = { + skillName48: name, + skillFluency48: fluency, + skillLiteracy48: literacy + } + break; + default: + // Last language slot available. + language = { + skillName49: name, + skillFluency49: fluency, + skillLiteracy49: literacy + } + } + + setAttrs(object.id, language); + + return; + } + + + var importWeaponSkill = function(object, character, script_name, skillObject, weaponSkillIndex) { + // Identify and assign combat levels + + let weaponSkill; + let name = skillObject.name; + let levels = parseInt(skillObject.levels); + let levelCost; + let type = 'none'; + let cost = parseInt(skillObject.cost); + + if (skillObject.text.includes("HTH Combat")) { + // Find the number of levels from the CP spent. + weaponSkill = { + skillLevels38: skillObject.levels + }; + + } else if (skillObject.text.includes("Ranged Combat")) { + // Find the number of levels from the CP spent. + weaponSkill = { + skillLevels39: skillObject.levels + }; + + } else if (skillObject.text.includes("All Attacks")) { + // Find the number of levels from the CP spent. + weaponSkill = { + skillLevels40: skillObject.levels + }; + + } else if (skillObject.text.includes("group") || skillObject.text.includes("single") || (skillObject.display === "Weapon Familiarity") || (skillObject.display === "Penalty Skill Levels") || (skillObject.display === "Combat Skill Levels")) { + // Call import weapon skills function. + + // Determine type + if (skillObject.display === "Weapon Familiarity") { + // Weapon familiarity at the moment can be common or single. + if (cost === 1) { + name = skillObject.text; + type = "Fam1"; + levels = 0; + } else { + name = skillObject.text.replace("Weapons", ""); + type = "Fam2"; + levels = 0; + } + } else if (skillObject.display === "Penalty Skill Levels") { + // Determine penalty skill levels + + // Try to shorten the name text. + name = skillObject.text.replace("versus", "vs"); + name = name.replace("Versus", "vs"); + name = name.replace("Location", "Loc"); + name = name.replace("Range", "Rng"); + name = name.replace("Modifiers ", ""); + name = name.replace("Modifier ", ""); + name = name.replace("with", "w/"); + name = name.replace("the ", ""); + + levelCost = parseInt(cost/levels); + switch (levelCost) { + case 1: type = 'PSL1'; + break; + case 2: type = 'PSL2'; + break; + case 3: type = 'PSL3'; + break; + default: 'none'; + } + } else { + // Determine combat skill levels + name = skillObject.text.replace("with", "w/"); + + levelCost = parseInt(cost/levels); + switch (levelCost) { + case 2: type = 'CSL2'; + break; + case 3: type = 'CSL3'; + break; + case 5: type = 'CSL5'; + break; + case 8: type = 'CSL8'; + break; + default: 'none'; + } + } + + // Assign skill parameters to an open weapon skill slot. + switch (weaponSkillIndex) { + case 0: + // Weapon skill slot 1. + weaponSkill = { + skillName31: name, + skillType31: type, + skillLevels31: levels, + skillCP31: cost + } + break; + case 1: + // Weapon skill slot 2. + weaponSkill = { + skillName32: name, + skillType32: type, + skillLevels32: levels, + skillCP32: cost + } + break; + case 2: + // Weapon skill slot 3. + weaponSkill = { + skillName33: name, + skillType33: type, + skillLevels33: levels, + skillCP33: cost + } + break; + case 3: + // Weapon skill slot 4. + weaponSkill = { + skillName34: name, + skillType34: type, + skillLevels34: levels, + skillCP34: cost + } + break; + case 4: + // Weapon skill slot 5. + weaponSkill = { + skillName35: name, + skillType35: type, + skillLevels35: levels, + skillCP35: cost + } + break; + case 5: + // Weapon skill slot 6. + weaponSkill = { + skillName36: name, + skillType36: type, + skillLevels36: levels, + skillCP36: cost + } + break; + case 6: + // Last weapon skill slot available. + weaponSkill = { + skillName37: name, + skillType37: type, + skillLevels37: levels, + skillCP37: cost + } + } + weaponSkillIndex++; + } + + setAttrs(object.id, weaponSkill); + + return weaponSkillIndex; + } + + + var importSkillLevels = function(object, character, script_name, skillObject) { + + if (skillObject.text.includes("all Intellect Skills")) { + // The broad group skill level is ambiguous. + // By default we will guess intellect as the most common. + + if (skillObject.name.includes("nteract")) { + // Look at name to see if player added interaction label. + let skillLevel = { + interactionLevels: skillObject.levels, + interactionLevelsCP: skillObject.levels*4 + } + + if(verbose) { + sendChat(script_name, "Found interaction group levels."); + } + setAttrs(object.id, skillLevel); + } else if (skillObject.name.includes("ntellect")) { + // Look at name to see if player added intellect label. + let skillLevel = { + intellectLevels: skillObject.levels, + intellectLevelsCP: skillObject.levels*4 + } + + if(verbose) { + sendChat(script_name, "Found intellect group levels."); + } + setAttrs(object.id, skillLevel); + } else { + // Assume intellect. + let skillLevel = { + intellectLevels: skillObject.levels, + intellectLevelsCP: skillObject.levels*4 + } + + if(verbose) { + sendChat(script_name, "Found broad group levels. Assuming intellect."); + } + setAttrs(object.id, skillLevel); + } + } else if (skillObject.text.includes("all Agility Skills")) { + let skillLevel = { + agilityLevels: skillObject.levels, + agilityLevelsCP: skillObject.levels*6 + } + setAttrs(object.id, skillLevel); + } else if (skillObject.text.includes("all Non-Combat Skills")) { + let skillLevel = { + noncombatLevels: skillObject.levels, + noncombatLevelsCP: skillObject.levels*10 + } + setAttrs(object.id, skillLevel); + } else if (skillObject.text.includes("Overall")) { + let skillLevel = { + overallLevels: skillObject.levels, + overallLevelsCP: skillObject.levels*12 + } + setAttrs(object.id, skillLevel); + } + + return; + } + + + var importGeneralSkill = function(object, character, script_name, skillObject, generalSkillIndex) { + // Identify and import a general skill. + + var theSkill = new Object(); + let attribute = skillObject.attribute; + let text = skillObject.text; + let type = "none"; + let base = skillObject.base; + let levels = skillObject.levels; + let cost = skillObject.cost; + + if (skillObject.display === ("Skill Levels")) { + // Three-group skill. + type = "group"; + } else if (skillObject.text.includes("three pre-defined Skills")) { + // Three-group skill. + type = "group"; + } else if ((base === "0") && (cost === "0") && skillObject.text.includes("11-")) { + // Everyman professional skill. + type = "everymanPS"; + } else if ((base === "0") && (cost === "0")) { + // Everyman skill. + type = "everyman"; + } else if (text.startsWith("KS") && ((base-levels) === 2)) { + // Knowledge Skill + type = "ks"; + } else if (text.startsWith("KS") && ((base-levels) === 3)) { + // Knowledge Skill based on INT. + type = "intKS"; + } else if (text.startsWith("CK") && ((base-levels) === 2)) { + // City Knowledge Skill + type = "ck"; + } else if (text.startsWith("CK") && ((base-levels) === 3)) { + // City Knowledge Skill based on INT. + type = "intCK"; + } else if (text.startsWith("CuK") && ((base-levels) === 2)) { + // Culture Knowledge Skill + type = "cuk"; + } else if (text.startsWith("CuK") && ((base-levels) === 3)) { + // Culture Knowledge Skill based on INT. + type = "intCuK"; + } else if (text.startsWith("Science Skill") && ((base-levels) === 2)) { + // Science Skill + type = "ss"; + } else if (text.startsWith("Science Skill") && ((base-levels) === 3)) { + // Science Skill based on INT. + type = "intSS"; + } else if (text.startsWith("AK") && ((base-levels) === 2)) { + // Area Knowledge. + type = "ak"; + } else if (text.startsWith("AK") && ((base-levels) === 3)) { + // Area Knowledge Skill based on INT. + type = "intAK"; + } else if (text.startsWith("TF")) { + // Transport familiarity. + type = "tf"; + } else if (text.startsWith("PS")) { + // Professional skill. + type = "ps"; + } else if (attribute === "INT") { + // Intellect skill. + type = "int"; + } else if (attribute === "DEX") { + // Agility skill. + type = "dex"; + } else if (attribute === "PRE") { + // Interact skill. + type = "pre"; + } else if (attribute === "EGO") { + // Ego skill. Probably faith. + type = "ego"; + } else if (attribute === "STR") { + // Strength skill (unusual). + type = "str"; + } else if (attribute === "CON") { + // Constitution skill (unusual). + type = "con"; + } else if ((skillObject.display === "Cramming") || (text.toLowerCase().includes("skill"))) { + // A special skill or group of undetermined skills. + type = "other"; + } else if (cost === "") { + // Empty slot. + type = "none"; + } else { + // Best last guess is combat. + type = "combat"; + } + + // Try to find the best name of the skill. + // It may be in .name, .text, or .display. + + let name = skillObject.name; + if (name === "") { + if ((text !== "") && text.includes("AK: ")) { + name = text.replace("AK: ", ""); + name = name.slice(0, -3); + } else if ((text !== "") && text.includes("KS: ")) { + name = text.replace("KS: ", ""); + name = name.slice(0, -3); + } else if ((text !== "") && text.includes("CK: ")) { + name = text.replace("CK: ", ""); + name = name.slice(0, -3); + } else if ((text !== "") && text.includes("CuK: ")) { + name = text.replace("CuK: ", ""); + name = name.slice(0, -4); + } else if ((text !== "") && text.includes("SS: ")) { + name = text.replace("SS: ", ""); + name = name.slice(0, -3); + } else if ((text !== "") && text.includes("Science Skill: ")) { + name = text.replace("Science Skill: ", ""); + name = name.slice(0, -3); + } else if ((text !== "") && text.includes("PS: ")) { + name = text.replace("PS: ", ""); + name = name.slice(0, -3); + } else if (skillObject.display !== "") { + name = skillObject.display; + } + } + + // Import the skill + ID = String(generalSkillIndex+1).padStart(2,'0'); + theSkill["skillName"+ID] = name.trim(); + theSkill["skillType"+ID] = type; + theSkill["skillCP"+ID] = cost; + if (type === "everyman") { + theSkill["skillRollChance"+ID] = "8"; + } + + setAttrs(object.id, theSkill); + + generalSkillIndex++; + + return generalSkillIndex; + } + + + var findEndurance = function(testObject) { + // Determine endurance type, advantages, and limitations. + // Remove advantage or limitation from tempString so that they aren't counted twice. + + // testObject should have three items: + // testString, testEndurance, powerReducedEND + + let tempString = testObject.testString; + let endString = testObject.testEndurance; + + if ( ((tempString.includes("Costs Endurance (-1/4)")) || (tempString.includes("Costs Half Endurance"))) && (endString.includes("["))) { + testObject.powerReducedEND = "costsENDhalf"; + tempString = tempString.replace("Costs Endurance (-1/4)", ""); + } else if ((tempString.includes("Costs Endurance (-1/2)")) && (endString.includes("["))) { + testObject.powerReducedEND = "costsENDfull"; + tempString = tempString.replace("Costs Endurance (-1/2)", ""); + } else if (endString.includes("[")) { + testObject.powerReducedEND = "noEND"; + } else if (tempString.includes("Costs Endurance (-1/4)")) { + testObject.powerReducedEND = "costsENDhalf"; + tempString = tempString.replace("Costs Endurance (-1/4)", ""); + } else if (tempString.includes("Costs Endurance (-1/2)")) { + testObject.powerReducedEND = "costsENDfull"; + tempString = tempString.replace("Costs Endurance (-1/2)", ""); + } else if ((tempString.includes("Reduced Endurance (1/2 END; +1/2)")) && (tempString.includes("Autofire"))) { + testObject.powerReducedEND = "reducedENDAF"; + tempString = tempString.replace("Reduced Endurance (1/2 END; +1/2)", ""); + } else if (tempString.includes("Reduced Endurance (0 END; +1/2)")) { + testObject.powerReducedEND = "zeroEND"; + tempString = tempString.replace("Reduced Endurance (0 END; +1/2)", ""); + } else if (tempString.includes("Reduced Endurance (0 END; +1)")) { + testObject.powerReducedEND = "zeroENDAF"; + tempString = tempString.replace("Reduced Endurance (0 END; +1)", ""); + } else if (tempString.includes("Reduced Endurance (1/2 END; +1/4)")) { + testObject.powerReducedEND = "reducedEND"; + tempString = tempString.replace("Reduced Endurance (1/2 END; +1/4)", ""); + } else if (tempString.includes("Increased Endurance Cost (x2 END; -1/2)")) { + testObject.powerReducedEND = "increasedENDx2"; + tempString = tempString.replace("Increased Endurance Cost (x2 END; -1/2)", ""); + } else if (tempString.includes("Increased Endurance Cost (x3 END; -1)")) { + testObject.powerReducedEND = "increasedENDx3"; + tempString = tempString.replace("Increased Endurance Cost (x3 END; -1)", ""); + } else if (tempString.includes("Increased Endurance Cost (x4 END; -1 1/2)")) { + testObject.powerReducedEND = "increasedENDx4"; + tempString = tempString.replace("Increased Endurance Cost (x4 END; -1 1/2)", ""); + } else if (tempString.includes("Increased Endurance Cost (x5 END; -2)")) { + testObject.powerReducedEND = "increasedENDx5"; + tempString = tempString.replace("Increased Endurance Cost (x5 END; -2)", ""); + } else if (tempString.includes("Increased Endurance Cost (x6 END; -2 1/2)")) { + testObject.powerReducedEND = "increasedENDx6"; + tempString = tempString.replace("Increased Endurance Cost (x6 END; -2 1/2)", ""); + } else if (tempString.includes("Increased Endurance Cost (x7 END; -3)")) { + testObject.powerReducedEND = "increasedENDx7"; + tempString = tempString.replace("Increased Endurance Cost (x7 END; -3)", ""); + } else if (tempString.includes("Increased Endurance Cost (x8 END; -3 1/2)")) { + testObject.powerReducedEND = "increasedENDx8"; + tempString = tempString.replace("Increased Endurance Cost (x8 END; -3 1/2)", ""); + } else if (tempString.includes("Increased Endurance Cost (x9 END; -3 1/2)")) { + testObject.powerReducedEND3 = "increasedENDx9"; + tempString = tempString.replace("Increased Endurance Cost (x9 END; -3 1/2)", ""); + } else if (tempString.includes("Increased Endurance Cost (x10 END; -4)")) { + testObject.powerReducedEND = "increasedENDx10"; + tempString = tempString.replace("Increased Endurance Cost (x10 END; -4)", ""); + } else if (endString == "") { + testObject.powerReducedEND = "noEND"; + } else if (endString == 0) { + testObject.powerReducedEND = "noEND"; + } else { + testObject.powerReducedEND = "standardEND"; + } + + testObject.testString = tempString; + + return testObject; + } + + + var findEffectType = function(tempString, script_name) { + // Search for and return effect keywords. + + const talentArray = ["absolute range sense", "absolute time sense", "ambidexterity", "animal friendship", "bump of direction", "combat luck", "combat sense", "danger sense", "deadly blow", "double jointed", "eidetic memory", "environmental movement", "lightning calculator", "lightning reflexes", "lightsleap", "off-hand defense", "perfect pitch", "resistance", "simulate death", "speed reading", "striking appearance", "universal translator", "weaponmaster"]; + const skillArray = ["overall"]; + const senseModifierArray = ["analyze", "concealed", "adjacent", "dimensional", "discriminatory", "increased arc", "microscopic", "penetrative", "range", "rapid", "telescopic", "tracking", "transmit"]; + + if ( (typeof tempString != "undefined") && (tempString != "") ) { + let lowerCaseString = tempString.toLowerCase(); + + if (lowerCaseString.includes("applied to str")) { + return "Base STR Mod"; + } else if (lowerCaseString.includes("range based on str") && lowerCaseString.includes("of hka")) { + return "HKA Mod"; + } else if (lowerCaseString.includes("applied to running")) { + return "Base Running Mod"; + } else if (lowerCaseString.includes("applied to leaping")) { + return "Base Leaping Mod"; + } else if (lowerCaseString.includes("applied to swimming")) { + return "Base Swimming Mod"; + } else if (lowerCaseString.includes("applied to pd")) { + return "Base PD Mod"; + } else if (lowerCaseString.includes("applied to ed")) { + return "Base ED Mod"; + } else if (tempString.includes("Absorption")) { + return "Absorption"; + } else if (tempString.includes("Aid")) { + return "Aid"; + } else if (tempString.includes("Automaton")) { + return "Automaton"; + } else if (tempString.includes("Barrier")) { + return "Barrier"; + } else if (tempString.includes("Mental Blast")) { + return "Mental Blast"; + } else if (tempString.includes("Blast")) { + return "Blast"; + } else if (tempString.includes("Change Environment")) { + return "Change Environment"; + } else if (tempString.includes("Clairsentience")) { + return "Clairsentience"; + } else if (tempString.includes("Clinging")) { + return "Clinging"; + } else if (tempString.includes("Damage Negation")) { + return "Damage Negation"; + } else if (tempString.includes("Damage Reduction")) { + return "Damage Reduction"; + } else if (tempString.includes("Darkness")) { + return "Darkness"; + } else if (tempString.includes("Deflection")) { + return "Deflection"; + } else if (tempString.includes("Density Increase")) { + return "Density Increase"; + } else if (tempString.includes("Desolidification")) { + return "Desolidification"; + } else if ( (tempString.includes("Dispel")) && !(lowerCaseString.includes("difficult to dispel")) ) { + return "Dispel"; + } else if (tempString.includes("Does Not Bleed")) { + return "Does Not Bleed"; + } else if (tempString.includes("Drain")) { + return "Drain"; + } else if (tempString.includes("Duplication")) { + return "Duplication"; + } else if (tempString.includes("Enhanced Senses")) { + return "Enhanced Senses"; + } else if (tempString.includes("Endurance Reserve")) { + return "Endurance Reserve"; + } else if (tempString.includes("Extra Limb")) { + return "Extra Limb"; + } else if (tempString.includes("Extra-Dimensional Movement")) { + return "Extra-Dimensional Movement"; + } else if (tempString.includes("Faster-Than-Light-Travel")) { + return "Faster-Than-Light-Travel"; + } else if (tempString.includes("Resistant")) { + return "Resistant Protection"; + } else if (tempString.includes("Flash")) { + return "Flash"; + } else if (tempString.includes("Flash Defense")) { + return "Flash Defense"; + } else if (tempString.includes("Flight")) { + return "Flight"; + } else if (tempString.includes("Growth")) { + return "Growth"; + } else if (tempString.includes("Hand-To-Hand Attack")) { + return "HTH Attack"; + } else if (tempString.includes("Healing")) { + return "Healing"; + } else if (tempString.includes("Invisibility")) { + return "Invisibility"; + } else if (tempString.includes("Killing Attack - Hand-To-Hand")) { + return "HTH Killing Attack"; + } else if (tempString.includes("HKA")) { + return "HTH Killing Attack"; + } else if ( (tempString.includes("Images")) && !(lowerCaseString.includes("only to perceive images")) ) { + return "Images"; + } else if (tempString.includes("Killing Attack - Ranged")) { + return "Ranged Killing Attack"; + } else if (tempString.includes("RKA")) { + return "Ranged Killing Attack"; + } else if (tempString.includes("Knockback Resistance")) { + return "Knockback Resistance"; + } else if (tempString.includes("Leaping")) { + return "Leaping"; + } else if (tempString.includes("Life Support")) { + return "Life Support"; + } else if (tempString.includes("Luck")) { + return "Luck"; + } else if (tempString.includes("Transform")) { + return "Transform"; + } else if (tempString.includes("Mental Defense")) { + return "Mental Defense"; + } else if (tempString.includes("Mental Illusions")) { + return "Mental Illusions"; + } else if (tempString.includes("Mind Control")) { + return "Mind Control"; + } else if (tempString.includes("Mind Link")) { + return "Mind Link"; + } else if (tempString.includes("Mind Scan")) { + return "Mind Scan"; + } else if (tempString.includes("Multiform")) { + return "Multiform"; + } else if (tempString.includes("No Hit Locations")) { + return "No Hit Locations"; + } else if (tempString.includes("Possession")) { + return "Possession"; + } else if (tempString.includes("Power Defense")) { + return "Power Defense"; + } else if (tempString.includes("Reach")) { + return "Reach"; + } else if (tempString.includes("Reflection")) { + return "Reflection"; + } else if (tempString.includes("Regeneration")) { + return "Regeneration"; + } else if (tempString.includes("Running")) { + return "Running"; + } else if (tempString.includes("Shape Shift")) { + return "Shape Shift"; + } else if (tempString.includes("Shrinking")) { + return "Shrinking"; + } else if (tempString.includes("Stretching")) { + return "Stretching"; + } else if (tempString.includes("Summon")) { + return "Summon"; + } else if (tempString.includes("Swimming")) { + return "Swimming"; + } else if (tempString.includes("Swinging")) { + return "Swinging"; + } else if (tempString.includes("Takes No STUN")) { + return "Takes No STUN"; + } else if (tempString.includes("Telekinesis")) { + return "Telekinesis"; + } else if (tempString.includes("Telepathy")) { + return "Telepathy"; + } else if (tempString.includes("Teleportation")) { + return "Teleportation"; + } else if (tempString.includes("Tunneling")) { + return "Tunneling"; + } else if (tempString.includes("Active Sonar")) { + return "Active Sonar"; + } else if (tempString.includes("Detect")) { + return "Detect"; + } else if (tempString.includes("Enhanced Perception")) { + return "Enhanced PER"; + } else if ( (tempString.includes("High Range Radio")) || (tempString.includes("HRRP")) ) { + return "HR Radio PER"; + } else if (tempString.includes("Infrared Perception")) { + return "IR Perception"; + } else if (tempString.includes("IR Perception")) { + return "IR Perception"; + } else if (tempString.includes("Mental Awareness")) { + return "Mental Awareness"; + } else if (tempString.includes("Nightvision")) { + return "Nightvision"; + } else if (tempString.includes("Radar")) { + return "Radar"; + } else if (tempString.includes("Radio Perception/Transmission")) { + return "Radio PER/Trans"; + } else if (tempString.includes("Radio Perception")) { + return "Radio PER"; + } else if (tempString.includes("Spatial Awareness")) { + return "Spatial Awareness"; + } else if (tempString.includes("Tracking")) { + return "Enhanced Sense"; + } else if (tempString.includes("Ultrasonic Perception")) { + return "Ultrasonic PER"; + } else if (tempString.includes("Ultraviolet Perception")) { + return "UV Perception"; + } else if (skillArray.some(v => lowerCaseString.includes(v))) { + return "Skill"; + } else if (talentArray.some(v => lowerCaseString.includes(v))) { + return "Talent"; + } else if (senseModifierArray.some(v => lowerCaseString.includes(v))) { + return "Sense Modifier"; + } else if (tempString.includes("SPD")) { + return "Enhanced SPD"; + } else if (tempString.includes("PER")) { + return "Enhanced PER"; + } else if (tempString.includes("STR")) { + return "Enhanced STR"; + } else if (tempString.includes("CON")) { + return "Enhanced CON"; + } else if (tempString.includes("INT")) { + return "Enhanced INT"; + } else if (tempString.includes("EGO")) { + return "Enhanced EGO"; + } else if (tempString.includes("PRE")) { + return "Enhanced PRE"; + } else if (tempString.includes("OCV")) { + return "Enhanced OCV"; + } else if (tempString.includes("OMCV")) { + return "Enhanced OMCV"; + } else if (tempString.includes("DMCV")) { + return "Enhanced DMCV"; + } else if (tempString.includes("PD")) { + return "Enhanced PD"; + } else if (tempString.includes("ED")) { + return "Enhanced ED"; + } else if (tempString.includes("BODY")) { + return "Enhanced BODY"; + } else if (tempString.includes("STUN")) { + return "Enhanced STUN"; + } else if (tempString.includes("REC")) { + return "Enhanced REC"; + } else if (tempString.includes("DEX")) { + return "Enhanced DEX"; + } else if (lowerCaseString.includes("sight") || lowerCaseString.includes("hearing") || lowerCaseString.includes("smell") || lowerCaseString.includes("taste") || lowerCaseString.includes("touch") || lowerCaseString.includes("sense")) { + return "Enhanced PER"; + } else if (lowerCaseString.includes("eating") || lowerCaseString.includes("immunity") || lowerCaseString.includes("longevity") || lowerCaseString.includes("safe in") || lowerCaseString.includes("breathing") || lowerCaseString.includes("sleeping")) { + return "Life Support"; + } else if (tempString.includes("Entangle")) { + return "Entangle"; + } else if ( (lowerCaseString.includes("advantage")) || (lowerCaseString.includes("area of effect")) ) { + return "Naked Advantage"; + } else if (lowerCaseString.includes("worth of") || lowerCaseString.includes("powers") || lowerCaseString.includes("spells") || lowerCaseString.includes("abilities")) { + return "To Be Determined"; + } else if (tempString.includes("DCV")) { + return "Enhanced DCV"; + } else if (tempString.includes("END")) { + return "Enhanced END"; + } else { + return "Unknown Effect"; + } + } else { + return "Unknown Effect"; + } + } + + + var fixKnownSpellingErrors = function(theString, script_name) { + // Here we try to catch and correct important typos found in tested commercial sources. + // Add to typoList as needed. + + const typoList = [ + ["Restistant", "Resistant"] + ]; + + const iMax = 1; + let found = false; + let i = 0; + + if ( (typeof theString != "undefined") && (theString != "") ) { + while ( (i < iMax) && !found ) { + if (theString.includes(typoList[i][0])) { + theString = theString.replace(typoList[i][0], typoList[i][1]); + found = true; + } + + i++; + } + } + + return theString; + } + + + var isAttack = function (effect) { + // For setting the attack state. + const attackSet = new Set(["Blast", "Dispel", "Drain", "Entangle", "Flash", "Healing", "HTH Attack", "HTH Killing Attack", "Mental Blast", "Mental Illusions", "Mind Control", "Mind Link", "Mind Scan", "Ranged Killing Attack", "Telekinesis", "Telepathy", "Transform"]); + + return attackSet.has(effect) ? true : false; + } + + + var getResistantPD = function (inputString, script_name) { + // For Armor slot 4. + let protection = 0; + let startPosition = 0; + let endPosition = 0; + let tempString = inputString; + + if (inputString.includes("PD/")) { + endPosition = inputString.indexOf("PD/"); + tempString = inputString.slice(endPosition-Math.min(4,endPosition), endPosition); + tempString = tempString.replace(/[^0-9]/g, ""); + protection = (tempString !== "") ? Number(tempString) : 0; + protection = isNaN(protection) ? 0 : protection; + } else if (inputString.includes("PD")) { + endPosition = inputString.indexOf("PD"); + tempString = inputString.slice(endPosition-Math.min(4,endPosition), endPosition); + tempString = tempString.replace(/[^0-9]/g, ""); + protection = (tempString !== "") ? Number(tempString) : 0; + protection = isNaN(protection) ? 0 : protection; + } else { + protection = 0; + } + + return protection; + } + + + var getResistantED = function (inputString, script_name) { + // For Armor slot 4. + let protection = 0; + let startPosition = 0; + let endPosition = 0; + let tempString = inputString; + + if (inputString.includes("PD/ED")) { + endPosition = inputString.indexOf("PD/ED"); + tempString = inputString.slice(endPosition-Math.min(3, endPosition), endPosition); + tempString = tempString.replace(/[^0-9]/g, ""); + protection = (tempString !== "") ? Number(tempString) : 0; + protection = isNaN(protection) ? 0 : protection; + } else if (inputString.includes("PD/")) { + if (inputString.includes("ED")) { + endPosition = inputString.indexOf("ED"); + tempString = inputString.slice(endPosition-Math.min(4,endPosition), endPosition); + tempString = tempString.replace(/[^0-9]/g, ""); + protection = (tempString !== "") ? Number(tempString) : 0; + protection = isNaN(protection) ? 0 : protection; + } else if (inputString.includes("ED/")) { + endPosition = inputString.indexOf("ED/"); + tempString = inputString.slice(endPosition-Math.min(4,endPosition), endPosition); + tempString = tempString.replace(/[^0-9]/g, ""); + protection = (tempString !== "") ? Number(tempString) : 0; + protection = isNaN(protection) ? 0 : protection; + } + } else if (inputString.includes("ED")) { + endPosition = inputString.indexOf("ED"); + tempString = inputString.slice(endPosition-Math.min(4,endPosition), endPosition); + tempString = tempString.replace(/[^0-9]/g, ""); + protection = (tempString !== "") ? Number(tempString) : 0; + protection = isNaN(protection) ? 0 : protection; + } else { + protection = 0; + } + + return protection; + } + + + var getPowerDamageType = function (effect) { + // For setting the attack state. + const killingSet = new Set(["HTH Killing Attack", "Ranged Killing Attack"]); + const normalSet = new Set(["Blast", "HTH Attack"]); + const mentalSet = new Set(["Mental Blast", "Mental Illusions", "Mind Control", "Mind Link", "Mind Scan", "Telepathy"]); + let damageType = null; + + if (killingSet.has(effect)) { + damageType = "killing"; + } else if (mentalSet.has(effect)) { + damageType = "mental"; + } else if (normalSet.has(effect)) { + damageType = "normal"; + } else { + damageType = "power"; + } + + return damageType; + } + + + var getPowerBaseCost = function(character, base, effect, text, bonus, option, script_name) { + // For ordinary powers, this function simply returns the imported base cost. + // For stat modification powers, this function assigns a base cost determined from the characteristic + // and also awards those points as bonus points so that the character is not charged twice. + // For 'to be determined' powers the function attempts to parse the base cost from the power's text. + + let powerBaseCost = parseInt(base); + let bonusCP = parseInt(bonus); + let slicePosition = 0; + let tempValue = 0; + let tempString = ""; + + if (effect === "Base STR Mod") { + powerBaseCost = parseInt(character.strength); + bonusCP = bonusCP + powerBaseCost; + } else if (effect === "Base Running Mod") { + powerBaseCost = parseInt(character.running); + bonusCP = bonusCP + powerBaseCost; + } else if (effect === "Base Leaping Mod") { + powerBaseCost = parseInt(Math.round(character.leaping/2)); + bonusCP = bonusCP + powerBaseCost; + } else if (effect === "Base Swimming Mod") { + powerBaseCost = parseInt(Math.round(character.swimming/2)); + bonusCP = bonusCP + powerBaseCost; + } else if (effect === "Base Defense Mod") { + if (option === "on") { + // Determine pd cost. If character has takes No STUN triple cost over the base 2. + if ((option === "on") && (character.pd > 1)) { + powerBaseCost = parseInt(1 + (character.pd - 1)*3); + bonusCP = bonusCP + powerBaseCost; + } else { + powerBaseCost = parseInt(character.pd*1); + bonusCP = bonusCP + powerBaseCost; + } + + // Add ed cost. If character has takes No STUN triple cost over the base 2. + if ((option === "on") && (character.ed > 1)) { + powerBaseCost = powerBaseCost + parseInt(1 + (character.ed - 1)*3); + bonusCP = bonusCP + powerBaseCost; + } else { + powerBaseCost = powerBaseCost + parseInt(character.ed*1); + bonusCP = bonusCP + powerBaseCost; + } + } else { + powerBaseCost = parseInt(character.pd*1) + parseInt(character.ed*1); + bonusCP = bonusCP + powerBaseCost; + } + } else if (effect === "Base PD Mod") { + // If character has takes No STUN triple cost over the base 2. + if ((option === "on") && (character.pd > 1)) { + powerBaseCost = parseInt(1 + (character.pd - 1)*3); + bonusCP = bonusCP + powerBaseCost; + } else { + powerBaseCost = parseInt(character.pd*1); + bonusCP = bonusCP + powerBaseCost; + } + } else if (effect === "Base ED Mod") { + // If character has takes No STUN triple cost over the base 2. + if ((option === "on") && (character.ed > 1)) { + powerBaseCost = parseInt(1 + (character.ed - 1)*3); + bonusCP = bonusCP + powerBaseCost; + } else { + powerBaseCost = parseInt(character.ed*1); + bonusCP = bonusCP + powerBaseCost; + } + } else if (effect === "Endurance Reserve") { + // Special cost due to separate END and REC purchases. + slicePosition = text.indexOf("END"); + tempString = text.slice(Math.max(0, slicePosition-7), slicePosition); + + tempValue = tempString.replace(/[^0-9\-]/g, ''); + if (tempValue === "") { + tempValue = 0; + } + powerBaseCost = Math.round(tempValue/4); + + slicePosition = text.indexOf("REC"); + tempString = text.slice(Math.max(0, slicePosition-6), slicePosition); + + tempValue = tempString.replace(/[^0-9\-]/g, ''); + if (tempValue === "") { + tempValue = 0; + } + powerBaseCost += Math.round(2 * tempValue/3); + } else if (effect === "To Be Determined") { + // Workaround for when sometimes points reported as base are incorrect. + if ((text.match(/^\d+|\d+\b|\d+(?=\w)/g) !== null) && (text.match(/^\d+|\d+\b|\d+(?=\w)/g) !== "")) { + powerBaseCost = text.match(/^\d+|\d+\b|\d+(?=\w)/g)[0]; + } else { + // If the array came up empty, default to base cost. + powerBaseCost = parseInt(base); + } + } + + if (bonus != bonusCP) { + if(verbose) { + sendChat(script_name, JSON.stringify(bonusCP - bonus) + " CP added to Bonus."); + } + } + + return [powerBaseCost, bonusCP]; + } + + + var findAdvantages = function(tempString) { + // Determine total limitations. This will take some doing. + + let advantages = 0; + + // Find half-integers. Replace larger ones first. + advantages = advantages + ((tempString.match(/\+5 1\/2\)/g) || []).length)*5.5; + tempString = tempString.replace("+5 1/2)",""); + advantages = advantages + ((tempString.match(/\+4 1\/2\)/g) || []).length)*4.5; + tempString = tempString.replace("+4 1/2)",""); + advantages = advantages + ((tempString.match(/\+3 1\/2\)/g) || []).length)*3.5; + tempString = tempString.replace("+3 1/2)",""); + advantages = advantages + ((tempString.match(/\+2 1\/2\)/g) || []).length)*2.5; + tempString = tempString.replace("+2 1/2)",""); + advantages = advantages + ((tempString.match(/\+1 1\/2\)/g) || []).length)*1.5; + tempString = tempString.replace("+1 1/2)",""); + advantages = advantages + ((tempString.match(/\+1\/2\)/g) || []).length)*0.5; + tempString = tempString.replace("+1/2)",""); + + // Find three-quarter integers. Replace larger ones first. + advantages = advantages + ((tempString.match(/\+5 3\/4\)/g) || []).length)*5.75; + tempString = tempString.replace("+5 3/4)",""); + advantages = advantages + ((tempString.match(/\+4 3\/4\)/g) || []).length)*4.75; + tempString = tempString.replace("+4 3/4)",""); + advantages = advantages + ((tempString.match(/\+3 3\/4\)/g) || []).length)*3.75; + tempString = tempString.replace("+3 3/4)",""); + advantages = advantages + ((tempString.match(/\+2 3\/4\)/g) || []).length)*2.75; + tempString = tempString.replace("+2 3/4)",""); + advantages = advantages + ((tempString.match(/\+1 3\/4\)/g) || []).length)*1.75; + tempString = tempString.replace("+1 3/4)",""); + advantages = advantages + ((tempString.match(/\+3\/4\)/g) || []).length)*0.75; + tempString = tempString.replace("+3/4)",""); + + // Find quarter integers. Replace larger ones first. + advantages = advantages + ((tempString.match(/\+5 1\/4\)/g) || []).length)*5.25; + tempString = tempString.replace("+5 1/4)",""); + advantages = advantages + ((tempString.match(/\+4 1\/4\)/g) || []).length)*4.25; + tempString = tempString.replace("+4 1/4)",""); + advantages = advantages + ((tempString.match(/\+3 1\/4\)/g) || []).length)*3.25; + tempString = tempString.replace("+3 1/4)",""); + advantages = advantages + ((tempString.match(/\+2 1\/4\)/g) || []).length)*2.25; + tempString = tempString.replace("+2 1/4)",""); + advantages = advantages + ((tempString.match(/\+1 1\/4\)/g) || []).length)*1.25; + tempString = tempString.replace("+1 1/4)",""); + advantages = advantages + ((tempString.match(/\+1\/4\)/g) || []).length)*0.25; + tempString = tempString.replace("+1/4)",""); + + // Find whole integers. Replace larger ones first. + advantages = advantages + ((tempString.match(/\+6\)/g) || []).length)*6; + tempString = tempString.replace("+6)",""); + advantages = advantages + ((tempString.match(/\+5\)/g) || []).length)*5; + tempString = tempString.replace("+5)",""); + advantages = advantages + ((tempString.match(/\+4\)/g) || []).length)*4; + tempString = tempString.replace("+4)",""); + advantages = advantages + ((tempString.match(/\+3\)/g) || []).length)*3; + tempString = tempString.replace("+3)",""); + advantages = advantages + ((tempString.match(/\+2\)/g) || []).length)*2; + tempString = tempString.replace("+2)",""); + advantages = advantages + ((tempString.match(/\+1\)/g) || []).length)*1; + tempString = tempString.replace("+1)",""); + + return advantages; + } + + var findLimitations = function(tempString) { + // Determine total limitations. This will take some doing. + + let limitations = 0; + + // Find half-integers. Replace larger ones first. + limitations = limitations + ((tempString.match(/-5 1\/2\)/g) || []).length)*5.5; + tempString = tempString.replace("-5 1/2)",""); + limitations = limitations + ((tempString.match(/-4 1\/2\)/g) || []).length)*4.5; + tempString = tempString.replace("-4 1/2)",""); + limitations = limitations + ((tempString.match(/-3 1\/2\)/g) || []).length)*3.5; + tempString = tempString.replace("-3 1/2)",""); + limitations = limitations + ((tempString.match(/-2 1\/2\)/g) || []).length)*2.5; + tempString = tempString.replace("-2 1/2)",""); + limitations = limitations + ((tempString.match(/-1 1\/2\)/g) || []).length)*1.5; + tempString = tempString.replace("-1 1/2)",""); + limitations = limitations + ((tempString.match(/-1\/2\)/g) || []).length)*0.5; + tempString = tempString.replace("-1/2)",""); + + // Find three-quarter integers. Replace larger ones first. + limitations = limitations + ((tempString.match(/-5 3\/4\)/g) || []).length)*5.75; + tempString = tempString.replace("-5 3/4)",""); + limitations = limitations + ((tempString.match(/-4 3\/4\)/g) || []).length)*4.75; + tempString = tempString.replace("-4 3/4)",""); + limitations = limitations + ((tempString.match(/-3 3\/4\)/g) || []).length)*3.75; + tempString = tempString.replace("-3 3/4)",""); + limitations = limitations + ((tempString.match(/-2 3\/4\)/g) || []).length)*2.75; + tempString = tempString.replace("-2 3/4)",""); + limitations = limitations + ((tempString.match(/-1 3\/4\)/g) || []).length)*1.75; + tempString = tempString.replace("-1 3/4)",""); + limitations = limitations + ((tempString.match(/-3\/4\)/g) || []).length)*0.75; + tempString = tempString.replace("-3/4)",""); + + // Find quarter integers. Replace larger ones first. + limitations = limitations + ((tempString.match(/-5 1\/4\)/g) || []).length)*5.25; + tempString = tempString.replace("-5 1/4)",""); + limitations = limitations + ((tempString.match(/-4 1\/4\)/g) || []).length)*4.25; + tempString = tempString.replace("-4 1/4)",""); + limitations = limitations + ((tempString.match(/-3 1\/4\)/g) || []).length)*3.25; + tempString = tempString.replace("-3 1/4)",""); + limitations = limitations + ((tempString.match(/-2 1\/4\)/g) || []).length)*2.25; + tempString = tempString.replace("-2 1/4)",""); + limitations = limitations + ((tempString.match(/-1 1\/4\)/g) || []).length)*1.25; + tempString = tempString.replace("-1 1/4)",""); + limitations = limitations + ((tempString.match(/-1\/4\)/g) || []).length)*0.25; + tempString = tempString.replace("-1/4)",""); + + // Find whole integers. Replace larger ones first. + limitations = limitations + ((tempString.match(/-6\)/g) || []).length)*6; + tempString = tempString.replace("-6)",""); + limitations = limitations + ((tempString.match(/-5\)/g) || []).length)*5; + tempString = tempString.replace("-5)",""); + limitations = limitations + ((tempString.match(/-4\)/g) || []).length)*4; + tempString = tempString.replace("-4)",""); + limitations = limitations + ((tempString.match(/-3\)/g) || []).length)*3; + tempString = tempString.replace("-3)",""); + limitations = limitations + ((tempString.match(/-2\)/g) || []).length)*2; + tempString = tempString.replace("-2)",""); + limitations = limitations + ((tempString.match(/-1\)/g) || []).length)*1; + tempString = tempString.replace("-1)",""); + + return limitations; + } + + + var isAoE = function(inputString) { + // Search advantages for any that indicate an Area of Effect power. + // Written so as to be able to look for more than just "area" but this may be enough. + inputString = inputString.replace(/\W/g, " "); + inputString = inputString.toLowerCase(); + + const searchSet = new Set(["area"]); + let setOfWords = new Set(inputString.split(" ")); + let intersection = new Set([...setOfWords].filter(x => searchSet.has(x))); + let answer = false; + + if (intersection.size != 0) { + answer = true; + } + + return answer; + } + + + var requiresRoll = function(inputString) { + // Determine if the power as an activation roll and find it if it is simple. + let lowerCaseString = inputString.toLowerCase(); + let detailString; + let startPosition; + let endPosition; + let answer = false; + let value = 18; + let searchSet = new Set(["skill", "characteristic", "ps", "ks", "ss", "attack", "per"]); + let setOfWords; + let intersection; + + if (lowerCaseString.includes("requires a roll")) { + + answer = true; + + // Attempt to obtain the skill roll needed if it is a simple activation roll. The others + // would require guesses, which means we need to leave the decision to the players. + + startPosition = lowerCaseString.indexOf("requires a roll"); + startPosition = lowerCaseString.indexOf("(", startPosition); + endPosition = lowerCaseString.indexOf(")", startPosition); + detailString = lowerCaseString.slice(startPosition, endPosition); + setOfWords = new Set((detailString.replace(/\W/g, " ").split(" "))); + intersection = new Set([...setOfWords].filter(x => searchSet.has(x))); + + if (intersection.size === 0) { + endPosition = detailString.indexOf("-", 0); + value = detailString.slice(0, endPosition); + value = value.replace(/\D/g, ''); + if (value.length !== 0) { + value = Number(value); + } + } + } + + return { + "hasRoll": answer, + "skillRoll": value + } + } + + + var reducedDCV = function(inputString) { + // Search for the Concentration limitation. + inputString = inputString.toLowerCase(); + let answer; + + if (inputString.includes("0 dcv")) { + answer = "zero"; + } else if (inputString.includes("1/2 dcv")) { + answer = "half"; + } else { + answer = "full"; + } + + return answer; + } + + + var reducedRMod = function(inputString) { + // Search for half or zero range modifier advantages. + inputString = inputString.toLowerCase(); + let answer; + + if (inputString.includes("no range modifier")) { + answer = "zero"; + } else if (inputString.includes("half range modifier")) { + answer = "half"; + } else { + answer = "STD"; + } + + return answer; + } + + + var modifiedSTUNx = function(inputString) { + // Search for a STUNx multiplier. + inputString = inputString.toLowerCase(); + let answer; + + if (inputString.includes("-2 decreased stun multiplier")) { + answer = "-2"; + } else if (inputString.includes("-1 decreased stun multiplier")) { + answer = "-1"; + } else if (inputString.includes("+1 increased stun multiplier")) { + answer = "1"; + } else if (inputString.includes("+2 increased stun multiplier")) { + answer = "2"; + } else { + answer = "0"; + } + + return answer; + } + + + var getWeaponStrMin = function (weaponString, script_name) { + // Parse weapon text and look for one of three strings used + // by Hero Designer to record a weapon strength minimum. + let strengthMin = 0; + let strengthString; + let startParenthesis; + let endParenthesis; + let valueString; + let defaultStrength = 0; + + if (weaponString !== "") { + if (weaponString.includes("STR Minimum")) { + tempPosition = weaponString.indexOf("STR Minimum"); + startParenthesis = weaponString.indexOf("(", tempPosition + 11); + endParenthesis = weaponString.indexOf(")", tempPosition + 11); + strengthString = weaponString.slice(tempPosition + 11, startParenthesis); + + // Get the limitation value in case no strength is available. + valueString = weaponString.slice(startParenthesis+1, endParenthesis); + valueString = valueString.replace(/\s/g, ""); + + switch(valueString) { + case "-1/4": + defaultStrength = 4; + break; + case "-1/2": + defaultStrength = 9; + break; + case "-3/4": + defaultStrength = 14; + break; + case "-1": + defaultStrength = 19; + break; + default: + defaultStrength = 1; + } + + // Check to see if a strength range is used: + if (strengthString.includes("-")) { + tempPosition = strengthString.indexOf("-"); + strengthString = strengthString.substring(0, tempPosition); + } + + strengthMin = parseInt(strengthString.replace(/\D/g, ""))||defaultStrength; + + } else if (weaponString.includes("STR Min")) { + tempPosition = weaponString.indexOf("STR Min"); + startParenthesis = weaponString.indexOf("(", tempPosition + 8); + endParenthesis = weaponString.indexOf(")", tempPosition + 8); + strengthString = weaponString.slice(tempPosition + 8, startParenthesis); + + // Get the limitation value in case no strength is available. + valueString = weaponString.slice(startParenthesis+1, endParenthesis); + valueString = valueString.replace(/\s/g, ""); + + switch(valueString) { + case "-1/4": + defaultStrength = 4; + break; + case "-1/2": + defaultStrength = 9; + break; + case "-3/4": + defaultStrength = 14; + break; + case "-1": + defaultStrength = 19; + break; + default: + defaultStrength = 1; + } + + // Check to see if a strength range is used: + if (strengthString.includes("-")) { + tempPosition = strengthString.indexOf("-"); + strengthString = strengthString.substring(0, tempPosition); + } + + strengthMin = parseInt(strengthString.replace(/\D/g, ""))||defaultStrength; + + } else { + strengthMin = 0; + } + } else { + strengthMin = 0; + } + + return strengthMin; + } + + + var getWeaponRange = function (rangeString, strength, mass, script_name) { + // Parses range string for numeric characters. + // If "var" is found, calls the range based strength function "calculateRange". + + let range = 0; + + if (rangeString !== "") { + if (rangeString.includes("var")) { + range = calculateRange(strength, mass); + } else { + range = parseInt(rangeString.replace(/[^\d.-]/g, "")); + } + } else { + range = 0; + } + + return range; + } + + + var getWeaponStrength = function (strengthMin, strengthMax, script_name) { + // Returns STR in increments of 5 above strengthMin up to strengthMax. + + let differenceDC = 0; + let strength = strengthMax; + + if (strengthMax >= strengthMin) { + differenceDC = Math.floor( (strengthMax - strengthMin)/5 ); + strength = strengthMin + 5 * differenceDC; + } + + return strength; + } + + + var getPowerDamage = function (damageString, effect, strength, script_name) { + // Parses damageString for damage dice. + + let damage = "0"; + let DC = 0; + let strDC = Math.floor(strength/5); + let halfDie = (((strength % 5) === 3) || ((strength % 5) === 4)) ? true : false; + let lastIndex = 0; + let detailString; + let startPosition; + let endPosition; + var diceSet = new Set(["Aid", "Blast", "Dispel", "Drain", "Entangle", "Flash", "HTH Attack", "HTH Killing Attack", "Ranged Killing Attack", "Healing", "Luck", "Mental Blast", "Mental Illusions", "Mind Control", "Mind Scan", "Transform", "Telepathy"]); + + if (diceSet.has(effect)) { + if (damageString.includes("standard effect")) { + startPosition = damageString.indexOf("standard effect"); + endPosition = damageString.indexOf(")", startPosition); + detailString = damageString.slice(startPosition+16, endPosition); + damage = detailString; + } else { + if ((damageString.match(/d6/g) || []).length > 1) { + damageString = damageString.replace("d6", "d6+"); + lastIndex = damageString.lastIndexOf("d6+"); + damageString = damageString.substring(0, lastIndex) + "d6" + damageString.substring(lastIndex + 2); + } + + // Sometimes the damage string contains extra bits after a comma. Drop them. + if (damageString.includes(",")) { + damageString = damageString.split(",")[0]; + } + + // Look for (xd6 w/STR) and use that. + if (damageString.includes(" w/STR")) { + damageString = damageString.match(/\(([^)]*)\)/)[1]; + damageString = damageString.replace(" w/STR", ""); + damageString = damageString.trim(); + } else if (effect === "HTH Attack") { + endPosition = damageString.indexOf("d"); + detailString = damageString.substring(0,endPosition); + DC = parseInt(detailString.replace(/[^0-9]/g, ""))||0; + DC += strDC; + damageString = DC.toString() + "d6"; + damageString += halfDie ? "+d3" : ""; + } + + // Make sure the 1/2d6 is a 1d3. + if (damageString.includes(" 1/2d6")) { + damage = damageString.replace(" 1/2d6", "d6+d3"); + } else if (damageString.includes("1/2d6")) { + damage = damageString.replace("1/2d6", "d3"); + } else { + damage = damageString; + } + } + } else { + damage = "0"; + } + + return damage; + } + + + var getCharacteristicMod = function (inputString, searchString, script_name) { + let charMod = 0; + let lastIndex = 0; + let detailString = ""; + let startPosition = 0; + let endPosition = 0; + let lowerCaseString = inputString.toLowerCase(); + + const specialArray = ["real weapon", "only works", "only for", "only to", "only applies", "only when", "attacks", "requires a roll", "for up to"]; + var leadingSet = new Set(["STR", "DEX", "CON", "INT", "EGO", "PRE", "OCV", "DCV", "OMCV", "DMCV", "PD", "ED", "BODY", "STUN", "END", "REC", "PER"]); + var trailingSet = new Set(["Running", "Leaping", "Swimming", "Flight"]); + + if (specialArray.some(v => lowerCaseString.includes(v))) { + // We don't want to add overall modifications for special cases. + charMod = 0; + } else if (leadingSet.has(searchString)) { + endPosition = inputString.indexOf(searchString); + detailString = inputString.slice(0, endPosition); + startPosition = detailString.includes("+") ? detailString.indexOf("+") : 0; + detailString = detailString.slice(startPosition, endPosition); + charMod = detailString.replace(/[^0-9\-]/g, ''); + if (charMod === "") { + charMod = 0; + } + } else if (trailingSet.has(searchString)) { + startPosition = inputString.indexOf(searchString); + detailString = inputString.slice(startPosition + searchString.length); + endPosition = detailString.includes("m") ? detailString.indexOf("m") : detailString.length; + detailString = detailString.slice(startPosition, endPosition); + charMod = detailString.replace(/[^0-9\-]/g, ''); + if (charMod === "") { + charMod = 0; + } + } else { + charMod = 0; + } + + if (verbose) { + sendChat(script_name, "Applied characteristic mod " + searchString + " + " + charMod.toString()); + } + + // Make sure we don't return something nasty. + return isNaN(charMod) ? 0 : Math.max(-99, Math.min( (parseInt(charMod)||0), 99)); + } + + + var getGrowthMod = function (inputString, searchString, script_name) { + let charMod = 0; + let lastIndex = 0; + let detailString = ""; + let startPosition; + let lowerCaseString = inputString.toLowerCase(); + + const specialArray = ["real weapon", "only works", "only for", "only to", "only applies", "only when", "requires a roll", "for up to"]; + var leadingSet = new Set(["STR", "DEX", "CON", "INT", "EGO", "PRE", "OCV", "DCV", "OMCV", "DMCV", "PD", "ED", "BODY", "STUN", "END", "REC", "PER","Running", "Leaping", "Swimming", "Flight"]); + + if (specialArray.some(v => lowerCaseString.includes(v))) { + // We don't want to add overall modifications for special cases. + charMod = 0; + } else if (leadingSet.has(searchString)) { + endPosition = inputString.indexOf(searchString); + detailString = inputString.slice(0, endPosition); + startPosition = detailString.includes("+") ? detailString.indexOf("+") : 0; + detailString = detailString.slice(startPosition, endPosition); + charMod = detailString.replace(/[^0-9\-]/g, ''); + if (charMod === "") { + charMod = 0; + } + } else { + charMod = 0; + } + + return Math.max(-99, Math.min( (parseInt(charMod)||0), 99)); + } + + + var getWeaponDamage = function (damageString, script_name) { + // Parses damageString for damage dice. + + let damage = "0"; + let lastIndex = 0; + let detailString; + let startPosition; + let endPosition; + + if (damageString.includes("standard effect")) { + startPosition = damageString.indexOf("standard effect"); + endPosition = damageString.indexOf(")", startPosition); + detailString = damageString.slice(startPosition+16, endPosition); + damage = detailString; + } else { + // Remove dice in w/STR since we'll calculated it. + if (damageString.includes(" w/STR")) { + damageString = damageString.replace(/\([^()]*\)/g, ""); + } + + // Separate joined dice if present. + if ((damageString.match(/d6/g) || []).length > 1) { + damageString = damageString.replace("d6", "d6+"); + lastIndex = damageString.lastIndexOf("d6+"); + damageString = damageString.substring(0, lastIndex) + "d6" + damageString.substring(lastIndex + 2); + } + + // Make sure the 1/2d6 is a 1d3. + if (damageString.includes(" 1/2d6")) { + damage = damageString.replace(" 1/2d6", "d6+d3"); + } else if (damageString.includes("1/2d6")) { + damage = damageString.replace("1/2d6", "d3"); + } else { + damage = damageString; + } + } + + return damage; + } + + + var checkDamageBySTR = function (damageString, script_name) { + damageBySTR = false; + + if (damageString.includes(" w/STR")) { + damageBySTR = true; + } + + return damageBySTR; + } + + + var getArmorLocations = function (inputString, script_name) { + let locations = ""; + let startPosition = 0; + let endPosition = 0; + + inputString = inputString.toLowerCase(); + + if (inputString.includes("location")) { + startPosition = inputString.indexOf("location"); + locations = inputString.slice(startPosition); + if (locations.includes(';')) { + endPosition = locations.indexOf(';'); + locations = locations.slice(0,endPosition); + } else if (locations.includes(')')) { + endPosition = locations.indexOf(')'); + locations = locations.slice(0,endPosition); + } else { + endPosition = Math.min(28, locations.length); + locations = locations.slice(0,endPosition); + } + locations = locations.replace(/[^\d,-]/g, ""); + if (locations.includes(',')) { + locations = locations.replace(',', ", "); + } + } else if (inputString.includes("loc")) { + startPosition = inputString.indexOf("loc"); + locations = inputString.slice(startPosition); + if (locations.includes(';')) { + endPosition = locations.indexOf(';'); + locations = locations.slice(0,endPosition); + } else if (locations.includes(')')) { + endPosition = locations.indexOf(')'); + locations = locations.slice(0,endPosition); + } else { + endPosition = Math.min(11, locations.length); + locations = locations.slice(0,endPosition); + } + locations = locations.replace(/[^\d,-]/g, ""); + if (locations.includes(',')) { + locations = locations.replace(',', ", "); + } + } + + return locations.trim(); + } + + + var getArmorEND = function (inputString, script_name) { + let tempString = ""; + let endurance = 0; + let startPosition = 0; + let endPosition = 0; + + inputString = inputString.toLowerCase(); + + if (inputString.includes("end/turn:")) { + startPosition = inputString.indexOf("end/turn:") + 9; + endPosition = Math.min(inputString.length, startPosition + 2); + tempString = inputString.slice(startPosition, endPosition); + endurance = parseInt(tempString.replace(/[^\d]/g, ""))||0; + } else if (inputString.includes("end/turn")) { + endPosition = inputString.indexOf("end/turn"); + startPosition = Math.max(0, endPosition - 2); + tempString = inputString.slice(startPosition, endPosition); + endurance = parseInt(tempString.replace(/[^\d]/g, ""))||0; + } else { + endurance = 0; + } + + return endurance; + } + + + var findDamageAdvantages = function (weaponString, script_name) { + // See 6E2 98 for a list of advantages that affect weapon damage. + let advantage = 0; + let temp = 0; + let searchString = ""; + + weaponString = weaponString.toLowerCase(); + + searchString = "area of effect"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "armor piercing"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "autofire"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "attack versus alternate defense"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "boostable"; + advantage += getSingleAdvantage (weaponString, searchString); + + if (weaponString.includes("constant")) { + advantage += 0.5; + } + + searchString = "cumulative"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "damage over time"; + advantage += getSingleAdvantage (weaponString, searchString); + + if (weaponString.includes("does body")) { + advantage += 1; + } + + if (weaponString.includes("does knockback")) { + advantage += 0.25; + } + + if (weaponString.includes("double knockback")) { + advantage += 0.5; + } + + if (weaponString.includes("+1 increased stun multiplier")) { + advantage += 0.25; + } else if (weaponString.includes("+2 increased stun multiplier")) { + advantage += 0.50; + } + + searchString = "penetrating"; + advantage += getSingleAdvantage (weaponString, searchString); + + // Check for the ranged advantage. + if (weaponString.includes("range based on str (+1/4)")) { + advantage += 0.25; + } else if (weaponString.includes("ranged (+1/2)")) { + advantage += 0.50; + } + + if (weaponString.includes("sticky")) { + advantage += 0.5; + } + + searchString = "time limit"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "transdimensional"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "trigger"; + advantage += getSingleAdvantage (weaponString, searchString); + + if (weaponString.includes("uncontrolled")) { + advantage += 0.5; + } + + searchString = "variable advantage"; + advantage += getSingleAdvantage (weaponString, searchString); + + searchString = "variable special effects"; + advantage += getSingleAdvantage (weaponString, searchString); + + return advantage; + } + + var getSingleAdvantage = function(weaponString, searchString) { + let advantage = 0; + + if (weaponString.includes(searchString)) { + searchString = weaponString.slice(weaponString.indexOf(searchString) + searchString.length); + searchString = searchString.match(/\(([^)]+)\)/)[0]; + + advantage = findAdvantages(searchString); + + if (advantage < 0) { + advantage = 0; + } + } + + return advantage; + } + + + var calculateRange = function(strength, mass) { + // Determines range based on strength. + let liftCapability; + let freeCapability; + let effectiveStrength; + let range; + + // First calculate carrying capacity. + switch (strength) { + case 0: liftCapability = 0; + break; + case 1: liftCapability = 8; + break; + case 2: liftCapability = 16; + break; + case 3: liftCapability = 25; + break; + case 4: liftCapability = 38; + break; + default: liftCapability=Math.round(25*Math.pow(2,(strength/5))); + } + + // Subtract the thrown weight from capacity. + freeCapability = liftCapability-mass; + + // Determine unused strength and calculate range. + if (freeCapability <= 0) { + range = 0; + } else { + if (freeCapability <= 8) { + effectiveStrength = 1; + range = 2; + } else if (freeCapability <= 16) { + effectiveStrength = 2; + range = 3; + } else if (freeCapability <= 25) { + effectiveStrength = 3; + range = 4; + } else if (freeCapability <= 38) { + effectiveStrength = 4; + range = 6; + } else { + effectiveStrength = 5 * Math.log2(freeCapability/25); + range = Math.round(8 * effectiveStrength/5); + } + } + + return parseInt(Math.round(range)); + } + + + var getItemMass = function(massString, script_name) { + // Remove units from mass and round to one decimal. + let mass = 0; + + if (massString !== "") { + massString = parseFloat(massString.replace(/[^\d.-]/g, "")); + mass = Math.round(10*massString)/10; + } + + return mass; + } + + + var getStunModifier = function(itemString, script_name) { + // Parse string for STUN multiple. + let stunModifier = 0; + let tempPosition; + + if ((typeof itemString !== "undefined") && (itemString.length !== 0)) { + if (itemString.includes("Increased STUN Multiplier")) { + tempPosition = itemString.indexOf("Increased STUN Multiplier"); + stunModifier = parseInt(itemString.substr(tempPosition-3, 2)); + } else if (itemString.includes("Decreased STUN Multiplier")) { + tempPosition = itemString.indexOf("Decreased STUN Multiplier"); + stunModifier = parseInt(itemString.substr(tempPosition-3, 2)); + } + } + + return stunModifier; + } + + + var getOCVmodifier = function(weaponString, script_name) { + // Parse weapon string for OCV modifier or penalty. + let ocvModifier = 0; + let tempPosition; + let subString; + + // First, remove Range Modifier OCV if present. + weaponString = weaponString.replace("OCV modifier",""); + + // Then search for OCV bonus. + if ((weaponString !== "") && (weaponString.includes("OCV"))) { + tempPosition = weaponString.indexOf("OCV"); + subString = weaponString.slice(0, tempPosition); + + // If there is a modifier before the OCV entry, drop characters up to that point. + if (subString.includes(")")) { + tempPosition = subString.lastIndexOf(")"); + subString = subString.substr(tempPosition); + } + + subString = subString.replace(/[^\d-]/g, ""); + ocvModifier = parseInt(subString); + } + + return ocvModifier; + } + + + var heroRoundUp = function(numerator, denominator) { + + if (denominator > 0) { + const intermediate = numerator/denominator; + const remainder = Math.floor((numerator % denominator)*10)/10; + + if (remainder < 0.5) { + return Math.floor(intermediate); + } else { + return Math.ceil(intermediate); + } + } + + // Error. Return unmodified value. + return numerator; + } + + + var heroRoundDown = function(numerator, denominator) { + + if (denominator > 0) { + const intermediate = numerator/denominator; + const remainder = Math.floor((numerator % denominator)*10)/10; + + if (remainder < 0.6) { + return Math.floor(intermediate); + } else { + return Math.ceil(intermediate); + } + } + + // Error. Return unmodified value. + return numerator; + } + + +/* **************************************** */ +/* *** END Importing Functions *** */ +/* **************************************** */ + + // TEST + const createSingleWriteQueue = (attributes) => { + // this is the list of trigger attributes that will trigger class recalculation, as of 5e OGL 2.5 October 2018 + // (see on... handler that calls update_class in sheet html) + // these are written first and individually, since they trigger a lot of changes + let class_update_triggers = [ + 'strength']; + + // set class first, everything else is alphabetical + let classAttribute = class_update_triggers.shift(); + class_update_triggers.sort(); + class_update_triggers.unshift(classAttribute); + + // write in deterministic order (class first, then alphabetical) + + let items = []; + + for (trigger of class_update_triggers) { + let value = attributes[trigger]; + if ((value === undefined) || (value === null)) { + continue; + } + items.push([trigger, value]); + log('hero: trigger attribute ' + trigger); + delete attributes[trigger]; + } + + return items; + } + + + const reportReady = (character) => { + // From Beyond. Left as-is. + // + // TODO this is nonsense. we aren't actually done importing, because notifications in the character sheet are firing for quite a while + // after we finish changing things (especially on first import) and we have no way (?) to wait for it to be done. These are not sheet workers + // on which we can wait. + // sendChat(script_name, '
Import of ' + character.character_name + ' is ready at https://journal.roll20.net/character/' + object.id +'
', null, {noarchive:true}); + return; + } + + + const blankIfNull = (input) => { + return (input === null)?"":input; + } + + + const ucFirst = (string) => { + if(string == null) return string; + return string.charAt(0).toUpperCase() + string.slice(1); + }; + + + const sendConfigMenu = (player, first) => { + let playerid = player.id; + let prefix = (state[state_name][playerid].config.prefix !== '') ? state[state_name][playerid].config.prefix : '[NONE]'; + let prefixButton = makeButton(prefix, '!hero --config prefix|?{Prefix}', buttonStyle); + let suffix = (state[state_name][playerid].config.suffix !== '') ? state[state_name][playerid].config.suffix : '[NONE]'; + let suffixButton = makeButton(suffix, '!hero --config suffix|?{Suffix}', buttonStyle); + let overwriteButton = makeButton(state[state_name][playerid].config.overwrite, '!hero --config overwrite|'+!state[state_name][playerid].config.overwrite, buttonStyle); + let debugButton = makeButton(state[state_name][playerid].config.debug, '!hero --config debug|'+!state[state_name][playerid].config.debug, buttonStyle); + let optionMaximumsButton = makeButton(state[state_name][playerid].config.maximums, '!hero --config maximums|'+!state[state_name][playerid].config.maximums, buttonStyle); + let optionLiteracyButton = makeButton(state[state_name][playerid].config.literacy, '!hero --config literacy|'+!state[state_name][playerid].config.literacy, buttonStyle); + let optionSuperENDButton = makeButton(state[state_name][playerid].config.superEND, '!hero --config superEND|'+!state[state_name][playerid].config.superEND, buttonStyle); + let optionLocationsButton = makeButton(state[state_name][playerid].config.locations, '!hero --config locations|'+!state[state_name][playerid].config.locations, buttonStyle); + + let listItems = [ + 'Overwrite: '+overwriteButton+'
CAUTION: overwrites an existing character sheet that has a matching character name.', + 'Prefix: '+prefixButton, + 'Suffix: '+suffixButton, + 'Verbose Report: '+debugButton, + ] + + let list = 'Importer'+makeList(listItems, 'overflow: hidden; list-style: none; padding: 0; margin: 0;', 'overflow: hidden; margin-top: 5px;'); + + let inPlayerJournalsButton = makeButton(player.get('displayname'), "", buttonStyle); + let controlledByButton = makeButton(player.get('displayname'), "", buttonStyle); + if(playerIsGM(playerid)) { + let players = ""; + let playerObjects = findObjs({ + _type: "player", + }); + for(let i = 0; i < playerObjects.length; i++) { + players += '|'+playerObjects[i]['attributes']['_displayname']+','+playerObjects[i].id; + } + + let ipj = state[state_name][playerid].config.inplayerjournals == "" ? '[NONE]' : state[state_name][playerid].config.inplayerjournals; + if(ipj != '[NONE]' && ipj != 'all') ipj = getObj('player', ipj).get('displayname'); + inPlayerJournalsButton = makeButton(ipj, '!hero --config inplayerjournals|?{Player|None,[NONE]|All Players,all'+players+'}', buttonStyle); + let cb = state[state_name][playerid].config.controlledby == "" ? '[NONE]' : state[state_name][playerid].config.controlledby; + if(cb != '[NONE]' && cb != 'all') cb = getObj('player', cb).get('displayname'); + controlledByButton = makeButton(cb, '!hero --config controlledby|?{Player|None,[NONE]|All Players,all'+players+'}', buttonStyle); + } + + let sheetListItems = [ + 'In Player Journal: ' + inPlayerJournalsButton, + 'Player Control: ' + controlledByButton, + 'Use Char Maximums: ' + optionMaximumsButton, + 'Literacy Costs CP: ' + optionLiteracyButton, + 'Super-Heroic END: ' + optionSuperENDButton, + 'Use Hit Locations: ' + optionLocationsButton + ] + + let sheetList = '
Character Sheet'+makeList(sheetListItems, 'overflow: hidden; list-style: none; padding: 0; margin: 0;', 'overflow: hidden; margin-top: 5px;'); + + // Set verbose (debug) option + let debug = ""; + if(state[state_name][playerid].config.debug){ + // The original version here would generate debug option buttons. For now, we will only change the verbose reporting state. + verbose = true; + } else { + verbose = false; + } + + // Set characteristic maximums option + if(state[state_name][playerid].config.maximums){ + defaultAttributes.useCharacteristicMaximums = "on"; + } else { + defaultAttributes.useCharacteristicMaximums = 0; + } + + // Set literacy cost option + if(state[state_name][playerid].config.literacy){ + defaultAttributes.optionLiteracyCostsPoints = "on"; + } else { + defaultAttributes.optionLiteracyCostsPoints = 0; + } + + // Set super-heroic END option + if(state[state_name][playerid].config.superEND){ + defaultAttributes.optionSuperHeroicEndurance = "on"; + } else { + defaultAttributes.optionSuperHeroicEndurance = 0; + } + + // Set hit location system option + if(state[state_name][playerid].config.locations){ + defaultAttributes.optionHitLocationSystem = "on"; + } else { + defaultAttributes.optionHitLocationSystem = 0; + } + + let resetButton = makeButton('Reset', '!hero --reset', altButtonStyle + ' margin: auto; width: 90%; display: block; float: none;'); + + //let title_text = (first) ? script_name + ' First Time Setup' : script_name + ' Config'; + let title_text = (first) ? 'HD Importer First Time Setup' : 'HD Importer Configuration'; + let text = '
'+makeTitle(title_text)+list+sheetList+debug+'
'+resetButton+'
'; + + sendChat(script_name, '/w "' + player.get('displayname') + '" ' + text, null, {noarchive:true}); + }; + + + const sendHelpMenu = (player, first) => { + let configButton = makeButton('Config', '!hero --config', altButtonStyle+' margin: auto; width: 90%; display: block; float: none;'); + + let listItems = [ + '!hero --help
Shows this menu.', + '!hero --config
Shows the configuration menu. (GM only)', + '!hero --import [CHARACTER JSON]
Imports a character from Hero Designer.', + ]; + + let command_list = makeList(listItems, 'list-style: none; padding: 0; margin: 0;'); + + let text = '
'; + //text += makeTitle(script_name + ' Help'); + text += makeTitle('HD Importer Help'); + text += '

Export a character in Hero Designer using the HeroSystem6eHeroic.hde format.

'; + text += '

Locate and open the exported .txt file in a text editor. Copy its entire contents and paste them into the Roll20 chat window. Hit enter.

'; + text += '

For more information see the documentation page in the HDImporter Github repository.

'; + text += '
'; + text += 'Commands:'+command_list; + text += '
'; + text += configButton; + text += '
'; + + sendChat(script_name, '/w "'+ player.get('displayname') + '" ' + text, null, {noarchive:true}); + }; + + + const makeTitle = (title) => { + return '

'+title+'

'; + }; + + + const makeButton = (title, href, style) => { + return ''+title+''; + }; + + + const makeList = (items, listStyle, itemStyle) => { + let list = '
    '; + items.forEach((item) => { + list += '
  • '+item+'
  • '; + }); + list += '
'; + return list; + }; + + + const replaceChars = (text) => { + text = text.replace('\&rsquo\;', '\'').replace('\&mdash\;','—').replace('\ \;',' ').replace('\&hellip\;','…'); + text = text.replace('\ \;', ' '); + text = text.replace('\û\;','û').replace('’', '\'').replace(' ', ' '); + text = text.replace(/]+>/gi,'• ').replace(/<\/li>/gi,''); + text = text.replace(/\r\n(\r\n)+/gm,'\r\n'); + return text; + }; + + + const getRepeatingRowIds = (section, attribute, matchValue, index) => { + let ids = []; + if(state[state_name][hero_caller.id].config.overwrite) { + let matches = findObjs({ type: 'attribute', characterid: object.id }) + .filter((attr) => { + return attr.get('name').indexOf('repeating_'+section) !== -1 && attr.get('name').indexOf(attribute) !== -1 && attr.get('current') == matchValue; + }); + for(let i in matches) { + let row = matches[i].get('name').replace('repeating_'+section+'_','').replace('_'+attribute,''); + ids.push(row); + } + if(ids.length == 0) ids.push(generateRowID()); + } + else ids.push(generateRowID()); + + if(index == null) return ids; + else return ids[index] == null && index >= 0 ? generateRowID() : ids[index]; + } + + + // Return an array of objects according to key, value, or key and value matching, optionally ignoring objects in array of names + const getObjects = (obj, key, val, except) => { + except = except || []; + let objects = []; + for (let i in obj) { + if (!obj.hasOwnProperty(i)) continue; + if (typeof obj[i] == 'object') { + if (except.indexOf(i) != -1) { + continue; + } + objects = objects.concat(getObjects(obj[i], key, val)); + } else + //if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) + if (i == key && obj[i] == val || i == key && val == "") { // + objects.push(obj); + } else if (obj[i] == val && key == ""){ + //only add if the object is not already in the array + if (objects.lastIndexOf(obj) == -1){ + objects.push(obj); + } + } + } + return objects; + }; + + // This section from Beyond is not used in HS6eH_HDImporter, but may be useful in future. + // + // Find an existing repeatable item with the same name, or generate new row ID + // const getOrMakeRowID = (character,repeatPrefix,name) => { + // // Get list of all of the character's attributes + // let attrObjs = findObjs({ _type: "attribute", _characterid: character.get("_id") }); + // + // let i = 0; + // while (i < attrObjs.length) + // { + // // If this is a feat taken multiple times, strip the number of times it was taken from the name + // let attrName = attrObjs[i].get("current").toString(); + // if (regexIndexOf(attrName, / x[0-9]+$/) !== -1) + // attrName = attrName.replace(/ x[0-9]+/,""); + // + // if (attrObjs[i].get("name").indexOf(repeatPrefix) !== -1 && attrObjs[i].get("name").indexOf("_name") !== -1 && attrName === name) + // return attrObjs[i].get("name").substring(repeatPrefix.length,(attrObjs[i].get("name").indexOf("_name"))); + // i++; + // i++; + // } + // return generateRowID(); + // }; + + + const generateUUID = (function() { + let a = 0, b = []; + return function() { + let c = (new Date()).getTime() + 0, d = c === a; + a = c; + for (var e = new Array(8), f = 7; 0 <= f; f--) { + e[f] = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(c % 64); + c = Math.floor(c / 64); + } + c = e.join(""); + if (d) { + for (f = 11; 0 <= f && 63 === b[f]; f--) { + b[f] = 0; + } + b[f]++; + } else { + for (f = 0; 12 > f; f++) { + b[f] = Math.floor(64 * Math.random()); + } + } + for (f = 0; 12 > f; f++){ + c += "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(b[f]); + } + return c; + }; + }()); + + + const generateRowID = function() { + "use strict"; + return generateUUID().replace(/_/g, "Z"); + }; + + + const regexIndexOf = (str, regex, startpos) => { + let indexOf = str.substring(startpos || 0).search(regex); + return (indexOf >= 0) ? (indexOf + (startpos || 0)) : indexOf; + }; + + + const pre_log = (message) => { + log('---------------------------------------------------------------------------------------------'); + log(message); + log('---------------------------------------------------------------------------------------------'); + }; + + + const checkInstall = function() { + if(!_.has(state, state_name)){ + state[state_name] = state[state_name] || {}; + } + setDefaults(); + }; + + + const setDefaults = (reset) => { + const defaults = { + overwrite: false, + debug: false, + prefix: '', + suffix: '', + inplayerjournals: '', + controlledby: '', + maximums: false, + literacy: false, + superEND: false, + locations: false + }; + + let playerObjects = findObjs({ + _type: "player", + }); + playerObjects.forEach((player) => { + if(!state[state_name][player.id]) { + state[state_name][player.id] = {}; + } + + if(!state[state_name][player.id].config) { + state[state_name][player.id].config = defaults; + } + + for(let item in defaults) { + if(!state[state_name][player.id].config.hasOwnProperty(item)) { + state[state_name][player.id].config[item] = defaults[item]; + } + } + + if(!state[state_name][player.id].config.hasOwnProperty('firsttime')){ + if(!reset){ + sendConfigMenu(player, true); + } + state[state_name][player.id].config.firsttime = false; + } + }); + }; + + +})(); \ No newline at end of file diff --git a/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT b/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT new file mode 100644 index 000000000..c54de45f4 --- /dev/null +++ b/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT @@ -0,0 +1 @@ + !hero --import { "character":{ "character_name":"Darci", "character_title":"Fae-Cursed", "height":"1.66 m", "weight":"60.00 kg", "eyes":"Brown", "hair":"Brown", "backgroundText":"Darci grew up in a small highland village, the daughter of a village healer, with no ambition save to learn her mother's trade. Her life was turned upside down when she encountered a trol while out collection herbs in the woods. The troll promised to tell her secrets of Fae magic in return for her friendship. Darci has regretted her kindness ever since. Exiled and feard by common folk and given little help by the Fae, Darci has found safety in the service of a mercenary company.", "historyText":"", "appearance":"", "tactics":"", "campaignUse":"", "quote":"Village Herbalist", "experience":"0", "experienceBenefit":"0", "strength":"17", "dexterity":"13", "constitution":"18", "intelligence":"18", "ego":"13", "presence":"10", "ocv":"4", "dcv":"4", "omcv":"3", "dmcv":"3", "speed":"4", "pd":"4", "ed":"3", "body":"14", "stun":"26", "endurance":"40", "recovery":"9", "running":"12", "leaping":"6", "swimming":"6", "equipment":{ "equipment01":{ "name":"Bronze Maille", "text":"Resistant Protection (4 PD/4 ED) (12 Active Points); Normal Mass (-1), OIF (-1/2), Requires A Roll (11- roll; Locations 7-14; -1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"11.40kg", "attack":"", "defense":"true", "notes":"(2 END/turn)" }, "equipment02":{ "name":"Bronze Cap", "text":"Resistant Protection (5 PD/5 ED) (15 Active Points); Normal Mass (-1), OIF (-1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"0.83kg", "attack":"", "defense":"true", "notes":"(Locations 5)" }, "equipment03":{ "name":"High Boots, Gloves", "text":"Resistant Protection (2 PD/2 ED) (6 Active Points); Normal Mass (-1), OIF (-1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"1.20kg", "attack":"", "defense":"true", "notes":"(Locations 16-18, 6-7)" }, "equipment04":{ "name":"Battle Axe", "text":"(Total: 46 Active Cost, 16 Real Cost) Killing Attack - Hand-To-Hand 2d6 (3d6 w/STR), Reduced Endurance (0 END; +1/2) (45 Active Points); OAF (-1), STR Min: 13 (-1/2), Real Weapon (-1/4), Required Hands One-And-A-Half-Handed (-1/4) (Real Cost: 15) plus (1 Active Points) (Real Cost: 1)", "damage":"2d6 (3d6 w/STR)", "end":"0", "range":"", "mass":"1.60kg", "attack":"true", "defense":"", "notes":"" }, "equipment05":{ "name":"Bronze Dagger", "text":"Killing Attack - Hand-To-Hand 1d6-1 (1d6 w/STR), Range Based On STR (+1/4), Reduced Endurance (0 END; +1/2) (17 Active Points); OAF (-1), Real Weapon (-1/4), STR Minimum 6 (-1/4)", "damage":"1d6-1 (1d6 w/STR)", "end":"0", "range":"var.", "mass":"0.80kg", "attack":"true", "defense":"", "notes":"" }, "equipment06":{ "name":"Winter Coat", "text":"Life Support (Safe in Intense Cold) (2 Active Points); OIF (-1/2)", "damage":"", "end":"0", "range":"", "mass":"3.30kg", "attack":"", "defense":"", "notes":"" }, "equipment07":{ "name":"(Multipower) Small Shield", "text":"Multipower, 5-point reserve, (5 Active Points); all slots OAF (-1), STR Min 6 (-1/4)", "damage":"", "end":"", "range":"", "mass":"3.00kg", "attack":"", "defense":"", "notes":"" }, "equipment08":{ "name":"(MPSlot1) ", "text":"+1 DCV (5 Active Points); OAF (-1), Real Armor (-1/4), STR Min 6 (-1/4)", "damage":"", "end":"", "range":"", "mass":"", "attack":"", "defense":"", "notes":"" }, "equipment09":{ "name":"(MPSlot2) Bash", "text":"Hand-To-Hand Attack +1d6 (5 Active Points); OAF (-1), Hand-To-Hand Attack (-1/2), Side Effects -1 OCV, Side Effect occurs automatically whenever Power is used (-1/2), Real Weapon (-1/4), STR Min 6 (-1/4)", "damage":"1d6", "end":"1", "range":"", "mass":"", "attack":"true", "defense":"", "notes":"" }, "equipment10":{ "name":"Healing Potion", "text":"Healing BODY 4d6 (40 Active Points); 3 Charges which Never Recover (-3 1/4), OAF Fragile (-1 1/4), Extra Time (Full Phase, -1/2), Gestures (-1/4)", "damage":"4d6", "end":"[3 nr]", "range":"", "mass":"1.30kg", "attack":"", "defense":"", "notes":"" }, "equipment11":{}, "equipment12":{}, "equipment13":{}, "equipment14":{}, "equipment15":{}, "equipment16":{} }, "maneuvers":{ "maneuver01":{ }, "maneuver02":{ }, "maneuver03":{ }, "maneuver04":{ }, "maneuver05":{ }, "maneuver06":{ }, "maneuver07":{ }, "maneuver08":{ }, "maneuver09":{ }, "maneuver10":{ }, "maneuver11":{ }, "maneuver12":{ }, "maneuver13":{ }, "maneuver14":{ }, "maneuver15":{ }, "maneuver16":{ }, "maneuver17":{ }, "maneuver18":{ }, "maneuver19":{ }, "maneuver20":{ } }, "perks":{ "perk01":{ "type":"Fringe Benefit", "points":"1", "text":"Member of a Mercenary CompanyFringe Benefit (0 Active Points)", "notes":"Some Perks Notes." }, "perk02":{ "type":"Fringe Benefit", "points":"1", "text":"Low-ranking member of Fae SocietyFringe Benefit (0 Active Points)", "notes":"" }, "perk03":{ }, "perk04":{ }, "perk05":{ }, "perk06":{ }, "perk07":{ }, "perk08":{ }, "perk09":{ }, "perk10":{ } }, "talents":{}, "complications":{ "complication01":{ "type":"Social Complication", "points":"10", "text":"Social Complication: Regarded as fae-touched and cursed. Frequently, Minor", "notes":"The mortal world tends to distrust anyone or anything touched by Fae." }, "complication02":{ "type":"Hunted", "points":"15", "text":"Hunted: Hunted by agents of Summer. Frequently (Mo Pow; Mildly Punish)", "notes":"While Darci hasn't reached the notoriety that would attract more dangerous agents, Summer won't hesitate to torment her and her companions." }, "complication03":{ "type":"Distinctive Features", "points":"5", "text":"Distinctive Features: Peculiar smell and hard-to-pin-down appearance. Not quite human. Trollish, to those who know of fae. (Easily Concealed; Noticed and Recognizable; Detectable By Commonly-Used Senses)", "notes":"" }, "complication04":{ "type":"Psychological Complication", "points":"20", "text":"Psychological Complication: Finds the touch of iron uncomfortable and won't wear iron armor or jewelry or use iron tools. (Very Common; Strong)", "notes":"" }, "complication05":{}, "complication06":{}, "complication07":{}, "complication08":{}, "complication09":{}, "complication10":{}, "complication11":{}, "complication12":{}, "complication13":{}, "complication14":{}, "complication15":{}, "complication16":{}, "complication17":{}, "complication18":{}, "complication19":{}, "complication20":{} }, "powers":{ "power01":{ "name":"Bile and Acid", "base":"15", "text":"Killing Attack - Ranged 1d6, Area Of Effect (4 2m Areas; +1/2), Damage Over Time, Target's defenses only apply once (3 damage increments, damage occurs every four Segments, can be negated by Water; +2 1/2) (60 Active Points); 3 Recoverable Charges (-3/4), Extra Time (Full Phase, -1/2), No Range (-1/2), Gestures (Requires both hands; -1/2), Side Effects (1d6+1d3 drain STUN; -1/4), Concentration (1/2 DCV; -1/4), Limited Power Power loses about a fourth of its effectiveness (Does not work in water; -1/4), Requires A Roll (Skill roll, -1 per 20 Active Points modifier; Magic Roll; -1/4)", "notes":"This effects of this spell don't paint a pretty picture, but they get the job done.", "cost":"14", "endurance":"[3 rc]", "damage":"1d6", "compound":"false" }, "power02":{ "name":"Pneuma", "base":"30", "text":"Killing Attack - Ranged 2d6, Invisible Power Effects (Inobvious to [one Sense Group]; +1/4) (37 Active Points); Requires A Roll (Skill roll; -1/2), Gestures (-1/4), Incantations (-1/4), Beam (-1/4), Limited Power Power loses about a fourth of its effectiveness (Does not work under water; -1/4)", "notes":"A pneuma is an invisible dart, which Darci draws from her breath with an exaggerated motion and throws at her target.", "cost":"15", "endurance":"4", "damage":"2d6", "compound":"false" }, "power03":{ "name":"Self Renewal", "base":"55", "text":"Healing BODY 5d6, Can Heal Limbs (55 Active Points); Increased Endurance Cost (x6 END; -2 1/2), Extra Time (1 Turn (Post-Segment 12), Character May Take No Other Actions, -1 1/2), Concentration, Must Concentrate throughout use of Constant Power (0 DCV; Character is totally unaware of nearby events; -1 1/2), OAF (Eat a sprig of evergreen; -1), Gestures (Requires both hands; -1/2), Life Energy Modifier Power loses about a third of its effectiveness (-1/2), Self Only Power loses about a third of its effectiveness (-1/2), Incantations (-1/4), Requires A Roll (Characteristic roll, -1 per 20 Active Points modifier; -1/4)", "notes":"Darci can draw from the regenerative powers of trolls after an intense and painful bout of concentration.", "cost":"6", "endurance":"30", "damage":"5d6", "compound":"false" }, "power04":{ "name":"Underdark Eyes", "base":"5", "text":"Nightvision (5 Active Points); Gestures (Requires both hands; -1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4)", "notes":"Trolls may be unpleasant creatures, but they can see in the dark.", "cost":"2", "endurance":"0", "damage":"", "compound":"false" }, "power05":{ "name":"Winter's Shawl", "base":"12", "text":"Life Support (Immunity All terrestrial diseases; Immunity: All terrestrial poisons; Safe in Intense Cold) (12 Active Points); Costs Endurance (-1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4)", "notes":"The trolls of the Winter Court can survive most any winter storm or natural plague.", "cost":"5", "endurance":"1", "damage":"", "compound":"false" }, "power06":{ "name":"Fae Sense", "base":"10", "text":"Detect Magic A Class Of Things 13- (no Sense Group), Range (10 Active Points); Increased Endurance Cost (x4 END; -3/4), Gestures (Requires both hands; -1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4), Costs Endurance (Only Costs END to Activate; -1/4)", "notes":"The Fae have a knack for spotting ley lines and other magics in their enviornments.", "cost":"3", "endurance":"4", "damage":"13-", "compound":"false" }, "power07":{ }, "power08":{ }, "power09":{ }, "power10":{ }, "power11":{ }, "power12":{ }, "power13":{ }, "power14":{ }, "power15":{ }, "power16":{ }, "power17":{ }, "power18":{ }, "power19":{ }, "power20":{ }, "power21":{ }, "power22":{ }, "power23":{ }, "power24":{ }, "power25":{ }, "power26":{ }, "power27":{ }, "power28":{ }, "power29":{ }, "power30":{ } }, "skills": { "skill01": { "name":"", "enhancer":"", "text":"PS: Soldier 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill02": { "name":"", "enhancer":"", "text":"PS: Herbalist 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"0", "levels":"0", "cost":"0" }, "skill03": { "name":"", "enhancer":"", "text":"Language: Clan's Tongue (basic conversation; literate) (2 Active Points)", "display":"Language", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"0" }, "skill04": { "name":"", "enhancer":"", "text":"Language: King's Tongue (fluent conversation)", "display":"Language", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill05": { "name":"", "enhancer":"", "text":"Language: Fae (completely fluent; literate)", "display":"Language", "attribute":"GENERAL", "base":"4", "levels":"0", "cost":"4" }, "skill06": { "name":"", "enhancer":"", "text":"+3 Battleaxe", "display":"Combat Skill Levels", "attribute":"GENERAL", "base":"6", "levels":"3", "cost":"6" }, "skill07": { "name":"Fae Society", "enhancer":"", "text":"KS 11-", "display":"KS", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill08": { "name":"Clan Lands", "enhancer":"", "text":"AK 11-", "display":"Knowledge Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill09": { "name":"Common Melee", "enhancer":"", "text":"WF: Common Melee Weapons", "display":"Weapon Familiarity", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill10": { "name":"Power Skill Fae Magic", "enhancer":"", "text":"Power 15-", "display":"Power", "attribute":"INT", "base":"7", "levels":"2", "cost":"7" }, "skill11": { "name":"", "enhancer":"", "text":"Stealth 12-", "display":"Stealth", "attribute":"DEX", "base":"3", "levels":"0", "cost":"3" }, "skill12": { "name":"", "enhancer":"", "text":"Teamwork 12-", "display":"Teamwork", "attribute":"DEX", "base":"3", "levels":"0", "cost":"3" }, "skill13": { "name":"", "enhancer":"", "text":"Concealment 13-", "display":"Concealment", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill14": { "name":"", "enhancer":"", "text":"Science Skill: Herbal Medicine 11-", "display":"Science Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill15": { "name":"", "enhancer":"", "text":"Paramedics 13-", "display":"Paramedics", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill16": { "name":"Survival", "enhancer":"", "text":"Survival 13-", "display":"Survival", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill17": { }, "skill18": { }, "skill19": { }, "skill20": { }, "skill21": { }, "skill22": { }, "skill23": { }, "skill24": { }, "skill25": { }, "skill26": { }, "skill27": { }, "skill28": { }, "skill29": { }, "skill30": { }, "skill31": { }, "skill32": { }, "skill33": { }, "skill34": { }, "skill35": { }, "skill36": { }, "skill37": { }, "skill38": { }, "skill39": { }, "skill40": { }, "skill41": { }, "skill42": { }, "skill43": { }, "skill44": { }, "skill45": { }, "skill46": { }, "skill47": { }, "skill48": { }, "skill49": { }, "skill50": { } }, "playerName":"Test PC", "gmName":"Villain In Glasses", "characterFile":"Darci Fae-Cursed.hdc", "versionHD":"20220801", "timeStamp":"Sun, 11 Aug 2024 00:59:00", "genre":"Fantasy Hero", "campaign":"Coryn's Company", "version":"2.1", "HeroSystem6eHeroic":"true" } } \ No newline at end of file diff --git a/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.hdc b/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.hdc new file mode 100644 index 0000000000000000000000000000000000000000..aae7a2ec9224dfbd039179507e43cdd0c29b1ccf GIT binary patch literal 127396 zcmeI5X>%1xd#2ClH^Tox(O=vSn`Yk}Ogn@Yz%3z-j%XS?CI}WmW41Pk=57D@nYpig z&O=t^$*e^xB%PxQ0+6b*w#@t4m;Ar~Z*phyZRFLeB+&VHD@4rd=t_9vT@3mSDpWBzUO^W+~Uf72b;Cif?+ zlRf=i(})fIl)LwhZ}(=*_GEXmr7QTECqJKj(Uaay4kr)vyq|PO-tD7~z0lJ(bmVuv z%b`ZvQ&;qiJCnP*!&FzSO`huS&g7xq@4@8W+Fkf zPOgV9Uf1!d?zf&9b$vD~8nr-MXW{J1$;A$ ze66dQJI>i0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`MS-8dK%Cp@fN97Xp^nT;Hkg{!Ke-A8p%k7x7lun|BhewDV>#Tu}xCqm4b$J9|>$7YjNOP56tT zy`zd>B0k4EGMp7(1zx!;8hb3djC4ObFRhbSh-9f-3i{S@!fSCs_oS+wapq~$jFwHogWqD&9lPhVp3UdCFegw~ zrzZ3JW`hlW3#>GjJ6n=S)0HN2+dyiyY#uw!R=a{J*~ zP8(LwdBGOP7{3na?|^hz zb-eO)tta-r&F}wXJ;C=;*KP;@-@L0x&A%6UrFK5&4rXMa`$Y3~+rD`sdG>O2)$}{0 zRvz27wa5NH`~I-x-wZQQT2Ti7-}0g{2LE63ec^i~Qhf0LMb3}^=d1dc_`8ik58wZn zvX$@y-Uyzky8Ni;a4gIJ=UAQ7?Ehm7iCQB6ol4)%4+G0k#|*!eSJ0#K06qwjPOm3X zen%It(57^+hFunnS=IYy=P2Q0rEVPhR^0~NkG==LU$T2GThHNsgWs>6qZIYo*?vEw z3aFWVMgJ{H%1E#utq*>`XQD?coz83d9sGWW>-X#97isdu;nWKl{389h2_KZosYg#q`457>?*%2ZD8f z-+D$J@;VkC(QGegI-4eHy&*ofV?P=N8o|CB!%(BjV1xa@OoD=$a_pn}4OALE) ty&l2f-5b1nLv~-xHaxl6eaIE> Date: Sat, 14 Sep 2024 10:20:19 -0600 Subject: [PATCH 2/8] Better sheet text formatting. Sample character updates. --- .../1.0/Sample_Character.hdc | Bin 132760 -> 132718 bytes .../1.1/Sample_Character.hdc | Bin 132760 -> 132718 bytes .../2.0/Sample_Character.hdc | Bin 523852 -> 528976 bytes .../2.1/Sample_Character.hdc | Bin 127396 -> 127362 bytes .../2.1/Sample_Character_MA.hdc | Bin 108576 -> 108542 bytes .../2.2/HeroSystem6eHeroic.hde | 44 +++++++++--------- .../2.2/HeroSystem6eHeroic_HDImporter.js | 38 ++++++++++----- .../2.2/Sample_Character.TXT | 2 +- .../2.2/Sample_Character.hdc | Bin 127396 -> 127314 bytes .../2.2/Sample_Character_MA.TXT | 2 +- .../2.2/Sample_Character_MA.hdc | Bin 108576 -> 108564 bytes HeroSystem6eHeroic_HDImporter/README.MD | 10 ++-- 12 files changed, 57 insertions(+), 39 deletions(-) diff --git a/HeroSystem6eHeroic_HDImporter/1.0/Sample_Character.hdc b/HeroSystem6eHeroic_HDImporter/1.0/Sample_Character.hdc index 5310704e4f65265e35186b483ac0878947b85be8..85656644764f3024c7c1a7400744a3489f49665a 100644 GIT binary patch delta 94 zcmbQy%ki#eJLoP!qLotIsgAYR@gEK=Wkf*?4#1O*Z1Qc@ts!4{b z$zv!1s|yCID+8<21*&uh@<1jiFoXlu7BOT4b$KwjG6XUB19gK;&SXeu$OE#9z%n2@ XpCOo`viSyM`wd3M?Kc>irm+A3M3x_H diff --git a/HeroSystem6eHeroic_HDImporter/1.1/Sample_Character.hdc b/HeroSystem6eHeroic_HDImporter/1.1/Sample_Character.hdc index 5310704e4f65265e35186b483ac0878947b85be8..85656644764f3024c7c1a7400744a3489f49665a 100644 GIT binary patch delta 94 zcmbQy%ki#eJLoP!qLotIsgAYR@gEK=Wkf*?4#1O*Z1Qc@ts!4{b z$zv!1s|yCID+8<21*&uh@<1jiFoXlu7BOT4b$KwjG6XUB19gK;&SXeu$OE#9z%n2@ XpCOo`viSyM`wd3M?Kc>irm+A3M3x_H diff --git a/HeroSystem6eHeroic_HDImporter/2.0/Sample_Character.hdc b/HeroSystem6eHeroic_HDImporter/2.0/Sample_Character.hdc index baad5b59ee3c32bec9e11d3e9ddf9f1104906274..2beabea9bfe42c7a6a4792b62ebfb5124d6d66e6 100644 GIT binary patch delta 18094 zcmXBWVKi-Z0*3LMBuSEyBuSEyBuSEFBuSDaNs=TuP z{{FCI4vqbA*fW2UybcCGLap%HpvFbYPn6*%)CupOsR@y~MH&49^}=VHniOfjQpP*b zAbfwLrbPNKW%4^T3co#ST4emOUk6PM_RpsM^N{~xFe5SzD6_+%Sp*nTvm)yV%G?NA zMBtIsoX9q&ERKR!5oAKmi=3k=OFqh>HW7RbO?vH75Y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peLpt1^Z)A z5y2do9*1e+d;;oX;z{VsLsod6f~JT)4Yp^XAiM?Wh{Urn^c<9g|9LRXLP|JZfT{?+ z2(CX+H(_82k{5V!Q@DG4&DHKZc43egdXCObh3yP!|)QLEq<) z6`nb0ir5!m`w|Mm`xSIVq5(r+LrM6*0mHYD5{@QRMd&*)e-AUl^#ja_NDHh#LQahS z1T8W7GYqt0R``B_u1Nk0!@ogU1Ug{+9nxat52%UopJ3@iM!5fihKT+R{r^B-jP;-` z;{U?ne^7+v`22;*-hApAz`h7nL~v0sEe6xVX@t6%SRDG6fUNM$ho*>`z_uh5gm)?E eh{Vz`WQLOPF9U{UAtfBkK~;n-U|xRy&i@C?YC*jK diff --git a/HeroSystem6eHeroic_HDImporter/2.1/Sample_Character.hdc b/HeroSystem6eHeroic_HDImporter/2.1/Sample_Character.hdc index aae7a2ec9224dfbd039179507e43cdd0c29b1ccf..7ffab6998d92003d25bc07c235ed6c6d56421b40 100644 GIT binary patch delta 52 zcmZ4Tn7!#S`-Xl-?qG%thD3%UhE#@>$rl*q1w(+WT!sRM9H3|kkX_vThH?8FM#dfQ E0j>fNoB#j- delta 88 zcmZpA%)aC?`-Xl-$8v^zh9ZU(AWmk`XK(@Xk{L=Fav4$?@)$}Oih*Lm42cY7K)wQl fE)cr|c_3K@hH$XX?8&nj<(tnkZa>S&xb-~%(GC_K diff --git a/HeroSystem6eHeroic_HDImporter/2.1/Sample_Character_MA.hdc b/HeroSystem6eHeroic_HDImporter/2.1/Sample_Character_MA.hdc index 0676be38c035b5756620a248f03d558b23038d73..a032ebc9711b35049c9979e26a7f200d40d0a5ea 100644 GIT binary patch delta 52 zcmZ2*f$iUUwhjG^+`$YP42cXy45&B{P&Vm6a&SA84?-FfP4i8 fT_AP`@<6f*4B=p%*^_56$~T{7+sS?_ diff --git a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde index de38df75d..60e3a1e55 100644 --- a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde +++ b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic.hde @@ -1,4 +1,4 @@ -HeroSystem6eHeroic

HeroSystem6eHeroic

Version 2.0

Export format for the Roll20 API script HeroSystem6eHeroic_HDImporter, which imports Hero Designer characters into the HeroSystem6eHeroic character sheet.

For documentation see https://github.com/Roll20/roll20-api-scripts/tree/master/HeroSystem6eHeroic_HDImporter

By Villain In Glasses (Roll20 ID 633423)

+HeroSystem6eHeroic

HeroSystem6eHeroic

Version 2.2

Export format for the Roll20 API script HeroSystem6eHeroic_HDImporter, which imports Hero Designer characters into the HeroSystem6eHeroic character sheet.

For documentation see https://github.com/Roll20/roll20-api-scripts/tree/master/HeroSystem6eHeroic_HDImporter

By Villain In Glasses (Roll20 ID 633423)

txt !hero --import { "character":{ @@ -994,7 +994,7 @@ 1 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 1 }, @@ -1003,7 +1003,7 @@ 2 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 2 }, @@ -1012,7 +1012,7 @@ 3 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 3 }, @@ -1021,7 +1021,7 @@ 4 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 4 }, @@ -1030,7 +1030,7 @@ 5 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 5 }, @@ -1039,7 +1039,7 @@ 6 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 6 }, @@ -1048,7 +1048,7 @@ 7 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 7 }, @@ -1057,7 +1057,7 @@ 8 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 8 }, @@ -1066,7 +1066,7 @@ 9 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 9 }, @@ -1075,7 +1075,7 @@ 10 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 10 } @@ -1086,7 +1086,7 @@ 1 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 1 @@ -1096,7 +1096,7 @@ 2 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 2 @@ -1106,7 +1106,7 @@ 3 "type":"", "points":"", - "text":"", + "text":" ", "notes":"" 3 }, @@ -1115,7 +1115,7 @@ 4 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 4 @@ -1125,7 +1125,7 @@ 5 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 5 @@ -1135,7 +1135,7 @@ 6 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 6 @@ -1145,7 +1145,7 @@ 7 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 7 @@ -1155,7 +1155,7 @@ 8 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 8 @@ -1165,7 +1165,7 @@ 9 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 9 @@ -1175,7 +1175,7 @@ 10 "type":"", "points":"", - "text":" + "text":" ", "notes":"" 10 @@ -3518,7 +3518,7 @@ "timeStamp":"", "genre":"", "campaign":"", - "version":"2.1", + "version":"2.2", "HeroSystem6eHeroic":"true" } } diff --git a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js index db071d256..c03de48a5 100644 --- a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js +++ b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js @@ -1,6 +1,6 @@ /* HeroSystem6eHeroic_HDImporter.js * Hero Designer Importer for the Roll20 Hero System 6e Heroic character sheet -* Version: 2.1 +* Version: 2.2 * By Villain in Glasses * villaininglasses@icloud.com * Discord: Villain#0604 @@ -43,7 +43,7 @@ // Constants const versionMod = "2.2"; const versionSheet = "3.16"; // Note that a newer sheet will make upgrades as well as it can. - const needsExportedVersion = new Set(["1.0", "2.0", "2.1"]); // HeroSystem6eHeroic.hde versions allowed. + const needsExportedVersion = new Set(["1.0", "2.0", "2.1", "2.2"]); // HeroSystem6eHeroic.hde versions allowed. const defaultAttributes = { @@ -262,9 +262,9 @@ sendChat(script_name, '
Import of ' + character.character_name + ' started.
', null, {noarchive:true}); if (character.version === "1.0") { - sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v1.0. \n Version 2.1 supports additional content."); + sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v1.0. \n Version 2.2 supports additional content."); } else if (character.version === "2.0") { - sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v2.0. \n Version 2.1 supports additional content."); + sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v2.0. \n Version 2.2 supports additional content."); } object = null; @@ -1360,9 +1360,14 @@ ID = String(importCount+1).padStart(2,'0'); if ((typeof character.perks["perk"+ID] !== "undefined") && (character.perks["perk"+ID] !== "") && (typeof character.perks["perk"+ID].type !== "undefined")) { + tempString = character.perks["perk"+ID].text; + if (typeof character.perks["perk"+ID].notes !== "undefined") { + tempString += '\n'+'\n'+character.perks["perk"+ID].notes; + } + perksAndTalentsArray[perksAndTalentsIndex] = { type: character.perks["perk"+ID].type, - text: character.perks["perk"+ID].text + '\n' + character.perks["perk"+ID].notes, + text: (typeof tempString !== "undefined") ? tempString.trim() : "", points: character.perks["perk"+ID].points } @@ -1380,10 +1385,15 @@ ID = String(importCount+1).padStart(2,'0'); - if ((typeof character.talents["talent"+ID] !== "undefined") && (character.talents["talent"+ID] !== "") && (typeof character.talents["talent"+ID].type !== "undefined")) { + if ((typeof character.talents["talent"+ID] !== "undefined") && (character.talents["talent"+ID] !== "") && (typeof character.talents["talent"+ID].type !== "undefined")) { + tempString = character.talents["talent"+ID].text; + if (typeof character.talents["talent"+ID].notes !== "undefined") { + tempString += '\n'+'\n'+character.talents["talent"+ID].notes; + } + perksAndTalentsArray[perksAndTalentsIndex] = { type: character.talents["talent"+ID].type, - text: character.talents["talent"+ID].text + '\n' + character.talents["talent"+ID].notes, + text: (typeof tempString !== "undefined") ? tempString.trim() : "", points: character.talents["talent"+ID].points } @@ -1818,10 +1828,11 @@ importedPowers["powerAoE"+ID] = isAoE(testObject.testString) ? "on" : 0; // Power descriptions - importedPowers["powerText"+ID] = (powerArray[importCount].text).trim(); - if ( (character.version >= 2.1) && (typeof powerArray[importCount].notes !== "undefined") ) { - importedPowers["powerText"+ID] += '\n'+'\n'+(powerArray[importCount].notes).trim(); + tempString = powerArray[importCount].text; + if ( (character.version >= 2.1) && (typeof powerArray[importCount].notes !== "undefined") && (powerArray[importCount].notes !== "") ) { + tempString += '\n'+'\n'+powerArray[importCount].notes; } + importedPowers["powerText"+ID] = (typeof tempString !== "undefined") ? tempString.trim() : ""; // Search for skill roll. tempObject = requiresRoll(testObject.testString); @@ -2134,9 +2145,14 @@ if (importCount < maxComplications) { if ((typeof character.complications["complication"+ID] !== "undefined") && (typeof character.complications["complication"+ID].type !== "undefined")) { importedComplications["complicationName"+ID] = character.complications["complication"+ID].type; - importedComplications["complicationText"+ID] = character.complications["complication"+ID].text + '\n' + character.complications["complication"+ID].notes; importedComplications["complicationCP"+ID] = character.complications["complication"+ID].points; + tempString = character.complications["complication"+ID].text; + if (typeof character.complications["complication"+ID].notes !== "undefined") { + tempString += '\n'+'\n'+character.complications["complication"+ID].notes; + } + importedComplications["complicationText"+ID] = (typeof tempString !== "undefined") ? tempString.trim() : ""; + // Type tempString = character.complications["complication"+ID].type; tempString = tempString.toLowerCase(); diff --git a/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT b/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT index c54de45f4..e427167b5 100644 --- a/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT +++ b/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.TXT @@ -1 +1 @@ - !hero --import { "character":{ "character_name":"Darci", "character_title":"Fae-Cursed", "height":"1.66 m", "weight":"60.00 kg", "eyes":"Brown", "hair":"Brown", "backgroundText":"Darci grew up in a small highland village, the daughter of a village healer, with no ambition save to learn her mother's trade. Her life was turned upside down when she encountered a trol while out collection herbs in the woods. The troll promised to tell her secrets of Fae magic in return for her friendship. Darci has regretted her kindness ever since. Exiled and feard by common folk and given little help by the Fae, Darci has found safety in the service of a mercenary company.", "historyText":"", "appearance":"", "tactics":"", "campaignUse":"", "quote":"Village Herbalist", "experience":"0", "experienceBenefit":"0", "strength":"17", "dexterity":"13", "constitution":"18", "intelligence":"18", "ego":"13", "presence":"10", "ocv":"4", "dcv":"4", "omcv":"3", "dmcv":"3", "speed":"4", "pd":"4", "ed":"3", "body":"14", "stun":"26", "endurance":"40", "recovery":"9", "running":"12", "leaping":"6", "swimming":"6", "equipment":{ "equipment01":{ "name":"Bronze Maille", "text":"Resistant Protection (4 PD/4 ED) (12 Active Points); Normal Mass (-1), OIF (-1/2), Requires A Roll (11- roll; Locations 7-14; -1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"11.40kg", "attack":"", "defense":"true", "notes":"(2 END/turn)" }, "equipment02":{ "name":"Bronze Cap", "text":"Resistant Protection (5 PD/5 ED) (15 Active Points); Normal Mass (-1), OIF (-1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"0.83kg", "attack":"", "defense":"true", "notes":"(Locations 5)" }, "equipment03":{ "name":"High Boots, Gloves", "text":"Resistant Protection (2 PD/2 ED) (6 Active Points); Normal Mass (-1), OIF (-1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"1.20kg", "attack":"", "defense":"true", "notes":"(Locations 16-18, 6-7)" }, "equipment04":{ "name":"Battle Axe", "text":"(Total: 46 Active Cost, 16 Real Cost) Killing Attack - Hand-To-Hand 2d6 (3d6 w/STR), Reduced Endurance (0 END; +1/2) (45 Active Points); OAF (-1), STR Min: 13 (-1/2), Real Weapon (-1/4), Required Hands One-And-A-Half-Handed (-1/4) (Real Cost: 15) plus (1 Active Points) (Real Cost: 1)", "damage":"2d6 (3d6 w/STR)", "end":"0", "range":"", "mass":"1.60kg", "attack":"true", "defense":"", "notes":"" }, "equipment05":{ "name":"Bronze Dagger", "text":"Killing Attack - Hand-To-Hand 1d6-1 (1d6 w/STR), Range Based On STR (+1/4), Reduced Endurance (0 END; +1/2) (17 Active Points); OAF (-1), Real Weapon (-1/4), STR Minimum 6 (-1/4)", "damage":"1d6-1 (1d6 w/STR)", "end":"0", "range":"var.", "mass":"0.80kg", "attack":"true", "defense":"", "notes":"" }, "equipment06":{ "name":"Winter Coat", "text":"Life Support (Safe in Intense Cold) (2 Active Points); OIF (-1/2)", "damage":"", "end":"0", "range":"", "mass":"3.30kg", "attack":"", "defense":"", "notes":"" }, "equipment07":{ "name":"(Multipower) Small Shield", "text":"Multipower, 5-point reserve, (5 Active Points); all slots OAF (-1), STR Min 6 (-1/4)", "damage":"", "end":"", "range":"", "mass":"3.00kg", "attack":"", "defense":"", "notes":"" }, "equipment08":{ "name":"(MPSlot1) ", "text":"+1 DCV (5 Active Points); OAF (-1), Real Armor (-1/4), STR Min 6 (-1/4)", "damage":"", "end":"", "range":"", "mass":"", "attack":"", "defense":"", "notes":"" }, "equipment09":{ "name":"(MPSlot2) Bash", "text":"Hand-To-Hand Attack +1d6 (5 Active Points); OAF (-1), Hand-To-Hand Attack (-1/2), Side Effects -1 OCV, Side Effect occurs automatically whenever Power is used (-1/2), Real Weapon (-1/4), STR Min 6 (-1/4)", "damage":"1d6", "end":"1", "range":"", "mass":"", "attack":"true", "defense":"", "notes":"" }, "equipment10":{ "name":"Healing Potion", "text":"Healing BODY 4d6 (40 Active Points); 3 Charges which Never Recover (-3 1/4), OAF Fragile (-1 1/4), Extra Time (Full Phase, -1/2), Gestures (-1/4)", "damage":"4d6", "end":"[3 nr]", "range":"", "mass":"1.30kg", "attack":"", "defense":"", "notes":"" }, "equipment11":{}, "equipment12":{}, "equipment13":{}, "equipment14":{}, "equipment15":{}, "equipment16":{} }, "maneuvers":{ "maneuver01":{ }, "maneuver02":{ }, "maneuver03":{ }, "maneuver04":{ }, "maneuver05":{ }, "maneuver06":{ }, "maneuver07":{ }, "maneuver08":{ }, "maneuver09":{ }, "maneuver10":{ }, "maneuver11":{ }, "maneuver12":{ }, "maneuver13":{ }, "maneuver14":{ }, "maneuver15":{ }, "maneuver16":{ }, "maneuver17":{ }, "maneuver18":{ }, "maneuver19":{ }, "maneuver20":{ } }, "perks":{ "perk01":{ "type":"Fringe Benefit", "points":"1", "text":"Member of a Mercenary CompanyFringe Benefit (0 Active Points)", "notes":"Some Perks Notes." }, "perk02":{ "type":"Fringe Benefit", "points":"1", "text":"Low-ranking member of Fae SocietyFringe Benefit (0 Active Points)", "notes":"" }, "perk03":{ }, "perk04":{ }, "perk05":{ }, "perk06":{ }, "perk07":{ }, "perk08":{ }, "perk09":{ }, "perk10":{ } }, "talents":{}, "complications":{ "complication01":{ "type":"Social Complication", "points":"10", "text":"Social Complication: Regarded as fae-touched and cursed. Frequently, Minor", "notes":"The mortal world tends to distrust anyone or anything touched by Fae." }, "complication02":{ "type":"Hunted", "points":"15", "text":"Hunted: Hunted by agents of Summer. Frequently (Mo Pow; Mildly Punish)", "notes":"While Darci hasn't reached the notoriety that would attract more dangerous agents, Summer won't hesitate to torment her and her companions." }, "complication03":{ "type":"Distinctive Features", "points":"5", "text":"Distinctive Features: Peculiar smell and hard-to-pin-down appearance. Not quite human. Trollish, to those who know of fae. (Easily Concealed; Noticed and Recognizable; Detectable By Commonly-Used Senses)", "notes":"" }, "complication04":{ "type":"Psychological Complication", "points":"20", "text":"Psychological Complication: Finds the touch of iron uncomfortable and won't wear iron armor or jewelry or use iron tools. (Very Common; Strong)", "notes":"" }, "complication05":{}, "complication06":{}, "complication07":{}, "complication08":{}, "complication09":{}, "complication10":{}, "complication11":{}, "complication12":{}, "complication13":{}, "complication14":{}, "complication15":{}, "complication16":{}, "complication17":{}, "complication18":{}, "complication19":{}, "complication20":{} }, "powers":{ "power01":{ "name":"Bile and Acid", "base":"15", "text":"Killing Attack - Ranged 1d6, Area Of Effect (4 2m Areas; +1/2), Damage Over Time, Target's defenses only apply once (3 damage increments, damage occurs every four Segments, can be negated by Water; +2 1/2) (60 Active Points); 3 Recoverable Charges (-3/4), Extra Time (Full Phase, -1/2), No Range (-1/2), Gestures (Requires both hands; -1/2), Side Effects (1d6+1d3 drain STUN; -1/4), Concentration (1/2 DCV; -1/4), Limited Power Power loses about a fourth of its effectiveness (Does not work in water; -1/4), Requires A Roll (Skill roll, -1 per 20 Active Points modifier; Magic Roll; -1/4)", "notes":"This effects of this spell don't paint a pretty picture, but they get the job done.", "cost":"14", "endurance":"[3 rc]", "damage":"1d6", "compound":"false" }, "power02":{ "name":"Pneuma", "base":"30", "text":"Killing Attack - Ranged 2d6, Invisible Power Effects (Inobvious to [one Sense Group]; +1/4) (37 Active Points); Requires A Roll (Skill roll; -1/2), Gestures (-1/4), Incantations (-1/4), Beam (-1/4), Limited Power Power loses about a fourth of its effectiveness (Does not work under water; -1/4)", "notes":"A pneuma is an invisible dart, which Darci draws from her breath with an exaggerated motion and throws at her target.", "cost":"15", "endurance":"4", "damage":"2d6", "compound":"false" }, "power03":{ "name":"Self Renewal", "base":"55", "text":"Healing BODY 5d6, Can Heal Limbs (55 Active Points); Increased Endurance Cost (x6 END; -2 1/2), Extra Time (1 Turn (Post-Segment 12), Character May Take No Other Actions, -1 1/2), Concentration, Must Concentrate throughout use of Constant Power (0 DCV; Character is totally unaware of nearby events; -1 1/2), OAF (Eat a sprig of evergreen; -1), Gestures (Requires both hands; -1/2), Life Energy Modifier Power loses about a third of its effectiveness (-1/2), Self Only Power loses about a third of its effectiveness (-1/2), Incantations (-1/4), Requires A Roll (Characteristic roll, -1 per 20 Active Points modifier; -1/4)", "notes":"Darci can draw from the regenerative powers of trolls after an intense and painful bout of concentration.", "cost":"6", "endurance":"30", "damage":"5d6", "compound":"false" }, "power04":{ "name":"Underdark Eyes", "base":"5", "text":"Nightvision (5 Active Points); Gestures (Requires both hands; -1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4)", "notes":"Trolls may be unpleasant creatures, but they can see in the dark.", "cost":"2", "endurance":"0", "damage":"", "compound":"false" }, "power05":{ "name":"Winter's Shawl", "base":"12", "text":"Life Support (Immunity All terrestrial diseases; Immunity: All terrestrial poisons; Safe in Intense Cold) (12 Active Points); Costs Endurance (-1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4)", "notes":"The trolls of the Winter Court can survive most any winter storm or natural plague.", "cost":"5", "endurance":"1", "damage":"", "compound":"false" }, "power06":{ "name":"Fae Sense", "base":"10", "text":"Detect Magic A Class Of Things 13- (no Sense Group), Range (10 Active Points); Increased Endurance Cost (x4 END; -3/4), Gestures (Requires both hands; -1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4), Costs Endurance (Only Costs END to Activate; -1/4)", "notes":"The Fae have a knack for spotting ley lines and other magics in their enviornments.", "cost":"3", "endurance":"4", "damage":"13-", "compound":"false" }, "power07":{ }, "power08":{ }, "power09":{ }, "power10":{ }, "power11":{ }, "power12":{ }, "power13":{ }, "power14":{ }, "power15":{ }, "power16":{ }, "power17":{ }, "power18":{ }, "power19":{ }, "power20":{ }, "power21":{ }, "power22":{ }, "power23":{ }, "power24":{ }, "power25":{ }, "power26":{ }, "power27":{ }, "power28":{ }, "power29":{ }, "power30":{ } }, "skills": { "skill01": { "name":"", "enhancer":"", "text":"PS: Soldier 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill02": { "name":"", "enhancer":"", "text":"PS: Herbalist 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"0", "levels":"0", "cost":"0" }, "skill03": { "name":"", "enhancer":"", "text":"Language: Clan's Tongue (basic conversation; literate) (2 Active Points)", "display":"Language", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"0" }, "skill04": { "name":"", "enhancer":"", "text":"Language: King's Tongue (fluent conversation)", "display":"Language", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill05": { "name":"", "enhancer":"", "text":"Language: Fae (completely fluent; literate)", "display":"Language", "attribute":"GENERAL", "base":"4", "levels":"0", "cost":"4" }, "skill06": { "name":"", "enhancer":"", "text":"+3 Battleaxe", "display":"Combat Skill Levels", "attribute":"GENERAL", "base":"6", "levels":"3", "cost":"6" }, "skill07": { "name":"Fae Society", "enhancer":"", "text":"KS 11-", "display":"KS", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill08": { "name":"Clan Lands", "enhancer":"", "text":"AK 11-", "display":"Knowledge Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill09": { "name":"Common Melee", "enhancer":"", "text":"WF: Common Melee Weapons", "display":"Weapon Familiarity", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill10": { "name":"Power Skill Fae Magic", "enhancer":"", "text":"Power 15-", "display":"Power", "attribute":"INT", "base":"7", "levels":"2", "cost":"7" }, "skill11": { "name":"", "enhancer":"", "text":"Stealth 12-", "display":"Stealth", "attribute":"DEX", "base":"3", "levels":"0", "cost":"3" }, "skill12": { "name":"", "enhancer":"", "text":"Teamwork 12-", "display":"Teamwork", "attribute":"DEX", "base":"3", "levels":"0", "cost":"3" }, "skill13": { "name":"", "enhancer":"", "text":"Concealment 13-", "display":"Concealment", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill14": { "name":"", "enhancer":"", "text":"Science Skill: Herbal Medicine 11-", "display":"Science Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill15": { "name":"", "enhancer":"", "text":"Paramedics 13-", "display":"Paramedics", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill16": { "name":"Survival", "enhancer":"", "text":"Survival 13-", "display":"Survival", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill17": { }, "skill18": { }, "skill19": { }, "skill20": { }, "skill21": { }, "skill22": { }, "skill23": { }, "skill24": { }, "skill25": { }, "skill26": { }, "skill27": { }, "skill28": { }, "skill29": { }, "skill30": { }, "skill31": { }, "skill32": { }, "skill33": { }, "skill34": { }, "skill35": { }, "skill36": { }, "skill37": { }, "skill38": { }, "skill39": { }, "skill40": { }, "skill41": { }, "skill42": { }, "skill43": { }, "skill44": { }, "skill45": { }, "skill46": { }, "skill47": { }, "skill48": { }, "skill49": { }, "skill50": { } }, "playerName":"Test PC", "gmName":"Villain In Glasses", "characterFile":"Darci Fae-Cursed.hdc", "versionHD":"20220801", "timeStamp":"Sun, 11 Aug 2024 00:59:00", "genre":"Fantasy Hero", "campaign":"Coryn's Company", "version":"2.1", "HeroSystem6eHeroic":"true" } } \ No newline at end of file + !hero --import { "character":{ "character_name":"Darci", "character_title":"Fae-Cursed", "height":"1.66 m", "weight":"60.00 kg", "eyes":"Brown", "hair":"Brown", "backgroundText":"Darci grew up in a small highland village, the daughter of a village healer, with no ambition save to learn her mother's trade. Her life was turned upside down when she encountered a trol while out collection herbs in the woods. The troll promised to tell her secrets of Fae magic in return for her friendship. Darci has regretted her kindness ever since. Exiled and feard by common folk and given little help by the Fae, Darci has found safety in the service of a mercenary company.", "historyText":"", "appearance":"", "tactics":"", "campaignUse":"", "quote":"Village Herbalist", "experience":"0", "experienceBenefit":"0", "strength":"17", "dexterity":"13", "constitution":"18", "intelligence":"18", "ego":"13", "presence":"10", "ocv":"4", "dcv":"4", "omcv":"3", "dmcv":"3", "speed":"4", "pd":"4", "ed":"3", "body":"14", "stun":"28", "endurance":"40", "recovery":"9", "running":"12", "leaping":"4", "swimming":"6", "equipment":{ "equipment01":{ "name":"Bronze Maille", "text":"Resistant Protection (4 PD/4 ED) (12 Active Points); Normal Mass (-1), OIF (-1/2), Requires A Roll (11- roll; Locations 7-14; -1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"11.40kg", "attack":"", "defense":"true", "notes":"(2 END/turn)" }, "equipment02":{ "name":"Bronze Cap", "text":"Resistant Protection (5 PD/5 ED) (15 Active Points); Normal Mass (-1), OIF (-1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"0.83kg", "attack":"", "defense":"true", "notes":"(Locations 5)" }, "equipment03":{ "name":"High Boots, Gloves", "text":"Resistant Protection (2 PD/2 ED) (6 Active Points); Normal Mass (-1), OIF (-1/2), Real Armor (-1/4)", "damage":"", "end":"0", "range":"", "mass":"1.20kg", "attack":"", "defense":"true", "notes":"(Locations 16-18, 6-7)" }, "equipment04":{ "name":"Bronze Battle Axe", "text":"(Total: 46 Active Cost, 16 Real Cost) Killing Attack - Hand-To-Hand 2d6 (3d6 w/STR), Reduced Endurance (0 END; +1/2) (45 Active Points); OAF (-1), STR Min: 13 (-1/2), Real Weapon (-1/4), Required Hands One-And-A-Half-Handed (-1/4) (Real Cost: 15) plus (1 Active Points) (Real Cost: 1)", "damage":"2d6 (3d6 w/STR)", "end":"0", "range":"", "mass":"1.60kg", "attack":"true", "defense":"", "notes":"" }, "equipment05":{ "name":"Bronze Dagger", "text":"Killing Attack - Hand-To-Hand 1d6-1 (1d6 w/STR), Range Based On STR (+1/4), Reduced Endurance (0 END; +1/2) (17 Active Points); OAF (-1), Real Weapon (-1/4), STR Minimum 6 (-1/4)", "damage":"1d6-1 (1d6 w/STR)", "end":"0", "range":"var.", "mass":"0.80kg", "attack":"true", "defense":"", "notes":"" }, "equipment06":{ "name":"Winter Coat", "text":"Life Support (Safe in Intense Cold) (2 Active Points); OIF (-1/2)", "damage":"", "end":"0", "range":"", "mass":"3.30kg", "attack":"", "defense":"", "notes":"" }, "equipment07":{ "name":"(Multipower) Small Shield", "text":"Multipower, 5-point reserve, (5 Active Points); all slots OAF (-1), STR Min 6 (-1/4)", "damage":"", "end":"", "range":"", "mass":"3.00kg", "attack":"", "defense":"", "notes":"" }, "equipment08":{ "name":"(MPSlot1) ", "text":"+1 DCV (5 Active Points); OAF (-1), Real Armor (-1/4), STR Min 6 (-1/4)", "damage":"", "end":"", "range":"", "mass":"", "attack":"", "defense":"", "notes":"" }, "equipment09":{ "name":"(MPSlot2) Bash", "text":"Hand-To-Hand Attack +1d6 (5 Active Points); OAF (-1), Hand-To-Hand Attack (-1/2), Side Effects -1 OCV, Side Effect occurs automatically whenever Power is used (-1/2), Real Weapon (-1/4), STR Min 6 (-1/4)", "damage":"1d6", "end":"1", "range":"", "mass":"", "attack":"true", "defense":"", "notes":"" }, "equipment10":{ "name":"Healing Potion", "text":"Healing BODY 4d6 (40 Active Points); 3 Charges which Never Recover (-3 1/4), OAF Fragile (-1 1/4), Extra Time (Full Phase, -1/2), Gestures (-1/4)", "damage":"4d6", "end":"[3 nr]", "range":"", "mass":"1.30kg", "attack":"", "defense":"", "notes":"" }, "equipment11":{}, "equipment12":{}, "equipment13":{}, "equipment14":{}, "equipment15":{}, "equipment16":{} }, "maneuvers":{ "maneuver01":{ }, "maneuver02":{ }, "maneuver03":{ }, "maneuver04":{ }, "maneuver05":{ }, "maneuver06":{ }, "maneuver07":{ }, "maneuver08":{ }, "maneuver09":{ }, "maneuver10":{ }, "maneuver11":{ }, "maneuver12":{ }, "maneuver13":{ }, "maneuver14":{ }, "maneuver15":{ }, "maneuver16":{ }, "maneuver17":{ }, "maneuver18":{ }, "maneuver19":{ }, "maneuver20":{ } }, "perks":{ "perk01":{ "type":"Fringe Benefit", "points":"1", "text":"Member of a Mercenary Company Fringe Benefit (0 Active Points)", "notes":"Some Perks Notes." }, "perk02":{ "type":"Fringe Benefit", "points":"1", "text":"Low-ranking member of Fae Society Fringe Benefit (0 Active Points)", "notes":"" }, "perk03":{ }, "perk04":{ }, "perk05":{ }, "perk06":{ }, "perk07":{ }, "perk08":{ }, "perk09":{ }, "perk10":{ } }, "talents":{}, "complications":{ "complication01":{ "type":"Social Complication", "points":"10", "text":"Social Complication: Regarded as fae-touched and cursed. Frequently, Minor", "notes":"The mortal world tends to distrust anyone or anything touched by Fae." }, "complication02":{ "type":"Hunted", "points":"15", "text":"Hunted: Hunted by agents of Summer. Frequently (Mo Pow; Mildly Punish)", "notes":"While Darci hasn't reached the notoriety that would attract more dangerous agents, Summer won't hesitate to torment her and her companions." }, "complication03":{ "type":"Distinctive Features", "points":"5", "text":"Distinctive Features: Peculiar smell and hard-to-pin-down appearance. Not quite human. Trollish, to those who know of fae. (Easily Concealed; Noticed and Recognizable; Detectable By Commonly-Used Senses)", "notes":"" }, "complication04":{ "type":"Psychological Complication", "points":"20", "text":"Psychological Complication: Finds the touch of iron uncomfortable and won't wear iron armor or jewelry or use iron tools. (Very Common; Strong)", "notes":"" }, "complication05":{}, "complication06":{}, "complication07":{}, "complication08":{}, "complication09":{}, "complication10":{}, "complication11":{}, "complication12":{}, "complication13":{}, "complication14":{}, "complication15":{}, "complication16":{}, "complication17":{}, "complication18":{}, "complication19":{}, "complication20":{} }, "powers":{ "power01":{ "name":"Bile and Acid", "base":"15", "text":"Killing Attack - Ranged 1d6, Area Of Effect (4 2m Areas; +1/2), Damage Over Time, Target's defenses only apply once (3 damage increments, damage occurs every four Segments, can be negated by Water; +2 1/2) (60 Active Points); 3 Recoverable Charges (-3/4), Extra Time (Full Phase, -1/2), No Range (-1/2), Gestures (Requires both hands; -1/2), Side Effects (1d6+1d3 drain STUN; -1/4), Concentration (1/2 DCV; -1/4), Limited Power Power loses about a fourth of its effectiveness (Does not work in water; -1/4), Requires A Roll (Skill roll, -1 per 20 Active Points modifier; Magic Roll; -1/4)", "notes":"The effects of this spell aren't pretty, but they get the job done.", "cost":"14", "endurance":"[3 rc]", "damage":"1d6", "compound":"false" }, "power02":{ "name":"Pneuma", "base":"30", "text":"Killing Attack - Ranged 2d6, Invisible Power Effects (Inobvious to [one Sense Group]; +1/4) (37 Active Points); Requires A Roll (Skill roll; -1/2), Gestures (-1/4), Incantations (-1/4), Beam (-1/4), Limited Power Power loses about a fourth of its effectiveness (Does not work under water; -1/4)", "notes":"A pneuma is an invisible dart, which Darci draws from her breath with an exaggerated motion and throws at her target.", "cost":"15", "endurance":"4", "damage":"2d6", "compound":"false" }, "power03":{ "name":"Self Renewal", "base":"55", "text":"Healing BODY 5d6, Can Heal Limbs (55 Active Points); Increased Endurance Cost (x6 END; -2 1/2), Extra Time (1 Turn (Post-Segment 12), Character May Take No Other Actions, -1 1/2), Concentration, Must Concentrate throughout use of Constant Power (0 DCV; Character is totally unaware of nearby events; -1 1/2), OAF (Eat a sprig of evergreen; -1), Gestures (Requires both hands; -1/2), Life Energy Modifier Power loses about a third of its effectiveness (-1/2), Self Only Power loses about a third of its effectiveness (-1/2), Incantations (-1/4), Requires A Roll (Characteristic roll, -1 per 20 Active Points modifier; -1/4)", "notes":"Darci can draw from the regenerative powers of trolls after an intense and painful bout of concentration.", "cost":"6", "endurance":"30", "damage":"5d6", "compound":"false" }, "power04":{ "name":"Underdark Eyes", "base":"5", "text":"Nightvision (5 Active Points); Gestures (Requires both hands; -1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4)", "notes":"Trolls may be unpleasant creatures, but they can see in the dark.", "cost":"2", "endurance":"0", "damage":"", "compound":"false" }, "power05":{ "name":"Winter's Shawl", "base":"12", "text":"Life Support (Immunity All terrestrial diseases; Immunity: All terrestrial poisons; Safe in Intense Cold) (12 Active Points); Costs Endurance (-1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4)", "notes":"The trolls of the Winter Court can survive most any natural storm or plague.", "cost":"5", "endurance":"1", "damage":"", "compound":"false" }, "power06":{ "name":"Fae Sense", "base":"10", "text":"Detect Magic A Class Of Things 13- (no Sense Group), Range (10 Active Points); Increased Endurance Cost (x4 END; -3/4), Gestures (Requires both hands; -1/2), Requires A Roll (11- roll; -1/2), Incantations (-1/4), Costs Endurance (Only Costs END to Activate; -1/4)", "notes":"The Fae have a knack for spotting ley lines and other magics in their enviornment.", "cost":"3", "endurance":"4", "damage":"13-", "compound":"false" }, "power07":{ }, "power08":{ }, "power09":{ }, "power10":{ }, "power11":{ }, "power12":{ }, "power13":{ }, "power14":{ }, "power15":{ }, "power16":{ }, "power17":{ }, "power18":{ }, "power19":{ }, "power20":{ }, "power21":{ }, "power22":{ }, "power23":{ }, "power24":{ }, "power25":{ }, "power26":{ }, "power27":{ }, "power28":{ }, "power29":{ }, "power30":{ } }, "skills": { "skill01": { "name":"", "enhancer":"", "text":"PS: Soldier 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill02": { "name":"", "enhancer":"", "text":"PS: Herbalist 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"0", "levels":"0", "cost":"0" }, "skill03": { "name":"", "enhancer":"", "text":"Language: Clan's Tongue (basic conversation; literate) (2 Active Points)", "display":"Language", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"0" }, "skill04": { "name":"", "enhancer":"", "text":"Language: King's Tongue (fluent conversation)", "display":"Language", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill05": { "name":"", "enhancer":"", "text":"Language: Fae (completely fluent; literate)", "display":"Language", "attribute":"GENERAL", "base":"4", "levels":"0", "cost":"4" }, "skill06": { "name":"", "enhancer":"", "text":"+3 Battleaxe", "display":"Combat Skill Levels", "attribute":"GENERAL", "base":"6", "levels":"3", "cost":"6" }, "skill07": { "name":"Fae Society", "enhancer":"", "text":"KS 11-", "display":"KS", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill08": { "name":"Clan Lands", "enhancer":"", "text":"AK 11-", "display":"Knowledge Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill09": { "name":"Common Melee", "enhancer":"", "text":"WF: Common Melee Weapons", "display":"Weapon Familiarity", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill10": { "name":"Power Skill Fae Magic", "enhancer":"", "text":"Power 15-", "display":"Power", "attribute":"INT", "base":"7", "levels":"2", "cost":"7" }, "skill11": { "name":"", "enhancer":"", "text":"Stealth 12-", "display":"Stealth", "attribute":"DEX", "base":"3", "levels":"0", "cost":"3" }, "skill12": { "name":"", "enhancer":"", "text":"Teamwork 12-", "display":"Teamwork", "attribute":"DEX", "base":"3", "levels":"0", "cost":"3" }, "skill13": { "name":"", "enhancer":"", "text":"Concealment 13-", "display":"Concealment", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill14": { "name":"", "enhancer":"", "text":"Science Skill: Herbal Medicine 11-", "display":"Science Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill15": { "name":"", "enhancer":"", "text":"Paramedics 13-", "display":"Paramedics", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill16": { "name":"Survival", "enhancer":"", "text":"Survival 13-", "display":"Survival", "attribute":"INT", "base":"3", "levels":"0", "cost":"3" }, "skill17": { }, "skill18": { }, "skill19": { }, "skill20": { }, "skill21": { }, "skill22": { }, "skill23": { }, "skill24": { }, "skill25": { }, "skill26": { }, "skill27": { }, "skill28": { }, "skill29": { }, "skill30": { }, "skill31": { }, "skill32": { }, "skill33": { }, "skill34": { }, "skill35": { }, "skill36": { }, "skill37": { }, "skill38": { }, "skill39": { }, "skill40": { }, "skill41": { }, "skill42": { }, "skill43": { }, "skill44": { }, "skill45": { }, "skill46": { }, "skill47": { }, "skill48": { }, "skill49": { }, "skill50": { } }, "playerName":"Test PC", "gmName":"Villain In Glasses", "characterFile":"Sample_Character.hdc", "versionHD":"20220801", "timeStamp":"Sat, 14 Sep 2024 09:56:43", "genre":"Fantasy Hero", "campaign":"Coryn's Company", "version":"2.2", "HeroSystem6eHeroic":"true" } } \ No newline at end of file diff --git a/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.hdc b/HeroSystem6eHeroic_HDImporter/2.2/Sample_Character.hdc index aae7a2ec9224dfbd039179507e43cdd0c29b1ccf..165ad6c71153946202343844ff628a18c0be79b7 100644 GIT binary patch delta 1022 zcmZuvUr19?7(d@NlMJ0pDQX+rB2--6U8mdKg_hV$4`Y!e_z;$YLJ#Uj8f}n-7QPrv z{D>oiVSn}z^q_E{`%-(Ur$(U;A}X0ANP&?r(OdN0`Dg4dzK46x{hi-;e&6~1GMhDP z-)feVaP%s>$p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VN5!BG=kYVK3df<_-GXk4ew89I(F)|=`CVq(-llw-7Egie76Sz zx=Ix$ne9NTE^W6KNm@wolrWZS3kFM|?~NEtCNFp-JvqKbZ#%yxqaVyPWcdwiq$hJ&B{P&Vm6a&SA84?-FfP4i8 zT_AP`@<6f*4B=p%*^_56%5Of)SYkH$exlgsNQ-@q`Xvk*U=<}mQxn0aB?8swGo%4Y z5DO%m3uKi5#enqG4UDRj&p%O^y!nm>uOWj45E?R=Fjz7ePFJX5^xkZImxYNNA#O4G z!*c2A_bnOCCaYiI+uXnR3De~DZ`qJkSWe!sO?vbE14*b7rVPfD4fe`z)<66XUBVPB z;eG5Jx`gHQ1RF-*&E+Rc&}Gaf+imomy!Z3J&CX|AP$kV6j3zgzOHcm)%3yN;eWA_v zFT9vG*I$|!%9;iWv*`*NjGfbC1%Zu#kNaoGFmW$ Y)o{Yp7)`#=BR&1R5Tn6%ppx`z08k8p7XSbN diff --git a/HeroSystem6eHeroic_HDImporter/README.MD b/HeroSystem6eHeroic_HDImporter/README.MD index 681307f9f..75f401659 100644 --- a/HeroSystem6eHeroic_HDImporter/README.MD +++ b/HeroSystem6eHeroic_HDImporter/README.MD @@ -48,14 +48,14 @@ If HD Importer has started correctly the following notification should appear in ![HelpMenu](/HeroSystem6eHeroic_HDImporter/images/ImportSuccess.png) ## Sample Character -The release folder contains two sample character files: -- `Sample_Character.hdc` is a Hero Designer character, which you may use with Hero Designer for testing and evaluation. -- `Sample_Character.txt` is the same character exported from Hero Designer using HeroSystem6eHeroic.hde as the export format. +The release folder contains two test and evaluation characters for use in HERO Designer (HDC) and Roll20 (TXT). +- `Sample_Character.hdc` is the fae wizard Darci. +- `Sample_Character_MA.hdc` is the doctor and martial arts swordsman Henkle. ## Notes Double quotation marks are used to indicate JSON data values. Please take care to avoid quotation marks in Hero Designer text fields. Instead use single quotes. The exporter will attempt to remove double quotes, but this may not be foolproof. -Characters exported with the older version of HeroSystem6eHeroic.hde (1.0 and 2.0) should work, but version 2.1 supports more content and has fixes for bugs present in the earlier versions. +Characters exported with older versions of HeroSystem6eHeroic.hde (1.0, 2.0, and 2.1) will work, but those exported with the latest version (2.2) will have more content and may benefit from bug fixes. Hero Designer has entries for eye color and hair color. This information is not imported since the character sheet does not have corresponding fields. @@ -112,3 +112,5 @@ Version 1.1 -- Updated to accommodate the seventeen power slots available on the Version 2.0 -- Updated to support additional character sheet features as of sheet version 2.9. Updated version of Hero Designer export format (HeroSystem6eHeroic.hde to version 2.0). Adds support for 20 power slots with ten extra powers imported to text. Complications increased from seven to ten with up to an additional ten sent to text on the sheet. All HD description fields now recognized. Generates armor from Resistant Protection. Recognizes and applies powers that adjust characteristic and movement abilities. Adds more robust input error checking and avoids more quotation character troubles. Additional HD file pack testing. Bug fixes and 60% reduction in code size (April 27, 2024). Version 2.1 -- Updated to support additional character sheet features as of sheet version 3.16. Updated version of Hero Designer export format (HeroSystem6eHeroic.hde to version 2.1). Expands support for martial arts maneuvers. Recognizes power notes and scans powers for damage advantages. Adds the everyman PS skill. Added a second sample character with martial arts skills. Bug fixes (August 9, 2024). + +Version 2.2 -- Fix for compound power import failure. Minor update to HeroSystem6eHeroic.hde (version 2.2). Improved formatting of text in powers, talents, and complications (September 14, 2024). From c6b0699c06df02c7340c45cb58112a7460f44162 Mon Sep 17 00:00:00 2001 From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com> Date: Sat, 14 Sep 2024 10:29:01 -0600 Subject: [PATCH 3/8] Minor README update. --- HeroSystem6eHeroic_HDImporter/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HeroSystem6eHeroic_HDImporter/README.MD b/HeroSystem6eHeroic_HDImporter/README.MD index 75f401659..20ce070b5 100644 --- a/HeroSystem6eHeroic_HDImporter/README.MD +++ b/HeroSystem6eHeroic_HDImporter/README.MD @@ -47,7 +47,7 @@ If HD Importer has started correctly the following notification should appear in 2. Hit enter. If all goes well you should see a start and finish notification, which for the character "Alena" appears as ![HelpMenu](/HeroSystem6eHeroic_HDImporter/images/ImportSuccess.png) -## Sample Character +## Sample Characters The release folder contains two test and evaluation characters for use in HERO Designer (HDC) and Roll20 (TXT). - `Sample_Character.hdc` is the fae wizard Darci. - `Sample_Character_MA.hdc` is the doctor and martial arts swordsman Henkle. From 8ce559576c947d111b975823783a9f64efb2c59f Mon Sep 17 00:00:00 2001 From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com> Date: Sat, 14 Sep 2024 10:31:03 -0600 Subject: [PATCH 4/8] Import version check and message. --- .../2.2/HeroSystem6eHeroic_HDImporter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js index c03de48a5..537ff8f47 100644 --- a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js +++ b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js @@ -265,6 +265,8 @@ sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v1.0. \n Version 2.2 supports additional content."); } else if (character.version === "2.0") { sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v2.0. \n Version 2.2 supports additional content."); + } else if (character.version === "2.1") { + sendChat(script_name, "Exported from HERO Designer with \n HeroSystem6eHeroic.hde v2.1. \n Version 2.2 is available."); } object = null; From e33dbf4eb9feabbd7b0cb6c96f245d6efa81ce94 Mon Sep 17 00:00:00 2001 From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com> Date: Sat, 14 Sep 2024 11:38:32 -0600 Subject: [PATCH 5/8] Truncate Defense Manuever to DEF Maneuver. --- .../2.2/HeroSystem6eHeroic_HDImporter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js index 537ff8f47..962dd5441 100644 --- a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js +++ b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js @@ -42,7 +42,7 @@ (function() { // Constants const versionMod = "2.2"; - const versionSheet = "3.16"; // Note that a newer sheet will make upgrades as well as it can. + const versionSheet = "3.23"; // Note that a newer sheet will make upgrades as well as it can. const needsExportedVersion = new Set(["1.0", "2.0", "2.1", "2.2"]); // HeroSystem6eHeroic.hde versions allowed. const defaultAttributes = { @@ -3003,6 +3003,8 @@ } else if ((text !== "") && text.includes("PS: ")) { name = text.replace("PS: ", ""); name = name.slice(0, -3); + } else if ((text !== "") && text.includes("Defense Maneuver")) { + name = text.replace("Defense Maneuver", "DEF Maneuver"); } else if (skillObject.display !== "") { name = skillObject.display; } From cd25db5ebac7f8d5d34562a36e7e5dac315d4831 Mon Sep 17 00:00:00 2001 From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:41:35 -0600 Subject: [PATCH 6/8] Recognizes Mental Combat Skill Levels --- .../2.2/HeroSystem6eHeroic_HDImporter.js | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js index 962dd5441..b7a721e15 100644 --- a/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js +++ b/HeroSystem6eHeroic_HDImporter/2.2/HeroSystem6eHeroic_HDImporter.js @@ -2378,6 +2378,10 @@ // use prepared slots on the character sheet. sheetSkillIndexes.combatSkillIndex = importWeaponSkill(object, character, script_name, theSkill, sheetSkillIndexes.combatSkillIndex); + } else if (theSkill.display === "Mental Combat Skill Levels"){ + // Import mental CSLs. Variation of weapon CSLs. + sheetSkillIndexes.combatSkillIndex = importWeaponSkill(object, character, script_name, theSkill, sheetSkillIndexes.combatSkillIndex); + } else if (theSkill.display === "Penalty Skill Levels") { // Import penalty skill levels. sheetSkillIndexes.combatSkillIndex = importWeaponSkill(object, character, script_name, theSkill, sheetSkillIndexes.combatSkillIndex); @@ -2695,7 +2699,7 @@ skillLevels40: skillObject.levels }; - } else if (skillObject.text.includes("group") || skillObject.text.includes("single") || (skillObject.display === "Weapon Familiarity") || (skillObject.display === "Penalty Skill Levels") || (skillObject.display === "Combat Skill Levels")) { + } else if (skillObject.text.includes("group") || skillObject.text.includes("single") || (skillObject.display === "Weapon Familiarity") || (skillObject.display === "Penalty Skill Levels") || (skillObject.display === "Combat Skill Levels") || (skillObject.display === "Mental Combat Skill Levels")) { // Call import weapon skills function. // Determine type @@ -2733,9 +2737,34 @@ break; default: 'none'; } + } else if (skillObject.display === "Mental Combat Skill Levels") { + // Determine mental combat skill levels + name = skillObject.text; + + name = name.replace("with all", "w/"); + name = name.replace("with a", "w/"); + name = name.replace(" single", ""); + name = name.replace("group of Mental Powers", "Mental Group"); + + levelCost = parseInt(cost/levels); + switch (levelCost) { + case 1: type = 'MCSL1'; + break; + case 3: type = 'MCSL3'; + break; + case 6: type = 'MCSL6'; + break; + default: 'none'; + } } else { // Determine combat skill levels - name = skillObject.text.replace("with", "w/"); + name = skillObject.text; + + name = name.replace("with all", "w/"); + name = name.replace("with any", "w/"); + name = name.replace("with a", "w/"); + name = name.replace("small group of attacks", "small group"); + name = name.replace("large group of attacks", "large group"); levelCost = parseInt(cost/levels); switch (levelCost) { @@ -3005,6 +3034,9 @@ name = name.slice(0, -3); } else if ((text !== "") && text.includes("Defense Maneuver")) { name = text.replace("Defense Maneuver", "DEF Maneuver"); + } else if ((text !== "") && text.includes("Computer Programming")) { + name = text.replace("Programming", "Prog."); + name = name.slice(0, -3); } else if (skillObject.display !== "") { name = skillObject.display; } From 2bcf011ac21ca772de646b8e777f28bf9cd80107 Mon Sep 17 00:00:00 2001 From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:46:10 -0600 Subject: [PATCH 7/8] Update to README. --- HeroSystem6eHeroic_HDImporter/README.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HeroSystem6eHeroic_HDImporter/README.MD b/HeroSystem6eHeroic_HDImporter/README.MD index 20ce070b5..9e20d00e8 100644 --- a/HeroSystem6eHeroic_HDImporter/README.MD +++ b/HeroSystem6eHeroic_HDImporter/README.MD @@ -113,4 +113,4 @@ Version 2.0 -- Updated to support additional character sheet features as of shee Version 2.1 -- Updated to support additional character sheet features as of sheet version 3.16. Updated version of Hero Designer export format (HeroSystem6eHeroic.hde to version 2.1). Expands support for martial arts maneuvers. Recognizes power notes and scans powers for damage advantages. Adds the everyman PS skill. Added a second sample character with martial arts skills. Bug fixes (August 9, 2024). -Version 2.2 -- Fix for compound power import failure. Minor update to HeroSystem6eHeroic.hde (version 2.2). Improved formatting of text in powers, talents, and complications (September 14, 2024). +Version 2.2 -- Fix for compound power import failure. Recognizes Mental Combat Skill Levels and assigns levels and costs. Minor update to HeroSystem6eHeroic.hde (version 2.2). Improved formatting of text in powers, talents, and complications (September 14, 2024). From b1bd2769e83c4cc837811adf7f2f919c7bd87952 Mon Sep 17 00:00:00 2001 From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com> Date: Sat, 14 Sep 2024 17:56:42 -0600 Subject: [PATCH 8/8] JSON for Version 2.2 --- HeroSystem6eHeroic_HDImporter/script.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HeroSystem6eHeroic_HDImporter/script.json b/HeroSystem6eHeroic_HDImporter/script.json index 0bf81dd06..b6c873839 100644 --- a/HeroSystem6eHeroic_HDImporter/script.json +++ b/HeroSystem6eHeroic_HDImporter/script.json @@ -1,7 +1,7 @@ { "name":"HeroSystem6eHeroic HDImporter", "script":"HeroSystem6eHeroic_HDImporter.js", - "version":"2.1", + "version":"2.2", "description":"HDImporter imports HERO Designer-created heroes, villains, monsters, and other characters into a HeroSystem6eHeroic Roll20 campaign. The characters must be exported from Hero Designer using the format HeroSystem6eHeroic.hde, which is a companion file in the HD Importer repository. To use, open an exported character text file and paste the contents into chat and hit enter. Full sheet instructions in the [README](https://github.com/Roll20/roll20-api-scripts/tree/master/HeroSystem6eHeroic_HDImporter). Based on BeyondImporter Version O.4.0 by Robin Kuiper, Matt DeKok, and Ammo Goettsch", "authors": "Villain In Glasses", "roll20userid":"633423", @@ -13,6 +13,6 @@ }, "conflicts":[], "previousVersions":[ - "1.0, 1.1, 2.0" + "1.0, 1.1, 2.0, 2.1" ] }