[RELEASE] rMOD Tabbed RDB Editor

11/19/2017 10:02 YuhaBah#16
Thanks! I will try it certainly
12/11/2017 19:56 SilentWisdom#17
First off, sorry it's been so long. With a wife, infant and step-daughter + working 10 hours a day my life is just now settling back down.

But in the past couple days I've had off I got inspired to start writing some more of the search menu for the new search feature. (which will work fully on both RDB and DATA tab types :) )

Gallery

I'm still not sure when it will come out, many of the data functions still need to be coded in but the foundation and major overhaul of how tabs are managed is completed.

When the search feature is complete I will be completing a feature called 'Data Analysis' where it will read your data.000 index and analyze fragmented space, list the format breakdown of the index and white size/percentage files are stored in the index/files.

Then perhaps we will be ready for RC1 of rMOD v1.0 :)
12/31/2017 03:34 SilentWisdom#18
Just as a reminder that rMOD hasn't died off quiet yet, I finally got an inspiration on how to handle the very complex nature of actually properly filtering down (searching) the data.000 index in a simple yet powerful way.

The resulting menu is like:

[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

p.s. ignore the old filter strip above the load results on the main gui, just haven't removed it yet :D


which can have as many expressions as you want :), all the keys/op [operator]/values will be evaluated in a loop and the resulting entries will be displayed on the left.

In related news, I was originally going to code the search directly into rMOD. But after further consideration a revelation struck me and I decided to replace GetEntry() of DataCore with FindAll/Find, I just finished coding FindAll on a whim and it's a bit repetative for my blood BUT necessary I'm afraid.

Code:
        /// <summary>
        /// Locates all IndexEntry with matching criteria and returns them as a list
        /// </summary>
        /// <param name="fieldName">Operand 1 of the search (e.g. name, data_id)</param>
        /// <param name="op">Operator for the search (e.g. ==, >= etc..)</param>
        /// <param name="criteria">Operand 2 of the search (e.g. "db_")</param>
        /// <returns>List of matching IndexEntry</returns>
        public List<IndexEntry> FindAll(string fieldName, string op, object criteria)
        {
            if (fieldName == "name")
            {
                switch (op)
                {
                    case "==": return Index.FindAll(i => i.Name == (string)criteria);
                    case "LIKE": return Index.FindAll(i => i.Name.Contains((string)criteria));
                }
            }
            else if (fieldName == "offset")
            {
                long val = (long)criteria;

                switch (op)
                {                  
                    case "==": throw new NotImplementedException("[Core.FindAll() does not implement multiple returns for the offset field!");
                    case ">": return Index.FindAll(i => i.Offset > val);
                    case ">=": return Index.FindAll(i => i.Offset >= val);
                    case "<": return Index.FindAll(i => i.Offset < val);
                    case "<=": return Index.FindAll(i => i.Offset <= val);
                }
            }
            else if (fieldName == "length")
            {
                int val = (int)criteria;

                switch (op)
                {
                    case "==": return Index.FindAll(i => i.Length == val);
                    case ">": return Index.FindAll(i => i.Length > val);
                    case ">=": return Index.FindAll(i => i.Length >= val);
                    case "<": return Index.FindAll(i => i.Length < val);
                    case "<=": return Index.FindAll(i => i.Length <= val);
                }
            }
            else if (fieldName == "data_id")
            {
                int val = (int)criteria;

                switch (op)
                {
                    case "==": return Index.FindAll(i => i.DataID == val);
                    case ">": return Index.FindAll(i => i.DataID > val);
                    case ">=": return Index.FindAll(i => i.DataID >= val);
                    case "<": return Index.FindAll(i => i.DataID < val);
                    case "<=": return Index.FindAll(i => i.DataID <= val);
                }
            }

            return null;
        }
Complex, yet simple and powerful. Once you've located the entries you want you don't even HAVE to leave the search menu to export, update, delete the searched entries. Simply highlight desired searched entries, right click and profit!
12/31/2017 04:37 roller334#19
Interesting approach to kinda give the possibility to select rows via boolean expressions. I wonder if this is nearly comparable to the performance of real database expressions, but nvm.

I have a suggestion for this tool: Sometimes rdb's have over 100 of columns where most of them are uninteresting for example skillResource. It would be nice if this tools allows to costumize the columns of the search result.
12/31/2017 05:13 SilentWisdom#20
Quote:
Originally Posted by roller334 View Post
Interesting approach to kinda give the possibility to select rows via boolean expressions. I wonder if this is nearly comparable to the performance of real database expressions, but nvm.

I have a suggestion for this tool: Sometimes rdb's have over 100 of columns where most of them are uninteresting for example skillResource. It would be nice if this tools allows to costumize the columns of the search result.
Considering rdb do not use DataCore.Structures.IndexEntry as their storage medium but instead rdbCore.Structures.Row where I can easily grab the name and value of a Row.Cell easily, I don't see it being a huge problem to make a toolbox pop up with a combobox of checkboxes (cell names in the structure) so the user could uncheck what they did/did not want to see displayed in the results menu.

This is actually a really good suggestion so kudo, I'll make sure that you get a credit. :)
12/31/2017 05:24 roller334#21
Yeah but for the usability it should be possible to save default "checkbox settings" so ppl don't have to uncheck the same 23 columns, they are not interested in, every time they make a search.

I appreciate your kudo :awesome:
12/31/2017 05:51 SilentWisdom#22
Quote:
Originally Posted by roller334 View Post
Yeah but for the usability it should be possible to save default "checkbox settings" so ppl don't have to uncheck the same 23 columns, they are not interested in, every time they make a search.

I appreciate your kudo :awesome:

Probably just add it as part of the structure.lua, either as a list on its own like

Code:
resultFields = { "id", "rank", "icon_file_name" }
or by adding a variable to the field list like:

Code:
fields = {
 { "id", INT32 },
 { "text_id", INT32, search_result=0 }
}
This way you can just define once what fields you do not want displayed in the results grid of the search menu
12/31/2017 06:05 roller334#23
I wouldn't go with the second option because its better to seperate the logic and don't mix everything up.

I would suggest a data structure similiar to your first option but with a second attribute representing the actual checkbox value like this

Code:
result_fields={ {“id“,1}, {“rank“, 0}, ... }
12/31/2017 06:16 SilentWisdom#24
Quote:
Originally Posted by roller334 View Post
I wouldn't go with the second option because its better to seperate the logic and don't mix everything up.

I would suggest a data structure similiar to your first option but with a second attribute representing the actual checkbox value like this

Code:
result_fields={ {“id“,1}, {“rank“, 0}, ... }
You misunderstand, I actually meant by defining the results to be shown in the lua we don't have to ever do it in a pop-up and it's better this way. Furthermore with the way the structure system works at this time, variables are easily attached to the field as to avoid un-needed extra tables of data in the lua, feel free to review the documentation from the read-me below:


Basically with the second method we can easily just add the variable results_view=1 to any field we like and it would be displayed in the results grid and anything without it simply will not be.
12/31/2017 06:54 roller334#25
Okay then i agree with you, but you need to think about the default value.
With saying everything is set to 0 by default you dont get any results if the person who use the tool don't edit every lua file.
I get the idea: enable what you want to see, but remember ppl are lazy af

But in the end its up to you
12/31/2017 14:38 SilentWisdom#26
Quote:
Originally Posted by roller334 View Post
Okay then i agree with you, but you need to think about the default value.
With saying everything is set to 0 by default you dont get any results if the person who use the tool don't edit every lua file.
I get the idea: enable what you want to see, but remember ppl are lazy af

But in the end its up to you
It took me a minute to understand what you meant and you have a point. Thusly I've had the following idea:

Instead of saying results_view=1 on fields we want to include, we will switch it to results_view=0 on fields we don't want show. If no field in the 'fields' list contains the results_view variable then rMOD will default to showing all fields but will have a small button/label under the results pane 'filter' which will allow a user to set what fields they want shown.

When a user sets their filter list (for this particular structure) rMOD will automatically append results_view=0 to hidden fields.

In other news:

Searching TabStyle.Data is completed and it was so much easier than I thought it be.

[Only registered and activated users can see links. Click Here To Register...]

I had avoided doing it some time because I felt like it was going to be a big hassle, but once I toked a bowl it just came to me.

[Only registered and activated users can see links. Click Here To Register...]

With the v1.0 release I have already completely recoded the way tabs were managed from scratch, check out the Functions.TabManager.cs in upcoming pushes to see the engines power, but lets just say it will make it fundamentally easy to implement rdb searching as-well.
01/01/2018 23:14 SilentWisdom#27
Thanks to roller334's suggestion I'm glad to announce another feature that will be available in v1.0.0.

While creating a structure.lua is arguably an easy process it could be daunting to a newbie developer and is open for mistakes such as typos in the field list etc. But now handling structures could not be any easier!

[Only registered and activated users can see links. Click Here To Register...]

Manage structure files easily on the right, set their defaults such as table/file names or their extras like specialCase and extension.

One a structure is selected on the right easily add/remove or modify the fields by setting their name, type (easy to use drop down list) or attributes (length, show, results_view) all in one easy to use list.

Need a special header for instances like .ref, easily enabled/disable the header entirely, use the default header or define your own header fields just above the field list!

You will even be able to easily define the Process Row contents and test for syntax errors quickly and easily.

Built in testing tools for verifying lua syntax and maybe if you guys really want I can create an importer feature that can import Glandu2 lua files. :)
01/01/2019 11:22 Ikuush#28
Project die... ? :(
01/01/2019 16:43 ThunderNikk#29
Pretty much replaced by Grimoire...

[Only registered and activated users can see links. Click Here To Register...]
01/06/2019 23:35 SilentWisdom#30
Quote:
Originally Posted by ThunderNikk View Post
Pretty much replaced by Grimoire...

[Only registered and activated users can see links. Click Here To Register...]
Please be advised not to use Grimoire v2 as it is very outdated and uses DataCore v3.

rMOD has been replaced by my in development tool Grimoire v4, if you would like to use it please visit the github.

[Only registered and activated users can see links. Click Here To Register...]