Q群里面有人说添加以下语句开启贸易路线视野没有用 <Effect type="Data" amount="1.00" subtype="EnableTradeRouteLOS" relativity="Absolute"> <Target type="Player"/></Effect>
我告诉他需要先研究驿马车升级一次贸易路线才能获得视野,然后他又问怎样才能在发现时代获得贸易马车视野?
根据经验,这个设定不在techtreey,有可能是protoy里面的Flag或Unittype,也有可能在traderoutes.xml里面,当然也有可能是主程序写死的。在查了一下protoy后并没有发现有什么可疑的flag或unittype
贸易马拉雪橇 <Unit id ='479' name ='Travois'> <DBID>511</DBID> <DisplayNameID>29375</DisplayNameID> <ObstructionRadiusX>0.9900</ObstructionRadiusX> <ObstructionRadiusZ>2.4900</ObstructionRadiusZ> <MaxVelocity>4.0000</MaxVelocity> <MaxRunVelocity>6.0000</MaxRunVelocity> <MovementType>land</MovementType> <AnimFile>units\trade\travois.xml</AnimFile> <Icon>units\trade\travois_icon_64</Icon> <PortraitIcon>units\trade\travois_icon_portrait</PortraitIcon> <RolloverTextID>29374</RolloverTextID> <ShortRolloverTextID>29373</ShortRolloverTextID> <InitialHitpoints>240.0000</InitialHitpoints> <MaxHitpoints>240.0000</MaxHitpoints> <LOS>15.0000</LOS> <TrainPoints>30.0000</TrainPoints> <MinimapColor red ='0.0000' blue ='0.0000' green ='0.0000'></MinimapColor> <Armor type ='Ranged' value ='0.9000'></Armor> <UnitType>LogicalTypeHealed</UnitType> <UnitType>LogicalTypeHandUnitsAutoAttack</UnitType> <UnitType>LogicalTypeGarrisonInShips</UnitType> <UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType> <UnitType>LogicalTypeVillagersAttack</UnitType> <UnitType>LogicalTypeHandUnitsAttack</UnitType> <UnitType>LogicalTypeRangedUnitsAttack</UnitType> <UnitType>Unattackable</UnitType> <UnitType>RailroadUnit</UnitType> <UnitType>Unit</UnitType> <UnitType>UnitClass</UnitType> <UnitType>HasBountyValue</UnitType> <Flag>NoProjectileDamage</Flag> <Flag>NonCollideable</Flag> <Flag>OrientUnitWithGround</Flag> <Flag>NonAutoFormedUnit</Flag> <Flag>Invulnerable</Flag> <Flag>InvulnerableIfGaia</Flag> <Flag>NoHPBar</Flag> <Flag>DoNotCreateUnitGroupAutomatically</Flag> <Flag>Tracked</Flag> <Command page ='10' column ='0'>Delete</Command> </Unit> 驿马车 <Unit id ='480' name ='Stagecoach'> <DBID>512</DBID> <DisplayNameID>29379</DisplayNameID> <ObstructionRadiusX>0.9900</ObstructionRadiusX> <ObstructionRadiusZ>2.4900</ObstructionRadiusZ> <MaxVelocity>7.0000</MaxVelocity> <MaxRunVelocity>9.0000</MaxRunVelocity> <MovementType>land</MovementType> <AnimFile>units\trade\trade_stagecoach.xml</AnimFile> <ImpactType>Wood</ImpactType> <Icon>units\trade\stagecoach_icon_64x64</Icon> <PortraitIcon>units\trade\stagecoach_portrait</PortraitIcon> <RolloverTextID>29378</RolloverTextID> <ShortRolloverTextID>29377</ShortRolloverTextID> <InitialHitpoints>240.0000</InitialHitpoints> <MaxHitpoints>240.0000</MaxHitpoints> <LOS>15.0000</LOS> <MinimapColor red ='0.0000' blue ='0.0000' green ='0.0000'></MinimapColor> <Armor type ='Ranged' value ='0.1000'></Armor> <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>UnitClass</UnitType> <UnitType>Unit</UnitType> <UnitType>RailroadUnit</UnitType> <UnitType>Unattackable</UnitType> <Flag>NoHPBar</Flag> <Flag>Invulnerable</Flag> <Flag>InvulnerableIfGaia</Flag> <Flag>NoProjectileDamage</Flag> <Flag>NonCollideable</Flag> <Flag>OrientUnitWithGround</Flag> <Flag>NonAutoFormedUnit</Flag> <Flag>Tracked</Flag> <Command page ='10' column ='0'>Delete</Command> </Unit>
对比马拉雪橇与驿马车后,基本上可疑否认是flag或者unittype了。接下来就是去traderoutes.xml寻找了,打开traderoutes.xml后,随便观望了一下,发现有个<grantsvisibility/>非常可疑(看英文名称,然后等级2与等级3都有,就只有等级1-FindNugget没有),然后通过几次测试得出,就是<grantsvisibility/>定义了贸易路线视野,给FindNugget加上,再利用科技开启贸易路线单位视野,再建造一个贸易站就能获得视野了。
发现时代建造贸易站也能获得贸易马车视野
再来重复一下获得贸易路线单位视野的三个条件: 1.traderoutes.xml对于的贸易路线等级要添加<grantsvisibility/> 2.要改良以下科技 <Effect type="Data" amount="1.00" subtype="EnableTradeRouteLOS" relativity="Absolute"> <Target type="Player"/></Effect> 3.在贸易路线建造一个贸易站
|