钢铁雄心4
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问钢铁雄心4百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
注意:请勿在本站上传违反中华人民共和国法律的相关项目及文本,包括但不限于涉及违法犯罪、
历史虚无主义、侮辱先烈、暴力色情等,一经发现将立刻锁定证据并上报网警。
欢迎所有对百科感兴趣的同学加入钢4编辑群:
1137478871
。
阅读
查看源代码
查看历史
讨论
查看“音乐包制作”的源代码
←
音乐包制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Version|1.11}} {{需要翻译|译者=霜泽图书馆}} 音乐文件以 *.ogg 格式存储在{{path|music/}}文件夹或其子文件夹之一中。 [https://runite-drill.github.io/music-mod-creation-tool/ Music Mod Creation Tool]是一种快速且易于使用的 Mod 工具,它将生成下面描述的所有文件,以将音乐和广播电台添加到游戏中。 == 歌曲定义 == 歌曲在 *.asset 格式的文件中定义,与 *.ogg 文件位于同一文件夹中。定义的格式如下: <pre>music = { name = "song_name" file = "song_file.ogg" volume = 0.65 }</pre> ''name''是歌曲的 ID,以及用于在本地化文件中分配名称的 [[本地化]]键<code> song_name:0 "Song's Name"</code>。它不能包含超过 63 个字符。<br/> ''file''是歌曲的文件名,包括 *.ogg 扩展名。<br/> ''volume'' 允许调整 *.ogg 文件的音量,而无需对其进行编辑。 == 分配电台 == 为了正常工作,歌曲必须分配给一个电台。分配存储在 *.txt 文件中,与 *.asset 和 *.ogg 文件位于同一文件夹中。<br/> 在定义任何歌曲之前,必须将分配文件分配给一个电台。可以将多个文件分配给同一个电台。这是通过以下代码行完成的: <pre>music_station = "station_name"</pre> 典型的歌曲分配格式如下: <pre>music = { song = "song_name" chance = { factor = 1 modifier = { factor = 0 has_war = no } } }</pre> ''song'' 接受歌曲的 ID,在 *.asset 文件中为其定义名称。<br/> ''chance'' 定义了在播放模式设置为加权随机播放时歌曲被选中的几率。允许的参数有 <code>factor</code>,用于乘以几率,<code>add</code>,用于增加几率,以及<code>base</code>,完全替换几率。<code>modifier = {}</code> 允许参数仅在满足所有触发条件时修改几率。 == 广播电台 == 广播电台被定义为一个 [[Interface modding|用户页面]]文件,位于{{path|interface/*.gui}}.中。文件内容需要如下所示,将<code><MUSIC STATION></code>替换为音乐电台的名称: <pre>guiTypes = { containerWindowType = { name = "<MUSIC STATION>_faceplate" position = { x =0 y=0 } size = { width = 590 height = 46 } iconType ={ name ="musicplayer_header_bg" spriteType = "GFX_musicplayer_header_bg" position = { x= 0 y = 0 } alwaystransparent = yes } instantTextboxType = { name = "track_name" position = { x = 72 y = 20 } font = "hoi_20b" text = "Roger Pontare - Nar vindarna viskar mitt namn" maxWidth = 450 maxHeight = 25 format = center } instantTextboxType = { name = "track_elapsed" position = { x = 124 y = 30 } font = "hoi_18b" text = "00:00" maxWidth = 50 maxHeight = 25 format = center } instantTextboxType = { name = "track_duration" position = { x = 420 y = 30 } font = "hoi_18b" text = "02:58" maxWidth = 50 maxHeight = 25 format = center } buttonType = { name = "prev_button" position = { x = 220 y = 20 } quadTextureSprite ="GFX_musicplayer_previous_button" buttonFont = "Main_14_black" Orientation = "LOWER_LEFT" clicksound = click_close pdx_tooltip = "MUSICPLAYER_PREV" } buttonType = { name = "play_button" position = { x = 263 y = 20 } quadTextureSprite ="GFX_musicplayer_play_pause_button" buttonFont = "Main_14_black" Orientation = "LOWER_LEFT" clicksound = click_close } buttonType = { name = "next_button" position = { x = 336 y = 20 } quadTextureSprite ="GFX_musicplayer_next_button" buttonFont = "Main_14_black" Orientation = "LOWER_LEFT" clicksound = click_close pdx_tooltip = "MUSICPLAYER_NEXT" } extendedScrollbarType = { name = "volume_slider" position = { x = 100 y = 45} size = { width = 75 height = 18 } tileSize = { width = 12 height = 12} maxValue =100 minValue =0 stepSize =1 startValue = 50 horizontal = yes orientation = lower_left origo = lower_left setTrackFrameOnChange = yes slider = { name = "Slider" quadTextureSprite = "GFX_scroll_drager" position = { x=0 y = 1 } pdx_tooltip = "MUSICPLAYER_ADJUST_VOL" } track = { name = "Track" quadTextureSprite = "GFX_volume_track" position = { x=0 y = 3 } alwaystransparent = yes pdx_tooltip = "MUSICPLAYER_ADJUST_VOL" } } buttonType = { name = "shuffle_button" position = { x = 425 y = 20 } quadTextureSprite ="GFX_toggle_shuffle_buttons" buttonFont = "Main_14_black" Orientation = "LOWER_LEFT" clicksound = click_close } } containerWindowType={ name = "<MUSIC STATION>_stations_entry" size = { width = 162 height = 130 } checkBoxType = { name = "select_station_button" position = { x = 0 y = 0 } quadTextureSprite = "<SPRITE>" clicksound = decisions_ui_button } } }</pre> 名称通过在{{path|localisation/<language>/*_l_<language>.yml}}中使用其 ID 作为[[本地化]]键来分配:: <code> <MUSIC STATION>:0 "Music station's name"</code>.<br/> 专辑封面被分配为 select_station_button 中的 quadTextureSprite。必须在{{path|interface/*.gfx}}中定义一个 sprite,如下所示: <pre> spriteType = { name = "<SPRITE>" texturefile = "gfx//interface//topbar//musicplayer//<FILE NAME>.dds" noOfFrames = 2 }</pre>*.dds 文件必须垂直分割成两个sprite:未选中时和选中时。 {{Modding navbox}} [[分类:Modding]]
本页使用的模板:
Template:Ambox 2020
(
查看源代码
)
Template:Clear
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Path
(
查看源代码
)
Template:Version
(
查看源代码
)
Template:需要翻译
(
查看源代码
)
返回
音乐包制作
。
×
登录
密码
记住登录
加入钢铁雄心4百科
忘记密码?
其他方式登录