PDA

View Full Version : Problem with chat window



Tongaru
June 17th, 2023, 19:02
Hi. I've been fighting this question for some time now.
57796
How exactly can I change the font or color or whatever else I want in a nickname apart from the message?
I do not understand where and how to properly configure the chat ):

Zacchaeus
June 17th, 2023, 19:15
Welcome to the forums.

The font and text colour are determined by the ruleset you are using and/or the theme extension. If you want a different font or a different colour then you'll need to write an extension to override the ruleset or theme. There are a few font extensions on the forge and I believe at least one of them allows you to configure different colours; but don't quote me on that.

https://forge.fantasygrounds.com/shop

Tongaru
June 17th, 2023, 19:33
Thanx. But i know. I'm actually trying to write an extension. I'm not sure if this is the right section of the forum, but.
57797
There no control or window for message personally. Only "chat". But "chat" is WHOLE chat box.
I use this, but that's not what I want.


<chatsettings merge="join">
<modeframe mode="chat" name="chatframe_chat" offset="10,15,20,15" />
</chatsettings>
<framedef name="chatframe_chat">
<bitmap file="graphics/frames/chatframe_chat.png"/>
<offset>10,15,20,15</offset>
</framedef>

Zacchaeus
June 17th, 2023, 19:42
Oh, sorry. I didn't notice which forum this was posted in. I'm sure someone more knowledgeable about coding will step in soon.

Tongaru
June 17th, 2023, 19:58
Okay, thanks anyway)

superteddy57
June 17th, 2023, 20:10
The fonts can be changed by replacing the file path and including the font in the extension. Those can be seen in CoreRPG > graphics > graphics_fonts.xml under the Chat fonts. Those are the fonts that will appear when you output anything to the chat frame.

Tongaru
June 17th, 2023, 20:26
Yup, BUT font will change both the nickname and the message.
Also absolutely do not understand how, for example, change the margin around the portrait.

Tongaru
June 17th, 2023, 20:30
What I mean:
57799
Different font, different color, different size.
Honestly for today I came close to existential despair with that stuff.

superteddy57
June 17th, 2023, 20:46
What parts you can change are defined there. The chat output isn't broken out into a very modular way to change bits and pieces. You could attempt to try and make a new chat mode that may present more options in what you are attempting to do, but still limited due to the current logic of the chat.

Tongaru
June 17th, 2023, 20:50
It's awful :(
There's nothing I can do about the portrait either?
I looked into the scripts, but I couldn't find anything.

Moon Wizard
June 17th, 2023, 20:52
There can be only one chat font per message displayed. The chat fonts available are listed in the CoreRPG graphics_fonts.xml file.

Regards,
JPG

Moon Wizard
June 17th, 2023, 20:53
The portraits and icons displayed next to the chat entry are just icons defined in the ruleset. (Portraits get icons auto-built that are referenced in the current coding, based on the character portrait defined.)

Regards,
JPG

superteddy57
June 17th, 2023, 20:56
The portrait is an icon and can be set prior to outputting to chat without extensions. You can see examples in the ActionsManager (CoreRPG > scripts > manager_actions.lua) and other places where a message is setup and then pushed to the chat using ActionsManager.outputResult or Comm.deliverChatMessage

Tongaru
June 17th, 2023, 21:15
It's just msg.icon? How do I change the offsets on this one?
Icons have no such definitions, from what I can see.

Zacchaeus
June 17th, 2023, 21:32
There's a couple of extensions on the forge which play about with portraits and chat. You might want to have a look at those. Don't know if you can access the code but if you can you might get some ideas.

https://forge.fantasygrounds.com/shop/items/509/view
https://forge.fantasygrounds.com/shop/items/523/view

Tongaru
June 17th, 2023, 21:35
I looked them up)
The first one is really interesting, although it seems like the second one only replaces the icons.

Moon Wizard
June 17th, 2023, 21:47
You can’t change the offsets on the icons. They are drawn at 1-to-1 ratio, and have a fixed offset built-in.

Regards,
JPG

Tongaru
June 17th, 2023, 21:48
There's also some kind of minimum width for the message T____T
At least I know what to do with it, though.
57802
57803

Tongaru
June 17th, 2023, 21:49
(╯°□°)╯︵ ┻━┻
I'ts awful!

Moon Wizard
June 17th, 2023, 22:24
It looks like you have the 9-slice for your replacement frame and/or the offsets in the. Chatsettings set up incorrectly causing the frame to be clipped.

The text or dice or speaker name will wrap to new lines depending on the size of the icons, speaker, text and dice boxes.

Tongaru
June 17th, 2023, 22:39
That's exactly what I'm trying to do. I want the picture to be cropped. And I'm just freaking out because the text move at a negative offset but not that damn texture.

Moon Wizard
June 17th, 2023, 22:55
You can’t edit the picture, only specify it.

JPG

Tongaru
June 17th, 2023, 23:07
I just wanted to do something similar with an overlap.
57804
But I'm tired, so I'm just going to do something easier, lol.
I don't understand the person who coded the chat window at all. This is the place we stare at 80% of the game. Why this can't be customized properly ):

Moon Wizard
June 17th, 2023, 23:17
Every customization capability requires extra coding, testing and design work, as well as ongoing maintenance. It wasn't designed to be customized per the original developers (before my time), and there hasn't been hardly any requests to change it over many years (very rarely).

Regards,
JPG

Tongaru
June 17th, 2023, 23:22
Thanx anyway)