1. Note: Nightly builds are not officially supported and things that appear broken might actually just be broken with no way of fixing it, but community members may still be willing to assist you with common problems.

Bug/Issue New Elemental Types in Unstable Don't Work

Discussion in 'Nightly Builds Support' started by Kitikira, Dec 12, 2016.

  1. Kitikira

    Kitikira Phantasmal Quasar

    Original post:

    Okay, this is something that's been around since they added elemental damage resistances and weakness, but I've yet to see anything to fix it or work around it.

    This is a "questionable" bug, since it only appears when modding, and won't have any effect on the base game, but it still appears to be something unintentional that makes some features that were provided in the past unusable, and doesn't align with this statement in the previous dev blog.
    The different elemental types, along with their damage numbers and resistance stats, are defined in /damage/elementaltypes.config. This is a JSON file like the rest, but anything added to it has no effect. Only changes to "default", "fire", "ice", "electric", and "poison" do anything, and additional elements are ignored.

    Instead, when these elemental types come up in game, you get an exception like this:
    Code:
    [13:38:24.421] [Error] Exception while invoking lua function 'applyDamageRequest'. (LuaException) Error code 2, [string "/stats/monster_primary.lua"]:34: (StarException) Unknown elemental type with name 'ANYELEMENTALTYPEOTHERTHANTHEDEFAULTONES'.
    
    Which refers to this line:
    Code:
    local elementalStat = root.elementalResistance(damageRequest.damageSourceKind)
    
    From this I assume elemental types are hard coded somewhere, but this seems counter to the role of the elementaltypes.config file, which seems to detail what's needed for an elementaltype.

    Am I just missing something important? This seems quite unintended as in the past elemental types were perfectly fine being added, and it seems reasonable that adding elements to the config file would make them usable, which seems to be what the patch notes imply.

    Edit: sayter helped me figure it out, I was missing a file that caused it to not work.

    Regardless of what you put into the elementalType.config, you must also have a .damage file with the "kind" being the element's name, even if it's not used by any abilities or projectiles.

    So since I've gotten it fixed, I guess this should be locked.
     
    Last edited: Dec 13, 2016
    bk3k likes this.

Share This Page