public void saveQuest(File file, Quest q) throws IOException
	{
		TagCompound tag = new TagCompound();
		tag.setTag("name", new TagString("name", q.getName()));
		Stage fs = q.getFirstStage();
		TagCompound fstage = saveStage(fs);
		fstage.setName("firststage");
		fstage.setTag("id", new TagString("id", fs.getID()));
		tag.setTag("firststage", fstage);
		TagCompound stages = new TagCompound("stages");
		for(Stage s:q.getStages())stages.setTag(s.getID(), saveStage(s));
		tag.setTag("stages", stages);
		TagCompound objs = new TagCompound("objectives");
		for(Objective o:q.getObjectives())objs.setTag(o.getID(), saveObjective(o));
		tag.setTag("objectives", objs);
		TagList desc = new TagList("description", TagType.STRING);
		for(String s:q.getDescription())desc.add(new TagString("", s));
		tag.setTag("description", desc);
		tag.setTag("iconid", new TagInt("iconid", q.getItemIconId()));
		tag.setTag("firstassigned", new TagByte("firstassigned", (byte)(q.isFirstAssigned() ? 1 : 0)));
		tag.setTag("visible", new TagByte("visible", (byte)(q.isVisible() ? 1 : 0)));
		File f = new File(file, q.getID() + ".dat");
		DataOutputStream dos = new DataOutputStream(new FileOutputStream(f));
		tag.saveTag(dos);
		dos.flush();
		dos.close();
	}