Yekaterina Posted March 21, 2023 Report Share Posted March 21, 2023 Dear all, I've made a little Python program which extracts the chat history of players from the mainlog.html. This gives you a record of who said what during the game and in the lobby. Even if you were a player, you can see the spectator chat using this. All of the chat history, commands received and program outputs are contained within mainlog.html, but this file is very large and messy to read. This is why I made a program that is dedicated to extracting the chat part. The future improvements will be automatically matching the player ID to the names so that it's more intuitive to read; it would also be possible to see at exactly when each message was sent / received. To use the program, copy it to the same folder as your mainlog.html and run in console. An example output: The /allies marker means the chat was sent to the sender's allies. Similarly for /observers. Lobby chats and game setup chats will be recorded as well: Hope you like it! Heli 4 2 Quote Link to comment Share on other sites More sharing options...
Yekaterina Posted March 21, 2023 Author Report Share Posted March 21, 2023 Thanks to @Norse_Harold for the inspiration! 2 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted March 21, 2023 Report Share Posted March 21, 2023 It's nice to have these kinds of tools. 2 Quote Link to comment Share on other sites More sharing options...
Yekaterina Posted March 21, 2023 Author Report Share Posted March 21, 2023 This is something that I've always wanted since A24! xD thanks for making a dream come true! Btw pls share your source code 2 Quote Link to comment Share on other sites More sharing options...
alre Posted March 21, 2023 Report Share Posted March 21, 2023 remember that all lobby chat is available on discord. downloading it is also possible through external tools although not totally ok with the terms and conditions of discord. 1 1 Quote Link to comment Share on other sites More sharing options...
Yekaterina Posted March 21, 2023 Author Report Share Posted March 21, 2023 23 minutes ago, alre said: remember that all lobby chat is available on discord. downloading it is also possible through external tools although not totally ok with the terms and conditions of discord. I'm not a discord user. Are there other ways to access the lobby chat? Is it using some kind of open source chat client or is it scrambled to only compatible with 0AD clients? 3 hours ago, Yekaterina said: Btw pls share your source code Sorry I forgot to attach the source code, I will post an upgraded version tonight. Quote Link to comment Share on other sites More sharing options...
rossenburg Posted March 21, 2023 Report Share Posted March 21, 2023 12 hours ago, Helicity said: Dear all, I've made a little Python program which extracts the chat history of players from the mainlog.html. This gives you a record of who said what during the game and in the lobby. Even if you were a player, you can see the spectator chat using this. All of the chat history, commands received and program outputs are contained within mainlog.html, but this file is very large and messy to read. This is why I made a program that is dedicated to extracting the chat part. The future improvements will be automatically matching the player ID to the names so that it's more intuitive to read; it would also be possible to see at exactly when each message was sent / received. To use the program, copy it to the same folder as your mainlog.html and run in console. An example output: The /allies marker means the chat was sent to the sender's allies. Similarly for /observers. Lobby chats and game setup chats will be recorded as well: Hope you like it! Heli Another invention to read enemy chat? as far as its /allies either enemy or your ally it will be logged Quote Link to comment Share on other sites More sharing options...
Yekaterina Posted March 21, 2023 Author Report Share Posted March 21, 2023 2 hours ago, rossenburg said: Another invention to read enemy chat? I am not sure how to do that, but it would be cheating! Quote Link to comment Share on other sites More sharing options...
Stan` Posted March 21, 2023 Report Share Posted March 21, 2023 4 hours ago, alre said: remember that all lobby chat is available on discord. downloading it is also possible through external tools although not totally ok with the terms and conditions of discord. That's no longer the case. The bridge wasn't updated to A26 and eventually got shut donw. 1 Quote Link to comment Share on other sites More sharing options...
rossenburg Posted March 21, 2023 Report Share Posted March 21, 2023 13 minutes ago, Helicity said: I am not sure how to do that, but it would be cheating! i think it does on both sides. When enemy or your teammate uses /ally both the Net messages are logged so it's kind of literally reading enemy messages too. I'm not against the whole idea but telling you so incase you can make a patch around it before giving it out to everyone. Won't be fun to see enemies messages Quote Link to comment Share on other sites More sharing options...
alre Posted March 21, 2023 Report Share Posted March 21, 2023 1 hour ago, Stan` said: That's no longer the case. The bridge wasn't updated to A26 and eventually got shut donw. f$ck, how would someone dump ratings history now? Quote Link to comment Share on other sites More sharing options...
Yekaterina Posted March 21, 2023 Author Report Share Posted March 21, 2023 The source code @Yekaterina: mainlog_extractor.py 2 Quote Link to comment Share on other sites More sharing options...
Stan` Posted March 22, 2023 Report Share Posted March 22, 2023 13 hours ago, alre said: f$ck, how would someone dump ratings history now? Was it something that happened ? Quote Link to comment Share on other sites More sharing options...
leopard Posted March 22, 2023 Report Share Posted March 22, 2023 19 hours ago, alre said: remember that all lobby chat is available on discord. discord is not showing alpha 26 lobby chat Quote Link to comment Share on other sites More sharing options...
alre Posted March 22, 2023 Report Share Posted March 22, 2023 8 hours ago, Stan` said: Was it something that happened ? well you coulddo that. and you could use that data to retro-test modifications to the rating algorithm. I guess it's still possible with old data alone. Quote Link to comment Share on other sites More sharing options...
Norse_Harold Posted March 23, 2023 Report Share Posted March 23, 2023 (edited) On 20/03/2023 at 7:07 PM, Helicity said: I've made a little Python program which extracts the chat history of players from the mainlog.html. Thanks for releasing the source code for mainlog_extractor.py. What license do you choose for it? The FSF suggests using Apache License 2.0 for small programs. I hope that players will have integrity and not use this to cheat during gameplay. And, I hope that people will use this program for good purposes like reporting in-game verbal abuse by others. Edited March 23, 2023 by Norse_Harold Quote Link to comment Share on other sites More sharing options...
Norse_Harold Posted March 30, 2023 Report Share Posted March 30, 2023 (edited) Here's an independently developed chat extractor that by default displays only those chat messages that the logging player should be able to see. To use it, install python3, and copy 0adextract_chat.py to the logs directory within the 0ad user data directory. Start a Terminal or command prompt, change directory to the 0ad logs directory, and start the program with information about your lobby user name (and rating) by passing a command line argument. Here's a demonstration of how to start the program once you have changed directory to the 0ad logs directory. Replace "Helicity (1377)" with your lobby username and rating. If you have no rating then exclude the parentheses. python3 0adextract_chat.py --player-name "Helicity (1377)" After the match is finished, you can read all player chat with Helicity's mainlog_extractor.py script or by passing --show-all-chat to 0adextract_chat.py. Please don't use this to cheat. There are many good purposes for this software, including reporting player misconduct, making links copyable to clipboard without using autociv, remembering cool or funny moments from past games, and saving songs generated by ChatGPT and pasted by Larsvandijk. 0adextract_chat.py Edited March 30, 2023 by Norse_Harold 3 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 15, 2023 Report Share Posted April 15, 2023 @Helicity@Norse_HaroldI would suggest you to run pylint and pep8/flake8 vs 0adextract_chat.py. They are many programming and formatting issues in it which will be quickly highlighted by them. Please see PEP 257 about Docstring Conventions. Quote Link to comment Share on other sites More sharing options...
Yekaterina Posted April 16, 2023 Author Report Share Posted April 16, 2023 On 30/03/2023 at 5:24 AM, Norse_Harold said: 0adextract_chat.py 18 kB · 10 downloads So professional! And thanks for the advice @rm -rf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.