• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

War3Package

War3Package

  1. About War3Package
  2. Usage
  3. 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.
Contents

War3Package (Binary)

Reviews
10:12, 18th Sep 2014 TriggerHappy: Nice tool, although many console windows pop up when creating or importing packages. Approved.

Moderator

M

Moderator

10:12, 18th Sep 2014
TriggerHappy:

Nice tool, although many console windows pop up when creating or importing packages.

Approved.
 

Deleted member 219079

D

Deleted member 219079

Reminds me of starcraft 2 extension mods.
 
Level 2
Joined
Nov 11, 2013
Messages
16
Thank you for the feedback. I am trying to find the origin of the problem. Could you please give me some more information: version of JNGP, version of Windows, path to JNGP? If you have time, it might also help if you upload a .w3k package which gives the error.
 
Last edited:
Level 2
Joined
Nov 11, 2013
Messages
16
Sorry, I should probably have mentioned this when I uploaded the fixed version. The problem was actually that the tool created an empty package, which then failed to be imported. Simply create the package with the new version and it should work.
 
Level 2
Joined
Nov 11, 2013
Messages
16
Once you have downloaded War3Package above and extracted the zip file (right click -> extract all), open the extracted folder so you see a file named install or install.bat. The simplest way to install War3Package is to drag the folder containing JNGP (the folder containing the NewGen WE executable) onto this install file. The next time you open the NewGen WE, the War3Package menu should appear.
 
Level 2
Joined
Feb 3, 2014
Messages
19
I have a problem:
i have changed for example the model of a hero.then i create a new package. i open another map and import this package but nothing changes even though the jasshelper says: success!
did i do a mistake?
 
Level 2
Joined
Nov 11, 2013
Messages
16
Make sure that you save the map before creating the package. Also make sure that you do not save the map after importing the package, but close and reopen it.

If you have done it like this and it still doesn't work, send me a .w3k package which doesn't work and I'll see what the problem is.
 
Level 2
Joined
Feb 3, 2014
Messages
19
so i do the changes - save the changed map - create a package - open a new map - import the package - then close and reopen it?
 
Level 2
Joined
Feb 3, 2014
Messages
19
but i think one step doesn't make sense: after i have imported the package to the new map i simply have to close it without saving?

it doesn't work if i do it like described in my last post :( but thank you for your help :)
 
Level 2
Joined
Nov 11, 2013
Messages
16
It doesn't really make sense, but War3Package is based on Grimex, which works that way. The reason is that importing a package modifies the map file saved on disk, but not the version of the map loaded by the World Editor. Closing and reopening the map forces the editor to reload it from the file.
 
Level 2
Joined
Nov 11, 2013
Messages
16
If you don't mind uploading it here where other people can see it, you can add it as an attachment to your next reply. Click on 'Go Advanced' and you should see an option for attachments (you'll have to create a zip file to upload it). Otherwise, I'll give you my email address and you can email it to me.
 
Level 2
Joined
Nov 11, 2013
Messages
16
War3Package is a wrapper around some of the Grimex tools, but it's more convenient in many cases. A .w3k package is basically the Grimex export directory in a single file. There is no compression (because I couldn't find a way to compress a file using Lua or a batch script without installing additional tools or writing my own compression functions). The readme file describes the file format in more detail.

If I ever create a new feature that requires additional information to be stored in the package, I'll probably use a similar method to the one Blizzard uses in their .mpq files. I can create an additional file in the export directory containing settings for the new feature, and older versions will simply ignore it.

Since this is based on Grimex, it will behave the same way if you import a newer version of the same spell. Triggers, object data and imported files with the same name will be overwritten and those with new names will be added. Since Grimex does not provide a way to remove data, War3Package can't do it either.
 
Level 2
Joined
Nov 11, 2013
Messages
16
For some reason it created an empty package for you. The following information might help me find the problem:
- Where on your hard drive is JNGP installed?
- Open the map you created the package from and use the extensions -> export files command. Tell me what is inside the folder you selected after you run this command.
 
Level 2
Joined
Feb 3, 2014
Messages
19
after pressing 'export files' an error appears and says: Could not extract UI\TriggerData.txt
Could not extract UI\TriggerData.txt from Warcraft mpqs


maybe my jassnewgen editor wasn't installed correctly?

it's installed here: C:\Users\Rune\Desktop\Spiele\Warcraft III\JassNewGenPack
 
Last edited:
Level 2
Joined
Nov 11, 2013
Messages
16
If the Grimex file exporter is not working, that would explain why you are getting an empty package. I don't really know anything about the error you are getting, so the best advice I can give is to Google, and maybe redownload JNGP if you can't find any solution.
 
Level 2
Joined
Nov 11, 2013
Messages
16
It doesn't really add any new functionality, but it makes it more convenient to work with the Grimex tools. It allows you to export everything except the terrain from a map into a single file and import that file into another map.
 
Top