- Joined
- Aug 18, 2009
- Messages
- 4,099
JNGP postproc is being developed for Windows at the moment. It most likely won't work on other platforms. And anyway, I only have a Win7 system to test it.
What I have long been wishing for is that we distinguish between the development map/project file and the compiled/playable map result, like any compiled language does. vJass only works without that concept because the game does not use the war3map.wct and war3map.wtg but rather the editor generates the war3map.j every save anew. If we wrote directly to the war3map.j, jasshelper would translate it once and that's it, now we would not possess the source vJass code any longer.
There are several handy applications in finalizing a map. Ex: converting objects to slk, optimization (like discarding editor-only files) or recently asked path filling
JNGP/wursteditor:
JNGP uses a file wehack.lua from its main directory and hooks onto the save and testmap procedures of the editor. That's how jasshelper gets called or the map is run with additional parameters like -window. I edited the file a bit, so it redirects to my postproc Lua scripts.
The 2nd issue is how to access the compiled map. As said above, we do not want to operate on the original map. That's why the save procedure actually makes a duplicate and that is the one that gets passed to tools by $MAP$ placeholder. This also means if you are using vJass, wurst or whatever, the compiler for this language should be invoked with postproc.
The arising question is how to comfortably test the map using the Playtest button from editor. JNGP hooks on that and postproc alters the -loadfile parameter under certain conditions. A problem is that I have not found a way to detect when a new map has been loaded within the editor or what was the original path of the map being playtested, so I can only guess if the last of my own copies postproc created beforehand actually corresponds to the one being playtested. By guessing I mean I have at least inserted a condition that the first 256 bytes (the header) of both files have to match, since that's unlikely to be the target of modifications. This feature "auto-redirect-testmap" feature can however be deactivated in the postproc menu and this menu also contains a function to run the last compiled map.
Download the installer or the raw bundle from here.
For setup instructions, usage, the API and included tools, view the manual.
postproc (and friends) uses Lua and some addons: LuaFileSystem, Rings, Lua BitOp, LuaSocket
The updater uses libcurl and wxWidgets, the Windows API. The md5 algorithm used to compare local and remote files was taken from here.
The JNGP setup uses wxLua, a Lua binding for wxWidgets.
Exposition
What I have long been wishing for is that we distinguish between the development map/project file and the compiled/playable map result, like any compiled language does. vJass only works without that concept because the game does not use the war3map.wct and war3map.wtg but rather the editor generates the war3map.j every save anew. If we wrote directly to the war3map.j, jasshelper would translate it once and that's it, now we would not possess the source vJass code any longer.
There are several handy applications in finalizing a map. Ex: converting objects to slk, optimization (like discarding editor-only files) or recently asked path filling
Strategy
JNGP/wursteditor:
JNGP uses a file wehack.lua from its main directory and hooks onto the save and testmap procedures of the editor. That's how jasshelper gets called or the map is run with additional parameters like -window. I edited the file a bit, so it redirects to my postproc Lua scripts.
The 2nd issue is how to access the compiled map. As said above, we do not want to operate on the original map. That's why the save procedure actually makes a duplicate and that is the one that gets passed to tools by $MAP$ placeholder. This also means if you are using vJass, wurst or whatever, the compiler for this language should be invoked with postproc.
The arising question is how to comfortably test the map using the Playtest button from editor. JNGP hooks on that and postproc alters the -loadfile parameter under certain conditions. A problem is that I have not found a way to detect when a new map has been loaded within the editor or what was the original path of the map being playtested, so I can only guess if the last of my own copies postproc created beforehand actually corresponds to the one being playtested. By guessing I mean I have at least inserted a condition that the first 256 bytes (the header) of both files have to match, since that's unlikely to be the target of modifications. This feature "auto-redirect-testmap" feature can however be deactivated in the postproc menu and this menu also contains a function to run the last compiled map.
Download and documentation
Download the installer or the raw bundle from here.
For setup instructions, usage, the API and included tools, view the manual.
Credits
postproc (and friends) uses Lua and some addons: LuaFileSystem, Rings, Lua BitOp, LuaSocket
The updater uses libcurl and wxWidgets, the Windows API. The md5 algorithm used to compare local and remote files was taken from here.
The JNGP setup uses wxLua, a Lua binding for wxWidgets.
Last edited: