Modding: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
(Added notes on references for other modding pages in a comment at top)
No edit summary
(2 intermediate revisions by 2 users not shown)
Line 8: Line 8:
Off Grid has extensive modding support, users will be able to create their own Missions for the game using the very same tools that the original developers use.
Off Grid has extensive modding support, users will be able to create their own Missions for the game using the very same tools that the original developers use.


== A brief overview of how users will make custom missions==
==[[Modding Manual]]==
This is your one stop shop to all things modding in ''Off Grid''. Here you can find guides as to the process of making your own mods, both how to use the Unity eotor and our Off Grid tool set, descriptions of the tools and techniques, and tutorials and example code for writing Lua and making mods.
 
==[[:Category:LuaAPI|Lua Apis]]==
Here you can find all of the Api documentation for the various calls you have access to for writing mods in ''Off Grid'' whether it be writing your own mission scripts, hackable devices, in game apps and tools or anything else for that matter!
 
== A brief overview of how users will make custom missions ==


# Download Unity and the provided LevelKit project
# Download Unity and the provided LevelKit project
Line 69: Line 75:


OSX: '''OffGrid.app/Contents/Resources/Data/StreamingAssets/Levels/NewsPaperOffice/Scripts/Devices/HandDryer.lua'''
OSX: '''OffGrid.app/Contents/Resources/Data/StreamingAssets/Levels/NewsPaperOffice/Scripts/Devices/HandDryer.lua'''
[[Category:Modding]]

Revision as of 11:17, 10 November 2017


Modding Topics

Off Grid has extensive modding support, users will be able to create their own Missions for the game using the very same tools that the original developers use.

Modding Manual

This is your one stop shop to all things modding in Off Grid. Here you can find guides as to the process of making your own mods, both how to use the Unity eotor and our Off Grid tool set, descriptions of the tools and techniques, and tutorials and example code for writing Lua and making mods.

Lua Apis

Here you can find all of the Api documentation for the various calls you have access to for writing mods in Off Grid whether it be writing your own mission scripts, hackable devices, in game apps and tools or anything else for that matter!

A brief overview of how users will make custom missions

  1. Download Unity and the provided LevelKit project
  2. Follow the instructions in LevelKit's interface to create a stub mission to build upon
  3. Using our modular LevelKit pieces, create the geometry and layout to tell your visual story
  4. Open up the stub mission script generated by LevelKit and fill in the logic for your mission
  5. Build the Mission via LevelKit and test it in your copy of Off Grid
  6. Upload to Steam workshop or send to your friends

Now to go into a little more detail about those steps:

Download Unity and the provided LevelKit project

The levelkit will be downloadable as a seperate tool on Steam as well as our website, we'll require the user to use a specific version of Unity in order to avoid any issues

Follow the instructions in LevelKit's interface to create a stub mission to build upon

Our LevelKit tool set will walk users through the process of creating a mission from a template, after filling in a few details about their mission we'll create a stub for them to build off

Using our modular LevelKit pieces, create the geometry and layout to tell your visual story

We've already built up quite a large library of modular mission pieces to work with, these include architecture and props. Users can choose how fine gain they want to design, they can build entire rooms with individual wall and window pieces or use the pre-made rooms provided for them.

Part of making a mission for Off Grid is setting up what we call "MissionObjects" these are simply unity game objects with a pre-made "MissionObject" component, using Unity's editor interface users will set the type of MissionObject. These are

  • Interactable
  • Trigger
  • Spawn
  • HackableDevice
  • Generic

These objects are can be referenced in mission scripts and be set up with custom logic (see below)

Open up the stub mission script generated by LevelKit and fill in the logic for your mission

Once the user has made a first pass on the geometry of their mission they can start writing the logic, mission scripting in Off Grid is written in Lua. Users lua scripts contain definitions for Characters, Physical Items, Data, Networks, Objectives, Checkpoints and Devices, they also contain code that reacts to the use of MissionObjects.

For example after setting up the MissionObject "PlayerBuildingEnter" as a trigger, the user can set up a lua function that's called when the player enters the trigger volume. Using this simple MissionObject interface that links together Unity and our lua apis modders have an incredible amount of power to create their vision.

Build the Mission via LevelKit and test it in your copy of Off Grid

Using LevelKit's interface users can build their mission into the folder structure the game expects and then point the game towards it in order to test it.

Upload to Steam workshop or send to your friends

Once they've tested your level thoroughly, users can follow the in game interface for uploading their mission to steam workshop. If they're not running the steam version of the game, they can create a zip of their mission to send to friends or post to message boards for others to try out

How to take a look at Off Grid's modding support without the tools

If you've received a copy of Off Grid without LevelKit, you can poke around some of the lua files in the data folder it order to look at the structure of our missions and apis: Some good places to look would be:

The apostle mission script: ( perhaps try changing Joe's name to your own? )

Windows & Linux: OffGrid_Data/StreamingAssets/Levels/NewsPaperOffice/Scripts/theapostle_mission.lua

OSX: OffGrid.app/Contents/Resources/Data/StreamingAssets/Levels/NewsPaperOffice/Scripts/theapostle_mission.lua

The script for the hackable hand dryers in the apostle mission: ( Try adding your name to the "names" lua table, or updating the colors of the ui? )

Windows & Linux: OffGrid_Data/StreamingAssets/Levels/NewsPaperOffice/Scripts/Devices/HandDryer.lua

OSX: OffGrid.app/Contents/Resources/Data/StreamingAssets/Levels/NewsPaperOffice/Scripts/Devices/HandDryer.lua