Time to be a bit more ambitious. I'm working on a message system to be implemented in some sort of in-game mobile phone or chat application, however I have some initial concerns regarding Characters and TextPrinters. I realize that this is very specific and beyond the essential purpose of Naninovel but i feel that an extension like this would benefit some projects and someone might find it useful as well. Also, considering my skill level, I might be biting a lot more than I can chew right now, but at least it's forcing me to learn the engine on a deeper level and my computer hasn't exploded...yet.
I'll be using the available Chat printer as a base, however I would like to expand a few things on it.
The first one would be the ability to also send pictures/emojis. The sprites could be a resource handled by a provider in a Configuration, much like the items from the Inventory extension. I would need to create another ChatMessage prototype prefab to include an empty container for image components to be displayed if a "picture" parameter was set on the printer in the .nani script. The image would need to be fitted to the width of the messages container and clicking on it would display it in full screen, this could be implemented with a simple CustomUI with a single Image component.
Now the trickier part. Keep a message log for each character. Like a real phone, each contact has it's own message history and there are only two persons interacting in each one, the player (ourselves) and the other npc (contact). Thinking in Naninovel scripts, this could mean a single script for each character conversation that could be called whenever it would be appropriate during gameplay. A little notification on the right bottom corner of the screen with a small preview of the content of the last message would also be an interesting thing to add.
My main concern is the separation of the messages from the regular text flow of the game. If i understand correctly, Naninovel's scripts send text to print on a single "text stream". If I print some text in a Dialogue printer during regular gameplay, then to "receive" a message, my ideia is to create a custom PhoneUI with a Messages panel, this panel is a contact list with each npc that the player has encountered, clicking on a particular npc would switch the panel to a Chat printer with the picked character's message history. Closing the PhoneUI would return to regular gameplay with the Dialogue printer displaying the previous state before accessing the phone. Essentially, making messages/message history independent actors, and in practice they wouldn't show up on the LogUI.
Is this even realistically feasible without drastically changing the framework's design? Which interfaces should I look for to achieve this? I'm studying ChatPrinterPanel implementation of the UITextPrinterPanel class, digging references and implementations,etc. I believe it's a good starting point.
PS: Sorry about the long post :oops: