pokemon-showdown icon indicating copy to clipboard operation
pokemon-showdown copied to clipboard

Question: Is it possible win elo points in private battles?

Open dracnelking opened this issue 2 years ago • 3 comments

Hi, I've created my own server following the steps of this project and I’d like to ask a question.

Would it be possible to make the winning users of a private match earn elo points and the losing users deduct elo points from the corresponding leaderboard?

For example: user 1 sends a request for a private battle "gen 8 Random Battle" to user 2, the combat proceeds and at the end of the combat, user 1 wins elo points in the ranking "gen 8 random battle" and user 2 loses elo points.

Is it possible to do this in private battles? If so, how could it be done? Thank you very much and greetings!!!

dracnelking avatar May 06 '22 17:05 dracnelking

Yes, you'd want to do one of two things. a) force challenge battles to have their rated property exist. b) Edit RoomBattle.onEnd (server/room-battle.ts, line 850) to not check for the rated property when updating ladders.

mia-pi-git avatar May 06 '22 17:05 mia-pi-git

Yes, you'd want to do one of two things. a) force challenge battles to have their rated property exist. b) Edit RoomBattle.onEnd (server/room-battle.ts, line 850) to not check for the rated property when updating ladders.

I've been looking at exactly that part of the code (/room-battle.ts, line 850`), but I don't know how to make the score in private battles.

dracnelking avatar May 06 '22 18:05 dracnelking

but I don't know how to make the score in private battles.

Just edit that line so it doesn't check room.rated (rated is falsy for challenge battles). The sim will handle the rest.

mia-pi-git avatar May 06 '22 18:05 mia-pi-git

No response.

monsanto avatar Jan 07 '23 04:01 monsanto