From cf2459fb375649064b6ffe2cefda7f94e29c8028 Mon Sep 17 00:00:00 2001
From: Villain1nGlasses <85969638+Villain1nGlasses@users.noreply.github.com>
Date: Mon, 5 Aug 2024 12:05:25 -0600
Subject: [PATCH 01/11] Working version 2.1 created. New HDE 2.1
---
.../2.1/HeroSystem6eHeroic.hde | 3533 ++++++++++++
.../2.1/HeroSystem6eHeroic_HDImporter.js | 4755 +++++++++++++++++
.../2.1/Sample_Character.TXT | 1 +
.../2.1/Sample_Character.hdc | Bin 0 -> 523852 bytes
4 files changed, 8289 insertions(+)
create mode 100644 HeroSystem6eHeroic_HDImporter/2.1/HeroSystem6eHeroic.hde
create mode 100644 HeroSystem6eHeroic_HDImporter/2.1/HeroSystem6eHeroic_HDImporter.js
create mode 100644 HeroSystem6eHeroic_HDImporter/2.1/Sample_Character.TXT
create mode 100644 HeroSystem6eHeroic_HDImporter/2.1/Sample_Character.hdc
diff --git a/HeroSystem6eHeroic_HDImporter/2.1/HeroSystem6eHeroic.hde b/HeroSystem6eHeroic_HDImporter/2.1/HeroSystem6eHeroic.hde
new file mode 100644
index 000000000..560f9541a
--- /dev/null
+++ b/HeroSystem6eHeroic_HDImporter/2.1/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.1/HeroSystem6eHeroic_HDImporter.js b/HeroSystem6eHeroic_HDImporter/2.1/HeroSystem6eHeroic_HDImporter.js
new file mode 100644
index 000000000..137ea69d0
--- /dev/null
+++ b/HeroSystem6eHeroic_HDImporter/2.1/HeroSystem6eHeroic_HDImporter.js
@@ -0,0 +1,4755 @@
+/* HeroSystem6eHeroic_HDImporter.js
+ * Hero Designer Importer for the Roll20 Hero System 6e Heroic character sheet
+ * Version: 2.0
+ * 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.0";
+ const versionSheet = "2.9"; // Note that a newer sheet will make upgrades as well as it can.
+ const needsExportedVersion = new Set(["1.0", "2.0"]);
+
+ 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, "Source exported from HERO Designer using HeroSystem6eHeroic.hde version 1.0");
+ }
+
+ 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 = "";
+ 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;
+
+ 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 = getAdvantage(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 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["powerText"+ID] = (powerArray[importCount].text).trim();
+ importedPowers["powerAoE"+ID] = isAoE(testObject.testString) ? "on" : 0;
+
+ // 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")) {
+ // 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("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")) {
+ 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("Mental Blast")) {
+ return "Mental Blast";
+ } 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 getAdvantage = 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);
+
+ if (weaponString.includes("range based on str")) {
+ advantage += 0.25;
+ }
+
+ 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.1/Sample_Character.TXT b/HeroSystem6eHeroic_HDImporter/2.1/Sample_Character.TXT
new file mode 100644
index 000000000..391cf8236
--- /dev/null
+++ b/HeroSystem6eHeroic_HDImporter/2.1/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 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)" }, "equipment02":{ "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":"(1 END/turn)" }, "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":"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":"" }, "equipment07":{ "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":"" }, "equipment08":{ "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":"" }, "equipment09":{ "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":"" }, "equipment10":{ "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":"" }, "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 the CompanyFringe Benefit: Membership", "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":"" }, "complication02":{ "type":"Hunted", "points":"15", "text":"Hunted: Hunted by agents of Summer. Frequently (Mo Pow; Mildly Punish)", "notes":"" }, "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)", "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)", "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)", "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)", "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)", "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)", "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":"Mercenary", "enhancer":"", "text":"PS 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"2", "levels":"0", "cost":"2" }, "skill02": { "name":"Herbalist", "enhancer":"", "text":"PS 11-", "display":"Professional Skill", "attribute":"GENERAL", "base":"0", "levels":"0", "cost":"0" }, "skill03": { "name":"", "enhancer":"", "text":"Language: Clan's Tongue (idiomatic; literate) (5 Active Points)", "display":"Language", "attribute":"GENERAL", "base":"5", "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 Battle Axe", "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":"Matt", "gmName":"Villain In Glasses", "characterFile":"Darci.hdc", "versionHD":"20220801", "timeStamp":"Sat, 27 Apr 2024 16:03:01", "genre":"Fantasy Hero", "campaign":"Coryn's Company", "version":"2.0", "HeroSystem6eHeroic":"true" } }
\ No newline at end of file
diff --git a/HeroSystem6eHeroic_HDImporter/2.1/Sample_Character.hdc b/HeroSystem6eHeroic_HDImporter/2.1/Sample_Character.hdc
new file mode 100644
index 0000000000000000000000000000000000000000..baad5b59ee3c32bec9e11d3e9ddf9f1104906274
GIT binary patch
literal 523852
zcmeF)X;T&3wk~Qu6LJ27cYWFGgnKTj!4vcB6G$P7)GF$Z6EhTRRFp!{AAj$CpX}rs
z1vx03OsC=q0vIE+XD?fC#oJoz`TzcZ1HTXapMj%+_XF<+t_^%1crma$us85#U}xaN
z!2cfj$H4HwzXpc#|61;R7}(17=ehe~;8k_^!NC22`GMb3Y9eL+&%l2T{Evab)HpM+
zFfcu^p5K|2n9HZ8x+nf!w=zous{{A)gwI-jHgJ%Z-VN*z+(~=?N{#xqlWSXPZ7x?{
zr!V^{Sz5i8Hhv$tl^Qnk#LU1S`CS=UPXF!<+#YyP_2zy)yLRok++0en=E|L1yPxOE
zh$jces}axU`bO%TZ74Nq6S4Qy6VZl}aT)ti+({i0gQ
zS9#XVxl?9vW8h2f?C0D2%;bxIUpKR5R$o-(Ur*oerM5CJ>U){?4yrZzM_RwpG4m(a
z{Eup0=QF?8GB4c}@keHBI;&phYc@3-^_!~Y>9kwuMj4;fHJks|=}z@q_iH{+zQ}CM
zq-SXNMdnZM3N<~>GwXS}y{)A@v0qWnwQ9D|$3p6~`V(3Ee+`W0?^ynhW|b%NJC*Ab
zq4KeTk*e;^)Y|^ka7vEkxsjBf%;&K@F`g$zj;|DYG6Q$2-k{8T`CYHtyp?|MWbHpx
zbFM!FRAZ8G9TuCCoBCiqyCVUH#fJdnOx6bV>W~6
z>uE}V$=#YxO39_F%)@FgzDpUq|60c3@9ofnr_B0ZYHIDo)^3~`SWLO~jP^l#I-4@B
zwZ0ZUvYTfQQ`bRycr?TGl?BY;lz+N?y
z`^W9qZD{3V)!zH`yX-|hFqisOuV$Gi_qS5|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