Repo with source code for my mods. Also contains a mini guide on custom machine meshes and animations
Check Registry Tool out. It is useful to quickly create new items, recipes, techs, etc.
In the Unity folder you can find needed scripts to create your own buildings.
- ExportAssetBundles script is used to force unity to build asset bundles.
- BetterMeshDataAsset makes sure that if you open MeshDataAsset in inspector nothing will break(Also is used to bake mesh data from Mesh object).
- AnimationBakerWindow is the baker.
- EditorObjExporter can export unity meshes to obj file(Optional)
- FixPrefabMeshes can POTENTIALLY(Always have a backup, just in case) fix some prefabs to be useful for baking animations. You will need to have all meshes used in game with their names intact imported in your project. Also you might need to fix prefab a bit after that. Unfortunately, it VERY likely will crash unity, so make sure to save everything before that happens.(Optional)
- Create unity project and either put Assembly-CSharp to reference in scripts or use ThunderKit to automate that.
- Extract or create needed assets(Models, animations, prefabs, etc)
- Fix extracted prefab so that there is no missing scripts and all meshes and materials(Although i'm still unable to compile ingame's shaders) are there
- If you intent to use prefab ingame you also need to properly setup all needed description scripts(Like BuildConditionConfig, SlotConfig, etc). Game uses these scripts to figure out what is what and where. If you are unsure how to set them up, try using RuntimeUnityEditor and LDBTool's utility to explore Proto definitions.
- Make sure that animation clip works, by dragging fixed prefab into preview window(It should animate it)
- Open baker (Window->DSP Tools->Verta Animation Baker) and select prefabs root, enter name and hit bake. You will get MeshDataAsset and .verta file. Both are needed to make this work
- Make sure you correctly define names and references to two created files in LODModelDesc script
- Create new Aseet Bundle and add all needed assets to it(You cannot add .verta file, becuse it won't let you). Then build Asset Bundle (Window->DSP Tools->Build AssetBundle)
- Write code and import everything in.
- Download and unpack BepInEx into game root directory
- Download and install LDBTool
- Download and install DSP_CustomBuildings