Greetings guys, I’m excited that I can finally release the first version of this new tool!
Introduction
Based on DAEnerys’ GUI and rendering system, this application allows you to open .level
lua files, look at and edit them in realtime 3D and save them back into lua code.
If you just want to use it straight away: The downloads are at the bottom!
- The importing is done using a lua interpreter library called NLua 19, the exporting is just a matter of string building.
- The rendering is done with OpenTK 12, the meshes for the editor are loaded by Assimp 11.
This editor also needs your exported Homeworld data aswell as mod data, if you have any custom map objects that you want to use. (Like DAEnerys)
This is how the 3D view looks like:
Manual
Configuration
You will get a notification telling you that you haven’t specified any data paths yet when starting the editor for the first time.
You can fix that by opening the Settings window by clicking on the tool button at the upper-left corner.
There you can click on Add to browse to your keeper.txt, it should be at the root directory of your game/mod data.
The editor has to be restarted after doing that, this step is important as the program won’t be able to find asteroid types etc. without this information.
Now you can also take a look at the Hotkeys if you want to.
You can modify all of the key bindings there, but I tried to set the default ones as practial as I could think of.
Map options
The Map tab allows you to set all of the options that set the mood of your map aswell as important stuff like player count, description, camera distances, etc…
One cool feature is that you can preview how the fog will look like in-game. To activate this, check the Display checkbox in the Fog section.
3D view and camera
You will see the following in the main part of the editor:
The grid, circle and degree indicators resemble the sensors manager of Homeworld.
This gives you an idea of how big your map is and if you placed everything correctly.
To rotate the camera, hold the right mouse button and move around the mouse.
To zoom the camera, scroll the mouse wheel.
To move the orbit point around, use the (default WASD) keys.
To adjust the height of the orbit point, use the (default Q and E) keys.
To reset the camera, press the reset camera key (default R).
You can also change to orthographic mode by pressing the key (default NumPad5) or switching in the top-right corner.
The view can be set to front, back, left, right, top and down by pressing the associated keys (default on the Numpad).
Opening existing maps
Click on the Open button at the top to browse to a .level file, this will discard all unsaved stuff you currently have open, so beware.
Saving your map
Click on the Save button at the top to find a place and name where your map will get saved.
Creating objects
To create an object, go to the Create tab, choose the type to create and it’s parameters, then move the mouse over the 3D view to set the position.
A copy of the object will be created by left-clicking. You can then switch to the Map tab and select it to change it again.
Selecting objects
You can select objects by either just clicking on it, or dragging a selection box around the stuff you wish to select (You know that from many other apps).
If you hold the add to selection key (default CTRL), the object(s) will be added to the previous selection instead of overwriting it.
Moving objects
Once you select one or more objects, a translation gizmo will appear in the 3D view.
Pulling one of the arrows will result in a position change on that axis depending on how far you move the mouse.
You can also set the position directly in the Selection tab:
Rotating objects
You can change the gizmo mode by pressing the translation- or rotation mode key (default T or Z).
There is also a little drop-down button at the top of the editor.
Setting the gizmo mode to rotation will result in this:
You can drag the circles to rotate the object(s) around the associated axis.
The rotation is done per-object, so it doesn’t rotate all of the objects around the shared pivot, but rotates them independently around their own center.
The other mode will probably be added in the future.
You can also set the rotation (in degrees) directly in the Selection tab:
Modifying object parameters
All of the map objects have different parameters that you can set.
These appear in the Selection tab, but only if you have exactly one object selected.
Multiple parameter editing will be implemented in the future.
These are the settings for dust clouds:
Copying/pasting objects
Press the copy selection key (default CTRL + C) to save all selected objects into the clipboard.
After that, you can press the paste selection key (default CTRL + V) to place exact copies of the objects in the clipboard.
The pasted objects will automatically get selected.
They will be in the same position as the original ones, so be sure that you don’t have two objects in the same place.
Deleting objects
Hit the delete selection key (default DEL) to remove all selected objects from the map.
Notes
- Player starting positions are Points and have to have a name like “StartPos0” (0 is the zero-based index).
- The fog preview isn’t that accurate, mostly because there is no background.
- Parameter editing with multiple objects is not yet supported.
- The selection system is pretty bad. It renders all selectable objects a second time and assigns a unique color to them. Then the color of the pixel that you clicked on can be used to identify the object you picked. This is an ugly way as this tutorial 16 describes.
So keep that in mind when you have problems with it. - Many things like cameras, clouds, paths, tendrils etc. are not yet supported.
-
Some dust cloud types are crashing the game without info in the log (though they work in the HW1 campaign).
The first (default) one is one of them, so keep that in mind. - The asteroid mesh is not accurate in some cases, it’s just one I made in Blender to give you an idea of how it will look. The size of it is determined by the resource value of the asteroid type (in data/resource/asteroid/), because asteroids with much resources tend to be larger.
- Theoretically, it should be possible to create things in Lua with loops or other magic. The interpreter of this editor understands that.
Planned features
- Support for all remaining object types.
- Rotation around the shared pivot of all selected objects.
- Symmetrical editing.
- Better selection system.
- Better problems tab.
- Auto-updating (I actually looked at this before, but it didn’t work out so well with the file overwriting).
Downloads
All downloads are available on the Bitbucket page 192.
You can also look at the source there, if you want to.
So here it is, I hope this tool is helpful for some of you.
Please report issues/ideas here so I can improve on it.
And very important:
If you have any name ideas for this tool, please tell me so we can have another poll like for DAEnerys.
created
last reply
- 152
replies
- 6.5k
views
- 20
users
- 223
likes
- 24
links
There are 152 replies with an estimated read time of 23 minutes.