In my world there are 4 races. I want 2 of them to be at war with each other but only their armies (if possible I want no civilian casualties, this does not count nobles and people in a position of power).
This means :
There would still be trade between the 2 kingdoms.
Unrestricted travel of civilians and businesses (unless there is a reason for the kingdom to ban their entry, think why people get banned for travel in the real world and apply same here).
If any civilian is caught up in a fight on either side, secure them first before anything.
If a soldier does cause the death/injury of a civilian then normal murder/assault charges are applied and they are jailed in the opposing kingdom (A lesser sentence can be applied if it is believed to be accidental).
I have likely missed some points but what could keep 2 kingdoms civil with each other and at the same time at war with each other?
FYI - Both sides' tech levels are about the same, compared to ours they have yet to invent gunpowder. If a civilian engages in combat they are no longer considered a civilian but someone who is part of the army.