5E Product Walkthrough Playlist
  1. #1

    Adding Resistance Values to a modified DnD 5.0

    Hey, so as the title says I am currently trying my hand at modifying the resistance of DnD 5.0 for the system I am building, I need several layers rather than the flat 50% reduction

    I think I might be drawing close to having figured out all the things required to add more fields, but then it hit me - when I am creating NPCs within the program itself, as I am using the DnD 5.0 as a base, the tab only shows ''Resistance'', would anyone be so incredibly kind as to guide me in the right direction to what/how i should do here?

    I am familiar with the concept of changing the .XML files, have done it for icons and the like, I'm thinking maybe I have to find where the NPC sheet is generated from and add in several more values, but then I'm not certain if the roll-automation in game will pick my new resistances up (as in if there is a different file then just manager_action_damage.lua which comes into play)

    Or possibly making the Resistances a drop down menu? tho I would have no idea how to do that, I'm sure I could experiment my way with slicing and dicing XML code together from other similar libraries

    Been at this for a few hours now and hoping someone has any advice

  2. #2
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,267
    Blog Entries
    9
    I don't know But I do know that 3.x/PF has a value for Resistance (i.e. Fire 10). So I would take a look at both how its handled on the character sheet and in the code. See if that gets you where you want to go

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  3. #3
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,267
    Blog Entries
    9
    Oh, I think Celestian's AD&D ruleset which is based off of the 5E ruleset also does it, so you could look there too.
    http://www.fantasygrounds.com/forums...D-Core-Ruleset

    Problems? See; How to Report Issues, Bugs & Problems
    On Licensing & Distributing Community Content
    Community Contributions: Gemstones, 5E Quick Ref Decal, Adventure Module Creation, Dungeon Trinkets, Balance Disturbed, Dungeon Room Descriptions
    Note, I am not a SmiteWorks employee or representative, I'm just a user like you.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    The first step is you need to decide how you're going to represent the base custom resistance data - for NPCs and for PCs. As you say, you may need a few fields - or you may just need one and change the format of how the resistance data is stored. e.g. Resistance fire 25% or Resistance fire 70% etc.. You need to make these decisions now to minimise wasted work.

    Keeping in mind that the way resistance works is that when a NPC is added to the combat tracker, the resistance data is parsed and a RESIST effect added to the CT - it is this effect that is used by the damage action manager. See 5E effect modifiers here: https://www.fantasygrounds.com/wiki/...ects#Modifiers

    Then, depending on what you decide, you will have to add the fields to the NPC sheet, then write the code to parse out any effects when the NPC is added to the CT, and then change the damage action manager to read the effect/s and take the relevant action.

    Not knowing exactly how the custom layered resistance works, I can't make much of a detailed recommendation. Except - keep it as simple as possible. If you can stick without adding new fields to the NPC record, great. If you can modify the current RESIST effect slightly to make it do what you want, fantastic. This will minimise the amount of code you need to write and also, very importantly, will reduce the amount of re-coding you need to do when there is an update to the 5E ruleset. Every time the 5E ruleset is updated you will need to check that your custom code (created as an extension, not directly modifying the 5E ruleset) is compatible with the updated 5E ruleset and update as necessary - otherwise you will soon be stuck with a custom ruleset based on an old 5E version and might miss out on bugfixes and new functionality.

    Yes, it's a lot of work. But if you want to automate custom functionality, this is what you'll have to do.

    Good luck!
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Quote Originally Posted by Gestosad View Post
    Hey, so as the title says I am currently trying my hand at modifying the resistance of DnD 5.0 for the system I am building, I need several layers rather than the flat 50% reduction

    I think I might be drawing close to having figured out all the things required to add more fields, but then it hit me - when I am creating NPCs within the program itself, as I am using the DnD 5.0 as a base, the tab only shows ''Resistance'', would anyone be so incredibly kind as to guide me in the right direction to what/how i should do here?

    I am familiar with the concept of changing the .XML files, have done it for icons and the like, I'm thinking maybe I have to find where the NPC sheet is generated from and add in several more values, but then I'm not certain if the roll-automation in game will pick my new resistances up (as in if there is a different file then just manager_action_damage.lua which comes into play)

    Or possibly making the Resistances a drop down menu? tho I would have no idea how to do that, I'm sure I could experiment my way with slicing and dicing XML code together from other similar libraries

    Been at this for a few hours now and hoping someone has any advice
    Its going to take you more than "a few hours" to make changes like this.
    You need to find everywhere that these are referenced, XML and Lua and work out how they interact, how they are populated, how they are read.
    Its trivial for a human brain to convert "Partial Resistance", "Resistance" and "Immunity" to 25%, 50% and 100% on the fly, and then to add in another layer or three.
    A computer needs to be programmed to know all of this stuff, when to apply, where to apply it, how to apply it, how to display it etc

    You are going to have to really dive into the code and spend hours just learning what the existing code does and how it references various files/sources to do something.

    Here are some videos on Fantasy Grounds coding. https://www.youtube.com/watch?v=R_Cu...668LyJXmfk25Yv
    None of them cover what you want to do but they will give you a better understanding of how to approach and how to find things.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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 Character Create Playlist

Log in

Log in