Archive for June 18th, 2016

OpenClonk Editor

Posted in Development on June 18th, 2016 by Sven2 – 1 Comment

One of the main strengths of Clonk has always been its easy script interface and its openness for user content. Unfortunately, players often don’t realize how much they can do in the game because we don’t ship an editor and few players will dig into the game folders to realize they can create their own content.

The editor can be launched easily directly from the main menu.

The editor can be launched easily directly from the main menu.


Editor startup screen

Editor startup screen


Fortunately, this is changing now! We are reworking the old “console mode” to be a full-fledged standalone editor capable of creating a variety of interesting scenarios.

First, the editor will be easily accessible from the main menu of the game. No more tedious navigation to developer pages hidden on our website is required.

"New Scenario" dialogue

“New Scenario” dialogue

Second, the editor has been streamlined to be easy to understand and throws you right into the action. There is now a “new” button directly on the welcome page of the editor which allows you to set a name and basic parameters for a new scenario. The new map is automatically created and loaded into the editor for you. Recently edited scenarios can also be re-opened directly from the startup page. In the future, we also seek to add quick tutorial links onto this page.

The editor itself has been written in Qt, a state-of-the-art and cross-platform user interface toolkit that contains all the little things like dockable toolboxes and native user interface widgets which make the program easy and fun to use. Many new features have been introduced:

  • Less cluttered user interface: All tools and viewports are arranged into dockable dialogues so there will be no more floating “object property” dialogues that got lost behind the viewport somehow. Of course if you want you can still undock elements such as viewports and e.g. move them off to a second screen. All tools (player/object/landscape cursors, brush modes, etc.) have been combined into the command bar on top.
  • New editor main interface

    New editor main interface

  • Easy-to-use object properties: When selecting an object, its basic categories can be set directly in a property list on the right. With properties, you can connect switches with doors, create enemy AI clonks, configure goal and rule objects, etc. Properties can use custom delegates for each type. For example, the shape delegate can be used to mark a region in the map such as trigger regions for enemy AI clonks. Colors can be chosen from a color dialogue box, numbers can be set in a spin box, etc. More complex types such as arrays of IDs can be defined in script.
  • Connecting a spin wheel to a stone door is very easy. Targets are listed by distance and the hovered element is highlighted in the viewport (left door in the example screenshot).

    Connecting a spin wheel to a stone door is very easy. Targets are listed by distance and the hovered element is highlighted in the viewport (left door in the example screenshot).

  • The object creator shows a list of all loaded definitions. Simply select a definition from the list and use a single click into the landscape to place the object. Object placement has a preview and allows rapid placement of many objects.
  • Simply select an object in the list and left-click to place it.

    Simply select an object in the list and left-click to place it.

  • Selected objects can be rotated and scaled by dragging a scaler and rotator knob. Rotation in multiple of 45 degrees es possible by holding Shift.
  • Drag the pink round knob to scale and rotate the selected object.

    Drag the pink round knob to scale and rotate the selected object.

  • Obscured or lost objects can be found in the object list. The list is organized by containment so objects in chests can also be found. Effects are also shown and can be edited.
  • Landscape painting has been improved: Instead of the brush preview in a hidden toolbox (that showed the wrong size anyway), you can now see the projected brush size as an overlay while painting materials. For static maps, the landscape can be switched to a “flat chunks” mode that makes it easier to draw e.g. vertical tunnels for stone doors or find any remaining sky pixels underground.
  • Shows the new brush preview (white circle) and the new "flat chunks" mode, in which it's easier to see errors in the map. Flat chunks mode can be enabled and disabled at runtime.

    Shows the new brush preview (white circle) and the new “flat chunks” mode, in which it’s easier to see errors in the map. Flat chunks mode can be enabled and disabled at runtime.

  • Start positions and start properties such as wealth, materials and construction plans can now be set easily through a “player start” object. Player start objects can be placed anywhere to denote a possible starting position. Multiple start positions can be defined for each team in melees or simply as random possible starting points. To make things easier for newbies, scenarios created through the “new” command already contain a centered player start object.
  • The player start object (here: One start object for each team in a team melee) can be used to determine player start positions and conditions.

    The player start object (here: One start object for each team in a team melee) can be used to determine player start positions and conditions.

The editor has not made it into the master game branch yet. However, if you are comfortable with git and compiling your own engine, you can check out the qteditor branch. German speaker can also follow the editor development blog on clonkspot.

Note that this is a newbie-friendly editor for creating simple scenarios only. To do advanced scripting, build objects or contribute to the original game, you can either look at Windmill or follow the guidelines on our development page.

If you have additional ideas or suggestions for the new editor, please leave a comment here or in the forum thread!