Some init and weapon generation code