收起左侧

[教程] 教你如何设计出掷弹热气球?

 关闭 [复制链接]
我就是阿佑发表于 2013-11-16 21:14:00
185726q2k2ce9mckajapka.jpg

准备工具:ArchiveViewer,FileConverter(修改党必备工具,没有的可以去下载aoe3edit工具)
第一步:打开ArchiveViewer,选择file---然后open,在出现的界面里选中帝国3安装目录下的art文件夹,选择Art5.bar打开
第二步,在ArchiveViewer底下的输入栏里输入units\balloons\advanced_balloon.xml,会出现一个units\balloons\advanced_balloon.xml.xmb的文件(这个是高级热气球调用的外型资料),点击选中
第三步,选择extract中的selected files,将目录选为你的帝国3安装目录,比如你的游戏安在d:\aoe3里,你就选择d盘下的aoe3文件夹,点击确定
第四步,回到游戏安装目录下的art文件夹,发现多出来了一个units文件夹,打开找到advanced_balloon.xml.xmb文件,用FileConverter打开这个xmb文件
第五步,将新生成的units\balloons\advanced_balloon.xml文件用记事本打开,我来解释一下具体内容,从<component>到</component>之间我们看到的是ModelComp,是高等热气球的模型设定,再往下会看到有并列的几个anim,这里是高等热气球的显示和动作设定,有Idle,Walk,Death,Bored,前面不解释,我就说一下Bored,从字面上大致可以理解成无聊时的动作显示,就是当这个单位长时间没有执行命令时会做出的相应动作
我就是阿佑发表于 2013-11-16 21:15:00
勿插楼,继续,谢谢合作
我就是阿佑发表于 2013-11-16 21:20:00
我们可以看到高等热气球是没有任何攻击动作的,添加新的动作很困难,但是我们可以对其原有动作重新定义,或者排列组合。在游戏中,高等热气球的Bored动作显示为气球中的士兵左右移动,有双手的来回晃动,这就好办了
我就是阿佑发表于 2013-11-16 21:27:00
<anim>
RangedAttack
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_bored</file>
<tag type="Attack">0.50</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="GrenadeLight">0.19</tag>
</assetreference>
<component>ModelComp</component>
</anim>
这样,我们就给热气球添加了一个远距攻击动作,可以看到调用的仍然是Bored时的动作,下面的设定是起手时间和攻击时发出的声音,设定为掷弹的声音效果
我就是阿佑发表于 2013-11-16 21:30:00
这样就会产生一个问题,热气球在攻击时士兵一直移动,但是掷弹这个动作会跟不上节奏,不协调啊?
我就是阿佑发表于 2013-11-16 21:39:00
我们可以再给它加上一个动作
<anim>
Ranged_reload
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_idle</file>
</assetreference>
<component>ModelComp</component>
</anim>
调用的是Idle下的原有资料,那么这个reload到底什么意思呢?举个例子,鄂图曼炮兵AbusGun,在游戏中我们可以看到,他在攻击时发射之后会有一个装填炮弹的动作然后再发射,再装填,再发射......现在明白什么意思了吧?加上这个动作之后,热气球攻击时的画面就能协调了
我就是阿佑发表于 2013-11-16 21:44:00
还没完,我们继续对热气球做些创新,游戏中我们知道有手榴弹、迫击炮弹、加农炮弹、火箭弹......等等,但你有注意过炸药包的存在吗?没错,我们就是要让他扔炸药包!
我就是阿佑发表于 2013-11-16 21:48:00
这个需要改发射物,后面会讲到。我们先来完善其动作显示
<attachment>
dynamite
<component>
dynamite
<assetreference type="GrannyModel">
<file>effects\projectiles\dynamite</file>
</assetreference>
</component>
<anim>
Idle
<component>dynamite</component>
</anim>
<anim>
RangedAttack
<assetreference type="GrannyAnim">
<file>units\spc\miner\dynamite_attack</file>
</assetreference>
<component>dynamite</component>
</anim>
</attachment>
这是添加的附属物——炸药包
我就是阿佑发表于 2013-11-16 21:50:00
这些attachment可以添加到最上方,但要在之内
我就是阿佑发表于 2013-11-16 21:54:00
继续添加
<attachment>
fusesmoke
<component>
fusesmoke
<assetreference type="ParticleSystem">
<file>effects\spc\fusesmoke.particle</file>
</assetreference>
</component>
<anim>
None
<component>fusesmoke</component>
</anim>
</attachment>
这个是对炸药包烟雾效果的设定
我就是阿佑发表于 2013-11-16 21:58:00
添加了附属物之后,我们要对其攻击动作重新设定一下,回到RangedAttack
<anim>
RangedAttack
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_bored</file>
<tag type="Attack">0.50</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="GrenadeLight">0.19</tag>
</assetreference>
<component>ModelComp</component>
<attach a="dynamite" frombone="bone_fuse" tobone="bone_fuse" syncanims="1"/>
<attach a="fusesparks" frombone="bone_fuse" tobone="bone_fuse" syncanims="0"/>
<attach a="fusesmoke" frombone="bone_fuse" tobone="bone_fuse" syncanims="0"/>
</anim>
下面的三项是附加内容
我就是阿佑发表于 2013-11-16 22:07:00
这样,高等热气球的模型就被重新定义成了掷弹热气球,要想热气球在游戏中能够攻击作战,还要建立相应的tactics文件,修改党应该明白tactics文件是对单位攻击动作的调取和战术模式的定义
我就是阿佑发表于 2013-11-16 22:11:00
高等热气球本来是没有对应tactics文件的,我们需要新建一个
我就是阿佑发表于 2013-11-16 22:30:00
第一步:打开ArchiveViewer,选择file---然后open,在出现的界面里选中帝国3安装目录下的data文件夹,选择Data3.bar打开
第二步,在ArchiveViewer底下的输入栏里输入archer.tactics,会出现一个Data\tactics\archer.tactics.xmb的文件(这个是弓兵调用的tactics,我们只是借用,你也可以选择其他的),点击选中
第三步,选择extract中的selected files,将目录选为你的帝国3安装目录,比如你的游戏安在d:\aoe3里,你就选择d盘下的aoe3文件夹,点击确定
第四步,回到游戏安装目录下的data文件夹,发现多出来了一个tactics文件夹,打开找到archer.tactics.xmb文件,用FileConverter打开这个xmb文件
第五步,将新生成的archer.tactics文件重命名为GrenadierBalloon.tactics,也可以自己命名,但不要与原有的tactics文件重复。用记事本打开,删除里面所有内容
我就是阿佑发表于 2013-11-16 22:37:00
可以看到,GrenadeAttack这项动作下
<projectile≫Dynamite</projectile≫
<impacteffect≫effects\impacts\dynamite</impacteffect≫
发射物为Dynamite(炸药)
<impactforcemin≫550.0</impactforcemin≫
<impactforcemax≫750.0</impactforcemax≫
<impactlaunchangle≫50.0</impactlaunchangle≫
<areasortmode≫Radial</areasortmode≫
<areasortmode≫Radial</areasortmode≫
<targetground≫1</targetground≫
<basedamagecap≫1</basedamagecap≫
攻击动作下,这些设定是干嘛的呢?注意这个单词Radial,没错,是对辐射效果的设定,到游戏中就可以看到震撼的爆炸效果
我就是阿佑发表于 2013-11-16 22:41:00
在xml和tactics这两个文件完成之后,我们要打开data文件夹下的protoy文件,做最后一步的设定,这项对修改党来说是最基本的了
我就是阿佑发表于 2013-11-16 22:49:00
用记事本打开protoy.xml,在protoy中点击编辑——查找,在查找内容中输入xpAdvancedBalloon,点击查找下一个,就会找到这样的内容,这行向下就是高等热气球调用的各项资料
风来时狂放发表于 2013-11-16 22:56:00
居然不是坟
和你相伴1发表于 2013-11-16 22:57:00
真乃大神也
我就是阿佑发表于 2013-11-16 23:06:00
<?xml version="1.0" encoding="utf-8"?>

<tactics>
<action>
<name stringid="38133">GrenadeAttack</name>
<type>Attack</type>
<attackaction>1</attackaction>
<rangedlogic>1</rangedlogic>
<reloadanim>Ranged_reload</reloadanim>
<anim>RangedAttack</anim>
<accuracy>0.9</accuracy>
<accuracyreductionfactor>2</accuracyreductionfactor>
<aimbonus>0</aimbonus>
<maxspread>5</maxspread>
<spreadfactor>0.25</spreadfactor>
<trackrating>12</trackrating>
<unintentionaldamagemultiplier>1.0</unintentionaldamagemultiplier>
<projectile>Dynamite</projectile>
<impacteffect>effects\impacts\dynamite</impacteffect>
<minrange>0</minrange>
<rate type="Unit">1.0 </rate>
<throw>1</throw>
<impactforcemin>550.0</impactforcemin>
<impactforcemax>750.0</impactforcemax>
<impactlaunchangle>50.0</impactlaunchangle>
<areasortmode>Radial</areasortmode>
<areasortmode>Radial</areasortmode>
<targetground>1</targetground>
<basedamagecap>1</basedamagecap>
</action>
<action>
<name stringid="38118">BuildingAttack</name>
<type>Attack</type>
<attackaction>1</attackaction>
<rangedlogic>1</rangedlogic>
<reloadanim>Ranged_reload</reloadanim>
<anim>RangedAttack</anim>
<accuracy>0.9</accuracy>
<accuracyreductionfactor>2</accuracyreductionfactor>
<aimbonus>0</aimbonus>
<maxspread>5</maxspread>
<spreadfactor>0.25</spreadfactor>
<trackrating>12</trackrating>
<unintentionaldamagemultiplier>1.0</unintentionaldamagemultiplier>
<projectile>Dynamite</projectile>
<impacteffect>effects\impacts\dynamite</impacteffect>
<rate type="LogicalTypeShipsAndBuildings">1.0 </rate>
<throw>1</throw>
<impactforcemin>550.0</impactforcemin>
<impactforcemax>750.0</impactforcemax>
<impactlaunchangle>50.0</impactlaunchangle>
<areasortmode>Radial</areasortmode>
<areasortmode>Radial</areasortmode>
<targetground>1</targetground>
<basedamagecap>1</basedamagecap>
</action>
<tactic>
Volley
<action priority="100">GrenadeAttack</action>
<action priority="75">BuildingAttack</action>
<attacktype>LogicalTypeRangedUnitsAttack</attacktype>
<autoattacktype>LogicalTypeRangedUnitsAutoAttack</autoattacktype>
<attackresponsetype>LogicalTypeRangedUnitsAttack</attackresponsetype>
<runaway>0</runaway>
<autoretarget>1</autoretarget>
<idleanim>Idle</idleanim>
<boredanim>Bored</boredanim>
<deathanim>Death</deathanim>
<walkanim>Walk</walkanim>
</tactic>
<tactic>
Stagger
<action priority="100">GrenadeAttack</action>
<action priority="75">BuildingAttack</action>
<attacktype>LogicalTypeRangedUnitsAttack</attacktype>
<autoattacktype>LogicalTypeRangedUnitsAutoAttack</autoattacktype>
<attackresponsetype>LogicalTypeRangedUnitsAttack</attackresponsetype>
<runaway>0</runaway>
<autoretarget>1</autoretarget>
<idleanim>Idle</idleanim>
<boredanim>Bored</boredanim>
<deathanim>Death</deathanim>
<walkanim>Walk</walkanim>
</tactic>
<tactic>
Defend
<action priority="100">GrenadeAttack</action>
<action priority="75">BuildingAttack</action>
<attacktype>LogicalTypeRangedUnitsAttack</attacktype>
<autoattacktype>LogicalTypeRangedUnitsAutoAttack</autoattacktype>
<attackresponsetype>LogicalTypeRangedUnitsAttack</attackresponsetype>
<runaway>1</runaway>
<autoretarget>1</autoretarget>
<idleanim>Idle</idleanim>
<boredanim>Bored</boredanim>
<deathanim>Death</deathanim>
<walkanim>Walk</walkanim>
</tactic>
</tactics>
这个是tactics文件内容,漏楼,这里补充
我就是阿佑发表于 2013-11-16 23:08:00
<?xml version="1.0" encoding="utf-8"?>

<animfile>
<definebone>Bip01 Prop1</definebone>
<definebone>bone_dynamite</definebone>
<definebone>Bip01 Prop2</definebone>
<definebone>bone_fuse</definebone>
<attachment>
dynamite
<component>
dynamite
<assetreference type="GrannyModel">
<file>effects\projectiles\dynamite</file>
</assetreference>
</component>
<anim>
Idle
<component>dynamite</component>
</anim>
<anim>
RangedAttack
<assetreference type="GrannyAnim">
<file>units\spc\miner\dynamite_attack</file>
</assetreference>
<component>dynamite</component>
</anim>
</attachment>
<attachment>
fusesparks
<component>
fusesparks
<assetreference type="ParticleSystem">
<file>effects\spc\fusesparks.particle</file>
</assetreference>
</component>
<anim>
None
<component>fusesparks</component>
</anim>
</attachment>
<attachment>
fusesmoke
<component>
fusesmoke
<assetreference type="ParticleSystem">
<file>effects\spc\fusesmoke.particle</file>
</assetreference>
</component>
<anim>
None
<component>fusesmoke</component>
</anim>
</attachment>
<component>
ModelComp
<assetreference type="GrannyModel">
<file>units\balloons\balloon_advanced</file>
</assetreference>
<decal>
<effecttype>default</effecttype>
<texture isfakeshadow="1">shadows_selections\shadow_circle_32x32</texture>
<selectedtexture>shadows_selections\selection_circle_64x64</selectedtexture>
<width>5.00</width>
<height>5.00</height>
</decal>
</component>
<anim>
Idle
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_idle</file>
</assetreference>
<component>ModelComp</component>
</anim>
<anim>
Walk
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_idle</file>
</assetreference>
<component>ModelComp</component>
</anim>
<anim>
Death
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_death</file>
<tag type="SpecificSoundSet" checkvisible="1" set="CannonImpactFlesh">0.52</tag>
</assetreference>
<component>ModelComp</component>
</anim>
<anim>
Bored
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_idle</file>
</assetreference>
<component>ModelComp</component>
</anim>
<anim>
Ranged_reload
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_idle</file>
</assetreference>
<component>ModelComp</component>
</anim>
<anim>
RangedAttack
<assetreference type="GrannyAnim">
<file>units\balloons\balloon_bored</file>
<tag type="Attack">0.50</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="GrenadeLight">0.19</tag>
</assetreference>
<component>ModelComp</component>
<attach a="dynamite" frombone="bone_fuse" tobone="bone_fuse" syncanims="1"/>
<attach a="fusesparks" frombone="bone_fuse" tobone="bone_fuse" syncanims="0"/>
<attach a="fusesmoke" frombone="bone_fuse" tobone="bone_fuse" syncanims="0"/>
</anim>
</animfile>
这个是xml文件内容,漏楼,这里补充
我就是阿佑发表于 2013-11-17 00:00:00
<Unit id ='859' name ='xpAdvancedBalloon'>

<DBID>1265</DBID>

<DisplayNameID>46799</DisplayNameID>
<ObstructionRadiusX>2.0000</ObstructionRadiusX>
<ObstructionRadiusZ>2.0000</ObstructionRadiusZ>
<MaxVelocity>2.0000</MaxVelocity>
<MaxRunVelocity>3.5000</MaxRunVelocity>
<MovementType>air</MovementType>
<TurnRate>8.0000</TurnRate>
<AnimFile>units\balloons\advanced_balloon.xml</AnimFile>
<ImpactType>Wood</ImpactType>
<Icon>units\balloons\hot_air_balloon</Icon>
<PortraitIcon>units\balloons\hot_air_balloon_portrait</PortraitIcon>
<RolloverTextID>46798</RolloverTextID>
<ShortRolloverTextID>46797</ShortRolloverTextID>
<InitialHitpoints>240.0000</InitialHitpoints>
<MaxHitpoints>240.0000</MaxHitpoints>
<LOS>30.0000</LOS>
<ProjectileProtoUnit>Dynamite</ProjectileProtoUnit>
<AutoAttackRange>16.0000</AutoAttackRange>
<UnitAIType>RangedCombative</UnitAIType>
<AllowedAge>0</AllowedAge>

<Armor type ='Ranged' value ='0.1000'></Armor>
<UnitType>LogicalTypeMinimapFilterMilitary</UnitType>
<UnitType>LogicalTypeEasySelectAvoid</UnitType>
<UnitType>LogicalTypeHealed</UnitType>
<UnitType>LogicalTypeScout</UnitType>
<UnitType>LogicalTypeValidSPCUnitsDeadCondition</UnitType>

<UnitType>LogicalTypeValidSharpshoot</UnitType>

<UnitType>LogicalTypeNeededForVictory</UnitType>
<UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeGarrisonInShips</UnitType>

<UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>

<UnitType>LogicalTypeVillagersAttack</UnitType>
<UnitType>LogicalTypeHandUnitsAttack</UnitType>
<UnitType>LogicalTypeRangedUnitsAttack</UnitType>
<UnitType>Unit</UnitType>

<UnitType>UnitClass</UnitType>
<UnitType>Military</UnitType>
<UnitType>Ranged</UnitType>
<UnitType>HasBountyValue</UnitType>
<UnitType>CountsTowardMilitaryScore</UnitType>

<UnitType>ConvertsHerds</UnitType>
<Flag>CollidesWithProjectiles</Flag>

<Flag>ApplyHandicapTraining</Flag>
<Flag>CorpseDecays</Flag>
<Flag>ShowGarrisonButton</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<Flag>Tracked</Flag>
<Flag>VisibleUnderFogIfGaia</Flag>

<Command page ='10' column ='1'>Stop</Command>

<Command page ='10' column ='0'>Garrison</Command>
<Command page ='10' column ='2'>Delete</Command>
<Tactics>GrenadierBalloon.tactics</Tactics>
<ProtoAction>

<Name>BuildingAttack</Name>
<Damage>30.000000</Damage>
<DamageType>Siege</DamageType>
<MaxRange>16.000000</MaxRange>
<ROF>6.000000</ROF>
</ProtoAction>
<ProtoAction>

<Name>GrenadeAttack</Name>
<Damage>50.000000</Damage>
<DamageType>Siege</DamageType>
<MaxRange>16.000000</MaxRange>
<ROF>6.000000</ROF>
<DamageCap>120.000000</DamageCap>
<DamageArea>5.000000</DamageArea>
<DamageFlags>GAIAEnemy</DamageFlags>
</ProtoAction>
这个是protoy中对掷弹热气球的属性和参数设定,也可以自己适当改动
风男人1984发表于 2013-11-17 08:21:00
跪了
123456823发表于 2013-11-17 08:54:00
这是极好的,真乃大神也。
掘金入眠刈发表于 2013-11-17 10:53:00
此大神也
Aim_yuan发表于 2013-11-17 11:09:00
西怎么出热气球
——来自 爱贴吧 Windows Phone 客户端
我是的十八簿发表于 2013-11-17 11:10:00
来看
跳转到