protected Faction makeReactionFaction(String prefix, String classID, String Name, String code, String baseTemplateFilename)
	{
		final String codedName=Name.toUpperCase().trim().replace(' ','_');
		final String factionID=prefix+codedName;
		Faction templateF=getFaction(this.makeFactionFilename(codedName.toLowerCase()));
		if(templateF==null)
			templateF=getFaction(baseTemplateFilename);
		if(templateF==null)
		{
			Log.errOut("Factions","Could not find base template '"+baseTemplateFilename+"'");
			return null;
		}
		StringBuffer buf = rebuildFactionProperties(templateF);
		factionSet.remove(templateF.factionID().toUpperCase().trim());
		String bufStr = buf.toString();
		bufStr = CMStrings.replaceAll(bufStr,"<CODE>",code);
		bufStr = CMStrings.replaceAll(bufStr,"<NAME>",Name);
		bufStr = CMStrings.replaceAll(bufStr,"<FACTIONID>",factionID);
		bufStr = CMStrings.replaceAll(bufStr,"<CLASSID>",classID);
		buf=new StringBuffer(bufStr);
		final Faction F=buildFactionFromXML(buf, factionID);
		F.setInternalFlags(F.getInternalFlags() | Faction.IFLAG_IGNOREAUTO);
		F.setInternalFlags(F.getInternalFlags() | Faction.IFLAG_NEVERSAVE);
		F.setInternalFlags(F.getInternalFlags() | Faction.IFLAG_CUSTOMTICK);
		return addFaction(F) ? F : null;
	}