private void buttonConvertFile_Click(object sender, EventArgs e) { if (!File.Exists(workFilePath) || txtFileSelected.Text == null || txtFileSelected.Text == "") { return; } string outFile = "MapGenerator_" + Path.GetFileNameWithoutExtension(txtFileSelected.Text) + ".xml"; string outFilePath = System.IO.Path.Combine(path, outFile); // Load Fluffy Blueprint Fluffy_Blueprint blueprintIN = new Fluffy_Blueprint(); Scribe.InitLoading(workFilePath); Scribe.EnterNode("Blueprint"); blueprintIN.ExposeData(); Scribe.ExitNode(); Scribe.FinalizeLoading(); // Write data to MapGen Blueprint Misc_Blueprint blueprintOUT = new Misc_Blueprint(); Converter.FillMiscBlueprintFromFluffyBlueprint(blueprintIN, ref blueprintOUT); Scribe.InitWriting(outFilePath, "Defs"); Scribe.EnterNode("MapGenerator.MapGeneratorBaseBlueprintDef"); Scribe.WriteAttribute("Name", "TODO_enter_a_name_here"); blueprintOUT.ExposeData(); Scribe.FinalizeWriting(); txtFileCreated.Text = outFile; }