Skip to content

Creating A Plugin

BellCube Dev edited this page Jan 28, 2022 · 8 revisions

Linear Spell Progression has its own format for plugins. First, download the Plugin Development Kit from releases. Below is an overview of the plugin and a guide to editing it. For testing, use Don't Eat Spell Tomes.

Plugin Structure

The plugin is made of a Package and at least 4 FormLists, arranged in a tree structure.

Image-based diagram There's an image here with a diagram. Don't worry, a text-based version is shown below!
Text-based diagram
  • Master List (in LinearSpellProgression.esl)
    • YOUR Plugin!
      1. Spell Tomes
        1. Some Spell Tome (Repeatable)
        2. Some Spell Tome (Repeatable)
        3. Some Spell Tome (Repeatable)
      2. Spells
        1. Matching Spell (repeatable)
        2. Matching Spell (repeatable)
        3. Matching Spell (repeatable)
      3. Prerequisites
        1. Spell 0's Prerequisites
          • Single Spell
          • Requirements List
            • Some Spell (Repeatable)
            • Some Spell (Repeatable)
            • Some Spell (Repeatable)
        2. Spell 1's Prerequisites
          • Single Spell
          • Requirements List
            • Some Spell (Repeatable)
            • Some Spell (Repeatable)
            • Some Spell (Repeatable)
        3. Spell 2's Prerequisites
          • Single Spell
          • Requirements List
            • Some Spell (Repeatable)
            • Some Spell (Repeatable)
            • Some Spell (Repeatable)

Package??!

A quick look in xEdit shows that the template includes an AI Package??! What in the world? Well, allow me to enlighten you. I've used the Package to hold the script needed to install your plugin. Why not use a Quest, you might ask. Well, I've heard reports about the OnInit() event having oddities and inconsistencies on Quests, and so I opted for another form that can hold scripts—and opted for packages. Because they're not a base object (like an Activator or Static), I don't expect xSE plugins to mess with it (causing a very minor performance hit). And because of its EditorID, I don't expect users to attempt to apply it to an NPC.

The Guide

Alright, so now you know what that's all about. You may even understand this enough to jump in right now! But if you're not, here's what you do:

  1. Rename the plugin file. Don't want a bunch of plugins all called LinearSpellProgression Plugin Template.esp, now do we?

  2. Open the Plugin Template, alongside any plugins you want to add spell prerequisites to, in either SSEEdit (Recommended) or the Creation Kit.

  3. Navigate to the FormLists. If you're doing this in the Creation Kit, you can search by `LSP_`

  4. Rename the FormLists using the EditorID Scheme below

  5. Balance to your heart's content! Here's how:
    1. Find your Spell Tome. Add it to the Tomes list.
    2. Add its corresponding Spell to the Spells list
    3. Add its prerequisites to the Prerequisites list. This can be EITHER a FormList or a single Spell

    Do note these items' indexes must align. So if the Spell Tome for Fireball is at index 2, the spell Fireball should be at index 2 in the Spells list and the prerequisite spell/list should be at index 2 in the Prerequisites list.
Simple enough, right? (if you don't think so, think of how annoying this would be to implement on your own)

EditorID Scheme

It's a (relatively) simple system.

  • Universal Ending: [DLC/CC/MOD]_{{3-letter abbreviation for author, such as BGS}}_{{2-Digit Number}}{{Human-readable name}}
    Example: DLC_BGS_00Skyrim

  • Plugin-Level: LSP_Main_ + Universal Ending
    Example: LSP_0Tomes_DLC_BGS_00Skyrim

  • Tome: LSP_0Tomes_ + Universal Ending
    Example: LSP_0Tomes_DLC_BGS_00Skyrim

  • Spells: LSP_1Spells_ + Universal Ending
    Example: LSP_1Spells_DLC_BGS_00Skyrim

  • Prerequisites: LSP_2Pre_ + Universal Ending
    Example: LSP_2Pre_DLC_BGS_00Skyrim

  • List of a single spell's prerequisites: LSP_{{Spell Name}}_ + Universal Ending
    Example: LSP_FlameCloak_DLC_BGS_00Skyrim

Clone this wiki locally