Implementing Pets (0.7.2)

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Implementing Pets (0.7.2)

Post by Zcoretri » Wed Sep 26, 2012 9:51 pm

HAHA...sic'em :!:

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 Sep 26, 2012 10:08 pm

Ok, basic implementation or not, this is freakin awesome haha. Jab, you earned your pay this week :mrgreen:

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 Sep 27, 2012 2:07 pm

I commited various pet code earlier today, mainly some commands and start of basic combat. I think I fixed the issue with pets being a diffrent faction as the owner (I hope). I also fixed a zone exception when a player with a pet camps/zones/ld.

Combat is very basic right now and needs a lot of work.

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 Sep 27, 2012 3:12 pm

Jabantiz wrote:"_____" is very basic right now and needs a lot of work.
You always say this, and that you're swamped can't work on Emu, then you bust out some amazing shit in the next 30 minutes :) Keep it up lol


If I get the free time I hope I have tonight, I have 1500 records of "pets" from raw parsings. I'll see about organizing some data to support Pet summoning.

I was thinking of a table called "pet_names" that has all those random weird names we love so much, that the spawn can randomly pull from during create.

I'll index the spawn records for Pets below 10,000 to fit with our zone_id scheme, and post whatever sql updates I come up with. Not trying to rush anything, but figure if you're going full steam ahead into Pets, better to give you some data now than later and have to re-do something.

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 Sep 27, 2012 3:43 pm

The initial commit was about 30 mins or work, the second I would guess about 45 mins but had a lot of distractions for that one and fell asleep before I commited it. Pets just turned out to be a lot simpler then I ever imagined. Feel free to set up whatever tables you think we need and I will get them to work.

I wasn't planning to switch my focus to pets yet, just decided to try and work on something diffrent so I don't get burned out thinking about the same issue for days (tradeskill reactions). It all fell together a lot faster then I planned and mainly seems to be combat.cpp work now.

We should also figure out any lua functions we want with pets and spawn scripts with pets. Currently pets don't have spawn scripts, not sure if we want to just use the script assigned to the spawn ID in the DB, or modify the SummonPet lua I made to take an optional parameter for a spawn script. Will also either need to make 2 more SummonPet type commands for the other 2 types of pets (dumb fire and cosmetic) or modify the original to take a parameter to determine the type. I think new command would be easier for scripters, but these all just ideas off the top of my head.

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 Sep 27, 2012 3:51 pm

Yeah, I like the idea of LUA commands vs (parameters, in, the, lua, function, that, will, confuse, the, hell, out, of, JA) :mrgreen:

One piece of data we never used on the World side of things that's in raw data is `spawn_type`. Pets = 10. Normals = 2. There are a few others, but I never gave them a decent look til now. I'll try and determine if there's any other spawn types that matter relating to this.

(split the spawn types topic off to here, devs)

I totally get the idea of doing something else to avoid burn-out. There is SO much to do in this project, it's pretty easy to diversify :) My problem is finishing 1 damn thing, ever... I'm so diverse :oops:

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 Sep 27, 2012 7:50 pm

All this talk of Raw Data, it just occurred to me to check EQEmu. Here's how they name their pets, it seems.

Code: Select all

const char *GetRandPetName()
{
	static const char *petnames[] = { "Gabaner","Gabann","Gabantik","Gabarab","Gabarer","Gabarn","Gabartik",
		"Gabekab","Gabeker","Gabekn","Gaber","Gabn","Gabobab","Gabobn","Gabtik",
		"Ganer","Gann","Gantik","Garab","Garaner","Garann","Garantik","Gararn",
		"Garekn","Garer","Garn","Gartik","Gasaner","Gasann","Gasantik","Gasarer",
		"Gasartik","Gasekn","Gaser","Gebann","Gebantik","Gebarer","Gebarn","Gebartik",
		"Gebeker","Gebekn","Gebn","Gekab","Geker","Gekn","Genaner","Genann","Genantik",
		"Genarer","Genarn","Gener","Genn","Genobtik","Gibaner","Gibann","Gibantik",
		"Gibarn","Gibartik","Gibekn","Giber","Gibn","Gibobtik","Gibtik","Gobaber",
		"Gobaner","Gobann","Gobarn","Gobartik","Gober","Gobn","Gobober","Gobobn",
		"Gobobtik","Gobtik","Gonaner","Gonann","Gonantik","Gonarab","Gonarer",
		"Gonarn","Gonartik","Gonekab","Gonekn","Goner","Gonobtik","Gontik","Gotik",
		"Jabaner","Jabann","Jabantik","Jabarab","Jabarer","Jabarn","Jabartik",
		"Jabekab","Jabeker","Jabekn","Jaber","Jabn","Jabobtik","Jabtik","Janab",
		"Janer","Jann","Jantik","Jarab","Jaranab","Jaraner","Jararer","Jararn",
		"Jarartik","Jareker","Jarekn","Jarer","Jarn","Jarobn","Jarobtik","Jartik",
		"Jasab","Jasaner","Jasantik","Jasarer","Jasartik","Jasekab","Jaseker",
		"Jasekn","Jaser","Jasn","Jasobab","Jasober","Jastik","Jebanab","Jebann",
		"Jebantik","Jebarab","Jebarar","Jebarer","Jebarn","Jebartik","Jebeker",
		"Jebekn","Jeber","Jebobn","Jebtik","Jekab","Jeker","Jekn","Jenann",
		"Jenantik","Jenarer","Jeneker","Jenekn","Jentik","Jibaner","Jibann",
		"Jibantik","Jibarer","Jibarn","Jibartik","Jibeker","Jibn","Jibobn",
		"Jibtik","Jobab","Jobaner","Jobann","Jobantik","Jobarn","Jobartik",
		"Jobekab","Jobeker","Jober","Jobn","Jobtik","Jonanab","Jonaner",
		"Jonann","Jonantik","Jonarer","Jonarn","Jonartik","Jonekab","Joneker",
		"Jonekn","Joner","Jonn","Jonnarn","Jonober","Jonobn","Jonobtik","Jontik",
		"Kabanab","Kabaner","Kabann","Kabantik","Kabarer","Kabarn","Kabartik",
		"Kabeker","Kabekn","Kaber","Kabn","Kabober","Kabobn","Kabobtik","Kabtik",
		"Kanab","Kaner","Kann","Kantik","Karab","Karanab","Karaner","Karann",
		"Karantik","Kararer","Karartik","Kareker","Karer","Karn","Karobab","Karobn",
		"Kartik","Kasaner","Kasann","Kasarer","Kasartik","Kaseker","Kasekn","Kaser",
		"Kasn","Kasober","Kastik","Kebann","Kebantik","Kebarab","Kebartik","Kebeker",
		"Kebekn","Kebn","Kebobab","Kebtik","Kekab","Keker","Kekn","Kenab","Kenaner",
		"Kenantik","Kenarer","Kenarn","Keneker","Kener","Kenn","Kenobn","Kenobtik",
		"Kentik","Kibab","Kibaner","Kibantik","Kibarn","Kibartik","Kibekab","Kibeker",
		"Kibekn","Kibn","Kibobn","Kibobtik","Kobab","Kobanab","Kobaner","Kobann",
		"Kobantik","Kobarer","Kobarn","Kobartik","Kobeker","Kobekn","Kober","Kobn",
		"Kobober","Kobobn","Kobtik","Konanab","Konaner","Konann","Konantik","Konarab",
		"Konarer","Konarn","Konekab","Koneker","Konekn","Koner","Konn","Konobn",
		"Konobtik","Kontik","Labanab","Labaner","Labann","Labarab","Labarer",
		"Labarn","Labartik","Labeker","Labekn","Laner","Lann","Larab","Larantik",
		"Lararer","Lararn","Larartik","Lareker","Larer","Larn","Lartik","Lasaner",
		"Lasann","Lasarer","Laseker","Laser","Lasik","Lasn","Lastik","Lebaner",
		"Lebarer","Lebartik","Lebekn","Lebtik","Lekab","Lekn","Lenanab","Lenaner",
		"Lenann","Lenartik","Lenekab","Leneker","Lenekn","Lentik","Libab","Libaner",
		"Libann","Libantik","Libarer","Libarn","Libartik","Libeker","Libekn","Lobann",
		"Lobarab","Lobarn","Lobartik","Lobekn","Lobn","Lobober","Lobobn","Lobtik",
		"Lonaner","Lonann","Lonantik","Lonarab","Lonarer","Lonarn","Lonartik","Lonekn",
		"Loner","Lonobtik","Lontik","Vabanab","Vabaner","Vabann","Vabantik","Vabarer",
		"Vabarn","Vabartik","Vabeker","Vabekn","Vabtik","Vanikk","Vann","Varartik","Varn",
		"Vartik","Vasann","Vasantik","Vasarab","Vasarer","Vaseker","Vebaner","Vebantik",
		"Vebarab","Vebeker","Vebekn","Vebobn","Vekab","Veker","Venaner","Venantik","Venar",
		"Venarn","Vener","Ventik","Vibann","Vibantik","Viber","Vibobtik","Vobann",
		"Vobarer","Vobartik","Vobekn","Vober","Vobn","Vobtik","Vonaner","Vonann",
		"Vonantik","Vonarab","Vonarn","Vonartik","Voneker","Vonn","Xabanab","Xabaner",
		"Xabarer","Xabarn","Xabartik","Xabekab","Xabeker","Xabekn","Xaber","Xabober",
		"Xaner","Xann","Xarab","Xaranab","Xarann","Xarantik","Xararer","Xarartik","Xarer",
		"Xarn","Xartik","Xasaner","Xasann","Xasarab","Xasarn","Xasekab","Xaseker",
		"Xebarer","Xebarn","Xebeker","Xeber","Xebober","Xebtik","Xekab","Xeker",
		"Xekn","Xenann","Xenantik","Xenarer","Xenartik","Xenekn","Xener","Xenober",
		"Xentik","Xibantik","Xibarer","Xibekab","Xibeker","Xibobab","Xibober","Xibobn",
		"Xobaner","Xobann","Xobarab","Xobarn","Xobekab","Xobeker","Xobekn","Xober",
		"Xobn","Xobobn","Xobtik","Xonaner","Xonann","Xonantik","Xonarer","Xonartik",
		"Xonekab","Xoneker","Xonekn","Xoner","Xonober","Xtik","Zabaner","Zabantik",
		"Zabarab","Zabekab","Zabekn","Zaber","Zabn","Zabobab","Zabober","Zabtik",
		"Zaner","Zantik","Zarann","Zarantik","Zararn","Zarartik","Zareker","Zarekn",
		"Zarer","Zarn","Zarober","Zartik","Zasaner","Zasarer","Zaseker","Zasekn","Zasn",
		"Zebantik","Zebarer","Zebarn","Zebartik","Zebobab","Zekab","Zekn","Zenann",
		"Zenantik","Zenarer","Zenarn","Zenekab","Zeneker","Zenobtik","Zibanab","Zibaner",
		"Zibann","Zibarer","Zibartik","Zibekn","Zibn","Zibobn","Zobaner","Zobann",
		"Zobarn","Zober","Zobn","Zonanab","Zonaner","Zonann","Zonantik","Zonarer",
		"Zonartik","Zonobn","Zonobtik","Zontik","Ztik" };
	int r = MakeRandomInt(0, (sizeof(petnames)/sizeof(const char *))-1);
	printf("Pet being created: %s\n",petnames[r]); // DO NOT COMMENT THIS OUT!
	return petnames[r];
}
Jabantik - lol

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: Implementing Pets (0.7.2)

Post by Scatman » Thu Sep 27, 2012 8:14 pm

Would be cool to make that a database table (with default values) so admins could make their own pet names :)

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Implementing Pets (0.7.2)

Post by alfa » Fri Sep 28, 2012 5:16 am

Pet name arent generate by client ? (assume that is how it work for random player name no ?)
Also players can set pet name with /petname MyPetName or a command like that.
Don't have DB here for check, but if I correctly remember there is a field for store that in Players tables.

And about spawn type, this value is not important for client ? Maybe correct spawn type value can fix somes things (like elevator) but just an idea don't know at all if spawn type needed
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

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 Sep 28, 2012 2:55 pm

I agree with Scatman, a table would be best so admins can add their own custom default pet names. We could also add a /reload command so servers don't need to be brought down to add new ones.

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 Sep 28, 2012 4:28 pm

I said nothing about not using a database table. All I did was post the way EQEmu does it as a lol. Guess I'm the only one who thought it was funny.

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 Sep 28, 2012 4:33 pm

All pet commands on the pet window should update the pet window now, not all work yet though. Protect master should fully work so any issues with that command please report it.

Thinking about pet combat the simplest way to get it working I believe is to implement the encounters, the "new" system where the first person to "tag" the mob is the only person/group/raid to get credit will be easy to implement if that is the system we want to go with.

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 Sep 28, 2012 4:45 pm

Jabantiz wrote:the first person to "tag" the mob is the only person/group/raid to get credit
I haven't been in a group in EQ2 in years. Are you saying that now when you are grouped, the guy who pulls the mob is the only one to get xp? That would not make my group mates very happy.

Edit: Oh, I think I read that wrong. You meant, person (as an entity), or a group (vs other groups/players) and raids, similar. Right? Then, yes. Sounds perfect.

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Implementing Pets (0.7.2)

Post by alfa » Fri Sep 28, 2012 5:36 pm

Jab, for info, pet should be take in count in group/raid list or iterator, not take slot of course, but remember for some mob like Zarakon, if pet is cast (event if you /pethide) Zarakon can put some fu#&!@ing dot on pet.

Second info (I was talking about in first) if you havent set it up, there is command /pethide, that hide your pet (asume server not send spawn packet) but it's juste for diety or cosmetic pet

Hope it can help you ;)
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

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 Sep 28, 2012 5:48 pm

alfa wrote: some mob like Zarakon, if pet is cast (event if you /pethide) Zarakon can put some fu#&!@ing dot on pet.
I thought cosmetic/diety pets couldn't be attacked? /pethide can only be used on cosmetic and diety pets I thought. I never did raiding so no clue if they can kill those pets.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest