issue with upgrading units (consumesUnit & name="constructionType"
-
dear map makers....
finally , the last challenge before finishing this project:In this game certain buildings can be upgraded:
like a harbour can be upgraded into a big harbour:
it uses <option name="consumesUnits" value="1:Tsu_(Harbour)"/>
and <option name="constructionType" value="Big-Harbour_structure"/>
to replace it.Problem:
After upgrading it is still possible to place a small harbour next to a big harbour later in the game, which is unwanted.If I use the same "constructionType" value= names for both small and big harbour an upgrade is no longer possible, a even bigger unwanted consequence
I think it cannot be solved within : <option name="maxConstructionsPerTypePerTerr" value="1"/><option name="constructionsPerTerrPerTypePerTurn" value="1"/>
either...Solving this with: unit can only be placed in , is no option here as they are randomly placed at game start....
The only solution I see is making a new unit that needs to be replaced to be able to build a harbour..... in every territory not allready containing a harbour... but this is a undesirable workaround for me....does anyone knows a possible solutionfor this or a example from a certain map?
bolded text
I would appreciate a lot !!!!!
thanks... and on to a new project after summer break -
This might help?
Replace the Industry's with your Harbour and Big-Harbour
It might also block upgrading I cannot remember
But it does stop Harbour being placed with a Big-Harbour.<attachment foreach="$AllPlayers$" name="playerAttachment" attachTo="@AllPlayers@" javaClass="PlayerAttachment" type="player"> <option name="retainCapitalNumber" value="0"/> <option name="retainCapitalProduceNumber" value="0"/> <option name="placementLimit" value="allied:Industry-Hvy:Industry-Med:Industry-Lgt:Base-Camp" count="1"/> </attachment>
-
@thedog said in issue with upgrading units (consumesUnit & name="constructionType":
<option name="placementLimit" value="allied:Industry-Hvy:Industry-Med:Industry-Lgt:Base-Camp" count="1"/>
That was definately a very good & working solution!!!! great!!!
thanks again for sharing and caring!
few more test rounds, finishing game notes and project finally finished! -
sometimes one wishes too much to have ones final issue from the "eternal-to-do-list" to be solved... that an final test is not well done..
so: @TheDog : unfortunately indeed: it works for the avoiding placing extra units, but it blocks the upgrading..
( which is weird as actually there are no 2 same of the unit types around as it is "consumed" ) so: the question remains
In this game certain buildings can be upgraded:
like a harbour can be upgraded into a big harbour:
and <option name="constructionType" value="Big-Harbour_structure"/>
to replace it.Problem:
After upgrading it is still possible to place a small harbour next to a big harbour later in the game, which is unwanted.If I use the same "constructionType" value= names for both small and big harbour an upgrade is no longer possible, a even bigger unwanted consequence
Solving this with:
-unit can only be placed in , is no option here as they are randomly placed at game start....
The only solution I see is making a new unit that needs to be replaced to be able to build a harbour..... in every territory not allready containing a harbour... but this is a undesirable workaround for me....-the proposed solution with: placement limit works, but blocks upgrading
<attachment foreach="$AllPlayers$" name="playerAttachment" attachTo="@AllPlayers@" javaClass="PlayerAttachment" type="player"> <option name="placementLimit" value="allied:Tsu_(Harbour):Shuyo-Tsu_(Big-Harbour):Ichiba_(Mart):Shuyo-Ichiba_(Big-Mart):Tsu_(Harbour)_:Shuyo-Tsu_(Big-Harbour)_:Ichiba_(Mart)_:Shuyo-Ichiba_(Big-Mart)_" count="1"/> </attachment>
does anyone knows another possible solution for this or a example from a certain map?
I would appreciate a lot !!!!!
-
"Oztea 1939 Global" (a map by @beelee I think) has a working upgrade system for the "factory_minor" to "factory_major":
<attachment name="unitAttachment" attachTo="factory_minor" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isFactory" value="true"/> <option name="unitPlacementRestrictions" value="Ceylon:Sumatra:Java:Borneo:Hainan:Philippines:Celebes:Dutch New Guinea:Paulau Island:New Guinea:New Britain:Solomon Islands:New Hebrides:New Zealand:Fiji:Samoa:Line Islands:Johnston Island:Hawaiian Islands:Midway:Iwo Jima:Aleutian Islands:Gilbert Islands:Marshall Islands:Caroline Islands:Wake Island:Marianas:Guam:Formosa:Okinawa:West Indies:Greenland:Iceland:Sardinia:Sicily:French Madagascar:Crete:Cyprus"/> <option name="canOnlyBePlacedInTerritoryValuedAtX" value="2"/> <!--<option name="destroyedWhenCapturedBy" value="Chinese"/>--> <option name="isAAforBombingThisUnitOnly" value="true"/> <option name="canProduceXUnits" value="3"/> <option name="maxDamage" value="6"/> </attachment> <!-- Factory Major --> <attachment name="unitAttachment" attachTo="factory_major" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isFactory" value="true"/> <option name="unitPlacementRestrictions" value="Ceylon:Sumatra:Java:Borneo:Hainan:Philippines:Celebes:Dutch New Guinea:Paulau Island:New Guinea:New Britain:Solomon Islands:New Hebrides:New Zealand:Fiji:Samoa:Line Islands:Johnston Island:Hawaiian Islands:Midway:Iwo Jima:Aleutian Islands:Gilbert Islands:Marshall Islands:Caroline Islands:Wake Island:Marianas:Guam:Formosa:Okinawa:West Indies:Greenland:Iceland:Sardinia:Sicily:French Madagascar:Crete:Cyprus"/> <option name="canOnlyBePlacedInTerritoryValuedAtX" value="3"/> <!--<option name="destroyedWhenCapturedBy" value="Chinese"/>--> <option name="isAAforBombingThisUnitOnly" value="true"/> <option name="canProduceXUnits" value="10"/> <option name="maxDamage" value="20"/> <option name="whenCapturedChangesInto" value="any:any:true:factory_minor:1"/> <option name="special" value="canOnlyPlaceInOriginalTerritories"/> </attachment> <!-- Factory Upgrade --> <attachment name="unitAttachment" attachTo="factory_upgrade" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isFactory" value="true"/> <option name="unitPlacementRestrictions" value="Ceylon:Sumatra:Java:Borneo:Hainan:Philippines:Celebes:Dutch New Guinea:Paulau Island:New Guinea:New Britain:Solomon Islands:New Hebrides:New Zealand:Fiji:Samoa:Line Islands:Johnston Island:Hawaiian Islands:Midway:Iwo Jima:Aleutian Islands:Gilbert Islands:Marshall Islands:Caroline Islands:Wake Island:Marianas:Guam:Formosa:Okinawa:West Indies:Greenland:Iceland:Sardinia:Sicily:French Madagascar:Crete:Cyprus"/> <option name="canOnlyBePlacedInTerritoryValuedAtX" value="3"/> <!--<option name="destroyedWhenCapturedBy" value="Chinese"/>--> <option name="isAAforBombingThisUnitOnly" value="true"/> <option name="canProduceXUnits" value="10"/> <option name="maxDamage" value="20"/> <option name="consumesUnits" value="1:factory_minor"/> <option name="whenCapturedChangesInto" value="any:any:true:factory_minor:1"/> <option name="special" value="canOnlyPlaceInOriginalTerritories"/> </attachment>
Tested in both 2.5 current and 2.6+
Cheers...
-
@wc_sumpton
unfortunately no progress in trying to solve this with all good suggestions:trying to fix a workaround now:
but as coded now it adds a harbour to ALL of the $CoastalCities$ ...of every player
not (as I hoped for) ONLY in the specific Coastal Cities that
have a Harbour unit presence (and in this case Otomo -ownership) ; anyone knows what I should change in the condition?<attachment foreach="$CoastalCities$" name="conditionAttachment_Swap_Harbour_Otomo_@CoastalCities@" attachTo="Otomo" javaClass="RulesAttachment" type="player"> <option name="directOwnershipTerritories" value="@CoastalCities@"/> <option name="unitPresence" value="Harbour" count="1"/> </attachment>
sorry to bother once more....
-
You are using "directOwnershipTerritories" when you should be using "directPresenceTerritories". You are checking to see if 'Otomo' owns a 'harbor' in '$CoastalCities$', ownership of the territory is implied by owning the 'harbor'.
Cheers...
-
@wc_sumpton said in issue with upgrading units (consumesUnit & name="constructionType":
directPresenceTerritories
That was the solution!!!!
thank you all for thinking along
-
Hay @ebbe
Still trying to upgrade units, try this:
You already have harbour and big harbour (remove "consumesUnit" from big harbour) units. You will need a third unit, upgrade harbour, which will be the same as big harbour but add "consumesUnit" to replace harbour, and "createsUnitsList" to add big harbour. You will still need @TheDog playerAttachment idea. Update harbour will create big harbour during the endTurn phase, so create a trigger to remove all update harbours after the endTurn phase to clean out the extra unit.
Hope this helps!
Cheers...
-
Thanks... I checked the Ozteal 1939 game allready for this... this solution brings another unit in the purchase panel though, which I try to avoid I choose a trigger to change the unit type's name after placement , so it can be upgraded now, and after place plase it receives same name as the unit it should consume...
bit of a workaround but it worksby the way; a final question: connected to directPresenceTerritories
How to get it working when you want no units of a specific unit type to be present (anywhere) in order to get a trigger started?
(in order to have an automatic replacement )============== AUTOMATIC DAIMYO SUCCESSION ========= <attachment name="conditionAttachmentDaimyo_Otomo" attachTo="Otomo" javaClass="RulesAttachment" type="player"> <option name="unitPresence" value="Daimyo" count="0"/> <option name="directPresenceTerritories" value="all" count="0"/> </attachment> <attachment name="triggerAttachmentOtomoDaimyo" attachTo="Otomo" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentDaimyo_Otomo"/> <option name="purchase" value="Daimyo" count="1"/> <option name="players" value="Otomo"/> <option name="when" value="before:otomoPurchase"/> </attachment>
-
Simple, add "invert" to a count of 1:
<attachment name="conditionAttachmentDaimyo_Otomo" attachTo="Otomo" javaClass="RulesAttachment" type="player"> <!-- Change count to 1 --> <option name="directPresenceTerritories" value="all" count="1"/> <!-- Change count to 1 --> <option name="unitPresence" value="Daimyo" count="1"/> <!-- Add invert --> <option name="invert" value="true"/> </attachment>
If there are no "Daimyo", statement will be false, invert makes it true.
Cheers...
-
@wc_sumpton great , it works, (tested well ) yes you mentioned it once before , it was another element that interfered and made it look like not working! solved!
thanks again! -
I think I finally understand the question you were asking here!! You have 2 units Tsu_(Harbour) and Ichiba_(Mart), both which can be upgraded to Shuyo/Big. When the Tsu (Harbour) is built/upgraded it needs to prevent the building/upgrading of the Ichiba (Mart) and vises-versa.
This prevents the construction on multiples of the same types per turn: <option name="constructionsPerTerrPerTypePerTurn" value="1"/>, and this will allow multiples of the same type to be placed in the same territory, but on different turns: <option name="maxConstructionsPerTypePerTerr" value="2"/> and the constuction type (don't use '_structure' that is a key word): <option name="constructionType" value="Harbour_Mart"/>Now you can build the Tsu (Harbour) or Ichiba (Mart) or upgrade one or the other, but you can only do one of those actions.
Now to restrict the placement (no 2 Tsu (Harbour) or 2 Ichiba (Mart)), do as @TheDog suggested with 'playerAttachment':
<attachment foreach="$AllPlayersMinor$" name="playerAttachment" attachTo="@AllPlayersMinors@" javaClass="PlayerAttachment" type="player"> <!-- Restrict only the Shuyo/Tsu (Harbour) --> <option name="placementLimit" value="allied:Tsu_(Harbour):Shuyo-Tsu_(Big-Harbour)" count="1"/> <!-- Restrict only the Shuyo/Ichiba (Mart) --> <option name="placementLimit" value="allied:Ichiba_(Mart):Shuyo-Ichiba_(Big-Mart)" count="1"/> </attachment>
Did I get it!!
Next comes the difference between minor and non-minor structures: "givesMovement". Do this with a trigger not a new unit:<!-- It does not matter who attachTo is, since its the unit we will be changing --> <attachment name="triggerAttachmentReset_GivesMovement" attachTo="Minor" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAlwaysTrue"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <!-- All minor/non-minor units can be listed --> <option name="unitType" value="Tsu_(Harbour):Shuyo-Tsu_(Big-Harbour):etc..."/> <option name="unitProperty" value="givesMovement" count="-reset-"/> <option name="when" value="before:minorCombatMove"/> </attachment> <!-- To give back givesmovement --> <attachment name="triggerAttachmentTsu_(Harbour)_GivesMovement" attachTo="Minor" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAlwaysTrue"/> <option name="unitAttachmentName" value="UnitAttachment" count="unitAttachment"/> <!-- Different units will need their own attachment because givesMovement is different --> <option name="unitType" value="Tsu_(Harbour):Shuyo-Tsu_(Big-Harbour)"/> <option name="unitProperty" value="givesMovement" count="-reset-1:Atakebune:Sekibune:Teitoku-Atakebune:Geobukseon:Panokseon:Sengokubune:Sengokubune_:Kobaya:Kobaya_:Ikko-Ikki_Sengokubune:Teitoku-Wako-Sengokubune:Wako-Sengokubune:Daimyo:Sodaisho:Janggun:Bajutsu:Niganata-Bajutsu:Gabsa:Daikyu-Samurai:Pengbaesu:Samurai:Yumi-Ashigaru:Gungsu:Teppo-Ashigaru:Teppo-Ashigaru_:Chongtong:Yari-Ashigaru:Ronin:Teppo-Sohei:Yumi-Sohei:Sohei:Peasant:Rennyo-Gatekeeper:Shrine-Bearer:Raider:Sea-Lord:Ninja:Ninja_:Kensei:Changbyeong"/> <option name="when" value="after:minorNonCombatMove"/> </attachment>
Hopefully some ideas---
Cheers...
-
I see you were having a problem with the initial setup, unit moving and attack, when only what was wanted was placement and collect income. This could have been handled by placing a setup phase at the beginning:
<step name="setupRandomStartDelegate" delegate="randomStartDelegate" display="Pregame Nation Placements" maxRunCount="1"/> <!-- Setup Phase --> <step name="minorSetupPlace" delegate="place" player="Minor" display="Place Initial Units" maxRunCount="1"/> <step name="minorSetupEndTurnNoPU" delegate="endTurnNoPU" player="Minor" display="Collect Initial Income" maxRunCount="1"/> <step name="wakoSetupPlace" delegate="place" player="Wako" display="Place Initial Units" maxRunCount="1"/> <step name="wakoSetupEndTurn" delegate="endTurn" player="Wako" display="Collect Initial Income" maxRunCount="1"/> ... ... ...
I'm still going through the xml, but this should work.
Cheers...
-
Okay, this is what I have for the Tsu (Harbour)
<!-- Harbour not to much changed here --> <!-- GO Tsu (Harbour)--> <attachment name="unitAttachment" attachTo="Tsu_(Harbour)" javaClass="UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/> <option name="isConstruction" value="true"/> <option name="constructionType" value="Mart_structure"/> <option name="maxConstructionsPerTypePerTerr" value="2"/> <!-- Needs to be 2, allows for both Harbour and Mart Constructions --> <option name="constructionsPerTerrPerTypePerTurn" value="1"/> <option name="unitPlacementRestrictions" value="North Harima:Kiyosu:Matsue:Miki:Settsu:Miyakonoyo:North Hyuga:Yoshida:Izumo:Gassantoda:Matsuyama:Tango:Tanba:Odani:Mimasake:Matsuyama:Takeyama:Hida:North Shinano:South Shinano:East Echigo:Nagano:Kozuke:Shimotsuke:Kofu:Kai:Awa Kannou:Suruga:North Mikawa:South Mino:North Omi:South Omi:Iwamura:Sawayama:Yamashiro:Kyoto:Nara:Iga:Yamato:Kawachi:South Ise:Gifu"/> <option name="canProduceUnits" value="true"/> <option name="canProduceXUnits" value="2"/> <option name="repairsUnits" value="1:Atakebune:Teitoku-Atakebune:Mekurabune:Geobukseon"/> <option name="givesMovement" value="1:Atakebune:Sekibune:Teitoku-Atakebune:Panokseon:Sengokubune:Sengokubune_:Kobaya:Kobaya_:Ikko-Ikki_Sengokubune:Teitoku-Wako-Sengokubune:Wako-Sengokubune:Daimyo:Sodaisho:Janggun:Bajutsu:Niganata-Bajutsu:Gabsa:Daikyu-Samurai:Pengbaesu:Samurai:Yumi-Ashigaru:Gungsu:Teppo-Ashigaru_:Teppo-Ashigaru:Chongtong:Yari-Ashigaru:Ronin:Teppo-Sohei:Yumi-Sohei:Sohei:Peasant:Rennyo-Gatekeeper:Shrine-Bearer:Raider:Sea-Lord:Ninja:Ninja_:Kensei:Changbyeong"/> <option name="whenCapturedChangesInto" value="any:Joseon:false:Hangu_(Harbour):1"/> <option name="createsResourcesList" value="1:PUs"/> <option name="tuv" value="2"/> </attachment> <!-- Main Big Harbour cannot be purchased --> <!-- GO Major Harbour main --> <attachment name="unitAttachment" attachTo="Shuyo-Tsu_(Big-Harbour)" javaClass="UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/> <option name="isConstruction" value="true"/> <option name="constructionType" value="Mart_structure"/> <option name="maxConstructionsPerTypePerTerr" value="2"/> <!-- Needs to be 2, allows for both Harbour and Mart Constructions --> <option name="constructionsPerTerrPerTypePerTurn" value="1"/> <option name="unitPlacementOnlyAllowedIn" value="$AllKyudenCoastalCities$"/> <option name="canProduceUnits" value="true"/> <option name="canProduceXUnits" value="3"/> <!-- produce X max units per producer --> <option name="repairsUnits" value="1:Atakebune:Teitoku-Atakebune:Mekurabune:Geobukseon"/> <option name="givesMovement" value="1:Atakebune:Sekibune:Teitoku-Atakebune:Geobukseon:Panokseon:Sengokubune:Sengokubune_:Kobaya:Kobaya_:Ikko-Ikki_Sengokubune:Teitoku-Wako-Sengokubune:Wako-Sengokubune:Daimyo:Sodaisho:Janggun:Bajutsu:Niganata-Bajutsu:Gabsa:Daikyu-Samurai:Pengbaesu:Samurai:Yumi-Ashigaru:Gungsu:Teppo-Ashigaru:Teppo-Ashigaru_:Chongtong:Yari-Ashigaru:Ronin:Teppo-Sohei:Yumi-Sohei:Sohei:Peasant:Rennyo-Gatekeeper:Shrine-Bearer:Raider:Sea-Lord:Ninja:Ninja_:Kensei:Changbyeong"/> <option name="createsResourcesList" value="1:PUs"/> <option name="whenCapturedChangesInto" value="any:Joseon:false:Keun-Hangu_(Big-Harbour):1"/> <option name="createsResourcesList" value="2:PUs"/> <option name="tuv" value="4"/> </attachment> <!-- Purchasable Big-Harbour --> <!-- GO Major Harbour purchased --> <attachment name="unitAttachment" attachTo="Shuyo-Tsu_(Big_Harbour)" javaClass="UnitAttachment" type="unitType"> <option name="isInfrastructure" value="true"/> <option name="isConstruction" value="true"/> <option name="constructionType" value="Mart_structure"/> <option name="maxConstructionsPerTypePerTerr" value="2"/> <!-- Needs to be 2, allows for both Harbour and Mart Constructions --> <option name="constructionsPerTerrPerTypePerTurn" value="1"/> <option name="unitPlacementOnlyAllowedIn" value="$AllKyudenCoastalCities$"/> <option name="consumesUnits" value="1:Tsu_(Harbour)"/> <option name="createsUnitsList" value="1:Shuyo-Tsu_(Big-Harbour)"/> <!-- Creates Main Big Harbour during EndTurn --> <option name="tuv" value="4"/> </attachment>
Mart and Joseon equivalent are done the same.
This is the player attachment.<!-- This will prevent the ability to place 2 Harbour or Mart --> <!-- The purchasable Big's are not listed here!! --> <attachment foreach="$AllPlayers$" name="playerAttachment" attachTo="@AllPlayers@" javaClass="PlayerAttachment" type="player"> <option name="retainCapitalNumber" value="0"/> <option name="retainCapitalProduceNumber" value="0"/> <!-- Big_ units are not placed in placementLimit --> <option name="placementLimit" value="allied:Sijung_(Mart):Keun-Sijung_(Big-Mart):Ichiba_(Mart):Shuyo-Ichiba_(Big-Mart)" count="1"/> <option name="placementLimit" value="allied:Hangu_(Harbour):Keun-Hangu_(Big-Harbour):Tsu_(Harbour):Shuyo-Tsu_(Big-Harbour)" count="1"/> </attachment>
You can have both Harbour and Mart in a territory <option name="maxConstructionsPerTypePerTerr" value="2"/>, as long as its allowed, but they cannot be placed during the same turn <option name="constructionsPerTerrPerTypePerTurn" value="1"/>. And the placementLimit prevents more than one per type. "createsUnitsList" works on the EndTurn, therefore a clean up trigger.
<!-- Only remove purchased Big_ units not Big- units --> <attachment foreach="$AllPlayers$:$AllPlayersLC$" name="triggerAttachmentRemove@AllPlayers@BigPurchased" attachTo="@AllPlayers@" javaClass="RulesAttachment" type="player"> <option name="conditions" value="conditionAttachmentAlwaysTrue"/> <option name="removeUnits" value="Keun-Sijung_(Big_Mart):Shuyo-Ichiba_(Big_Mart):Keun-Hangu_(Big_Harbour):Shuyo-Tsu_(Big_Harbour)" count="99"/> <option name="when" value="after:@AllPlayersLC@EndTurn"/> </attachment>
As for the Minor, triggers to strip out/add "givesMovement". This can be done for all the units that change slightly when used by Minor.
Cheers...
-
There are a lot of these:
<attachment name="conditionAttachmentTurn1" attachTo="Minor" javaClass="RulesAttachment" type="player"> <option name="rounds" value="1"/> </attachment> ... ... ... <attachment name="conditionAttachmentTurn1" attachTo="Wako" javaClass="RulesAttachment" type="player"> <option name="rounds" value="1"/> </attachment>
They have the same name and can cause confusion within the engine. Use just one, the attachTo in this case doesn't mater.
Using the Initial Setup steps:
<!-- GO Notify Kami placement --> <attachment name="triggerAttachment_Notify_Prologue" attachTo="Minor" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAlwaysTrue"/> <option name="notification" value="Notify_Prologue"/> <option name="players" value="$AllPlayers-Joseon$"/> <option name="when" value="before:minorSetUpPlacePlace"/> <!-- maxRunCount = 1 so this will only run once. Thats why "AlwaysTrue" will work. --> </attachment>
Personally, I don't trust triggers. I want to control how the fire and when. So, I always have 'conditions' and 'when'. Some triggers I want to fire all the time, thus conditions=AlwaysTrue.
<attachment name="conditionAttachmentAlwaysTrue" attachTo="Minor" javaClass="RulesAttachment" type="player"> <option name="switch" value="true"/> </attachment>
Usually, its my very first condition, right at the very top of the condition/trigger area.
So:<!-- GO RandomKami kami-0 are for padding & to aid random placement --> <attachment name="triggerAttachment_Place_Kami" attachTo="Minor" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachmentAlwaysTrue"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-..........." count="1"/> <option name="purchase" value="kami-............" count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-............." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-.............." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-..............." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-................" count="1"/> <option name="purchase" value="kami-................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-.................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-..................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-...................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-....................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-......................" count="1"/> <option name="purchase" value="kami-......................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-........................" count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-........................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-.........................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-..........................." count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-............................" count="1"/> <option name="purchase" value="kami-0" count="1"/> <option name="purchase" value="kami-............................." count="1"/> <option name="purchase" value="kami-.............................." count="1"/> <option name="when" value="after:setupRandomStartDelegate"/> <!-- maxRunCount=1 so uses not needed --> <!-- <option name="uses" value="1"/> --> </attachment>
Just some more thoughts---
Cheers...
-
@wc_sumpton great feedback, just one small note: a mart can only be build in inland terr's and a harbour (considered to be a mart at seaside) only at coastal terr's... so they never can be placed aside eachother, but I see where your code suggestions should be adapted on that! thanks for the superb detailed suggestions! I appreciate!
-
@ebbe said in issue with upgrading units (consumesUnit & name="constructionType":
so they never can be placed aside eachother
Really, I thought so, but your original problem, plus the workaround suggested differently (Yamato is listed for both). If that is the case, then there would be no need for the dummy unit.
So please clarify: Yes, to both and can have both. Yes to but can only have one. No and Yamato is a mistake.
Cheers...
-
I noticed this note:
<!-- CAN THIS BE DONE EASIER WITH foreach? places MON on pre-selected / reserved VANQUISHED CLANS-FIELD panel -->
Why not call the territories "Clan Wako Vanquished", "Clan Otomo Vanquished" etc...? Then:
<attachment foreach="$AllPlayers$" name="conditionAttachment_Place_Vanq_@AllPlayers@" attachTo="@AllPlayers@" javaClass="RulesAttachment" type="player"> <option name="directOwnershipTerritories" value="controlledNoWater" count="1"/> <option name="invert" value="true"/> </attachment> <attachment foreach="$AllPlayers$" name="triggerAttachment_Place_Vanq_@AllPlayers@" attachTo="@AllPlayers@" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Place_Vanq_@AllPlayers@"/> <option name="placement" value="Clan @AllPlayers@ Vanquished:Vanquished" count="1"/> <option name="uses" value="1"/> <option name="when" value="before:minorCombatMove"/> </attachment> <attachment foreach="$AllPlayers$" name="triggerAttachment_Remove_Fleet_@AllPlayers@" attachTo="@AllPlayers@" javaClass="TriggerAttachment" type="player"> <option name="conditions" value="conditionAttachment_Place_Vanq_@AllPlayers@"/> <!-- would need to add the other units here --> <option name="removeUnits" value="all:Kobaya:Wako-Sengokubune:Teitoku-Wako-Sengokubune" count="99"/> <option name="uses" value="1"/> <option name="when" value="before:minorCombatMove"/> </attachment>
Thoughts---
Cheers...
-
@wc_sumpton No one can have only have one type: so either harbour at coastal sides and its bigger upgrade, or mart and its big brother... inland
Couldn't find Yamato twice in the <variable name="AllKyudenCoastalCities"> elements list, and for Tsu_(harbour) unitattachment it is listed in: unitPlacementRestrictions , which is correct and for
Ichiba_(Mart) in <option name="unitPlacementOnlyAllowedIn
so that makes sense... which double Yamato you refer to?