@redrum Is there a way to get the AI to consider buying production buildings that are not called "factory"? Right now I am designing a map where large factories are only available as starting units placed during game start-up, but players can purchase smaller factories (called "barracks") whenever they like.
I could rename the "barracks" unit to be called "factory" and call the factory something else, but I would need new graphics; the barracks looks like a barracks and the factory looks like a factory.
I tried adding "isInfrastructure=true" to my barracks unit, per your general AI thread, but that didn't seem to change anything.
<attachment name="unitAttachment" attachTo="barracks" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="isFactory" value="true"/> <option name="isInfrastructure" value="true"/> <option name="canBeDamaged" value="true"/> <option name="canProduceXUnits" value="3"/> <option name="canOnlyBePlacedInTerritoryValuedAtX" value="2"/> <option name="destroyedWhenCapturedBy" value="Americans:French:British:Russians:Chinese:Germans:Italians:Japanese"/> </attachment>
Right now the AI is not buying any barracks even when it has way more cash than it could possibly spend at its starting factories, and I'd like to change that if I can.