Editing Mod Hooks

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 64: Line 64:
 
* Server_GameCustomMessage (Server_GameCustomMessage.lua)
 
* Server_GameCustomMessage (Server_GameCustomMessage.lua)
 
** Called whenever your mod calls [[Mod API Reference:ClientGame|ClientGame]].SendGameCustomMessage.  This gives mods a way to communicate between the client and server outside of a turn advancing.  Note that if a mod changes Mod.PublicGameData or Mod.PlayerGameData, the clients that can see those changes and have the game open will automatically receive a refresh event with the updated data, so this message can also be used to push data from the server to clients.
 
** Called whenever your mod calls [[Mod API Reference:ClientGame|ClientGame]].SendGameCustomMessage.  This gives mods a way to communicate between the client and server outside of a turn advancing.  Note that if a mod changes Mod.PublicGameData or Mod.PlayerGameData, the clients that can see those changes and have the game open will automatically receive a refresh event with the updated data, so this message can also be used to push data from the server to clients.
** [[Mod_Security|Mod security]] should be applied when working with this Hook
 
 
** 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.
Line 70: Line 69:
 
# payload: The data passed as the ''payload'' parameter to SendGameCustomMessage.  Must be a lua table.
 
# payload: The data passed as the ''payload'' parameter to SendGameCustomMessage.  Must be a lua table.
 
# setReturn: Optionally, a function that sets what data will be returned back to the client.  If you wish to return data, pass a table as the sole argument to this function.  Not calling this function will result in an empty table being returned.
 
# setReturn: Optionally, a function that sets what data will be returned back to the client.  If you wish to return data, pass a table as the sole argument to this function.  Not calling this function will result in an empty table being returned.
 +
**[[Mod_Security|Mod security]] should be applied when working with this Hook
  
 
== Client Hooks ==
 
== Client Hooks ==

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