-
January 8th, 2022, 02:27 #1
- Join Date
- Jul 2010
- Posts
- 36
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
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
- 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 ForgeLast edited by sirnoobsauce; February 18th, 2022 at 19:03.
-
January 8th, 2022, 02:34 #2
Very good. I was doing something along these lines in one of my projects.
-
January 8th, 2022, 08:12 #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
-
January 8th, 2022, 09:06 #4
HI sirnoobsauce,
well done and very helpful so thanks a lot..Daniele Roitero
Trieste, Italy
-
February 10th, 2022, 14:38 #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!
TWITCH | YOUTUBE
BRAZILIAN
GMT-3
FANTASY GROUNDS UNITY - ULTIMATE VERSION
PLAYER ONLY
FORGE CREATOR
Core RPG - Package | PFRPG2 - Full Mode Map | Rolemaster (Classic) - Package | Rolemaster (Classic) - Shopping Stores
-
February 10th, 2022, 22:27 #6
Working in 4E. Thanks!
-
February 11th, 2022, 01:26 #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)
-
February 11th, 2022, 03:18 #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.
-
February 11th, 2022, 11:11 #9
Patriarch
- Join Date
- Feb 2017
- Location
- the seaside, UK
- Posts
- 454
-
February 16th, 2022, 22:07 #10
- Join Date
- Jul 2010
- Posts
- 36
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/latestLast edited by sirnoobsauce; February 17th, 2022 at 12:00.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks