Muttley / foundryvtt-shadowdark

Shadowdark game system for Foundry VTT
MIT License
38 stars 20 forks source link

Feature: Support optional "clockwise" initiative #590

Closed chrpow closed 9 months ago

chrpow commented 10 months ago

Since RAW Shadowdark is played in a fixed turn order once the highest initiative has been rolled, it would help to be able to quickly drag characters in the initiative to rearrange them on the fly. The Pathfinder 2E Foundry system has this capability, so I will start looking there to see how it was implemented.

chrpow commented 10 months ago

I started work on this, got distracted, and ended up just implementing the "clockwise" initiative. Once I get it looking nice, I'll submit a pull request for a global option that switches the game between "clockwise" initiative and the traditional, "everyone rolls" initiative.

Muttley commented 10 months ago

How do you determine "clockwise" when there is no positional information to work with?

chrpow commented 10 months ago

Im basing it on the order of game.users.players. I guess "clockwise" is a misnomer, but the point is that the initiative sequence will always remain the same even across encounters, and all GM controlled tokens will go at the same time.

The first combatant to act will be decided by all players as well as the one NPC with the highest bonus rolling initiative against each other. After the first combatant is chosen, the rest will be in order of how they appear on the user management screen.