Post
by Lax » Thu Apr 22, 2004 2:11 am
The benefits are given all over, read mq2data related threads... particularly the one in the development general linked from most of the mq2data posts I've done.
The only reason you think that the old system is good is that it is how it was given to you. If you were using MQ2Data for a year, and then were shown MQ2Parm, you would say "what the hell is this thing, why are we using it, HOW do i do it.. this $char(hp,cur) crap makes no sense... how can i ${Spawn[gm].ID}? Is there a replacement for ${InvSlot[pack1].Item}?" and so on. The new system makes it a million times easier to get what you want out of it.
The new system is exactly as ml2517 put it. Speed-wise, MQ2Data vs MQ2Parm.. MQ2Parm used 1000ms of processing time in roughly 30 seconds with a fairly simple UI. MQ2Data with the same UI used 1000ms of processing time in ... about 8 minutes last I clocked it. It's a few degrees separated from MQ2Parm. Intuition-wise, MQ2Data calls everything an object... if you can get something out of one object, you're going to get it out of another object of the same kind -- as opposed to MQ2Parm, where every parameter had to be created for every possible way you might find the same object. e.g.. $target might give you different things than $spawn, even though you might be looking at the same NPC.
MQ2Data also separates the variable and non-variable portions of your query.. For example... $spawn(1,id) .. the 1 part is variable, but there is no clear indication of this. The same thing with MQ2Data looks like ${Spawn[1].ID}. Any portion in brackets you know is variable, any other portion is not.
Internally, MQ2Data is actually a lot easier to work with than the MQ2Parm system (meaning, to people who are creating new "parms" in the old system or data types/objects in the new system). Other than the variable portion, no parsing is left up to the developer. Plop in the names of your "members", specify what kind of object you're giving in return and set the value... thats about it.
MQ2Data replaces an increasingly inadequate system. What benefits are there for keeping the old system other than not having to convert to the new system? Any reason will do, think of one