public Player(int[] data, int index, String name) {
		ID = data[index++];
		raceID = data[index++];
		typeID = data[index++];
		startLocationX = data[index++];
		startLocationY = data[index++];
		self = (data[index++] == 1);
		ally = (data[index++] == 1);
		enemy = (data[index++] == 1);
		neutral = (data[index++] == 1);
		observer = (data[index++] == 1);
		color = data[index++];
		this.name = name;
		// Initialise technology records
		int highestIDTechType = 0;
		for (TechType t : TechTypes.getAllTechTypes()) {
			highestIDTechType = Math.max(highestIDTechType, t.getID());
		}
		researching = new boolean[highestIDTechType + 1];
		researched = new boolean[highestIDTechType + 1];
		int highestIDUpgradeType = 0;
		for (UpgradeType ut : UpgradeTypes.getAllUpgradeTypes()) {
			highestIDUpgradeType = Math.max(highestIDUpgradeType, ut.getID());
		}
		upgrading = new boolean[highestIDUpgradeType + 1];
		upgradeLevel = new int[highestIDUpgradeType + 1];
	}