Fallout 4 Tools

From the Fallout4 CreationKit Wiki
(Redirected from F4SE Tools)
Jump to navigation Jump to search
F4se logo.png

The Fallout 4 Tools are a collection of command-line utilities developed by the F4SE team. These tools can be used to extract the contents of Archive Files and disassemble Script Files. The source code for these utilities is included in the download.

You can download it from the official website here.

ba2extract[edit | edit source]

A command-line tool to extract the contents of .ba2 Archive Files. Repacking is not supported, but there is enough information in the source code to write a repacker. The engine may still have some .bsa support in it, but this is untested.

There are two types of ba2 Archive Files: General, and Texture.

General archives can contain anything, while texture archives are optimized for storing textures. There is no significant size advantage when comparing the two, but texture archives store textures in a more intelligent way that is friendlier to the runtime texture streamer. When reading a DDS file, finding the lower resolution textures requires seeking to, and therefore decompressing most of the file. This is inefficient, because in most cases you will care about the lower resolution mips first, when the object is off in the distance. Texture archives store any mips higher than 256x256 in their own separate blocks, while the 256x256 and below are all in their own block.

Please note that the values in the DDS header are not present in the original texture archive, and were chosen for compatibility rather than accuracy. Color textures are accurate, but DXGI_FORMAT_BC5_UNORM (normal maps) and DXGI_FORMAT_BC7_UNORM are definitely wrong. Add the -atifourcc command line option to use the ATI2 format in the DDS header for normal maps, giving you a file that you can open in nvidia's photoshop dds plugin. These files have not tested to work in the game. The game expects a DX10-style header with DXGI_FORMAT_BC5_UNORM explicitly specified.

Usage[edit | edit source]

The help argument will print usage information.

ba2extract.exe -?

ba2extract.exe: usage [src] [dst] (options)
options:
  -atifourcc - use ATI2 fourcc for normal maps instead of DXT5.
               known to work with nvidia photoshop plugin.
               currently untested with the game.

scriptdump[edit | edit source]

A command-line tool to disassemble .pex Script Files. An updated version of Skyrim's scriptdump. Adds support for the new opcodes and features added in Papyrus 3.9. This is mostly intended as a code reference rather than a useful tool, unless you enjoy reading huge non-user-friendly disassemblies.

Usage[edit | edit source]

Invoking the program without any arguments will print the usage information.

scriptdump.exe

usage: scriptdump.exe [src] <dst>

Licensing[edit | edit source]

Anything deriving from this must also have its source available, and may not be used for profit in any way. Redistribution is not allowed. Learn, don't copy.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

See Also[edit | edit source]