Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Tutorials/Howto's > Tutorials--Outdated Use the Wiki > Tutorials::Submissions

Tutorials::Submissions Submit your tutorials here to be reviewed

 
 
Thread Tools Display Modes
  #1  
Old 12-22-2004, 01:20 PM
RichardoX
Hill Giant
 
Join Date: Dec 2004
Location: in your closet....
Posts: 169
Default Database/Perl Faction System

DATABASE VALUES AND DEFINITIONS
(note: I'm no master at this so I may be wrong on a few things)

Faction_List: (This Holds the names of the factions and ID Numbers along with the faction everyone STARTS with on that faction)

Http://www.worldofalkora.com/tutorial/faction_list.bmp

Faction_Values: (This holds the values of how NPC's respond to each other as you see in the picture.)

Http://www.worldofalkora.com/tutoria...ion_values.bmp

Npc_Faction: (This is where the server checks the names of the faction for whenever you slay a NPC with a certain faction and gives you the... You have gained faction with Qeynos!....Also When creating these, make sure they are same ID on both sides, on ID and Primary Faction.)

Http://www.worldofalkora.com/tutorial/npc_faction.bmp

Npc_Faction_Entries: (Npc_Faction_Entries is what the server checks to see how much faction you gain or lose when you slay a NPC with a set faction. NOTE, if you set these factions too high you can allow people to get ally faction or KoS faction very quickly. Also, - behind a number means lose faction, no negetive sign means gain faction.)

Http://www.worldofalkora.com/tutoria...on_entries.bmp

Notice in this picture I have qeynos twice, I did that so that if you kill a freeport NPC, you gain faction with Qeynos along with negetive faction with freeport.

Quote:
FACTION VALUE LIST: (There are few because I have'nt tested all factions yet)
-1500: Scowl Ready to Attack
-1000: Threateningly
-200: Dubiously
0: Indifferently
1500: Ally
PERL

When writing a quest, you sometimes want people to earn their rights to be able to do such a quest and you see quest::faction there but have no idea how to use it, here ya go...

$faction - Returns the faction level number of the user with the mob.
1: Ally
2: Kindly
3: Warmly
4: Amiably
5: Indifferent
6: Apprehensive

< less than
> greater than
>= greater or equal than
<= less or equal than
== equal
!= Not equal

------------------------------------------------------------------------------------

Example
Code:
sub EVENT_SAY
{
if($faction == 1)
{
if($text=~/hail/i)
{
quest::say("hi");
}
}
elsif($faction != 1)
{
quest::say("umm dont talk to me?");
}
}
-------------------------------------------------------------------------------------

Also to give/take away faction


sub EVENT_SAY
{
if ($text =~/Hail/i)
{
quest::say("Do you want faction with Qeynos?");
}
if ($text =~/yes/i)
{
quest::faction(7,5)
}
}

Quote:
quest::faction(7(factionID), 5(how much faction it gives you, -5 would give negetive faction)
------------------------------------------------------------------------------------

I hope this helps, I do not take credit for Perl Section since its already explained somewhere else.
__________________
a hill giant slashes YOU for 25 points of damage!
You have been slain!
LOADING, PLEASE WAIT...
  #2  
Old 12-22-2004, 04:23 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Nice way to ask me about half of the stuff in irc and then take credit :P

lol no but really, most of this looks good.. but you may want to compress the screenines out of bmp.. ick.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
  #3  
Old 12-22-2004, 06:03 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

not trying to be a dick or anything, but this is missing like 80% of the information about factions... its a good start, but really contains little information that somebody could use to work on factions in the database.

faction_value has nothing to do with npcs really... notice the char_id column...
explanations of the mods is pretty important (hint: diety and race)
you dont explain what primary faction does, and why its important
you dont explain when you use the id from faction_list and when you use the id from npc_faction
your screen shot for faction entry dosent have npc_value in it
you dont explain anything about how mobs consider eachother using npc_value

also, concrete examples with explanations are almost manditory for explaining something like this. Also, the images are almost worthless not inlined.
  #4  
Old 12-22-2004, 06:15 PM
RichardoX
Hill Giant
 
Join Date: Dec 2004
Location: in your closet....
Posts: 169
Default

feel free to edit it, im just posting all I know, and yea cisyouc, which is why I say I dont take credit for it...

Farther, I only posted because I saw no one else posting.. so please edit it accordingly to what you know.. I really dont care who credit of writing it goes to...

I would just like to see a good tutorial on this
__________________
a hill giant slashes YOU for 25 points of damage!
You have been slain!
LOADING, PLEASE WAIT...
  #5  
Old 12-22-2004, 08:10 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

This is a good start, if you complete it, i m sure it could be validated and become an 'official' guide
Thank you.
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:16 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3