Assets

TerrorFox1234 Created Sep 12 2016 - Updated Sep 20 2016 Modding

What Are Assets?

Assets are all files that come with a mod that are not a plugin.

Assets can be anything from textures, scripts, ini files, to meshes and beyond. Some common loose file file types you'll see in skyrim include .dds (texture files), .pex (script file), .nif (mesh file), .xwm (music), .fuz (voice), and .wav (sound).

Assets can be loose (just in folders), or packed inside a special archive called a BSA (Bethesda Softworks Archive) or for FO4 a BA2 (Bethesda Archive 2).

Different assets have different effects on the game.

Scripts

Scripts are pieces of code that can be interpreted by an executable. In Bethesda games scripts are interpreted by the scripting engine, Bethesda. Scripts, along with esps, are the primary means for mod authors to add new things to the skyrim engine, especially new types of gameplay and new spells.

Scripts are used for things like scenes in quests (For example, the scenes that occur the first time you walk into Whiterun all occur because scripts are telling them to occur). They are used on all spell effects. And they can be used for a great many other things too. Mod authors use scripts to add everything from flying birds to new perk trees to brand-new animations.

Papyrus is a completely novel scripting language developed by Bethesda for Skyrim and used in FO4. It bears some similarities to C# but is generally not very similar. Papyrus is a compiled language. This means that scripts come in two forms: the compiled script, or .pex file, that is actually read by the game, and the source files, .psc, that can be used to read and edit scripts.

It is possible to convert .pex files into .psc file using Champollion. The .psc file can then be viewed and edited with any text editor, such as notepad. Notepad++ works well and has a basic plugin for syntax highlighting.

Because Papyrus is specific to Bethesda, it has many limitations. It essentially only contains functions that Bethesda devs needed. These functions have been expanded upon by Skyrim Script Extender (SKSE) and various other plugins, allowing mod authors to do more than Bethesda could. However, what they can do is still limited. It is also designed in a way to never impact fps even when the script engine is heavily overloaded. This means that failures in the script engine are often preferred over fps drops by Papyrus.

Meshes

Meshes are the three-dimensional shapes of everything in the game world, from trees to armor to distant mountains. They use the .nif format, which stands for “netimmerse file.” Nif files are again, specific to Bethesda, although this format has been used since Morrowind.

Mesh files are made up of vertices that form triangles all over the surface of the mesh. These triangles are often called polygons. The more polygons there are, the more detailed the mesh can be, leading to smoother curves and sharper corners. But this increases the mesh file size, meaning a larger impact on VRAM, and more polygons has an impact on fps. If a mesh is the shape of a flat object, like a floor, it may only need two polygons - one vertex on each corner. All of the additional detail and shadow then comes from the normal map. This is much better for performance.

UV mapping is what tells a texture how to wrap around a mesh. If the texture doesn’t match the UV mapping, then there will be gaps and black lines in the object.

Meshes can be manipulated using several tools. The most basic manipulation such as viewing the mesh, and changing the shader types and textures used by the mesh can be done in Nifskope. Creation of meshes and changing their shape and UV mapping is easier to do in 3DSMax or Blender. Members of the niftools team have written nif file importers and exporters for both programs.

Textures

Textures are the colors and patterns of everything in the game world. Textures use the .dds format, which is a popular format used in many video games (although the supported encoding for each game is still different). There are several types of textures:

Diffuse (_d.dds) is the color of the object. Fine-grain detail such as embroidery on a dress or the weave of a basket are in the diffuse texture.

Normal (_n.dds) controls how light and shadow move over an object. How soft fur looks and the drape of a fabric is greatly controlled by the normal map. It plays a big role in making an object look textured. It typically does not have much fine-grain detail.

Parallax (_p.dds) is a height map. It uses a special rendering effect to make the object look more 3D as you move around it. This rendering effect partially exists in Skyrim but is not functional. Use of parallax textures therefore requires ENB post-processing. Parallax maps are very broad, 3D level of detail.

Environment (_m.dds) is a reflection map. This makes an object shiny and controls where it reflects light.

Cubemap (.dds) is a special type of texture that is an image of an environment. This image makes the shiny object look like it is reflecting the scene around it.

Glow (_g.dds) is a glow map. Glow maps make objects emit light.

A particular mesh may use some, all or none of these texture types. If the same mesh is used for many different textures, texture sets may be used.

No matter how many times a mesh or texture appears in your game, it only loads into VRAM once. Therefore for meshes and textures that repeat often, it is not that big of a hit to VRAM to run high res versions. However it may still hit your fps.

Audio

Audio refers to sound effects, music, and voice files. Music uses the .xwm format, sound effects use .wav format and voice files use .fuz format.

.xwm is the file extension for Microsoft's xWMA (Windows Media Audio), which is a simple container that normally contains WMA v2 audio. It is a good option for lossless compression of audio (being able to reduce the size of the file with minimal quality loss).

.wav is the file extension for Waveform Audio, the most common format for high-quality audio. Every hardcopy CD you have ever purchased is in .wav format. The downside to .wav is that the files tend to be much larger than other, compressed, formats (like .mp3 or .ogg). This is most likely why Bethesda chose to only use .wav for sound effects (relatively short small files) and converted to .xwm for music (much longer larger files).

.fuz is a proprietary extension developed by Bethesda for voice files. A .fuz file is a combination of a .xwm (the actual recorded voice audio) and a .lip file (the file that syncs lip movement to voice audio).