An example of the implementation of scary things. (Scary - because the code is scary, very scary)
- Melee Weapon (with pseudo-api, 2 with primitive logic + 1 with special logic)
- Custom Gun (just with custom prefab, 1 item)
- Custom Item (code + prefab, Engineer Table)
- Space Drone (just code & prefab)
- Custom Faces (for robots only, special patch + code)
ThunderKit - game dll import & asset build script PML - modding api
After importing the meshes into Unity, you need to set Read/Write to true.
- Download an asset ripper. (I used AssetRipper found on Github)
- In AssetRipper select all the .asset, .ress and any files that could relate to Assets and Meshes. (I used it on the Entire Game Folder)
- Move all the Asset files from the exporter to a Unity Project if you want to browse through the entire game. For extracting GameObjects in general, you only need the folders:
- Material
- Mesh
- Resources
- Scripts (This one is temporary, just to get the script properties, need to manually recreate them with the Thunderkit script references)
- Shader
- Texture2D
- Extract the unity files as shown above.
- Open the Unity project with the extracted unity files in the assets.
- Import the game scripts with ThunderKit.
- Put the GameObjects you want to edit into the scene. Findout how to disable Asset refreshing when deleting the scripts in assets :c
- Delete the files within the
Scripts
folder. (Ensure you have a backup if you want to do multiple GameObjects) - Copy the scripts into new ThunderKit game scripts.
- Save prefab and export like normal.
- Download an asset extractor which converts the files to a format accepted by Blender. Such as .obj, .fbx etc. (I attempted to use the Unity package FBX Exporter but couldnt get it to work, Dragon prompted me to AssetBundleExtractor which is a bit difficult to navigate for the meshes, however it still worked.)
- Find the mesh you want to manipulate (Dont worry about the materials etc yet) and export it to a format accepted by Blender. Such as .obj, .fbx etc.
- Import and manipulate in Blender.
- Export as a .fbx file (It holds the information about multiple materials)
- Import the .fbx file into Unity and assign materials etc.
In Unity Editor:
- You need to select the path to the game exe in the ThunderKit settings and click Import. There may be errors in AssemblyCsharp if PML is installed. If there is an error, delete pml dll from Pulsar/Packages/PulsarLostColony/PulsarModLoader.dll, or try importing the dll from a clean version of the game.
- Select Pipe file in Assets and change path to your mods directory
- Click Execute in Pipe file
- 👍
Possible problems:
- After restarting unity, errors may appear due to missing scripts. Just delete the Pulsar/Packages/PulsarLostColony folder and click Import again in ThunderKit. And copy again PulsarExperiments.dll to Pulsar/Assets/