• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

ScriptyEditor(another one DB editor)

Junior Spellweaver
Joined
Jul 9, 2014
Messages
168
Reaction score
53
So, it's editor for those one, who would like to code dbs.
All is simple - you can look for source code(if would like to upgrade it) or just use script from Script folder.

How it's works?

You have simple script like this:

Code:
using System.IO;
using System.Linq;
namespace ROMEditor.Classes
{
    public class Script
    {
        public void EntryPoint()
        {
            var dbBuffs = new DBEditor<Structures.GameObjectMagicStruct>("magicobject");
            var buffs = dbBuffs.objects;
            var newBuff = buffs.Row(503499, 629999);
            newBuff.EqType[0] = (int) EqType.GatherSpeedRate;
            newBuff.EqTypeValue[0] = 3000; 
            //newBuff.EqType = new[] { 10, 10, 10, 0, 0, 0, 0, 0, 0, 0 };
            //newBuff.EqTypeValue = new[] { 10, 10, 10, 0, 0, 0, 0, 0, 0, 0 };
            dbBuffs.saveChanges();
        }
    }
}


You would need to put all dbs, that you would change, to \Binaries\db. Changed dbs would be produced into \Binaries\db_result.



So, how it works?
Structures.GameObjectMagicStruct is struct for magicobject.db(which you already have add into \Binaries\db, isn't you?). You can see list of all structs in Classes(look into source code).

Next row is needed to work with objects collection.

var newBuff = buffs.Row(503499, 629999);
This code row just create new buff with id 629999 from 503499.

Next 4 rows(include commented) are example of fields modifications(which you can see in those Structures.cs file). Also, you can get those EqType.GatherSpeedRate values from Classes\UsableData.cs - which are named values(enums) for int values, which u use as diff fields values.

dbBuffs.saveChanges();
This code row would save all your changed to Binaries\db_result folder.


Also, you can look for more examples inside Classes folder(most part are test code, which not used now).


View attachment Debug.zip
View attachment ScriptEditor.zip
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Apr 27, 2015
Messages
176
Reaction score
107
Looks like C and I never wrote or used C before. Might be time to learn some basics.
 
Junior Spellweaver
Joined
Jul 9, 2014
Messages
168
Reaction score
53
It's C#, not C.
BTW, it's simpliest way I had found to merge diff version *.db and save all changes in readable view.
 
Newbie Spellweaver
Joined
Jul 29, 2014
Messages
58
Reaction score
61
You can probably make a SQL-like syntaxis for that. However, I hate SQL, lol. As for me C# with LinQ is much more convenient
 
Junior Spellweaver
Joined
Jul 9, 2014
Messages
168
Reaction score
53
I usually use LINQ with lambda-syntax, as well in this editor)
 
Back
Top