钢铁雄心4
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
ParaTranz
资助我们
×
欢迎访问钢铁雄心4百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
注意:请勿在本站上传违反中华人民共和国法律的相关项目及文本,包括但不限于涉及违法犯罪、历史虚无主义、侮辱先烈、暴力色情等,一经发现将立刻锁定证据并上报网警。
欢迎所有对百科感兴趣的同学加入钢4编辑群:
1137478871
。
阅读
查看源代码
查看历史
讨论
查看“音乐包制作”的源代码
←
音乐包制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Version|1.11}} {{需要翻译|译者=霜泽图书馆}} Music files are stored in the *.ogg format within the {{path|music/}} folder or one of its subfolders. The [https://runite-drill.github.io/music-mod-creation-tool/ Music Mod Creation Tool] is a quick and easy-to-use modding tool that will generate all the files described below to add music and a radio station to the game. == Song definition == Songs are defined within files of the *.asset format, located in the same folder as the *.ogg files. A definition is formatted as following: <pre>music = { name = "song_name" file = "song_file.ogg" volume = 0.65 }</pre> ''name'' is the song's ID, as well as its localisation key for name assignment within a [[Localisation]] file as <code> song_name:0 "Song's Name"</code>. It cannot contain more than 63 characters.<br/> ''file'' is the song's filename, including the *.ogg extension.<br/> ''volume'' allows to adjust the volume of the *.ogg file without editing it. == Assigning to a station == In order to work properly, songs must be assigned to a station. The assignments are stored in *.txt files, within the same folder as the *.asset and *.ogg files.<br/> An assignment file, before defining any songs, must be assigned to a station. Multiple files can be assigned to the same station. This is done with the following line of code: <pre>music_station = "station_name"</pre> A typical assignment of a song is formatted accordingly: <pre>music = { song = "song_name" chance = { factor = 1 modifier = { factor = 0 has_war = no } } }</pre> ''song'' accepts the ID of the song, defined as its name within the *.asset file.<br/> ''chance'' defines the chance for a song to be picked if the playmode is set to Weighted Shuffle. The allowed arguments are <code>factor</code>, for multiplying the chance, <code>add</code>, for adding to the chance, and <code>base</code>, replacing the chance entirely. <code>modifier = {}</code> allows the argument to modify the chance only be executed if all of the [[Conditions|triggers]] within are met. == Radio stations == A radio station is defined as an [[Interface modding|user interface]] file, {{path|interface/*.gui}}. The contents of the file are required to be the following, with <code><MUSIC STATION></code> being replaced with the music station's name: <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> The name is assigned by using its ID as a [[localisation]] key within {{path|localisation/<language>/*_l_<language>.yml}}: <code> <MUSIC STATION>:0 "Music station's name"</code>.<br/> The album cover is assigned a sprite as the quadTextureSprite within select_station_button. A sprite must be defined within {{path|interface/*.gfx}} as the following: <pre> spriteType = { name = "<SPRITE>" texturefile = "gfx//interface//topbar//musicplayer//<FILE NAME>.dds" noOfFrames = 2 }</pre>The *.dds file must be split horizontally into 2 sprites: when it is unselected, and when it is selected. {{Modding navbox}} [[分类:Modding]]
本页使用的模板:
Template:Ambox 2020
(
查看源代码
)
Template:Clear
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Path
(
查看源代码
)
Template:Version
(
查看源代码
)
Template:需要翻译
(
查看源代码
)
返回
音乐包制作
。
×
登录
密码
记住登录
加入钢铁雄心4百科
忘记密码?
其他方式登录