Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Getting higher level dice to apply to secondary damage rolls only.(Shaped Sheet and Script)

February 23 (6 years ago)

Edited February 23 (6 years ago)
I am setting up my own spell database that integrates to the shaped script at the moment and when I attempt to add Chaos bolt to the database I can not get the higher level damage dice to add only for the secondary damage. I can add in the higher damage dice per level in the sheet itself after successfully importing the spell. But I was wondering if it was possible do that without having to muck about in the sheet itself. If that doesn't make any sense let me know. EDIT: Also even though in the code that is below I specified ranged as the attack type for some reason it is importing as a melee attack any advice on that is appreciated.

{"name":"Chaos Bolt","description":"You hurl an undulating, warbling mass of chaotic energy at one creature in range. Make a ranged spell attack against the target. On a hit, the target takes 2d8 + 1d6 damage. Choose one of the d8s. The number rolled on that die determines the attack's damage type, as shown below.\nD8 damage type\n1 Acid\n2 Cold\n3 Fire\n4 Force\n5 Lightning\n6 Poison\n7 Psychic\n8 Thunder\nIf you roll the same number on both d8s, the chaotic energy leaps from the target to a different creature of your choice within 30 feet of it. Make a new attack roll against the new target, and make a new damage roll, which could cause the chaotic energy to leap again.\n A creature can be targeted only once by each casting of this spell.","higherLevel":"When you cast this spell using a spell slot of 2nd level or higher, each target takes 1d6 extra damage of the type rolled for each slot level above 1st.","emote":"hurls a bolt of elemental chaos at the target","source":"xge pc 151","range":"120 feet","components":{"verbal":true,"somatic":true},"duration":"Instantaneous","castingTime":"1 action","level":1,"school":"Evocation","attack":{"type":"ranged","damage":"2d8","secondaryDamage":"1d6","damageType":"acid, cold, fire, force, lightning, poison, psychic, thunder","higherLevelDice":1},"classes":["Sorcerer"]}
February 26 (6 years ago)
Kryx
Pro
Sheet Author
API Scripter
I'm on vacation right now, but if you reply to this thread on Wednesday I can provide the correct syntax.
February 28 (6 years ago)
Thank you Kryx, take your time on getting back to me there is no rush.
February 28 (6 years ago)
Kryx
Pro
Sheet Author
API Scripter
Thanks for reminding me! I totally forgot about this. :P

Chaos bolt would look like the following:
{
  "name": "Chaos Bolt",
  "level": 1,
  "school": "Evocation",
  "castingTime": "1 action",
  "range": "120 feet",
  "components": {"verbal": true, "somatic": true},
  "duration": "Instantaneous",
  "description": "You hurl an undulating, warbling mass of chaotic energy at one creature in range. Make a ranged spell attack against the target. On a hit, the target takes 2d8 + 1d6 damage. Choose one of the d8s. The number it rolled determines the attack’s damage type, as shown below.\n\n| d8 | Damage Type |\n|:----:|:----|\n| 1 | Acid |\n| 2 | Cold |\n| 3 | Fire |\n| 4 | Force |\n| 5 | Lightning |\n| 6 | Poison |\n| 7 | Psychic |\n| 8 | Thunder |\nIf you roll the same number on both d8s, the chaotic energy leaps from the target to a different creature of your choice within 30 feet of it. Make a new attack roll against the new target, and make a new damage roll, which could cause the chaotic energy to leap again. A creature can be targeted only once by each casting of this spell.",
  "higherLevel": "When you cast this spell using a spell slot of 2nd level or higher, each target takes 1d6 extra damage of the type rolled for each slot level above 1st.",
  "attack": {
    "type": "ranged",
    "damage": "2d8",
    "secondaryDamage": "1d6",
    "higherLevelSecondaryDice": 1
  }
}
February 28 (6 years ago)
Thank you for getting back to me so quickly that is much appreciated! Also I didn't even think of adding the d8 into the syntax of the attack until I saw you put it in there yourself that is amazing! Thanks again!
February 28 (6 years ago)
Kryx
Pro
Sheet Author
API Scripter
Also keep in mind that spell lists are added separately from the spells. XGtE for example:
ShapedScripts.addEntities({
  "name": "XanatharsGuideToEverything",
  "dependencies": ["SRD"],
  "version": "2.0.0",
  "classes": [
    {
      "name": "Bard",
      "spells": [
        "Thunderclap",
        "Earth Tremor",
        "Pyrotechnics",
        "Skywrite",
        "Warding Wind",
        "Catnap",
        "Enemies Abound",
        "Charm Monster",
        "Skill Empowerment",
        "Synaptic Static",
        "Mass Polymorph",
        "Psychic Scream"
      ]
    }
  ]
}