PDA

View Full Version : Pet Focus


chrsschb
03-25-2009, 01:11 PM
I remember reading a while back about the broken focus items (and have dealt with them myself on my server). I haven't visited for a bit though and was wondering if anyone has found a fix or a work around for them?

Maybe create/code new focus items all together?

Any help is appreciated (and I hope this is the right forum).

chrsschb
03-26-2009, 09:31 PM
Anyone who has some experience with spell editing may be able to help.

There are 3 spell effect ID's for Pet Focus items. There may supposed to be more, but right now this is what I see.

**The only exception is the very first focus items, Torch/Stein/Broom/Shovel, have a fourth spell effect ID, but I haven't figured out what it does yet.**


Effect Type 167 - This I assume is SUPPOSED to be the power of the focus. The focus items I checked all range from 5 (Minion of Fire) to 40 (Minion of Discord) and even 45 (Spire Servant).

Effect Type 134 - I have tested and confirmed this is the MAX level the focus affects. I set all mine to 70.

Effect Type 142 - I have tested and confirmed this is the MIN level the focus affects. I set all to 1.

Effect Type 135 - This is only present on the very first focus items and have values ranging from 1 to 5 (skipping 4).


I have tried different minimum, maximum, and special values for all effect types and can't get any difference. All focus items give the same +1 level, the same +hp, the same damage, etc.

Anyone know if there may be an effect type (or several) missing?

MNWatchdog
03-26-2009, 11:40 PM
I believe pet focuses are barely in. I think the server sees any focus item and just ups the pet by 1 level.

Basically, noone has bothered to write the code to handle pet focuses.

Leere
03-27-2009, 12:35 AM
The 135 is a Resist based limit. Magic (1) = Air, Fire (2) = Fire, Cold (3) = Water, Disease (5) = Earth, Poison (4) = Necro pet.

Any pet focus without the resist limit should work for all types of pets.

zone/pets.cpp, line 192 and following, this is where the boost from the focus happens, and, as MNWatchDog noted, it always does the same thing if you have any kind of focus. The power boost is parsed and reported there, though, if I'm reading the focus check function right, so you could adjust the boost to your liking.

To be really live-like, the NPC database would need to have a unique entry for every possible combination of pet and focus. Come SOF pets, there is also the need to have the pets spawn with gear. Somewhere along the lines, it also was introduced that any focus will summon mage pets with a full set of mage summoned armor already equipped.

chrsschb
03-27-2009, 05:56 PM
Figures. Thanks for the info though. Too bad this wasn't ever coded fully.

Kutulu99
11-09-2009, 11:34 AM
Bumping this thread in hopes of a pet focus item update. Instead of just incrementing pet level by 1, would it be feasible to allow the initial level of focus to increment by 1, and subsequent focus effects increase pet level by 2, 3, 4, 5, etc.?

chrsschb
07-08-2010, 06:36 PM
Bumping this thread in hopes of a pet focus item update. Instead of just incrementing pet level by 1, would it be feasible to allow the initial level of focus to increment by 1, and subsequent focus effects increase pet level by 2, 3, 4, 5, etc.?

Further bump for some pet focus love :D

Caryatis
07-08-2010, 07:30 PM
since this isnt nearly close to how live works, it doesnt have any chance of being submitted for server code(I imagine) however for custom servers its a very easy change...

original code... pets.cpp... line 251
if (this->IsClient() && CastToClient()->GetFocusEffect(focusPetPower, spell_id) > 0)
{
npc_type->max_hp *= 1.20;
npc_type->cur_hp = npc_type->max_hp;
npc_type->AC *= 1.20;
npc_type->level += 1;
npc_type->min_dmg = (npc_type->min_dmg * 110 / 100);
npc_type->max_dmg = (npc_type->max_dmg * 110 / 100);
npc_type->size *= 1.15;
}

change to...

if (this->IsClient() && CastToClient()->GetFocusEffect(focusPetPower, spell_id) == 5)
{
npc_type->max_hp *= 1.20;
npc_type->cur_hp = npc_type->max_hp;
npc_type->AC *= 1.20;
npc_type->level += 1;
npc_type->min_dmg = (npc_type->min_dmg * 110 / 100);
npc_type->max_dmg = (npc_type->max_dmg * 110 / 100);
npc_type->size *= 1.15;
}

for subsequent focuses add a new copy of that and change the attributes as you see fit... for example..

if (this->IsClient() && CastToClient()->GetFocusEffect(focusPetPower, spell_id) == 10)
{
npc_type->max_hp *= 1.30;
npc_type->cur_hp = npc_type->max_hp;
npc_type->AC *= 1.30;
npc_type->level += 2;
npc_type->min_dmg = (npc_type->min_dmg * 120 / 100);
npc_type->max_dmg = (npc_type->max_dmg * 120 / 100);
npc_type->size *= 1.2;
}

then keep adding those in increments of 5 until you get to the max pet focus, which seems to be like 120 for Enhanced Minion XIV (http://lucy.allakhazam.com/spell.html?id=23389&source=Live). Could also define some variables and have them increment values automatically based on the pet power base so would only need 1 section of code instead of 20 ish.

Playing with the source is alot easier than it seems, easier than waiting 16 months for somebody to do it for you lol.

chrsschb
07-08-2010, 10:08 PM
I don't program and while I would love to learn, I just don't have the time.

Thanks for the post, if anyone has the time to add the variables to adjust it automatically that'd be cool :D