LordAshes-PlaySoundPlugin icon

PlaySoundPlugin

Triggers remote or local sound files based on numeric keypad code or menu.

Last updated 6 months ago
Total downloads 491
Total rating 0 
Categories Tweaks Networked Tools Integration Assets
Dependency string LordAshes-PlaySoundPlugin-1.1.1
Dependants 0 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-AssetDataPlugin-3.4.0 icon
LordAshes-AssetDataPlugin

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

Preferred version: 3.4.0
LordAshes-GUIMenuPlugin-1.2.0 icon
LordAshes-GUIMenuPlugin

Add text/icon menus that appear in centre of screen or slide out the right side. Support for multi-layer hierarchy.

Preferred version: 1.2.0

README

Play Sound Plugin

This unofficial TaleSpire plugin allows playing sounds based on a numeric keypad code. This allows an infinte number of sounds to be referenced from within the game. However, the plugin does not provide the user with a user friendly way to determine which code entry is associated with which file - the user will have to handle the coorelation on his/her own.

Video: https://youtu.be/vZYCED6hsOE

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

Change Log

1.1.1: Updated for compatibility with BR Seats update.
1.1.0: Added UI menu option.
1.1.0: Fixed bug with audio file location.
1.0.0: Initial release.

Install

Use R2ModMan or similar installer to install this plugin.

You will need to configure this plugin using the R2ModMan Edit Config.

Configuration

Set the Audio file location and file name setting. This is the path to the audio files. For local references (which means all players need to have them locally) start this setting with file:// followed by the path to the audio files. For remote repositories start the setting with the URL (inclduing http:// or https://). The end of the setting should have the name of the file with the code being represented by a single # character. For example, http://MusicRepo.Org/Audio/#.mp3 or file://D:/Audio/#.mp3.

Set the Number of code digits to the number of digits used for the code. As soon as this many digits are typed the corresponding audio file, if present, will be requested to play. For example, for a 3 digit code, thus allowing 999 audio files, set the value to 3. For a 2 digit code, thus allowing 99 audio files, set the value to 2. And so on.

Adding Files

Mode 1: Code Trigger

Place the desired files into the location configured in the configuration (see above). Rename the files to match the pattern configured in the configuration file replacing the # character with the desired code. Ensure that the desired code matches the number of cogured digits. For example,

Number of code digits = 2 Audio file location and file name = file://D:/Audio/#.mp3

Then you would rename your audio files to:

D:/Audio/01.mp3 D:/Audio/02.mp3 .. D:/Audio/99.mp3

Note that because the setting was set to two digits the file name replaces the # character with a 2 digit code.

Mode 2: Menu Trigger

When using the Menu Trigger mode, the plugin looks at the path indicated in the Audio file location and file name and uses that to determine the root location of the audio files menu. Any audio files (ACC, MP3, OGG or WAV) files will be shown in the root menu. Any folder hierarchy within this folder will be created as a menu hierarchy enumerating all audio files within as the user navigates the hierarchy.

For example, the configuration of D:/Audio/#.mp3 would enumerate all the audio files in D:/Audio/.

Note that in Menu Trigger mode, the filename in the configuration is ignored but must be present. As such the confguration above should not be D:/Audio/ it needs to contain a file pattern which, in this case, is a dummy.

In order to support remote files using this method, an additional type of file is supported: WWW. WWW files are text file with a WWW extension whose content is the URL of the remote file. This allows the creation of local files for the plugin to enumerate in the menu system but still refer to remote files.

Usage

Mode 1: Code Trigger

  1. Ensure Num Lock is on.
  2. Enter the numeric code for the file on the keypad.
  3. Enter all zeros (how even many digits there are in your code) to stop playing audio.

Mode 2: Menu Trigger

  1. Press the menu shortcut. Default: Insert
  2. Select audio using the side out menu.

Limitation

Since the plugin expects audio files in a specific location - so that you can build the desired hierarchy of folders, that means that asset packs with Audio files (such as those used for the Audio Plugin) cannot be used out of the box. However, the steps to add such content if fairly simple. There are two ways to do this:

Move Method

  1. Locate the music asset pack folder in the plugins install folder.
  2. Move the audio files from that location to the location used by this plugin.
  3. Arrange the audio files in the desired folder hierarchy if desired.

Symbolic Link

  1. Open command prompt as Adminnistrator. You can do this by typing CMD on the Start Menu or Cortana/Search, right clicking the "Command Prompt" option, and selecting "Run As Administrator"
  2. Use the CD command to change to the audio file directory configured for this plugin. For example: CD /D D:\Audio (The /D is used to also switch drives if using a different drive)
  3. Type the following command to make a link directory: mklink /D folder asset_pack_folder where folder is the link folder to be make in the plugin's audio hierarchy and asset_pack_folder is the CustomData folder of the music asset pack. For example:

mklink /D Battle_Music D:\r2modmanPlus-local\TaleSpire\profiles\Default\BepInEx\plugins\WeirdAl-BattleMusic

The above would make a folder called "Battle_Music" which points to the location of the "WeirdAl-BattleMusic" asset pack. This will make the plugin think that you have create a "Battle_Music" folder with audio file contents when, in fact, you have only created a link directory which links to the "WeirdAl-BattleMusic" folder.

If the path has any spaces in it, surround the full path and name in quotes, such as:

mklink /D Battle_Music "D:\r2modmanPlus-local\TaleSpire\profiles\Black Death\BepInEx\plugins\Weird Al-Battle Music"