codecat / tm-better-chat

A better chat for Trackmania using Openplanet.
https://openplanet.dev/plugin/betterchat
22 stars 7 forks source link

Better Chat fails to load after latest Trackmania update #66

Closed ragraham91 closed 1 year ago

ragraham91 commented 1 year ago

Better Chat fails to load when starting Trackmania, with the below text left in the Openplanet.log file. This has been happening since the new season Trackmania update.

[ ScriptEngine] [22:48:39] [BetterChat] BetterChat.op/:/src/ChatMessageLoop.as (45, 1) : INFO : Compiling void ChatMessageLoop() [ ScriptEngine] [22:48:39] [BetterChat] BetterChat.op/:/src/ChatMessageLoop.as (50, 13) : ERR : 'ChatHistoryTimestamp' is not a member of 'CGameCtnNetwork' [ ScriptEngine] [22:48:39] [BetterChat] BetterChat.op/:/src/ChatMessageLoop.as (51, 21) : ERR : 'ChatHistoryTimestamp' is not a member of 'CGameCtnNetwork' [ ScriptEngine] [22:48:39] [BetterChat] BetterChat.op/:/src/ChatMessageLoop.as (57, 31) : ERR : 'ChatHistoryTimestamp' is not a member of 'CGameCtnNetwork' [ ScriptEngine] [22:48:39] [BetterChat] BetterChat.op/:/src/ChatMessageLoop.as (58, 32) : ERR : 'ChatHistoryLines' is not a member of 'CGameCtnNetwork' [ ScriptEngine] [22:48:39] [BetterChat] BetterChat.op/:/src/ChatMessageLoop.as (59, 23) : ERR : 'ChatHistoryTimestamp' is not a member of 'CGameCtnNetwork' [ ScriptEngine] [22:48:39] [BetterChat] BetterChat.op/:/src/ChatMessageLoop.as (72, 13) : WARN : 'time' is not initialized. [ ScriptEngine] [22:48:39] Script compilation failed!

recliq commented 1 year ago

I can confirm the problem on my install with the exact log messages. This plugin is such a nice addition it would be a shame if it dies like this. It's way more readable, custom position, ignoring of toxic chatters, etc... plz fix if possible!

codecat commented 1 year ago

I am waiting on Nadeo to make some API changes that will allow to make this work again. Unfortunately I don't have a time schedule for this, but I'll let y'all know how it goes. 👍

skybaks commented 1 year ago

I found cast<CGameManiaPlanet>(GetApp()).ManiaPlanetScriptAPI.ServerChatLog which appears to be a realtime JSON formatted version of the server's chatlog. image I have only tested in Nadeo room online servers but it appears to work with some amount of hackery.

The largest drawbacks to using this as the chat source would be that you will need to reparse the entire Json string every loop iteration, which seems sadly inefficient and may start to cause performance issues when playing on a server for a long period of time. Also, all the parsing code in ChatLineInfo would need to be reworked to accept a Json::Value instead of a string.

codecat commented 1 year ago

Yep, that's the reason why I haven't implemented that json solution yet - it's very inefficient and adds way too much overhead.

sullyj3 commented 1 year ago

What's the context here, has Nadeo actually made any indication they're going to make the necessary API changes?

codecat commented 1 year ago

Yes, I've been told they'll be doing this, but it likely will be next season.

LMelaia commented 1 year ago

It’s sucks nadeo’s so slow when the modding community is so fast.

On Mon, 07 Aug 2023 at 11:27 AM, Melissa @.***> wrote:

Yes, I've been told they'll be doing this, but it likely will be next season.

— Reply to this email directly, view it on GitHub https://github.com/codecat/tm-better-chat/issues/66#issuecomment-1667513298, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSAQF3SC6KCSY374Q3K2KTXUCYHDANCNFSM6AAAAAAZ65I2FU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

codecat commented 1 year ago

Today's game update will make Better Chat work again! I've been working on it today and will hopefully have an update ready soon.

recliq commented 1 year ago

This is great news! Thank you for the notice.

codecat commented 1 year ago

Unfortunately we have to wait for an update or 2 more for this to really work, as the new API turned out to be incomplete - it's looking promising though. I've pushed some preliminary changes in 700a38b36b79878a479ef707f87e314221fea6dc (won't compile on Openplanet 1.26.0 right now, so this will also require an Openplanet update).

sullyj3 commented 1 year ago

Bummer, thanks for the update and all your work though!

codecat commented 1 year ago

This will still require a game + Openplanet update, but I got it working again!

image

ragraham91 commented 1 year ago

Great work! Thank you very much.

codecat commented 1 year ago

I'm gonna keep this issue open until all the necessary updates are released ☺️

codecat commented 1 year ago

The game has been updated, and Better Chat 1.1.0 has been released!

recliq commented 1 year ago

Thank you! ❤️

ragraham91 commented 1 year ago

Fantastic work. Thank you, codecat.