How to make a factory that can only produce Infantry?
I'm trying to make a minor factory that can only produce infantry.
I've tried using the "requiresUnits" = "factory" on every non-infantry unit and they can still be placed in the minor factory's location.
I've tried making all starting factories the main factories and disallowing their production, and putting "unitPlacementRestrictions" = All locations that they aren't in and same thing. I can still make tanks/fighters/ships from minor factories.
I recently made a unit that produces only infantry. I don't think you can use "isFactory". This is from POS2:
"isFactory is no longer its own variable. Instead isFactory just sets the above variables. setting is factory will possibly overwrite those variables, so do not use it if you are planning to set those variables to something else."
So I think it's overriding requiresUnits. So try removing isFactory and then requiresUnits should work. You'll have to add the factory stuff that you want separately. Such as isInfrastructure, well here's what I did, you probably don't need it all:
So just give a reread on POS2 of what you want to add. Also if you want to restrict placement you can do by TTy PU value and not TTy specific. Ask again if you need to.
One problem I did run into that I couldn't solve is that I wanted the Base to only produce 3 max inf. In order to have inf still able to build max at factories though I had to set it to their max, which is 10, making it player enforced.
One other thing was it would max produce with 2 damage whereas the factory would only produce 1 or 2 if 1 damage. Maybe someone else knows if you can adjust that.