All orders have a priority of 0-4.
admit, hostile, etc.) are priority 0.
wait, are
priority 1.
move and fly are priority 2.
sail and study commands are priority 4.
Primarily, the order scheduler processes commands on a day-by-day basis. Priority only orders commands within a day, and only between different nobles.
Each day, the order scheduler will first executes all priority 1 orders scheduled for that day. Only when all priority 1 orders are processed, will priority 2 orders for that day be processed, then priority 3 orders, etc. In other words, the order scheduler will not start an order at a higher priority when an order may be started at a lower priority.
Orders at the same priority are resolved in location order. If two
units in a location are both waiting to start a move order, the
first unit in the location will go first.
The above description of order priorities may seem complicated, but the
intent is to let players ignore same-day synchronization issues in most
cases. Rather that needing wait to guarantee that give
happens before move, the lower priority of give makes this
happen naturally.
For example, consider three units stacked together, top, mid and bot:
top: move ec69
yew
mid: unstack
recruit
bot: recruit
These should be executed in the following order:
mid: unstack # unstack is prio-1 top: move ec69 # move is prio-2 mid: recruit # recruit is prio-3 [top and bot arrive at ec69] top: yew # yew is prio-3 bot: recruit # recruit is prio-3
The unstack happened first since it’s a priority 1 command. The
move went second. When top and bot finished moving, there were
only priority three commands left, so they ran in location order.
A zero time command is an order which
always takes zero time. This does not include an order which may
sometimes take zero time. For instance, unstack is always a zero
time order. However, recruit is not, even though recruit
may terminate immediately under some conditions.