中国虚拟军事网(VME)- 专注于武装突袭系列虚拟军事游戏

 找回密码
 加入VME

QQ登录

只需一步,快速开始

搜索
查看: 6028|回复: 24

外国佬的车内自定义音乐播放器插件@CLAY_CARRADIO

  [复制链接]
发表于 2014-4-25 23:34:11 | 显示全部楼层 |阅读模式
他里面有英语说明,但看不懂,麻烦坛子里哪位大哥给翻译一下并讲一下具体的设置方法啊,现在附上英语说明书
                         ______________________________________
                        |_X_|         ______________________ |_|
                        |       <>   |                      |  |
                        |  /\   <>   | Car Radio by Clayman |  |
                        |  \/   <>   |______________________|  |
                        |       <>    |_|_|_|_|_|_|_|_|_|__|   |
                        |______________________________________|


******************************


Title:            ArmAII Car Radio

Author:    Clayman        <worldofclay@gmx.de>

Version:   2.3.1

Date:      01-26-2011

Requires:  ArmA2 V1.05 or above AND Operation Arrowhead expansion


******************************


Features:
* Fully working Car Radio for all cars and trucks in ArmA2
* All ArmA2 musictracks already included
* Add as many own musictracks as you wish
* Filteroptions InGame / own music
* Repeat Funtcion
* Random play
* 12-color display
* 7-color softkeys
* two designs
* Output Level depending on your soundcard / speakers ;-)

New in V2.1:
* Adding own music will work now
* Add additional vehicle types which have the radio available
* Playlist editor
* Main functions of the radio can be accessed via keyboard

New in V2.2:
* Drag & Drop Function for Playlist Editor
* Create your own pre-defined Playlist (in userconfig .hpp)
* No additional variables have to be used if not needed
* Define vehicle types which don't have the radio available
* Optional tooltips

New in V2.3
* All Operation Arrowhead musictracks added
* Added missing musictracks from Patch 1.05 (Eagle Wing)
* Fixed: Some buttons didn't work after leaving Playlist Editor via Cancel button
* Car Radio can now be found under Modules (F7) and has a custom icon


******************************


Installation:
Copy the two folders '@CLAY_CarRadio' and 'userconfig' to your ArmAII directory.
Add the startup parameter '-mod=@CLAY_CarRadio' to your ArmAII shortcut.


******************************


Usage:
To make the Car Radio available in your own mission, place the 'Car Radio' Module (found under Modules (F7) > Car Radio) somewhere on your Map.
That's it.
The Radio will be available in any car or truck on the map. Just board it any select 'Car Radio' from the action menu.


******************************


Controls:
Some of the control elements should be self-explaining, other might not. Here is a short description of them:

> - Starts the playback (changes to || )

|| - Stops the playback (changes back to > )

+ - Volume up

- - Volume down

>> - Next track

<< - Previous track

/\ - Cycle through filters increasing (ArmA2 Music > User Music > All Music > Custom)

\/ - Cycle through filters decreasing (ArmA2 Music > Custom > All Music > User Music)

OFF - Closes the dialog (music keeps playing!)

Playlist - Opens the Playlist Editor

Repeat - When last track is over, playback beginns from first track (on/off)('Repeat' shown in display)

Random - Random play (on/off)('Random' shown in display)

Key Col - Cycle through the different key-colors

Dspl Col - Cycle through the different display-color or sets automatic color change ('Col. Change' shown in display)

Design - Switches Design (Black / "Silver")


******************************


Playlist Editor:
Using the Playlist Editor, you can create your very own playlist.
The list to the right sowns all available tracks. On the left, you see your custom playlist.

< - Adds the track selected in the right list to your playlist (as last item)

> - Removes the track selected in the left list from the playlist

<< - Adds all tracks to the playlist

>> - Removes all tracks from the playlist

Restore - Restores the pre-defined playlist (in userconfig)(manually created playlist will be lost!)

OK - Closes the Playlist Editor and returns to the Radio, you custom playlist will be played

Cancel - Closes the Playlist editor without saving any changes made in the Playlist Editor and returnes to the Radio


******************************


Show Tooltips:
It is possible, to show tooltips over some of the buttons of the radio, which explain the function of that button.
To enable these tooltips, write the following code into the init.sqf or the init-line of any unit on the map:


        CLAY_RadioShowTooltips = true;


******************************


Add your own music:
To add your own music to the Radio, you first have to define it in your description.ext.
Now you can add it to the Radio using the 'CLAY_RadioAddMusic' variable:


        CLAY_RadioAddMusic = [ [<Track | String>, <Title | String>, <Time | Number>] ];


Track = The classname of your music, as defined in the description.ext.

Title = The title of the track, like it will be shown in the Radio.

Time = The length of the track in seconds.


At the end it should look something like this:


        CLAY_RadioAddMusic = [ ["MySong01", "My Song 1", 123], ["MySong02", "My Song 2", 456] ];


******************************


Pre-defined Playlist:
You can create your own playlist, which will be available from mission start (Playlist: Custom).
Open the file '\userconfig\CLAY_CarRadio\CLAY_CarRadio.hpp'. Now you can enter your desired tracks into the array behind _userPlaylist. Format is the same as when adding own music:


        _userPlaylist = [ ["Track08_Harvest_Red", "Harvest Red", 78], ["Track26_Organ_Works", "Organ Works", 69], ["MySong01", "My Song 1", 123] ];


******************************


Additional vehicle classes:
You can add other vehicle types, which have the Car Radio available. For this, you have to add the vehicle names (from CfgVehicles) to the 'CLAY_RadioAddVehicles' variable.


        CLAY_RadioAddVehicles = ["M1A1", "AH1Z", "PBX"];


******************************


Vehicles types, for which the radio is not available:
Just like adding additional vehicle types for use with the radio, you can define vehicle types, which won't have the radio available, using the 'CLAY_RadioNoVehicles' variable.


        CLAY_RadioNoVehicles = ["SkodaRed", "HMMWV", "TowingTractor"];


******************************


Keyboard controls:
The main functions of the Radio can be used directly from your keyboard. The key for every function can be defined.

defaults:

PAUSE - Play / Pause

RIGHT ARROW - Next Track

LEFT ARROW - Previous Track

UP ARROW - Volume Up

DOWN ARROW - Volume Down


To change these, open the file '\userconfig\CLAY_CarRadio\CLAY_CarRadio.hpp'.
Add the desired key number behind any of the variables _keyPlay, _keyNext, _keyPre, _keyVolUp and _keyVolDown.


******************************


Known Bugs:
* Clicking on the next (>>) or previous (<<) keys very fast might result in the timer not working correctly.
* Drag & Drop in Playlist Editor only works to add tracks to your own playlist. You can't remove tracks this way nor can you sort your playlist. (I'm working on a workaround for this, but I'm not sure if it's possible at all.)


******************************


For further information, support and an example mission showing you how to add your own music and additional vehicle types, please visit the following link:

        http://forums.bistudio.com/showthread.php?t=82665



Thanks:
BI for ArmAII
Vektorbosen for his (OFP) Dialog Tutorial
T_D for some help with the display-colorchange script
kju for support & some really nice ideas
Srgt_Foxhound, who "obliged" me to make this update ;-)


Disclaimer:
Use this whatsoever at your own risk. I take no responsibility for (im)possible damage
to your game/system/health/relationship/life that may be caused by installation of this.


******************************


Change Log:

V2.3.1
* Fixed 'nil' error

V2.3
* Added Operation Arrowhead musictracks
* Added tracks from Eagle Wing Campaign (Arma2 Patch 1.05)
* Fixed bug when leaving Playlist Editor via Cancel button
* Car Radio now found in Modules (F7)
* Custom Icon

V2.2
* Fixed all bugs introduced in Version 2.1
* Drag & Drop function for Playlist Editor
* Radio can be moved to any screen position
* Own playlist can be pre-defined
* No need for additional variables
* Vehicles types which don't have the radio
* Tooltips added
* No more delay when clicking << or >>
* Bug in display-colorchange fixed
* Some minor cosmetics

V2.1.2
* Music will stop playing after leaving a vehicle

V2.1.1
* Fixed bug, which caused other music not to be played

V2.1
* Adding own music will work now
* Additional vehicle types that can use the Car Radio can be added
* Added Playlist Editor
* Main functions can be accessed via keyboard

V2.0
* Ported to ArmAII
* Re-write of all scripts
* New, highly improved design
* Unlimited amount of own tracks can be added
* Different playlists
* Random play function
* Automatic color change for display
* Soft keys in 7 colors


        (OFP Version)
V1.6:
* 2 different color design themes
* Some bugs fixed

V1.5:
* 12-color display
* 3-color softkeys

V1.4:
* Added 5-color display
* All global variables are taged now

V1.3:
* Main script optimised
* Ability to add own music (up to 10 tracks)
* "Glowing" display

V1.2:
* Time now displayed in minutes and seconds
* Some minor bugs fixed

V1.1:
* Time and volume in display will be shown correctly when re-opening the dialog
* Bug removed that caused dialog to close automaticly

V1.0:
* Bug removed when switching from last track in playlist to the first or other way around
* Moved all scripts to a seperate folder

V0.99:
* First BETA
* Track will be shown in display after re-opening the dialog

V0.95:
* Optimised design
* Music keeps playing when dialog is re-opened

V0.9:
* First Version
我可以悬赏20个军贴跪求了
 楼主| 发表于 2014-4-26 00:17:46 | 显示全部楼层
我翻译了一些关键点的[添加你自己的音乐:
  添加你自己的音乐广播,你首先必须定义在description.ext。
  现在,您可以将其添加到电台使用的CLAY_RadioAddMusic变量:      
  CLAY_RadioAddMusic =[[<跟踪字符串| >、<标题字符串| >、<时间| >]];
  
  
  =你的音乐的类名,description.ext中定义。
  
  标题=的标题轨道,喜欢它将显示在收音机。
  
  时间=轨道的长度在几秒钟内。
  
  
  最后,它应该是这样的:
  
  
  CLAY_RadioAddMusic =[[“MySong01”、“我的歌1”,123],[“MySong02”、“我的歌2”,456]];        
  预定义的播放列表:
  您可以创建自己的播放列表,可以从任务开始(播放列表:自定义)。
  打开文件“\ userconfig \ CLAY_CarRadio \ CLAY_CarRadio.hpp”。现在你可以输入你想要追踪到_userPlaylist后面的数组。格式是一样的,当添加自己的音乐:
  
  
  _userPlaylist =[[“Track08_Harvest_Red”、“丰收红”,78],[“Track26_Organ_Works”、“器官”,69],[“MySong01”、“我的歌1”,123]];
  
  
  
  额外的工具类:
  您可以添加其他类型的车辆,汽车上的收音机。为此,您必须添加车辆名称(从CfgVehicles)“CLAY_RadioAddVehicles”变量。
  
  
  CLAY_RadioAddVehicles =[“M1A1”、“AH1Z”,“交换机”);
  
  
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


  车辆类型,收音机不可用:
  就像添加额外的车辆类型使用收音机,您可以定义车辆类型,它不会有可用的无线,使用“CLAY_RadioNoVehicles”变量。
  
  
  CLAY_RadioNoVehicles =[“SkodaRed”、“悍马”,“TowingTractor”);
  

  
  键盘控制:
  收音机的主要功能可以直接从你的键盘使用。为每一个函数可以定义的关键。
  
  默认值:
  
  暂停,播放/暂停
  
  右箭头——下一个轨道
  
  左箭头键——以前的跟踪
  
  向上箭头卷起来
  
  向下箭头-音量降低
  
  
  改变这些,打开文件“\ userconfig \ CLAY_CarRadio \ CLAY_CarRadio.hpp”。
  添加所需的关键数字背后的任何变量_keyPlay,_keyNext,_keyPre,_keyVolUp _keyVolDown。
  
  
  * * * * * * * * * * * * * * * * *


  
  已知的缺陷:
  *单击next(> >)或之前(< <)键非常快可能导致计时器不正常工作。
  *拖放&在播放列表编辑器只能添加跟踪自己的播放列表。你不能删除跟踪这种方式也可以你播放列表排序。(我工作在一个解决方案,但我不确定如果有可能的话)。
  
  
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *



  v2.3
  箭头musictracks *添加操作
  *添加跟踪从鹰翼运动(Arma2补丁1.05)
  *固定错误当离开播放列表编辑器通过取消按钮
  *汽车收音机现在发现模块(F7)
  *自定义图标
]就这些了,但我就是不知那个description文件要如何写,不知道格式与语句,还有要如何设置求大神伸手帮一把,先谢了
发表于 2014-4-26 00:33:02 | 显示全部楼层
本帖最后由 15117106121 于 2014-4-26 00:47 编辑

通过description.ext文件可以定义一些资源,你不写这个文件的话,那个插件只会调用AA2里面自带的音乐(其实是BIS定义好了)。

发表于 2014-4-26 00:34:07 | 显示全部楼层
本帖最后由 15117106121 于 2014-4-26 00:36 编辑

通过description.ext文件可以定义一些资源,你不写这个文件的话,那个插件只会调用AA2里面自带的音乐(其实是BIS定义好了)。

给你发个例子:

class CfgSounds {
sounds[] = {};

        class button_click {
                name = "";
                sound[] = {"dialogs\keypad_defuse\sounds\click.ogg", 0.8, 1};
                titles[] = {};
        };
        class button_close {
                name = "";
                sound[] = {"dialogs\keypad_defuse\sounds\close.ogg", 0.8, 1};
                titles[] = {};
        };
        class button_wrong {
                name = "";
                sound[] = {"dialogs\keypad_defuse\sounds\wrong.ogg", 0.8, 1};
                titles[] = {};
        };
        class wire_cut {
                name = "";
                sound[] = {"dialogs\keypad_defuse\sounds\cutting.ogg", 1, 1};
                titles[] = {};
        };
};

这样你就能在那个收音机插件里找到自己定义的歌曲了(click.ogg、cutting.ogg、wrong.ogg)。
当然这些音乐文件要按照路径放在你的任务文件夹里面。
这个可以一直到AA3里面的,把路径调用和对车辆的加载检测修改一下就好了。

祝你改的开心^_^
 楼主| 发表于 2014-4-26 01:04:16 | 显示全部楼层
麻烦哪位大哥帮我写一个符合他的要求的description文件以及如何调用和具体的设置
 楼主| 发表于 2014-4-26 01:13:36 | 显示全部楼层
我朋友给我的这个好像跟他的要求不符啊class CfgMusic

{
tracks[]={};
        class music1
        {
                name = "music1";
                     sound[] = {"\sound\music1.ogg", db+0, 1.0};
        };
};
 楼主| 发表于 2014-4-26 02:42:20 | 显示全部楼层
15117106121 发表于 2014-4-26 00:34
通过description.ext文件可以定义一些资源,你不写这个文件的话,那个插件只会调用AA2里面自带的音乐(其实 ...

可是大哥,他这个要求却是这样的,【CLAY_RadioAddMusic =[[“MySong01”、“我的歌1”,123],[“MySong02”、“我的歌2”,456]];        
  预定义的播放列表:
  您可以创建自己的播放列表,可以从任务开始(播放列表:自定义)】和你写的语句格式不一样,那你的这个会不会不能用到他那里啊?
 楼主| 发表于 2014-4-26 02:54:29 | 显示全部楼层
还有一个问题,你上面的这个脚本里面哪几处是可以任意改动为自定义歌曲名的啊,可以改动的地方是全部写一个同样的歌曲名呢还是要有不同的输入啊,最后在游戏中是否要用路点或者触发器的执行栏输入PLAYMUSIC或者是人物的初始栏输入PLAYMUSIC啊就是这两个最关键的问题麻烦大哥指点一下啊十分感谢你的关注与教导
发表于 2014-4-26 10:56:58 | 显示全部楼层
曾经沧海 发表于 2014-4-26 02:54
还有一个问题,你上面的这个脚本里面哪几处是可以任意改动为自定义歌曲名的啊,可以改动的地方是全部写一个 ...

我给你发的那个例子是基于任务底层的资源配置列表,有它才能给任务配置资源,你的那个插件也需要使用这个配置列表。
【CLAY_RadioAddMusic =[[“MySong01”、“我的歌1”,123],[“MySong02”、“我的歌2”,456]];     这个是播放器自己的定义,就好比你用“千千静听”时自己的播放列表,但前提是得让千千静听知道有这些歌、存储在哪里,这个就是description.ext文件的作用。
发表于 2014-4-26 11:01:12 | 显示全部楼层
“MySong01”就是你在description.ext定义的文件名,这个是唯一的。

“我的歌1”是列表里显示出来的名字,可以自定义。

 楼主| 发表于 2014-4-26 12:52:14 | 显示全部楼层
那大哥,他这句【
  CLAY_RadioAddMusic =[[“MySong01”、“我的歌1”,123],[“MySong02”、“我的歌2”,456]];  】要不要也加入到你那个脚本里啊,如果要加那要放在哪一个位置,还有在设好脚本后进游戏后在编辑器界面里还要不要我上面说的另两个问题中的在路点或者触发器的执行框或者人物的初 始栏输入PLAYMUSIC啊
 楼主| 发表于 2014-4-26 12:56:08 | 显示全部楼层
我分析一下是不是应该把他这句输入到路点或触发器的执行栏或者玩家的初始栏里?
 楼主| 发表于 2014-4-26 13:23:31 | 显示全部楼层
我的歌名要输入到你的那个脚本的哪个位置啊,我不是应该在任务文件夹新建一个名叫MUSIC的文件夹,然后把我自定义的也取了名字的OGG格式的歌曲文件丢进这个MUSIC里面吧?这时就有两个名字了,同时把你那个脚本也放到任务文件夹,但是我应该把我的那两个名字的哪一个输入到你的脚本里啊并且输入到你的脚本的哪个位置啊?
 楼主| 发表于 2014-4-26 18:23:14 | 显示全部楼层
@15117106121
 楼主| 发表于 2014-4-26 18:24:54 | 显示全部楼层
麻烦大哥指点一下我上面提到的那两个关键问题啊
您需要登录后才可以回帖 登录 | 加入VME

本版积分规则

小黑屋|中国虚拟军事网

GMT+8, 2024-5-31 06:34

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表