More Vanilla Build Prefabs
Adds configurable vanilla build prefabs to hammer in survival mode with a default configuration for ease of use. Now with ServerSync!
Date uploaded | a year ago |
Version | 0.4.1 |
Download link | Searica-More_Vanilla_Build_Prefabs-0.4.1.zip |
Downloads | 318 |
Dependency string | Searica-More_Vanilla_Build_Prefabs-0.4.1 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.
Preferred version: 5.4.2202ValheimModding-Jotunn
Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.
Preferred version: 2.21.3README
MoreVanillaBuildPrefabs
MoreVanillaBuildPrefabs is a Valheim mod to make all vanilla prefabs buildable with the hammer (survival way) while allowing you to configure the requirements to build them. You can configure which prefabs are available for building and what the building requirements are, though the mod comes with a default configuration that enables ~100 new pieces so you can start playing right away. It also now has the option of being installed on a server to allow you to sync settings between clients. The mod can still be used as a purely Client-Side mod though.
Key Feature
Because all the added build pieces are pre-existing vanilla prefabs, any pieces you build with this mod will persist in your world even if you uninstall the mod. This means that pieces you build on a server will also be visible for players without the mod and any builds using the pieces from this mod will load for players without the mod.
Instructions
If you are using a mod manager for Thunderstore simply install the mod from there and skip to step 3 below. If you are not using a mod manager then, you need a modded instance of Valheim (BepInEx) and the Jötunn plugin installed.
- Download the MoreVanillaBuildPrefabs.dll from the Publish/Thunderstore directory.
- Place the MoreVanillaBuildPrefabs.dll into your BepInEx\plugins folder
- Launch the game and enter a world to generate the configuration files. The plugin searches for prefabs in the game loading screen.
- (Optional) Quit the game. Find the file Searica.Valheim.MoreVanillaBuildPrefabs.cfg in your BepInEx\config folder, open it to customize mod configuration (see Configuration section for details).
- Play the game using the default configuration generated by the mod or your customized one.
Recommended: Install SearsCatalog (https://valheim.thunderstore.io/package/ComfyMods/SearsCatalog/) to extend the hammer build table and allow you to access all the pieces this mod adds even if there are too many added pieces for the vanilla build table. If you install the mod from Thunderstore via r2modman or Thunderstore mod manager then SearsCatalog will automatically be installed as well.
Configuration
Changes made to the configuration settings will be reflected in-game immediately (no restart required) and they will also sync to clients if the mod is one the server. The mod also has a built in file watcher so you can edit settings via an in-game configuration manager (changes applied upon closing the in-game configuration manager) or by changing values in the file via a text editor or mod manager.
Global Section Configuration:
EnableMod [Synced with Server]
- Globally enable or disable this mod (restart required).
- Acceptable values: False, True
- Default value: true
CreatorShopAdminOnly [Synced with Server]
- Set to true to restrict placement and deconstruction of CreatorShop pieces to players with Admin status.
- Acceptable values: False, True
- Default value: false
CreatorShopAdminDeconstructAll [Synced with Server]
- Set to true to allow admin players to deconstruct any CreatorShop pieces built by players. Intended to prevent griefing via placement of indestructible objects.
- Acceptable values: False, True
- Default value: true
ForceAllPrefabs [Synced with Server]
- Setting to true overrides individual configuration for all prefabs and enables them all for building with the hammer.
- Acceptable values: False, True
- Default value: false
Verbosity [Synced with Server]
- Low will log basic information about the mod. Medium will log information that is useful for troubleshooting. High will log a lot of information, do not set it to this without good reason as it will slow down your game.
- Acceptable values: Low, Medium, High
- Default value: Low.
Prefab Configuration Sections:
The rest of the configuration files contains ["Prefab-Name"] sections to configure each prefab. Each section contains:
Enabled [Synced with Server]
- If true then allow this prefab to be built and deconstructed. Note: this setting is ignored if ForceAllPrefabs is true.
- Acceptable values: False, True
- Default value: false
AllowedInDungeons [Synced with Server]
- If true then this prefab can be built inside dungeon zones.
- Acceptable values: False, True
- Default value: false
Category [Synced with Server]
- A string defining the tab the prefab shows up on in the hammer build table.
- Acceptable values: CreatorShop, Misc, Crafting, Building, Furniture# Setting type: String
- Default value: CreatorShop
CraftingStation [Synced with Server]
- A string defining the crafting station required to built the prefab.
- Acceptable values: None, Workbench, Forge, Stonecutter, Cauldron, ArtisanTable, BlackForge, GaldrTable
- Default value: None
Requirements [Synced with Server]
- Resources required to build the prefab. Formatted as: itemID,amount;itemID,amount where itemID is the in-game identifier for the resource and amount is an integer. You can find itemID on Valheim Wiki or on this link. Example: Requirements = Wood,5;Stone,2 would mean the prefab requires 5 wood and 2 stone to build.
- Default value:
PlacementPatch [Synced with Server]
- Set to true to enable collision patching during placement of the piece. Recommended to try this if the piece is not appearing when attempting to place it. (If enabling the placement patch via this setting fixes the issue please open an issue on Github letting me know so I can make sure the collision patch is always applied to this piece.)
- Acceptable values: False, True
- Default value: false
- Note: this setting is not available on prefabs that I have already made custom placement patches for.
Default Prefab Configuration
The mod has a default configuration that enables ~100 new pieces by default. The configuration settings for these pieces are intended to provide a reasonable balance and ensure that someone playing with the mod will only unlock various build pieces after encountering them in the world. As the default settings are based on my preferences and not yours, you are of course able to change these default configurations however you please.
Default Enabled Pieces
Click to see a general list of enabled pieces (contains spoilers.)
- All black marble pieces used in Dvergr structures.
- All Dvergr furniture.
- Most Dvergr wooden structures.
- Dvergr demisters.
- Fuling village pieces.
- Various rocks.
- Extra furniture and decorations.
- Turf roofs.
- Statues.
- Wood ledge.
See the PrefabConfig.cs file in the source code for the full default configuration or install the mode and check the generated configuration file.
Detailed Mechanics
This mod enables prefabs that were not intended to used for building by players, so they may lack things like proper collision or snap points. All of the prefabs enabled by the default configuration have been patched to fix those sorts of issues and make them behave similarly to vanilla build pieces. These patches are applied whether the prefab is enabled for building or not to make sure that prefabs that have been placed previously still behave as intended (ie they don't lose their collision and fall though the world).
If a prefab is not enabled by default then there is no guarantee that it will behave nicely. While many of them have been patched, I currently have to make custom patchess for each prefab so not all of them have been patched yet. It also takes a long time to test and patch 300+ prefabs.
That said, the placement patch config setting provides a generic patch that may resolve placement issues for some prefabs, so please try toggling that if there is a prefab you would like to build with but it there are issues. If the placement patch does resolve the issue then please let me know so I can change the mod to always enable the placement patch for that prefab.
Alternatively if the placement patch setting does not resolve the issue, then a work around that may work is using either Snap Points Made Easy by MathiasDecrock or the mod Extra Snap Points Made Easy by Searica (that's me). Both of these mods allow you to manually select the snap points on the piece you are placing and the piece you are snapping to. Manually selecting the snap points can allow you to place a prefab that otherwise does not show up due to missing colliders.
Some prefabs found in vanilla dungeons can also behave unexpectedly, such as being able to open a door but not close it. If there is piece you would really like to build with that is buggy feel free to open an issue on Github requesting it to be patched (see contributions section).
TLDR: Some prefabs other than the ones enabled by default may be buggy, please adjust your expectations accordingly.
Deconstructing Pieces
Since this mod adds more prefabs to the hammer, that means you can deconstruct more pieces. As of version 0.0.3 and all later versions, world-generated pieces will only drop their default drops, while player-built pieces will only drop the resources used to build them.
Pickable Pieces
Building and deconstructing prefabs that have pickable components could potentially allow for exploits that create infinite resources. To prevent that, the following adjustments are made.
Building Pickables
If a prefab has a pickable component, such as a berry bush, then whatever resource it drops will always be added to the required resources for building it. The amount of the resource required to build the prefab will also always be equal to or greater than the amount of the resource that is dropped when you pick it (after accounting for world modifiers). These conditions will override the required resources set in the configuration file.
Example: If building a berry bush drops 1 berry when you pick it then no matter what the settings are in the configuration file it will always cost at least 1 berry to build the berry bush. If world modifiers are set to 2 so the bush would drop 2 berries then it will always cost at least 2 berries to build.
Deconstructing Pickables
When you deconstruct a prefab with a pickable component if the pickable item has been picked then the resources dropped by deconstructing it will be adjusted to reduce the amount of the pickable item drops by the amount that was gained by picking the item (after accounting for world modifiers).
Example: If you built a berry bush that cost 5 berries to build, then picked the berries and got 2 berries, and then deconstructed the bush only 3 berries would drop.
CreatorShop Pieces
Prefabs set to the custom CreatorShop category in the hammer build table have unique behavior compared to other pieces when it comes to deconstructing them. If a prefab is set to the CreatorShop category then player's can only deconstruct instances of that prefab that were placed by them. This is intended to prevent player's from deconstructing world-generated instances of prefabs like trees while still allowing player's to build and deconstruct their own trees.
If multiple player's have this mod, the same restrictions still apply and they will not be able to deconstruct instances of CreatorShop pieces that are world-generated or built by other players. The CreatorShopAdminDeconstructAll setting can allow players with admin status to deconstruct CreatorShop pieces placed by other players though, to allow an option for admins to remove indestructible pieces.
Known Issues
Custom Armor Stand Clipping: Armor placed on the Male Armor Stand and Female Armor Stand prefabs has clipping issues causing parts of the armor to not be displayed. I have not been able to fix this as of yet. Feel free to reach out if you know things about meshing and you have ideas for a solution.
Piece Icons: Variable lighting between icons for custom pieces where some appear much darker than others. A fix has been implemented, but icons are cached by Jötunn so to fix the issue you need to do the following:
- Go to this directory: %userprofile%\appdata\LocalLow\IronGate\Valheim\Jotunn\CachedIcons
- Delete all the pngs in that directory.
- Restart the game and the mod should hopefully regenerate the icons correctly.
Planned Improvements
- Resolve known issues.
- Patch and enable more prefabs by default.
- Add default build costs for treasure chests and add snap points.
- Automatically add missing sfx and vfx for placement and deconstruction of prefabs based on the required crafting station.
- Fix player built barrels dropping random loot when destroyed via damage (the fixes I have worked for every piece except barrels for some reason 🙃).
- Learn how localization works and add localization options to the mod.
Potential Improvements
- Adding vanilla functionality to pieces added by the mod, like being able to sit in chairs.
- Adding comfort values to pieces added by the mod with a config setting to enable/disable them.
- Adding a CreativeMode setting that would enable prefabs environmental related prefabs (like mist) that users may want to be able to place but are not suitable for general play and building.
- Adding patches that are unsafe when used on a server without the mod installed and a corresponding setting to enable/disable those patches. Examples of unsafe patches are changing inventory sizes for some prefabs or other patches that could make you lose items if you loaded the world without the mod. If I do this then I may change the mod to prevent players with the mod joining servers that do not have the mod installed.
- Learn how to save/read data to/from the world file so I can alter just the pieces that are player built and have it persist after a restart.
- Add Wear-N-Tear or Destructible components all to player built pieces upon placement.
Compatibility
These are non-exhaustive lists.
Partial Incompatibly
PlanBuild (by MathiasDecrock) The two mods do work together but not all of the icons for custom pieces added by MoreVanillaBuildPieces show on correctly in the build table for PlanBuild's Plan Hammer. PlanBuild also does not respond to in-game changes made to pieces added by MoreVanillaBuildPrefabs. A fix is currently being worked on in collaboration with the authors of PlanBuild though. Also, The current version of PlanBuild on Thunderstore is not fully updated for the newest game version but a fix has been made and will be included in the next update.
Incompatible Mods
PotteryBarn (by ComfyMods) Currently both mods apply a transpiler patch to Player.SetUpPlacementGhost()
and using MoreVanillaBuildPrefabs while PotteryBarn is installed will cause MoreVanillaBuildPrefabs to fail to load correctly. I am looking into a possible fix for this but it is not high priory as I think it is unlikely someone would use both mods at the same time given their functions directly overlap (I could be wrong though).
MoreVanillaBuilds (by Galathil) The original mod that this one is a remake of. I haven't actually checked what happens if you use both at once but they do modify the same pieces so I wouldn't recommend it.
Compatible Mods
PlantEverything (by Advize): These two mods are fully compatible. If PlantEverything is installed then MoreVanillaBuildPrefabs will not touch any of the prefabs that PlantEverything adds to the cultivator so all of the plants added by PlantEverything will function as normal.
Click to see full list of compatible mods
- AdventureBackpacks (by Vapok)
- Aegir (by blbrdv)
- AAACrafting (by Azumatt)
- AzuCraftyBoxes (by Azumatt)
- AzuMapDetails (by Azumatt)
- AzuAreaRepair (by Azumatt)
- AzuClock (by Azumatt)
- AzuExtendedPlayerInventory (by Azumatt)
- AzuSkillTweaks (by Azumatt)
- Backpacks (by Smoothbrain)
- Better Beehives (by MaxFoxGaming)
- BetterArchery (by ishid4)
- BetterCarts (by TastyChickenLegs)
- BetterPickupNotifications (by Pfhoenix)
- BetterUI Reforged (by the defside)
- BowsBeforeHoes (by Azumatt)
- BuildRestrictionTweaks (any version that is a reupload of Aedenthorn)
- CreatureLevelAndLootControl (by Smoothbrain)
- ComfortTweaks (by Smoothbrain)
- ComfySigns (by ComfyMods)
- CraftingFilter (by Aedenthorn)
- DeathPinRemoval (by Azumatt)
- DeezMistyBalls (by Azumatt)
- DodgeShortcut Reupload (by NetherCrowCSOLYOO)
- EmoteWheel (by virtuaCode)
- EulersRuler (by ComfyMods)
- Evasion (by Smoothbrain)
- Extra Snap Points Made Easy (by Searica)
- FascinatingCarryWeight (by kangretto)
- FastTeleport (by GemHunter1)
- FastTools (by Crystal)
- Gizmo (by ComfyMods)
- HeyListen (by ComfyMods)
- ImFRIENDLY DAMMIT (by Azumatt)
- Instantly Destroy Boats and Carts (by GoldenRevolver)
- InstantRuneText (by Azumatt)
- MapTeleport (by Numenos)
- Mead Base Icon Fix (by Sulyvana)
- MultiUserChest (by MSchmoecker)
- Multiverse (by 1010101110)
- Minimal UI (by Azumatt)
- NoSmokeStayList (by TastyChickenLegs)
- OdinsFoodBarrels (by OdinPlus)
- PassivePowers (by Smoothbrain)
- Pathfinder (by Crystal)
- Perfect Placement (by Azumatt)
- PlantEasily (by Advize)
- PlantEverything (by Advize)
- ProfitablePieces (by Azumatt)
- QoLPins (by Tekla)
- Queue Me Maybe (by Azumatt)
- Quick Stack Store Soft Trash Restock (by Goldenrevolver)
- QuickConnect (by bdew)
- QuietyPortals (by Neobotics)
- Ranching (by Smoothbrain)
- RepairAll (by LoadedGun)
- Sailing (by Smoothbrain)
- SearsCatalog (by ComfyMods)
- Server devcommands (by JereKuusela)
- ShieldMeBruh (by Vapok)
- SilenceTameWolfCub (by GetOffMyLawn)
- Snap Points Made Easy (by MathiasDecrock)
- SNEAKer (by black7ar)
- Sorted Menus Cooking Crafting and Skills Menu (by Goldenrevolver)
- SpeedyPaths (by Nextek)
- StackedBars (by Azumatt)
- StaminRegenerationFromFood (by Smoothbrain)
- SuperConfigurablePickupRadius (by TastyChickenLegs)
- TargetPortal (by Smoothbrain)
- ToggleMovementMod (by GetOffMyLawn)
- Veinmine (by WiseHorrer)
- Venture Location Reset (by VentureValheim)
- VikingsDoSwim (by blacks7ar)
- WackysDatabase (by WackyMole)
- WieldEquipmentWhileSwimming (by blacks7ar)
- Probably even more, it's pretty compatible.
Source Code
Github: https://github.com/searica/MoreVanillaBuildPrefabs
Donations/Tips
My mods will always be free to use but if you feel like saying thanks you can tip/donate here: https://ko-fi.com/searica
Contributions
If you would like to provide suggestions, make feature requests, or reports bugs and compatibility issues you can either open an issue on the Github repository or tag me (@searica) with a message on the Jötunn discord or the Odin Plus discord.
Over time I will slowly patch more prefabs and hopefully come up with a more generalizable method of patching them, but if you'd really like a specific prefab to work better then let me know via one of the methods above. I'm a grad student and have a lot of personal responsibilities on top of that so I can't promise I will always respond quickly, but I do intend to maintain and improve the mod in my free time.
Credits
This mod was inspired by MoreVanillaBuilds by Galathil and PotteryBarn by ComfyMods.
Development Credits
- Huge shoutout and thanks to the developers of Jötunn for all their work making the library and to Margmas specifically for all their help and advice.
- Thanks to Advize for the advice and examples for re-writing the mod to respond to configuration settings changes while in-game.
- Thanks to Wackymole for the help figuring out when to hook the game and resolving server sync issues.
- Thanks to redseiko for the advice and pointing me to resources to learn more about Unity and also for making PotteryBarn.
- Thanks to probablykory for the advice and examples on optimizing how mods respond to configuration settings changes.
- Thanks to OrianaVenture for the example of using Jötunn's server sync features.
- Thanks to Jules and MarcoPogo for their help with figuring out a solution for compatiability with PlanBuild.
Community Credits
- Thanks to onnan for all their suggestions, feedback, and testing
- Thanks to Cass, Blubbson, Katosan, and Havengrad for quickly finding and reporting issues or bugs.
Shameless Self Plug (Other Mods By Me)
If you like this mod you might like some of my other ones.
Building Mods
Gameplay Mods
CHANGELOG
Versions 1.X.X
Version | Notes |
---|---|
1.3.0 |
|
1.2.3 |
|
1.2.2 |
|
1.2.1 |
|
1.2.0 |
|
1.1.0 |
|
1.0.8 |
|
1.0.7 |
|
1.0.6 |
|
1.0.5 |
|
1.0.4 |
|
1.0.3 |
|
1.0.2 |
|
1.0.1 |
|
1.0.0 |
|
Versions 0.X.X
Click to expand
Versions 0.6.X
Click to expand
Version | Notes |
---|---|
0.6.0 |
|
Versions 0.5.X
Click to expand
Version | Notes |
---|---|
0.5.1 |
|
0.5.0 |
|
Versions 0.4.X
Click to expand
Version | Notes |
---|---|
0.4.8 |
|
0.4.7 |
|
0.4.6 |
|
0.4.5 |
|
0.4.4 |
|
0.4.3 |
|
0.4.2 |
|
0.4.1 |
|
0.4.0 |
|
Versions 0.3.X
Click to expand
Version | Notes |
---|---|
0.3.7 |
|
0.3.6 |
|
0.3.5 |
|
0.3.4 |
|
0.3.3 |
|
0.3.2 |
|
0.3.1 |
|
0.3.0 |
|
Versions 0.2.X
Click to expand
0.2.2 |
|
0.2.1 |
|
0.2.0 |
|
Versions 0.1.X
Click to expand
0.1.4 |
|
0.1.3 |
|
0.1.1/0.1.2 |
|
0.1.0 |
Major Updates
|
Versions 0.0.X
Click to expand
0.0.3 |
|
0.0.2 |
|
0.0.1 |
|