War3Package
- About War3Package
- Usage
- Installation
About War3Package
War3Package is a tool to export the custom data from a Warcraft III map to a single file (with the .w3k extension), and to import that package into other Warcraft III maps. This allows developers to easily distribute packages intended to be used in various maps.
War3Package requires the Jass NewGen Pack. It (War3Package) is a wrapper around the Grimex tools, but it is often easier to use, since it only uses a single file which can be imported in one step. The following custom data is used:
- Imported Files
- Triggers
- Constants
- Object Data
Note that the environment data exported by the Grimex File Exporter is not used. This is because it is usually not wanted as part of the package, and Grimex does not provide an importer for it.
Usage
Once War3Package has been installed, it creates a new menu in the NewGen World Editor. This menu contains the following options:
- Create Package: Creates a new package with the custom data from the current map.
- Import Package: Imports the data from a package, selected by the user, to the current map.
- War3Package Readme: Opens the readme document in a web browser.
Like Grimex, the Create Package command does not save the map, rather using the last saved version. This means it does not modify the map at all. The Import Package command, however, saves and modifies the map. As with Grimex, the map should be closed and reopened after running this command.
Installation
War3Package can be installed by running the included install.bat script. The path to the Jass NewGen Pack installation should be passed as an argument, but if it is not, or if the path is invalid, the user will be prompted for the path. This allows the script to be run without arguments, e.g. directly from Windows Explorer, as well. After running the script, the NewGen World Editor should be restarted. The script can also be used to update the installation of War3Package.
The script has two functions: it registers War3Package in NewGen's wehack.lua script, and copies the War3Package directory to the NewGen installation. If War3Package is already in the NewGen directory, it assumes the first step has already been completed and only does the second. This means War3Package should not be copied to the NewGen directory before installing.
Note: The text above is the first part of the readme. For more information, read the rest of the document, included in the .zip file.