限制建筑只能在某单位(地基)上建造
类似贸易站那种只能建造在贸易站地点那种效果,将建筑物放置在指定单位或建筑物上面,然后建造好原有的单位或建筑物(地基)就会消失,当建筑物被摧毁后,地基重新出现;制作这个很简单,只需要改一下protoy.xml添加3个语句;不过一般人弄不出来这种效果,因为这个是几个flag与某个特殊语句一起混用的,不用几个小时慢慢删减、慢慢增加语句去测试的话根本找不出来。
设定地基需要满足下列三个条件:
- 建筑物添加<SocketUnitType>xxxxxx</SocketUnitType>;其中xxxxxx为地基的调用名
- 建筑物添加因环境自动旋转;即为添加<Flag>SnapPlacement</Flag>
- 地基强制设定为大自然,即为添加<Flag>ForceToGaia</Flag>
以下面两个建筑为例,将SkyPassage改成地基,LightHouse必须建造在SkyPassage上面。
(SkyPassage添加
<Flag>ForceToGaia
</Flag>)
|
protoy.xml - 记事本 ---(SkyPassage) |
____ |
□ |
X |
|
|
文件(F) 编辑(E) 格式(O) 查看(V) 帮助(H) |
|
|
|
|
|
<Unit id='293' name='SkyPassage'> <DBID>15</DBID> <DisplayNameID>09924</DisplayNameID> <EditorNameID>09923</EditorNameID> <ObstructionRadiusX>2.8000</ObstructionRadiusX> <ObstructionRadiusZ>2.8000</ObstructionRadiusZ> <MaxVelocity>0.0000</MaxVelocity> <MovementType>land</MovementType> <AnimFile>Age of Mythology\Building\SkyPassage\SkyPassage.xml</AnimFile> <ImpactType>Wood</ImpactType> <PhysicsInfo>house</PhysicsInfo> <PlacementFile>buildingsmall.xml</PlacementFile> <Icon>Age of Mythology\Building\SkyPassage\SkyPassage_icon_64</Icon> <PortraitIcon>Age of Mythology\Building\SkyPassage\SkyPassage_icon_128</PortraitIcon> <RolloverTextID>09923</RolloverTextID> <ShortRolloverTextID>09922</ShortRolloverTextID> <InitialHitpoints>3000.0000</InitialHitpoints> <MaxHitpoints>3000.0000</MaxHitpoints> <LOS>12.0000</LOS> <BuildPoints>60.0000</BuildPoints> <BuildLimit>20</BuildLimit> <Flag>ForceToGaia</Flag> <Bounty>60.0000</Bounty> <BuildBounty>0.0000</BuildBounty> <Cost resourcetype='Wood'>200.0000</Cost> <Cost resourcetype='Gold'>150.0000</Cost> <Cost resourcetype='Fame'>3.0000</Cost> <BuildingWorkRate>1.0000</BuildingWorkRate> <AllowedAge>0</AllowedAge> <Armor type='Siege' value='0.5000'/> <BuilderLimit>8</BuilderLimit> <Contain>Unit</Contain> <MaxContained>100.0000</MaxContained> <UnitType>LogicalTypeValidSabotage</UnitType> <UnitType>LogicalTypeMinimapFilterEconomic</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>ConvertsHerds</UnitType> <UnitType>CountsTowardEconomicScore</UnitType> <UnitType>HasBountyValue</UnitType> <UnitType>ColonyBuilding</UnitType> <UnitType>BuildingClass</UnitType> <UnitType>TestClass</UnitType> <UnitType>Building</UnitType> <UnitType>SpecialPowers</UnitType> <flag>AnnounceDestruction</flag> <Flag>PlaceAnywhere</Flag> <Flag>AllowAutoGarrison</Flag> <Flag>CollidesWithProjectiles</Flag> <Flag>StartsAtFullEfficiency</Flag> <Flag>Immoveable</Flag> <Flag>NoBloodOnDeath</Flag> <Flag>ObscuresUnits</Flag> <Flag>NoIdleActions</Flag> <Flag>NonAutoFormedUnit</Flag> <Flag>Doppled</Flag> <Flag>SelectWithObstruction</Flag> <Flag>PaintTextureWhenPlacing</Flag> <Flag>FlattenGround</Flag> <Flag>ColonyBuilding</Flag> <Flag>ColonyPlacementL</Flag> <Flag>HideGarrisonFlag</Flag> <Flag>HasGatherPoint</Flag> <Flag>Tracked</Flag> <Command page='1' column='1'>SetUnitAsHomeCityGatherPoint</Command> <Command page='10' column='3'>Delete</Command> <Command page='10' column='2'>Eject</Command> <Command page='10' column='1'>SetGatherPointEconomy</Command> <Command page='10' column='0'>SetGatherPointMilitary</Command> </Unit>
|
|
|
(LightHouse添加
<SocketUnitType>SkyPassage
</SocketUnitType>与
<Flag>SnapPlacement
</Flag>)
|
protoy.xml - 记事本 ---(LightHouse) |
____ |
□ |
X |
|
|
文件(F) 编辑(E) 格式(O) 查看(V) 帮助(H) |
|
|
|
|
|
<Unit id='293' name='LightHouse'> <DBID>15</DBID> <DisplayNameID>00899</DisplayNameID> <EditorNameID>00898</EditorNameID> <ObstructionRadiusX>3.0000</ObstructionRadiusX> <ObstructionRadiusZ>3.0000</ObstructionRadiusZ> <MaxVelocity>0.0000</MaxVelocity> <MovementType>land</MovementType> <AnimFile>Age of Mythology\Building\lighthouse\lighthouse.xml</AnimFile> <ImpactType>Wood</ImpactType> <PhysicsInfo>house</PhysicsInfo> <PlacementFile>buildingsmall.xml</PlacementFile> <Icon>Age of Mythology\Building\lighthouse\lighthouse_64</Icon> <PortraitIcon>Age of Mythology\Building\lighthouse\lighthouse_128</PortraitIcon> <RolloverTextID>00896</RolloverTextID> <ShortRolloverTextID>00895</ShortRolloverTextID> <InitialHitpoints>2500.0000</InitialHitpoints> <MaxHitpoints>2500.0000</MaxHitpoints> <LOS>72.0000</LOS> <SocketUnitType>SkyPassage</SocketUnitType> <Flag>SnapPlacement</Flag> <BuildPoints>120.0000</BuildPoints> <Bounty>100.0000</Bounty> <BuildBounty>50.0000</BuildBounty> <Cost resourcetype='Wood'>200.0000</Cost> <Cost resourcetype='Gold'>300.0000</Cost> <BuildingWorkRate>1.0000</BuildingWorkRate> <AllowedAge>0</AllowedAge> <Armor type='Siege' value='0.5000'/> <BuilderLimit>8</BuilderLimit> <Contain>Unit</Contain> <MaxContained>20.0000</MaxContained> <UnitType>LogicalTypeValidSabotage</UnitType> <UnitType>LogicalTypeMinimapFilterEconomic</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>ConvertsHerds</UnitType> <UnitType>CountsTowardEconomicScore</UnitType> <UnitType>HasBountyValue</UnitType> <UnitType>ColonyBuilding</UnitType> <UnitType>BuildingClass</UnitType> <UnitType>TestClass</UnitType> <UnitType>Building</UnitType> <UnitType>SpecialPowers</UnitType> <Flag>AllowAutoGarrison</Flag> <Flag>CollidesWithProjectiles</Flag> <Flag>StartsAtFullEfficiency</Flag> <Flag>Immoveable</Flag> <Flag>NoBloodOnDeath</Flag> <Flag>ObscuresUnits</Flag> <Flag>NoIdleActions</Flag> <Flag>NonAutoFormedUnit</Flag> <Flag>Doppled</Flag> <Flag>SelectWithObstruction</Flag> <Flag>PaintTextureWhenPlacing</Flag> <Flag>FlattenGround</Flag> <Flag>ColonyBuilding</Flag> <Flag>ColonyPlacementL</Flag> <Flag>HideGarrisonFlag</Flag> <Flag>HasGatherPoint</Flag> <Flag>Tracked</Flag> <Command page='22' column='1'>SetUnitAsHomeCityGatherPoint</Command> <Command page='11' column='0'>Abilities</Command> <Command page='10' column='3'>Delete</Command> <Command page='10' column='2'>Eject</Command> <Command page='10' column='1'>SetGatherPointEconomy</Command> <Command page='10' column='0'>SetGatherPointMilitary</Command> </Unit> |
|
|
上述修改效果如图所示: