<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Restricting unit builds]]></title><description><![CDATA[<p dir="auto">In a mod I am working on units can be built at either a factory(anything)  or recruitmentCenter (infantry only).</p>
<p dir="auto">The code is</p>
<pre><code>&lt;attachment name="unitAttachment" attachTo="factory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;
&lt;option name="isFactory" value="true"/&gt;
&lt;/attachment&gt;

&lt;attachment name="unitAttachment" attachTo="recruitmentCenter" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;
 &lt;option name="isFactory" value="true" /&gt;
 &lt;option name="canBeDamaged" value="false" /&gt;
&lt;/attachment&gt;

&lt;attachment name="unitAttachment" attachTo="infantry" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;
&lt;option name="movement" value="1"/&gt;
&lt;option name="transportCost" value="1"/&gt;
&lt;option name="attack" value="1"/&gt;
&lt;option name="defense" value="2"/&gt;
&lt;option name="isLandTransportable" value="true"/&gt;
&lt;option name="artillerySupportable" value="true"/&gt;
&lt;option name="requiresUnits" value="recruitmentCenter" /&gt;
&lt;option name="requiresUnits" value="factory" /&gt;
&lt;/attachment&gt;

&lt;attachment name="unitAttachment" attachTo="armor" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"&gt;
&lt;option name="movement" value="2"/&gt;
&lt;option name="transportCost" value="2"/&gt;
&lt;option name="canBlitz" value="true"/&gt;
&lt;option name="attack" value="3"/&gt;
&lt;option name="defense" value="2"/&gt;
&lt;option name="requiresUnits" value="factory" /&gt;
&lt;/attachment&gt;
</code></pre>
<p dir="auto">However armor can be placed at a recruitmentCenter. I have done this before in another mod without a problem (WW2-Zombies). I have attached the full xml file. <a href="/assets/uploads/files/1775597998157-east_and_west-manual.xml">East_and_West-Manual.xml</a></p>
<p dir="auto">Does anyone have any idea what the problem is? Is there another way of creating infantry-only production?</p>
]]></description><link>https://forums.triplea-game.org/topic/4298/restricting-unit-builds</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 12:45:35 GMT</lastBuildDate><atom:link href="https://forums.triplea-game.org/topic/4298.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Apr 2026 21:41:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Restricting unit builds on Wed, 08 Apr 2026 05:02:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://forums.triplea-game.org/uid/99">@RogerCooper</a></p>
<p dir="auto">Did a quick scan did not see;</p>
<pre><code>&lt;property name="Unit Placement Restrictions" value="true" editable="false"&gt;
      &lt;boolean/&gt;
    &lt;/property&gt;
</code></pre>
<p dir="auto">Which I think requiresUnit to work.</p>
<p dir="auto">Cheers</p>
]]></description><link>https://forums.triplea-game.org/post/76590</link><guid isPermaLink="true">https://forums.triplea-game.org/post/76590</guid><dc:creator><![CDATA[wc_sumpton]]></dc:creator><pubDate>Wed, 08 Apr 2026 05:02:18 GMT</pubDate></item><item><title><![CDATA[Reply to Restricting unit builds on Tue, 07 Apr 2026 22:01:30 GMT]]></title><description><![CDATA[<p dir="auto">hmm maybe the "isFactory" is allowing it ?</p>
<p dir="auto">This is sloppy and from years ago but the "MiltaryBase" only allows infantry builds</p>
<p dir="auto"><img src="/assets/uploads/files/1775599159620-screenshot-from-2026-04-07-16-58-45.png" alt="Screenshot from 2026-04-07 16-58-45.png" class="img-responsive img-markdown" /></p>
<p dir="auto">The Infantry are the only ones that require the MB. The Armour doesn't e.g.</p>
<p dir="auto"><img src="/assets/uploads/files/1775599213746-screenshot-from-2026-04-07-16-59-07.png" alt="Screenshot from 2026-04-07 16-59-07.png" class="img-responsive img-markdown" /></p>
<p dir="auto"><img src="/assets/uploads/files/1775599273561-98c84541-a0b5-42a0-a4c0-b352c4c6ece3-image.png" alt="98c84541-a0b5-42a0-a4c0-b352c4c6ece3-image.png" class="img-responsive img-markdown" /></p>
]]></description><link>https://forums.triplea-game.org/post/76581</link><guid isPermaLink="true">https://forums.triplea-game.org/post/76581</guid><dc:creator><![CDATA[beelee]]></dc:creator><pubDate>Tue, 07 Apr 2026 22:01:30 GMT</pubDate></item></channel></rss>