PDA

View Full Version : Items through DB


Forlap_Thorninfoot
09-23-2008, 02:41 AM
Ok, so i'm working with george to get his item editor working, but until then i'm using navicat and have a question to ask here.

When i mod items directly in the DB, when it comes to stats funny things happen. For instance, if i put "7500" dmg i get something around 120. if i put 200 dmg, i end up with something near 70 or 80. If i put in more than +50 to any stat, i dont get that number i get something else and something less. Same for resistances.

Anyone know why this is happening?


PS. it seems EQ wont realise someone has more than about 32khp... need a GM heal to get it, and when you zone it drops back down to ~32k. Just FYI.

AndMetal
09-23-2008, 03:03 AM
The main reason is due to data types, most commonly signed vs unsigned integers. Because you can have negative stats on items, some stats are going to be limited to a maximum of +127, and that's because they're an 8-bit signed integer. However, other stats like HP, Mana, & Endurance, are usually 16-bit signed integers, so they will have a maximum of 32767. Damage in particular, though is an 8-bit unsigned integer, so it will have a maximum value of 255 (and it works fine setting it to 255 on my server, running 1129 of the Emu).

Most of the data types on the server side (which match up pretty much with what the client uses) can be seen here (http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/common/item_struct.h?revision=1.7&view=markup#l_73) in the source. This table (http://www.cplusplus.com/doc/tutorial/variables.html) also makes it a little easier to see what the numbers limits would be based on the data type you're using.

The biggest thing to keep in mind, though, is that with Augments, you can get around a lot of those limitations (and is primarily why they were introduced into EverQuest in the first place). For example, you can have a 255 damage weapon with 5 255 damage augments. They will all stack to give you a grand total of 1530 damage. In case you're curious, you can easily hit for between 10 & 30 THOUSAND damage each swing (non-crit). I think it ate through the Sleeper's 1 million HP in less than a minute, maybe 2 at the most.

Hope this helps.