Add a lot of hacky saving/loading code for tribes