Modbox
Not enough ratings
Sdk Guide
By VR-Pontus and 2 collaborators
This guide will help Modders and coders in the future!
   
Award
Favorite
Favorited
Unfavorite
Getting Started with ModboxSDK
ModboxSDK is used to create Modbox mods. Making Mods requires knowledge of Unity, and uses C# if you want to add custom scripting.

See our introduction dev log here.

For help or any discussion use the Steam forums - or the Modboxgame.com forums.

We also have a Discord, here: https://discord.gg/2cNnWjb- there is a #sdk channel for ModboxSDK discussion/help.

Installing ModboxSDK
Under the 'Tools' section of your Steam apps there will be a ModboxSDK app. Running it will open the Unity project folder.

See the Readme.txt for information on Unity version requirements. You might not need to stay on the same exact version (using 5.41fb1 if the ModboxSDK is built in 5.42f2 is fine, though it might cause problems) - but definitely the same version number (using 5.4 and Modbox is built in 5.3 won't be fine). Open the ModboxSDK folder in Unity.

Importing all the assets for the first time might take a while (~10 minutes). There will also be a bunch of import errors/warnings - usuallly harmless, so hit 'clear' to clear them after loading.

In the Scenes folder, open the 'TestScene'. This is a testing blank scene for testing entities/creations. You should now be able to run the game and play Modbox in Unity.

Playing SDK - Asset Bundles
You can still load and run all normal Modbox mods and creations with the ModboxSDK - you just need to set the path to your Modbox mod directory to load the default mods that come with Modbox. Use the 'Modbox/SDK Settings' menu to set the right path.

By default - 'Simulated Asset Bundles' is on. What this mean is that it will first load the mods in the 'Mods' folder in the Unity Project window. It will load these mods as Unity prefabs, rather than asset bundles. So when developing you usually want simulated asset bundles on - so your new entities are actually updated. You can turn on/off simulated asset bundles in the Modbox menu item.

For the ModboxSDK, the only mod prefabs included is the 'Basics' mod, and the 'SciFiArsenal'. Use those entities as examples of how to set up entities.

The 'Engine' game object are settings for how to run the scene - highlight over the options for tool tips. Engine options:

  • VR Test Non VR Mode: Lets you test without going into VR - see Non VR Controls
  • Default Level: Switch to this enviroment at start
  • Default Mods: List of mods to load at start
Creating a Mod
In the Mods directory, create a new folder with the name of your Mod.

Right click inside the folder and go to 'Create/ModMetaData'. This is where your mod description and other information will be - it must be name 'modmetadata'. Hover over the variables in the inspector to see what each variable does.

Back up your mod data! Preferably with a version control system - as Steam might wipe it out when updating the SDK

ModMetaData Options:

  • ModName - The 'ModName' is the name that is saved in creations - so it must be unique and not change.
  • ModFullName - Full name displayed to the user.
  • Description - shown on workshop page
  • Icon - image for workshop page
  • ModTypes - tags used for workshop page
  • Ent Categories - Add new categories here your entities will use
  • Authors: List of authors for Steam workshop
  • Published File ID: Workshop ID. Created on first upload to the workshop.


When you run the ModboxSDK in the Unity Editor your mod should now show in the 'mods' table. Go to this and hit Enable to enable the mod, on enabling the mod it will search the folder for any game objects with the following components:

  • Entity
  • ModboxMaterial - texture option for primitives
  • ModboxPhysicsMaterial - option for entity physics, can set density / impact sounds / physics material / break force
  • PhysicsSound - Impact sound set
  • EnviromentOption - New enviroment for the user to switch to (which links to a Unity scene)
  • To make mod editing easier - you can also add your mod name to the 'Default Mods' list in the Engine.cs and it will load it at the start
Tutorial: Adding assets to Modbox SDK and creating custom box colliders
Tutorial: Adding assets to Modbox SDK and creating custom box colliders
https://vimeo.com/243767049
2 Comments
󠀡󠀡 󠀡󠀡 󠀡󠀡󠀡 5 Feb, 2018 @ 6:39am 
Hard... no easy
Abra 5 Oct, 2017 @ 6:32pm 
Oh cool looks like you’ve been busy being awesome :)