收起左侧

关于帝国3的xxxxx_snds.xml定义单位语音

[复制链接]
こはね发表于 2020-1-22 15:36:17
如果你修改过帝国3,你应该会发现在sound文件夹里面的SoundXML.bar、SoundXML2.bar、SoundXML3.bar中有七八百个xxxxx_snds.xml用来定义单位语音;其实不需要每个单位都创建一个xml,事实上只需要一个xml就足够了。

像protoy.xml、techtreey.xml那样,将<protounit name='xxxxx'>...</protounit>合在一起就可以了(全部放在<protounitsounddef>...</protounitsounddef>里面)

例如下面就是定义几十个单位的语音(将几十个文件合在一起了)






















  KafuuChino_snds.xml- 记事本

__


X



文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)





<?xml version="1.0" encoding="utf-8"?>

<protounitsounddef>
<protounit name='KafuuChino'>
<soundtype name='Select'>
<soundset name='ChinoSelect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='ChinoGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='ChinoDeath'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='ChinoRevived'/>
</soundtype>
<soundtype name='Acknowledge'>
<targetlogic>
<choice name='default'>
<soundset name='ChinoAcknowledge'/>
</choice>
<choice name='enemy'>
<soundset name='ChinoAttack'/>
</choice>
<!--
<choice name='build'/>
<choice name='Huntable'/>
<choice name='Tree'/>
<choice name='AbstractMine'/>
<choice name='AbstractFarm'/>
<choice name='AbstractResourceCrate'/>
<choice name='AbstractFruit'/>
-->
</targetlogic>
</soundtype>
<soundtype name='Claim'>
<soundset name='ChinoClaim'/>
</soundtype>
<soundtype name='KnockOut'>
<soundset name='ChinoDisabled'/>
</soundtype>
<soundtype name='KnockOutRevived'>
<soundset name='ChinoRevived2'/>
</soundtype>
</protounit>

<protounit name='LightHouse'>
<soundtype name='Select'>
<soundset name='UI_Building_Economic'/>
</soundtype>
<soundtype name='Death'>
<soundset name='BuildingDestruction'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='UI_Building_Economic'/>
</soundtype>
</protounit>

<protounit name='SkyPassage'>
<soundtype name='Select'>
<soundset name='UI_Building_Economic'/>
</soundtype>
<soundtype name='Death'>
<soundset name='BuildingDestruction'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='UI_Building_Economic'/>
</soundtype>
</protounit>

<ProtoUnit name ='PlentyVault'>
<soundtype name='Creation'>
<soundset name='PlentyBirth'/>
</soundtype>
<SoundType name ='Select'>
<SoundSet name ='PlentyBirth'></SoundSet>
</SoundType>
<SoundType name ='Exists'>
<SoundSet name ='PlentyExist'></SoundSet>
</SoundType>
</ProtoUnit>

<protounit name='Temple'>
<soundtype name='Select'>
<soundset name='UI_Building_Military'/>
</soundtype>
<soundtype name='Death'>
<soundset name='BuildingDestruction'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='UI_Building_Military'/>
</soundtype>
</protounit>

<protounit name='TempleGold'>
<soundtype name='Select'>
<soundset name='UI_Building_Military'/>
</soundtype>
<soundtype name='Death'>
<soundset name='BuildingDestruction'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='UI_Building_Military'/>
</soundtype>
</protounit>

<protounit name='Earthquake1'>
<soundtype name='Exists'>
<soundset name='EarthQuakee'/>
</soundtype>
</protounit>
<protounit name='Earthquake2'>
<soundtype name='Exists'>
<soundset name='EarthQuakee'/>
</soundtype>
</protounit>
<protounit name='AtlanteanFort'>
<soundtype name='Select'>
<soundset name='Wonder'/>
</soundtype>
<soundtype name='Death'>
<soundset name='WonderDeath'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='Wonder'/>
</soundtype>
</protounit>
<protounit name='Pig'>
<soundtype name='Select'>
<soundset name='PigSelect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='PigGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='PigDeath'/>
</soundtype>
<soundtype name='Acknowledge'>
<soundset name='PigAcknowledge'/>
</soundtype>
<SoundType name ='Ambient'>
<SoundSet name ='PigAmbient'></SoundSet>
</SoundType>
</protounit>
<protounit name='Tornado'>
<soundtype name='Death'>
<soundset name='TornadoDeath'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='TornadoBirth'/>
</soundtype>
<soundtype name='Exists'>
<soundset name='TornadoExist'/>
</soundtype>
</protounit>
<protounit name='Tornado2'>
<soundtype name='Death'>
<soundset name='TornadoDeath'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='TornadoBirth'/>
</soundtype>
<soundtype name='Exists'>
<soundset name='TornadoExist'/>
</soundtype>
</protounit>
<protounit name='TornadoLifespan20'>
<soundtype name='Death'>
<soundset name='TornadoDeath'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='TornadoBirth'/>
</soundtype>
<soundtype name='Exists'>
<soundset name='TornadoExist'/>
</soundtype>
</protounit>
<protounit name='Kastor'>
<soundtype name='Select'>
<soundset name='KastorSelect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='KastorGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='KastorDie'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='HeroBirth'/>
</soundtype>
<soundtype name='Acknowledge'>
<targetlogic>
<choice name='default'>
<soundset name='KastorMove'/>
</choice>
<choice name='enemy'>
<soundset name='KastorAttack'/>
</choice>
<!--
<choice name='build'/>
<choice name='Huntable'/>
<choice name='Tree'/>
<choice name='AbstractMine'/>
<choice name='AbstractFarm'/>
<choice name='AbstractResourceCrate'/>
<choice name='AbstractFruit'/>
-->
</targetlogic>
</soundtype>
<soundtype name='Claim'>
<soundset name='HeroRevived'/>
</soundtype>
<soundtype name='KnockOut'>
<soundset name='KastorGrunt'/>
</soundtype>
<soundtype name='KnockOutRevived'>
<soundset name='HeroRevived'/>
</soundtype>
</protounit>
<protounit name='ArkantosGod'>
<soundtype name='Select'>
<soundset name='ArkantosSelect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='ArkantosGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='ArkantosDie'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='ArkantosArrive'/>
</soundtype>
<soundtype name='Acknowledge'>
<targetlogic>
<choice name='default'>
<soundset name='ArkantosMove'/>
</choice>
<choice name='enemy'>
<soundset name='ArkantosAttack'/>
</choice>
<!--
<choice name='build'/>
<choice name='Huntable'/>
<choice name='Tree'/>
<choice name='AbstractMine'/>
<choice name='AbstractFarm'/>
<choice name='AbstractResourceCrate'/>
<choice name='AbstractFruit'/>
-->
</targetlogic>
</soundtype>
<soundtype name='Claim'>
<soundset name='HeroRevived'/>
</soundtype>
<soundtype name='KnockOut'>
<soundset name='ArkantosGrunt'/>
</soundtype>
<soundtype name='KnockOutRevived'>
<soundset name='HeroRevived'/>
</soundtype>
</protounit>
<protounit name='Arkantos'>
<soundtype name='Select'>
<soundset name='ArkantosSelect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='ArkantosGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='ArkantosDie'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='ArkantosArrive'/>
</soundtype>
<soundtype name='Acknowledge'>
<targetlogic>
<choice name='default'>
<soundset name='ArkantosMove'/>
</choice>
<choice name='enemy'>
<soundset name='ArkantosAttack'/>
</choice>
<!--
<choice name='build'/>
<choice name='Huntable'/>
<choice name='Tree'/>
<choice name='AbstractMine'/>
<choice name='AbstractFarm'/>
<choice name='AbstractResourceCrate'/>
<choice name='AbstractFruit'/>
-->
</targetlogic>
</soundtype>
<soundtype name='Claim'>
<soundset name='HeroRevived'/>
</soundtype>
<soundtype name='KnockOut'>
<soundset name='ArkantosGrunt'/>
</soundtype>
<soundtype name='KnockOutRevived'>
<soundset name='HeroRevived'/>
</soundtype>
</protounit>
<protounit name='TiTanBird'>
<soundtype name='Select'>
<soundset name='birdtitanselect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='birdtitanGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='birdtitanDie'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='birdtitanbirth'/>
</soundtype>
<soundtype name='Acknowledge'>
<targetlogic>
<choice name='default'>
<soundset name='birdtitanMove'/>
</choice>
<choice name='enemy'>
<soundset name='birdtitanselect'/>
</choice>
</targetlogic>
</soundtype>
</protounit>
</protounitsounddef>

こはね发表于 2020-1-22 16:22:56

例如这里有两个定义单位语音的xml
























  Pig_snds.xml - 记事本

__


X



文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)





<?xml version="1.0" encoding="utf-8"?>

<protounitsounddef>
<protounit name='Pig'>
<soundtype name='Select'>
<soundset name='PigSelect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='PigGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='PigDeath'/>
</soundtype>
<soundtype name='Acknowledge'>
<soundset name='PigAcknowledge'/>
</soundtype>
<SoundType name ='Ambient'>
<SoundSet name ='PigAmbient'></SoundSet>
</SoundType>
</protounit>
</protounitsounddef>
























  Tornado_snds.xml - 记事本

__


X



文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)





<?xml version="1.0" encoding="utf-8"?>

<protounitsounddef>
<protounit name='Tornado'>
<soundtype name='Death'>
<soundset name='TornadoDeath'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='TornadoBirth'/>
</soundtype>
<soundtype name='Exists'>
<soundset name='TornadoExist'/>
</soundtype>
</protounit>
</protounitsounddef>



接下来我要将这两个合在一起
























  Pig_snds.xml - 记事本

__


X



文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)





<?xml version="1.0" encoding="utf-8"?>

<protounitsounddef>
<protounit name='Pig'>
<soundtype name='Select'>
<soundset name='PigSelect'/>
</soundtype>
<soundtype name='Grunt'>
<soundset name='PigGrunt'/>
</soundtype>
<soundtype name='Death'>
<soundset name='PigDeath'/>
</soundtype>
<soundtype name='Acknowledge'>
<soundset name='PigAcknowledge'/>
</soundtype>
<SoundType name ='Ambient'>
<SoundSet name ='PigAmbient'></SoundSet>
</SoundType>
</protounit>

<protounit name='Tornado'>
<soundtype name='Death'>
<soundset name='TornadoDeath'/>
</soundtype>
<soundtype name='Creation'>
<soundset name='TornadoBirth'/>
</soundtype>
<soundtype name='Exists'>
<soundset name='TornadoExist'/>
</soundtype>
</protounit>
</protounitsounddef>

沉默以对发表于 2020-1-23 13:11:00
之前有想过这样,没想到真的可以
跳转到