STAR TREK 2d20
Page 1 of 2 12 Last
  1. #1
    jkeller's Avatar
    Join Date
    Dec 2018
    Location
    Virginia, USA
    Posts
    38

    Skill Check: Special Effects on Critical Success/Failure

    Is there any way to automatically do something when a PC rolls a skill check and gets a 1 or a 20? Or an extension that does this?

    I'm thinking of something along the lines of the Crit/Fumble tables, but for skill checks instead of attacks.

    Thanks!

  2. #2
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,741
    You would need an extension; but I don't know of one. It would all depend on what you want to happen when the 1 or 20 gets rolled.
    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
    jkeller's Avatar
    Join Date
    Dec 2018
    Location
    Virginia, USA
    Posts
    38
    Nothing fancy. Just roll on a table and show the result in the chat window. The trick would be to use a different table for each different skill.

    This might be something I could develop (I'm a programmer), but I'm not even sure where to begin. Any suggestions would be most welcome!

  4. #4
    LordEntrails's Avatar
    Join Date
    May 2015
    Location
    -7 UTC
    Posts
    17,151
    Blog Entries
    9
    Theogeek has an extension that does special criticals on a natural 20 for attacks, but not for other skills checks. So it's possible, but like Mr Z, I'm not aware of any extensions that do what you are wanting.
    Fantasy Grounds Forge

    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.

  5. #5
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Quote Originally Posted by jkeller View Post
    Nothing fancy. Just roll on a table and show the result in the chat window. The trick would be to use a different table for each different skill.

    This might be something I could develop (I'm a programmer), but I'm not even sure where to begin. Any suggestions would be most welcome!
    There's an example of this in the 5E ruleset scripts\manager_action_attack.lua file - the onPostAttackResolve function that calls ActionAttack.notifyApplyHRFC with the name of the table to roll - for example: ActionAttack.notifyApplyHRFC("Critical Hit"); would roll on a table called "Critical Hit".

    You could do something similar for skill checks - in the scripts\manager_action_skill.lua file - the onRoll function determines the success level, and you could override this function in an extension and determine if a table has to be rolled and which table to roll.

    The Fg developer guide can be found in the Wiki, which will help to get you started: https://fantasygroundsunity.atlassia...eveloper+Guide
    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!

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Try the attached extension as an example (5E Skill Crit Table) - the code is in the my_manager_action_skill.lua file - in the "-- Custom code" section.

    This will check for a 20 or a 1 and then roll on a table called either "Critical Skill - XXXX" table or "Fumble Skill - XXXX", where XXXX is the skill name parsed from the [SKILL] XXXX chat data.

    This means you'll need different tables for each skill. Change the code to whatever you'd like!

    EDIT: I've updated the extension - made it more future proof (i.e. using less code from the 5E ruleset) and made it handle skill names with spaces properly.
    Attached Files Attached Files
    Last edited by Trenloe; May 29th, 2023 at 09:14.
    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
    jkeller's Avatar
    Join Date
    Dec 2018
    Location
    Virginia, USA
    Posts
    38
    Thank you so much! I will give it a try

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    I've edited the extension - updated in post #6 above.
    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
    jkeller's Avatar
    Join Date
    Dec 2018
    Location
    Virginia, USA
    Posts
    38
    > ActionSkill.onRoll

    Thanks Trenloe. I'm glad to see there's a way to invoke the default implementation, without having to copy the code.

  10. #10
    jkeller's Avatar
    Join Date
    Dec 2018
    Location
    Virginia, USA
    Posts
    38
    I've got it installed (locally) now. So far so good!
    Last edited by jkeller; May 29th, 2023 at 18:00.

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