Spielerando

Keep cooldowns and charges right when a player reconnects mid-fight

After a reconnect the abilities should be where they would be if the player had never left, not frozen, not reset. This entry shows what to store, so the time that passed away from the screen counts, and how stored charges come back without losing the leftover time.

Why this works

Time keeps running while a player is away. Storing when an ability becomes ready, instead of how long is left, means a reconnect can neither freeze nor reset the clock, and recharging charges are caught up without losing the progress made part of the way.

When not to use it

Skip it where abilities are meant to reset on joining, such as at the start of a round or after a respawn, and in tiny games with no cooldowns at all. If you want time to pause, for a cutscene say, make that an explicit rule.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 20 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Keep cooldowns and charges right when a player reconnects mid-fight" (read_entry ability-cooldowns-survive-a-reconnect) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP