Xivgear Types Documentation
    Preparing search index...

    Base class for a sheet. For graphical usage, see GearPlanSheetGui.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _timestamp: Date
    altJobs: (
        | "PLD"
        | "WAR"
        | "DRK"
        | "GNB"
        | "WHM"
        | "SCH"
        | "AST"
        | "SGE"
        | "MNK"
        | "DRG"
        | "NIN"
        | "SAM"
        | "RPR"
        | "VPR"
        | "BRD"
        | "MCH"
        | "DNC"
        | "BLM"
        | "SMN"
        | "RDM"
        | "PCT"
        | "BLU"
    )[]
    classJobName:
        | "PLD"
        | "WAR"
        | "DRK"
        | "GNB"
        | "WHM"
        | "SCH"
        | "AST"
        | "SGE"
        | "MNK"
        | "DRG"
        | "NIN"
        | "SAM"
        | "RPR"
        | "VPR"
        | "BRD"
        | "MCH"
        | "DNC"
        | "BLM"
        | "SMN"
        | "RDM"
        | "PCT"
        | "BLU"
    ilvlSync: number
    isEmbed: boolean = false
    isMultiJob: boolean
    level: 70 | 80 | 90 | 100
    materiaAutoFillPrio: MateriaAutoFillPrio
    materiaFillMode:
        | "leave_empty"
        | "autofill"
        | "retain_slot_else_prio"
        | "retain_item_else_prio"
        | "retain_slot"
        | "retain_item"
    sheetManager: SheetManager
    shouldAddDefaultSimsToNewSheet: boolean

    Accessors

    • get description(): string

      The description of the sheet.

      Returns string

    • set description(desc: string): void

      Parameters

      • desc: string

      Returns void

    • get foodItemsForDisplay(): FoodItem[]

      Food items which are relevant and pass the filter. Custom foods will be displayed regardless of filtering.

      Returns FoodItem[]

    • get isViewOnly(): boolean

      Whether this sheet is in view-only mode.

      Returns boolean

    • get itemsForDisplay(): GearItem[]

      Get all items which are relevant, and are not filtered out by display settings. Custom items are always displayed regardless of filtering.

      Returns GearItem[]

    • get metaSaveKey(): string

      Returns string

    • get relevantFoodForSolver(): FoodItem[]

      Relevant food for the meld/food solver. Will return all of the highest level food with two valid stats and all custom food.

      Returns FoodItem[]

    • get relevantSims(): SimSpec<any, any>[]

      Get sims which might be relevant to this sheet.

      Returns SimSpec<any, any>[]

    • get saveKey(): string

      The key under which this sheet should be saved in LocalStorage.

      Returns string

    • get setupDone(): boolean

      Whether setup/loading is done.

      Returns boolean

    • get sheetName(): string

      The name of the sheet.

      Returns string

    • set sheetName(name: string): void

      Parameters

      • name: string

      Returns void

    • get showAdvancedStats(): boolean

      Whether to show advanced stats.

      Returns boolean

    • set showAdvancedStats(show: boolean): void

      Parameters

      • show: boolean

      Returns void

    Methods

    • Add any sims which are considered to be "default" sims for this class and level.

      Returns void

    • Add a new gear set.

      Parameters

      • gearSet: CharacterGearSet

        The set to add.

      • Optionalindex: number

        The index at which to insert the set. If omitted, it is added to the end.

      Returns void

    • Returns "OccultCrescent" | "Bozja" | "Eureka"

    • Clones the given gear set and adds it as a new gear set.

      This will add it prior to the next separator, since separators are typically used to delineate categories of sets.

      Parameters

      Returns void

    • Delete the given custom food item, first asking for confirmation if the item is equipped on any set.

      Parameters

      • item: CustomFood

        The food item to delete

      • confirmationCallback: (equipppedOnsets: string[]) => boolean

        A callback to be called to confirm the deletion of an item which is currently equipped. Receives the names of sets as the first parameter.

      Returns boolean

    • Delete the given custom item, first asking for confirmation if the item is equipped on any set.

      Parameters

      • item: CustomItem

        The item to delete.

      • confirmationCallback: (equipppedOnsets: string[]) => boolean

        A callback to be called to confirm the deletion of an item which is currently equipped. Receives the names of sets as the first parameter.

      Returns boolean

    • Return a food item from the DataManager by its ID. Returns undefined if the item could not be found.

      Parameters

      • id: number

        The item ID. For custom items, use the custom item's fake ID.

      Returns FoodItem

    • Delete a custom item without confirmation. Will unequip the item from any sets which currently use it.

      Parameters

      Returns void

    • Overridable hook for when gear display settings are updated.

      Returns void

    • Returns void

    • Get the best possible materia for a particular slot of the given stat.

      Parameters

      • stat:
            | "piety"
            | "crit"
            | "dhit"
            | "determination"
            | "tenacity"
            | "spellspeed"
            | "skillspeed"
      • meldSlot: MeldableMateriaSlot

      Returns Materia

    • Retrieve a particular materia by its item ID. Returns undefined if the materia does not exist.

      Parameters

      • materiaId: number

      Returns Materia

    • Return the highest ilvl of non-custom items in a particular slot

      Parameters

      • slot:
            | "Weapon2H"
            | "Weapon1H"
            | "OffHand"
            | "Head"
            | "Body"
            | "Hand"
            | "Legs"
            | "Feet"
            | "Ears"
            | "Neck"
            | "Wrist"
            | "Ring"
            | "ChestHead"
            | "ChestHeadLegsFeet"
            | "ChestLegsFeet"
            | "ChestLegsGloves"
            | "HeadChestHandsLegsFeet"
            | "LegsFeet"

      Returns number

    • Returns the highest

      Parameters

      • slot:
            | "Weapon2H"
            | "Weapon1H"
            | "OffHand"
            | "Head"
            | "Body"
            | "Hand"
            | "Legs"
            | "Feet"
            | "Ears"
            | "Neck"
            | "Wrist"
            | "Ring"
            | "ChestHead"
            | "ChestHeadLegsFeet"
            | "ChestLegsFeet"
            | "ChestLegsGloves"
            | "HeadChestHandsLegsFeet"
            | "LegsFeet"

      Returns GearItem

    • Import a sim from a sim export. Does not add it to the simulations - you still need to do that if you would like the sim to appear on the sheet (see addSim).

      Parameters

      Returns Simulation<any, any, any>

    • Determine whether a stat can naturally appear on gear. Like isStatRelevant, but returns false if the stat does not appear on gear for this class. e.g. returns false for DH on tanks and healers.

      Parameters

      Returns boolean

    • Determine whether a stat is relevant to this sheet based on its job.

      Relevant means:

      • The stat is not undefined.
      • If it is the main stat (including vit), then it is the primary stat for the job.
        • Vit is not relevant for any job since it is not the main stat of any job.
      • If it is a substat, it is not filtered out by the job.
      • If it is gear haste, it is only relevant if we have an active special stat which cares about haste.

      Parameters

      Returns boolean

    • Return an item from the DataManager by its ID. Returns undefined if the item could not be found.

      Parameters

      • id: number

        The item ID. For custom items, use the custom item's fake ID.

      • forceNq: boolean = false

        If true, searches for an NQ version of an otherwise-HQ item.

      Returns GearItem

    • Load the sheet data fully. Create a DataManager internally.

      Returns Promise<void>

    • Load the sheet data from a DataManager. The DataManager must already be loaded before calling this method. This can be used for things like meld solving, where a worker can load a DM once and then re-use it.

      Parameters

      Returns Promise<void>

    • Returns the starting set of data for a new custom item.

      Parameters

      • slot:
            | "Weapon2H"
            | "Weapon1H"
            | "OffHand"
            | "Head"
            | "Body"
            | "Hand"
            | "Legs"
            | "Feet"
            | "Ears"
            | "Neck"
            | "Wrist"
            | "Ring"

        The slot for which to make the custom item.

      Returns CustomItem

    • Force a full recalc of every set. For example, this should be called after a custom item is edited, or after a race/party size change.

      Returns void

    • Recompute custom item stats, and force a recalc of sets.

      This should be called after custom items are modified.

      Returns void

    • Move a gear set to a new index.

      Parameters

      • gearSet: CharacterGearSet

        The set to move.

      • to: number

        The index to which the gearset should be re-ordered.

      Returns void

    • Request a save to be completed asynchronously. The actual save is only performed once no more requestSave() calls have happened for a certain timeout, thus allowing multiple modifications to be coalesced into a single save operation.

      Returns void

    • Copy this sheet to a new save slot.

      Parameters

      • name: string

        New name. Leave unspecified/undefined to keep existing name.

      • job:
            | "PLD"
            | "WAR"
            | "DRK"
            | "GNB"
            | "WHM"
            | "SCH"
            | "AST"
            | "SGE"
            | "MNK"
            | "DRG"
            | "NIN"
            | "SAM"
            | "RPR"
            | "VPR"
            | "BRD"
            | "MCH"
            | "DNC"
            | "BLM"
            | "SMN"
            | "RDM"
            | "PCT"
            | "BLU"

        New job. Leave unspecified/undefined to keep existing job.

      • level: 70 | 80 | 90 | 100

        New level. Leave unspecified/undefined to keep existing level.

      • ilvlSync: number | "keep"

        New ilvl sync. Leave unspecified or use special value 'keep' to keep existing ilvl sync.

      • multiJob: boolean

        Whether to create the new sheet as a multi-job sheet or not.

      Returns string

      The saveKey of the new sheet.

    • Save data for this sheet now.

      Returns void

    • Enable view-only mode. Cannot be disabled once enabled.

      Returns void

    • Get the class/job stats for a different class/job.

      Parameters

      • job:
            | "PLD"
            | "WAR"
            | "DRK"
            | "GNB"
            | "WHM"
            | "SCH"
            | "AST"
            | "SGE"
            | "MNK"
            | "DRG"
            | "NIN"
            | "SAM"
            | "RPR"
            | "VPR"
            | "BRD"
            | "MCH"
            | "DNC"
            | "BLM"
            | "SMN"
            | "RDM"
            | "PCT"
            | "BLU"

      Returns JobData