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

difficulty setting spell DC and other things I just happened to notice

Discussion in 'Bug Reports & Installation Support' started by mrwinfree, Oct 30, 2018.

  1. mrwinfree

    mrwinfree Member

    Joined:
    May 1, 2016
    Messages:
    82
    Likes Received:
    2
    D20Pro 3.7.5
    Mac OSX 10.14 Mojave
    issue: unable to set spell DC
    reproducible yes.
    Action taken: altering value for spell DC. I used the following scripts:

    func(getPathfinderSpellDC())
    10+func(getfeaturelevel()+getSpellcastingClassAbilityMod()))
    While looking at the log file for clues I came across these error messages:

    multiple Errors in the GAME LOG including:

    1) ERROR JFXThread | Failed to run: com.d20pro.temp_extraction.common.jxbrowser.JxBrowserFactory$$Lambda$96/1228898012@178f241d
    java.lang.IllegalStateException: Browser Core cannot be initialized in JavaFX Application Thread on Mac OS.

    And:

    2) ERROR GameModel | Failed to encode GameModel
    com.sengent.common.exception.XMLException: Invalid final field com.mindgene.d20.common.gamelog.GameLogEntry._tokens

    And This:

    3) javax.script.ScriptException: <eval>:1:59 Expected ; but found )
    10+func(getSpellcastingClassAbilityMod()+getFeatureLevel()))
    ^ in <eval> at line number 1 at column number 59
    at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
    at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:537)
    at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:524)
    at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
    at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)

    Error 1: I think this has been discussed before, i don't recall what the resolution was.
    Error 2: I don't know, it just sounds broken.
    Error 3: Does the javax.script error mean I have too many ))) in the script?

    And lastly, What is the formula to automagically compute the spell DC?
    thanks all,
    Mickey
     

    Attached Files:

  2. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    the script error is due to that should be written as; (neither need a func() call as there is no math inside the () of any of the method calls)

    getPathfinderSpellDC()

    and

    getfeaturelevel() + getSpellcastingClassAbilityMod() + 10

    and example of where a func() is needed;

    dice(func(getFeatureLevel())d4 + func(getSpellcastingClassAbilityMod()))
     
  3. Wesley Gorby

    Wesley Gorby Production/Community Manager
    Staff Member

    Joined:
    Aug 1, 2011
    Messages:
    2,443
    Likes Received:
    140
    That depends on the system and even maybe the class in question.
     
  4. mrwinfree

    mrwinfree Member

    Joined:
    May 1, 2016
    Messages:
    82
    Likes Received:
    2
    okay, Thanks Krill,
     

Share This Page