Jump to content

Which area should a ask dev questions advice about ad.exe ?


antz

Recommended Posts

Since we lack a much needed "General Development" section in the forums, you may wish to post discussion and questions for development projects in the appropriate server development section for which your patch would apply.

If it is meant to apply to all the server versions, then the Cafe will be fine as it is meant for general chat and posts that don't quite fit anywhere else.

Sorry about the confusion, but I'm glad you asked. :)

The MaNGOS Community forums, like the server projects, are still a work in progress. We are operating with only one admin on duty, and he's also busy herding cats as Lead Developer, so it is taking longer to sort the forums, add new features, and fix bugs.

Please bear with us and forgive any shortcomings. I promise that we're working hard to make things better, even though it may not happen quickly.

Link to comment
Share on other sites

It would be especially useful for TBC devs, so posting it in their development section would ensure the information gets to the right people. That's assuming the technical information isn't too outdated to be useful. MaNGOS has been through some major changes, since the days when TBC was still played on Blizzard's servers.

Even if it is outdated, the information would still be useful to those learning the essentials of server core-database interaction and other concepts. Based on that criteria, it would be good to post it in our university.

Hmmm... I'm not being much help, am I? :lol:

It's a judgement call on your part, based on the assessment of where the information will be most useful and to whom it has the most value.

I suppose you could post it in one place, then put a post in the other which links back to the charts and document. This way, you can make both developers and students aware of the resources while tailoring each post to the intended audience.

And that, good sir, was a scenic trip through the labyrinth of my thought process! No extra charge for the detour through the "Page 3 Girl" section. :P

Link to comment
Share on other sites

Right then.... Ideas time....

For the development of AD.exe to produce SQL files i want to remove the actual definitions of the fields / files to be included from the exe itself.

Having seen some other attempts at generating the SQL automatically, i've come up with the following rules:-

If AD.exe is run without it's config file (more on this in a bit), it will generate an SQL file for every DBC file and call the table after the DBC filename. The fields would be named Col1, Col2 etc and it will make a 'best guess' at what the field type should be based on the contents.

If I config file is found, the settings here define what files to generate, what the table should be called, the fieldnames and field type.

Something along the lines of:-

 <Item>
   <include>N</include>
   <tablename>tblItem</tablename>
   <field type="uint" name="id" />
   <field type="uint" name="class" />
   <field type="uint" name="subclass" />
   <field type="int" name="unk0" />
   <field type="int" name="material" />
   <field type="uint" name="displayid" />
   <field type="uint" name="inventorytype" />
   <field type="uint" name="sheath" />
 </Item>

 <ItemDisplayInfo>
   <tablename>tblItemDisplayInfo</tablename>
   <include>Y</include>
   <index>
     <primary>id</primary>
   </index>
   <field type="int" name="id" />
   <field type="string" name="icon" />
 </ItemDisplayInfo>

In the above example...

Item.DBC would not be extracted/converted but ItemDisplayInfo would.

The process would create a table called tblItemDisplayInfo with two fields id and icon, it would also set a primary key on the id field.

If we do this right, then AD.exe will not need updating in future (or as we learn more about the contents of the DBC files), we would just need to ammend the config file. As an additional note, all we would need for AD.exe to support all versions of mangos is the correct config file.

(we'll tackle the core changes seperately to this post).

Your thoughts ?

Link to comment
Share on other sites

Right then.... Ideas time....

For the development of AD.exe to produce SQL files i want to remove the actual definitions of the fields / files to be included from the exe itself.

Having seen some other attempts at generating the SQL automatically, i've come up with the following rules:-

If AD.exe is run without it's config file (more on this in a bit), it will generate an SQL file for every DBC file and call the table after the DBC filename. The fields would be named Col1, Col2 etc and it will make a 'best guess' at what the field type should be based on the contents.

If I config file is found, the settings here define what files to generate, what the table should be called, the fieldnames and field type.

Something along the lines of:-

 <Item>
   <include>N</include>
   <tablename>tblItem</tablename>
   <field type="uint" name="id" />
   <field type="uint" name="class" />
   <field type="uint" name="subclass" />
   <field type="int" name="unk0" />
   <field type="int" name="material" />
   <field type="uint" name="displayid" />
   <field type="uint" name="inventorytype" />
   <field type="uint" name="sheath" />
 </Item>

 <ItemDisplayInfo>
   <tablename>tblItemDisplayInfo</tablename>
   <include>Y</include>
   <index>
     <primary>id</primary>
   </index>
   <field type="int" name="id" />
   <field type="string" name="icon" />
 </ItemDisplayInfo>

In the above example...

Item.DBC would not be extracted/converted but ItemDisplayInfo would.

The process would create a table called tblItemDisplayInfo with two fields id and icon, it would also set a primary key on the id field.

If we do this right, then AD.exe will not need updating in future (or as we learn more about the contents of the DBC files), we would just need to ammend the config file. As an additional note, all we would need for AD.exe to support all versions of mangos is the correct config file.

(we'll tackle the core changes seperately to this post).

Your thoughts ?

Smart, this is prolly the best solution (using XML as config and predefine field types and choose which tables to export)

I hope you succeed with this, will make life easier for everyone :)

Regards! :D

Link to comment
Share on other sites

had a few minutes of inspiration and added a new switch which will generate a basic XML config file based on the DBC files you have.

- Quite helpful for initially setting up the config file.

- Redefined the layout of the XML file slightly to allow individual fields to be disabled from the import into the DB.

- Also moved hardcoded values out of the application and into the config files

The XML currently looks like this:-

<?xml version="1.0"?>
<root>
   <Config>
       <Lang_Count>12</Lang_Count>
       <Languages>"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU"</Languages>
       <Min_Supported_Build>15050</Min_Supported_Build>
       <Expansion_Count>4</Expansion_Count>
       <World_Count>2</World_Count>
   </Config>
   <Files>
......snip.......
       <Spell>
           <include>Y</include>
           <tablename>dbc_Spell</tablename>
           <fieldcount>25</fieldcount>
           <field type="bigint" name="col0" include="y" />
           <field type="text" name="col1" include="y" />
           <field type="text" name="col2" include="y" />
           <field type="text" name="col3" include="y" />
           <field type="text" name="col4" include="y" />
           <field type="bigint" name="col5" include="y" />
           <field type="bigint" name="col6" include="y" />
           <field type="bigint" name="col7" include="y" />
           <field type="float" name="col8" include="y" />
           <field type="bigint" name="col9" include="y" />
           <field type="bigint" name="col10" include="y" />
           <field type="bigint" name="col11" include="y" />
           <field type="bigint" name="col12" include="y" />
           <field type="bigint" name="col13" include="y" />
           <field type="bigint" name="col14" include="y" />
           <field type="bigint" name="col15" include="y" />
           <field type="bigint" name="col16" include="y" />
           <field type="bigint" name="col17" include="y" />
           <field type="bigint" name="col18" include="y" />
           <field type="bigint" name="col19" include="y" />
           <field type="bigint" name="col20" include="y" />
           <field type="bigint" name="col21" include="y" />
           <field type="bigint" name="col22" include="y" />
           <field type="bigint" name="col23" include="y" />
           <field type="bigint" name="col24" include="y" />
       </Spell>
   </Files>
......snip.......
</root>


Link to comment
Share on other sites

  • 3 weeks later...
  • 6 months later...

This work has spilled over into a new extractor:- MaNGOSExtractor in the mangoszero/tools repo

All the functionality mentioned above and can currently extract all dbc's from any version of wow without modification

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use