If a Samurai has to choose between his family and staying loyal to the people he serves, he will always choose the people he serves. A code of honor (Samurai code) was written in 1600. , and it gives them an obligation to be loyal to their master, to uphold moral principles and the ways of war, but to be ready to wield their weapons at any time.