Skip to content

SynastriaCoreLib ‐ Types

Jonas Söderberg edited this page Jul 13, 2024 · 1 revision

MAX_ITEMID

This will (as soon as it's available) be set to the MAX_ITEMID from the server.

SynastriaCoreLib.MAX_ITEMID = MAX_ITEMID

CustomDataTypes

Defines names for all available types you can send to GetCustomGameData and similar functions.

SynastriaCoreLib.CustomDataTypes = {
    PERK_ACQUIRED     = 1,
    PERK_LIMIT        = 2,
    PERK_ACTIVE       = 3,
    PERK_PROG         = 4,
    PERK_TASKASSIGN1  = 6,
    PERK_TASKASSIGN2  = 7,
    PERK_TASKPARTY    = 9,
    PERK_OPTIONS      = 10,
    ATTUNE_HAS        = 11,
    MYTHIC_SELECT     = 12,
    RESOURCE_BANK     = 13,
    RESOURCE_LAST     = 14,
    ATTUNE_RANDOMPROP = 15
}

Events

All CallbackHandler-1.0 events that can fire.

SynastriaCoreLib.Events = {
    ItemAttuned          = 'ItemAttuned',
    ItemAttuneProgress   = 'ItemAttuneProgress',
    ItemUnattuned        = 'ItemUnattuned',
    ItemLoaded           = 'ItemLoaded',
    CheckAttune          = 'CheckAttune',
    CustomGameData       = 'CustomGameData',
    CustomGameDataFinish = 'CustomGameDataFinish',
    CustomGameInit       = 'CustomGameInit',
}

Item Status

A few internal statuses related to attunement.

SynastriaCoreLib.Status = {
    DIFFERENT         = 1,   --Modifier for other statuses
    UNATTUNABLE       = 2,
    ATTUNABLE         = 4,
    ATTUNED           = 8,
    ATTUNED_DIFFERENT = 9,
}

Color Mode

Defined the different color modes that we have colors for. (See Colors)

SynastriaCoreLib.ColorModes = {
    DEFAULT    = 1,
    COLORBLIND = 2,
}

Colors

Sets of colors related to attunement. The COLORBLIND set of colors are based on the palette for color blindness from the IBM Design Library, and should work for most types of color blindness. These colors have been tested by players on the server with color blindness and verified to be both accessible and decent looking.

SynastriaCoreLib.Colors = { -- { Red, Green, Blue, Alpha }
    [SynastriaCoreLib.ColorModes.DEFAULT] = {
        [SynastriaCoreLib.Status.UNATTUNABLE]       = { 0.80, 0.19, 0.19, 1.00, },  -- Red
        [SynastriaCoreLib.Status.ATTUNABLE]         = { 0.80, 0.73, 0.18, 1.00, },  -- Yellow
        [SynastriaCoreLib.Status.ATTUNED]           = { 0.24, 0.80, 0.18, 1.00, },  -- Green
        [SynastriaCoreLib.Status.ATTUNED_DIFFERENT] = { 0.50, 1.00, 1.00, 1.00, },  -- Teal
    },
    [SynastriaCoreLib.ColorModes.COLORBLIND] = {
        [SynastriaCoreLib.Status.UNATTUNABLE]       = { 0.86, 0.15, 0.50, 1.00, },  -- Red
        [SynastriaCoreLib.Status.ATTUNABLE]         = { 1.00, 0.69, 0.00, 1.00, },  -- Orange
        [SynastriaCoreLib.Status.ATTUNED]           = { 0.39, 0.56, 1.00, 1.00, },  -- Blue-ish
        [SynastriaCoreLib.Status.ATTUNED_DIFFERENT] = { 0.50, 1.00, 1.00, 1.00, },  -- Light blue
    }
}