The Goal:
Set one location for armor and weapon stats.
Our Current Situation:
We store data for weapons and armor in XML files AND in SQL tables. Some info is read from each of these locations. This is inefficient and makes it a pain in the ass for DP updates since TWO locations need to be maintained.
Possible Outcome #1 - SQL:
We no longer store OR call weapon and armor stats from xmls. For weapons, this means that we do NOT define base values for patk, matk, rcrit, acccombat, patkspd, etc in the xmls. These values will be deleted from the XMLs and will now be called directly from the database. Some XML values will remain. These include the enchant information (see below for further discussion on this), and outdated weapon SA information (see below for further discussion on this).
Possible Outcome #2 - XML:
Whatever information isn't being called from the SQL tables, we delete. pdef, patk, etc, etc. All the stuff we define in xmls that gets called instead of from SQL. We verify that the core doesn't attempt to pull that information EVER from the database and once it's verified, remove it.
Pros/Cons/Questions/Points of interest...
Some of these questions are important that we discuss and get answers to. Otherwise we'll just continue to use inefficient methods of doing things. And honestly, that sucks balls.
I want to make a little note here that I pretty much abandoned all hope some time ago for the majority of the DP team due to the lack of answers/responses to some of the same questions I'm about to pose below. Either they didn't know, didn't care enough to find out the answer, or just plain didn't care at all. But since we're all together now in one forum, I think it's time some of these were asked again.
Question: Which method is more efficient? DB or XML? This is static information.
In regards to updates, SQL is the clear winner. We can easily run scripts and fix a number of items in a quick second. XML requires a lot of manual updating.
In regards to flexibility, XML wins. But how flexible does this static information need to be? Weapons and armor don't exactly evolve nearly as fast as skills do (which is why skills need to be done in XML because it's far more flexible when we're fixing them).
Question: Currently, why do we define <enchant val="0" order="0x0C" stat="blah"/>?
I've looked through a random sampling of files from the armor and weapons folders and this value never deviates. So why do we keep defining it? Why can't we set this in the core?
This is further solved if we can get support for isEnchantable added:
viewtopic.php?f=69&t=10751
That way all armor and weapons have the <enchant val="0" order="0x0C" stat="blah"/> defined in the core, but are restricted for enchanting via their isEnchantable value.
Question: Why do we currently define add val="0" order="0x10". That seems dumb to add 0. Or do we do it just because that's what the C4 data had in it's files so we never bothered to think "do we really need to say, add 0"?
Point of interest: If SQL wins, some of the only information that will be left in the weapon XMLs will be weapon SA info. We can't have this information located in the weapon XMLs any longer. I've spent many hours going through official C4 data along with information from a number of sources to make weapon SAs more retail-like. But I need cooperation on this from a certain member of the DP team (you know who you are). Our current method is not only very non-retail-like, but lazy, and confusing for future editors (which causes problems that I have previously pointed out and which have been ignored, lol). So if we go with SQL, after all is done, our next goal should be to clean out the weapon xmls further by getting rid of weapon SA information and doing them the right way.
Point of interest: If SQL wins, XMLs SHOULD only be used for item restriction information. But we might be able to move that information into SQL as well. Though I don't see that method for restriction info being as flexible as keeping it in the xmls. Thoughts?
I'm sure I've missed a few things as it's nearly 6:00 am here. But I wanted to get the ball rolling on this discussion because I really want to see this done. And I'm sure the DP team would love to not have to manage two locations for weapon and armor info anymore.
