Editing Mod API Reference:GameOrderEvent

Jump to: navigation, search

Warning: You are not logged in.

Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
  
'''GameOrderEvent''':  Subclass of [[Mod API Reference:GameOrder|GameOrder]].  This is a generic event that can present a message or modify territories.  It can also control which players can see it.  It was added for use by [[Mods]] and is not used by any built-in game mechanics.
+
'''GameOrderEvent''':  Subclass of [[Mod API Reference:GameOrder|GameOrder]].  This is a generic event that can present a message or modify territories.  It can also control which players can see it.  It was added for use by [[Mod|Mods]] and is not used by any built-in game mechanics.
* '''Message''' ''string'':  
+
* '''Message''' ''string'': The message displayed in the orders list.  Must be specified.
 
* '''TerritoryModifications''' ''Array<[[Mod API Reference:TerritoryModification|TerritoryModification]]>'': Optionally, can modify territories, such as changing ownership or armies.
 
* '''TerritoryModifications''' ''Array<[[Mod API Reference:TerritoryModification|TerritoryModification]]>'': Optionally, can modify territories, such as changing ownership or armies.
* '''VisibleToOpt''' ''[[Mod API Reference:HashSet|HashSet]]<[[Mod API Reference:PlayerID|PlayerID]]>'':  Defines who this event is visible to.  Note that the player this event is assigned to can '''always''' see it, and any player who can see the effects of a territory modification can always see it as well.  Set this to nil to mean that it should be visible to everyone (public).  Set this to an empty list to indicate that the event should not be visible to anyone, except those that can see it by a previously mentioned rule.
+
* '''VisibleToOpt''' ''[[Mod API Reference:HashSet|HashSet]]<[[Mod API Reference:PlayerID|PlayerID]]>'':  Defines who this event is visible to.  Note that the player this event is assigned to can '''always''' see it, and any player who can see the affects of a territory modification can always see it as well.  Set this to nil to mean that it should be visible to everyone (public).  Set this to an empty list to indicate that the event should not be visible to anyone, except those that can see it by a previously mentioned rule.
* '''SetResourceOpt''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],Table<[[Mod API Reference:ResourceType|ResourceType]] (enum),integer>>'':  Sets the resource value of a player, such as their [[gold]], to a specific value.
+
* '''IncomeMods''' ''Array<[[Mod API Reference:IncomeMod|IncomeMod]]>'':
+
* '''AddResourceOpt''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],Table<[[Mod API Reference:ResourceType|ResourceType]] (enum),integer>>'':  Adds (or subtracts with negative numbers) to the resources of a player, such as their [[gold]]. When adding or subtracting a fixed number, this is preferred over SetResourceOpt.  Added in version 5.20.0.
+
* '''AddCardPiecesOpt''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],Table<[[Mod API Reference:CardID|CardID]],integer>>'': Provides a way to add (or remove with negative numbers) pieces of a card to a player.  This can also add whole cards -- if the player's total cards exceeds the number of peices that make up that card as defined in the game settings, they will automatically be turned into whole cards and be given to the player.  This cannot remove whole cards.  For that, use RemoveWholeCardsOpt.
+
* '''RemoveWholeCardsOpt''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],[[Mod API Reference:CardInstanceID|CardInstanceID]]>'': Removes whole cards from a player. 
+
* '''JumpToActionSpotOpt''' ''[[Mod API Reference:RectangleVM|RectangleVM]]'': If specified, this will be the spot on the map that the map focuses on when the player clicks on this event in the orders list.  Specify coordinates on the map, which you can get by looking at a [[Mod API Reference:TerritoryDetails|TerritoryDetails]] object.
+
* '''ModID''' ''[[Mod API Reference:Nullable|Nullable]]<[[Mod API Reference:ModID|ModID]]>'':
+
  
 
== Functions ==
 
== Functions ==
  
* '''WL.GameOrderEvent.Create'''('''playerID''' ''[[Mod API Reference:PlayerID|PlayerID]]'', '''message''' ''string'', '''visibleToOpt''' ''[[Mod API Reference:HashSet|HashSet]]<[[Mod API Reference:PlayerID|PlayerID]]>'', '''terrModsOpt''' ''Array<[[Mod API Reference:TerritoryModification|TerritoryModification]]>'', '''setResourcesOpt''' ''Table<[[Mod API Reference:PlayerID|PlayerID]],Table<[[Mod API Reference:ResourceType|ResourceType]] (enum),integer>>'', '''incomeModsOpt''' ''Array<[[Mod API Reference:IncomeMod|IncomeMod]]>'') (static) returns [[Mod API Reference:GameOrderEvent|GameOrderEvent]]:
+
* '''WL.GameOrderEvent.Create'''('''playerID''' ''[[Mod API Reference:PlayerID|PlayerID]]'', '''message''' ''string'', '''visibleToOpt''' ''[[Mod API Reference:HashSet|HashSet]]<[[Mod API Reference:PlayerID|PlayerID]]>'', '''terrModsOpt''' ''Array<[[Mod API Reference:TerritoryModification|TerritoryModification]]>'') (static) returns [[Mod API Reference:GameOrderEvent|GameOrderEvent]]:
** playerID: Pass the ID of a player that this event pertains to.  This is one of the few players where WL.PlayerID.Neutral is an allowed value.  An event assigned to Neutral is suitable for events that weren't initiated by a player.
+
[[Category:Mod API Reference]]
+

Please note that all contributions to Warzone Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Warzone Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox