From d0f485fe5ef1baa05ccc6208d7c45681825fc928 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 5 Jan 2019 02:46:37 -0500 Subject: [PATCH] add readme with proposed content pack format --- .../StardewSymphonyRemastered/Config.cs | 16 +-- .../Framework/Music/MusicManager.cs | 2 +- .../Framework/Music/MusicPack.cs | 2 +- .../StardewSymphonyRemastered/README.md | 101 ++++++++++++++++++ .../StardewSymphony.cs | 2 +- .../StardewSymphonyRemastered.csproj | 1 + 6 files changed, 113 insertions(+), 11 deletions(-) create mode 100644 GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/README.md diff --git a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Config.cs b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Config.cs index 96b93350..7342582c 100644 --- a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Config.cs +++ b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Config.cs @@ -3,22 +3,22 @@ namespace StardewSymphonyRemastered /// A class that handles all of the config files for this mod. public class Config { - /// Whether or not to display debug log information on the SMAPI console for this mod. + /// Whether to show debug logs in the SMAPI console. public bool EnableDebugLog { get; set; } = false; - /// The minimum delay between songs in terms of milliseconds. + /// The minimum delay between songs in milliseconds. public int MinimumDelayBetweenSongsInMilliseconds { get; set; } = 5000; - /// The maximum delay between songs in terms of milliseconds. + /// The maximum delay between songs in milliseconds. public int MaximumDelayBetweenSongsInMilliseconds { get; set; } = 60000; - /// The key binding to open up the menu music. + /// The key binding to open the menu music. public string KeyBinding { get; set; } = "L"; - /// Used to write a .json file for every possible option for a music pack. Use at your own risk! - public bool writeAllConfigMusicOptions { get; set; } = false; + /// Whether to write a JSON file for every possible option for a music pack. Use at your own risk! + public bool WriteAllConfigMusicOptions { get; set; } = false; - /// Used to completely disable the Stardew Valley OST. - public bool disableStardewMusic { get; set; } = false; + /// Whether to completely disable the Stardew Valley OST. + public bool DisableStardewMusic { get; set; } = false; } } diff --git a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicManager.cs b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicManager.cs index 5afb4468..c6c02bb7 100644 --- a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicManager.cs +++ b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicManager.cs @@ -48,7 +48,7 @@ namespace StardewSymphonyRemastered.Framework { if (this.currentMusicPack == null) return; - if (StardewSymphony.Config.disableStardewMusic) + if (StardewSymphony.Config.DisableStardewMusic) { if (this.currentMusicPack.isPlaying()) return; diff --git a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicPack.cs b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicPack.cs index 5cdba63b..e90f9903 100644 --- a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicPack.cs +++ b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/Framework/Music/MusicPack.cs @@ -29,7 +29,7 @@ namespace StardewSymphonyRemastered.Framework Directory.CreateDirectory(data); foreach (var list in this.songInformation.listOfSongsWithTriggers) { - if (!StardewSymphony.Config.writeAllConfigMusicOptions) + if (!StardewSymphony.Config.WriteAllConfigMusicOptions) { if (list.Value.Count == 0) continue; diff --git a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/README.md b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/README.md new file mode 100644 index 00000000..2592d86f --- /dev/null +++ b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/README.md @@ -0,0 +1,101 @@ +**Stardew Symphony Remastered** is a [Stardew Valley](http://stardewvalley.net/) mod that lets you +add music packs to Stardew Valley and play them without editing the game's default sound files. + +## Contents +* [For players](#for-players) + * [Install](#install) + * [Use](#use) + * [Configure](#configure) + * [Compatibility](#compatibility) +* [For content pack creators](#for-content-pack-creators) +* [For SMAPI mod creators](#for-smapi-mod-creators) +* [See also](#see-also) + +## For players +### Install +1. [Install the latest version of SMAPI](https://smapi.io/). +2. [Install Stardust Core](https://www.nexusmods.com/stardewvalley/mods/2341). +2. [Install this mod from Nexus mods](http://www.nexusmods.com/stardewvalley/mods/1100). +3. Run the game using SMAPI. + +### Use +1. Unzip any content packs you want to use into `Mods`. +2. Press `L` in-game to open the music menu, which will show icons representing the loaded music + albums. (You can click the left/right arrows to scroll if you have more than seven albums loaded.) +3. Choose an album icon to see a list of available songs on the right. +4. Click a song to select it. You can click the play/stop button to preview the song. +5. Next configure when the music will play by choosing options on the right. You can play it during + a specified season, festival, event, date, weather, time of day, location, or menu. The + conditions can be very broad (like 'play in winter') or very specific (like 'play during snowy + winter nights at the Saloon on Wednesdays'). Note that when two songs can be applied, the one + with the more specific conditions will be played. +6. **Make sure you click 'Add' when you're done!** + +Your music options are saved when the game saves, so they'll be lost if you exit without saving. + +### Configure +The mod creates a `config.json` file in its mod folder the first time you run it. You can open that +file in a text editor to configure the mod. + +These are the available settings: + +setting | what it affects +---------- | ------------------- +`EnableDebugLog` | Default false. Whether to show debug logs in the SMAPI console. +`MinimumDelayBetweenSongsInMilliseconds` | Default 5000. The minimum delay between songs in milliseconds. +`MaximumDelayBetweenSongsInMilliseconds` | Default 60000. The maximum delay between songs in milliseconds. +`KeyBinding` | Default `L`. The key binding to open the menu music. +`WriteAllConfigMusicOptions` | Default false. Whether to write a JSON file for every possible option for a music pack. Use at your own risk! +`DisableStardewMusic` | Default false. Whether to completely disable the Stardew Valley OST. + +### Compatibility +Stardew Symphony Remastered is compatible with Stardew Valley 1.3+ on Linux/Mac/Windows, both +single-player and multiplayer. There are no known issues in multiplayer (even if other players +don't have it installed), but it will only affect you. + +## For content pack creators +To create a content pack: + +1. [Create a standard content pack](https://stardewvalleywiki.com/Modding:Content_packs), using `Omegasis.StardewSymphonyRemastered` as the 'content pack for' ID. +2. Add an `icon.png` image, which is the album logo to show in-game. +2. Create a `songs` subfolder containing the `.wav` files to include. The file names (without + extension) will be shown in-game as the song names. + +## For SMAPI mod creators +You can reference Stardew Symphony in your own SMAPI mods in order to add new events, festivals, +locations, and menus for music selection. + +1. Reference the Stardew Symphony DLL directly (see [how to reference a DLL](https://stackoverflow.com/questions/12992286/how-to-add-a-dll-reference-to-a-project-in-visual-studio)). +2. Add `Omegasis.StardewSymphonyRemastered` as a dependency (see [manifest dependencies](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest#Dependencies)). +3. Now you can access the Stardew Symphony API to add music contexts: + + ```cs + using System; + using Microsoft.Xna.Framework; + using StardewModdingAPI; + using StardewModdingAPI.Events; + using StardewModdingAPI.Utilities; + using StardewValley; + using StardewSymphonyRemastered; + + namespace YourProjectName + { + /// The mod entry point. + public class ModEntry : Mod + { + public override void Entry(IModHelper helper) + { + StardewSymphonyRemaster.SongSpecifics.addLocation(“NameOfLocation”); + StardewSymphonyRemaster.SongSpecifics.addEvent(“UniqueEventID”); + StardewSymphonyRemaster.SongSpecifics.addFestival(“FestivalName”); + StardewSymphonyRemaster.SongSpecifics.addMenu(typeOf(MyMenu)); + } + } + } + ``` + +Happy modding! + +## See also +* [Nexus mod](http://www.nexusmods.com/stardewvalley/mods/425) +* [Discussion thread](https://community.playstarbound.com/threads/stardew-symphony-add-music-packs-to-stardew-valley.115686/) diff --git a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphony.cs b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphony.cs index 8e426a86..f2461f73 100644 --- a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphony.cs +++ b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphony.cs @@ -190,7 +190,7 @@ namespace StardewSymphonyRemastered { if (musicManager == null) return; - if (Config.disableStardewMusic) + if (Config.DisableStardewMusic) { if (Game1.currentSong != null) { diff --git a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphonyRemastered.csproj b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphonyRemastered.csproj index 67ed028a..49cb4ef9 100644 --- a/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphonyRemastered.csproj +++ b/GeneralMods/StardewSymphonyRemastered/StardewSymphonyRemastered/StardewSymphonyRemastered.csproj @@ -208,6 +208,7 @@ Always +