-
Notifications
You must be signed in to change notification settings - Fork 81
2. How it Works
We've exposed a small portion of the Keep Talking and Nobody Explodes functionality in an assembly called KMFramework
. Both Keep Talking and your mod reference this assembly, which is how the Prefabs you create will be loaded as bombs, modules, rooms, etc by Keep Talking. You can view the source for this at KMFramework.
The other important piece of the puzzle is the AssetBundle. It's worth reading up on how these work in Unity's AssetBundle documentation. Essentially you will author your Prefabs in Unity, tag them for inclusion in an asset bundle, and then run our AssetBundler script which will collect up everything needed and build you mod.
With KMFramework.dll and the AssetBundler script, you can create Prefabs in Unity that will be instantiated by the game. These Prefabs can contain new scripts and can even reference other managed assemblies. The AssetBundler script will take care of making sure this all works.
Mods are then loaded in Keep Talking and your Prefabs are instantiated when appropriate (e.g. a KMBombModule prefab will be used to create modules when populating a bomb, a KMSetupRoom Prefab will be instantiated to replace the Setup Room, a KMService Prefab will be instantiated immediately and persist forever, etc).