https://slyflourish.com/running_hordes.html

Rules Summary

In the case of the hilltop the horde attacks once per round.

Assume Disadvantage for the horde and advantage for the characters.

Each character is attacked by the horde, and each character attacks the horde.

Assume the horde has a +5 to hit and attacks at disadvantage

Assume the characters have +2 AC for fortifications

Assume the horde does 1d8 on a hit

Assume the horde is automatically hit by single attacks

In the case of area of affect spells assume 1/4 resist. Roll damage and multiply by .75

Use this link to calculate round by round damage to party members

https://docs.google.com/spreadsheets/d/12kmBhlNRAelD897PskBzvDON_fBA2AnqtzPWhYnkKhk/edit

Calculate the HP of the wave.

The horde will attack in waves. A wave will last 10 rounds (1 minute)

At all times, the horde will attempt to attack the keep with ranged weapons. Use above link

While the wave advances, use above link

Once the wave reaches the walls, the characters must attack the wave, and do X% damage to the wave, if they do, consider the wave stalled. Roll on above link and move to the next round until the assault (wave) ends

If they fail to do X% damage to the wave in a round, individual combat commences.

During individual combat, the characters will only take damage from the individual attackers.

During individual combat, only the PCs, Xaobi, and their barbarian troops will fight.

I should make a series of encounters for these.

After 10 rounds, if the characters are still standing, the wave will retreat and reform for another assault.

There will be an 1/2 hour rest between each wave. Characters can gain back all Collateral damage they took during this time. Direct damage must be healed normally. For the purposes of this mass battle, the characters may spend half of their hit dice to heal during these rests.

at the end of the third assault, relief arrives. The wave will meet the arriving host at the base of the hill and be scattered.