5E Product Walkthrough Playlist
Page 1 of 2 12 Last
  1. #1
    Lord Kavos's Avatar
    Join Date
    Jun 2013
    Location
    Deception Bay, Queensland
    Posts
    718

    GM Portrait change in Chat Window (NPC portaits Idea?)

    I found some ideas for changing the GM token in the chat window, so I worked out a basic extension to do that.

    (Actually one my players sent me the image of the DM from the old D&D cartoons & thought it would be cool for me to use...)

    Got me thinking, if you could change it, could you then use it for NPCs too?

    Not sure if could be simple extension, or a core change...thought i'd throw the idea out here & see if anyone has any ideas on how it could work.

    It would be cool to link it to the NPC bubbles that change the speaker in chat, but that's probably a core mechanic change & would be a wish list item maybe...

    Here's my extension if it helps.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Images appearing the chat window need to be static ruleset (or extension) icon resources. So, you could change the chat icon through an extension (for different NPC speakers, etc.) but you'd always be limited to a preset number of icons defined in the ruleset/extension.

    To link it to a speaker you'd need some way of mapping the speaker name to one of these pre-defined icon resources.
    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
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    My idea for this was to actually have the NPC portrait set using code similar to the PC portraits (a portrait/token setup like the PC)... then tweak the code for GM chat to use the NPC portrait when the GM has that ID. Seems like it wouldn't be too bad to do, basically bring the code from PC portraits over to the NPC... and then change the chat stuff a bit.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Blackfoot View Post
    ... and then change the chat stuff a bit.
    That's the problem - as I mentioned above, you can't change the chat icon dynamically. It has to be a pre-defined graphical resource in the ruleset (or an extension). You have to use an icon: https://www.fantasygrounds.com/refdoc/icon.xcp which references a graphics file within a ruleset or an extension, not outside of those or any other FG graphic resource - i.e. you can't use portraits, tokens, images - it has to be an icon resource: refer to the "icon" entry in the "message data structure" section here: https://www.fantasygrounds.com/refdoc/Comm.xcp

    As mentioned above, you could make a bunch of pre-defined icons, but you would be limited to just those icons.
    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
    Blackfoot's Avatar
    Join Date
    Oct 2010
    Location
    New Jersey, USA
    Posts
    4,202
    Blog Entries
    4
    The player portraits change dynamically.. I don't see why this couldn't be made to work the same way.
    Full License Operator - You must have a 'Lite' License to play in my games.
    Member and GM in the Fantasy Grounds Pathfinder Society Group.
    PFS Fantasy Grounds Forum
    FG Community Teamspeak Server: ts.fg-con.com
    Interested in Custom Character Portraits and Tokens? Contact me.

  6. #6
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Blackfoot View Post
    The player portraits change dynamically.. I don't see why this couldn't be made to work the same way.
    Hhhmmm, you've got a good point there...
    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
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    It appears that the PC portraits are generated automatically, if the relevant <portraitset> parameters are set: https://www.fantasygrounds.com/refdoc/portraitset.xcp

    This is very specific to the portrait allocation for PCs and uses the player side identity to generate the token.

    As this is something that is built into the base FG application, and is specific to player portraits, I don't think it will be possible to use this to generate GM portraits dynamically.
    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!

  8. #8
    Lord Kavos's Avatar
    Join Date
    Jun 2013
    Location
    Deception Bay, Queensland
    Posts
    718
    Is it possible to write an extension that allows choice of a portrait?

    You would only need 4-5 portraits for an adventure (usually), and if you could place them in the same folder & have some functionality to select them in fg?

  9. #9
    Lord Kavos's Avatar
    Join Date
    Jun 2013
    Location
    Deception Bay, Queensland
    Posts
    718
    [QUOTE=Trenloe;195781 As mentioned above, you could make a bunch of pre-defined icons, but you would be limited to just those icons.[/QUOTE]

    Could you define these icons, rename the images to match the names of these files? As I said above would need some functionality to select between them...

  10. #10
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Quote Originally Posted by Lord Kavos View Post
    Could you define these icons, rename the images to match the names of these files? As I said above would need some functionality to select between them...
    Yes, but you would have to put them in an extension. i.e. repackage your extension each time you change the icon graphics file.

    Then, as you say, there would need to be code that recognizes some keyword/markup in the chat text that ties it to a specific icon resource.
    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!

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

Log in

Log in