

Adds a pressure plate, which opens and closes doors within a range if a player stands on it.
Triggering range is configurable.
Extract the content of Pressure-Plate into the BepInEx/plugins folder.
Inside the repo are two folders, PressurePlate for the mod and UnityAssets for the unity files.
Place all Unity, Valheim and dependencies assemblies in the PressurePlate/libs folder (create the folder if it doesn't exist) and add them as references to the visual studio project.
Place the same assemblies in UnityAssets/Assets/Assemblies (create the folder if it doesn't exist) if you want to edit the AssetBundle.
Build the AssetBundle with the Unity toolbar "Assets/Build AssetBundles" to automatically copy the resulting file to the mod folder.
Custom door settings can be applied for every door type. This can only be done with code and is an optional for other mods. Vanilla items are configurable, too.
Here is a quick instruction:
Add this mod .dll to your assembly references. The next step ensures that everything works if a user doesn't have pressure plate installed.
Check if the mod is loaded:
const string pressurePlateGUID = "com.maxsch.valheim.pressure_plate";
if (Chainloader.PluginInfos.ContainsKey(pressurePlateGUID)) {
// next steps...
}
This should be done at your plugins Start(). If you use Awake() and your mod is loaded first it may not detect it properly. Any following steps can be done whenever you like, even after the loading phase.
Create the config: DoorConfig config = new DoorConfig();
It takes two optional parameters:
This may requires using PressurePlate;
Add the config to the gameobject:
const prefabName = "your_door_piece_name"
DoorConfig.AddDoorConfig(prefabName, config);
or directly with your prefab
GameObject door = myDoorPrefab;
DoorConfig.AddDoorConfig(door.GetComponent<Door>(), config);
0.2.0
0.1.0
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Nexusmods: https://www.nexusmods.com/valheim/mods/498
Thunderstore: https://valheim.thunderstore.io/package/MSchmoecker/PressurePlate/
Github: https://github.com/MSchmoecker/Valheim-Pressure-Plate