@Schulz lol nothing new, sometime I have the same problem with the lowercase 'l' and the number '1' in some type settings.
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.