1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. While the majority of active discourse on D20PRO has moved to our Discord Channels, this forum is still active and checked-in on regularly by our staff. However, for the very latest information, conversation and/or immediate support, please join us on Discord here: http://discord.gg/Ph38ckM
    Dismiss Notice

Rules Library Fireball Spell help

Discussion in 'User Created Content' started by bssutton27, Mar 13, 2018.

  1. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
    Hello, trying to input the fireball example spell. It does not appear to be rolling saves or damage. This is what I have. Any help would be greatly appreciated.

    upload_2018-3-13_22-14-47.png
     
  2. Nezzeraj

    Nezzeraj Member

    Joined:
    Jan 31, 2014
    Messages:
    57
    Likes Received:
    2
    Not sure for certain, but first I would up the cost to 1, and if you are writing it with multiply effects, you have to put a formula in the damage value box since it has to be calculated for the different levels. Also, is fireball a level 1 spell that adds damage every level? It should be every spell level at least, so stopping at 9. For the save, I'm not sure about feature level since I haven't used overcasting codes before so I don't know if that script goes in there. Is this for PF or 5e?
     
  3. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
  4. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
    I fixed it, had to check the stack levels button and now works correctly. I don't believe that is mentioned in the tutorial.
     
  5. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
    And now the DC is not calculating.
     
  6. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
    This is the value I had to use to get the DC to work properly. 10+getFeatureLevel()+getIntMod()
     
  7. Tay-Dor

    Tay-Dor Active Member

    Joined:
    May 15, 2016
    Messages:
    313
    Likes Received:
    47
    One problem is the example you're using might be a 5e Fireball spell, so it wouldn't work quite the same. Fireball in PF does 1d6 per caster level with a maximum of 10d6. So someone who knows scripting could suggest a formula for you that would handle that.
     
  8. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
    Thanks, I was able to get it working, just need the adjustments above.
     
  9. mrwinfree

    mrwinfree Member

    Joined:
    May 1, 2016
    Messages:
    82
    Likes Received:
    2
    I found the script getPathfinderSpellDC to be effective. This is in the script library (at least in mine). Have you tried this? Replace the formula you have with that script.
     
  10. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
    I believe I tried that, but will do so again and post any results. Thanks for the suggestion.
     
  11. mrwinfree

    mrwinfree Member

    Joined:
    May 1, 2016
    Messages:
    82
    Likes Received:
    2
    I'm curious to see. Keep me posted.
     
  12. bssutton27

    bssutton27 Member

    Joined:
    Aug 21, 2013
    Messages:
    34
    Likes Received:
    3
    This one is working for PF.
     

    Attached Files:

    mrwinfree likes this.
  13. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    yeah this would be cleaner writing a simple script (useful in other things as well)

    function getSomeDice(dtype, bdice) {
    var res = bdice;
    var castLv = caster.getLevel();

    switch (castLv) {
    case 1: case 2: case 3: case 4: case 5:
    res = res + 1;
    break;

    case 6: case 7: case 8: case 9: case 10:
    res = res + 2;
    break;

    case 11: case 12: case 13: case 14: case 15:
    res = res + 3;
    break;

    case 16: case 17: case 18: case 19: case 20:
    res = res + 4;
    break;

    default:
    res = res + 1;
    break;
    }
    res = res +"d"+ dtype
    return res;
    }

    then usage would be like
    dice(func(getSomeDIce(8, 2)))

    so the result would be for level 1-5: dice(3d8)
    so the result would be for level 6-10: dice(4d8)
    so the result would be for level 11-15: dice(5d8)
    so the result would be for level 16-20: dice(6d8)
     
  14. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    and of course, I just threw that together on the fly, so tweaking to taste is required.. and I haven't had a lot of coffee yet :)
     

Share This Page