Factions
Posted: Sat Aug 09, 2008 5:00 pm
OK Factions are working. Here is a brief explanation on how to use them.
Starting factions: The factions in starting_factions are given to a player when they are created. If they choose qeynos as they starting city the values that are inserted into character_factions are all that match a starting_city (field in starting_factions) value of 1. Freeport is 2, Gfaydark is 4, Neriak is 8 and Kunark is 16.
Factions table: This is where you create new factions or modify existing ones. Note that factions 1 through 9 are reserved and will be discussed further down. Most fields in this table are self explanatory. Default_value is the value given to a player if the player didn't have the faction yet. Negative change is the amount their faction level is reduced by when they take a faction hit (ie they kill a spawn of the faction). Positive change is the amount their faction level is raised when they receive a faction boost (ie they kill a spawn that is an enemy of another faction). Type is whatever category you want to display in the players drop down list.
Reserved Factions: They are in the table for reference only. These range from 1 to 9 (Scowls to Ally) and are the values you should use in faction_id of a spawn for which you wish to adjust the default con. The default con is indifferent. So if you wish to make something KOS, but you don't want to create a specific faction you would give it a faction_id of 1.
Faction_alliances table: This table is used to let the system know which factions like and dislike each other. The input for all 3 fields are faction ids. For example if you kill a qeynos guard you would receive a negative hit with qeynos and a positive boost with freeport if they are set up to hate each other. If you kill a spawn that another faction likes then you will also lose value with that faction.
Example :
Note: A particular faction is not given to the player until they receive a negative hit or positive boost from that faction (or they are given it via the starting_factions table).
Some screenshots:
http://www.eq2emulator.net/ScreenShots/Factions1.jpg
http://www.eq2emulator.net/ScreenShots/Factions2.jpg
http://www.eq2emulator.net/ScreenShots/Factions3.jpg
http://www.eq2emulator.net/ScreenShots/Factions4.jpg
http://www.eq2emulator.net/ScreenShots/Factions5.jpg
http://www.eq2emulator.net/ScreenShots/Factions6.jpg
http://www.eq2emulator.net/ScreenShots/Factions7.jpg
I'm sure all this is clear as mud but hopefully someone understands it
Starting factions: The factions in starting_factions are given to a player when they are created. If they choose qeynos as they starting city the values that are inserted into character_factions are all that match a starting_city (field in starting_factions) value of 1. Freeport is 2, Gfaydark is 4, Neriak is 8 and Kunark is 16.
Factions table: This is where you create new factions or modify existing ones. Note that factions 1 through 9 are reserved and will be discussed further down. Most fields in this table are self explanatory. Default_value is the value given to a player if the player didn't have the faction yet. Negative change is the amount their faction level is reduced by when they take a faction hit (ie they kill a spawn of the faction). Positive change is the amount their faction level is raised when they receive a faction boost (ie they kill a spawn that is an enemy of another faction). Type is whatever category you want to display in the players drop down list.
Reserved Factions: They are in the table for reference only. These range from 1 to 9 (Scowls to Ally) and are the values you should use in faction_id of a spawn for which you wish to adjust the default con. The default con is indifferent. So if you wish to make something KOS, but you don't want to create a specific faction you would give it a faction_id of 1.
Faction_alliances table: This table is used to let the system know which factions like and dislike each other. The input for all 3 fields are faction ids. For example if you kill a qeynos guard you would receive a negative hit with qeynos and a positive boost with freeport if they are set up to hate each other. If you kill a spawn that another faction likes then you will also lose value with that faction.
Example :
- "id","faction_id","friend_faction","hostile_faction"
"1","11","0","12"
"2","12","0","11"
Note: A particular faction is not given to the player until they receive a negative hit or positive boost from that faction (or they are given it via the starting_factions table).
Some screenshots:
http://www.eq2emulator.net/ScreenShots/Factions1.jpg
http://www.eq2emulator.net/ScreenShots/Factions2.jpg
http://www.eq2emulator.net/ScreenShots/Factions3.jpg
http://www.eq2emulator.net/ScreenShots/Factions4.jpg
http://www.eq2emulator.net/ScreenShots/Factions5.jpg
http://www.eq2emulator.net/ScreenShots/Factions6.jpg
http://www.eq2emulator.net/ScreenShots/Factions7.jpg
I'm sure all this is clear as mud but hopefully someone understands it