Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2009, 11:05 AM
gnode
Hill Giant
 
Join Date: Aug 2008
Location: TX
Posts: 105
Default Set all items to be gnome usable?

How would I go about setting all items to be gnome usable? That way I can turn any class into a gnome and they would work.

The race field in the items table seems a bit odd to me (and class for that matter). I was expecting to see a column per race y/n, but I guess thats not how it works here...


Or even better maybe, just race all if that is easier.
Reply With Quote
  #2  
Old 08-16-2009, 11:13 AM
gnode
Hill Giant
 
Join Date: Aug 2008
Location: TX
Posts: 105
Default

Well, I answered my 2nd question. Just set all races to 65535.

Is there no trick to make everything gnome usable though? I would rather do that if possible...
Reply With Quote
  #3  
Old 08-17-2009, 08:01 PM
steve
Discordant
 
Join Date: Jan 2002
Posts: 305
Default

You mean add Gnome to every item's existing race list? No.

You could set everything Gnome only or ALL like you suggested above.
Reply With Quote
  #4  
Old 08-17-2009, 09:37 PM
pfyon's Avatar
pfyon
Discordant
 
Join Date: Mar 2009
Location: Ottawa
Posts: 495
Default

Looks like the race entry uses individual bits in a 16 bit number to set which races can use it. If you could find an item that is gnome only already, then I think I can give you a query to allow add gnome to every item.
Reply With Quote
  #5  
Old 08-18-2009, 01:04 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

It's a bitmask.

Here's an excerpt from the Wiki:
Quote:
races

* What race or races can use the item. Rememeber to add up the results.
o 0 = None
o 1 = Human
o 2 = Barbarian
o 4 = Erudite
o 8 = ELF
o 16 = HIE
o 32 = Dark Elf
o 64 = HEF
o 128 = Dwarf
o 256 = Troll
o 512 = Ogre
o 1024 = HFL
o 2048 = Gnome
o 4096 = Iksar
o 8192 = Vah Shir
o 16384 = Froglok
o 32768 = Shroud
* These are combined values, but with special meaning:
o 32767 = Any/All
o 65535 = Usually a container
So, using the bitwise operator AND (&), running this query will make all items usable by Gnomes:

Code:
UPDATE items SET races = races & 2048
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 08-18-2009, 11:56 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

where is the drakkin btw?
Reply With Quote
  #7  
Old 08-20-2009, 12:55 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

BTW the bitwise operations are a godsend for cases like this.


GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #8  
Old 08-20-2009, 02:54 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
where is the drakkin btw?
From races.h
Code:
#define human_1			1
#define barbarian_1		2
#define erudite_1		4
#define woodelf_1		8
#define highelf_1		16
#define darkelf_1		32
#define halfelf_1		64
#define dwarf_1			128
#define troll_1			256
#define ogre_1			512
#define halfling_1		1024
#define gnome_1			2048
#define iksar_1			4096
#define vahshir_1		8192
#define rall_1			16384 //froglok?
#define drakkin_1		32768
Drakkin is now 32768, and I am not sure what shroud would be, but guessing 65535ish.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 09-02-2009, 12:00 AM
gnode
Hill Giant
 
Join Date: Aug 2008
Location: TX
Posts: 105
Default

WARNING:
UPDATE items SET races = races & 2048

Makes all items gnome only (or in many cases bugs them to not have a race listed). It does not add gnome to all items.

What I am trying to do is add gnome to all items.

Maybe George can make an feature for eqitems to add a race to all items?
Reply With Quote
  #10  
Old 09-02-2009, 12:15 AM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

To add to the race list instead of replace it, you want to use a bitwise OR, not AND.
Code:
UPDATE items SET races = races | 2048
Reply With Quote
  #11  
Old 09-16-2009, 10:41 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

Quote:
Originally Posted by gnode View Post
WARNING:
UPDATE items SET races = races & 2048

Makes all items gnome only (or in many cases bugs them to not have a race listed). It does not add gnome to all items.

What I am trying to do is add gnome to all items.

Maybe George can make an feature for eqitems to add a race to all items?

Actually I am thinking of adding this, perhaps to a new tool that does mass alterations of this sort...

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:51 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3