Valheim

File information

Last updated

Original upload

Created by

aedenthorn

Uploaded by

aedenthorn

Virus scan

Safe to use

Tags for this mod

About this mod

Allows you to replace various game textures with custom png files.

Requirements
Permissions and credits
Changelogs
This mod should allow you to replace player, equipment, and world object textures in the game.

To extract the vanilla textures for reference, I use Asset Studio. The textures are in the valheim_Data/sharedassets files.

To replace a texture, you simply add a png file to the folder BepInEx/plugins/CustomTextures with the proper name, as explained below, and then load the game.

To reload textures while in game, there is a hotkey (default PageDown). Note: this doesn't reload any vanilla textures, so if you remove a custom texture file, you'll have to restart the game to see the vanilla texture again.


Player Textures

For the base player character texture, use the following:

player_model_<modelNumber>_texture.png

player_model_<modelNumber>_bump.png (for the skin bump map)

Replace <modelNumber> with either 0 for male or 1 for female (I've only tested the female). E.g.:

player_model_1_texture.png
player_model_1_bump.png


Equipment Textures

For anything equippable, use the following:

item_<itemName>_texture
item_<itemName>_bump (only implemented for chest and legs atm)
item_<itemName>_metal (only implemented for chest and legs atm)

Replace <itemName> with the item's name. The proper name will show in the log when you equip an item, e.g.:

CustomTextures _Chest item: player_armor_none item_ArmorTrollLeatherChest_texture

So, to change the texture of the troll leather chest armour, create a file named item_ArmorTrollLeatherChest_texture.png.


World Object Textures

To change textures for almost anything else in the game, you can either create a texture for an object with a specific name, or create a texture to replace every instance of a texture with a specific name. This doesn't work for some thing yet, there are some quirks.

To change the texture of a specific object use:

object_<objectName>_texture.png

Replace <objectName> with the name of the object.

Note that this replaces the main texture of every mesh material in the object, so if an object uses multiple textures, we might have to make a more complex syntax. This also does not work for dungeon objects yet.

To replace every instance of a named texture use:

texture_<textureName>_texture.png

Replace <textureName> with the name of the texture. Note that texture names are not always set and they are not always exactly the same as the resource file name you extract.

To get a list of prefabs in the game, set the config option DumpSceneTextures to true, then run the game and load into your world once. A file BepInEx/plugins/CustomTextures/scene_dump.txt should be created. You can set it back to false after you've dumped the textures, otherwise it will recreate the file every time you run the game.

The file scene_dump.txt will show things like:

object Greydwarf has 4 SkinnedMeshRenderers
    Cube: greydrawrf_diffuse
    Cube.001: greydrawrf_diffuse
    Plane:
    Plane.001:

So, to change the texture for a greydwarf, you would want to create a texture_greydrawrf_diffuse_texture.png file(yes, the game has typos).

For simpler objects, like building blocks, you'll see:

object wood_floor has 2 MeshRenderers:
    large_lod: Planks5c_low
    _Combined Mesh [high]: Planks5c_low

You would better create an object_wood_floor_texture.png file, to only change the textures for that mesh, unless you want to change the look of every object that uses that texture.

Note that you'll have to experiment to see how the textures are mapped to meshes, especially with building blocks. You can try monocolor textures first to make sure you are replacing the right thing.


This mod is still a work in progress.



You will need to install the BepInEx for Valheim pack if this is your first Valheim mod.

To install this mod, just place the dll file in the Valhiem/BepInEx/plugins folder.

Code is at https://github.com/aedenthorn/ValheimMods.

If you want to complain or ask for help or help me test my mods, you can visit my Discord server.