Vocalization works, made some fixes to wav files for Symphony and SimpleSoundManager. Lots of hacks later a voice acting mod seems to be working well.

This commit is contained in:
2018-08-15 23:59:39 -07:00
parent 6262995834
commit b598934a17
49 changed files with 348 additions and 1286 deletions

View File

@ -36,7 +36,14 @@ namespace SimpleSoundManager.Framework
{
WavSound wav = new WavSound(soundName,pathToWav);
SimpleSoundManagerMod.ModMonitor.Log("Getting sound file:" + soundName);
this.sounds.Add(soundName,wav);
try
{
this.sounds.Add(soundName, wav);
}
catch(Exception err)
{
}
}
/// <summary>
@ -49,7 +56,14 @@ namespace SimpleSoundManager.Framework
{
WavSound wav = new WavSound(helper ,soundName,pathToWav);
SimpleSoundManagerMod.ModMonitor.Log("Getting sound file:" + soundName);
this.sounds.Add(soundName,wav);
try
{
this.sounds.Add(soundName, wav);
}
catch(Exception err)
{
//Sound already added so no need to worry?
}
}
/// <summary>
@ -62,7 +76,14 @@ namespace SimpleSoundManager.Framework
{
WavSound wav = new WavSound(helper,songName,pathToWav);
SimpleSoundManagerMod.ModMonitor.Log("Getting sound file:" + songName);
this.sounds.Add(songName,wav);
try
{
this.sounds.Add(songName, wav);
}
catch(Exception err)
{
}
}
/// <summary>

View File

@ -36,15 +36,19 @@ namespace SimpleSoundManager
public string soundName;
public bool loop;
/// <summary>
/// Get a raw disk path to the wav file.
/// </summary>
/// <param name="pathToWavFile"></param>
public WavSound(string name,string pathToWavFile)
public WavSound(string name,string pathToWavFile,bool Loop=false)
{
this.path = pathToWavFile;
LoadWavFromFileToStream();
this.soundName = name;
this.loop = Loop;
}
/// <summary>
@ -52,11 +56,12 @@ namespace SimpleSoundManager
/// </summary>
/// <param name="modHelper"></param>
/// <param name="pathInModDirectory"></param>
public WavSound(IModHelper modHelper,string name, string pathInModDirectory)
public WavSound(IModHelper modHelper,string name, string pathInModDirectory,bool Loop=false)
{
string path = Path.Combine(modHelper.DirectoryPath, pathInModDirectory);
this.path = path;
this.soundName = name;
this.loop = Loop;
}
/// <summary>
@ -64,7 +69,7 @@ namespace SimpleSoundManager
/// </summary>
/// <param name="modHelper">The mod helper for the mod you wish to use to load the music files from.</param>
/// <param name="pathPieces">The list of folders and files that make up a complete path.</param>
public WavSound(IModHelper modHelper,string soundName, List<string> pathPieces)
public WavSound(IModHelper modHelper,string soundName, List<string> pathPieces,bool Loop=false)
{
string s = modHelper.DirectoryPath;
foreach(var str in pathPieces)
@ -73,6 +78,7 @@ namespace SimpleSoundManager
}
this.path = s;
this.soundName = soundName;
this.loop = Loop;
}
/// <summary>
@ -113,7 +119,7 @@ namespace SimpleSoundManager
dynamicSound = new DynamicSoundEffectInstance(sampleRate, (AudioChannels)channels);
count = dynamicSound.GetSampleSizeInBytes(TimeSpan.FromMilliseconds(1000));
count = byteArray.Length;//dynamicSound.GetSampleSizeInBytes(TimeSpan.FromMilliseconds(1000));
dynamicSound.BufferNeeded += new EventHandler<EventArgs>(DynamicSound_BufferNeeded);
@ -127,13 +133,21 @@ namespace SimpleSoundManager
}
catch (Exception err)
{
SimpleSoundManagerMod.ModMonitor.Log(err.ToString());
//SimpleSoundManagerMod.ModMonitor.Log(err.ToString());
}
position += count;
if (position + count > byteArray.Length)
{
position = 0;
if (loop)
{
position = 0;
}
else
{
//this.stop();
}
}
}

View File

@ -74,6 +74,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdditionalCropsFramework",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedSaveBackup", "AdvancedSaveBackup\AdvancedSaveBackup.csproj", "{12984468-2B79-4B3B-B045-EE917301DEE0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocalization", "Vocalization\Vocalization\Vocalization.csproj", "{1651701C-DB36-43C7-B66D-2700171DD9A9}"
ProjectSection(ProjectDependencies) = postProject
{7B1E9A54-ED9E-47AA-BBAA-98A6E7CB527A} = {7B1E9A54-ED9E-47AA-BBAA-98A6E7CB527A}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -384,6 +389,18 @@ Global
{12984468-2B79-4B3B-B045-EE917301DEE0}.x86|Any CPU.Build.0 = x86|Any CPU
{12984468-2B79-4B3B-B045-EE917301DEE0}.x86|x86.ActiveCfg = x86|x86
{12984468-2B79-4B3B-B045-EE917301DEE0}.x86|x86.Build.0 = x86|x86
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Debug|x86.ActiveCfg = Debug|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Debug|x86.Build.0 = Debug|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Release|Any CPU.Build.0 = Release|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Release|x86.ActiveCfg = Release|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.Release|x86.Build.0 = Release|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.x86|Any CPU.ActiveCfg = Release|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.x86|Any CPU.Build.0 = Release|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.x86|x86.ActiveCfg = Release|Any CPU
{1651701C-DB36-43C7-B66D-2700171DD9A9}.x86|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -35,18 +35,21 @@ namespace StardewSymphonyRemastered.Framework
/// </summary>
byte[] byteArray;
bool loop;
/// <summary>
/// Constructor.
/// </summary>
/// <param name="directoryToMusicPack"></param>
public WavMusicPack(string directoryToMusicPack)
public WavMusicPack(string directoryToMusicPack, bool Loop = false)
{
this.directory = directoryToMusicPack;
this.setModDirectoryFromFullDirectory();
this.songsDirectory = Path.Combine(this.directory, "Songs");
this.songInformation = new SongSpecifics();
this.musicPackInformation = MusicPackMetaData.readFromJson(directoryToMusicPack);
this.loop = Loop;
/*
if (this.musicPackInformation == null)
{
@ -115,7 +118,7 @@ namespace StardewSymphonyRemastered.Framework
dynamicSound = new DynamicSoundEffectInstance(sampleRate, (AudioChannels)channels);
count = dynamicSound.GetSampleSizeInBytes(TimeSpan.FromMilliseconds(10000));
count = byteArray.Length;//dynamicSound.GetSampleSizeInBytes(TimeSpan.FromMilliseconds(10000));
dynamicSound.BufferNeeded += new EventHandler<EventArgs>(DynamicSound_BufferNeeded);
this.currentSong = new Song(p);
@ -141,7 +144,13 @@ namespace StardewSymphonyRemastered.Framework
position += count;
if (position + count > byteArray.Length)
{
position = 0;
if (loop)
{
position = 0;
}
else
{
}
}
}

View File

@ -62,7 +62,8 @@ namespace Vocalization.Framework
bool exists = dialogueCues.TryGetValue(dialogueString, out voiceFileName);
if (exists)
{
Vocalization.soundManager.swapSounds(voiceFileName);
Vocalization.soundManager.stopAllSounds();
Vocalization.soundManager.playSound(voiceFileName);
}
else
{
@ -97,6 +98,7 @@ namespace Vocalization.Framework
else if (name == "Shops")
{
stringsFileNames.Add("StringsFromCSFiles.xnb");
this.addDialogue("Welcome to Pierre's! Need some supplies?", "");
}
else if (name == "ExtraDialogue")
{
@ -169,7 +171,7 @@ namespace Vocalization.Framework
foreach(var sentence in goodValues)
{
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence);
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence,this);
foreach(var cleanSentence in clean)
{
this.dialogueCues.Add(cleanSentence, "");
@ -189,7 +191,7 @@ namespace Vocalization.Framework
foreach (var sentence in goodValues)
{
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence);
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence,this);
foreach (var cleanSentence in clean)
{
this.dialogueCues.Add(cleanSentence, "");
@ -207,7 +209,7 @@ namespace Vocalization.Framework
foreach (var sentence in goodValues)
{
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence);
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence,this);
foreach (var cleanSentence in clean)
{
this.dialogueCues.Add(cleanSentence, "");
@ -233,7 +235,7 @@ namespace Vocalization.Framework
foreach (var sentence in goodValues)
{
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence);
List<string> clean = Vocalization.sanitizeDialogueFromDictionaries(sentence,this);
foreach (var cleanSentence in clean)
{
try

View File

@ -1,118 +1,118 @@

using StardewValley;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Vocalization.Framework
{
public class ReplacementStrings
{
public string farmerName = "<Player's Name>";
public string bandName = "<Sam's Band Name>";
public string bookName = "<Elliott's Book Name>";
public string rivalName = "<Rival's Name>";
public string petName = "<Pet's Name>";
public string farmName = "<Farm Name>";
public string favoriteThing = "<Favorite Thing>";
public string kid1Name = "<Kid 1's Name>";
public string kid2Name = "<Kid 2's Name>";
public List<string> adjStrings;
public List<string> nounStrings;
public List<string> placeStrings;
public List<string> spouseNames;
public ReplacementStrings()
{
loadAdjStrings();
loadNounStrings();
loadPlaceStrings();
loadSpouseStrings();
}
public void loadAdjStrings()
{
//load in adj strings from StringsFromCS and add them to this list. Then in sanitizaion is where you make all of the possible combinations for input.
adjStrings = new List<string>();
Dictionary<string, string> extraStrings = Vocalization.ModHelper.Content.Load<Dictionary<string, string>>(Path.Combine("Strings", "StringsFromCSFiles.xnb"),StardewModdingAPI.ContentSource.GameContent);
for(int i = 679; i <= 698; i++)
{
string d = "Dialogue.cs.";
string combo = d + i.ToString();
string dialogue = "";
bool exists = extraStrings.TryGetValue(combo, out dialogue);
if (exists)
{
adjStrings.Add(dialogue);
}
}
}
public void loadNounStrings()
{
nounStrings = new List<string>();
Dictionary<string, string> extraStrings = Vocalization.ModHelper.Content.Load<Dictionary<string, string>>(Path.Combine("Strings", "StringsFromCSFiles.xnb"),StardewModdingAPI.ContentSource.GameContent);
for (int i = 699; i <= 721; i++)
{
string d = "Dialogue.cs.";
string combo = d + i.ToString();
string dialogue = "";
bool exists = extraStrings.TryGetValue(combo, out dialogue);
if (exists)
{
adjStrings.Add(dialogue);
}
}
}
public void loadPlaceStrings()
{
placeStrings = new List<string>();
Dictionary<string, string> extraStrings = Vocalization.ModHelper.Content.Load<Dictionary<string, string>>(Path.Combine("Strings", "StringsFromCSFiles.xnb"), StardewModdingAPI.ContentSource.GameContent);
for (int i = 735; i <= 759; i++)
{
string d = "Dialogue.cs.";
string combo = d + i.ToString();
string dialogue = "";
bool exists = extraStrings.TryGetValue(combo, out dialogue);
if (exists)
{
adjStrings.Add(dialogue);
}
}
}
/// <summary>
/// Load all associated spouse names.
/// </summary>
public void loadSpouseStrings()
{
spouseNames = new List<string>();
foreach(var loc in Game1.locations)
{
foreach(var character in loc.characters)
{
if (character.datable.Value)
{
spouseNames.Add(character.Name);
}
}
}
}
}
}

using StardewValley;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Vocalization.Framework
{
public class ReplacementStrings
{
public string farmerName = "<Player's Name>";
public string bandName = "<Sam's Band Name>";
public string bookName = "<Elliott's Book Name>";
public string rivalName = "<Rival's Name>";
public string petName = "<Pet's Name>";
public string farmName = "<Farm Name>";
public string favoriteThing = "<Favorite Thing>";
public string kid1Name = "<Kid 1's Name>";
public string kid2Name = "<Kid 2's Name>";
public List<string> adjStrings;
public List<string> nounStrings;
public List<string> placeStrings;
public List<string> spouseNames;
public ReplacementStrings()
{
loadAdjStrings();
loadNounStrings();
loadPlaceStrings();
loadSpouseStrings();
}
public void loadAdjStrings()
{
//load in adj strings from StringsFromCS and add them to this list. Then in sanitizaion is where you make all of the possible combinations for input.
adjStrings = new List<string>();
Dictionary<string, string> extraStrings = Vocalization.ModHelper.Content.Load<Dictionary<string, string>>(Path.Combine("Strings", "StringsFromCSFiles.xnb"),StardewModdingAPI.ContentSource.GameContent);
for(int i = 679; i <= 698; i++)
{
string d = "Dialogue.cs.";
string combo = d + i.ToString();
string dialogue = "";
bool exists = extraStrings.TryGetValue(combo, out dialogue);
if (exists)
{
adjStrings.Add(dialogue);
}
}
}
public void loadNounStrings()
{
nounStrings = new List<string>();
Dictionary<string, string> extraStrings = Vocalization.ModHelper.Content.Load<Dictionary<string, string>>(Path.Combine("Strings", "StringsFromCSFiles.xnb"),StardewModdingAPI.ContentSource.GameContent);
for (int i = 699; i <= 721; i++)
{
string d = "Dialogue.cs.";
string combo = d + i.ToString();
string dialogue = "";
bool exists = extraStrings.TryGetValue(combo, out dialogue);
if (exists)
{
adjStrings.Add(dialogue);
}
}
}
public void loadPlaceStrings()
{
placeStrings = new List<string>();
Dictionary<string, string> extraStrings = Vocalization.ModHelper.Content.Load<Dictionary<string, string>>(Path.Combine("Strings", "StringsFromCSFiles.xnb"), StardewModdingAPI.ContentSource.GameContent);
for (int i = 735; i <= 759; i++)
{
string d = "Dialogue.cs.";
string combo = d + i.ToString();
string dialogue = "";
bool exists = extraStrings.TryGetValue(combo, out dialogue);
if (exists)
{
adjStrings.Add(dialogue);
}
}
}
/// <summary>
/// Load all associated spouse names.
/// </summary>
public void loadSpouseStrings()
{
spouseNames = new List<string>();
foreach(var loc in Game1.locations)
{
foreach(var character in loc.characters)
{
if (character.datable.Value)
{
spouseNames.Add(character.Name);
}
}
}
}
}
}

View File

@ -1,32 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Vocalization
{
/// <summary>
/// The configuration file for the mod.
/// </summary>
public class ModConfig
{
/// <summary>
/// A list of all of the translations currently supported by this mod.
/// </summary>
public List<string> translations;
/// <summary>
/// The currently selected translation to use.
/// </summary>
public string currentTranslation;
public ModConfig()
{
translations = new List<string>();
translations.Add("English");
currentTranslation = "English";
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Vocalization
{
/// <summary>
/// The configuration file for the mod.
/// </summary>
public class ModConfig
{
/// <summary>
/// A list of all of the translations currently supported by this mod.
/// </summary>
public List<string> translations;
/// <summary>
/// The currently selected translation to use.
/// </summary>
public string currentTranslation;
public ModConfig()
{
translations = new List<string>();
translations.Add("English");
currentTranslation = "English";
}
}
}

View File

@ -1,36 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Vocalization")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Vocalization")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1651701c-db36-43c7-b66d-2700171dd9a9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Vocalization")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Vocalization")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1651701c-db36-43c7-b66d-2700171dd9a9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -204,10 +204,15 @@ namespace Vocalization
private void MenuEvents_MenuClosed(object sender, StardewModdingAPI.Events.EventArgsClickableMenuClosed e)
{
//Clean out my previous dialogue when I close any sort of menu.
if (String.IsNullOrEmpty(previousDialogue) || soundManager.sounds[previousDialogue]==null) return;
soundManager.stopSound(previousDialogue);
previousDialogue = "";
try
{
soundManager.stopAllSounds();
previousDialogue = "";
}
catch(Exception err)
{
previousDialogue = "";
}
}
/// <summary>
@ -251,7 +256,8 @@ namespace Vocalization
foreach (NPC v in Game1.currentLocation.characters)
{
string text = (string)GetInstanceField(typeof(NPC), v, "textAboveHead");
if (text == null) continue;
int timer = (int)GetInstanceField(typeof(NPC), v, "textAboveHeadTimer");
if (text == null || timer<=0) continue;
string currentDialogue = text;
if (previousDialogue != currentDialogue)
{
@ -365,6 +371,9 @@ namespace Vocalization
{
//Not variable messages. Aka messages that don't contain words the user can change such as farm name, farmer name etc.
voice.speak(currentDialogue);
ModMonitor.Log("SPEAK THE TELLE");
return;
}
else
{
@ -415,36 +424,49 @@ namespace Vocalization
{
var menu = (StardewValley.Menus.ShopMenu)Game1.activeClickableMenu;
string currentDialogue = menu.potraitPersonDialogue; //Check this string to the dict of voice cues
string shopDialogue = menu.potraitPersonDialogue; //Check this string to the dict of voice cues
shopDialogue = shopDialogue.Replace(Environment.NewLine, "");
NPC npc = menu.portraitPerson;
previousDialogue = currentDialogue; //Update my previously read dialogue so that I only read the new string once when it appears.
ModMonitor.Log(currentDialogue); //Print out my dialogue.
if (previousDialogue == shopDialogue) return;
previousDialogue = shopDialogue; //Update my previously read dialogue so that I only read the new string once when it appears.
ModMonitor.Log(shopDialogue); //Print out my dialogue.
//Add in support for Shops
CharacterVoiceCue voice=new CharacterVoiceCue("");
try
CharacterVoiceCue voice;
//character shops
bool f=DialogueCues.TryGetValue("Shops", out voice);
if (f == false)
{
//character shops
bool f=DialogueCues.TryGetValue(Path.Combine("Shops"), out voice);
if (f == false)
{
ModMonitor.Log("Can't find the dialogue for the shop: " + npc.Name);
}
}
catch(Exception err) {
shopDialogue = sanitizeDialogueInGame(shopDialogue); //If contains the stuff in the else statement, change things up.
//I have no clue why the parsing adds in an extra character sometimes but I guess I have to do this in some cases....
if (!voice.dialogueCues.ContainsKey(shopDialogue))
{
shopDialogue = shopDialogue.Substring(0, shopDialogue.Length - 1);
}
currentDialogue = sanitizeDialogueInGame(currentDialogue); //If contains the stuff in the else statement, change things up.
if (voice.dialogueCues.ContainsKey(currentDialogue))
if (voice.dialogueCues.ContainsKey(shopDialogue))
{
//Not variable messages. Aka messages that don't contain words the user can change such as farm name, farmer name etc.
voice.speak(currentDialogue);
voice.speak(shopDialogue);
}
else
{
ModMonitor.Log("New unregistered dialogue detected saying: " + currentDialogue, LogLevel.Alert);
foreach(var v in voice.dialogueCues)
{
ModMonitor.Log(v.Key + " " + v.Value);
}
ModMonitor.Log("New unregistered dialogue detected saying: " + shopDialogue, LogLevel.Alert);
ModMonitor.Log("Make sure to add this to their respective VoiceCue.json file if you wish for this dialogue to have voice acting associated with it!", LogLevel.Alert);
}
@ -663,7 +685,7 @@ namespace Vocalization
}
catch (Exception err)
{
ModMonitor.Log("WHY NO ADD IN???"+err.ToString());
}
///??? DO I ACTUALLY NEVER ADD IT IN???
}
@ -711,7 +733,7 @@ namespace Vocalization
string cookingDialogue = splitDialogues.ElementAt(1);
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(cookingDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(cookingDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -733,7 +755,7 @@ namespace Vocalization
if (key != "intro") continue;
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -754,7 +776,7 @@ namespace Vocalization
string rawDialogue = pair.Value;
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -785,7 +807,7 @@ namespace Vocalization
if (!key.Contains("TV")) continue;
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
@ -828,13 +850,14 @@ namespace Vocalization
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
}
}
continue;
}
//For moddablity add a generic scrape here!
@ -865,7 +888,7 @@ namespace Vocalization
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -899,7 +922,7 @@ namespace Vocalization
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -934,7 +957,7 @@ namespace Vocalization
//If the key contains the character's name.
if (!key.Contains("Event")) continue;
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -951,7 +974,7 @@ namespace Vocalization
string rawDialogue = pair.Value;
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1013,7 +1036,7 @@ namespace Vocalization
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1049,7 +1072,7 @@ namespace Vocalization
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1079,7 +1102,7 @@ namespace Vocalization
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1113,9 +1136,13 @@ namespace Vocalization
string rawDialogue = pair.Value;
//If the key contains the character's name.
string cleanDialogue = "";
cleanDialogue = sanitizeDialogueFromMailDictionary(rawDialogue);
cue.addDialogue(cleanDialogue, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty
List<string> cleanDialogue = new List<string>();
cleanDialogue = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var v in cleanDialogue)
{
cue.addDialogue(v, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty
}
}
}
}
@ -1158,7 +1185,7 @@ namespace Vocalization
List<string> cleanDialogues = new List<string>();
foreach (var dia in strippedFreshQuestDialogue)
{
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1231,7 +1258,7 @@ namespace Vocalization
List<string> cleanDialogues = new List<string>();
foreach (var dia in strippedFreshQuestDialogue)
{
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1301,7 +1328,7 @@ namespace Vocalization
if (key.Contains(cue.name))
{
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1337,7 +1364,7 @@ namespace Vocalization
if (key.Contains(cue.name))
{
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1362,7 +1389,7 @@ namespace Vocalization
if (key.Contains(cue.name))
{
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1374,7 +1401,7 @@ namespace Vocalization
{
string rawDialogue = pair.Value;
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1408,7 +1435,7 @@ namespace Vocalization
if (key.Contains(cue.name))
{
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1443,7 +1470,7 @@ namespace Vocalization
if (key.Contains("NPC"))
{
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1471,7 +1498,7 @@ namespace Vocalization
string rawDialogue = pair.Value;
//If the key contains the character's name.
List<string> cleanDialogues = new List<string>();
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue);
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue,cue);
foreach (var str in cleanDialogues)
{
cue.addDialogue(str, ""); //Make a new dialogue line based off of the text, but have the .wav value as empty.
@ -1556,7 +1583,7 @@ namespace Vocalization
/// </summary>
/// <param name="dialogue"></param>
/// <returns></returns>
public static List<string> sanitizeDialogueFromDictionaries(string dialogue)
public static List<string> sanitizeDialogueFromDictionaries(string dialogue,CharacterVoiceCue cue)
{
List<string> possibleDialogues = new List<string>();
@ -1661,7 +1688,7 @@ namespace Vocalization
foreach(var dia in orSplit)
{
if (dia.Contains("\"")) //If I can split my string do so and add all the split strings into my orSplit list.
if (dia.Contains("\"") && cue.name.StartsWith("Temp")) //If I can split my string do so and add all the split strings into my orSplit list.
{
List<string> tempSplits = dia.Split('\"').ToList();
foreach (var v in tempSplits)

View File

@ -33,11 +33,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Netcode">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Netcode.dll</HintPath>
<HintPath>..\..\..\..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Netcode.dll</HintPath>
</Reference>
<Reference Include="SimpleSoundManager, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\GeneralMods\SimpleSoundManager\bin\Release\SimpleSoundManager.dll</HintPath>
<Reference Include="SimpleSoundManager">
<HintPath>..\..\SimpleSoundManager\bin\Release\SimpleSoundManager.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Pathoschild.Stardew.ModBuildConfig" version="2.0.2" targetFramework="net461" />
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Pathoschild.Stardew.ModBuildConfig" version="2.0.2" targetFramework="net461" />
</packages>

View File

@ -1,36 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleSoundManager.Framework
{
/// <summary>
/// Interface used for common sound functionality;
/// </summary>
public interface Sound
{
/// <summary>
/// Handles playing a sound.
/// </summary>
void play();
/// <summary>
/// Handles pausing a song.
/// </summary>
void pause();
/// <summary>
/// Handles stopping a song.
/// </summary>
void stop();
/// <summary>
/// Handles restarting a song.
/// </summary>
void restart();
/// <summary>
/// Handles getting a clone of the song.
/// </summary>
/// <returns></returns>
Sound clone();
}
}

View File

@ -1,216 +0,0 @@
using Microsoft.Xna.Framework.Audio;
using StardewModdingAPI;
using StardewValley;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleSoundManager.Framework
{
/// <summary>
/// TODO:
/// Pause sounds.
/// </summary>
public class SoundManager
{
public Dictionary<string,Sound> sounds;
public Dictionary<string, XACTMusicPair> musicBanks;
public KeyValuePair<string,Sound> previousSound;
/// <summary>
/// Constructor for this class.
/// </summary>
public SoundManager()
{
this.sounds = new Dictionary<string, Sound>();
this.musicBanks = new Dictionary<string, XACTMusicPair>();
this.previousSound = new KeyValuePair<string, Sound>("", null);
}
/// <summary>
/// Constructor for wav files.
/// </summary>
/// <param name="soundName"></param>
/// <param name="pathToWav"></param>
public void loadWavFile(string soundName,string pathToWav)
{
WavSound wav = new WavSound(pathToWav);
this.sounds.Add(soundName,wav);
}
/// <summary>
/// Constructor for wav files.
/// </summary>
/// <param name="helper"></param>
/// <param name="soundName"></param>
/// <param name="pathToWav"></param>
public void loadWavFile(IModHelper helper,string soundName,string pathToWav)
{
WavSound wav = new WavSound(helper ,pathToWav);
this.sounds.Add(soundName,wav);
}
/// <summary>
/// Constructor for wav files.
/// </summary>
/// <param name="helper"></param>
/// <param name="songName"></param>
/// <param name="pathToWav"></param>
public void loadWavFile(IModHelper helper,string songName,List<string> pathToWav)
{
WavSound wav = new WavSound(helper,pathToWav);
this.sounds.Add(songName,wav);
}
/// <summary>
/// Constructor for XACT files.
/// </summary>
/// <param name="waveBank"></param>
/// <param name="soundBank"></param>
/// <param name="songName"></param>
public void loadXACTFile(WaveBank waveBank, ISoundBank soundBank, string songName)
{
XACTSound xactSound = new XACTSound(waveBank, soundBank, songName);
this.sounds.Add(songName, xactSound);
}
/// <summary>
/// Constructor for XACT files based on already added music packs.
/// </summary>
/// <param name="pairName"></param>
/// <param name="songName"></param>
public void loadXACTFile(string pairName, string songName)
{
XACTMusicPair musicPair = getMusicPack(pairName);
if (pairName == null)
{
return;
}
loadXACTFile(musicPair.waveBank, musicPair.soundBank, songName);
}
/// <summary>
/// Creates a music pack pair that holds .xwb and .xsb music files.
/// </summary>
/// <param name="helper">The mod's helper that will handle the path of the files.</param>
/// <param name="pairName">The name of this music pack pair.</param>
/// <param name="wavName">The relative path to the .xwb file</param>
/// <param name="soundName">The relative path to the .xsb file</param>
public void loadXACTMusicBank(IModHelper helper,string pairName,string wavName, string soundName)
{
this.musicBanks.Add(pairName,new XACTMusicPair(helper, wavName, soundName));
}
/// <summary>
/// Gets the music pack pair from the sound pool.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public XACTMusicPair getMusicPack(string name)
{
foreach(var pack in this.musicBanks)
{
if (name == pack.Key) return pack.Value;
}
return null;
}
/// <summary>
/// Gets a clone of the loaded sound.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public Sound getSoundClone(string name)
{
foreach(var sound in this.sounds)
{
if (sound.Key == name) return sound.Value.clone();
}
return null;
}
/// <summary>
/// Returns the sound with the associated name.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public Sound getSound(string name)
{
Sound s;
bool exists=this.sounds.TryGetValue(name,out s);
if (exists)
{
return s;
}
else
{
return null;
}
}
/// <summary>
/// Plays the sound with the associated name.
/// </summary>
/// <param name="name"></param>
public void playSound(string name)
{
Sound s;
bool exists = this.sounds.TryGetValue(name, out s);
if (exists)
{
s.play();
previousSound = new KeyValuePair<string, Sound>(name, s);
}
}
/// <summary>
/// Stops the sound with the associated name.
/// </summary>
/// <param name="name"></param>
public void stopSound(string name)
{
Sound s;
bool exists = this.sounds.TryGetValue(name, out s);
if (exists)
{
s.stop();
}
}
/// <summary>
/// Stops the previously playing sound.
/// </summary>
public void stopPreviousSound()
{
if (previousSound.Key != "")
{
previousSound.Value.stop();
previousSound = new KeyValuePair<string, Sound>("", null);
}
}
/// <summary>
/// Stops the previously playing sound and plays a new sound.
/// </summary>
/// <param name="name"></param>
public void swapSounds(string name)
{
if (previousSound.Key == "")
{
playSound(name);
}
else
{
stopSound(previousSound.Key);
playSound(name);
}
}
}
}

View File

@ -1,237 +0,0 @@
using Microsoft.Xna.Framework.Audio;
using SimpleSoundManager.Framework;
using StardewModdingAPI;
using StardewValley;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleSoundManager.Framework
{
public class WavSound : Sound
{
/// <summary>
/// Used to actually play the song.
/// </summary>
DynamicSoundEffectInstance dynamicSound;
/// <summary>
/// Used to keep track of where in the song we are.
/// </summary>
int position;
/// <summary>
/// ???
/// </summary>
int count;
/// <summary>
/// Used to store the info for the song.
/// </summary>
byte[] byteArray;
public List<string> sounds;
public string path;
/// <summary>
/// Get a raw disk path to the wav file.
/// </summary>
/// <param name="pathToWavFile"></param>
public WavSound(string pathToWavFile)
{
this.path = pathToWavFile;
LoadWavFromFileToStream();
}
/// <summary>
/// A constructor that takes a mod helper and a relative path to a wav file.
/// </summary>
/// <param name="modHelper"></param>
/// <param name="pathInModDirectory"></param>
public WavSound(IModHelper modHelper, string pathInModDirectory)
{
string path = Path.Combine(modHelper.DirectoryPath, pathInModDirectory);
this.path = path;
}
/// <summary>
/// Constructor that is more flexible than typing an absolute path.
/// </summary>
/// <param name="modHelper">The mod helper for the mod you wish to use to load the music files from.</param>
/// <param name="pathPieces">The list of folders and files that make up a complete path.</param>
public WavSound(IModHelper modHelper, List<string> pathPieces)
{
string s = modHelper.DirectoryPath;
foreach(var str in pathPieces)
{
s = Path.Combine(s, str);
}
this.path = s;
}
/// <summary>
/// Loads the .wav file from disk and plays it.
/// </summary>
public void LoadWavFromFileToStream()
{
// Create a new SpriteBatch, which can be used to draw textures.
string file = this.path;
System.IO.Stream waveFileStream = File.OpenRead(file); //TitleContainer.OpenStream(file);
BinaryReader reader = new BinaryReader(waveFileStream);
int chunkID = reader.ReadInt32();
int fileSize = reader.ReadInt32();
int riffType = reader.ReadInt32();
int fmtID = reader.ReadInt32();
int fmtSize = reader.ReadInt32();
int fmtCode = reader.ReadInt16();
int channels = reader.ReadInt16();
int sampleRate = reader.ReadInt32();
int fmtAvgBPS = reader.ReadInt32();
int fmtBlockAlign = reader.ReadInt16();
int bitDepth = reader.ReadInt16();
if (fmtSize == 18)
{
// Read any extra values
int fmtExtraSize = reader.ReadInt16();
reader.ReadBytes(fmtExtraSize);
}
int dataID = reader.ReadInt32();
int dataSize = reader.ReadInt32();
byteArray = reader.ReadBytes(dataSize);
dynamicSound = new DynamicSoundEffectInstance(sampleRate, (AudioChannels)channels);
count = dynamicSound.GetSampleSizeInBytes(TimeSpan.FromMilliseconds(10000));
}
void DynamicSound_BufferNeeded(object sender, EventArgs e)
{
try
{
dynamicSound.SubmitBuffer(byteArray, position, count);
}
catch (Exception err)
{
}
position += count;
if (position + count > byteArray.Length)
{
position = 0;
}
}
/// <summary>
/// Used to pause the current song.
/// </summary>
public void pause()
{
if (dynamicSound != null) dynamicSound.Pause();
}
/// <summary>
/// Used to play a song.
/// </summary>
/// <param name="name"></param>
public void play()
{
if (this.isPlaying() == true) return;
dynamicSound.BufferNeeded += new EventHandler<EventArgs>(DynamicSound_BufferNeeded);
dynamicSound.Play();
}
/// <summary>
/// Used to resume the currently playing song.
/// </summary>
public void resume()
{
if (dynamicSound == null) return;
dynamicSound.Resume();
}
/// <summary>
/// Used to stop the currently playing song.
/// </summary>
public void stop()
{
if (dynamicSound != null)
{
dynamicSound.Stop(true);
dynamicSound.BufferNeeded -= new EventHandler<EventArgs>(DynamicSound_BufferNeeded);
position = 0;
count = 0;
byteArray = new byte[0];
}
}
/// <summary>
/// Used to change from one playing song to another;
/// </summary>
/// <param name="songName"></param>
public void swap(string pathToNewWavFile)
{
this.stop();
this.path = pathToNewWavFile;
this.play();
}
/// <summary>
/// Checks if the song is currently playing.
/// </summary>
/// <returns></returns>
public bool isPlaying()
{
if (this.dynamicSound == null) return false;
if (this.dynamicSound.State == SoundState.Playing) return true;
else return false;
}
/// <summary>
/// Checks if the song is currently paused.
/// </summary>
/// <returns></returns>
public bool isPaused()
{
if (this.dynamicSound == null) return false;
if (this.dynamicSound.State == SoundState.Paused) return true;
else return false;
}
/// <summary>
/// Checks if the song is currently stopped.
/// </summary>
/// <returns></returns>
public bool isStopped()
{
if (this.dynamicSound == null) return false;
if (this.dynamicSound.State == SoundState.Stopped) return true;
else return false;
}
public Sound clone()
{
return new WavSound(this.path);
}
public void restart()
{
this.stop();
this.play();
}
}
}

View File

@ -1,134 +0,0 @@
using Microsoft.Xna.Framework.Audio;
using StardewModdingAPI;
using StardewValley;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleSoundManager.Framework
{
public class XACTSound : Sound
{
public WaveBank waveBank;
public ISoundBank soundBank;
public string soundName;
WaveBank vanillaWaveBank;
ISoundBank vanillaSoundBank;
Cue song;
/// <summary>
/// Make a new Sound Manager to play and manage sounds in a modded wave bank.
/// </summary>
/// <param name="newWaveBank">The reference to the wave bank in the mod's asset folder.</param>
/// <param name="newSoundBank">The reference to the sound bank in the mod's asset folder.</param>
public XACTSound(WaveBank newWaveBank, ISoundBank newSoundBank,string soundName)
{
this.waveBank = newWaveBank;
this.soundBank = newSoundBank;
vanillaSoundBank = Game1.soundBank;
vanillaWaveBank = Game1.waveBank;
this.soundName = soundName;
song = this.soundBank.GetCue(this.soundName);
}
/// <summary>
/// Play a sound from the mod's wave bank.
/// </summary>
/// <param name="soundName">The name of the sound in the mod's wave bank. This will fail if the sound doesn't exists. This is also case sensitive.</param>
public void play(string soundName)
{
Game1.waveBank = this.waveBank;
Game1.soundBank = this.soundBank;
if (this.song == null) return;
this.song.Play();
Game1.waveBank = this.vanillaWaveBank;
Game1.soundBank = this.vanillaSoundBank;
}
/// <summary>
/// Pauses the first instance of this sound.
/// </summary>
/// <param name="soundName"></param>
public void pause(string soundName)
{
if (this.song == null) return;
this.song.Pause();
}
/// <summary>
/// Resume the first instance of the sound that has this name.
/// </summary>
public void resume(string soundName)
{
if (this.song == null) return;
this.song.Resume();
}
/// <summary>
/// Stop the first instance of the sound that has this name.
/// </summary>
/// <param name="soundName"></param>
public void stop(string soundName)
{
if (this.song == null) return;
this.song.Stop(AudioStopOptions.Immediate);
}
/// <summary>
/// Resumes a paused song.
/// </summary>
public void resume()
{
this.resume(soundName);
}
/// <summary>
/// Plays this song.
/// </summary>
public void play()
{
this.play(this.soundName);
}
/// <summary>
/// Pauses this song.
/// </summary>
public void pause()
{
this.pause(this.soundName);
}
/// <summary>
/// Stops this somg.
/// </summary>
public void stop()
{
this.stop(this.soundName);
}
/// <summary>
/// Restarts this song.
/// </summary>
public void restart()
{
this.stop();
this.play();
}
/// <summary>
/// Gets a clone of this song.
/// </summary>
/// <returns></returns>
public Sound clone()
{
return new XACTSound(this.waveBank, this.soundBank, this.soundName);
}
}
}

View File

@ -1,34 +0,0 @@
using Microsoft.Xna.Framework.Audio;
using StardewModdingAPI;
using StardewValley;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SimpleSoundManager.Framework
{
public class XACTMusicPair
{
public WaveBank waveBank;
public ISoundBank soundBank;
/// <summary>
/// Create a xwb and xsb music pack pair.
/// </summary>
/// <param name="helper">The mod helper from the mod that will handle loading in the file.</param>
/// <param name="wavBankPath">A relative path to the .xwb file in the mod helper's mod directory.</param>
/// <param name="soundBankPath">A relative path to the .xsb file in the mod helper's mod directory.</param>
public XACTMusicPair(IModHelper helper,string wavBankPath, string soundBankPath)
{
wavBankPath = Path.Combine(helper.DirectoryPath, wavBankPath);
soundBankPath = Path.Combine(helper.DirectoryPath, soundBankPath);
waveBank = new WaveBank(Game1.audioEngine, wavBankPath);
soundBank = new SoundBankWrapper(new SoundBank(Game1.audioEngine, soundBankPath));
}
}
}

View File

@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SimpleSoundManager")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SimpleSoundManager")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7b1e9a54-ed9e-47aa-bbaa-98a6e7cb527a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,24 +0,0 @@
**SimpleSoundManager** is a [Stardew Valley](http://stardewvalley.net/) mod which lets SMAPI mods
use custom wave/sound banks for their mods. This allows for things such as playing music/sounds at
a time of day, when an object is interacted with, etc.
Compatible with Stardew Valley 1.2+ on Linux, Mac, and Windows.
## Installation
1. [Install the latest version of SMAPI](https://github.com/Pathoschild/SMAPI/releases).
2. Install [this mod from Nexus mods](https://www.nexusmods.com/stardewvalley/mods/1410).
3. Run the game using SMAPI.
## Usage
1. Download this mod and reference it when making your mod.
2. Create new wave/sound banks using XACT.
3. Create a new SoundManager in your mod.
4. Play sounds to your heart's content.
## Versions
1.0:
* Initial release.
1.0.1:
* Enabled update checks in SMAPI 2.0+.
* Fixed compatibility with SMAPI 2.0.

View File

@ -1,100 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7B1E9A54-ED9E-47AA-BBAA-98A6E7CB527A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SimpleSoundManager</RootNamespace>
<AssemblyName>SimpleSoundManager</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x86|AnyCPU'">
<OutputPath>bin\x86\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x86|x86'">
<OutputPath>bin\x86\x86\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Framework\Sound.cs" />
<Compile Include="Framework\SoundManager.cs" />
<Compile Include="Framework\WavSound.cs" />
<Compile Include="Framework\XactMusicPair.cs" />
<Compile Include="Framework\XACTSound.cs" />
<Compile Include="SimpleSoundManagerMod.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="manifest.json" />
<None Include="packages.config" />
<None Include="README.md" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\Pathoschild.Stardew.ModBuildConfig.2.1.0-beta-20180428\analyzers\dotnet\cs\StardewModdingAPI.ModBuildConfig.Analyzer.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\deploy.targets" />
<Import Project="..\packages\Pathoschild.Stardew.ModBuildConfig.2.1.0-beta-20180428\build\Pathoschild.Stardew.ModBuildConfig.targets" Condition="Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.2.1.0-beta-20180428\build\Pathoschild.Stardew.ModBuildConfig.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.2.1.0-beta-20180428\build\Pathoschild.Stardew.ModBuildConfig.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Pathoschild.Stardew.ModBuildConfig.2.1.0-beta-20180428\build\Pathoschild.Stardew.ModBuildConfig.targets'))" />
</Target>
</Project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -1,14 +0,0 @@
using StardewModdingAPI;
namespace SimpleSoundManager
{
public class SimpleSoundManagerMod : Mod
{
internal static IModHelper ModHelper;
public override void Entry(IModHelper helper)
{
ModHelper = helper;
}
}
}

View File

@ -1,10 +0,0 @@
{
"Name": "Simple Sound Manager",
"Author": "Alpha_Omegasis",
"Version": "2.0.0",
"Description": "A simple framework to play sounds from wave banks.",
"UniqueID": "Omegasis.SimpleSoundManager",
"EntryDll": "SimpleSoundManager.dll",
"MinimumApiVersion": "2.0",
"UpdateKeys": [ "Nexus:1410" ]
}

View File

@ -1 +0,0 @@
1ef37e74c2d3c9be63fcc5fc24c5b0b4a4b35324

View File

@ -1,5 +0,0 @@
C:\Users\iD Student\Desktop\Stardew\Stardew_Valley_Mods-Development\GeneralMods\SimpleSoundManager\obj\Debug\SimpleSoundManager.csproj.CoreCompileInputs.cache
C:\Users\iD Student\Desktop\Stardew\Stardew_Valley_Mods-Development\GeneralMods\SimpleSoundManager\bin\Debug\SimpleSoundManager.dll
C:\Users\iD Student\Desktop\Stardew\Stardew_Valley_Mods-Development\GeneralMods\SimpleSoundManager\bin\Debug\SimpleSoundManager.pdb
C:\Users\iD Student\Desktop\Stardew\Stardew_Valley_Mods-Development\GeneralMods\SimpleSoundManager\obj\Debug\SimpleSoundManager.dll
C:\Users\iD Student\Desktop\Stardew\Stardew_Valley_Mods-Development\GeneralMods\SimpleSoundManager\obj\Debug\SimpleSoundManager.pdb

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Pathoschild.Stardew.ModBuildConfig" version="2.1.0-beta-20180428" targetFramework="net45" />
</packages>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -1 +0,0 @@
3b7bd19887cca12ff75f6ac1abe1ec154bb35718

View File

@ -1,19 +0,0 @@
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\bin\Debug\Vocalization.dll
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\bin\Debug\Vocalization.pdb
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\obj\Debug\Vocalization.csproj.CoreCompileInputs.cache
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\obj\Debug\Vocalization.dll
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\obj\Debug\Vocalization.pdb
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\bin\Debug\Netcode.dll
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\bin\Debug\Netcode.pdb
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\obj\Debug\Vocalization.csproj.CopyComplete
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\bin\Debug\SimpleSoundManager.dll
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\bin\Debug\SimpleSoundManager.pdb
C:\Users\iD Student\Desktop\Stardew\Vocalization\Vocalization\obj\Debug\Vocalization.csprojResolveAssemblyReference.cache
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\bin\Debug\Vocalization.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\bin\Debug\Vocalization.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\obj\Debug\Vocalization.csproj.CoreCompileInputs.cache
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\obj\Debug\Vocalization.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\obj\Debug\Vocalization.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\bin\Debug\SimpleSoundManager.dll
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\bin\Debug\SimpleSoundManager.pdb
C:\Users\owner\Documents\Visual Studio 2015\Projects\github\StardewValleyMods\Vocalization\Vocalization\obj\Debug\Vocalization.csprojResolveAssemblyReference.cache

View File

@ -1,144 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--*********************************************
** Import build tasks
**********************************************-->
<UsingTask TaskName="DeployModTask" AssemblyFile="StardewModdingAPI.ModBuildConfig.dll" />
<!--*********************************************
** Find the basic mod metadata
**********************************************-->
<!-- import developer's custom settings (if any) -->
<Import Condition="$(OS) != 'Windows_NT' AND Exists('$(HOME)\stardewvalley.targets')" Project="$(HOME)\stardewvalley.targets" />
<Import Condition="$(OS) == 'Windows_NT' AND Exists('$(USERPROFILE)\stardewvalley.targets')" Project="$(USERPROFILE)\stardewvalley.targets" />
<!-- set setting defaults -->
<PropertyGroup>
<!-- map legacy settings -->
<ModFolderName Condition="'$(ModFolderName)' == '' AND '$(DeployModFolderName)' != ''">$(DeployModFolderName)</ModFolderName>
<ModZipPath Condition="'$(ModZipPath)' == '' AND '$(DeployModZipTo)' != ''">$(DeployModZipTo)</ModZipPath>
<!-- set default settings -->
<ModFolderName Condition="'$(ModFolderName)' == ''">$(MSBuildProjectName)</ModFolderName>
<ModZipPath Condition="'$(ModZipPath)' == ''">$(TargetDir)</ModZipPath>
<EnableModDeploy Condition="'$(EnableModDeploy)' == ''">True</EnableModDeploy>
<EnableModZip Condition="'$(EnableModZip)' == ''">True</EnableModZip>
</PropertyGroup>
<!-- find platform + game path -->
<Choose>
<When Condition="$(OS) == 'Unix' OR $(OS) == 'OSX'">
<PropertyGroup>
<!-- Linux -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
<!-- Mac (may be 'Unix' or 'OSX') -->
<GamePath Condition="!Exists('$(GamePath)')">/Applications/Stardew Valley.app/Contents/MacOS</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS</GamePath>
</PropertyGroup>
</When>
<When Condition="$(OS) == 'Windows_NT'">
<PropertyGroup>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32))</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32))</GamePath>
</PropertyGroup>
</When>
</Choose>
<!--*********************************************
** Inject the assembly references and debugging configuration
**********************************************-->
<Choose>
<When Condition="$(OS) == 'Windows_NT'">
<!-- references -->
<ItemGroup>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>false</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>false</Private>
</Reference>
<Reference Include="Stardew Valley">
<HintPath>$(GamePath)\Stardew Valley.exe</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="StardewModdingAPI">
<HintPath>$(GamePath)\StardewModdingAPI.exe</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="xTile, Version=2.0.4.0, Culture=neutral, processorArchitecture=x86">
<HintPath>$(GamePath)\xTile.dll</HintPath>
<Private>false</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
</ItemGroup>
<!-- launch game for debugging -->
<PropertyGroup>
<StartAction>Program</StartAction>
<StartProgram>$(GamePath)\StardewModdingAPI.exe</StartProgram>
<StartWorkingDirectory>$(GamePath)</StartWorkingDirectory>
</PropertyGroup>
</When>
<Otherwise>
<!-- references -->
<ItemGroup>
<Reference Include="MonoGame.Framework">
<HintPath>$(GamePath)\MonoGame.Framework.dll</HintPath>
<Private>false</Private>
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="StardewValley">
<HintPath>$(GamePath)\StardewValley.exe</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="StardewModdingAPI">
<HintPath>$(GamePath)\StardewModdingAPI.exe</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="xTile">
<HintPath>$(GamePath)\xTile.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
</Otherwise>
</Choose>
<!--*********************************************
** Deploy mod files & create release zip after build
**********************************************-->
<!-- if game path or OS is invalid, show one user-friendly error instead of a slew of reference errors -->
<Target Name="BeforeBuild">
<Error Condition="'$(OS)' != 'OSX' AND '$(OS)' != 'Unix' AND '$(OS)' != 'Windows_NT'" Text="The mod build package doesn't recognise OS type '$(OS)'." />
<Error Condition="!Exists('$(GamePath)')" Text="The mod build package can't find your game folder. You can specify where to find it; see details at https://github.com/Pathoschild/SMAPI/blob/develop/docs/mod-build-config.md#game-path." />
<Error Condition="'$(OS)' == 'Windows_NT' AND !Exists('$(GamePath)\Stardew Valley.exe')" Text="The mod build package found a a game folder at $(GamePath), but it doesn't contain the Stardew Valley.exe file. If this folder is invalid, delete it and the package will autodetect another game install path." />
<Error Condition="'$(OS)' != 'Windows_NT' AND !Exists('$(GamePath)\StardewValley.exe')" Text="The mod build package found a a game folder at $(GamePath), but it doesn't contain the StardewValley.exe file. If this folder is invalid, delete it and the package will autodetect another game install path." />
<Error Condition="!Exists('$(GamePath)\StardewModdingAPI.exe')" Text="The mod build package found a game folder at $(GamePath), but it doesn't contain SMAPI. You need to install SMAPI before building the mod." />
</Target>
<!-- deploy mod files & create release zip -->
<Target Name="AfterBuild">
<DeployModTask
ModFolderName="$(ModFolderName)"
ModZipPath="$(ModZipPath)"
EnableModDeploy="$(EnableModDeploy)"
EnableModZip="$(EnableModZip)"
ProjectDir="$(ProjectDir)"
TargetDir="$(TargetDir)"
GameDir="$(GamePath)"
/>
</Target>
</Project>