Added code for team id replication in player character and state.