Dynamic factions

Attacking, ramming other ships has diplomatic consequences.
generally neutral npc react stronger than good friends or fierce enemies. 
Every change in relations has sideeffects on all other relations to the other factions. The more the like or dislike the attacked faction, the stronger the side effect (killing police will make the pirates like you)
Lastly I introduced personal (character-based) friendliness to other worldobject. Shooting at a lonely police ship might not make the entire police force hate you, but the ship's pilot will, and he will attack back. This personal friendliness declines over time back to the faction relation.
These lines double with some code you use in the character to determine the agressor. Please put it into one function/function class