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 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 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 { 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 { "Your faction with the Faction Guards just got better". |
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 |
All times are GMT -4. The time now is 11:57 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.