STAR TREK 2d20
  1. #1

    Accurate Stats(Realtime)

    So my group and I made the transition to FG fully about a year ago (even though I've had the license for around 10 years), and so far for the most part we are enjoying all of the features.

    However, one constant issue we are having is 'accurate stats'. Any effects that are on your character are not reflected in any of your skills/combat stats etc. FG seems to calculate effects on the fly, which makes determining if all your information is accurate at any given time extremely painful.

    I looked on the forum but I don't see any posts about this, and I was wondering if this is something that is potentially planned to be corrected in Unity eventually.

    How do other people handle this?

    Thanks!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Effects can be conditional and can only apply to certain things and also certain targets - hence why they are calculated on the fly.

    I don't think this architecture will change anytime soon.

    Your best bet is to simply test an action - the chat window will reflect the modifiers being used with the [EFFECT] data in chat.
    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!

  3. #3
    Trenloe,
    The problem is that 99% of modifiers are actually not conditional. We use pathfinder for example, and the only conditional example I can think of is protection from evil?

    If I have mage armor on, my AC is always 4 higher. Shield +4, etc.

    Conditional modifiers to stats (str, int, dex, etc) are to my knowledge totally non existent.

    Anyway, I guess if that is the approach it is not going to change, even though it seems to be programming to the exceptionally minor exception, and not the norm.

    Would the extension library support something along the lines of adding a screen that would show combat info, stats and skills after modifier? I assume there is some function in the system that 'calculates' the current bonuses and shows them which could potentially be called to get the values?

    As I said this is our number 1 issue with FG, having come from Maptools which handles all of this on the fly, it is extremely jarring to have no clue what your current stats are.

    Thanks for the quick reply!

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by jasharen View Post
    The problem is that 99% of modifiers are actually not conditional. We use pathfinder for example, and the only conditional example I can think of is protection from evil?

    If I have mage armor on, my AC is always 4 higher. Shield +4, etc.

    Conditional modifiers to stats (str, int, dex, etc) are to my knowledge totally non existent.

    Anyway, I guess if that is the approach it is not going to change, even though it seems to be programming to the exceptionally minor exception, and not the norm.
    I understand where you're coming from.

    I'm sure there are also a bunch of design decisions we're not aware of that come into play here.

    Quote Originally Posted by jasharen View Post
    Would the extension library support something along the lines of adding a screen that would show combat info, stats and skills after modifier? I assume there is some function in the system that 'calculates' the current bonuses and shows them which could potentially be called to get the values?
    Any effect modifiers are not centrally calculated, they are calculated when the specific action is being carried out. An action is usually a dice roll - attack, damage, skill check, save, etc.. So, it's not always easy to get at this data without essentially replicating the action code without triggering the action.

    It's possible to do this as an extension, but it would be a lot of work and I could pretty much guarantee you'd need to constantly update it as future FG update code comes out. It might be easier (less maintenance) to do it for some key areas - AC, BAB, Saves, etc. but you'd still need to look in multiple places - the base effect, ability modifiers, conditions, etc..
    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
    So in theory I could copy the logic in the PF framework for an attack, and parse out the logic that determines the bonuses, same for saves and AC. Time to start reading up on the API's

    Thanks for the pointers, greatly appreciated.

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Have a look at this extension: https://www.fantasygrounds.com/forum...Core-Extension

    scripts\manager_custom_dsamove.lua has an action that basically checks a set of specific effects and outputs the modified base number. The effects check function is addEffectModifiers You could do something similar with code taken from the 3.5E actions to work out what the active effects modifiers are and then apply that somewhere in a modified character sheet.
    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!

  7. #7
    So I spent a little time this morning looking through scripts. No where near ready to start yet, however I had a couple questions.

    I am looking in the manager_actor2.lua and I see:
    getAbilityBonus, and if I am ready it right, the bonus it gives you is the final stat bonuses including modifiers from effects?
    getDefenseValue also appears to have everything I need for determining AC's of all the various types.

    Am I missing something or should I be able to leverage those?

    Really appreciate all the help and pointers The community here is one of the top reasons I decided to move to FG.

    Cheers!

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by jasharen View Post
    So I spent a little time this morning looking through scripts.
    Nice one - and good finds with the 2 function. However...

    Quote Originally Posted by jasharen View Post
    getAbilityBonus, and if I am ready it right, the bonus it gives you is the final stat bonuses including modifiers from effects?
    This doesn't include any effects modifying that ability.

    Quote Originally Posted by jasharen View Post
    getDefenseValue also appears to have everything I need for determining AC's of all the various types.
    This returns a lot of information. The main gotcha is that it needs a target and a source actor (PC/NPC) - so that it can work out any conditional/targeted effects as well. It also looks at the text of an attack roll - FG passes a lot of information as part of the roll description (usually with square brackets). You might be able to call that function with some basic hard-coded data for the source or target and the roll information.
    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!

  9. #9

    Maybe this can give you ideas?

    Jasharen, I have been working on an extension for my 3.5E game to give me more accurate stats but based on magic items not effects but you might be able to look through what I have done to get some ideas. Make sure you load this in 3.5 ruleset in a test campaign, I wanted to be able to have the characters original rolled ability stats "base" plus the level adjustments "level" and any other permanent changes to a stat such as Manual of gainful exercise "misc", on the combat page and can only be edited by the DM. Then on the main page the stat "score" column is the sum of those 3 and not editable. Then I added another column for ability enhancements next to the ability damage column, I know you can just do a negative number into the damage one to get an enhancement but I prefer it separated for more flexibility. I added more fields to the items to let items be magic and give bonuses to abilities and saves and working on armor bonus types still, its a work in progress , but when you equip the items it will show on the stats on the character sheet and then I made it so when you apply the effect "AntiMagicField" to the PC all the magic bonuses from the items, armor and weapons will be removed and will show on the character stats. I have only a vague understanding of LUA or any programing language and have had to reverse engineer to figure how to do this so I am sure it could be done much more efficient by someone who knows how.

    Oh and on the items in the "type" field put "Weapon", "Armor", or "Wondrous Item" to see the extra fields.

    In the files I put comment tags "<!-- added -->" for XML and "-- added" for LUA to mark areas that I changed.

    Will try to attach it here for you to download if that's possible.
    https://www.fantasygrounds.com/forum...1&d=1528958244
    not sure I attached that properly. EDIT: oh it attaches it below automatically.

    So I would be very grateful to anyone who wants to look at this and improve it to be more efficient and not break so easy on updates as I don't even really understand how to do the merging of XML files, Thanks.
    Attached Files Attached Files
    Last edited by mr900rr; June 16th, 2018 at 20:11.

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
  •  
FG Spreadshirt Swag

Log in

Log in