收起左侧

假如建筑物可以建造建筑物?

[复制链接]
こはね发表于 2021-11-14 22:41:52
建筑物打包?然后我们假设建筑物可以建造建筑物

假如建筑物可以建筑物?

假如建筑物可以建筑物?

假如建筑物可以建筑物?

假如建筑物可以建筑物?

一般情况下能想到建筑物打包大概有以下两种方法
tactics转换战术,利用战术控制移动速度,但是因为没办法制作gr2动画(你可以选择不要动画),所以算了。
command转换,按钮有限制,同时没有动作,也算了吧。

换位思考试一下建筑物建造建筑物。测试成功



こはね发表于 2021-11-14 23:00:34
只花了30分钟。

复制粘贴哨所与哨所马车,给哨所马车添加建筑的unittype,为了省事,将哨所的tactics直接改成哨所马车的tactics让其开启建造功能,好孩子千万不要模仿。

<Unit id ='429' name ='TestOutpost'>
<DBID>318</DBID>
<ObstructionRadiusX>2.0000</ObstructionRadiusX>
<ObstructionRadiusZ>2.0000</ObstructionRadiusZ>
<MaxVelocity>0.0000</MaxVelocity>
<MovementType>land</MovementType>
<AnimFile>buildings\outpost\outpost.xml</AnimFile>
<DeadReplacement>BuildingRubble2x2</DeadReplacement>
<DeadReplacementLifespan>15</DeadReplacementLifespan>
<ImpactType>Wood</ImpactType>
<PhysicsInfo>house</PhysicsInfo>
<PlacementFile>buildingsmall.xml</PlacementFile>
<Icon>buildings\outpost\outpost_icon_64x64</Icon>
<PortraitIcon>buildings\outpost\outpost_portrait</PortraitIcon>
<RolloverTextID>26306</RolloverTextID>
<ShortRolloverTextID>26305</ShortRolloverTextID>
<InitialHitpoints>2000.0000</InitialHitpoints>
<MaxHitpoints>2000.0000</MaxHitpoints>
<LOS>32.0000</LOS>
<ProjectileProtoUnit>Arrow</ProjectileProtoUnit>
<UnitAIType>RangedCombative</UnitAIType>
<BuildPoints>10.0000</BuildPoints>
<BuildLimit>7</BuildLimit>
<Bounty>70.0000</Bounty>
<BuildBounty>35.0000</BuildBounty>
<Cost resourcetype ='Wood'>250.0000</Cost>
<BuildingWorkRate>1.0000</BuildingWorkRate>
<MaxContained>20</MaxContained>
<AllowedAge>0</AllowedAge>
<Armor type ='Siege' value ='0.0000'></Armor>
<BuilderLimit>4</BuilderLimit>
<UnitType>LogicalTypeValidSabotage</UnitType>
<UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeBuildingsNotWalls</UnitType>
<UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeVillagersAttack</UnitType>
<UnitType>LogicalTypeHandUnitsAttack</UnitType>
<UnitType>LogicalTypeShipsAndBuildings</UnitType>
<UnitType>LogicalTypeRangedUnitsAttack</UnitType>
<UnitType>LogicalTypeBuildingsNotWallsOrGroves</UnitType>
<UnitType>LogicalTypeMinimapFilterMilitary</UnitType>
<UnitType>Building</UnitType>
<UnitType>BuildingClass</UnitType>
<UnitType>MilitaryBuilding</UnitType>
<UnitType>HasBountyValue</UnitType>
<UnitType>AbstractFort</UnitType>
<UnitType>CountsTowardMilitaryScore</UnitType>
<UnitType>ConvertsHerds</UnitType>
<Train row ='0' page ='6' column ='0'>TestOutpostWagon</Train>
<Tech row ='0' page ='1' column ='0'>FortifiedOutpost</Tech>
<Tech row ='0' page ='1' column ='0'>FrontierOutpost</Tech>
<Flag>AllowAutoGarrison</Flag>
<Flag>CollidesWithProjectiles</Flag>
<Flag>StartsAtFullEfficiency</Flag>
<Flag>Immoveable</Flag>
<Flag>NoBloodOnDeath</Flag>
<Flag>ObscuresUnits</Flag>
<Flag>NonAutoFormedUnit</Flag>
<Flag>Doppled</Flag>
<Flag>SelectWithObstruction</Flag>
<Flag>PaintTextureWhenPlacing</Flag>
<Flag>FlattenGround</Flag>
<Flag>HasGatherPoint</Flag>
<Flag>Tracked</Flag>
<Contain>ypDaimyoRegicide</Contain>
<Contain>xpMedicineManAztec</Contain>
<Contain>xpMedicineMan</Contain>
<Contain>Surgeon</Contain>
<Contain>Missionary</Contain>
<Contain>Priest</Contain>
<Contain>AbstractVillager</Contain>
<Contain>NatMedicineMan</Contain>
<Contain>Imam</Contain>
<Command page ='1' column ='1'>SetUnitAsHomeCityGatherPoint</Command>
<Command page ='10' column ='3'>Delete</Command>
<Command>CancelNativeDance</Command>
<Command>StartNativeDance</Command>
<Command page ='10' column ='2'>Eject</Command>
<Command page ='10' column ='1'>SetGatherPointEconomy</Command>
<Command page ='10' column ='0'>SetGatherPointMilitary</Command>
<Tactics>coveredwagon.tactics</Tactics>
<ProtoAction>
<Name>AntiShipAttack</Name>
<Damage>100.000000</Damage>
<DamageType>Siege</DamageType>
<MinRange>0.000000</MinRange>
<MaxRange>40.000000</MaxRange>
<ROF>3.000000</ROF>
<DamageBonus type ='AbstractSiegeTrooper'>0.500000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>CannonAttack</Name>
<Damage>60.000000</Damage>
<DamageType>Siege</DamageType>
<MinRange>0.000000</MinRange>
<MaxRange>24.000000</MaxRange>
<ROF>3.000000</ROF>
<DamageCap>120.000000</DamageCap>
<DamageBonus type ='AbstractVillager'>0.250000</DamageBonus>
<DamageArea>3.000000</DamageArea>
<DamageFlags>GAIAEnemy</DamageFlags>
<DamageBonus type ='AbstractCavalry'>1.500000</DamageBonus>
<DamageBonus type ='AbstractSiegeTrooper'>0.500000</DamageBonus>
<DamageBonus type ='AbstractLightInfantry'>1.500000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>RangedAttack</Name>
<Damage>30.000000</Damage>
<DamageType>Ranged</DamageType>
<MinRange>0.000000</MinRange>
<MaxRange>24.000000</MaxRange>
<ROF>3.000000</ROF>
<DamageBonus type ='AbstractVillager'>0.250000</DamageBonus>
<DamageBonus type ='AbstractCavalry'>1.500000</DamageBonus>
<DamageBonus type ='AbstractSiegeTrooper'>0.500000</DamageBonus>
<DamageBonus type ='AbstractLightInfantry'>1.500000</DamageBonus>
</ProtoAction>
</Unit>
<Unit id ='667' name ='TestOutpostWagon'>
<DBID>1026</DBID>
<ObstructionRadiusX>0.9900</ObstructionRadiusX>
<ObstructionRadiusZ>0.9900</ObstructionRadiusZ>
<FormationCategory>Protected</FormationCategory>
<MaxVelocity>4.0000</MaxVelocity>
<PlacementFile>buildingoutpost.xml</PlacementFile>
<MaxRunVelocity>6.0000</MaxRunVelocity>
<MovementType>land</MovementType>
<TurnRate>5.0000</TurnRate>
<AnimFile>supply_cart_outpost.xml</AnimFile>
<ImpactType>Wood</ImpactType>
<Icon>units\trade\outpost_wagon_icon_64x64</Icon>
<PortraitIcon>units\trade\outpost_wagon_portrait</PortraitIcon>
<RolloverTextID>41659</RolloverTextID>
<ShortRolloverTextID>41658</ShortRolloverTextID>
<InitialHitpoints>250.0000</InitialHitpoints>
<MaxHitpoints>250.0000</MaxHitpoints>
<LOS>18.0000</LOS>
<ProjectileProtoUnit>InvisibleProjectile</ProjectileProtoUnit>
<UnitAIType>Civilian</UnitAIType>
<TrainPoints>10.0000</TrainPoints>
<BuildPoints>10.0000</BuildPoints>
<Bounty>60.0000</Bounty>
<CarryCapacity resourcetype ='Food'>1.0000</CarryCapacity>
<CarryCapacity resourcetype ='Wood'>1.0000</CarryCapacity>
<CarryCapacity resourcetype ='Gold'>1.0000</CarryCapacity>
<AllowedAge>0</AllowedAge>
<Armor type ='Siege' value ='0.2000'></Armor>
<UnitType>Building</UnitType>
<UnitType>BuildingClass</UnitType>
<UnitType>MilitaryBuilding</UnitType>

<UnitType>LogicalTypeMinimapFilterEconomic</UnitType>
<UnitType>LogicalTypeHealed</UnitType>
<UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeGarrisonInShips</UnitType>
<UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeVillagersAttack</UnitType>
<UnitType>LogicalTypeHandUnitsAttack</UnitType>
<UnitType>LogicalTypeRangedUnitsAttack</UnitType>
<UnitType>HasBountyValue</UnitType>
<UnitType>ValidIdleVillager</UnitType>
<UnitType>CountsTowardEconomicScore</UnitType>
<UnitType>ConvertsHerds</UnitType>
<UnitType>AbstractWagon</UnitType>
<UnitType>CannotConvertHill</UnitType>
<UnitType>Unit</UnitType>
<UnitType>UnitClass</UnitType>
<UnitType>Economic</UnitType>
<Train row ='0' page ='6' column ='0'>TestOutpost</Train>
<Flag>CollidesWithProjectiles</Flag>
<Flag>ApplyHandicapTraining</Flag>
<Flag>CorpseDecays</Flag>
<Flag>ShowGarrisonButton</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<Flag>DeadReplacementWhenDestroyed</Flag>
<Flag>ConstrainOrientation</Flag>
<Flag>OrientUnitWithGround</Flag>
<Flag>PlaceAnywhereRules</Flag>
<Flag>Tracked</Flag>
<Command page ='10' column ='0'>Garrison</Command>
<Command page ='10' column ='1'>Stop</Command>
<Command page ='10' column ='2'>Delete</Command>
<Tactics>coveredwagon.tactics</Tactics>
<ProtoAction>
<Name>Build</Name>
<Rate type ='Outpost'>2.000000</Rate>
<Rate type ='Blockhouse'>2.000000</Rate>
<Rate type ='WarHut'>2.000000</Rate>
<Rate type ='YPOutpostAsian'>2.000000</Rate>
</ProtoAction>
</Unit>

然后再修改一下哨所马车的anim xml文件(复制哨所的建造过程,然后倒着加入马车那里)
supply_cart_outpost.xml
<?xml version="1.0" encoding="utf-8"?>

<animfile>
<definebone>bone_wheel03</definebone>
<definebone>bone_wheel04</definebone>
<attachment>
yoke
<include>units\trade\supply_cart\supply_cart_yoke.xml</include>
</attachment>
<component>
wagon
<linksection>
<linkoffset>0</linkoffset>
<linkcomponent>axel</linkcomponent>
<linkconstraint>0</linkconstraint>
</linksection>
<linksection>
<linkoffset>-2.6</linkoffset>
<linkcomponent>covered_wagon</linkcomponent>
<linkcomponent>driver</linkcomponent>
<linkcomponent>wagon_outpost_stuff</linkcomponent>
<linkconstraint>1</linkconstraint>
</linksection>

<logic type="BuildingCompletion">
<p0>
<assetreference type="GrannyModel">
<file>buildings\outpost\outpost_generic_con</file>
</assetreference>
</p0>
<p33>
<assetreference type="GrannyModel">
<file>buildings\constructions\2x2_stage2</file>
</assetreference>
</p33>
<p66>
<assetreference type="GrannyModel">
<file>buildings\constructions\2x2_stage1</file>
</assetreference>
</p66>
<p100>
<assetreference type="GrannyModel">
<file>units\trade\supply_cart\supply_cart_outpost</file>
</assetreference>
</p100>
</logic>

<decal>
<effecttype>default</effecttype>
<texture>shadows_selections\shadow_circle_128x128</texture>
<selectedtexture>shadows_selections\selection_oval_32x64</selectedtexture>
<width>2.00</width>
<height>4.00</height>
</decal>
<attach a="yoke" frombone="MASTER" tobone="MASTER" syncanims="1"/>
</component>
<anim>
Idle
<assetreference type="GrannyAnim">
<file>units\trade\supply_cart\supply_cart_idle</file>
</assetreference>
<component>wagon</component>
</anim>
<anim>
Walk
<assetreference type="GrannyAnim">
<file>units\trade\supply_cart\supply_cart_walk</file>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof1">0.14</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof2">0.26</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof3">0.38</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof4">0.51</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof1">0.64</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof2">0.77</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof3">0.90</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="HorseHoof4">0.03</tag>
</assetreference>
<component>wagon</component>
</anim>
<anim>
Death
<assetreference type="GrannyAnim">
<file>animation_library\wagon\wagon_death</file>
<tag type="SpecificSoundSet" checkvisible="1" set="RagdollImpact">0.50</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="CartBreak">0.03</tag>
<tag type="SpecificSoundSet" checkvisible="1" set="Thud">0.04</tag>
</assetreference>
<component>wagon</component>
</anim>
</animfile>

juseser发表于 2021-11-16 14:05:03
等一个假如建筑可以移动
こはね发表于 2021-11-17 00:21:48
juseser 发表于 2021-11-16 14:05
等一个假如建筑可以移动

马车添加了<unittype>Building</unittype>已经成为了建筑物,所以建筑物是可以移动的
逆苍岚发表于 2021-12-16 19:50:28
juseser 发表于 2021-11-16 14:05
等一个假如建筑可以移动

自由之战埃及可以达到这种效果,可以翻代码看看
万灵归宗发表于 2022-11-9 15:29:40
妙哇!
跳转到