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:
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 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:
I hope this helps, I do not take credit for Perl Section since its already explained somewhere else. :) |
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. |
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. |
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 |
This is a good start, if you complete it, i m sure it could be validated and become an 'official' guide :)
Thank you. |
All times are GMT -4. The time now is 04:36 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.