Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
ValheimPrefabParser
Developer tool: dumps and categorizes all 6000+ Valheim prefabs to a text file. For modders and testers only — no gameplay changes.
CHANGELOG
Changelog
All notable changes to Valheim Prefab Parser are documented here.
[2.0.0] - 2026-02-22
Fixed
- ObjectDB was empty on parse — the mod used to start parsing immediately after
ZNetScene.Awake, beforeObjectDBhad time to populate. Now a coroutine waits untilObjectDB.instance.m_items.Count > 0before starting. Singleplayer and multiplayer (viaCopyOtherDBfallback patch) both handled correctly. - ~2400 prefabs were missing — the
Resources.FindObjectsOfTypeAllfilterparent == nullwas discarding child objects inside prefabs (meshes, colliders, LOD levels). Filter removed; total count is now back to ~6000+. - Reflection used for
m_boss— replacedGetField("m_boss")with direct access to the public fieldcharacter.m_boss. Faster and more robust. - O(n²) duplicate check —
List.Containsinside the collection loop replaced withHashSet<int>keyed onGetInstanceID(). O(1) per lookup. - Code duplication —
ParseSyncandParseCoroutinepreviously both contained a full copy of the formatting logic. Extracted into a sharedBuildContent()method. - Output path — file is now written next to the plugin
.dllinstead of the rootplugins/folder. - Unused Jotunn dependency — removed from
.csproj; the mod has no runtime dependency on Jotunn.
Added
IncludeComponentListconfig option — when enabled, prints every component on each prefab. Useful for deep inspection. Disabled by default (keeps file small).- Summary table at the top of the output file showing prefab count per category.
- 30-second timeout in
WaitForObjectDBAndParse— if ObjectDB never becomes ready, parsing proceeds with whatever data is available and logs a warning. - Categories
22_Mineralsnow also catchesMineRock5,32_SFXadded for audio-only prefabs without aZNetView.
Changed
- VFX detection now checks for a
ParticleSystemcomponent first; name-based fallback (vfx_,sfx_,fx_) is secondary. - Output format improved: added Unicode box-drawing borders, summary section,
and timestamp in
yyyy-MM-dd HH:mm:ssformat. - Version bumped to 2.0.0.
[1.0.2] - initial release
- Initial public release.
- Categorized prefab dump from
ObjectDB,ZNetScene, andResources. - Coroutine mode to reduce frame hitches.