ok i don't really have time to explain this in full right now, but there are 3 different tables tied to each other in DB that determine how faction interaction works.
Its rather complex, but there is an article in Wiki explaining that - which is where I originally learn how to do it. Look it up
