Editing Mod Hooks
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 36: | Line 36: | ||
** Arguments: | ** Arguments: | ||
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game. | # [[Mod API Reference:Game|Game]]: Provides read-only information about the game. | ||
− | # addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn | + | # addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the start of the turn. Pass a single GameOrder as the only argument to this function. You may call this function multiple times if you wish. |
− | + | ||
− | + | ||
− | + | ||
Line 52: | Line 49: | ||
## WL.ModOrderControl.Skip: Indicates this order should be skipped. It won't appear in the orders list at all and it will be as if the order never existed. A [[Mod API Reference:GameOrderEvent|GameOrderEvent]] will be written into the orders list to tell the player who entered this order that their order was skipped. | ## WL.ModOrderControl.Skip: Indicates this order should be skipped. It won't appear in the orders list at all and it will be as if the order never existed. A [[Mod API Reference:GameOrderEvent|GameOrderEvent]] will be written into the orders list to tell the player who entered this order that their order was skipped. | ||
## WL.ModOrderControl.SkipAndSupressSkippedMessage: Same as Skip, except that the GameOrderEvent is not written. This should be used with care, as players will want to know why their order didn't appear in the orders list. This should only be used if you use some other mechanism to explain to the player why their order was not present, or if this is an order that your mod inserted and therefore no players were expecting it. | ## WL.ModOrderControl.SkipAndSupressSkippedMessage: Same as Skip, except that the GameOrderEvent is not written. This should be used with care, as players will want to know why their order didn't appear in the orders list. This should only be used if you use some other mechanism to explain to the player why their order was not present, or if this is an order that your mod inserted and therefore no players were expecting it. | ||
− | # addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the | + | # addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the turn, which will be inserted just after the current order. Pass a single GameOrder as the only argument to this function. You may call this function multiple times if you wish. |
Line 59: | Line 56: | ||
** Arguments: | ** Arguments: | ||
# [[Mod API Reference:Game|Game]]: Provides read-only information about the game. | # [[Mod API Reference:Game|Game]]: Provides read-only information about the game. | ||
− | # addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the | + | # addNewOrder: A function that you can call to add a [[Mod API Reference:GameOrder|GameOrder]] to the end of the turn. Pass a single GameOrder as the only argument to this function. You may call this function multiple times if you wish. |