barncastle

  Developers
  • Content Count

    38
  • Joined

  • Last visited

Community Reputation

52 Excellent

5 Followers

About barncastle

  • Rank
    Code Hero

Personal Information

  • Specialty
    DBC Editing
    Serverside
    Software Development

Recent Profile Visitors

4,369 profile views

3 files

  1. all expansions WDBX Editor

    A project I started initially to learn how DBC files worked that eventually turned into this and thought it was worth a share.
    This editor has full support for reading and saving all release versions of DBC, DB2, WDB and ADB. This does include support for Legion DB2 and ADB files and works with all variants (header flags) of these.
    Like the other editors I’ve used a definition based system whereby definitions tell the editor how to interpret each file’s columns - this is a lot more reliable than guessing column types but does mean the definitions must be maintained. So far, I've mapped almost all expansions with MoP being ~50% complete and everything else being 99%+ (excluding column names).
    Source can be found here.
    Features:
    Full support of release versions of DBC, DB2, WDB and ADB (WCH3 and WCH4 are not supported as I deem them depreciated) Can be set as the default file association Opening and having open multiple files regardless of type and build Open DBC/DB2 files from both MPQ archives and CASC directories Save single (to file) and save all (to folder) Standard CRUD operations as well as go to, copy row, paste row, undo and redo Hide, show and sort columns A relatively powerful column filter system (similar to boolean search) Displaying and editing columns in hex (numeric columns only) Exporting to a SQL database, SQL file, CSV file and MPQ archives Importing from a SQL database and a CSV file An Excel style Find and Replace Shortcuts for common tasks using common shortcut key combinations A help file to try and cover off some of the pitfalls and caveats of the program (needs some work) Tools:
    Definition editor for maintaining the definitions WotLK Item Import to remove the dreaded red question mark from custom items WDB5 Parser which is an attempt to automatically parse the structure of WDB5 files Things to Note:
    You need .Net 4.6.1 installed (download) Importing gives you the option to import; new rows, changed and new rows and to override all data Exporting to MPQ allows you to append to an existing archive or to create a new one Currently any SQL import must have identical columns to the file’s definition Legion ADB files MUST have the DB2 counterpart open before as required information is stored in the DB2 file. The program will prioritise DB2 if DB2 and ADB are opened at the same time The WDB5 Parser works surprisingly well thanks to the new field structure data however it does trip up on inline strings so definitions may need to be validated manually Undo, redo and copy data history are lost when changing the current file Everything is stored in memory so if your PC is ancient the program will crash attempting to read hundreds of files at once! Credits go to Ladislav Zezula for the awesome StormLib and thanks to all those that contribute to the WoWDev wiki. I’ve also patched the definitions together for various sources across the internet, there are too many to name, but thanks to all.

    3,244 downloads

    (1 review)

    41 comments

    Updated

  2. WDBXLib

    After a suggestion from Amaroth; I built this library to give other developers the core reading and saving functionality from WDBX Editor. This means that this library has full support for reading and saving all release versions of DBC, DB2, WDB and ADB.

    Just like WDBX Editor the reader requires a definition to load files correctly. I've moved to a class based decorator system as this is more intuitive. Included in this release is a separate library (WDBXLib.Defintions) with all the definitions that come with WDBX Editor - I've purposely separated these out as to provide more flexibility and to separate concerns. 
    This library targets Microsoft .NET Framework 4.6.1. Source code and full examples can be found here.
    Usage:
    Below is an example of a definition and using it to read and write to a file.
    [DBTable(Expansion.WotLK)] //Defines the build number public class CharacterFacialHairStyles { [DBKey(AutoGenerated: true)] //Defines the Id column public int Id { get; set; } public int RaceId { get; set; } public int GenderId { get; set; } public int VariationId { get; set; } [DBField(ArraySize: 5)] //Defines the array size public int[] GeoSetId { get; set; } } //Reading, editing and writing a DB file with the above definition var entry = DBReader.Read<CharacterFacialHairStyles>(@"TestFiles\CharacterFacialHairStyles.dbc"); entry.Rows[0].RaceId = 6; //Update RaceId for the first row DBReader.Write(entry, @"TestFiles\CharacterFacialHairStyles.dbc"); Rows:
    The DBEntry rows are contained in a special collection class. Using the provided methods the Ids are automatically adjusted accordingly. However if you edit the Ids from the collection directly the Ids will need to be manually maintained, if duplicates are found the library will throw an exception on save.
    Included are a few additional methods and properties not found in a standard list.
    NextKey: returns the next Id available HasDuplicateKeys: returns a boolean indicating if any Id is used more than once FindByKey: returns an object by Id RemoveByKey: removes an object by Id LocalizedString:
    DBC file's localization was handled by a string array followed by a mask. Included is a special LocalizedString class designed for this purpose. It has the following properties:
    Locale: The value for that specific DBC's language (readonly) Values: A string array of all locales Mask: The mask value this[TextWowEnum locale]: An indexer that gets/sets the value for a specific language WCH5+ (ADB files):
    ADB files don't contain the structural information to be loaded directly so require loading the header information from the associated DB2 file first. To cater for this a ReadHeader function is exposed in the DBReader class which is then feed into the Read function. For example:
    var counterpart = DBReader.ReadHeader(@"TestFiles\ArtifactPowerRank.db2"); var entry = DBReader.Read<ArtifactPowerRank>(@"TestFiles\ArtifactPowerRank.adb", counterpart);  

    43 downloads

    (0 reviews)

    0 comments

    Updated

  3. Alpha WoW Emulator

    A project that I’ve worked on and off over the last 8 months, the original idea was to create a simple sandbox with basic networking for the original Alpha client (0.5.3) however, as per usual, it evolved and I’ve implemented (read: thrown together) the base of a few other systems. I’ve not worked on this for 3+ months so thought someone else might be interested in reviving this as I don't plan on continuing this project.
     
    A quick disclaimer: this was never intended to be a commercial project and therefore it is the definition of spaghetti code! I wouldn’t recommend trying to use this for a public server or to even work on the code; just simply as a reference. If I were to redo this I’d use one of the vanilla cores as a base and work back from that.
     
    Current status of features:
     Chat and emotes   Chat channels not implemented   Items  Trading No enchanting through the chat window   Groups Group loot not implemented Quests No ScriptDev equivalent so scripted quests won't work   Not all of the correct quest filters are applied Issue with displaying quest objective count   Instance portals  Instancing itself is not implemented    Gameobjects  Only spawning (chests are animated though!) NPCs Vendors, talent trainers, bankers and skill trainers are working to some degree  Basic faction implementation  Friend/Ignore List Talent “tree” Spell effects not implemented  Spell casting   Spell effects not implemented but cast animations and pre cast checks are Creatures   Can melee combat Looting works but couldn’t figure out how looting worked in terms that tagging mobs wasn’t a feature, should everyone have access to the dead mob’s loot? Movement isn’t correct AI not implemented    Basic faction implementation    Leveling   Correct talent and skill points being applied as well as the animation Some things to note:
      I couldn’t find any reliable source to say if guilds even existed at this stage. The packets are there and the code is in the client but whether it was released I’m not sure so haven’t implemented it All settings are in the Globals.cs file including level cap    I’ve used a Mangos 1.12.1 database as the backend so a lot of items/creatures/stats are wrong GM Commands include   .additem <item number>    .addskill <skillid>   .setskill <skillid> <amount> <max amount>   .kil .level <level>   .money <copper amount>   .setpower <amount> Saving is something I started working on but never really implemented   The saving and database mechanic works around a custom ORM I built which is heavily reflection reliant Under the common project there is a file called structs.cs in the Constants folder. This is every struct I could extract from the client  Username and password is in the wow.ses file inside the client directory; by default the server will create an account based on this information   On my keyboard the '@' key brings up the client's debug console one very helpful command is "speed <amount>". The default being 6 and the max being ~50. Requirements:
      .Net 4.6.1    MySQL Installation:
    Client Download:
    ISO direct link Rar direct link Server:
     Extract the DBC files to a folder named “dbc” under the root directory MPQEdit works for this Unzip and run the SQL file in the Database.zip archive Inside the App.Config file is a MySQL connection string, change this to point to the above database  If you’re running the compiled version the config is called WorldServer.exe.config Creature a shortcut to WoWClient.exe and add –uptodate to the end i.e. "E:\World of Warcraft Alpha 0.5.3\WoWClient.exe" –uptodate Continuation:
    As I said before, I never intended to release this or use it for an actual server this was just a project to explore the Alpha further than the original sandboxes. However if a team decides to work on this I’ll be more than happy to lend a hand or offer what information I’ve sourced. 
    Source code can be found here: https://github.com/barncastle/Alpha-WoW
    The download link is a compiled version with DBCs
     

    191 downloads

    (1 review)

    9 comments

    Updated