This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - barncastle

Pages: [1]
1
Tools / [TOOL] WDBX Editor
« on: August 14, 2016, 07:24:03 pm »
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 both 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, WoD being ~95% complete and everything else being 99%+ (excluding column names).

Link to the 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)
  • 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.

Change Log:

V 1.0.1
The following things have been changed/added:

  • Added a FileSystemWatcher so that definitions are reloaded as soon as any definition file is saved meaning the application no longer needs to be restarted
  • The program now functions correctly if set as the default program for files (thanks to Skarn for this suggestion)
  • Find and Replace now uses a lookup table so is much faster
  • Specific errors have been refined and made more human
  • The program now no longer stops importing if a string is not found in the string table and instead writes "String not found" in the cell's value. This is an attempt to combat some incorrectly modified DB2 files I've come across
  • Definitions have been updated for WoD 6.2.4 which is at ~98% now
  • A fair amount of optimisation and tinkering

After some advice from Marlamin, Schlumpf and Amaroth I'm going to put the source on git in the coming week so that others can contribute and make this program better!

V 1.0.2

The following things have been changed/added:

  • WCH7 (the new Legion ADB format) is now supported for both reading and writing
  • A range of bugs and issues have been resolved
  • Have added some options to the CSV import to fix erroneous source data:
    • Option 1 (default): Increment Ids so none are duplicated
    • Option 2: Take the newest record of the duplicated Ids
  • The DataGridView has been overhauled meaning it is slightly faster, more memory efficient and now has a cache and state system implemented
  • Undo/Redo has been rebuilt and now triggers on all events properly
    • Note: Undo/Redo history is still lost on changing file
    • Deleting 25+ rows at once is a permanent action (cannot be undone), due to BindingSource + DataGridView performance limitations, and are prompted to complete this action
  • New rows now have default values based on their value type and value types are now enforced
  • Added a new option to the column filter to hide all empty columns (the eye button)
  • Added a clear row right click option which sets the row to default values
  • Added the ability to insert a row with a specific Id provided it doesn't exist (Edit Menu/Ctrl + I)
  • Added a new line shortcut to avoid having to scroll to the bottom of the grid (Edit Menu/Ctrl + N)
  • Have updated the Legion definitions after some issues with WCH7 structures

A big thanks to UncleChristiof and Skarn for ideas, bugs and usability issues!

V 1.0.3

The following things have been changed/added:

The following things have been changed/added:
  • WCH8 (the new Legion ADB format) is now supported for both reading and writing
  • Save As (F12) has been added meaning Save doesn't prompt for file location
  • SQL exprt now works with all "sql_mode"s
  • SQL import now automatically fixes NULL values
  • Datagrid context menu has been added to all cells as well row headers
  • Supports opening multiple selected files at once
  • Supports drag and drop files to open (based on Windows permissions)
  • Added JSON as an export type
  • Added version check based on Github releases

The application now runs as a single instance when launched in GUI mode. This means any files opened thereafter are sent to the running instance instead of opening the application multiple times. In certain situations this is not ideal, so a button has been added to the Load Definition screen which will open a new instance of the application for all files waiting to be loaded.

A range of command line arguments have been added (this is still early stages). This is the beginning of providing an interface so tasks can be automated/invoked via batch scripts and external programs.
Commands currently include (see the help file for more information):
  • Console Mode which opens the software in a console session
  • Extract which will extract all DBC/DB2 files from a MPQ archive or CASC directory based on a filter string
  • Export which exports a specific file to CSV, JSON or SQL
  • SQL dump which dumps a file's data directly into a MySQL database table

Thanks to Luzifix for helping with development



X-Post to other site: http://www.model-changing.net/files/file/82-wdbx-editor/

2
Miscellaneous / [RELEASE] Alpha WoW Emulator
« on: July 10, 2016, 06:15:45 pm »
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, I've had to rework the data quite a bit for it to be usable its not simply a copy, paste, done job
  • GM Commands include
    • .additem <item number>
    • .addskill <skillid>
    • .setskill <skillid> <amount> <max amount>
    • .kill
    • .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:
https://www.uloz.to/!5tRJFJdc/wow-friends-and-family-part1-rar
http://www.uloz.to/6113368/wow-friends-and-family-part2-rar
http://www.uloz.to/6113533/wow-friends-and-family-part3-rar

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
  • Create a shortcut to WoWClient.exe and add –uptodate to the end i.e. "E:World of Warcraft Alpha 0.5.3WoWClient.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
Download link can be found here (compiled with DBCs): https://mega.nz/#!9cVRza4S!758JXs-LJP3mR15zoAaEP0lM6tR1nvmMNOBJMe_NOQk
X-Post to other forum with images here: http://www.model-changing.net/files/file/80-alpha-wow-emulator/

Pages: [1]