|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Archive::Database/World Building Archive area for General Discussion's posts that were moved here after an inactivity period of 90 days. |
 |
|
 |

03-06-2003, 03:17 AM
|
Sarnak
|
|
Join Date: Sep 2002
Location: Montreal, QC
Posts: 47
|
|
Any MySql experts ?
Today they updated the source code to version 0.4.3-DR3 and they modified the database :
They removed this in npc_Types
Quote:
usedspells varchar(70) NOT NULL default '',
|
and they added this
Quote:
npc_spells_id int(11) unsigned not null default '0',
|
old:
Quote:
CREATE TABLE npc_types (
id int(11) NOT NULL auto_increment,
name text NOT NULL,
level tinyint(2) unsigned NOT NULL default '0',
race smallint(5) unsigned NOT NULL default '0',
class tinyint(2) unsigned NOT NULL default '0',
bodytype int(11),
hp int(11) NOT NULL default '0',
gender tinyint(2) unsigned NOT NULL default '0',
texture tinyint(2) unsigned NOT NULL default '0',
helmtexture tinyint(2) unsigned NOT NULL default '0',
size float NOT NULL default '0',
hp_regen_rate int(11) unsigned NOT NULL default '0',
mana_regen_rate int(11) unsigned NOT NULL default '0',
loottable_id int(11) unsigned NOT NULL default '0',
merchant_id int(11) unsigned NOT NULL default '0',
mindmg int(10) unsigned NOT NULL default '0',
maxdmg int(10) unsigned NOT NULL default '0',
usedspells varchar(70) NOT NULL default '',
npcspecialattks varchar(36) NOT NULL default '',
banish int(10) unsigned NOT NULL default '0',
aggroradius int(10) unsigned NOT NULL default '0',
social int(10) unsigned NOT NULL default '0',
face int(10) unsigned NOT NULL default '1',
luclin_hairstyle int(10) unsigned NOT NULL default '1',
luclin_haircolor int(10) unsigned NOT NULL default '1',
luclin_eyecolor int(10) unsigned NOT NULL default '1',
luclin_beardcolor int(10) unsigned NOT NULL default '1',
fixedz tinyint(2) unsigned NOT NULL default '0',
d_meele_texture1 int(10) unsigned NOT NULL default '0',
d_meele_texture2 int(10) unsigned NOT NULL default '0',
walkspeed float NOT NULL default '0',
runspeed float NOT NULL default '0',
MR smallint(5) NOT NULL default '0',
CR smallint(5) NOT NULL default '0',
DR smallint(5) NOT NULL default '0',
FR smallint(5) NOT NULL default '0',
PR smallint(5) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
|
new:
Quote:
CREATE TABLE npc_types (
id int(11) NOT NULL auto_increment,
name text NOT NULL,
level tinyint(2) unsigned NOT NULL default '0',
race smallint(5) unsigned NOT NULL default '0',
class tinyint(2) unsigned NOT NULL default '0',
bodytype int(11),
hp int(11) NOT NULL default '0',
gender tinyint(2) unsigned NOT NULL default '0',
texture tinyint(2) unsigned NOT NULL default '0',
helmtexture tinyint(2) unsigned NOT NULL default '0',
size float NOT NULL default '0',
hp_regen_rate int(11) unsigned NOT NULL default '0',
mana_regen_rate int(11) unsigned NOT NULL default '0',
loottable_id int(11) unsigned NOT NULL default '0',
merchant_id int(11) unsigned NOT NULL default '0',
npc_spells_id int(11) unsigned not null default '0',
mindmg int(10) unsigned NOT NULL default '0',
maxdmg int(10) unsigned NOT NULL default '0',
npcspecialattks varchar(36) NOT NULL default '',
banish int(10) unsigned NOT NULL default '0',
aggroradius int(10) unsigned NOT NULL default '0',
social int(10) unsigned NOT NULL default '0',
face int(10) unsigned NOT NULL default '1',
luclin_hairstyle int(10) unsigned NOT NULL default '1',
luclin_haircolor int(10) unsigned NOT NULL default '1',
luclin_eyecolor int(10) unsigned NOT NULL default '1',
luclin_beardcolor int(10) unsigned NOT NULL default '1',
fixedz tinyint(2) unsigned NOT NULL default '0',
d_meele_texture1 int(10) unsigned NOT NULL default '0',
d_meele_texture2 int(10) unsigned NOT NULL default '0',
walkspeed float NOT NULL default '0',
runspeed float NOT NULL default '0',
MR smallint(5) NOT NULL default '0',
CR smallint(5) NOT NULL default '0',
DR smallint(5) NOT NULL default '0',
FR smallint(5) NOT NULL default '0',
PR smallint(5) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;
|
Since I'm really not an expert at mysql I was wondering how I could possibly modify my npc_types table to match the new structure, Any help with this would be mucho appreciated. Thanks in advance 
__________________
Good, bad ... I'm the guy with the gun.
|
 |
|
 |

03-06-2003, 03:38 AM
|
Demi-God
|
|
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
|
|
Thanks for posting that TO, I was planning on posting a 'heads up' on it to the database creators.
This creates a 'spell list' table, where you can assign spells to the npc_type based on it. It's part of a new MobAI thats being worked on.
(The old NpcAI had a horrible performance problem associated with it, this one will be much faster)
To modify your existing npc_types, do a
alter table npc_types drop column usedspells;
then
alter table npc_types add column npc_spells_id int(11) unsigned not null default '0' after merchant_id;
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
|

03-06-2003, 03:53 AM
|
Sarnak
|
|
Join Date: Sep 2002
Location: Montreal, QC
Posts: 47
|
|
hehe
Yup  Thanks alot trump, its working perfectly. u r da man
__________________
Good, bad ... I'm the guy with the gun.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 05:03 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |