Well there is this function which you can use to format your message based on the codes:Triple Alfa wrote: Sat Jun 13, 2020 9:01 am Hey guys it's been a little while. I was having a bit of a creative block when I realized I wasn't really working to my strengths, so I switched to a new personality with a different approach. Instead of trying to do one character with a neatly flowing storyline I'm now taking a more CYOA like approach with multiple characters.
Anyway while working on the new personality I ran into an issue. I made a function to send messages with a custom sender and custom colors.(It's mostly a copy from my older narrator function.) And while it is working fine just like the narrator one, I noticed it doesn't accept modifiers like "<b>".
"sendMessage("<b>test</b>");" results in a bold "test"Code: Select all
function sendSpecialMessage(sender, color, message, wait) { let textName = new javafx.scene.text.Text(replaceVocab("[" + sender + "]: ")); eval("textName.setFill(javafx.scene.paint.Color." + color + ")"); textName.setFont(javafx.scene.text.Font.font(null, javafx.scene.text.FontWeight.BOLD, TeaseAI.application.CHAT_TEXT_SIZE.getDouble() + 1)); message = replaceVocab(message); let text = new javafx.scene.text.Text(message); text.setFill(javafx.scene.paint.Color.BLACK); text.setFont(javafx.scene.text.Font.font(null, javafx.scene.text.FontWeight.NORMAL, TeaseAI.application.CHAT_TEXT_SIZE.getDouble())); sendCustomMessage(textName, text); if (getVar(VARIABLE.DEBUG_RAPID_TESTING, false) === false) { if (wait === undefined) { sleep(3000 + message.length * 50, "MILLISECONDS"); } else if (!wait.isNaN) { sleep(wait * 1000, "MILLISECONDS"); } } else { sleep(1); } }
"sendSpecialMessage("Test", "BLACK", "<b>test</b>");" results in "<b>test</b>"
I'm assuming it's a limitation of sendCustomMessage()?
Since I'm sending all messages in this format I really need a way to solve this issue.
Also is there any word on a fix for the video issues I reported earlier?
I'm planning on using videos for this personality and It'd be nice if they gave me more than a black screen
Triple Alfa wrote: Thu May 14, 2020 11:47 pm More feedback. I just tried to play a video and had two issues:
1) I tried to play two separate .mp4 videos and both gave me a black screen with no errors.
2) .webm Gives me a "MEDIA_UNSUPPORTED" exception. This is very unfortunate as a lot of online content these days is in the .webm format.
https://github.com/GodDragoner/TeaseAIJ ... .java#L243
THen you have list of nodes. After that you will have to change any style of these nodes to your liking. Additionally you will have to add your textName to the front of the list. Then you can call this function with the resulting list:
https://github.com/GodDragoner/TeaseAIJ ... .java#L226
That should take care of whatever you are doing. However there is no typing or delay afterwards.
Can you give me an example of a mp4 that can't be played?
Yes could be that WEBM is not supported. But running a quick webm to mp4 converter on the files you want to play isn't too bad. I can look if there is an easy way to support it but I guess it can only be done via conversion.

