Implementing Pets (0.7.2)

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Wed Oct 10, 2012 5:54 pm

Added all these individual pieces to ProjMan (which we all should be doing...) just for tracking the awesome efforts of our little dev staff :)

ProjMan: Pets

Excellent work on our Pets, Jabantiz. Time for the DB team to step up and give players actual options (runs and hides)

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Thu Oct 11, 2012 7:03 pm

Running an idea passed you for how to store and retrieve the random pet names from the DB. I think I got it, just wondering if I am missing anything, or could do it better.

Pet Spawn Data
First, I'm going to stuff the raw spawn data into our spawns tables in the range 3000-3999. I do not believe I have more that 1000 possible pet types. The pet's `spawn`.`name` field will not be it's name, but it's description (tellurian recruit, or magepet01) something. the subtitle field will contain whatever the raw data shows for that spawn type (warder, familiar, tome) and we'll prepend the players name to it on summoning
  • Gabartik <John's warboar warder>

    "Gabartik" comes from `pet_names` and "'s warboar warder" is the suffix found in `spawn`.`subtitle`
The Pet/Spawns will get all their appearances set from raw data, and we'll build (right away) the spell lists so they can be fully functional.

Note: The NPC's "AI" in this case (Balanced, Offensive, Defensive) should NOT be set since the player controls the pet's defend/attack stances. Right?


Randomizing Given Names
I will build a table `pet_names` and put all the unique names we have in there, including the player-named ones we captured just for fun. When the world loads, it should build a small struct of these names (no more than 2000 normally) that can be quickly accessed during cast time, minimizing round trips to the database. When the pet is being summoned, iterate through the list and pull out the one you want.

When this is all done, write the Pet Name to the player's `character_details`.`pet_name` field (I guess that's what it's for?) so if the player renames the pet, this data is used to override the random generated name.
  • Question: Can players set a name for their pet PERMANENTLY, so any pet they summon is automatically named that? If that's not a feature in EQ2, it would be a good one for us :)

Choosing Pet Title
We will use the `spawn`.`subtitle` values stored with the pet's spawn record and append it to the player character's name.

I was going to randomize these too, but realized Pet's actually are one type; warder, tome, hammer, recruit, etc. Might as well store it with the spawn.


Initially, I was confused by the raw data, but I think I figured out the differences in what I am seeing.

Code: Select all

  name						    subtitle					    notes
Dragonlance					 Ofajee's familiar			 Custom named, generic "familiar"
Gabartik						 John's warboar warder		Random named, beastlord pet?
Gabekn  						 Valiant Beast				  No owner, no idea what this is - fluff?
Gartik  						 Minion of Thule				Deity pet?
Getmoretokillone											     No subtitle at all...?
Golddigga's undead horde								      subtitle in name field (custom renamed?)
Genartik						 Ohforfs's orc priest	    Charmed? or does a beast class get to summon normal NPCs as pets?
Ohforfs's Xasaner puppet	A magical puppet 		    No idea what's gong on here :)

Really weird one - linked a pet summoning charm?	
\aITEM -1034168081 -1184561711:Konobtik\/a			   Viimto's familiar
Am I missing any pet naming scenarios?

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Implementing Pets (0.7.2)

Post by Jabantiz » Thu Oct 11, 2012 7:21 pm

Pets on live have spells on their hotbars (when you take control of them) and they use that as a cast order, they will try to cast spell 1 then 2 then 3 etc until one casts, if none they melee.

I was thinking a vector in world that is populated with pet names so we just call world.GetRandomPetName() to get a pet name, vector would only be loaded up once at server start up no more calls to the db after that, pretty much like you describe it. And pet names are permanent I believe, has been a while so some one else should probably verify that.
Gabekn Valiant Beast No owner, no idea what this is - fluff?
Gartik Minion of Thule Deity pet?
Both are Deity pets, the subtitle will change based on the Deity.
Getmoretokillone No subtitle at all...?
That is a normal necro/conj summoned combat pet, they don't have sub titles.
Golddigga's undead horde subtitle in name field (custom renamed?)
That is a dumbfire pet.
Ohforfs's Xasaner puppet A magical puppet No idea what's gong on here :)
I think that is an illusionist summoned pet but I am not sure, think illusionist pets mimic the appearance of the owner
Genartik Ohforfs's orc priest Charmed? or does a beast class get to summon normal NPCs as pets?
No clue on that one to be honest

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Thu Oct 11, 2012 8:02 pm

Since this data is really just a pile of names, would you go through all the trouble of setting up a class and MasterPetNameList and all that? Or, is that just necessary regardless?

Trying a few things to see if I get lucky.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Implementing Pets (0.7.2)

Post by Jabantiz » Thu Oct 11, 2012 8:09 pm

I would put a vector and function in world.h vector would hold the names the function would just get the size of the array pick a random number then grab the name at that index

Code: Select all

World::GetRandomPetName() {
    int index = MakeRandomInt(0, petnames.size());
    return petnames.at(index);
}
That is just code off the top of my head no clue if it will work, petnames would be the vector. All we would have to do is call world.GetRandomPetName()

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Thu Oct 11, 2012 8:13 pm

I'd almost rather let you do the C++ at this point. I'm trying to get the content prepared and this is going to take me hours to figure out lol.

Let me finish getting the spawn data for Pets cleaned up and posted here for you to review, then you can see where I was going with the data.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Thu Oct 11, 2012 8:38 pm

Not sure if you already considered this and I missed it, but I will not store Pet spawn "Levels" or "Sizes", since I think that should be determined at cast time. What level the pet is, what size it is (don't they grow as you level?) Otherwise, I'd have to maintain 10 different spawns per appearance :/

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Implementing Pets (0.7.2)

Post by Jabantiz » Thu Oct 11, 2012 8:41 pm

I never thought about size, but pet level is set to the same level as the player.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Fri Oct 12, 2012 7:03 am

What I am hoping someone can answer is if in EQ2, your "new pet" as you level is a different spell. or tier. or line. Maybe then, we can determine size. Or, size grows every 10 levels? We could chose that route just to keep things simple.

So my pet can NEVER be a level higher than me? I was considering using offsets. like, 1-2 levels different, so players could (rarely) summon a pet 2 levels higher and be more badass (on our Massively Solo Player servers). Maybe a Rules option.

User avatar
xinux
Team Member
Posts: 680
Joined: Wed Mar 10, 2010 11:10 am
Location: Destroyer of Servers

Re: Implementing Pets (0.7.2)

Post by xinux » Fri Oct 12, 2012 11:58 am

Pet Types
http://eq2.wikia.com/wiki/Category:Pets

Info in Beastlord pets
http://eq2.zam.com/wiki/Beastlord_Warders_(EQ2)


http://forums.station.sony.com/eq2/post ... 03#5609803
NOTE: Any buffs that affect a group/raid do not transfer from the owner to the pet (that would be doubling up) but single target ones that grant the stats below should go to both the owner and the pet when cast on the owner.

The following stats are copied from the owner to the pet:

Attributes, potency, ability mod, crit bonus (pvp and pve), crit chance, toughness, doublecast chance (pve and pvp), ability casting speed, Ability Recovery Speed, Ability Reuse Speed, Spell Reuse Speed.

Also, when testing with possessing a pet, be sure to cast some other buff on the pet as well to force the pet's stats to get resent to your client. So cast the buff on the owner that you want to test, and some other mitigation buff or something like that on the pet to force the pet's stats to update.

If you find any of these working kinda wonky post about it on the forums and we can look into it when we get a chance.
EQ II - Build=1360 (Orig) - Build=1360 (DoF) - Build=2654 (KoS) - Build=3375 (Classic) - Build=3554 (EoF)
EQ II - Build=4412 (RoK) - Build=5122 (TSO) - Build=6118 (SF) - Build=7628 (DoV) - Build=8295 (Aod)

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Fri Oct 12, 2012 6:48 pm

What I think is "wonky" is having to cast a bullshit buff on a pet just to force a client update. I'll bet ours will work perfectly ;)

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Implementing Pets (0.7.2)

Post by Jabantiz » Fri Oct 19, 2012 2:39 pm

With xinux help last night I think we were able to identify the packet for the pet options windw, however nothing is ever simple with soe...

On live we think the opcode is 199, in the pet_name_rename_rawr_10152011.log I found the same packet, opcode 197, that log is for version 1122, wich in our db shares most opcodes with 1096. However it is not 197 in 1096, in fact 1096 has packets using opcode 197 and they are nothing to do with pets, I tried moving the opcode around randomly having it overlap with other opcodes in that area but still came up with nothing. The only thing I can think of is that the opcode was moved from some where else to 197 inbetween 1096 and 1122, or more likely it is a new opcode introduced between those 2 versions and in 1096 and earlier it was handled in a diffren't packet/opcode.

I have been searching for a log with a pet options before 1096 but have come up empty so far, logs I have found with pet classes never seem to open the pet options window. If any one can point me to a log with a pet class prior to 1096 it would be helpful.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Implementing Pets (0.7.2)

Post by John Adams » Fri Oct 19, 2012 3:36 pm

/General/1045/fury.zip
/General/1045/20100519-warden.zip
The txt file says "pets, travel", assuming a pet was summoned.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Implementing Pets (0.7.2)

Post by Jabantiz » Fri Oct 19, 2012 9:21 pm

HUGE thanks to Xinux and Zcoretri for all there help the past couple nights helping me track down the proper packets/opcodes for the pet options window.

I have started to implement the window and currently you can open it and the info should be right, you can't change anything from the window yet though.

I also fixed a bug that was preventing the pets id from being stored in the players char sheet, now that it is properly stored you can hit F1 twice to target your pet.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: Implementing Pets (0.7.2)

Post by Jabantiz » Fri Oct 19, 2012 9:41 pm

John Adams wrote:
/General/1045/fury.zip
/General/1045/20100519-warden.zip
The txt file says "pets, travel", assuming a pet was summoned.
There sadly were no pet renames in that (easiest way to find the options window) however the warden file has the player casting ultravision, wich I believe you were looking for.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest