Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2004, 03:50 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default Instance table - ideas and looking for suggestions.

So I'm going to take a stab at instancing, and was thinking about storing the info for each instance in a table. I have some ideas for what to add, but I was wondering if anyone had suggestions on what else to add(or even exclude) prior to working on the code.

Here's what I have so far:

CREATE TABLE instance (
instid int(11) NOT NULL,
charid int(11) NOT NULL default 0,
zoneidnumber int(11) NOT NULL default 0,
short_name varchar(16) NOT NULL default 0,
port int(11) NOT NULL default 0,
advlevel int(4) NOT NULL default 0,
UNIQUE KEY charid (charid)
) TYPE=MyISAM;

instid - The ID of the instance.
charid - The ID of the character the instance belongs to.
zoneidnumber - The ID of the zone the instance takes place in.
short_name - The short name of the zone the instance takes place in.
port - The port number of the zoneserver.
advlevel - The adventure level, used to spawn NPCs on a certain level range.

charid will be unique, only one instance per character at any given time.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #2  
Old 08-15-2004, 04:02 PM
animepimp
Dragon
 
Join Date: Jan 2004
Posts: 860
Default

Shouldn't each instance allow for multiple characters? It won't be all that useful if groups can't get into the same instance. Or is it going to allow multiple ones in but belong to a certain character?
Reply With Quote
  #3  
Old 08-15-2004, 04:09 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Each instance will be usable by multiple characters, it's just that each character can only have one instance ID associated with them. So a person can't have multiple instances they can enter at one time. If they choose another instance, the current instance they're assigned to will be deleted(for that person and anyone in their group).
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #4  
Old 08-16-2004, 01:40 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

I think the character associatiion needs a bit of work. I dont think that the charid belongs in this table.

possibilities I see:
1. make an instance table, with an instance ID (PK)... one per instanced zone.
Then make a char_instance table which associates players to instances.. if you make the charID the primary key in the association table, it enforces the 1 zone/player constraint.

2. take charid out of the instance table, add a field to the account table which is their instance ID. this also enforces your constraint.

I can help with the SQL to manipulate this if you want. just ask.
Reply With Quote
  #5  
Old 08-16-2004, 07:13 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Hmm, I'd probably rather the instance ID be in the character_ table instead of the account table if it was removed from the instance table. What were your thoughts exactly on the various tables? I'm not sure I understand what you mean by setting up the instance table so that there's one instance per zone. Or did you mean one instance per character?

Edit: Nevermind, just read your post again and understand what you mean heh.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #6  
Old 08-16-2004, 07:29 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

yea, my bad... character_ is what i meant, not account
Reply With Quote
  #7  
Old 08-16-2004, 07:54 AM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Ok some new ideas, going by your suggestions.

1. add a field to zone that dictates whether or not the zone in question is an instance style zone. 1 = yes, 0 = no. Basically yes means that there can be multiple instances of the zone, no means that there can only be one of that zone for players to play in.

2. add a field to character_ called instid, this field stores the particular instance ID that character is assigned to.

3. in the instance table, remove charid and use this table as the general instance info...instid, zoneid, advlevel, etc. When the player zones it will check this table and if the target_zone id = the zoneid for their instid, then it will move them to that instance, otherwise it will continue like normal.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #8  
Old 08-16-2004, 08:08 AM
Doodman's Avatar
Doodman
Developer
 
Join Date: Aug 2003
Posts: 246
Default

Couple things to think of:

shortname - Take it out. It is not needed there. zoneid is enough to identify the zone. If you want the name, get it from the zone table via a join.
port - What use is this? Especially without an IP. Zones do no tneed to be on the host.

Also, zoneid is a int32 where one half is the actually zoneid and the other (if non-zero) is the instance id. So, the way to do this would be to make sure that world is tracking zoneid -> zoneserver by full int32 and to boot zoneservers like normal. Then add some code to zone to query your table on zone bootup if the instance id portion of the zoneis is non-zero.

Also, to do this right you may want to look at the zone->world registration and have them register as "instance" zone servers. so that you can reserve certain zones for instance only. Like, perhaps:
Code:
zone . 1.2.3.4 7000 1.2.3.4
Is still a normal dynamic zone, but maybe
Code:
zone % 1.2.3.4 7000 1.2.3.4
Is an instance zone. This could even be extended to be like
Code:
zone %.% 1.2.3.4 7000 1.2.3.4
to bring up certain instances per main zone, if you wanted to take it that far.
Reply With Quote
  #9  
Old 04-15-2005, 01:53 PM
bushman77
Hill Giant
 
Join Date: May 2003
Location: In the bush
Posts: 129
Default zone instancing questions

ok I realize there are some difficulties with instancing, but lets say you want a group to enter into this zone? now with a zone being instancted to just 1 character or accoutn, won't that mean other people in your group are excluded from entering into the instance?
Also the other thing that comes to mind is dynamic mob stats. Is it posibable to enter a varable as a field in an entery in the ncp_types table and take the value from a perl script for which an NPC take from the group average?

Mabey like someone said earlier, have a zone lets say guka renamed serveral times to things such as guka01, guka02 and so on in the eq client files. People don't need to download them just to make a copy of the guka files and rename it to the appropiate zone name. i do realize with each new instance created this way an entery will also have to be entered into the DB with the corrosponding name. But this is not really true instancing.

Just a though that came to mind upon reading this posting
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 02:28 AM.


 

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