Is there a way that villagers can go both by land and by water? Within protomods.xml in the code that defines the parameters of a unit is the segment
<movementtype>Land</movementtype>
Try adding to it
<movementtype>Land</movementtype>
<movementtype>water</movementtype>
But when I add both codes it crashes the game
I would like to do this with the aim of being able to build maritime buildings such as the AOE2 type maritime tower or the chinampas of the Aztecs
1 Like
You could try air.
But why not allow fishing boats or some other water unit to build the water building?
The way Age of Pirates solves the water building issue is to make a wagon unit that only goes on water.
kbUnitGetMovementType
does not return an array so I guess it’s not possible to have multiple movement types for the same unit type
1 Like
Excellent question.
I’ve tried changing the parameters of the fishing boats but I don’t see how to make them build things on the water. I don’t know what parameters to set.
I’ve put this on a fishing boat as a test and it doesn’t work, I don’t know if there’s anything to add extra
<protoaction>
<name>Build</name>
<rate type="Building">1.000000</rate>
<rate type="WallConnectorMar">1.000000</rate>
<rate type="SPCFountainOfYouth">1.000000</rate>
<rate type="Church">1.000000</rate>
</protoaction>
and
<train row="0" page="0" column="1">WallConnectorMar</train>
<train row="0" page="255" column="1">WallStraight2Mar</train>
<train row="0" page="255" column="1">WallStraight5Mar</train>
<train row="0" page="0" column="2">SPCFountainOfYouth</train>
When you say it doesn’t work, is the icon at least there?
I think you also might need to add a build action to the fishing boat tactics file. Maybe check out the steamer for usa and mexico to see what they have?
This is from the settler:
<action>
<name stringid="24102">Build</name>
<type>Build</type>
<anim>Build</anim>
<maxrange>0.2</maxrange>
<rate type="AbstractWonder">1.0</rate>
<rate type="Building">1.0</rate>
<typedmaxrange type="YPDockAsian">2.0</typedmaxrange>
<typedmaxrange type="Dock">2.0</typedmaxrange>
</action>
Since AoM shares motor engine with AoE3, copyng amphibious units code wouldnt do the work??
I have no idea about programming, just asking
Is there any unit that goes trought water and land, right now? Why not copy that
AssertiveWall20:
When you say it doesn’t work, is the icon at least there?
I think you also might need to add a build action to the fishing boat tactics file. Maybe check out the steamer for usa and mexico to see what they have?
This is from the settler:
<action>
I found another solution.
I changed the tactics to that of a villager I was able to make a Builder Ship
<tactics>settler.tactics</tactics>
I’ll leave the code for the whole unit in case anyone is of any use
<unit id="3004" name="BuldierBoat">
<dbid>3004</dbid>
<displaynameid>300045</displaynameid>
<editornameid>300046</editornameid>
<populationcount>1</populationcount>
<obstructionradiusx>0.9900</obstructionradiusx>
<obstructionradiusz>0.9900</obstructionradiusz>
<formationcategory>Protected</formationcategory>
<maxvelocity>4.0000</maxvelocity>
<maxrunvelocity>6.0000</maxrunvelocity>
<movementtype>water</movementtype>
<turnrate>6.0000</turnrate>
<animfile>units\naval\ships\builder_ship.xml</animfile>
<impacttype>Wood</impacttype>
<physicsinfo>house</physicsinfo>
<icon>resources\art\units\naval\fishing_ship\fishing_ship_icon_64x64.png</icon>
<portraiticon>resources\art\units\naval\fishing_ship\fishing_ship_icon_portrait.png</portraiticon>
<rollovertextid>22961</rollovertextid>
<shortrollovertextid>25636</shortrollovertextid>
<initialhitpoints>200</initialhitpoints>
<maxhitpoints>200</maxhitpoints>
<los>18</los>
<unitaitype>Civilian</unitaitype>
<trainpoints>25</trainpoints>
<buildlimit>99</buildlimit>
<bounty>8</bounty>
<buildbounty>8</buildbounty>
<cost resourcetype="Wood">70</cost>
<carrycapacity resourcetype="Food">1.0000</carrycapacity>
<carrycapacity resourcetype="Gold">1.0000</carrycapacity>
<maxcontained>10</maxcontained>
<allowedage>0</allowedage>
<armor type="Ranged" value="0.5000"/>
<unittype>LogicalTypeValidSabotage</unittype>
<unittype>LogicalTypeMinimapFilterEconomic</unittype>
<unittype>LogicalTypeEasySelectAvoid</unittype>
<unittype>LogicalTypeNeededForVictory</unittype>
<unittype>LogicalTypeHandUnitsAutoAttack</unittype>
<unittype>LogicalTypeValidSPCUnitsDeadCondition</unittype>
<unittype>LogicalTypeAffectedByTownBell</unittype>
<unittype>LogicalTypeRangedUnitsAutoAttack</unittype>
<unittype>LogicalTypeVillagersAttack</unittype>
<unittype>LogicalTypeHandUnitsAttack</unittype>
<unittype>LogicalTypeShipsAndBuildings</unittype>
<unittype>LogicalTypeRangedUnitsAttack</unittype>
<unittype>AbstractVillager</unittype>
<unittype>Ship</unittype>
<unittype>Transport</unittype>
<unittype>Economic</unittype>
<unittype>EconomicUnit</unittype>
<unittype>AbstractVillager</unittype>
<unittype>UnitClass</unittype>
<unittype>Unit</unittype>
<unittype>HasBountyValue</unittype>
<unittype>CountsTowardEconomicScore</unittype>
<unittype>ValidIdleVillager</unittype>
<unittype>AbstractFishingBoat</unittype>
<flag>TieToWaterSurface</flag>
<flag>CollidesWithProjectiles</flag>
<flag>DontRotateObstruction</flag>
<flag>ApplyHandicapTraining</flag>
<flag>NavalUnit</flag>
<flag>DecalStickToWaterSurface</flag>
<flag>NoFadeOnDeath</flag>
<flag>FadeOutDecalOnDeath</flag>
<flag>AllowAutoGarrison</flag>
<flag>ObscuredByUnits</flag>
<flag>NoBloodOnDeath</flag>
<flag>Tracked</flag>
<contain>LogicalTypeGarrisonInShips</contain>
<train row="0" page="0" column="1">WallConnectorMar</train>
<train row="0" page="0" column="2">OutpostM</train>
<train row="0" page="255" column="1">WallStraight2Mar</train>
<train row="0" page="255" column="1">WallStraight5Mar</train>
<train row="0" page="0" column="2">SPCFountainOfYouth</train>
<command page="10" column="5">Eject</command>
<command page="10" column="1">Stop</command>
<command page="10" column="7">Delete</command>
<tactics>settler.tactics</tactics>
<protoaction>
<name>BuildingAttack</name>
<damage>15.000000</damage>
<damagetype>Siege</damagetype>
<maxrange>20.000000</maxrange>
<rof>2.000000</rof>
</protoaction>
<protoaction>
<name>BuildingAttack2</name>
<damage>15.000000</damage>
<damagetype>Siege</damagetype>
<minrange>0.000000</minrange>
<maxrange>20.000000</maxrange>
<rof>2.000000</rof>
</protoaction>
<protoaction>
<name>Gather</name>
<rate type="AbstractWhale">0.500000</rate>
<rate type="AbstractFish">0.670000</rate>
</protoaction>
<protoaction>
<name>RangedAttack</name>
<damage>8.000000</damage>
<damagetype>Ranged</damagetype>
<maxrange>20.000000</maxrange>
<rof>2.000000</rof>
<damagecap>16.000000</damagecap>
<projectile>ArrowCanoe</projectile>
<damagebonus type="AbstractVillager">0.500000</damagebonus>
</protoaction>
<protoaction>
<name>RangedAttack2</name>
<damage>8.000000</damage>
<damagetype>Ranged</damagetype>
<minrange>0.000000</minrange>
<maxrange>20.000000</maxrange>
<rof>2.000000</rof>
<damagecap>16.000000</damagecap>
<projectile>InvisibleProjectile</projectile>
<damagebonus type="AbstractVillager">0.500000</damagebonus>
</protoaction>
<protoaction>
<name>Build</name>
<rate type="Building">1.000000</rate>
<rate type="WallConnectorMar">1.000000</rate>
<rate type="SPCFountainOfYouth">1.000000</rate>
<rate type="Church">1.000000</rate>
</protoaction>
</unit>
1 Like
I’m glad it works! There may be some unexpected behaviors since some actions are enabled by default in the tactics file, like you may be able to task the ship to gather wood.
You can correct those in techtreemods by enabling/disabling the actions or by making a new tactics file.
Yes, in fact, I’m going to make a custom Tactics file. But I like how it looks with two villagers on the raft.
Now the problem is to figure out how to make a “sea wall”, since the walls carry this code:
<flag>wallBuild</flag>
This means that a normal wall is automatically formed and if I remove that code, the wall is no longer formed, only the “wall connector”. I don’t know if you can create a custom “flag” that has the functions of a wall but can be built in the water. If you know or anyone knows, I would really appreciate it
1 Like