How to place units in allied or major/minor territory?
-
Dear TripleA community,
could you please explain to me how to place a unit in an allied or major/minor territory?For example, in order to entrench British units in France (allied faction) or in India (minor faction) I would like either to replace them with their entrenched versions (like Gart unit changes into owl/cat/bear and vice versa in Warcraft War Heroes map by @Frostion) or to let them build separate constructions (trenches/bunkers etc.), but it seems to me, that the TripleA only allows placement in own territories and not in allied/major/minor territories.
I hope I am wrong and there are options how to solve this issue. I appreciate very much any advice from you and thank you in advance for your help!
-
set <property name="maxFactoriesPerTerritory" value="2"/>
create a special factory type
<attachment name="unitAttachment" attachTo="special_UK_Factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
<option name="isFactory" value="true"/>
<option name="isAAforBombingThisUnitOnly" value="true"/>
</attachment>then define those special units
<attachment name="unitAttachment" attachTo="special_UK_unit" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
...
<option name="requiresUnits" value="special_UK_Factory"/>
</attachment>all those units have to be in the unit list of course
then place those special_UK_Factory in India in the initial setup and you can produce your units there as UK. there might be a second factory for all other units that the Indian nation may produce
try it
-
@numetalfan have you tried this with success ? I've never got it to work myself
-
tried - did not work
-
then there will be only a complex solution with triggers
UK will buy
...special_India_unit..
then place it in London
a condition will check if there is such a unit in London
another trigger will remove it in London and place it India
-
@numetalfan yea idk worth a shot. The Player whose turn it is would have to place or check for the special unit and that would trigger a placement for the non turn player maybe ?
I've messed around with it and it'd be cool to do but never got it to work
-
@numetalfan said in How to place units in allied or major/minor territory?:
set <property name="maxFactoriesPerTerritory" value="2"/>
create a special factory type
<attachment name="unitAttachment" attachTo="special_UK_Factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
<option name="isFactory" value="true"/>
<option name="isAAforBombingThisUnitOnly" value="true"/>
</attachment>then define those special units
<attachment name="unitAttachment" attachTo="special_UK_unit" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
...
<option name="requiresUnits" value="special_UK_Factory"/>
</attachment>all those units have to be in the unit list of course
then place those special_UK_Factory in India in the initial setup and you can produce your units there as UK. there might be a second factory for all other units that the Indian nation may produce
try it
And in the end of this you get a unit produced by Indian faction from the Indian factory located in India?
-
My idea was more an Indian factory for Indian units
and a second factory
A British one, also located in India, to produce British units there
But it seems this does not work.
Therefore triggers seem more promising
-
I would try creating more units, the indian units will need to end with say;
Indian units
Infantry_in
Tanks_in
factory_inThese units must specify the factory they can be produced from with
<option name="requiresUnits" value="factory_in/>British units
Tanks_br
Fighter_br
factory_brThese units must specify the factory they can be produced from with
<option name="requiresUnits" value="factory_br"/>Then the two factories can produce only their national units.
-
@numetalfan said in How to place units in allied or major/minor territory?:
My idea was more an Indian factory for Indian units
and a second factory
A British one, also located in India, to produce British units there
But it seems this does not work.
Therefore triggers seem more promising
yea i tried having two differently owned factories in same territory and it didn't work either
-
@thedog said in How to place units in allied or major/minor territory?:
I would try creating more units, the indian units will need to end with say;
Indian units
Infantry_in
Tanks_in
factory_inThese units must specify the factory they can be produced from with
<option name="requiresUnits" value="factory_in/>British units
Tanks_br
Fighter_br
factory_brThese units must specify the factory they can be produced from with
<option name="requiresUnits" value="factory_br"/>Then the two factories can produce only their national units.
In your idea you will get units produced by the faction on its own factory located in its own territory?
If "yes", then, sorry, your idea is not relevant to this topic.