PDA

View Full Version : HOWTO: Setting-up factions & aggro and a fix for DR3


Mrwalsh
01-25-2004, 10:32 PM
I was having a problem with mob factions not setting after I recompiled with DR3. Relatively easy fix is as follows (and I'm sure I did this the hard way, if there's an easier way please let me know):

1) Open your favorite database manager. I am using MySQL-Front in this example.

2) Move to the npc_types table.

3) At the program control bar (ie, File, Edit Search, etc) click Database. Go to New, then click Field.

4) Set Position to After Field "runspeed".

5) Set Name as see_invis.

6) Set Type to TinyInt.

7) Set Length to 1.

8) Set Default to 0.

9) Uncheck the NULL Allowed box under Attributes.

10) Click Ok.

11) Click Database again. Go to New, then Add.

12) Set Position to After Field "see_invis".

13) Set Name as see_invis_undead.

14) Set Type to TinyInt.

15) Set Length to 1.

16) Set Default to 1.

17) Uncheck the NULL Allowed box under Attributes.

18) Click Ok.

19) RESTART THE SERVER!

And you have a faction-ready database. Now to adding that faction, in case you weren't aware:

If the faction already exists and you just want to give a mob that faction, skip this next part.

1) Go to the faction_list table.

2) Click the id tab so that it reveals the highest numbered factions first.

3) Click the Insert New Record button. It looks like a red circle with a plus sign in the middle. Alternatively, you can click Database and then Insert New Record at the program control bar.

4) In the id box, type in the previous id (the one directly below your new one) plus one (ie, the highest id is 7654, yours would be 7655).

5) In the name box, type in the NPC group this effects (ie, Citizens of Qeynos, Clan Crushbone, etc).

6) In the base box, type in the base faction that each player has with this group (ie, if you wanted all players to be KOS to a group, set this to -1500. If you want them to be Ally, make it 1500. 0 is Indifferent).

7) This is where it gets tricky. Each of the next boxes corresponds to certain things, like class, race, and religion. Per this (http://www.eqemulator.net/forums/viewtopic.php?t=9308&highlight=faction+modc1) post, the values are as follows (I'm not sure if they're still correct, but I have no reason to believe they aren't):

Classes
mod_c1 = Warrior
mod_c2 = Cleric
mod_c3 = Paladin
mod_c4 = Ranger
mod_c5 = Shadowknight
mod_c6 = Druid
mod_c7 = Monk
mod_c8 = Bard
mod_c9 = Rogue
mod_c10 = Shaman
mod_c11 = Necromancer
mod_c12 = Wizard
mod_c13 = Magician
mod_c14 = Enchanter
mod_c15 = Beastlord

Races
mod_r1 = Human
mod_r2 = Barbarian
mod_r3 = Erudite
mod_r4 = Wood Elf
mod_r5 = High Elf
mod_r6 = Dark Elf
mod_r7 = Half Elf
mod_r8 = Gnome
mod_r9 = Were(wolf?)
mod_r10 = Skeleton
mod_r11 = Elemental
mod_r12 = (Eye of?) Zomm
mod_r13 = Wolf
mod_r14 = Iksar
mod_r60 = Vah Shir
mod_r75 = Iksar Skeleton
mod_r108 = Unknown (to me)
mod_r120 = Unknown (to me)
mod_r128 = Unknown (to me)
mod_r130 = Unknown (to me)
mod_r161 = Unknown (to me)

Religions/Deities
mob_d140 = Agnostic
mob_d201 = Bertoxxulous
mob_d202 = Brell Serilis
mob_d203 = Cazic-Thule
mob_d204 = Errolisi Marr
mob_d205 = Bristlebane
mob_d206 = Karana
mob_d207 = Innoruuk
mob_d208 = Mithaniel Marr
mob_d209 = Prexus
mob_d210 = Quellious
mob_d211 = Rallos Zek
mob_d212 = Rodcet Nife
mob_d213 = Solusek Ro
mob_d214 = The Tribunal
mob_d215 = Tunare
mob_d216 = Veeshan

For each of those values above, you can either leave them as 0, or enter a modifier. That modifier changes the faction for that certain option by however much you specify. For example, you put 300 under the Karana box. That means that any character worshipping Karana gets an addition 300 points of faction (which will bring them closer to Ally).

8) Move to the npc_faction table.

9) Create a new entry for your faction like before. You don't have to make the id's match, but it helps to keep things organized.

10) In the name box enter the faction name again. If there are spaces, replace them with _ (note that you can have spaces in the name under the previous table).

11) In the Primary Faction box, enter the id that you added from the faction_list table.

12) Move to the npc_faction_entries table.

13) Insert New Record just like before.

14) Be sure that the value in the npc_faction_id box is the same as the value you entered in the id in the npc_faction table.

15) Set faction_id to equal the id in the faction_list table that you want to change when an NPC with this faction is slain.

16) Set value to be the amount you want that faction modified by when an NPC with this faction is slain. A negative number will lower the corresponding faction while a positive number will increase it.

17) Add up to 9 more entries in the npc_faction_entries table. You may elect to only have 1, if you wish.

SKIP TO HERE IF THE FACTION WAS ALREADY MADE.

18) Go to the npc_types table.

19) Edit npc_faction_id to equal the id in the npc_faction table. Repeat this step for each NPC you want added to this faction.

20) Use your judgement and set aggroradius to a suitable number. This may take a few tries to get it right where you want it.

21) Exit your database manager and RESTART YOUR SERVER!

I hope this helps some of you who might have been wondering about factions and aggro. I know I was. :/

Good luck!

Mongrel
01-26-2004, 01:26 AM
The Jan24_Update.sql already contains the neccessary queries to add the see_invis & see_invis_undead columns. Did you source those in before trying the faction work?

Mrwalsh
01-26-2004, 01:40 AM
See, I told you there was an easier way.

And no, I didn't even think about having to source anything in. Oh well, fixed now anyway. And I know what to look for next time.

/sigh

Wasted post then.

Trumpcard
01-26-2004, 01:52 AM
Thats why you should always check the changelog.txt

==1/21/2004
Trumpcard: Merged in mongrels fix for undead/invis. Use update sql provided in release to update.

Mrwalsh
01-26-2004, 01:57 AM
I did.

Wasn't there.

Dunno why, but the most recent changelog I have is from the 20th of this month. And yes, I got the DR3 CVS. So....I dunno.

Doesn't matter, got it fixed. I guess the second portion of the howto is decent though.