Skyrim Special Edition

Package Contents

FTF_Core contains the ESP master and a BSA.
The BSA contains a SEQ file for the MCM menu, and the compiled scripts.
The ESP contains the following:

SM Quest Nodes:

  • FTF_ObserverNode
  • FTF_ResetNode

Keywords:
  • FTF_Loc
  • FTF_Owner
  • FTF_Enabled
  • FTF_Init
  • FTF_Clearable
  • FTF_StartReset

FTF_Addon contains an ESP whose contents will be merged with your mod as well as the loose script sources.
The ESP contains the following:

Quests:
  • FTF_Observer
  • FTF_Reset
  • FTF_Register

SM Quest Node Overrides:
  • FTF_ObserverNode
  • FTF_ResetNode

Features

FTF_Loc: A Location with this Keyword indicates that it is using FTF. Holds the current Occupier.
FTF_Owner: A Location with this Keyword indicates that it is using Custom mode (instead of Vanilla). Holds the current Owner.
FTF_Clearable: A Location with this Keyword indicates that it should be set as cleared when all members of Occupier are dead.
FTF_Enabled: A Location with this Keyword indicates that resets may be enabled/disabled by external scripts. Holds 0 for disabled or 1 for enabled.
FTF_Init: Required if using FTF_Owner and/or FTF_Toggleable. Holds 0 for uninitialized or 1 for initialized.

Overview of Functionality



Detailed Explaination of Functionality

Definitions
A Reset, in the context of FTF, is when FTF changes the Location's Faction.
Occupier is the Faction that currently currently controls the Location.
Owner is the Faction that would take control when a Reset occurs. Can be the same as Occupier.

Resets use one of two modes, Vanilla or Custom. The mode is determined by the presence of the FTF_Owner Keyword.
Vanilla mode works in a "Vanilla-like" manner. Owner depends on who owns the parent hold in the civil war.
Custom mode is for Locations outside of Skyrim or those that aren't tied to the civil war. Owner depends on the initial value and is changed by external scripts.

Explaination
When the Player enters a Location, a Change Location Event is triggered.
If the Location has the FTF_Loc Keyword and matches your Location, the FTF_Observer Quest is started.
FTF_Observer triggers a Script Event using the FTF_StartReset Keyword, which in turn starts the FTF_Reset Quest.
FTF_Observer waits for FTF_Reset to finishing initializing and sets it to the next stage. Then FTF_Observer stops.

FTF_Reset first gathers info about how you have configured the Location.

If Keyword data has not been initialized and needs to be, initialization happens here.
If FTF_Owner is present, it gets set to the value of the InitialOwner property.
If FTF_Enabled is present, it gets set to the value of the InitialllyEnabled property.

Occupier is pulled from the FTF_Loc Keyword.
Owner is pulled from the parent hold in Vanilla mode and from FTF_Owner in Custom mode.
If Resets are currently disabled or Owner = Occupier, no Reset occurs and FTF_Reset stops here.
Otherwise, FTF_Reset starts a wait loop.

Every second, FTF_Reset checks if the Location is loaded and if all members of Occupier are dead.
If the Location is loaded and not all members are dead, keep waiting.
If the Location is loaded, all members are dead, and the FTF_Clearable Keyword is present, set the location as cleared.
If the Location isn't loaded and not all members are dead, FTF_Reset ends and no Reset occurs.
If the Location isn't loaded and all members are dead, start a Reset.

Guide

To begin incorporating FTF into your mod, I recommend using FTF_Addon.esp as a base or merging its contents:
Base: Rename FTF_Addon.esp and use it as the starting point of your mod.
Merge: Use xEdit to copy the Quests and SM Nodes into your mod with "Copy as new record into...".
Rename all quests to avoid collisions. My naming convention is "PREFIX_LOCATION_OBJECT".

Article information

Added on

Edited on

Written by

Apocrypher00

0 comments