Yume BGM Tools is aset of CLI tools aimed at aiding with the process of contributing BGMs files to Yume Wiki as well as YNFG Wiki, a set of MediaWikis dedicated to documenting Yume Nikki fangames. These tools are designed with the intention of automating all aspects involved when making this sort of contribution.
From obtaining the information necessary which usually requires either playing the game or importing it in RPG Maker 2000/2003, to modifying the game files to meet the Wiki's styleguide and finally uploading these game files and editing the corresponding articles. With these tools the entire process should be streamlined to make it less tedious and less time consuming.
Each tool tackles one aspect of the entire process, this segmentation eases the maintenace of the tools as well as giving the flexibility to the user on picking what aspect they wish to work on.
As of right now, only BGM File Adapter is publicly available.
BGM Data Extractor: A tool designed to obtain all the necessary information by reading through the RPG_RT.ldt
file contained in each RPG Maker game, powered by EasyRPG Tools's library liblcf by using the LCF2XML tool. With BGM Data Extractor you will be able to generate a CSV file containg the following information: The name of the game, name of the audio file, the tempo (or speed) in which it's played and the map ID where you it's heard.
BGM File Adapter: This tool handles the necessary modifcation of audio files which are usually done through Audacity, powered by the pydub package which is an interface for the FFmpeg library. Users have the choice of selecting between two methods; a "one-by-one" mode intended for processing just a couple of files and a "batch" mode intended for hundreds of files. The second method uses the CSV generated by BGM Data Extractor.
BGM Wiki Bot (name pending): With this tool you can upload all the audio files to the wiki and additionally modify the corresponding pages, powered by the MediaWiki API. This toll will take both outputs from BGM Data Extractor and BGM File Adapter to complete the entire contribution process.
All tools are made using Python 3.11 or above, retroactive support is expected to go as far back as Python 3.6 (when f-strings were added) but there are no guarantees. The tools are also expected to be compatible with Windows and Linux systems.
Refer to each tool's folder in the repo for specific usage.
BGM Data Extractor: Input the path to the game files and it will output the CSV for you. Information which cannot be obtained from the RPG_RT.ldt
file can be found through the corresponding MapXXXX.lmu
file instead, in these cases the tool will prompt to parse these files too.
BGM File Adapter:
- Method one: Input the name of the game, the path to the audio file, and the speed in which it plays then it will output an OGG file. When done it will prompt to process another file.
- Method two: Input the path to the CSV file and the path to the audio files then it will output all the OGG files. If the process is interrupted it can be resumed by selecting this method again.
BGM Wiki Bot (name pending): To be determined.
Download the source code and execute main.py
for each tool OR if you're in Windows, download the provided binary files (executables) instead, both options come with their dependencies described below. Be aware that the binary files will trigger false positives, the reason is explained in the next section of this README.
BGM Data Extractor: Requires an LCF2XML binary which is provided for you. Standalone downloads are found here for Windows users, for Linux users compiling the C++ source code is necessary.
BGM File adapter: Requires FFmpeg to be in your machine and the pydub package (source code only). pydub you can easily get through PIP pip install pydub
, FFmpeg can be either downloaded here for Windows or installed with your Linux package manger e.g. sudo apt install ffmpeg
. You can either place ffmpeg.exe
with the tool (source code or binary) or set up an environment variable for PATH. It is not provided for you as the license makes distribution annoying (section 6a).
BGM Wiki Bot (name pending): No dependencies as of yet.
Binaries are made using Pyinstaller which sadly triggers a Win32/Wacapew.C!ml
detection in Windows Defender and some Anti-Viruses (namely BitDefender). There is not much I can do about this as my only options are to pay for a certificate to sign my code or constantly upload all three programs for review to vendors like Microsoft, each time a tool is updated...
Alas, the tools provided here will unfortunately be flagged as malicious. If this is a concern to you or an annoyance, you can always run the source code directly. You can read about the type of detection here.
My idea is that once the tools are unlikely to receive constant updates, I will submit them for analysis to Microsoft and hopefully remove the false positive on Defender.
This process is optional but might be useful if you wish to use FFmpeg freely and with other software. FFmpeg is a CLI (command line interface) tool, just like mine, you can't simply run the executable.
Setting up variables in the System Environment Variables is generally handled automatically in Linux by your package manager but Windows users have to do this manually. This essentially means the ability to run a program in Command Prompt or PowerShell, following is a step-by-step guide for Windows users.
Head on to Start and type "env", the following result should come up:
Once opened it will display this window, click on the "Environment Variables..." button at the bottom:
You will now be prompted with a new window. You have the option to set up the Environment Variable for your user (top half) or for the entire system (top bottom), choice is up to you. If a variable "Path" exists select it and click "Edit..." otherwise create it with "New..."
When clicking "Edit..." you will be prompted with this new window, this displays all the values the variable has:
Click on the "New" button and then "Browse..." to locate the directory of the program:
If done correctly you should now be set up. Note that my list of Environment Variables (both user level and system level) are cluttered, your ammount of variables depenends on the current or previous programs you have installed. Same goes for the values of each variable.
To test that everything works you can open Command Prompt or Powershell, in FFmpeg's case you can do ffmpeg -version
to test if it works:
You're now good to go.
If you had to create PATH instead of editing then the process will be a lot more straightforward, give it the name "Path" and for the value "Browse files..."
This project "Yume BGM Tools" as well as its collection of software programs are all licensed under the Do What The F*ck You Want To Public License
(WTFPL).
The third party licenses can be found inside each tool's folder under third-parties-LICENSE
, they're copied exact from each repository.