Creating a different Initiative Extension for 5e/CoreRPG
I've been trying to create an initiative sorting system for 5e primarily, but I suppose it could be applied to other rpgs easily. It's intended to be an implementation from this video by Taking20 (skip to 6:02 for the actual system): https://youtu.be/SXleyDvtqls.
For those (understandably) disinclined to watch the video, the initiative is as follows: Roll the PCs and friendly NPCs as normal, roll only the highest Initiative value for the foes, then sort the two groups with the highest two placed on top, intersperse the groups together one-by-one (PC, NPC, and so on). There would be background randomization to the non-highest initiative foes and friendly NPCs. Any additional combatants added after initiative is rolled are added to the bottom of the initiative order, regardless of faction and without rolling their initiative.
---Example 1:
PC A: 16
PC B: 4
PC C: 13
FOE F: 16 (highest initiative)
FOE G: -
FOE H: -
FOE I: -
Result
1. PC A
2. FOE F
3. PC C
4. FOE G
5. PC B
6. FOE H
7. FOE I
---Example 2:
PC A: 15
PC B: 17
PC C: 19
FOE K: 21
FOE L: -
Result
1. FOE K
2. PC C
3. FOE L
4. PC B
5. PC A
After a few hours of diving into the CoreRPG files and the 5e ruleset, I'm stumped because I do not know where to begin. My initial thought is to override (if possible in lua) the CombatManager.setCustomSort() but in reality I seek to preserve the order it provides and merely add a step to it. The use of the "friendfoe" value would also simplify the sorting process.
Any suggestions, tutorials, or similar extensions?
Thanks, DannyDM