Allow the user to prioritize characters with the same initiative
Maybe let the user add a priority number (Any number) when the system detects that the user changed the initiative field input to a number that is already in the Character list. That way the higher number (priority) will be sorted before the other character(s) with the same Initiative roll
Officially 5e's rules are:
If a tie occurs, the DM decides the order among tied DM-controlled creatures, and the players decide the order among their tied characters. The DM can decide the order if the tie is between a monster and a player character. Optionally, the DM can have the tied characters and monsters each roll a d20 to determine the order, highest roll going first.
Something similar could be implemented, by default it could just allow the user to manually set the order, or optionally something like a "resolve ties" button that just randomly does it.
Either way I think a secondary field should be added to a character like SubInitiative, or something. an int that by default is 0, but on ties determines the inter initiative order.
I feel like SubInitiative would be a term that players would not understand and could become confusing.
I would suggest the following:
-
Possibly a pop-up that asks to choose which character goes first, and we save that in a "subInitiative" field which we don't show, by adding +1 or something? It might really complicate the sorting though. Possibly assigning an
int idto each character and then having anint? hasPriorityOverCharacterIdthat when set, should be sorted ABOVE the character with that ID. You could get a bug where Character 1 has an itiative of 4 and CHaracter 2 with an initiative with 34 but Character 1 havinghasPriorityOverCharacterId = 2but I think that's acceptable?- It could be like 3 buttons: (Character 1) (Character 2) (Decide randomly)
-
Look into how other tools solve this issue?
Regarding the subinitiative thing again and saving the data, you could even try and save it as int? defaultInitiativeModifier and if set, display it when loading the data again when int initiative is not set? Possibly int iniative would need to be a int? because 0 is a valid initiative value as well..
but as I said, I wouldn't mind implementing this later on when we have some more code written and know what users would want :)
Okay, I don't think we need to show the user the term subinitiative, or we just call it something else. But the idea is that initiative has a modifier to order people within the same initiative.