PluginMasters-AudioPlugin icon

AudioPlugin

Play audio/music selected from a menu of preconfigured audio sources.

Last updated 6 months ago
Total downloads 13379
Total rating 2 
Categories Tweaks Networked Tools Integration Assets
Dependency string PluginMasters-AudioPlugin-5.0.0
Dependants 14 other packages depend on this package

This mod requires the following mods to function

bbepisTaleSpire-BepInExPack-5.4.10 icon
bbepisTaleSpire-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.10
brcoding-SetInjectionFlagPlugin-2.3.0 icon
brcoding-SetInjectionFlagPlugin

Allows players to flag mods are installed

Preferred version: 2.3.0
LordAshes-FileAccessPlugin-1.6.0 icon
LordAshes-FileAccessPlugin

Provides standardized methods for accessing both local file and url resources. Automatically handles searching local folders for assets.

Preferred version: 1.6.0
LordAshes-AssetDataPlugin-3.4.0 icon
LordAshes-AssetDataPlugin

Dependency plugin for subscription/notification based data storage and message exchange.

Preferred version: 3.4.0

README

Audio Plugin

This unofficial TaleSpire plugin adds custom ambient and/or music to the core Talespire atmosphere GUI. Supports both local files and internet files.

This is a colaborative work between Lord Ashes, HolloFox and Creadth. Lord Ashes did the initial code but most of it was rewritten by Hollo to use the Atmosphere GUI. Instead of generating new plugin, it was decided to replace Lord Ashes' plugin. Lord Ashes did a few improvement to Hollo's code for future expandability and added the remote URL support. After the Taleweaver update, the code was totally re-written patching key methods identified by Creadth. The latest version was another rewrite based on the research done by Creadth into Content Provider functionality. The latest version benefits from all the atmosphere audio features but still allows adding audio from audio files instead of asset bundles.

This plugin, like all others, is free but if you want to donate, use: http://LordAshes.ca/TalespireDonate/Donate.php

Change Log

5.0.0: Mod.Io subscribed music pack download if Mod.Io token is present
5.0.0: Added support for AudioSync plugin (syncs WWW files)
4.1.0: Fixed bug with Apply To Board and reapply audio on board load
4.0.0: Total rewrite based on Content Provider to enable all atmosphere audio features (and keep folders).
3.0.1: Fixed bug that forgot to collect WWW files.
3.0.0: Added folder support.
3.0.0: Total rewrite for for Taleweaver compatibility.
2.1.1: Added Audio/Music and Audio/Ambient folders for in-game share functionality. No plugin change.
2.1.0: Added Logging level for config.
2.1.0: JsonSerialization is now culture agnostic.
2.0.2: Bug Fix: Avoids exception when one has no music files or no ambient files.
2.0.1: Added duplicate audio file detection and warning.
2.0.0: Added support for sharing remote library.
2.0.0: Added support for remote requests.
1.1.0: Rewritten to use Atmosphere GUI for selection.
1.0.0: Initial release.

Install

Use R2ModMan or similar installer to install this plugin.

Configuration

Core Audio Placement can be either first, alphabetical or last. This indicates where the core audio files will appear if they are in the same folder as custom files. The first selection means all core files will appear before custom files. The last selection means that all core files will appear after any custom files. The alpahbetical selection means that the core and custom files will be mixed and shown in alphabetical order.

Virtual Core Ambient Files Location indicates the folder, in the hierarchy, where the core ambient file selection will appear. Defaults to Ambient/Core meaning a folder named core in the root of the Ambient selection options. If the folder points to an existing folder, it can mix core and custom files. If the folder does not physically exist, it will be shown as if it existed (and thus have only core content). If the entry is blank, ambient core files will not be shown anywhere.

Virtual Core Music Files Location same as Virtual Core Ambient Files Location but for core Music files instead of Ambient core files..

Usage

Content

The plugin will search for Ambient audio in any File Access Plugin friendly location with the following folder structure:

CustomData/Audio/Ambient

The plugin will search for Music audio in any File Access Plugin friendly location with the following folder structure:

CustomData/Audio/Music

Any files, with the extensions listed below, that is in either of these folders will be registered by this plugin and will show up in the corresponding section of the Atmosphere GUI.

Supported extensions: AIF, MP3, OGG, WAV, WWW

Extensions other than WWW are assoicated with local files where the content of the file contains the audio. The WWW extension is a special case where the content of the file is a text link (URL) to an internet source for the audio.

For example, the file "One More Time.www" might contain the content "http://audiowebsite/music/OneMoreTime.mp3"

The name that shows up in the GUI is the file name with the extension stripped. As such the filename should be meaningful so as to provide a good title in the menu. The file name can contain spaces.

The Ambient and Music folders can now have any hierarchy of sub-folders in which the audio files can be stored allowing better storage organization of the audio files. The hierarchy in which it is stored will be recreated when selecting from the Atmosphere pulldowns.

Remote Library Share

All ambient and music that is remote (uses the WWW functionality discussed above) can be shared with others so that they don't need to have the same WWW files. There are two modes of sharing: useOnly and copyLocal. Both the sender (typically GM) and the receiver (typically player) must agree to copyLocal otherwise useOnly mode is uded.

To invoke a share of the remote library, press the corresponding keyboard shortcut (default RCTRL+A).

If either the GM, or the player, or both have selected useOnly then use only mode is used. In this mode the remote library is sent and registered with the reciever for the session only. The GM will need to re-send the remote library each session because the receiver does not retain knowledge of the remote library. This mode is ideal when the GM want to limit the remote library to his own sessions but not have other players use the contents in their own sessions. This mode is also idea for players who don't want the GM's audio content mixed into their own collection. The receiver will have full access to the remote library during the session but once the session ends, the remote library will be forgotten.

If both the Gm and player select copyLocal then copy local mode is used. In this mode not only will the remote library be registered for the session but the system will also create the corresponding WWW files so that the remote content is available when the session is reloaded and/or in other sessions.

Remote Audio Request

Other plugins can trigger request of audio to play by writing to the org.hollofox.plugins.audio Asset Data key. The content of the message should be the user, followed by an at-sign (@), followed by the audio category and audio name. For example, LordAshes@Music/TavernSong01

To send a request to all players, ommit the user name. For example, @Music/TavernSong01

Mod.Io Subscriptions

Audio Plugin supports downloading audio packs based on subscriptions. Unfortunetly these packs cannot be stored in the official Talespire Mod.Io game due to BR request (to avoid affecting vanilla users) so instead we are using the fake game called Cups Game (https://mod.io/g/cups-game).

To make use of this process, you need a ModIo OAuth2 token. This is a one time process which creates a token which the tool saves so that it can be used by plugins to access your Mod.Io subscription. To create the token, a token creation tool, ModIoCreateToken.exe is provide. You will need your API KEY which you can get from your Mod.Io account. You will also need to provide an e-mail address. The tool will send a security code to the provided e-mail and then ask you to type it in. Once you do, the OAuth2 token will be created.

Limitations

  1. The WWW files cannot be distributed to players like they could in previous versions. This will be addressed in a future version.