This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
designer_tutorials:tutorials:factories:factories [2013/09/21 06:36] M57 [Factory Activation Chart] |
designer_tutorials:tutorials:factories:factories [2015/03/25 19:13] Kjeld [Harnessing the Power of Factories] factory order of operations |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== Factories ======= |
===== The Basics ===== | ===== The Basics ===== | ||
Line 36: | Line 36: | ||
**Universal Factory +N** -- As above, but adds units to territory ONLY if it is occupied by Neutral | **Universal Factory +N** -- As above, but adds units to territory ONLY if it is occupied by Neutral | ||
+ | **AutoNeutral** -- Converts target territory to Neutral and adds further units as Neutrals | ||
+ | |||
+ | **AutoNeutralReset** Converts target territory to Neutral, resets to zero units and then adds further units as Neutrals | ||
==== Factory Activation Chart ==== | ==== Factory Activation Chart ==== | ||
| ^ Player owns Factory | | ^ Player owns Factory | ||
Line 43: | Line 46: | ||
^ Universal -N | Yes | ^ Universal -N | Yes | ||
^ Universal +N | No | No | ^ Universal +N | No | No | ||
- | ^ AutoNeutral | + | ^ AutoNeutral |
+ | ^ AutoNeutralReset | ||
+ | |||
+ | Factories that change the ownership of the target territory (AutoCapture and AutoNeutral) execute in a loop in order of alphanumeric factory name. | ||
==== Caps ==== | ==== Caps ==== | ||
Factories have an optional unit cap setting. If the number of units on the factory equals or exceeds the specified cap, the factory will not produce any further units. | Factories have an optional unit cap setting. If the number of units on the factory equals or exceeds the specified cap, the factory will not produce any further units. | ||
- | |||
==== But There' | ==== But There' | ||
Line 63: | Line 69: | ||
* A negative bonus has been assigned. If at the beginning of any player' | * A negative bonus has been assigned. If at the beginning of any player' | ||
===== Harnessing the Power of Factories ===== | ===== Harnessing the Power of Factories ===== | ||
+ | |||
+ | To truly harness the power of factories, you first have to understand how the game engine applies auto-capture effects, eliminations, | ||
+ | |||
+ | |||
+ | **1. Loop through all continents** | ||
+ | |||
+ | - For each continent check to see whether the player owns the continent. | ||
+ | - If the player owns the continent, check to see whether this continent has a factory. If it does, add it to the list of factory bonuses. | ||
+ | - Now check to see if the player owns the factory territory, if they don't and the factory is an auto-assign type (AutoCapture, | ||
+ | - If continent does not have a factory then add the continent bonus to the player' | ||
+ | |||
+ | |||
+ | |||
+ | **2. Loop through list of territories to auto-assign to the player / neutral** | ||
+ | |||
+ | - Update ownership of territory | ||
+ | - Check to see if this results in an elimination of a player by capturing their final capital, if so process capital elimination | ||
+ | - Check to see whether this resulted in the player being eliminated | ||
+ | |||
+ | |||
+ | |||
+ | **3. Loop through the list of factory bonuses** | ||
+ | |||
+ | - Check the bonus will not exceed territory maxes / mins and apply change to board state | ||
+ | - Check for abandonment of territory (if this was a negative factory) and abandon is on | ||
+ | - Check to see if this abandonment resulted in the player being eliminated | ||
+ | - Check to see if this abandonment resulted in a player' |