Hello,
I’m new to AOE2 modding, and I’m trying to modify the behavior of the Canoe for a custom scenario. Here are my requirement :
- Canoe must be able to go through Bridge CD middle B and C
- Canoe must accept garrison
- Canoe must not attack unless there is a unit in garrison
- Bonus : when crossing a bridge, the canoe must be occluded by the bridge
But I have some issue with my mod.
1) Canoe pass through bridge
1.1) Test with Water 2D bridge
I try to do that by creating a new terrain table only for the Canoe. I copy the terrain table 12, Water small wave and edit the flag for 28 Water 2D bridge to make it passable. But now the canoe can go everywhere, even in grass and I don’t understand why.
1.2) Test with 93 Moddable Walkable Shallows
- I edit my bridge pieces to use 93 Moddable Walkable Shallows as Foundation terrain
- I create a copy of the terrainn table 12 Water small wave and assign it to canoe
- I remove the passable flat for terrain 93 Moddable Walkable Shallows in the different water terrain tables (small wave, medium wave and big wave)
→ This work fine for the canoe, but all other ships can also go through the 93 Moddable Walkable Shallows terrain. It’s like if the terrain tables is not doing anything.
Am I missing something ? Is there some strange beahviour between the terrain tables and the terrain attribut “Type” that I don’t understand ?
2) Canoe must accept garrison
- I change the class of the canoe from 22 Warship to 20 - Transport boat
- I set the Garrison capacity to 5
- I add the unit Trait “Garrison” (first checkbox)
- Everything work perfectly
3)Canoe must attack only when there is a unit in Garrison
- My idea was to use the flag “Enalbed” in the task “7: Combat” but I don’t think this flag can detect if a unit is in garrison.
- I don’t know how to do that. if someone have an idea or an example in an existing mod it will help me.
4) Occluded (or remove the graphic) when crossing a bridge
- I can probably make it work by using the Fog visibility flag and some trigger in the scenario editing mode, but it won’t be funny
- I try to change the occlusion class of the canoe and the Z collision but it’s not working
If someone have some time and some idea to help me it will be very helpful.
Thanks in advance