I have some territories with a max unit count of 1.
So I thought that any factories that affect the unit counts of this territory and put it below zero would instead just put it to zero, and any factories that put it above 1 would instead just put it to 1.
But it appears that this limits (at least 0 and at most 1) do not get applied until the end of the factory phase.
In practical terms
I thought:
Territory A has 0 units.
Territory A gets -1 bonus (Still has 0 units because can't have negative units)
Territory A gets +1 bonus (Now has 1 unit.)
What actually happens:
Territory A has 0 units.
Territory A gets -1 bonus (Now has -1 units, range limitations not applied yet)
Territory A gets +1 bonus (Now has zero units).
Just putting that out there in case anyone runs into this, or has already dealt with it and can confirm or deny.
Interesting, seems like it should function like you thought. I'm wondering if this what I was seeing in Post 8 here: http://www.wargear.net/forum/showthread/2949/Question_about_order_of_factory_behavior
as I was trying to empty a territory and then retake it later if another condition was met, but maybe emptying it took it too negative and thus made it appear that they were out of order.
I can see how either would make sense, and I've figured out a better way to do what I want that will hopefully make the whole thing moot.
But yeah, once you start doing some more advanced stuff with the factories you really need to know the details of how it works. Might be good to get some of that up on a FAQ or try to put it into that Map Design wiki.
Thanks for the observation. I have a map idea that I had thrown out because it would require the factories to work this way and I had also assumed that the unit limit was enforced throughout the process.
Well, I hope I understood it right. This is all based on a few simple tests I did, so let me know if you run into conflicting evidence.