EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Spell Support (https://www.eqemulator.org/forums/forumdisplay.php?f=664)
-   -   Beastlord Pet Illusion (https://www.eqemulator.org/forums/showthread.php?t=34140)

Expletus 09-09-2011 04:51 PM

Beastlord Pet Illusion
 
Hoping someone might be able to help me with this one. I tried to change the race of a beastlord pet, namely BLpet39, went to npc types table and changed the race from 0 to XX (illusion #).

Won't work, did a search and came up with a post, something about the race determines pet in the global models or something? So how would you say, change the wolf to a eh. race 13, aviak without going crazy deep into coding?

lerxst2112 09-09-2011 05:10 PM

If you look in Mob::MakePet you can see how Beastlord pets are made. Since they are a different race for each player race, some of the database information is overridden.

This is what you'd need to change:
Code:

        //handle beastlord pet appearance
        if(strncmp(pettype, "BLpet", 5) == 0)
        {
                switch(GetBaseRace())
                {
                case VAHSHIR:
                        npc_type->race = TIGER;
                        npc_type->size *= 0.8f;
                        break;
                case TROLL:
                        npc_type->race = ALLIGATOR;
                        npc_type->size *= 2.5f;
                        break;
                case OGRE:
                        npc_type->race = BEAR;
                        npc_type->texture = 3;
                        npc_type->gender = 2;
                        break;
                case BARBARIAN:
                        npc_type->race = WOLF;
                        npc_type->texture = 2;
                        break;
                case IKSAR:
                        npc_type->race = WOLF;
                        npc_type->texture = 0;
                        npc_type->gender = 1;
                        npc_type->size *= 2.0f;
                        npc_type->luclinface = 0;
                        break;
                default:
                        npc_type->race = WOLF;
                        npc_type->texture = 0;
                }
        }


Expletus 09-09-2011 07:04 PM

Alright, so it's in the /zone folder and I tried to edit it, hell I even took it out and nothing. I am even more confused now...

lerxst2112 09-09-2011 08:17 PM

Did you recompile the code and update your server executables after you changed it?

Expletus 09-11-2011 11:27 PM

Nope! I figured it would have something to do with re-compiling. If I take that whole section out, will that allow me to just change it in the npc types table for future use? Or would I have to recompile it every time I want to change the illusion?

Thank you for the assistance btw.

lerxst2112 09-11-2011 11:53 PM

If you remove the code that is overriding the race then whatever is in the npc_types table would be used.

Expletus 09-12-2011 08:06 PM

Worked (not that I doubted you)! Thank you very much!

ChaosSlayerZ 09-12-2011 08:51 PM

technically there is an easier way to go around this, if you looking to get rid of racial pet assignment.
You simply switch your pet summon spell type from warder to a regular pet, and this code never even triggers.

The only difference is, that you will loose "soandso warder" tag over the pet, and pet instead will get a name like Gabantik or the like.

lerxst2112 09-12-2011 09:03 PM

I wouldn't really call that an easier way. You'd need to change all of the beastlord pet summoning spells as well as the data in the pets and npc_types tables to match to get around the name check in the code. Definitely a bigger job than the 5 minutes it takes to comment out a few lines of code.

ChaosSlayerZ 09-12-2011 09:29 PM

not for me :D - this is more like 30-60 sec with a good sql query
and you only need to replace warder summon type with a regular summon type - npc_types race edits are optional

+a bonus - no compiling headache :D

lerxst2112 09-12-2011 11:25 PM

Except the effectid doesn't have anything to do with this. It is a string compare based on the name from the spell file, pet table, and npc_types table. They would need to be changed to avoid that code, and all must match.

Feel free to try your way and let us know how that goes.

ChaosSlayerZ 09-13-2011 12:26 AM

ok i see what you mean, its specifically checks for "BLpet" in the string.
still, i would prefer to run sql query that will swap "BLpet" with say "customX" rather than recompile the code.

But wait there is a 3rd way to do it :D

a perl script attached to spawning of a pet can also be used to alter its race ;)

Figback65 09-25-2012 09:36 PM

Does anybody know if this is still viable? I found the code in trunk/eqemu/zone/pets.cpp. Changed it to this but I still had human warders. I also did the globalload change for object6_Chr and I got the iksar warders but it messed up a lot of other classical models. Ghost wolves were froze sliding, skeletons frozen sliding, troll and ogre warders became wolves, and more.
I did recompile it with 0 errors and copied the files over as well.

Thank you.




Quote:

Originally Posted by lerxst2112 (Post 202946)
If you look in Mob::MakePet you can see how Beastlord pets are made. Since they are a different race for each player race, some of the database information is overridden.

This is what you'd need to change:
Code:

        //handle beastlord pet appearance
        if(strncmp(pettype, "BLpet", 5) == 0)
        {
                switch(GetBaseRace())
                {
                case VAHSHIR:
                        npc_type->race = TIGER;
                        npc_type->size *= 0.8f;
                        break;
                case TROLL:
                        npc_type->race = ALLIGATOR;
                        npc_type->size *= 2.5f;
                        break;
                case OGRE:
                        npc_type->race = BEAR;
                        npc_type->texture = 3;
                        npc_type->gender = 2;
                        break;
                case BARBARIAN:
                        npc_type->race = WOLF;
                        npc_type->texture = 2;
                        break;
                case IKSAR:
                        npc_type->race = WOLF;
                        npc_type->texture = 0;
                        npc_type->gender = 1;
                        npc_type->size *= 2.0f;
                        npc_type->luclinface = 0;
                        break;
                default:
                        npc_type->race = WOLF;
                        npc_type->texture = 0;
                }
        }



ChaosSlayerZ 09-25-2012 09:59 PM

umm technically the code posted doesn't change anything - its what the pets suppose to be (unless current code is different)

what exactly you trying to achieve?

Figback65 09-25-2012 10:50 PM

Trying to get the cat, alligator, and scalewolf warders to load instead of being humans. Its in classic type era, I am assuming thats the problem. I did the global6_chr addition to globalload but it messed up alot of the classic models. I didnt know if there was a way to force the models, and if this change was it. Apparently not lol.

I did however add these to my globalload and it gave me the models needed for the warders.
1,0,TFFF,fieldofbone_chr,Loading Characters
1,0,TFFF,emeraldjungle_chr,Loading Characters
1,0,TFFF,innothule_chr,Loading Characters


All times are GMT -4. The time now is 12:39 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.