Mercenaries
Since EQ is now F2P, I spent some time collecting data from Live for Mercenaries. There does not seem to be too many packets related to Mercs. Below is what I have figured out for mercenary packet structures. Hopefully I can get time to test some of this and maybe implement some basic handling for these packets, but I figured it would be good to post in case I don't get time to do that soon.
Mercenary Packet Structures: Code:
// Currently unused, but may be good to have These are the opcodes that appear to be directly Mercenary related: 0x6537 Server->Client - Some kinda merc info update. Much smaller with no merc 0x0327 Client->Server - Labelled OP_MercenaryDataResponse in EQExtractor2 (size 0) 0x2ef8 Client->Server - Request dismiss merc (size 0) 0x495d Server->Client - Some merc status update from server - Maybe response to 0x4c6c 0x1a79 Client->Server - Requesting to suspend merc 0x2528 Server->Client - Response to suspend merc 0x4c6c Client->Server - Some kind of merc status change request from client - Examples: 24 00 00 00 01 00 00 00 - Zoning in 01 00 00 00 01 00 00 00 - Dismiss merc 05 00 00 00 01 00 00 00 - Right after purchasing merc 05 00 00 00 00 00 00 00 - Setting merc to passive 05 00 00 00 01 00 00 00 - Setting merc back to balanced 00 00 00 00 ff ff ff ff - Zoning in with no merc 01 00 00 00 01 00 00 00 - Right after previous update of zoning in with no merc Using Mercenary Merchant: 0x4dd9 Client->Server - Right clicking merchant request 0x27ac Server->Client - Merc merchant response 0x3887 Server->Client - After merchant response 0x5e78 Client->Server - Request to view merc info while browsing merchant? 90 01 00 00 01 00 00 00 46 22 00 00 00 6e e4 03 0x5e78 Server->Client - Server response to 0x5e78 06 00 00 00 0x528f Server->Client - Seen after purchasing merc and when camping 0x6942 Server->Client - Response after purchasing merc - Purchase approval response? I have a ton more data than I am showing here, but I don't want to post it all until I can organize it a bit more. I will post the rest of the structs for the above lists when I have time. At least the more complex structs should be in pretty good shape from the ones I posted above. The rest are all really small (16 bytes or less). |
Quote:
|
Trev, I have a lot of this worked out for SoD and UF, with the help of Derision. We are able to display the info in the merc merchant's window, and can spawn an npc that uses the merc window, changing stances, etc. I spent a lot of time getting all of the data (I generated quite a few hundred inserts for a basic db structure for mercs for types, subtypes, stances, handling different clients, and started on inventory and spells) for the freely available mercs before free to play which further restricted to just apprentice mercs (was apprentice t1-5 and journeymen 1-2).
If you plan on working on mercs, I can send all of it to you, or if you are just getting the info out there, I can use anything you have. I was trying to get to mercs within a few weeks. I've been really busy lately though. Things have changed recently with the ability to have multiple mercs and such, but the basics should still be the same. I am on live trying to lvl up my toons to have a full group with mercs so I can continue to get spells cast as well as screenshots of equipment, etc. Let me know if there's anything you need. |
Most of the data I have is related to what I already posted. Just the basic purchasing and usage packets and structs from Live. It sounds like you guys are a lot further along than I am lol. I only really worked on it for 1 day though. I didn't know anyone else was working on it. With your recent implementation of stances, I figured it would make it that much easier to add in a merc system.
I am a bit interested in the DB work you have done for them. I didn't think it would take hundreds of entries for it. I was figuring on 1 entry per merc subtype in a new merc table that just points to an NPC ID in the npc_types table. I haven't really played Live since 2005 until now (since it went free), so I am still really new to mercs. I guess there would be a lot of variations for merc races, and multiple types and subtypes. I am not really too concerned with the DB entries, as I would probably just add somewhat customized entries anyway. I was more looking to get some basic functionality implemented that could be built upon. It sounds like you guys have already made it that far and are working on finishing stuff off. I am no where near as skilled as Derision or you when it comes to that type of thing, so I will leave it up to the 2 of you :) Maybe I can help you guys out if there is something you still need done. I am better with dissecting packets than I am with coding normally. I have quite a few characters in the 50 to 67 range, if there is something I can get with them that would be useful. I can post the rest of the smaller structs later tonight (I still have to make them) if they would be useful. I also plan to write a script to help with opcode work a bit hopefully. You should join the dev IRC channel. It might be easier to discuss and share info there. PM me if you don't know the channel name. |
Bad_captain, did you ever get anywhere with this? I am curious how close this was to being functional. Even if it is only partly functional, it might be good to get it on the SVN so the rest can be completed as time permits. I could probably put some more work in on it, but didn't want to double any efforts that have already been made.
|
i'll post the newer opcodes real soon
Code:
Listing of hired mercenaries |
Sorry I dropped the ball on this one. I have meant to get back to this, but keep finding stuff to fix in bots, and with school just starting back up, I've been pretty busy. I'm in the middle of a bot AA rewrite, then I plan on getting back to this. I know I was slowed down working on all of the packet encoding/decoding, which I know you are adept at. If I can't get something going by next weekend (hopefully I will have time to at least get it somewhat respectable), I'll shoot you a diff or something.
I have been trying to level up on live to get some better logs/collects, but it's been slow going. I've been getting screenshots though, as weapons appear to change every 5 levels (not that I think we can get all equipment correct, but it's at least a start). |
Bad_captain go grab my post of newer opcode and please update as needed thank you.
http://www.eqemulator.org/forums/sho...t=35640&page=2 |
I went through and refined, corrected, and added to the previous list of Mercenary related packet structures that I had posted. Each includes the opcode used on Live as well as the opcode name used on EQEmu currently where I could find them. I added notes for each struct to explain the packet a bit.
This should compile find on windows now, and should work for the initial changes to get mercs to be purchaseable and spawning at least. These structs are the ones used on Live as of April 12 2012, so these would go in eq_packet_structs.h. I will go through the SoD and UF clients and add the structs for those patch files as well in the next post. Right now, there are still a couple of struct issues remaining due to how the variable sized packets for the Mercenary Data has variable sized arrays within it. To prevent it from breaking anything, I just hard set the variable sized structs that are inside the already variable sized structs. This only effects a few fields, but it is something that will need to be corrected to make these packets work exactly like they do on Live. For example, the MercName, MercTypes,and Stances fields are all hard set to values that should make them functional enough for now, but ideally those should all be able to vary in size. I am not really sure of the best way to do this and still allow the data to be sent to patch .cpp files so they can be encoded accordingly for each client. Code:
// Used by MercenaryListEntry_Struct |
Here are the only struct differences for UF and SoD that I know so far based on the packets bad_captain and Derision were generating for each client:
SoD Code:
// Used by MercenaryMerchantList_Struct Code:
// Used by MercenaryMerchantList_Struct |
Trev; will mercs piggyback off any of the bot code or are they standalone?
|
I will leave that type of thing up to the bot dev people like bad_captain. I assume they will get their own merc class that is basically just a copy of the bot class, but tweaked for mercs.
|
I had a conversation about 2 years ago with Wildcard, who did a lot of the work on bots before me, and he had planned to change bots to be inherited off of mercs when they were finished. After doing a little bit of work on mercs, I'm not sure how easy or beneficial that would be, but I guess we'll see. The one real problem with bots (that won't be an issue with mercs), is the option to build without them, meaning a lot of code has to be rewritten or copied to get bots to work and still compile when they aren't enabled. Mercs should be built into the actual build so that they work a little more seamlessly than bots, even if they are less flexible.
On the other hand, with some changes on the live client, switching between multiple mercs, and editing the dbstring files, I think a lot could be done to merge the two. Incorporating the upkeep system into bots would be a benefit as well. Once mercs get closer to being viable, I think the decision will have to be made whether to keep bots as is or inherit off of mercs, but unless someone can find other advantages to doing so, I see bots remaining as is. |
Note: your comment regarding the first field in the MercenaryMerchantRequest_Struct, is I believe the Merc ID, instead of RequestType.
|
Quote:
|
All times are GMT -4. The time now is 08:35 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.