HedgeEditor
Introduction
HedgeEditor is a style that facilitates the creation of Hedgewars training missions, campaign levels, gameplay modes, and other scripted content. It was introduced into Hedgewars version 0.9.22. While its primary purpose is to allow ordinary users to create simple missions without requiring them to be deeply knowledgeable about Lua scripting, it also allows more advanced users to save time by giving them effective tools with which to edit their scripted content.Watch an introductional video here.
How it works
After the initial setup process, a user simply starts Hedgewars and selects “HedgeEditor” from their list of styles and then plays it like any other mode. Once inside the game, it functions as a “What You See Is What You Get” editor and allows users to create, modify, reposition, and delete game objects in real time. The editor also features several tools that allow the user to generate mission objectives and quickly customize hedgehog teams. Once the user is satisfied with their mission and/or object placements, they give the editor a command to "Save" the level, which will output all the data to the game log, and exit Hedgewars.The user then navigates to their logs directory (and opens GameLogExtractor.html
to extract and view the content that HedgeEditor has generated within game0.log
.
GameLogExtractor.html
provides four large text areas for viewing the data in different forms, but if mission creation is the user's goal, the only thing they need to do is copy and paste the text in the upper right text area into a new text file they create within their training mission directory, and save the file under any name they want, as long it has the file name suffix “.lua”.
After following these steps, the user can simply restart Hedgewars and play their mission.
Alternatively, the user can copy and paste the core level data back into HedgeEditor to edit it again. They can also use HWMapConverter and the points list to create a hand-drawn map that can be played in TechRacer, PointInterpreter, or HedgeEditor itself.
Initial Setup
While it is theoretically possible for an advanced user to use HedgeEditor “out the box”, it is highly recommended that first-time editors complete a few once-off tasks in order to make HedgeEditor easier to use, and expand its functionality.- Set up
GameLogExtractor.html
- Download or build HWMapConverter (optional step for advanced users)
Creating new schemes
As of the latest version, the HedgeEdtior automatically assigns hedgehogs the weapons required for level-editing, and removes any delays that the scheme/weaponset might have assigned to those weapons. That said, it is still probably a good idea to create a new weaponset that assigns all weapons 0 ammo, no delay, and 1 ammo per crate. It's also recommended to create a scheme that enables per-hog ammo if the user wants to take advantage of the tools that HedgeEditor provides to customize individual hog weaponsets. Set up GameLogExtractor.html
First download GameLogExtractor.html.
HedgeEditor outputs a large amount of data to Logs/game0.log
after the save command is given. By default, this data is mixed in with a lot of other, unrelated information and it is somewhat jumbled. GameLogExtractor.html
provides the user with a pruned version of the log file that is sorted into four distinct sections. One section can simply be copy/pasted and saved as a playable Hedgewars mission, while the other three provide the user with sorted information that they can use as they see fit depending on their ultimate goal.
Download or build HWMapConverter (optional)
If the user desires the ability to insert the “special points” that are generated by HedgeEditor into a Hedgewars hand-drawn map that can then be played/re-interpreted by either HedgeEditor or TechRacer, they will need to use unC0Rr's HWMapConverter. The converter can be downloaded for Windows, or built manually.Directory locations
- Log files
- GNU/Linux:
~/.hedgewars/Logs
- Mac OS X:
~/Library/Application Support/Hedgewars/Logs
- Windows: Try looking in
Documents\Hedgewars\Logs
- GNU/Linux:
- Training missions
- GNU/Linux:
~/.hedgewars/Data/Missions/Training
- Mac OS X:
~/Library/Application Support/Hedgewars/Data/Missions/Training
- Windows: Try looking in
Documents\Hedgewars\Data\Missions\Training
- GNU/Linux:
- See also: User directory
Limitations
If you export/save the map, HedgeEditor will save most things in the map as-is. However, a couple of things are not saved:- Any projectiles or other temporary objects bounding around, like grenades
- Flames
- Graves
- Pretty much most things you cannot add with the gear placement tool
- Destroyed terrain
Waypoints currently are not used for any gameplay mechanic in the generated scripts. Only the waypoint coordinates will be written into the script as comment.