Ambient Music Additions 允许以可配置的权重向原版音乐轮换中添加自定义 .ogg 曲目,并支持将音乐划分为不同类别。音乐可以在特定的结构和生物群系中播放,无论是原版还是模组添加的均可。
----------------------------------------------
更新:1.1:
新增了 timeRanges 参数。minTime 和 MaxTime 定义了曲目可以播放的时间范围值,而 label 仅用于在游戏内使用 info 命令时显示用途。
label 有以下几种选项:
day(白天)
night(夜晚)
dawn(黎明)
dusk(黄昏)
noon(正午)
midnight(午夜)
"timeRanges": [
{
"label": "night",
"minTime": 12000,
"maxTime": 24000
}
]
包含 timeRanges 的完整条目如下所示:
{
"soundId": "ambient_music_generator:lost_maze",
"replaceProbability": 1.0,
"weight": 10,
"biomes": [
"minecraft:swamp"
],
"structures": [],
"category": "overworld",
"timeRanges": [
{
"label": "night",
"minTime": 12000,
"maxTime": 24000
}
]
}
----------------------------------------------
该模组默认会创建一个名为 "Ambient Music Generator" 的资源包文件夹。为了使所有功能正常运行,请启用此资源包。
在该资源包的 music 文件夹中放置要添加的 .ogg 文件。在 sounds 文件夹中包含 sounds.json 文件。
{
"example_track": {
"sounds": [
{
"name": "ambient_music_generator:music/example_track",
"stream": true
}
],
"subtitle": "subtitles.ambient_music_generator.example_track"
}
}
music 文件夹中的每个 ogg 文件都应在 sounds.json 文件中列出,格式如下。subtitle 字段不是必需的。重要的是将 "example_track" 替换为 .ogg 文件的确切名称(不含扩展名)。例如,如果我想添加一个名为 forest_creatures.ogg 的曲目,条目应如下所示:
{
"forest_creatures": {
"sounds": [
{
"name": "ambient_music_generator:music/forest_creatures",
"stream": true
}
],
"subtitle": "subtitles.ambient_music_generator.forest_creatures"
}
}
配置好 sounds.json 后,在 mods 配置文件夹中还存在于另一个配置文件 ambient-music-generator.json。
该文件中的条目如下所示:
{
"customTracks": [
{
"soundId": "ambient_music_generator:far_fields",
"replaceProbability": 1.0,
"weight": 10,
"biomes": [
"minecraft:jungle"
],
"structures": [],
"category": "overworld"
}
]
}
-
SOUND ID 与 sounds.json 中使用的 ID 相同。
-
Replace Probability(替换概率)决定了歌曲替代原版曲目的频率,1.0 表示该曲目将始终替代任何原版选项。
-
category(类别)选项允许你将曲目归入某个类别。同一类别中的曲目将根据其各自的权重进行播放,权重越高,该类别中的曲目被播放的可能性就越大。如果游戏选择播放自定义曲目而非原版曲目,它会随机选择一个类别来播放音乐。
-
最后,biome(生物群系)和 structure(结构)列表允许你配置音乐应该在哪些生物群系/结构中播放。
注意:由于结构检测是服务器端的,因此该模组必须在客户端和服务端都安装才能正常运作多人游戏。
该模组还添加了一些有用的命令:
/ambientmusic info:显示当前正在播放的曲目信息、已加载的自定义曲目数量、当前的结构/生物群系以及在你当前情况下可以播放的自定义曲目。
/ambientmusic skip:立即跳到下一首音乐曲目。此命令也适用于任何原版曲目,并与游戏设置中的音乐频率选项正确集成。
/ambientmusic reload:重新加载 sounds.json 和 ambient-music-generation.json。
如果在游玩过程中遇到任何错误,请通知我。本模组旨在作为实用的整合包工具,欢迎在任何整合包中使用它。
Ambient Music Additions allows the addition of custom .ogg tracks to the Vanilla music rotation at configurable weights, with the additional ability to divide the music into categories. The music can play in specific structures and biomes, modded or otherwise.
----------------------------------------------
UPDATE: 1.1:
A timeRanges argument has been added. The minTime and MaxTime are the time values in which the track could play, while the label is just for display purposes when using the info command in game.
There are a few options for label:
day
night
dawn
dusk
noon
midnight
"timeRanges": [
{
"label": "night",
"minTime": 12000,
"maxTime": 24000
}
]
Here is what a completed entry looks like with timeRanges included:
{
"soundId": "ambient_music_generator:lost_maze",
"replaceProbability": 1.0,
"weight": 10,
"biomes": [
"minecraft:swamp"
],
"structures": [],
"category": "overworld",
"timeRanges": [
{
"label": "night",
"minTime": 12000,
"maxTime": 24000
}
]
}
----------------------------------------------
The Mod will by default create a resource pack folder called "Ambient Music Generator". This should be enabled for everything to function properly.
Inside the music folder of this pack is where you will place your .ogg files for addition. Inside the sounds folder is sounds.json.
{
"example_track": {
"sounds": [
{
"name": "ambient_music_generator:music/example_track",
"stream": true
}
],
"subtitle": "subtitles.ambient_music_generator.example_track"
}
}
Each ogg file from the music folder should be listed in the sounds.json folder like so. The subtitle field is not required. The important thing is that "example_track" is replaced with the EXACT name of your .ogg file without the extension. I.E, if I wanted to add a track called, forest_creatures.ogg, the entry would look like the following:
{
"forest_creatures": {
"sounds": [
{
"name": "ambient_music_generator:music/forest_creatures",
"stream": true
}
],
"subtitle": "subtitles.ambient_music_generator.forest_creatures"
}
}
Once sounds.json is configured, another config file exists in the mods config folder, ambient-music-generator.json.
entries in this file look like the following:
{
"customTracks": [
{
"soundId": "ambient_music_generator:far_fields",
"replaceProbability": 1.0,
"weight": 10,
"biomes": [
"minecraft:jungle"
],
"structures": [],
"category": "overworld"
}
]
}
-
The SOUND ID is the same id used in sounds.json.
-
The Replace Probability determines how often the song will play instead of a vanilla track, with 1.0 meaning the track will always replace any vanilla options.
-
The category option allows you to put tracks into a category. Tracks in the same category will play according to their individual weights, with higher weights making it more likely that a track in a given category will play. The game will randomly select a category to play music from if it selects a custom track instead of a vanilla one.
-
Lastly, the biome and structure lists allow you to configure which biomes/structures the music should play in.
NOTE: Because structure detection is server sided, this mod MUST be installed on both the client and server to function properly in multiplayer.
The mod also adds a few useful commands:
/ambientmusic info: Displays info about the current track playing, the number of custom tracks loaded, the current structure/biome, and which custom tracks can play in your given situation.
/ambientmusic skip: Immediately skips to the next music track. This command works with any vanilla tracks as well and integrates properly with the music frequency option in the game settings.
/ambientmusic reload: Reloads sounds.json and ambient-music-generation.json.
Please notify me of any bugs that occur while playing. This mod is intended as a useful modpack utility and I welcome its use in any modpack.
评论 0
登录后参与评分
还没有评论,来抢沙发吧