请选择 进入手机版 | 继续访问电脑版
跳转到:
打印 上一主题 下一主题

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

[复制链接]
LV20 ????

三好萌新

阅读权限
255
积分
20535
食物
1800
木材
1036
钱币
1439
茶叶
130
钻石
824
经验
7857

幸运勋章

QQ
跳转到指定楼层
楼主
发表于 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>
你们要相信我,我真的是萌新。
LV20 ????

三好萌新

阅读权限
255
积分
20535
食物
1800
木材
1036
钱币
1439
茶叶
130
钻石
824
经验
7857

幸运勋章

QQ
沙发
 楼主| 发表于 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>
回复
你们要相信我,我真的是萌新。
LV1 新兵

阅读权限
10
积分
36
食物
7
木材
3
钱币
1
茶叶
0
钻石
0
经验
33
板凳
发表于 2020-1-23 13:11:00 | 只看该作者
之前有想过这样,没想到真的可以
回复
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Google广告[已验证邮箱用户无广告]