Re: Implementing: Instancing
Posted: Sun Jul 28, 2013 6:12 pm
Yea that is a bug then. Both clients should have ended up in the base zone and not create a separate instance.
http://oldforums.eq2classic.com/
No lockout, no respawns, generally they are either solo or group.John Adams wrote:QUEST_INSTANCE
- Not Implemented Yet, but what are these rules?
When you kill a named mob the lockout timer starts and you can't reenter, some even have a failure lockout timer that starts as soon as you zone in so you can't reenter. Don't think we need to track mobs in these as once the zone shuts down if you are locked out you can't reenter and if you aren't locked out the zone resets.John Adams wrote: SOLO_LOCKOUT_INSTANCE, GROUP_LOCKOUT_INSTANCE, RAID_LOCKOUT_INSTANCE
- Rule: You enter the Lockout instance, if you leave you cannot come back? Or, when you FINISH you cannot do it again until {timer}?
- Also assuming Solo (1) Group (6) and Raid (12-24) are the same rule, just different group sizes.
This is correctJohn Adams wrote: SOLO_PERSIST_INSTANCE, GROUP_PERSIST_INSTANCE, RAID_PERSIST_INSTANCE
- Rule: You enter and do whatever you want, can leave, and come back any time - until {timer}?
- Also assuming Solo (1) Group (6) and Raid (12-24) are the same rule, just different group sizes.
Really nothing special just a new instance pops after a set limit.John Adams wrote: TRADESKILL_INSTANCE
- Rule: Public instance with no spawn tracking (no combat - not even rats!)
- Anyone can enter, up to the max-player, zone closes down when last player exists after {timer}
Think it is identical to the tradeskill instance, just pops a new instance after a certain player limit is reached. Also I don't think spawns need to be tracked on these or the tradeskill instances.John Adams wrote: PUBLIC_INSTANCE
- Rule: Public instances where dead spawns are tracked
- The only possible thing I can think of are zones like Frostfang max-players 100, the 101st player would spawn a new instance of Frostfang
Not sure about the tour spawning a new instance for every one, thought it was just the base zone you went into but no clue, never ran into another player while touring a house so it is possible it is temp instances.John Adams wrote: PERSONAL_HOUSE_INSTANCE
- Rule: Owned by a player who can set access rights on their instance. Persistent even through shutdowns.
- Depending on Access, Visitors can come see my house.
- Take a Tour option shows empty, solo instance of the house (I don't think 2 players can Tour the same house?)
Same thing for tour here as the player house. Also a guild can make the hall private, not sure if it defaults to public or private though.John Adams wrote: GUILD_HOUSE_INSTANCE
- Rule: Owned by a Guild. Persistent even through shutdowns. Always public?
- Take a Tour option shows empty, solo instance of the hall (I don't think 2 players can Tour the same hall?)
This, in my head at least, would be identical to lockout instances just no lockout timers. The only real difference is these will not display on the instance window like lockout and prestige will.John Adams wrote: QUEST_INSTANCE
- Not Implemented Yet, but what are these rules?
Code: Select all
switch(instanceType)
{
case SOLO_LOCKOUT_INSTANCE:
{
break;
}
case SOLO_PERSIST_INSTANCE:
{
break;
}
case GROUP_LOCKOUT_INSTANCE:
{
break;
}
case GROUP_PERSIST_INSTANCE:
{
break;
}
case RAID_LOCKOUT_INSTANCE:
{
break;
}
case RAID_PERSIST_INSTANCE:
{
break;
}
// if its public/tradeskill, look for a public already setup
// otherwise find one in the database and use its instance id
case PUBLIC_INSTANCE:
{
break;
}
case TRADESKILL_INSTANCE:
{
break;
}
case PERSONAL_HOUSE_INSTANCE:
{
break;
}
case GUILD_HOUSE_INSTANCE:
{
break;
}
default:
{
// NONE
}
}
An entry should be put into character_instances for every lockout or persistant instance they enter, this table would be used to populate the instance window in game (alt + z)John Adams wrote:Jab, I will attempt to follow the code through a zone startup (but threading always gets in my way heh). What i need to figure out is what constitutes a `character_instances` entry vs not.
`characters`.`instance_id` should probably only be set on persistant instances, when the player logs in it will try to enter a zone with that instance, it gets what zone that is by looking up the id in the `instances` table. It might be best to move the char to the entrance of the instance in the parent zone upon logging out if the instance is not persistant.John Adams wrote: What threw me yesterday (and caused a ton of crashes) was that the `characters`.`instance_id` value got set, but I purged the `instances` table and I think World doesn't like that. Going to need some self-healing in cases like that I suppose.
It should be added for all versions of persistent and lockout I believeJohn Adams wrote: I thought a `character_instance` would only be added when it was a solo, group, and maybe even raid? and again, maybe only persistent? I do not fully understand that code yet, so i'll toss it out there until I get a chance to dive back in.
Honestly, I am not sure. I will have to follow the code again to see.John Adams wrote: Lastly, do you know if this is the ONLY place for calculating instance access? I think there was the other spot I showed that the if/else was empty. I think that was on the removal success, which as you know currently doesn't work.
We could add some more values to player to hold x, y, z, heading and zone_id of the parent zone, just set it when the player zones into an instance. I have not thought about this issue until my last post and that is just the first idea that popped into my head, there may be a better way to do it.John Adams wrote: Regarding the `characters`.`instance_id`, I think I get ya. If i CAMP inside an instanced zone, this value should get the instance_id. So when I come back, it knows to repop that instance_id and read the removed spawns. I agree if it is a locked_out scenario, we probably need to pop them outside. Maybe we need an additional value in the instances table to show who that parent is? In cases of zone doors, that's easy. But what about clickies or other means to get in -- we may not know where they came from (unless there is ALWAYS an adjoining zone?)
Code: Select all
INSERT INTO `transporters` (`id`, `transport_id`, `transport_type`, `display_name`, `destination_zone_id`, `destination_x`, `destination_y`, `destination_z`, `destination_heading`, `trigger_location_zone_id`, `trigger_location_x`, `trigger_location_y`, `trigger_location_z`, `trigger_radius`, `cost`, `message`, `min_level`, `max_level`, `quest_req`, `quest_step_req`, `quest_completed`) VALUES (1, 1, 'Zone', 'Cave of Illboding Dark', 516, 738.774, 41.9821, 133.181, 0, 470, -1, -1, -1, -1, 0, NULL, 0, 0, 1, 1, 0);
INSERT INTO `transporters` (`id`, `transport_id`, `transport_type`, `display_name`, `destination_zone_id`, `destination_x`, `destination_y`, `destination_z`, `destination_heading`, `trigger_location_zone_id`, `trigger_location_x`, `trigger_location_y`, `trigger_location_z`, `trigger_radius`, `cost`, `message`, `min_level`, `max_level`, `quest_req`, `quest_step_req`, `quest_completed`) VALUES (4, 1, 'Zone', 'Cave of Illboding Dark: The Source', 517, 738.774, 41.9821, 133.181, 0, 470, -1, -1, -1, -1, 0, NULL, 0, 0, 2, 1, 0);
Woot nice.Jabantiz wrote:Added min level, max level, quest completed, and quest and step requirements to the transporter code. This will allow for the destination to only show up if they meet the requirements. I am posting in the instance thread as I had the instance cave of illboding in frost fang sea in mind for this.
Fixed this and now all transporters have the capability to load the player into an instance. Also fixed a display issue with the window when you have multiple destinations and at least one is not displayed.Jabantiz wrote:There is an issue that instances are not loaded through this code, I am looking into that now.