Both sides previous revisionPrevious revisionNext revision | Previous revision |
modding:xml:systemmap [2017/02/04 00:35] – [TopologyProcessor] 0xabcdef | modding:xml:systemmap [2017/02/07 00:39] (current) – [TopologyProcessor] 0xabcdef |
---|
| |
===== TopologyProcessor ===== | ===== TopologyProcessor ===== |
When the entire topology has been created, we iterate over all <TopologyProcessor> nodes in order and apply them to the topology. A TopologyProcessor is an element that can assign additional attributes to existing nodes and a SystemType to nodes that do not already have one. There can be multiple instances of a TopologyProcessor in a SystemMap. Additionally, TopologyProcessors are recursive in that the <Group> and <Processor> elements will act as TopologyProcessors of their own, using the nodes filtered by their parent. Any <System> element can have either an **attributes** attribute or a <Table> element containing multiple <System> subelements, each with their own **attributes** and **chance** attributes. | When the entire topology has been created, we iterate over all <TopologyProcessor> nodes in order and apply them to the topology. A TopologyProcessor is an element that can assign additional attributes to existing nodes and a SystemType to nodes that do not already have one. There can be multiple instances of a TopologyProcessor in a SystemMap. Additionally, TopologyProcessors are recursive in that the <Group>, <Processor>, and any element with a <System> subelement will act as a TopologyProcessor of its own, using the nodes filtered by the parent. |
* Zero or one <Criteria>. Determines which nodes the processor applies to. The processor affects all nodes under its criteria. If there is no <Criteria>, all nodes are affected. This applies to the <TopologyProcessor>, which will process every single node on the map. | * Zero or one <Criteria>. Determines criteria (in addition to any pre-existing criteria) for determining which nodes the processor applies to. If there is no <Criteria>, all nodes are affected. This works for the <TopologyProcessor>, which will process every single node on the map. |
* An <Attributes> element that filters nodes by their attributes | * An <Attributes> element that filters nodes by their attributes |
* **criteria=** Contains the attributes to filter with. | * **criteria=** Contains the attributes to filter with. |
* **"+{attribute};"** means that nodes must have {attribute}. "+systemType:0;" specifies nodes without a <SystemType> | * **"+{attribute};"** means that nodes must have {attribute}. "+systemType:0;" specifies nodes without a <SystemType> |
* **"-{attribute};"** means that nodes must not have {attribute} | * **"-{attribute};"** means that nodes must not have {attribute} |
* Zero or one <System> | * Zero or one <System>. |
| * **name=** |
* **attributes=** The attributes to apply to the affected nodes. | * **attributes=** The attributes to apply to the affected nodes. |
| * **level=** |
| * **unid=** The UNID of the new SystemType to assign to the affected nodes. |
| * Zero or one <Table>. Only works if none of the above attributes are defined in the element. |
* Zero or more <Group>. Same as <TopologyProcessor>. | * Zero or more <Group>. Same as <TopologyProcessor>. |
* Zero or more <ConquerNodes>. In this processor category, "Conquerors" take turns attempting to "occupy" every eligible node. Each node can be taken by only one Conqueror. Every turn, a conqueror first attempts to create one new seed, then each of its seeds attempt to expand into adjacent nodes. | * Zero or more <ConquerNodes>. In this processor category, "Conquerors" take turns attempting to "occupy" every eligible node. Each node can be taken by only one Conqueror. Every turn, a conqueror first attempts to create one new seed, then each of its seeds attempt to expand into adjacent nodes. |
* **nodeCount=** | * **nodeCount=** |
* One <Criteria> | * One <Criteria> |
* Zero or more <FillNodes> | * Zero or more <FillNodes>. Processes every eligible node in random order. |
* <Attributes> | * <Attributes> |
* <Criteria> | * <Criteria> |
* One <System> | * One <System> |
* Zero or more <RandomPoints> | * Zero or more <RandomPoints> |
| * Zero or more <Table> |
| * Zero or one <Criteria> |
| * Zero or more <System> |
| * **chance=** The chance that the **attributes** and **unid** of this element will be applied to the affected nodes. |