C2 Data Editor — Now for sale in the Scirra Store!
https://www.scirra.com/store/game-makin ... editor-124
The C2 Data Editor is a Windows desktop app that makes it easy to create data structures for your app using the built in Construct2 Array and Dictionary.
All of the data for an entire app can be saved in a C2 Data Editor XML file for inclusion in a source control system. The Data Editor UI allows you to add Array and Dictionary objects and then you can double click these to start editing them and adding in data visually. Once you are done you can click a button to generate the C2 JSON format for these objects and the data inside them.
You can even embed Arrays inside of Dictionaries and then put those Dictionaries in other Dictionaries or other Arrays... nesting as deeply as you like. If you have an array or dictionary embedded inside of another then all you need to do to edit it in the Data Editor is double click the table cell that contains it and a window will popup ready for you to start editing that nested object.
If you have Construct2 Array or Dictionary JSON you have already exported out of your app then you can paste that into the C2 Data Editor as new objects or you can even import delimited text files that have data in them as new objects.
Your data objects can be exported into a capx file or you can use the injection feature to insert your data objects, DataSet Function Events, and other supporting objects directly into your pre-existing capx files or Construct2 project folders.
A capx is included containing events for editing and searching the data in the DataSets created with the C2 Data Editor. The capx also includes a couple layouts showing how to use these events. The following events are included in the capx:
CreateRow, UpdateRow, DeleteRow, ClearRows, RowsCount, SearchColumnFindFirstReturnColumn, SearchColumnFindAllLike, SearchColumnFindAll, SearchColumnFindFirst, IsNumeric, FormatNumber, FormatCurrency
Update 1.5:
Version 1.5 has been uploaded.
Changes:
1) Bug Fixes
2) You can now take the JSON text you get from your apps using the AsJSON method and paste into the main screen of C2 Data Editor to create new objects.
3) Export all the data objects as events into a new empty capx file.
4) Injection into your capx and folder projects. This includes all the data objects (Arrays & Dictionaries), function events to populate the data into those objects, the sample DataSet Function events from the sample capx that you previously had to manually copy into your projects, the DataSets family, and the ResultSet array (both of these are used by the DataSet Function events from the sample capx).
5) Import text files into Arrays and Dictionaries.
6) Insert Row button in the Array Editor screen.
7) A new DataSet function in the sample capx called "SearchColumnFindFirstReturnColumn" which will search one column in a DataSet array and if a match is found then the value of another column is returned. e.g. do a lookup on an ID field and return the HitPoints column.
Injecting DataSet Arrays into your C2 project results in an Array being created (which has instance variables containing the column ordinals) AND an event function for creating and/or picking that Array and populating it with the data you entered into the C2 Data Editor.
For example if we inject the following table (called “Testâ€) as a Data Object Function into a test capx we will see the events below in the DataObjectFunctions event sheet:
[attachment=1:xk4ybrdm]TestDataSet.png[/attachment:xk4ybrdm]
[attachment=0:xk4ybrdm]GeneratedTestDataObjectFunction.png[/attachment:xk4ybrdm]
User Manual:
https://dl.dropboxusercontent.com/u/277541264/C2%20Data%20Editor.pdf
One or more videos should get added in the next week or so.
Use this topic to leave comments, ask questions and talk about C2 Data Editor