dndplayer / dnd-player

An online virtual DND playground to support online groups.
https://dnd-player.com
Other
1 stars 0 forks source link

Add a basic initiative tracker #6

Closed BodrickLight closed 5 years ago

chrisella commented 5 years ago

I'll aim to get this in for this coming Thursday, based around the ideas we discussed this lunch.

BodrickLight commented 5 years ago
chrisella commented 5 years ago

That final point (Order by init desc) is done, but the bit about + 0.1 * dex mod, what is that and is that important ? Do I need to add that in too ?

BodrickLight commented 5 years ago

Basically ties should be broken in favour of the character with the highest dexterity. Roll20 does this by adding 0.1 * each characters dex modifier to their roll (not that we have to do it that way if there's a better way!)

chrisella commented 5 years ago

Extra commit 5f29a80d964303edade86f090d32d0268c69d722

This is pretty much done, at-least well enough to use in the short/medium term.

chrisella commented 5 years ago

Change NPCs in the initiative data to reference a tokenId instead of npcId. Tokens in-turn reference an npc anyway so it's still possible to get image etc. This way we have the unique health for a token. When doing this short term just continuing to have the init tracker global is probably easiest, but to preserve token refs without causing errors the init tracker data should probably exist per map, food for thought.