TALES of the VALIANT
Page 1 of 8 123 ... Last
  1. #1

    Extension[CoreRPG]: display NPC tokens as portraits in chat

    This is a fairly straightforward extension for CoreRPG in FGU (I haven't tested in FGC, no idea if it would work) to add NPC tokens to the chat when speaking as NPCs. I have wanted that feature for a while, but from some searches on the forums I couldn't find anyone else having done an extension for that.

    I saw some other posts from people asking is such an extension existed though, so I decided to share this since some other people seem to have wanted the same feature.

    I have only tested it with basic CoreRPG, 5e and a couple of Modiphius 2d20 rulesets. But in theory, it should work for other rulesets that extend CoreRPG as long as they store NPC names under the "name" element and the token string under the "token" element. And as long as they don't implement their own chat handling that changes the tokens back via a ChatManager message handler.

    And as a usage note: It only works as long as the chat identity exactly matches the NPC name (so as long as you don't modify the NPC name after activating the identity, that is no issue).

    It also applies when the GM speaks with a player character's identity (their chats will have the appropriate portrait).

    As of v2.0, it also supports dice rolls, entities in the combat tracker, and NPCs imported from modules.

    The current version is available here:

    https://github.com/bakermd86/NPCPort...eleases/latest
    https://forge.fantasygrounds.com/shop/items/509/view

    Attached is an example of what the extension looks like when in use.

    --Edit--

    I added an option to also register additional datatypes with the portrait extension so that you can have tokens in chat for any datatypes that have a "name" field for their speaking identity, and a "token" field containing a token. To use that in your own extensions/rulesets/whatever, you just need to call: NPCPortraitManager.registerDataType("class")

    In an onDesktopInit function. The simplest way is just to have a global script set an Interface.onDesktopInit callback:

    Interface.onDesktopInit = onDesktopInit
    And then register any data types from within that callback. For example (taken from my STA ruleset):

    function onInit()
    Interface.onDesktopInit = onDesktopInit
    end

    function onDesktopInit()
    -- Register crewmate record type with NPCPortraitManager
    if NPCPortraitManager and NPCPortraitManager.registerDataType then
    NPCPortraitManager.registerDataType("crewmate")
    end
    end
    UsageExample.png

    - Updated 01/08/22 to work with Savage Worlds ruleset after being told it didn't work
    - Updated 01/30/22 to add link to Github release page
    - Updated 02/18/22 to add link to the Forge
    Last edited by sirnoobsauce; February 18th, 2022 at 19:03.

  2. #2

  3. #3
    Very nice! Any plans to put this on the forge?
    My Forge creations: https://forge.fantasygrounds.com/crafter/9/view-profile
    My GitHub: https://github.com/MeAndUnique
    Buy me a coffee: https://ko-fi.com/meandunique
    Discord: MeAndUnique#6805

  4. #4
    HI sirnoobsauce,
    well done and very helpful so thanks a lot..
    Daniele Roitero
    Trieste, Italy

  5. #5
    A genius finally did something I always wanted and never knew how to do! Now we will have more "personality" in chat dialogs! To make it even better, we just need to read a post that was added to the dice roll script to show the NPC portrait, then it would be perfect!

  6. #6
    Working in 4E. Thanks!

  7. #7
    My chat-only RP-heavy game thanks you for this.
    Games Running:
    WePF Second Darkness (Pathfinder 1e)
    Raven's Purge - Saturdays (Forbidden Lands)
    SavageWorlds Sci-Fi Sundays (SWADE)
    Savage Worlds Gameday Thursdays (SWADE)

  8. #8
    As Yako2020 mentioned, have you investigated if this technology would work on NPC to-hit and damage roll chat readouts? Replacing the GM icon.


  9. #9

    Join Date
    Feb 2017
    Location
    the seaside, UK
    Posts
    454
    Quote Originally Posted by kevininrussia View Post
    As Yako2020 mentioned, have you investigated if this technology would work on NPC to-hit and damage roll chat readouts? Replacing the GM icon.

    That would be awesome!

  10. #10
    Thanks for the suggestion on the attack/damage rolls, I did a quick implementation of that and updated the latest version available above. I tested in 5e, SavageWorlds and my own Star Trek Adventures ruleset, and it seemed to work OK, that is available here:

    https://github.com/bakermd86/NPCPort...eleases/latest
    Last edited by sirnoobsauce; February 17th, 2022 at 12:00.

Page 1 of 8 123 ... Last

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
  •  
DICE PACKS BUNDLE

Log in

Log in