insomniac-eeper / BTTDRichDiscordPresence

BepInEx mod to add Rich Discord Presence to the game Back to the Dawn.
MIT License
1 stars 0 forks source link

[REQUEST] Distinction between spectating a battle and taking part in a battle. #5

Open insomniac-eeper opened 1 month ago

insomniac-eeper commented 1 month ago

Is your feature request related to a problem? Please describe. Spectator battles are not being handle appropriately rather it appears in certain situations a spectator battle is treated as a battle that the protagonist is participating in.

Describe the solution you'd like Distinguish between spectator battles and protagonist involved battles for BattleRecord and output presence accordingly. For example when spectating: Spectating battle between and .

Describe alternatives you've considered None

Additional context None

insomniac-eeper commented 1 month ago

Note for further context, this happened when setting the protagonist to Bob and initiating a fight. BattleManage2 appears to have a check for protagonist which looks at the CharacterAttributes to determine if either of the two combatants are the protagonist. Otherwise an AI battle will play out and the rich presence will appear as if I am fighting against bob (even though in the scenario I was bob). The determination of who the opponent is in this case should be solely due to who was left or right since my assumption is that protag check failed.

Further investigation into setting the protagonist and where different areas of code check who is protagonist are needed...