PDA

View Full Version : some animal factions


sfisque
12-07-2006, 05:53 PM
** Note: usual caveat, back up your tables, double check values before executing stuff you find in the forums **

the following worked for my PEQ db, you might have to twiddle the numeric values if you have a different version of the DB than i have.

the npc_faction_id (which matches npc_faction.id) should be a number that corresponds to the given race. in the npc_faction table they usually have names like "a_wolf" or "a_kodiak_bear".

update npc_types set npc_faction_id=19470 where race = 42; -- wolf
update npc_types set npc_faction_id=1077 where race = 43; -- bear
update npc_types set npc_faction_id=868 where race = 50; -- lion
update npc_types set npc_faction_id=303 where race = 61; -- shark
update npc_types set npc_faction_id=664 where race = 63; -- tiger
update npc_types set npc_faction_id=626 where race = 74; -- piranha
update npc_types set npc_faction_id=866 where race = 76 and level < 50; -- puma
update npc_types set npc_faction_id=889 where race = 91; -- alligator
update npc_types set npc_faction_id=629 where race = 96; -- cockatrice
update npc_types set npc_faction_id=367 where race = 129; -- scorpion
update npc_types set npc_faction_id=631 where race = 135; -- rhino
update npc_types set npc_faction_id=1079 where race = 163; -- raptor

this block corrects a few npc_faction rows that have ZERO as the primaryfaction rather than 367 which should be "KOSanimal" or something similar. substitute 367 for what it is in your PEQ if it differs. just search the name column for 'KOS%'. there are couple, one corresponds to animals.

update npc_faction set primaryfaction = 367 where id = 303;
update npc_faction set primaryfaction = 367 where id = 868;
update npc_faction set primaryfaction = 367 where id = 664;
update npc_faction set primaryfaction = 367 where id = 626;
update npc_faction set primaryfaction = 367 where id = 629;
update npc_faction set primaryfaction = 367 where id = 631;
update npc_faction set primaryfaction = 367 where id = 1079;
update npc_faction set primaryfaction = 367 where id = 4665;
update npc_faction set primaryfaction = 367 where id = 4675;

the id's directly above should correspond to the id's updated in the first block. again, double check that they are sane for your specific PEQ db. once you get these values fixed, animals should stop 'con'ing indifferent and be aggro once their zones reset.

hope this helps.

== sfisque

bufferofnewbies
12-08-2006, 06:36 AM
Good Show, I had to swap the actual faction fields for my own, but I never even thought about doing the conversions by race type. This makes it alot easier than by name.

Nice overall catch for those random mobs with unusual names.

cavedude
12-09-2006, 04:51 AM
I actually already updated the animal factions on PEQ, that was one of my first projects. So, when this database is eventually released, there will be no need to worry about it ;)

One thing though about using race, that will catch NPCs that don't follow normal factions patterns. Like pets that are friendly to everybody. It's best to use the exact name whenever possible.

sfisque
12-09-2006, 07:46 AM
depends on the type of spawn.

yah, there are a ton of skeleton pets in game. there arent alot of bear pets in game. easier to change via race, and then hand fix the one-off cases. as for skeletons, can probably twiddle the update query to use body-type, since summoned is a different body type than undead, though i dont know if the server differentiates undead pets as summoned entities. i'll have to look at that one closer.

== sfisque