Mod API Reference:TerritoryModification: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
* '''AddSpecialUnits''' ''Array<[[Mod API Reference:SpecialUnit|SpecialUnit]]>'': | * '''AddSpecialUnits''' ''Array<[[Mod API Reference:SpecialUnit|SpecialUnit]]>'': | ||
* '''SetArmiesTo''' ''[[Mod API Reference:Nullable|Nullable]]<integer>'': Sets the number of armies on the territory to this number. | * '''SetArmiesTo''' ''[[Mod API Reference:Nullable|Nullable]]<integer>'': Sets the number of armies on the territory to this number. | ||
* '''AddArmies''' ''[[Mod API Reference:Nullable|Nullable]]<integer>'': Adds (or removes with negative numbers) armies from the territory. When adding or removing a specific number, this is preferred over SetArmiesTo since it promotes | * '''AddArmies''' ''[[Mod API Reference:Nullable|Nullable]]<integer>'': Adds (or removes with negative numbers) armies from the territory. When adding or removing a specific number, this is preferred over SetArmiesTo since it promotes compatibility with other mods. | ||
* '''SetOwnerOpt''' ''[[Mod API Reference:Nullable|Nullable]]<[[Mod API Reference:PlayerID|PlayerID]]>'': | * '''SetOwnerOpt''' ''[[Mod API Reference:Nullable|Nullable]]<[[Mod API Reference:PlayerID|PlayerID]]>'': | ||
* '''SetStructuresOpt''' ''Table<[[Mod API Reference:StructureType|StructureType]] (enum),integer>'': Sets the number of structures, such as [[cities]], on this territory. Nil to simply make no changes. | * '''SetStructuresOpt''' ''Table<[[Mod API Reference:StructureType|StructureType]] (enum),integer>'': Sets the number of structures, such as [[cities]], on this territory. Nil to simply make no changes. | ||
* '''AddStructuresOpt''' ''Table<[[Mod API Reference:StructureType|StructureType]] (enum),integer>'': Adds (or removes with negative numbers) structures, such as [[cities]], on this territory. When adding or removing a specific number of structures, this is preferred over SetStructuresOpt since it promotes | * '''AddStructuresOpt''' ''Table<[[Mod API Reference:StructureType|StructureType]] (enum),integer>'': Adds (or removes with negative numbers) structures, such as [[cities]], on this territory. When adding or removing a specific number of structures, this is preferred over SetStructuresOpt since it promotes compatibility with other mods. | ||
* '''RemoveSpecialUnitsOpt''' ''[[Mod API Reference:HashSet|HashSet]]<[[Mod API Reference:Guid|Guid]]>'': Specifies the IDs of special units you want removed (deleted) from this territory. Added in v5.22.0. | |||
== Functions == | == Functions == |
Latest revision as of 13:59, 28 December 2022
TerritoryModification:
- TerritoryID TerritoryID:
- AddSpecialUnits Array<SpecialUnit>:
- SetArmiesTo Nullable<integer>: Sets the number of armies on the territory to this number.
- AddArmies Nullable<integer>: Adds (or removes with negative numbers) armies from the territory. When adding or removing a specific number, this is preferred over SetArmiesTo since it promotes compatibility with other mods.
- SetOwnerOpt Nullable<PlayerID>:
- SetStructuresOpt Table<StructureType (enum),integer>: Sets the number of structures, such as cities, on this territory. Nil to simply make no changes.
- AddStructuresOpt Table<StructureType (enum),integer>: Adds (or removes with negative numbers) structures, such as cities, on this territory. When adding or removing a specific number of structures, this is preferred over SetStructuresOpt since it promotes compatibility with other mods.
- RemoveSpecialUnitsOpt HashSet<Guid>: Specifies the IDs of special units you want removed (deleted) from this territory. Added in v5.22.0.
Functions
- WL.TerritoryModification.Create(terrID TerritoryID) (static) returns TerritoryModification: