Open CptHaxray opened 3 years ago
Hey! Thanks for raising this.
Yeah this seems like quite an important feature for TTT2. I believe the damagelogs tracks player roles right at the start of the round, so it'll miss this. And it won't show an entry for these role changes.
Adding support for custom log events such as "PlayerA [Jackal] changed PlayerB's role from [role] to [Sidekick]" might be easy enough, depending on if TTT2 emits events for this. It might require more work to change how damagelogs tracks roles for the whole round.
Heyo sorry for late response.
I think there is events for it, but its inconsistent. They recently did an update to the end of game screen to be a scoreboard that lets you click on a user's name, and it'll show what their starting role was and what roles they transformed into during the game. Some roles tied in events to allow it to track role specific stuff, but others didn't.
I feel like if you're able to track their roles being swapped it would also be possible to track their team alignment as well.
I will need to do some digging to see what information TTT2 emits and re-familiarise myself with how the damage logs tracks a player's role, especially against individual damage lines.
My worry is that because damage logs are stored in a database, it might require some hefty changes to support roles changing mid-game.
Feel free to message me (on discord for example) if you have any questions about tracking events and rolechanges. This is our API for the event system: https://api-docs.ttt2.neoxult.de/module/events/none
This is probably what you want to use: https://api-docs.ttt2.neoxult.de/module/eventdata/none/shared/eventdata.GetPlayerRoles
Thanks a lot @TimGoll !
Found: Currently support for TTT2 is functional but lacking. Damage logs are unable to track if someone's role changed during the middle of a round, and it lacks a feature to show Team Alignment of a player alongside their role. Both of these additions would be a fantastic QOL improvement for TTT2 functionality.
Example of Team Alignment Issue: TTT2 Role Doppleganger changes their role away from Doppleganger to another role, but keeps the Doppleganger team Alignment. This is not possible to view with the current way the damage logs are set up.
Example of Role Swap issue: Jackal, one of the core add-on TTT2 custom roles, has the ability to transform another player into a Sidekick, changing them away from whatever their role originally was. Damagelogs is unable to track that someone's role was changed from their starting role, causing very confusing looking damage logs where it displays their role as Innocent or Traitor instead of the correct role.