PDA

View Full Version : GM token change with the embodiment of npcs?



YAKO SOMEDAKY
July 25th, 2018, 04:51
Something that would be very cool to have in CoreRPG, would the GM be able to take a picture, just like the characters ... I know that NPCs have only miniatures and not portraits but it would be cool to have ... would give more " life "to the game and then I wonder would that be possible?

Andraax
July 25th, 2018, 05:07
I wrote a GM Token extension - it's around here somewhere.

Trenloe
July 25th, 2018, 05:11
Where would this "picture" be displayed?

A pretty standard approach is to attach portrait/character flavor images in the other tab, allowing the GM to quickly share this with the players.

YAKO SOMEDAKY
July 25th, 2018, 15:02
Andraax, I know there is a possibility of changing the GM Token, but it would be fixed, the case would be the NPC have portrait, I think it would look the same as the PC.
However GM would take the portrait when speaking or taking action after clicking on the chat balloon or activating that option to take the role when it was selected in Combat Tracker..I know it is complicated ... even if it is not a programmer, but we can not cool it would be cool to give different faces to GM :D
And this picture would be displayed in the chat, just like with PCs, when they perform actions or when they type in chat.

damned
July 26th, 2018, 02:11
Andraax, I know there is a possibility of changing the GM Token, but it would be fixed, the case would be the NPC have portrait, I think it would look the same as the PC.
However GM would take the portrait when speaking or taking action after clicking on the chat balloon or activating that option to take the role when it was selected in Combat Tracker..I know it is complicated ... even if it is not a programmer, but we can not cool it would be cool to give different faces to GM :D
And this picture would be displayed in the chat, just like with PCs, when they perform actions or when they type in chat.

There is no interface to change the GM token once the table has loaded.

celestian
July 26th, 2018, 03:18
That would be an interesting idea.

Set the portrait to the token of the impersonated creature. I dug into the code looking and best I could see is how I could have a "list" of portraits to use but nothing on the fly ... I couldn't find a way to programmatically create a portrait. If you could then you'd just need to tell onDeliverMessage to use the string name of that portrait.

If someone has an idea how to create portraits via code then... yeah it would be doable.

Bidmaron
July 26th, 2018, 04:55
Is it because portraits have to originate from the portraits folder? I don't remember portraits coming from a graphics resource like icons and frames do.

Trenloe
July 26th, 2018, 05:30
Portraits get converted to icon resources when they are selected to add to a PC. The resource files created are saved in the campaign portraits directory.

Bidmaron
July 26th, 2018, 12:54
Right, but portraits have to originate in the portraits folder, right? They cannot come from anywhere else because they are not resources defined in the xml like all other icons (except auto-conversions), frames, and fonts.

YAKO SOMEDAKY
July 26th, 2018, 14:25
I imagine it from the same folder, subfolder or even a .ppk file

Trenloe
July 26th, 2018, 14:54
More information on accessing portrait files in the API entry here: https://www.fantasygrounds.com/refdoc/User.xcp#getPortraitFileList

And info on the PC portrait here: https://www.fantasygrounds.com/refdoc/User.xcp#getLocalIdentityPortrait

celestian
July 26th, 2018, 17:01
More information on accessing portrait files in the API entry here: https://www.fantasygrounds.com/refdoc/User.xcp#getPortraitFileList

And info on the PC portrait here: https://www.fantasygrounds.com/refdoc/User.xcp#getLocalIdentityPortrait

For what I was thinking I'd need to generate a portrait on the fly using a bitmap (token) to do so. I don't think that's possible. msg.icon needs to be set to a portrait "name" from my research to make his idea a reality.

Moon Wizard
July 26th, 2018, 17:55
Portraits need to be assigned to a PC ID before they become icons/tokens dynamically. It's not set up for on the fly assignment as a general tool.

Regards,
JPG

Bidmaron
July 26th, 2018, 19:37
That assignment has to be through the interface too, right? You could not, for example, programmatically create a bogus character, assign it a portrait to generate an icon, and then use that icon elsewhere....

LordEntrails
July 26th, 2018, 21:51
That assignment has to be through the interface too, right? You could not, for example, programmatically create a bogus character, assign it a portrait to generate an icon, and then use that icon elsewhere....
Like a bunch of bogus NPCs with portraits and then use the GM ability to speak as an NPC...?

Bidmaron
July 27th, 2018, 00:11
Why not?

LordEntrails
July 27th, 2018, 00:42
Why not?
Don't ask me! I can barely follow all of you when you start talking in this secret language you refer to as LUA *G* Just was checking if that's what was being discussed or not. You know, in layman's terms *G*

Blackfoot
July 27th, 2018, 05:22
This whole concept relates to something I've been fiddling with as well where a superhero character (or any character for that matter) might have 2 identities.. Clark Kent and Superman for example... one portrait for Clark and the other for Superman.. he clicks a button on his sheet and his name changes as does his portrait. The interface would be intended to make identity switching easy.. rather than having to go and find a new portrait each time you swap IDs. The name change part was easy enough.. but I've been running into all of this on the portrait side.

I was also looking at the portraits for NPCs piece as well... where the GM could adopt the chat window image of the NPC they are speaking as and the NPCs would use similar portrait/token code as PCs. There is utility and functionality here... if a work around can be found/created.