Just got home a bit ago, got a chance to try to fix some opcodes. Looks like they messed with the x,y,z coordinates again. Hopefully it's not as bad as last time. Will try to post the opcodes I found in a while.
Just got home a bit ago, got a chance to try to fix some opcodes. Looks like they messed with the x,y,z coordinates again. Hopefully it's not as bad as last time. Will try to post the opcodes I found in a while.
first time i've played with seq in years, got it mostly working:
opcode id="5772" name="OP_PlayerProfile"
opcode id="60a8" name="OP_ZoneEntry"
opcode id="18cd" name="OP_NewZone"
opcode id="4788" name="OP_NpcMoveUpdate"
opcode id="2c22" name="OP_Death"
opcode id="4234" name="OP_DeleteSpawn"
opcode id="781f" name="OP_RemoveSpawn"
undo these previous changes to spawnshell.cpp and spawn.cpp:
- int16_t y = pupdate->y >> 3;
+ int16_t y = (pupdate->y + pupdate->y) >> 3;
- setPos(s->x >> 3, s->y >> 3, s->z >> 3);
+ setPos(s->x >> 3, (s->y + s->y) >> 3, s->z >> 3);
x/y/z are correct, not sure about the rest:
signed deltaZ:13; // change in z
unsigned heading:12; // heading
signed padding0020:7;
signed deltaHeading:10;// change in heading
signed x:19; // x coord
signed padding0004:3;
signed animation:10; // animation
signed deltaX:13; // change in x
signed padding0008:9;
signed deltaY:13; // change in y
signed y:19; // y coord
signed padding0001:10;
signed z:19; // z coord
signed padding0016:3;
Thanks!
I've applied the changes but I don't know if I've applied them correctly. Are you saying to change the x/y/z coordinates in every location that they show up in everquest.h? I've changed them all I think and things are mostly working. The two most obvious things I see now are that I don't see my own character and the heading, and NPCs (mobs, pets, mercs) move ok but PCs don't seem to. Is that what you expect or have I applied something incorrectly?
Again, much appreciation. I'm ok with the opcodes but those other changes really get me. Why do they change them so much from patch to patch? Isn't that a reflection of how they are passing/storing the information between the server and the client?
Any changes in the way the client decodes information have to be changed in ShowEQ too. In the previous patch, it was adding the 'y' coordinate to itself at the start of the function where it unpacks physics data -- for some reason they reverted that and only they (Sony) can say for sure why.
Heh, thought so. I think they're doing it to screw with us...
OP_GroundSpawn is now 56b2
Yup, I ran out of time to work on it so posted what I had.
I'm thinking just to screw with us, I can't think of any practical purpose for randomly reordering those things.Again, much appreciation. I'm ok with the opcodes but those other changes really get me. Why do they change them so much from patch to patch? Isn't that a reflection of how they are passing/storing the information between the server and the client?
Ok, I have other PCs moving now but they aren't in the right location. I must have messed up one of the changes above regarding player x/y/z.
I reverted the playerselfpos structure back to what it was pre-code and with the opcode changes I've made the player shows up on the map but not in the right spot. The structure appears to have changed for players but maybe not in the same way it did for npcs?
Oh, the other big spawn change I found is 0be5 for OP_ClientUpdate
No matter what I do, I get what looks like Missile Command on crack. What structs need to be changed in everquest.h? Do I change the pos structs in spawnshell.cpp?
Thanks!!
Last edited by Fluxcapacitor; 01-18-2013 at 08:42 PM.
got deltaX/deltaY in the right places now so movement vector lines are correct.
do heading/deltaHeading/deltaZ/animation do anything useful for seq?
signed deltaZ:13; // change in z
unsigned heading:12; // heading
signed padding0020:7;
signed deltaHeading:10;// change in heading
signed x:19; // x coord
signed padding0004:3;
signed padding0008:12;
signed deltaY:13; // change in y
signed padding0001:7;
signed deltaX:13; // change in x
signed y:19; // y coord
signed animation:10; // animation
signed z:19; // z coord
signed padding0016:3;
OP_Consider = 1184
OP_TargetMouse = 0a2d
This is what I have so far
almost got playerSelfPosStruct doneCode:Index: conf/zoneopcodes.xml =================================================================== --- conf/zoneopcodes.xml (revision 781) +++ conf/zoneopcodes.xml (working copy) @@ -3,111 +3,111 @@ <seqopcodes> <!-- Critical opcodes used directly by ShowEQ --> - <opcode id="46bb" name="OP_PlayerProfile" updated="12/12/12"> + <opcode id="5772" name="OP_PlayerProfile" updated="01/16/13"> <comment>CharProfileCode</comment> <payload dir="server" typename="uint8_t" sizechecktype="none"/> </opcode> - <opcode id="1665" name="OP_ZoneEntry" updated="12/12/12"> + <opcode id="60A8" name="OP_ZoneEntry" updated="01/16/13"> <comment>ZoneEntryCode</comment> <payload dir="client" typename="ClientZoneEntryStruct" sizechecktype="match"/> <payload dir="server" typename="uint8_t" sizechecktype="none"/> </opcode> - <opcode id="3be2" name="OP_TimeOfDay" updated="12/12/12"> + <opcode id="5824" name="OP_TimeOfDay" updated="01/16/13"> <comment>TimeOfDayCode</comment> <payload dir="server" typename="timeOfDayStruct" sizechecktype="match"/> </opcode> - <opcode id="7fff" name="OP_NewZone" updated="12/12/12"> + <opcode id="18CD" name="OP_NewZone" updated="01/16/13"> <comment>NewZoneCode</comment> <payload dir="server" typename="newZoneStruct" sizechecktype="match"/> </opcode> - <opcode id="7b6c" name="OP_SpawnDoor" updated="12/12/12"> + <opcode id="31ED" name="OP_SpawnDoor" updated="01/16/13"> <comment>DoorSpawnsCode</comment> <payload dir="server" typename="doorStruct" sizechecktype="modulus"/> </opcode> - <opcode id="4286" name="OP_GroundSpawn" updated="12/12/12"> + <opcode id="56B2" name="OP_GroundSpawn" updated="01/16/13"> <comment>MakeDropCode</comment> <payload dir="server" typename="makeDropStruct" sizechecktype="none"/> <payload dir="client" typename="uint8_t" sizechecktype="none"/> </opcode> - <opcode id="7922" name="OP_SendZonePoints" updated="12/12/12"> + <opcode id="0D72" name="OP_SendZonePoints" updated="01/16/13"> <comment>Coords in a zone that will port you to another zone</comment> <payload dir="server" typename="zonePointsStruct" sizechecktype="none"/> </opcode> - <opcode id="25C5" name="OP_AAExpUpdate" updated="12/12/12"> + <opcode id="4212" name="OP_AAExpUpdate" updated="01/16/13"> <comment>Receiving AA experience. Also when percent to AA changes.</comment> <payload dir="server" typename="altExpUpdateStruct" sizechecktype="match"/> </opcode> - <opcode id="47E3" name="OP_ExpUpdate" updated="12/12/12"> + <opcode id="4ECC" name="OP_ExpUpdate" updated="01/16/13"> <comment>ExpUpdateCode</comment> <payload dir="server" typename="expUpdateStruct" sizechecktype="match"/> </opcode> - <opcode id="0561" name="OP_GuildMOTD" updated="12/12/12"> + <opcode id="5531" name="OP_GuildMOTD" updated="01/16/13"> <comment>GuildMOTD</comment> <payload dir="server" typename="guildMOTDStruct" sizechecktype="none"/> </opcode> - <opcode id="455d" name="OP_ClientUpdate" updated="12/12/12"> + <opcode id="0BE5" name="OP_ClientUpdate" updated="01/16/13"> <comment>Position updates - looks to be 455d and 42 bytes as of 12/12/12</comment> <payload dir="server" typename="playerSpawnPosStruct" sizechecktype="match"/> <payload dir="both" typename="playerSelfPosStruct" sizechecktype="match"/> </opcode> - <opcode id="5BD9" name="OP_NpcMoveUpdate" updated="12/12/12"> + <opcode id="4788" name="OP_NpcMoveUpdate" updated="01/16/13"> <comment>Position updates</comment> <payload dir="server" typename="uint8_t" sizechecktype="none"/> </opcode> - <opcode id="6b5a" name="OP_MobUpdate" updated="12/12/12"> + <opcode id="142C" name="OP_MobUpdate" updated="01/16/13"> <comment>MobUpdateCode</comment> <payload dir="both" typename="spawnPositionUpdate" sizechecktype="match"/> </opcode> - <opcode id="3c8e" name="OP_DeleteSpawn" updated="12/12/12"> + <opcode id="4234" name="OP_DeleteSpawn" updated="01/16/13"> <comment>DeleteSpawnCode</comment> <payload dir="both" typename="deleteSpawnStruct" sizechecktype="match"/> </opcode> - <opcode id="3B06" name="OP_RemoveSpawn" updated="12/12/12"> + <opcode id="781F" name="OP_RemoveSpawn" updated="01/16/13"> <comment>Remove spawn from zone</comment> <payload dir="both" typename="removeSpawnStruct" sizechecktype="none"/> </opcode> - <opcode id="3a65" name="OP_Death" updated="12/12/12"> + <opcode id="2C22" name="OP_Death" updated="01/16/13"> <comment>old NewCorpseCode</comment> <payload dir="server" typename="newCorpseStruct" sizechecktype="match"/> </opcode> - <opcode id="1ad3" name="OP_WearChange" updated="12/12/12"> + <opcode id="32FB" name="OP_WearChange" updated="01/16/13"> <comment>SpawnUpdateCode</comment> <payload dir="both" typename="SpawnUpdateStruct" sizechecktype="match"/> </opcode> - <opcode id="7360" name="OP_SpawnAppearance" updated="12/12/12"> + <opcode id="201A" name="OP_SpawnAppearance" updated="01/16/13"> <comment>SpawnAppearanceCode</comment> <payload dir="both" typename="spawnAppearanceStruct" sizechecktype="match"/> </opcode> - <opcode id="1949" name="OP_Stamina" updated="12/12/12"> + <opcode id="4932" name="OP_Stamina" updated="01/16/13"> <comment>Server updating on hunger/thirst</comment> <payload dir="server" typename="staminaStruct" sizechecktype="match"/> </opcode> - <opcode id="07b8" name="OP_HPUpdate" updated="12/12/12"> + <opcode id="65E7" name="OP_HPUpdate" updated="01/16/13"> <comment>NpcHpUpdateCode Update HP % of a PC or NPC</comment> <payload dir="both" typename="hpNpcUpdateStruct" sizechecktype="match"/> </opcode> - <opcode id="0048" name="OP_GuildMemberUpdate" updated="12/12/12"> + <opcode id="24DA" name="OP_GuildMemberUpdate" updated="01/16/13"> <comment>Info regarding guild members</comment> <payload dir="server" typename="GuildMemberUpdate" sizechecktype="match"/> </opcode> - <opcode id="7992" name="OP_ClickObject" updated="12/12/12"> + <opcode id="607D" name="OP_ClickObject" updated="01/16/13"> <comment>Items dropped on the ground</comment> <payload dir="both" typename="remDropStruct" sizechecktype="match"/> </opcode> - <opcode id="0ea7" name="OP_Action" updated="12/12/12"> + <opcode id="31B6" name="OP_Action" updated="01/16/13"> <comment>Spells cast etc</comment> <payload dir="both" typename="actionStruct" sizechecktype="match"/> <payload dir="both" typename="actionAltStruct" sizechecktype="match"/> </opcode> - <opcode id="5428" name="OP_Action2" updated="12/12/12"> + <opcode id="4598" name="OP_Action2" updated="01/16/13"> <comment>Combat actions i.e. bash, kick etc</comment> <payload dir="both" typename="action2Struct" sizechecktype="match"/> </opcode> - <opcode id="4d8d" name="OP_Consider" updated="12/12/12"> + <opcode id="1184" name="OP_Consider" updated="01/16/13"> <comment>ConsiderCode</comment> <payload dir="both" typename="considerStruct" sizechecktype="match"/> </opcode> - <opcode id="0e25" name="OP_TargetMouse" updated="12/12/12"> + <opcode id="1740" name="OP_TargetMouse" updated="01/16/13"> <comment>Targeting a person - old ClientTargetCode</comment> <payload dir="both" typename="clientTargetStruct" sizechecktype="match"/> </opcode> Index: src/everquest.h =================================================================== --- src/everquest.h (revision 782) +++ src/everquest.h (working copy) @@ -1076,23 +1076,24 @@ { struct { - signed padding0004:13; - signed y:19; // y coord - - signed deltaX:13; // change in x - signed deltaHeading:10;// change in heading - signed padding0008:9; - - signed deltaY:13; // change in y - signed z:19; // z coord - - signed x:19; // x coord - signed animation:10; // animation - signed padding0016:3; - - unsigned heading:12; // heading - signed deltaZ:13; // change in z - signed padding0020:7; + signed padding0004:12; + signed deltaZ:13; // change in z + signed padding00042:7; + + signed deltaHeading:10;// change in heading + signed x:19; // x coord + signed padding0008:3; + + unsigned heading:12; // heading + signed deltaY:13; // change in y + signed padding0012:7; + + signed deltaX:13; // change in x + signed y:19; // y coord + + signed animation:10; // animation + signed z:19; // z coord + signed padding0020:3; }; int32_t posData[5]; }; @@ -2339,19 +2340,20 @@ { /*0000*/ uint16_t spawnId; /*0002*/ uint16_t spawnId2; -/*0004*/ signed padding0004:13; - signed y:19; // y coord -/*0008*/ signed deltaX:13; // change in x - signed deltaHeading:10;// change in heading - signed padding0008:9; -/*0012*/ signed deltaY:13; // change in y +/*0004*/ signed padding0004:12; + signed deltaZ:13; // change in z + signed padding00042:7; +/*0008*/ signed deltaHeading:10;// change in heading + signed x:19; // x coord + signed padding0008:3; +/*0012*/ unsigned heading:12; // heading + signed deltaY:13; // change in y + signed padding0012:7; +/*0016*/ signed deltaX:13; // change in x + signed y:19; // y coord +/*0020*/ signed animation:10; // animation signed z:19; // z coord -/*0016*/ signed x:19; // x coord - signed animation:10; // animation - signed padding0016:3; -/*0020*/ unsigned heading:12; // heading - signed deltaZ:13; // change in z - signed padding0020:7; + signed padding0020:3; /*0024*/ }; Index: src/spawnshell.cpp =================================================================== --- src/spawnshell.cpp (revision 782) +++ src/spawnshell.cpp (working copy) @@ -882,7 +882,7 @@ if (dir != DIR_Client) { - int16_t y = (pupdate->y + pupdate->y) >> 3; + int16_t y = pupdate->y >> 3; int16_t x = pupdate->x >> 3; int16_t z = pupdate->z >> 3; Index: src/spawn.cpp =================================================================== --- src/spawn.cpp (revision 782) +++ src/spawn.cpp (working copy) @@ -418,7 +418,7 @@ { setName(s->name); setLastName(s->lastName); - setPos(s->x >> 3, (s->y + s->y) >> 3, s->z >> 3); + setPos(s->x >> 3, s->y >> 3, s->z >> 3); setPetOwnerID(s->petOwnerId); setLight(s->light); setGender(s->gender);
dunno if animation/deltaHeading are correct or if seq even uses them. the rest are good.
Code:struct playerSelfPosStruct { /*0000*/ uint8_t unknown0000[2]; // ***Placeholder (update time counter?) /*0002*/ uint16_t spawnId; // Player's spawn id /*0004*/ uint8_t unknown0004[2]; // ***Placeholder -- BSH 13 Apr 2011 /*0006*/ unsigned padding0001:12; // ***Placeholder unsigned heading:12; // Directional heading unsigned padding0002:8; // ***Placeholder /*0010*/ float y; // y coord (2nd loc value) /*0014*/ float deltaZ; // Change in z /*0018*/ float z; // z coord (3rd loc value) /*0022*/ signed deltaHeading:10; // change in heading unsigned padding0003:10; // ***Placeholder unsigned padding0004:12; // ***Placeholder /*0026*/ float x; // x coord (1st loc value) /*0030*/ float deltaX; // Change in y /*0034*/ float deltaY; // Change in x /*0038*/ unsigned padding0005:12; // ***Placeholder unsigned padding0006:10; // ***Placeholder unsigned animation:10; // animation /*0042*/ };
Looks pretty good, at least from a couple minutes of use. Will give more feedback later. Really wish I could help with these struct changes.
Everything checked out pretty well save random crashes after a few kills:
Code:#0 0x0445c794 in QString::deref() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #1 0x0445c86e in QString::operator=(QString const&) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #2 0x080f575f in Player::setLastKill (this=0x8481490, name=..., level=90) at player.cpp:800 #3 0x08074346 in SpawnShell::killSpawn (this=0x82ec458, data=0x8a37e57 "\233_") at spawnshell.cpp:1475 #4 0x08074c87 in SpawnShell::qt_invoke (this=0x82ec458, _id=25, _o=0xbfffc390) at spawnshell.moc:412 #5 0x041855aa in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #6 0x080905ff in EQPacketDispatch::signal (this=0x842e5d8, t0=0x8a37e57 "\233_", t1=32, t2=2 '\002') at packetinfo.moc:99 #7 0x08089eb9 in EQPacketStream::dispatchPacket (this=0x83410b0, data=0x8a37e57 "\233_", len=32, opCode=11298, opcodeEntry=0x82cf0d0) at packetstream.cpp:435 #8 0x0808c20a in EQPacketStream::processPacket (this=0x83410b0, packet=..., isSubpacket=true) at packetstream.cpp:719 #9 0x0808c4ea in EQPacketStream::processPacket (this=0x83410b0, packet=..., isSubpacket=false) at packetstream.cpp:807 #10 0x0808cc30 in EQPacketStream::handlePacket (this=0x83410b0, packet=...) at packetstream.cpp:572 #11 0x08093252 in EQPacket::dispatchPacket (this=0x8482e18, packet=...) at packet.cpp:659 #12 0x08095b25 in dispatchPacket (this=0x8482e18) at packet.cpp:583 #13 EQPacket::processPackets (this=0x8482e18) at packet.cpp:400 #14 0x08095e00 in EQPacket::qt_invoke (this=0x8482e18, _id=2, _o=0xbfffe768) at packet.moc:577 #15 0x04185642 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #16 0x04185724 in QObject::activate_signal(int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #17 0x044ccc5a in QTimer::timeout() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #18 0x041a5e3e in QTimer::event(QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #19 0x04123ffd in QApplication::internalNotify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #20 0x0412418b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #21 0x0411823c in QEventLoop::activateTimers() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #22 0x040d3182 in QEventLoop::processEvents(unsigned int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #23 0x04139b50 in QEventLoop::enterLoop() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #24 0x04139ad7 in QEventLoop::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #25 0x04124d20 in QApplication::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3 #26 0x08067a8b in main (argc=1, argv=0xbffff3f4) at main.cpp:737
There are currently 1 users browsing this thread. (0 members and 1 guests)