Log in

View Full Version : :idea: Zone Points: How do they actually work?


daemonsleyr
01-18-2003, 05:48 PM
This requires a bit of background. I am working on puting together a server that only uses part of the original EQ world. If you spend much time in the IRC chat during the evenings, you have probably head me bitching about it and asking for advice so often that you have me on ignore. The problem I have been struggling with is that the zone points do not change where they point based upon the target_zone column in the zone_points table. The target zones are hard-wired into the zonepoints themselves.

This error is caused by the way that zoneing packets are produced, and it wasn't until tonite that I looked up their handling in the source. The zonepoint passes the ID of the target zone to the world server which promptly looks up and points out the appropriate zone name. The ID information is held in the entries of the zonepoints_raw table in the form of a BLOB. While I have not completely decifered the blob, I can say with certianty what bytes hold the target zone number.

The last 8 bits (1 byte, 2 hex digits).

So for all of you who are interested in making GFay zone to ECommons instead of BB, you just have to change the last two bytes. Make sure to convert the zone id number to hex (the windows calculator works well for this) and make sure that you fix up all the appropriate entries in the database.

Since I got started on this: Does anyone really care what the rest of the blob format of the raw points is? Basically I'm asking if I whether should keep fiddling with it to find out more, or is that information utterly moot.

- Daemonsleyr - Daemon's World -

Lyenu X`Arie
01-19-2003, 07:29 PM
I logged onto live EQ and zoned from north freeport to west freeport to see what I could find it common. I noticed that as said, the list byte is the target zone id. I also noticed that the target x and y were there as well. Although it ponders me why they do not give the target z as well ~shrug~. Anyways, hopefully this proves to be useful. Here is the struct:


struct ZoneLineData_Struct
{
/*0000*/ int8 unknown0000[7];
/*0007*/ float target_x;
/*0011*/ float target_y;
/*0015*/ int8 unknown0015[8];
/*0023*/ int8 target_zone;
};

Lurker_005
01-20-2003, 03:57 PM
I wanted to elaberate on that a bit. Here is what I could figure out. I didn't get a chance to make changes to one and try it in game, but looking at the data it works

struct ZoneLineData_Struct
{
/*0000*/ int8 unknown0000[3]; // Seems to be always null
/*0003*/ int8 zoneout_ID; // Zone out point ID, unique number in that zone
/*0004*/ int8 unknown0004; // Seems to be always null
/*0005*/ int8 unknown0005[2]; // unknown possibly direction of zone out?
// repetive data mostly 0x4143 0x4544 0x4953 or 0x4748 (North, South, East, West zone lines)
/*0007*/ float target_x; // X target 0xF0237449 to keep same value
/*0011*/ float target_y; // Y target 0xF0237449 to keep same value
/*0015*/ float target_z; // Z target Pretty sure, but not verified 0xF0237449 to keep same value
/*0015*/ float target_dir; // heading in some format, 0x00C07944 should keep the same heading (I think it is a float)
/*0023*/ int8 target_zone; // Target Zone ID, Can be current zone for teleporters
};

Lyenu X`Arie
01-20-2003, 06:48 PM
Yeah, I did some more research on it last night, and you're right about the target_x, target_dir, and you're also right about the values to keep the same direction. Although I have not tested these in the game, it appears to be correct from everything I have examined and tested on EQLive (zoning and seeing what values match where, but everytime a Z was the same on both sides of the zoneline it was 0xF0237449.

daemonsleyr
01-23-2003, 01:58 PM
Wow! Thanks folks. Now all my zonelines rock just the way I want them to.

A question though: I assumed that the zoneline data would include some sort of location data. When I remove a zoneline from the DB, it's gone in game, and since I never grokked any zone-line location data in the struct, I never tried hand editing. Anyone find a way to move, and/or create new zonelines? Might be nifty to make little teleporters in big zones to shatter the travel time barrier.

Again, thank you for your help on this.

- Daemon Sleyr - Daemon's World -

Lyenu X`Arie
01-24-2003, 06:46 PM
I believe that the zonelines are stored inside of the zone data in the executable therefor making them not changable (although, I might be wrong).