Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-02-2018, 05:10 AM
GRUMPY
Discordant
 
Join Date: Oct 2016
Posts: 445
Default How to Create a new faction

Just thought I would post on how to create a new faction and attach it to a new NPC.
This is for those just learning, so I kept it simple, using an example, all in one post

You will be creating two NEW (numerical) id's in two different database tables.

STEP ONE:

First, in the faction_list table, create your new faction with id and a name.
MAKE SURE "id" is a new (higher) number than any used.(sort the list numerically)
The name can be what you want, then set the base value.
Example:
Code:
  id   		name			base
 516	the Faction Guards	       -700
Keep in mind, the base value is what a player will start out at with any NPC on this
faction In the example above, -700 is dubious. Here's the table of values to reference:

1101 -> ABOVE ALLY
701 -> 1100 WARMLY
401 -> 700 KINDLY
101 -> 400 AMIABLE
0 -> 100 INDIFFERENT
-100 -> -1 APPREHENSIVE
-700 -> -101 DUBIOUS
-999 -> -701 THREATENLY
-1000 -> BELOW SCOWLS

STEP TWO:

NOW, go into the npc_faction table and create a new id. Again, a higher unused number.
Example: (1328 is the NEW id number and 516 is the id you created in faction_list table)
NOTE: the "name" (in this step) can have no blank spaces. Use underscores (like in NPC names)
Code:
	id		name		       primaryfaction	  ignore_primary_assist
	1328	     the_Faction_Guards		516			0
There. Now your new faction is created. All you have to do is create your new NPC and
put it on your new (sample) faction called "the Faction Guards". Using the 1328 example.
That is the number you give an NPC in the npc_types table under the npc_faction field.
If you are using George's Tools, the NPC Editor comes in handy to do that, as well

Scripts to help out with faction:

If you're setting up an NPC that requires faction to talk to, you can put this quest
script on the NPC. In this example, it checks the player's faction points to
see if there is enough to con ally, from starting at dubious, causing the NPC
to respond. Example : 2001 is the amount needed to get from dubious -700 to ally 1101

Code:
sub EVENT_SAY {
     $myfaction = $client->GetCharacterFactionLevel(516); # 516 is the new id from the faction_list table.
     if ($text=~/Hail/i && $myfaction >= 2001 ) {
          quest::say("Greetings $name. I am with the Faction Guards. How can I help you?");
     } else {
          quest::say("Go away fool, I have no time for you!"); # example response if there isn't enough faction.
     }
}
So, now, if you are interested in a little script to add to a killable mob that
will raise,(or lower) that new faction, this is a simplified one.
The 516 is the id, the 30 is the amount of faction points gained from the kill.
The last number 0, keeps the value permanent on the player record, unless raised
or lowered. To lower from a kill, example, just change that "30" to a -30.

Code:
sub EVENT_DEATH_COMPLETE {
  quest::faction(516, 30, 0);
}
Upon killing an NPC using all this as an example, your client gets a message:
"Your faction with the Faction Guards just got better".
Reply With Quote
  #2  
Old 07-03-2024, 01:52 PM
Darkstalker
Fire Beetle
 
Join Date: Feb 2018
Posts: 1
Red face Player toon Faction ID - possible?

Hi.
Your post here is sort of along the lines of what im looking for.

Is it possible to create a new faction that can be assigned to a PC? i.e. when someone creates a toon, they also get an assign faction and if killed in pvp the victor would receive those faction “hits”. Obviously this is for a pvp server we are working on.

Not sure if you’re still around though.

D
Reply With Quote
Reply


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 05:00 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3