http://www.questica.net/Images/DevLogs/contenteditor/editor.png
Over the past couple days I’ve been working on this new content editor to replace my old one (and therefore, the 2 I made before that as well xD). However, each time I rewrite this stuff it always gets much much better!
This editor is built entirely from class reflection of the data objects being edited, which is something I’ve wanted to do for quite a while. I always found it really tedious to add a new control to the editor and link it to the data when I can just have a generator do it all for me! The code is relatively straight-forward using Java Reflection, so I won’t go into the code (unless some people really want me to). I’ll just go over some of the features I’m especially proud of.
Specifically, arrays. You can directly manipulate arrays of data in the objects, whether they are primitives or objects.
http://www.questica.net/Images/DevLogs/contenteditor/intArrays.gif
You click the plus button to add an element and the minus button to remove an element. This array will automatically generate if there is an
int[] intArray = new int[0];
in the class definition.
http://www.questica.net/Images/DevLogs/contenteditor/objectArrays.gif
This gets generated if you have something like this in the code:
public static class Drop {
public String name;
public float probability = 1;
public int min = 1;
public int max = 1;
public Drop() {}
}
public Drop[] drops = new Drop[0];
The editor will also change the Class of a specific object if you want it to be of a different subclass. Just clicking on one in the tree on the left will copy all of the data over to a more specific subclass with more fields. I am also planning on implementing a component system like in Unity.
http://www.questica.net/Images/DevLogs/contenteditor/changingClass.gif
The preview at the top of the frame will automatically update with the new collision info, and eventually with the shadow and light info once I put that in
All of this will, of course, be available to people who want to make mods of the game. I will integrate features specifically for making and packaging mods when the game gets to that point.