What is HedgeEditor?
HedgeEditor is gameplay mode that facilitates the creation of Hedgewars training missions, campaign levels, gameplay modes, and other scripted content. While it's 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.
How does it work?
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 folder (Documents/Hedgewars/Logs/) and opens GameLogExtractor.html to extract and view the content that HedgeEditor has generated within game0.log.
GameLogExtractor 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 Trainings folder (Documents/Hedgewars/Missions/Training), and save the file as WhateverNameTheyWant.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.
While it is theoretically possible for an advanced user to use HedgeEditor "out the box", it is highly recommended that first-time editors complete two or three once-off tasks in order to make HedgeEditor easier to use, and expand its functionality.
1. Create a new scheme and weaponset for HedgeEditor (thereby creating a smooth environment to edit in)
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 PerHogAmmo if the user wants to take advantage of the tools that HedgeEditor provides to customize individual hog weaponsets.
2. Set up GameLogExtractor (and simplify your life)
First download GameLogExtractor.html (right click, Save Link As).
HedgeEditor outputs a large amount of data to 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.
3. Download or build HWMapConverter (as an optional last step for advanced users)
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.
Where can I find ...?
the Logs folder
Windows: Try looking in Documents/Hedgewars/Logs
the Trainings folder
Windows: Try looking in Documents/Hedgewars/Data/Missions/Training