Music mods

Post Reply
Helen Pixels
Member
Posts: 37
Joined: Thu Jan 27, 2022 13:29

Music mods

by Helen Pixels » Post

I have two music mods installed, and they both appear to be the same except for the contents of the 'sounds' folder, which contains the .ogg music files. If I were to switch out the music for other soundtracks (for which I'd only either use free open source music, or else compose my own in bosca ceoil or onlinesequencer, to be absolutely sure of not violating any copywrites), would I be permitted to re-release the sound daemon with these new tunes so people could have a greater variety of stuff to listen to while playing? If this is allowed, what conditions would I need to meet to release a mod(for instance, is there a limit on how big it can be...etc), and how would I go about it?

loosewheel
Member
Posts: 155
Joined: Mon Dec 28, 2020 01:19
GitHub: loosewheel
In-game: loosewheel

Re: Music mods

by loosewheel » Post

You would have to check out the licensing of the mod (daemon) you are copying to determine whether copy, modify and distribute are permissible, and any required licensing of the derived work.

You would then have to make a copy and make your mod distinct from the original. Mod name, author, dependencies, etc. are generally specified in the mod.conf file, but there are older now depreciated methods for doing so as well. Generally within the code of the mod there is a global variable of the mod’s name, which is usually a table. So if the mod’s name is mymod the code may have something like:

mymod = {}

This is usually in init.lua, but does not have to be. This table often has keys of the exposed properties and methods of the mod, which could be defined any where in the mod code. The mod name may also be in internationalisation code as a string to get the translator. Everywhere the original mod name is needs to be updated with your mod name. If you have a half decent editor, find and replaced makes easy work of most of this.

The file/folder structure of a mod and the contents of necessary files is stated toward the top of lua_api.txt for Minetest. Its best to use the version of this document from the version you are developing on, as it is updated with each version. If the mod you are copying is quite old it may have depreciated elements in it. If you don’t update them in your mod, your mod will be virtually out of date from release.

As far as just changing the files in the sounds folder, this may not be enough. The media folders are really just where the media is stored, but used in code by name. Sound files generally use the title part of the file name. So if the sound file is mymusic.ogg, mymusic.1.ogg or mymusic.2.ogg it is used as "mymusic". When the file names have the numbered format Minetest will randomly select the file to play. With the first, or only one, that file is always played. Depending on how the mod code is constructed, the sound file names will usually be somewhere as strings. This may be in a table with a list of the names. These would also need to be updated with the names of your sound files. Keep in mind that media files are global. If you retain the same sound file name from the original and both mods are loaded, which sound is actually used is ambiguous. Generally use some naming convention to avoid naming conflicts (generally mymod_mymusic.ogg).

As far as size, I don’t think there is an emphatic size limit for mods. Problems caused because of sizes are something you usually stumble across while you are developing it. I know that if a texture is to big it crashes the game, and if there are too many textures it crashes the game. This limit is about 64k, which seems to be a common hard limit used in the engine. You are not likely to have 64,000 sound files.

When you are developing a mod you just try and test everything to see how it performs. You can open the task manager (or equivalent) and see how much RAM is used when loading the game. Then enable your mod and load it again comparing the results. Then check CPU demand and RAM usage when your mod is being used in game. Large media content may increase loading time if the media has to be downloaded from server to client. You generally just develop seeing what you can do without (or before) it causing problems.

As far as releasing your mod, for the forum this post details what is expected. As it requires a download link your mod would need to be hosted somewhere so it is accessible. Github is commonly used, but does not need to be. As far as releasing on ContentDB it is best to check the requirements from there. I have only used Github to release through ContentDB, which has a feature to automatically update when the Github repository is updated. I have not used this feature so am not really sure, but I believe that your mod can be uploaded to ContentDB, as well as pulling from other sources.

Helen Pixels
Member
Posts: 37
Joined: Thu Jan 27, 2022 13:29

Re: Music mods

by Helen Pixels » Post

Okay, thanks for the reply. It seems I do not have the ability to create this mod because I can't code (every time I've tried to learn my brain turns to mush, unfortunately, and that was attempting to learn GDScript, which is supposed to be an easy language to pick up!) I wanted to make my own game, I still can, in RPG Maker, because it's a codeless engine. As far as the music mod was concerned, I had assumed that simply swapping out the music files would work, if not, then I'd better leave it alone and just wait for someone with the necessary skills to make more music mods. No way would I be touching the code, because I'd be guaranteed to mess it up.

Icalasari
Member
Posts: 166
Joined: Tue Sep 23, 2014 05:29
IRC: Icalasari
In-game: Icalasari

Re: Music mods

by Icalasari » Post

Helen Pixels wrote:
Sun Aug 07, 2022 10:56
As far as the music mod was concerned, I had assumed that simply swapping out the music files would work, if not, then I'd better leave it alone and just wait for someone with the necessary skills to make more music mods. No way would I be touching the code, because I'd be guaranteed to mess it up.
I may be able to help you out there. One of the mods I will be working on for my mod pack will be a music mod (inserting sound effects was fairly simple, directionless music per player shouldn't be much of a jump)

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 5 guests