村民采集资源后必须将资源放回仓库类建筑物或单位




帝国时代3可以制作类似神话时代或帝国时代2那种采集,村民采集资源后必须将资源放回城镇中心或者磨坊、矿场等仓库类建筑物,才能收集到资源,如果没有仓库类建筑物则站着不动。

方法:只需要添加几个语句
1.在protoy.xml找到村民的ProtoAction设定,然后在<name>Gather</name>添加下列语句

<dropsitegathering>1</dropsitegathering>
<dropsitegathering>1</dropsitegathering>这句使采集的资源变成携带资源,不加入国库中,必须将资源放到仓库类建筑物才能增加现有资源;如果村民被杀了的话,那么他携带的资源就没了并且不会加入现有资源。另外,这个语句也可以添加在tactics的Gather里面,优先调用protoy.xml的设定。

另外,村民携带资源上限由以下语句控制:

<CarryCapacity resourcetype ='Food'>20.0000</CarryCapacity>
<CarryCapacity resourcetype ='Wood'>10.0000</CarryCapacity>
<CarryCapacity resourcetype ='Gold'>10.0000</CarryCapacity>
Food为20代表1次采集最多能采集20食物,Wood与Gold为10就代表1次采集最多只能采集10木材或黄金;不建议设定太大,也不建议设定太少,10-30就差不多了。 2.制作仓库类建筑物,例如将资源放回城镇中心 在单位或者建筑物添加以下语句

<CarryCapacity resourcetype ='Food'>1.0000</CarryCapacity>
<CarryCapacity resourcetype ='Wood'>1.0000</CarryCapacity>
<CarryCapacity resourcetype ='Gold'>1.0000</CarryCapacity>
<UnitType>Dropsite</UnitType>
<UnitType>Dropsite</UnitType>是必须要添加的,否则村民无法在该建筑物或单位放置资源;除了可以使单位或建筑变成仓库外,还有一个作用,村民在猎杀牲畜的时候,附近的牲畜会自动跑到带有Dropsite的仓库建筑物旁边。 至于其他几句携带资源语句CarryCapacity resourcetype ='xxxx'为控制仓库可搜集资源。如果只添加了Food;那么只能搜集食物;如果添加了Food、Wood,那么就可以同时搜集食物与木材;其他资源同理。 PS:村民会自动将资源放到离自己最近一个仓库;此外,资源不止Food、Wood、Gold三个,其他几个资源(trade、xp、ships、fame、skillpoints)照样可以这样修改。






例子:




村民三种资源修改成携带资源,需要带回仓库,每次只能携带10资源:

(注意不要漏了<dropsitegathering>1</dropsitegathering>语句,在<Name>Gather</Name>下面)
  protoy.xml - 记事本--村民 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)

<Unit id='928' name='aSettler'>
<DBID>1358</DBID>
<DisplayNameID>60245</DisplayNameID>
<EditorNameID>60246</EditorNameID>
<PopulationCount>1</PopulationCount>
<ObstructionRadiusX>0.4900</ObstructionRadiusX>
<ObstructionRadiusZ>0.4900</ObstructionRadiusZ>
<FormationCategory>Protected</FormationCategory>
<MaxVelocity>4.0000</MaxVelocity>
<MaxRunVelocity>6.0000</MaxRunVelocity>
<MovementType>land</MovementType>
<TurnRate>18.0000</TurnRate>
<AnimFile>units\villagers\villager.xml</AnimFile>
<ImpactType>Flesh</ImpactType>
<PhysicsInfo>dude</PhysicsInfo>
<Icon>units\asians\shared\villager\peasant_icon</Icon>
<PortraitIcon>units\asians\shared\villager\peasant_icon_portrait</PortraitIcon>
<SelectionPriority>10</SelectionPriority>
<RolloverTextID>60244</RolloverTextID>
<ShortRolloverTextID>60243</ShortRolloverTextID>
<InitialHitpoints>150.0000</InitialHitpoints>
<MaxHitpoints>150.0000</MaxHitpoints>
<LOS>14.0000</LOS>
<ProjectileProtoUnit>InvisibleProjectile</ProjectileProtoUnit>
<UnitAIType>Civilian</UnitAIType>
<TrainPoints>25.0000</TrainPoints>
<BuildLimit>99</BuildLimit>
<Bounty>10.0000</Bounty>
<BuildBounty>10.0000</BuildBounty>
<Cost resourcetype='Food'>100.0000</Cost>
<CarryCapacity resourcetype='Food'>10.0000</CarryCapacity>
<CarryCapacity resourcetype='Wood'>10.0000</CarryCapacity>
<CarryCapacity resourcetype='Gold'>10.0000</CarryCapacity>

<AllowedAge>0</AllowedAge>
<Armor type='Hand' value='0.2000'/>
<UnitType>LogicalTypeMinimapFilterEconomic</UnitType>
<UnitType>LogicalTypeEasySelectAvoid</UnitType>
<UnitType>LogicalTypeHealed</UnitType>
<UnitType>LogicalTypeNeededForVictory</UnitType>
<UnitType>LogicalTypeHandUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeValidSPCUnitsDeadCondition</UnitType>
<UnitType>LogicalTypeGarrisonInShips</UnitType>
<UnitType>LogicalTypeAffectedByTownBell</UnitType>
<UnitType>LogicalTypeRangedUnitsAutoAttack</UnitType>
<UnitType>LogicalTypeVillagersAttack</UnitType>
<UnitType>LogicalTypeHandUnitsAttack</UnitType>
<UnitType>LogicalTypeRangedUnitsAttack</UnitType>
<UnitType>Economic</UnitType>
<UnitType>AbstractVillager</UnitType>
<UnitType>Unit</UnitType>
<UnitType>UnitClass</UnitType>
<UnitType>CountsTowardEconomicScore</UnitType>
<UnitType>ValidIdleVillager</UnitType>
<UnitType>HasBountyValue</UnitType>
<UnitType>Ranged</UnitType>
<UnitType>CannotConvertHill</UnitType>
<UnitType>ConvertsHerds</UnitType>
<UnitType>AffectedByTownBell</UnitType>
<Train row='0' page='6' column='2'>XXXXX</Train>
<Tech row='0' page='1' column='0'>XXXXX</Tech>
<Flag>CollidesWithProjectiles</Flag>
<Flag>ApplyHandicapTraining</Flag>
<Flag>CorpseDecays</Flag>
<Flag>ShowGarrisonButton</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<Flag>DeadReplacementWhenDestroyed</Flag>
<Flag>VisibleUnderFogIfGaia</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>settler.tactics</Tactics>
<ProtoAction>
<Name>AutoGatherTrade</Name>
<Type>AutoGather</Type>
<Rate type='Trade'>0.030000</Rate>
</ProtoAction>
<ProtoAction>
<Name>BlunderbussAttack</Name>
<Damage>3.000000</Damage>
<DamageType>Ranged</DamageType>
<MinRange>2.000000</MinRange>
<MaxRange>12.000000</MaxRange>
<ROF>3.000000</ROF>
<DamageBonus type='Huntable'>4.000000</DamageBonus>
<DamageBonus type='AbstractPet'>2.000000</DamageBonus>
<DamageBonus type='AbstractArtillery'>2.000000</DamageBonus>
<DamageBonus type='AbstractVillager'>0.500000</DamageBonus>
</ProtoAction>
<ProtoAction>
<Name>Build</Name>
<Rate type='Building'>1.000000</Rate>
<Rate type='Manor'>1.000000</Rate>
<Rate type='FirePit'>1.000000</Rate>
<Rate type='House'>1.000000</Rate>
<Rate type='ypMonastery'>1.000000</Rate>
<Rate type='AbstractWonder'>1.000000</Rate>
</ProtoAction>
<ProtoAction>
<Name>BuildingAttack</Name>
<Damage>5.000000</Damage>
<DamageType>Siege</DamageType>
<ROF>3.000000</ROF>
</ProtoAction>
<ProtoAction>
<Name>ChopAttack</Name>
<Damage>8.000000</Damage>
<DamageType>Hand</DamageType>
</ProtoAction>
<ProtoAction>
<Name>CrateGather</Name>
<Rate type='AbstractResourceCrate'>8.000000</Rate>
</ProtoAction>
<ProtoAction>
<Name>Gather</Name>
<dropsitegathering>1</dropsitegathering>
<Rate type='Tree'>0.500000</Rate>
<Rate type='Farm'>0.500000</Rate>
<Rate type='Plantation'>0.500000</Rate>
<Rate type='Herdable'>2.000000</Rate>
<Rate type='Huntable'>0.840000</Rate>
<Rate type='AbstractMine'>0.600000</Rate>
<Rate type='BerryBush'>0.670000</Rate>
<Rate type='FirePit'>0.100000</Rate>
<Rate type='Mill'>0.670000</Rate>
<Rate type='ypRicePaddy' resource='Food'>0.500000</Rate>
<Rate type='ypRicePaddy' resource='Gold'>0.340000</Rate>
<Rate type='ypBerryBuilding'>0.670000</Rate>
<Rate type='ypGroveBuilding'>0.500000</Rate>
</ProtoAction>
<ProtoAction>
<Name>HandAttack</Name>
<Damage>10.000000</Damage>
<DamageType>Hand</DamageType>
<ROF>1.500000</ROF>
</ProtoAction>
<ProtoAction>
<Name>Hunting</Name>
<Rate type='Herdable'>1.000000</Rate>
<Rate type='Huntable'>1.000000</Rate>
<Rate type='Tree'>1.000000</Rate>
</ProtoAction>
</Unit>

  protoy.xml - 记事本 - 马车 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)

<Unit id='552' name='Test Wagon'>
<DBID>732</DBID>
<DisplayNameID></DisplayNameID>
<EditorNameID></EditorNameID>
<ObstructionRadiusX>0.9900</ObstructionRadiusX>
<ObstructionRadiusZ>0.9900</ObstructionRadiusZ>
<FormationCategory>Protected</FormationCategory>
<MaxVelocity>2.0000</MaxVelocity>
<MaxRunVelocity>4.0000</MaxRunVelocity>
<MovementType>land</MovementType>
<TurnRate>3.0000</TurnRate>
<AnimFile>units\trade\supply_cart\supply_cart_all.xml</AnimFile>
<ImpactType>Wood</ImpactType>
<Icon>units\trade\spc_wagon_icon_64x64</Icon>
<PortraitIcon>units\trade\spc_wagon_portrait</PortraitIcon>
<RolloverTextID>32689</RolloverTextID>
<ShortRolloverTextID>32688</ShortRolloverTextID>
<LOS>22.0000</LOS>
<UnitAIType>Civilian</UnitAIType>
<CarryCapacity resourcetype='Food'>1.0000</CarryCapacity>
<CarryCapacity resourcetype='Wood'>1.0000</CarryCapacity>
<carrycapacity resourcetype='Gold'>1.0000</carrycapacity>

<AllowedAge>0</AllowedAge>
<Armor type='Ranged' value='0.1000'/>
<UnitType>Dropsite</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>AbstractWagon</UnitType>
<UnitType>UnitClass</UnitType>
<UnitType>Unit</UnitType>
<UnitType>Economic</UnitType>
<Flag>CollidesWithProjectiles</Flag>
<Flag>ApplyHandicapTraining</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<unittype>AbstractTradeUnit</unittype>
<unittype>TradeUnit</unittype>
<Flag>DeadReplacementWhenDestroyed</Flag>
<Flag>ConstrainOrientation</Flag>
<Flag>OrientUnitWithGround</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>SPCResourceCart.tactics</Tactics>
</Unit>



采集资源后放到马车才收集到资源(留意村民采集与资源栏的变化,村民生命值下面还有个携带资源数量):


村民猎杀牲畜时,附近的牲畜跑到带有<UnitType>Dropsite</UnitType>的单位。





设定仓库类单位只能放置木材与黄金(其实就是只给仓库添加携带木材与黄金):

  protoy.xml - 记事本 - 马车 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)

<Unit id='552' name='Test Wagon'>
<DBID>732</DBID>
<DisplayNameID></DisplayNameID>
<EditorNameID></EditorNameID>
<ObstructionRadiusX>0.9900</ObstructionRadiusX>
<ObstructionRadiusZ>0.9900</ObstructionRadiusZ>
<FormationCategory>Protected</FormationCategory>
<MaxVelocity>2.0000</MaxVelocity>
<MaxRunVelocity>4.0000</MaxRunVelocity>
<MovementType>land</MovementType>
<TurnRate>3.0000</TurnRate>
<AnimFile>units\trade\supply_cart\supply_cart_all.xml</AnimFile>
<ImpactType>Wood</ImpactType>
<Icon>units\trade\spc_wagon_icon_64x64</Icon>
<PortraitIcon>units\trade\spc_wagon_portrait</PortraitIcon>
<RolloverTextID>32689</RolloverTextID>
<ShortRolloverTextID>32688</ShortRolloverTextID>
<LOS>22.0000</LOS>
<UnitAIType>Civilian</UnitAIType>
<CarryCapacity resourcetype='Wood'>1.0000</CarryCapacity>
<carrycapacity resourcetype='Gold'>1.0000</carrycapacity>

<AllowedAge>0</AllowedAge>
<Armor type='Ranged' value='0.1000'/>
<UnitType>Dropsite</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>AbstractWagon</UnitType>
<UnitType>UnitClass</UnitType>
<UnitType>Unit</UnitType>
<UnitType>Economic</UnitType>
<Flag>CollidesWithProjectiles</Flag>
<Flag>ApplyHandicapTraining</Flag>
<Flag>DontRotateObstruction</Flag>
<Flag>ObscuredByUnits</Flag>
<unittype>AbstractTradeUnit</unittype>
<unittype>TradeUnit</unittype>
<Flag>DeadReplacementWhenDestroyed</Flag>
<Flag>ConstrainOrientation</Flag>
<Flag>OrientUnitWithGround</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>SPCResourceCart.tactics</Tactics>
</Unit>







我们还可以利用科技增加村民的携带资源上限,语句为:


<Effect type='Data' amount='X.00' subtype='CarryCapacity' resource='Food' relativity='BasePercent'>
<Target type='ProtoUnit'>AbstractVillager(可换成单个调用名)</Target>
</Effect>






例如我的村民的携带食物、木材、黄金上限为10,现在要给他们增加2倍食物携带上限,木材携带上限增加6,黄金上限减3
  techtreey.xml - 记事本 ____ X
文件(F)  编辑(E)  格式(O)  查看(V)  帮助(H)
	<Tech name='DropsiteTest' type='Normal'>
<DBID>5290</DBID>
<ResearchPoints>10.0000</ResearchPoints>
<Status>OBTAINABLE</Status>
<Icon>units\trade\spc_wagon_icon_64x64</Icon>
<Effects>
<Effect type='Data' amount='2.00' subtype='CarryCapacity' resource='Food' relativity='BasePercent'>
<Target type='ProtoUnit'>AbstractVillager</Target>
</Effect>
<Effect type='Data' amount='5.00' subtype='CarryCapacity' resource='Wood' relativity='Absolute'>
<Target type='ProtoUnit'>AbstractVillager</Target>
</Effect>
<Effect type='Data' amount='-3.00' subtype='CarryCapacity' resource='Gold' relativity='Absolute'>
<Target type='ProtoUnit'>AbstractVillager</Target>
</Effect>

</Effects>
</Tech>




改良科技DropsiteTest后