@Frostion at frist glance the three assignment triggers don't have a 'conditions' option, and so they might be firing at the start of the game giving Arthur the supportAttachment.
Just a quick read...
Trying this out on 'Invasion_USA'. If I understand how the search of the image works it should be 'nation folder to units folder to images included with TripleA'
Under the units folder I have only the 'Americans' folder the other nations share the other units. The 'Americans' also share the 'infantry' unit so no 'infantry.prg' in the 'Americans' folder.
When I run the game the 'Invaders' do share the same units, but the 'Americans' infantry seems to be coming from the TripleA resources.
If you have time could you check the search order, everything else works great.
<attachment foreach="$AllLandUnits$^$AllAirUnits$" name="unitAttachment" attachTo="Frost-Trap" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/> <option name="givesMovement" value="-1:@AllLandUnits@"/> <option name="givesMovement" value="-1:@AllAirUnits@"/> <option name="destroyedWhenCapturedFrom" value="$AllPlayers$"/> </attachment>
I see what you are saying, and I think you are right. Different units can provide support to the same unit. If the supportType is different then the supports stack to the count of each supportType.
This was @Frostion's request so would like to hear from him.
Here are a couple of ideas I would like to suggest for supportAttachments:
If you define the supportAttachment where the "attachTo" equals the "unitTypes" then the supportAttachment change that units values:
<attachment name="supportAttachmentHero-of-Humans-uses-Amulet-of-Accuracy" attachTo="Arthur" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType"> <option name="unitType" value="Arthur"/> : </attachment>
Works how @Frostion wants. But in 'Invasion USA' the militia unit attacks at '6' when attacking by itself and at '4' when attacking with other units, even other militia units which can not be done. If a 'count' value were to be added to the 'unitTypes' properties then:
<attachment name="supportAttachmentPartisan_Militia" attachTo="militia" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType"> <option name="unitType" value="militia" count="2"/> : </attachment>
Would allow the attachment to only affect militia units when there more then one stacked together.
Another would be for multi units (Combined Arms) requirements for support. If you stack the 'unitType' then only the last line is used:
<attachment name="supportAttachmentBomber" attachTo="bomber" javaClass="games.strategy.triplea.attachments.UnitSupportAttachment" type="unitType"> <option name="unitType" value="militia:infantry"/> <option name="unitType" value="mechanize:armor"/> : </attachment>
Would only support 'mechanize or armor', not "and" 'militia or infantry'.
Just some thoughts
<option name="bonusType" value="Cover" count="3"/>
would allow 3 Siege-Towers to stack the support together.
The absent of count would equal 1. So if @Frostion had a Battering-Ram and its supportAttachment:
<option name="bonusType" value="Cover"/>
Then the Battering-Ram could not stack support with itself, but it would still stack with the Siege-Tower so that:
2 Siege-Towers would equal -2 support for enemy fortifications
1 Siege-Tower and 1 Battering-Ram would equal -2 support for enemy fortifications
2 Battering-Rams would equal just a -1 support for enemy fortifications.
1 Siege-Tower (count="3") with two Battering-Rams would still gain the -3 support.
Just some thoughts.
@Cernel Yes, as long as the first territory moved into was not another mountain territory. If the first move were to enter the mountain territory the cost would be 2 and the armor would not be able to continue movement.
I understand what you are saying, my suggestion is just an option for the map makers. If the mountain territory is set to '2' and not '2-1' then the armor would only be able to enter as its only move.
Hope this help explain my suggestion.
<attachment name="territoryEffectAttachment" attachTo="mountain" javaClass="TerritoryEffectAttachment" type="territoryEffect"> <option name="movementCostModifier" value="armor" count="2"/> </attachment>
Then the armor can only enter a mountain territory from an adjacent territory. But if the count is set at a range:
<attachment name="territoryEffectAttachment" attachTo="mountain" javaClass="TerritoryEffectAttachment" type="territoryEffect"> <option name="movementCostModifier" value="armor" count="2-1"/> </attachment>
Where '2' is the normal entry cost but if the armor still has 1 movement left it could still enter the mountain territory.