Editing Mod Developers Guide
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 2: | Line 2: | ||
This guide assumes that you know the Lua programming language. If you've worked with other languages, such as Javascript, Lua should be very easy to learn. Many tutorials are available on the internet if you search for them. | This guide assumes that you know the Lua programming language. If you've worked with other languages, such as Javascript, Lua should be very easy to learn. Many tutorials are available on the internet if you search for them. | ||
− | |||
− | |||
== Getting started creating a mod == | == Getting started creating a mod == | ||
− | + | To make your own mod, follow these steps: | |
− | + | ||
− | + | ||
# Open the page https://www.warzone.com/EnableModDevelopment to enable mod development for your Warzone account. | # Open the page https://www.warzone.com/EnableModDevelopment to enable mod development for your Warzone account. | ||
Line 16: | Line 12: | ||
# Launch the Standalone Client, sign in. Click the "Mod Development Console" button. You can also use the hotkey Ctrl+Shift+M to bring up this dialog any time, and also note that this dialog can be docked to sides of your screen if you wish. | # Launch the Standalone Client, sign in. Click the "Mod Development Console" button. You can also use the hotkey Ctrl+Shift+M to bring up this dialog any time, and also note that this dialog can be docked to sides of your screen if you wish. | ||
# Click the "Create New Mod" button and give your mod a name. | # Click the "Create New Mod" button and give your mod a name. | ||
− | # Provide path to your folder with lua files that you downloaded in step | + | # Provide path to your folder with lua files that you downloaded in step 2. |
# Click Submit to create the mod. | # Click Submit to create the mod. | ||
# From the single-player main menu, click "Custom Game", then scroll down and click Change Mods. | # From the single-player main menu, click "Custom Game", then scroll down and click Change Mods. | ||
Line 23: | Line 19: | ||
Now you can make modifications to the lua code, press the "Reload code" button and try them out! | Now you can make modifications to the lua code, press the "Reload code" button and try them out! | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Be sure to read the rest of this page for essential information on mod development. | Be sure to read the rest of this page for essential information on mod development. | ||
− | |||
− | |||
− | |||
− | |||
== Hooks == | == Hooks == | ||
Line 75: | Line 50: | ||
Never assume any state will persist, unless specifically called out in the documentation. For example, don't write to a global variable in one hook and access it in another. | Never assume any state will persist, unless specifically called out in the documentation. For example, don't write to a global variable in one hook and access it in another. | ||
− | If you try to in a single-player game, you may find that global state does persist. However, don't be tempted to rely on this, since globals are always wiped in multi-player, and globals will also get wiped in single-player if someone saves and re-loads their game. Therefore, ensure you code as if globals will never persist between hook calls, except where | + | If you try to in a single-player game, you may find that global state does persist. However, don't be tempted to rely on this, since globals are always wiped in multi-player, and globals will also get wiped in single-player if someone saves and re-loads their game. Therefore, ensure you code as if globals will never persist between hook calls, except where expliclty allowed. |
== Data Storage == | == Data Storage == | ||
Line 94: | Line 69: | ||
== See Also == | == See Also == | ||
− | |||
* [[Mod API Reference]] | * [[Mod API Reference]] | ||
* [[Mod Backwards Compatibility]] | * [[Mod Backwards Compatibility]] | ||
− | * [[ | + | * [[Promoted Mods]] |
* [[Mod Hooks]] | * [[Mod Hooks]] | ||
* [[Mod Game Data Storage]] | * [[Mod Game Data Storage]] | ||
− | |||
− | |||
[[Category:Mod Developers Guide]] | [[Category:Mod Developers Guide]] |