DICE PACKS BUNDLE
  1. #1

    Editing 5e to use Numerical Resistances Help

    I'm trying to edit the 5e Ruleset to allow for the parsing of numerical resistances in order to use some custom rules.
    The 5e Combat Tracker accepts numerical resistances in the effect, and it correctly reduces damage (i.e. "RESIST: 2 Fire" and "RESIST: Fire") however, the NPC -> Combat Tracker parsing does not recognize this. When I add an NPC with "RESIST: 2 Fire" to the Combat Tracker, it parses only "RESIST: Fire". So I'm attempting to recode to change this.

    I believe that the Combat Tracker parsing is located in the file location Scripts -> Combat_Manager2.lua, but I'm very new to lua coding. Everything I've tried so far has resulted in errors when trying to add an NPC to the Combat Tracker. The 3.5 ruleset supports numerical resistances, so I've been trying to use that script file as example code, but the function setup is different in 3.5 and 5e, so I've not gotten very far in that.

    If anyone is more experienced in ruleset editing and could give me some pointers or help me out...I feel like this would be a fairly simple code change if I can identify what needs to be edited.

  2. #2
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,891
    I can't tell you about coding but the effect you desire is RESIST: 2, fire. Note the comma. This will work on any NPC (At least it did when I tried it). I can't think of a way to automate this (i.e. have a form of words which the parser will create the effect when dropped on the CT) so it would have to be done manually.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  3. #3
    Right, I was able to manually add the "RESIST: 2 Fire" after an NPC is on the Combat Tracker, and the 5e ruleset accepts that and correctly reduces fire damage by 2 instead of halving it. NPCs can be saved with "2 Fire" resist as well, but I'm trying to find a way to automate the parsing of this effect. My custom campaign is going to have many NPCs with limited resistances, it would be a huge pain to manually change this each time. Using the 3.5 ruleset as a base ruleset would actually be worse because it has even more issues I'd have to correct.

    It appears to me, (based on the parse script I've found so far) that 5e only recognizes the keyword damage types and ignores any numerical values, whereas the 3.5 ruleset recognizes the numbers and feeds it into the Combat Tracker insert statement. Sadly, all I can do so far with the scripts is vaguely understand what they are doing. Editing them to accept the numerical values is just causing errors when I add NPCs to the Combat Tracker. I'm missing some variable keywords and understanding of the IsWord vs IsNumber commands, but was hoping someone experienced could help me out. I'm not getting anywhere fast.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in