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 30: | Line 30: | ||
# Obtain the source code to an example mod, such as the Randomized Wastelands Mod from https://github.com/FizzerWL/ExampleMods/tree/master/RandomizedWastelandsMod. Download the lua files to a folder on your device. (The easiest way is to use Github's "Download zip" button if you're not a git user) | # Obtain the source code to an example mod, such as the Randomized Wastelands Mod from https://github.com/FizzerWL/ExampleMods/tree/master/RandomizedWastelandsMod. Download the lua files to a folder on your device. (The easiest way is to use Github's "Download zip" button if you're not a git user) | ||
# Download the Warzone Mod Helper VS Code extension VSIX file from https://github.com/FizzerWL/WarzoneModHelper/releases. Install it by launching VS Code, pressing Ctrl+Shift+P, entering "Install from VSIX" and selecting the VSIX file you downloaded. | # Download the Warzone Mod Helper VS Code extension VSIX file from https://github.com/FizzerWL/WarzoneModHelper/releases. Install it by launching VS Code, pressing Ctrl+Shift+P, entering "Install from VSIX" and selecting the VSIX file you downloaded. | ||
− | |||
# Open the Mod Development Console at https://www.warzone.com/Mods/Develop | # Open the Mod Development Console at https://www.warzone.com/Mods/Develop | ||
# Click the "Create New Mod" button and give your mod a name. Ensure the "Development" box is checked. After creating it, make note of your Mod ID. | # Click the "Create New Mod" button and give your mod a name. Ensure the "Development" box is checked. After creating it, make note of your Mod ID. | ||
Line 75: | Line 74: | ||
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 100: | Line 99: | ||
* [[Mod Hooks]] | * [[Mod Hooks]] | ||
* [[Mod Game Data Storage]] | * [[Mod Game Data Storage]] | ||
− | |||
− | |||
[[Category:Mod Developers Guide]] | [[Category:Mod Developers Guide]] |