0 of 0

File information

Last updated

Original upload

Created by

Quantumyilmaz

Uploaded by

Quantumyilmaz

Virus scan

Safe to use

Tags for this mod

About this mod

Header file for DLL authors to include in their projects who create dynamic forms with Form Factory for their mods.
By creating these via Dynamic Form Tracker, you build a form bank for your mod so that you can track and fetch these forms and more.
Meant to be used with CommonlibSSE-NG.

Requirements
Permissions and credits
Donations
Dynamic Form Tracker (DFT) is meant to be used as a form bank so that you can track and fetch your created forms.
Currently only supports forms which are inventory items iirc.
By tracking these, DFT allows you to reuse the forms of the same type without needing to create new ones and delete them.
More on that later.

The Problem
Form Factory forms are, depending on their form type, serialized by the game or not.
If you ever messed with creating forms before, you probably know that these forms "disappear" if you close and reload the game.
If you just load the save without closing the game, they will still be there.

The reality is, depending on the form type, they do not actually disappear. They are still in the game, where you have left them.

For the ones that are serialized:
  • These end up having no data besides their form type at the beginning of the load game. Empty name, no item model, 0 weight, etc. The reason why you do not see them in containers is actually bcs they have no name. For instance WEAP, ARMO and MISC are serialized by the game. The scripts attached to these will stay attached, fully functional and healthy. You can also see them in the save file by opening it up in ReSaver under "ChangeForms". You will also see them under "Script Instances" or as "Non-existent form instances".
    You can "revive" these with DFT. More on that later.
  • The ones that are out in the world (object references) are also in the game.
    You can "revive" them with DFT and do Disable+Enable to see them again in the game.
  • If your mod keeps creating new forms, they will stick around and bloat the save and eat up FormID slot which has the limit FF3F0000.
    After that users will experience infinite loading screens. Instead, you can reuse the created ones with DFT.
  • There might be times when you would like to delete these forms from the game. For instance, to give the users the option to actually remove your mod together with the forms you have created.
    I have never witnessed the `SetDelete` method to work. If it works for you, please let me know. DFT gives you the option to delete them with the keyword `delete`. More on that later.
For the ones that are NOT serialized by the game:
  • These are surely less worrisome, but you might still wanna track them. For instance, food is not serialized by the game.
    But the player might have active effects from food items on save game that will not be there on load game bcs they are not serialized. There is also no way that I know of to put them back in the game before the game loads. The SKSE load and save callbacks happen after the game's own. You can easily reapply these active effects with DFT on load callback with the correct elapsed time.
DFT members and methods
Please see the source implementation. I will try to update this. I do not have time atm.
Here is a summary of the functionality:
  • You can create forms with DFT which uses the form factory to create the forms and adds to its bank.
    You can assign a custom ID to the created form that you can use later on to fetch specifically that one. This can ofc just be the FormID of the created form. It comes in handy if the created form is connected to some other form in some way in your mod.
The form components are automatically copied from the base form to the created form.
  • Once you create a new form it will be flagged as "active", i.e. "being used". On load game, all forms you have created will be in the bank and will be in an "inactive" state. More on this next.
  • Instead of creating a new form, you can fetch one from the bank. If DFT finds one that is inactive and has the same form type as requested, it will yield it and set it as "active".
  • As mentioned before, form factory forms do not have data on reload. DFT will automatically "revive" them whenever you request them, based on the base form that the created form is based on.
  • As discussed above, if the player has active effects from created forms, DFT can reapply them on reload with `ApplyMissingActiveEffects`.
  • Lastly, you can delete the created forms. DFT uses the keyword `delete` to delete. After that you will observe that they will disappear from ChangeForms in ReSaver and the game will reuse the formids of the deleted forms. They will still stick around under ScriptInstances as "Non-existent form instances" in ReSaver. I do not know if this has any harm but I did not observe any so far.
    Let me know if you know more. More on how to "safely" delete the created forms below.

Deleting Form Factory Forms
If you delete a created form:
  • that is out in the world (object reference/TESObjectREFR), you will crash on load screen when changing cell.
  • that is in a container, you will crash upon opening it or viewing it with QuickLoot.
  • that is in player inventory, most of the time the game chugs along upon opening it.
To delete a created form:
  • First off, try to fetch and reuse forms from the DFT bank.
  • Also, I'd advise against letting created forms be out in the game world as object references. 
    Whenever they are dropped, swap their base.
  • Otherwise, if you want to delete dynamic forms, do it in load callback and prompt the user to immediately save, close and reload the game before doing anything else.

My mods that use DFT:
- Containerize
- Alchemy of Time

If you know more, please share.

Credits
Noah Boddie for helpful advice.
  翻译: