Data File

From the Fallout4 CreationKit Wiki
Revision as of 20:23, 3 October 2017 by imported>Google0011 (→‎Files: Udpated info about how the game handles ESL files.)
Jump to navigation Jump to search

File Extension: .esm, .esp, .esl, .fos

A Data File acts as a database of all of the data for the world, including object data, dialogue, gameplay settings, object placements, AI settings, landscape, cells, etc.

Files

There are three types of data files -- Master Files and Plugin Files, and new as of the 1.10 Update, Light Plugin files. Master files and plugins (normal and Light) are largely identical in format, but have some important distinctions in practice.

Master: .esm

  • A master file is autonomous; it relies on no information other than itself.
    • The Creation Kit will not create master files.
      • NOTE: An exception to this rule is when using the Creation Kit's built in version control system. The merging process takes the interim esp data and merges into a master file to be used by the collaborators. See this page for details Version Control and Multiple Contributor Collaboration

Plugin: .esp

  • A plugin ESP file may only rely on data from itself and any master ESM files.
    • Plugins are not required to contain any data.
    • Plugins are not required to have a master if they are empty or add new content.
    • Plugins can only refer directly to data from a master file, though they can refer to multiple master files.
    • Plugins can only refer to information in another plug-in indirectly by using scripts.

Light Master: .esl

  • Light Master (.esl) files are a new optimized file format, introduced in the 1.10 Update. They behave like a normal plugin, except for the following:
    • .esl files cannot be edited in the Creation Kit. Active development should be done in an normal .esp file.
    • .esl files bypass the 8-bit plugin ID limit (255), by using more of the Form ID for their load order.
    • .esl files have a budget of no more than 2,048 forms, with Form IDs 0x800 to 0xFFF available for use.
      • A maximum of 4096 .esl files can be loaded by the engine at once, but more Form IDs in an .esl file means that less .esl files can be loaded.
      • Using .esl files that each have 2048 Form IDs, the limit drops to about 300 loaded .esl files.
    • .esl files are merged into plugin slot 0xFE at runtime. Their runtime Form ID is 0xFE[000](Hex Load Order)[000](Original Form ID).
      • Form 0xFA0 from the 10th loaded .esl file would be 0xFE00AFA0 at runtime. From the 200th .esl file, it would be 0xFE0C8FA0.
  • To convert a normal plugin (.esp) to a light (.esl) master, load your .esp file, and under File, select Convert Active File to Light Master.
  • It is good practice to run Compact Active File Form IDs to optimize your Form IDs within the 2,048 form budget before converting.
    • Compacting Form IDs does also change Form IDs in the .esp file, so be sure do this before converting to .esl, and be sure to save the .esp file afterwards.
    • Do not compact Form IDs on an .esp file you have already released and are updating. Because Form IDs change, you essentially create a new plugin when compacting, and this new plugin will not be compatible with saves using the old version.
  • Updating .esl files has more restrictions than updating .esp files, but not many.
    • Because of the 2,048 Form ID limit, it is important to be careful when deleting forms not to reuse Form IDs.
      • A saved weapon form could be deleted in your plugin, then have an armor form take the FormID when compacted.
    • Again, be sure to save compacted .esp files, because otherwise compacting again with new forms might give different Form IDs for forms already in a game save.
    • As long as development is done on compacted .esp files that match released .esl files, forms can be added under the 2,048 form limit, and existing forms can be edited without issue.
  • .esl Files released by Bethesda Game Studios (Creation Club releases) are flagged as master files and will load with the .esm files. Creation Club releases will automatically load into the game whether they are activated or not, and load before any .esm based mods made by modders.
  • .esl Files released by Modders are flagged the same as .esp files, but these ALSO load with the master files, but they will load in the order specified in plugins.txt. These .esl files will need to be activated before the game will load them.
  • .esl Files created by modders cannot use standard .esp files as masters or this will cause the .esp file to also load before the .esl in the master files section. This is new behavior for the game engine as of Patch 1.5.3.

Save: .fos

  • A Fallout Save (.fos) is used to restore the games state between sessions.
    • The Creation Kit will not create, edit or view save files.

Tooling

  • The Creation Kit is the primary tooling for working with data files.
  • FO4Edit
  • There are other community software projects that provided tooling for working with data files.

Notes

  • By tradition, the file extensions stand for Elder Scrolls Master and Elder Scrolls Plugin.
  • While not directly supported, a .esl can be converted back to a .esp for editing in one of the following ways.
    1. Rename the file back to .esp. Open it for editing with FO4Edit, and in the Header section edit the flags to trigger a resave. Simply choosing the ESM flag on and off again will suffice. Then save. It will then be binary identical to the original .esp it was created from.
    2. With the current version of the Creation Kit (1.10 at time of writing) you can also simply rename the .esl to .esp and open it. The Creation Kit will identify it as a plugin ignoring the header flag and allow editing. When You are finished you just save like normal. If you save as a normal .esp the header is automatically converted back to that of a standard plugin. You may use the convert to .esl function to publish the file as a .esl master again. This behavior may change in the future.

See Also