Factions

data/factions.lua

This file defines the factions that will be used by dealers and stores.

Structure

local factions = {
    faction_name = {
        vengeful = boolean,                                          -- will this faction refuse to trade with negative reputation hustlers?    
        allies   = { faction_name: string, ... },                    -- lose reputation with these factions on hostile action
        enemies  = { faction_name: string, ... },                    -- gain reputation with these factions on hostile action
        buy_price_mod  = number,                                     -- maximum buy price modifier at 100% reputation (0.1 - 9.9)
                                                                     -- math.random(itemValue.min, itemValue.max) * 
                                                                     -- dealerItem.buy_price_mod *
                                                                     -- (dealerAffiliation.reputation * dealerAffiliation.buy_price_mod)

        sell_price_mod  = number,                                    -- maximum sell price modifier at 100% reputation (0.1 - 9.9)  
                                                                     -- math.random(itemValue.min, itemValue.max) * 
                                                                     -- dealerItem.sell_price_mod *
                                                                     -- (dealerAffiliation.reputation * dealerAffiliation.sell_price_mod)

        character_restrictions = { character_identifier,    ... },   -- character restrictors
        job_restrictions       = { job_name = min_rank,     ... },   -- job restrictors
        group_restrictions     = { group_name = group_rank, ... },   -- group restrictors
    },
    ...
}

Example

local factions = {
    ["grove"] = {
        label = "Grove",
        vengeful = true,

        allies   = { },
        enemies  = { "ballas" },

        buy_price_mod  = 1.2,
        sell_price_mod = 0.8,

        character_restrictions = nil,
        job_restrictions       = nil,
        group_restrictions     = nil,
    },

    ["ballas"] = {
        label = "Ballas",
        vengeful = true,
        
        allies   = { },
        enemies  = { "grove" },

        buy_price_mod  = 1.2,
        sell_price_mod = 0.8,

        character_restrictions = nil,
        job_restrictions       = nil,
        group_restrictions     = nil,
    }
}

Last updated