private void SaveToolStripMenuItem_Click(object sender, EventArgs e) { try { SFUtil.Backup(DrbPath); Drb.Write(DrbPath); SystemSounds.Asterisk.Play(); } catch (Exception ex) { ShowError($"Failed to save DRB:\n{DrbPath}\n\n{ex}"); } }
public static void CombineDragonTpfs() { // Utility for creating Divine Dragon texbnd. Requires using Yabber to unpack these bnds, and repack after done. string gamePath = GameSpec.ForGame(GameSpec.FromGame.SDT).GameDir; string mainPath = $@"{gamePath}\chr\c5200-texbnd-dcx\chr\c5200\c5200.tpf"; SFUtil.Backup(mainPath); TPF dragon = TPF.Read(mainPath); foreach (string p in Directory.GetFiles($@"{gamePath}\map\m25\m25_0000-tpfbhd", "m25_Dragon*.tpf.dcx")) { TPF t = TPF.Read(p); dragon.Textures.AddRange(t.Textures); } dragon.Write(mainPath); }