Modding: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(41 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Players, modders, and hackers are able to use the game to create new and interesting levels with stories about surveillance, hacking and the Internet of Things or whatever else you are inspired to!  Off Grid is heavily moddable, with an exposed Lua API allowing anyone to edit the game. Using their own free copy of the Unity games engine, anyone can build mods with the same tools that the development team use. With this level of control, players can build their own content: levels, hackable devices, apps, hacking tools, and stories - and share them with other players.


<!--
The core game logic and systems are written in C#, but we have created an exposed Lua API that all the gameplay is controlled by. Lua is flexible and easy to learn language that the players can use (with the help of this wiki) to create their own levels.
The Stellaris modding page is a nice example : the landing page is an indepth summary and at the bottom there is a 'References' section that has more fine grain modding details on specific topics like 'Ships' within 4 different categories of Static Modding | Dynamic Modding | Media/Localisation | Other.
__NOTOC__
http://www.stellariswiki.com/Modding
-->
 
Players, modders, and hackers will be able to use the game to create new and interesting levels with stories about surveillance, hacking and the Internet of Things or whatever else you are inspired to!
 
Off Grid is heavily moddable, with an exposed Lua API allowing anyone to edit the game.  Level editing tools enable anyone with the  Unity engine free personal edition and build mods with the same tools the development team use.
 
With this level of control, players can build their own content:  levels, hackable devices, apps, hacking tools, and stories - and share them with other players - a huge opportunity for players to make and experience topical and contemporary stories as they emerge in the IRL world of hacking and surveillance.
 
The game is made in the Unity game engine, and we have created a fairly unique pipeline to allow players to mod Off Grid using Unity as the mod editor.
 
The core game logic / systems are written in C# by us and from that we have created an exposed Lua API that all the gameplay is written in.
 
We have made some custom Unity editor tools (using asset bundles) that allow modders to download the Unity project and make their own content, using Unity's tools for the assets and our components to set up mission triggers, and writing gameplay in Lua using out Lua api, and then export them as a zip file for drm free builds, or upload them to Steam Workshop.
 
 
= 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.
==The first places start are:==
 
 
===[[Getting Started with the LevelKit]]:===
'''How to setup the LevelKit modding tools'''
 
===[[Building your First Level]]===
'''How to create custom missions using LevelKit'''
 
Otherwise... get stuck in to the rest of it here:
 
== Modding Manual ==
== 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 editor and our Off Grid tool set, descriptions of the tools and techniques, and tutorials and example code for writing Lua and making mods.
There is a lot you can mod in Off-Grid, so it can be overwhelming to get started! With your help we will pack this wiki full of information and ideas to support and inspire your creations.


There is a heck of a lot you can mod in ''Off Grid'', we specifically have made the modding tools capable of doing pretty much everything we needed in order to make levels for the game so that you can do just as much as us, and in some cases we have made the systems more powerful than we needed so that you can do more than we have in the game too.
'''Please note:''' It is possible to make basic changes to the game without downloading all of the tools below. If you have a copy of Offgrid installed you can navigate to the project files edit them. See [[Basic Modding]].
 
(A good example of this is the depth that you can make branching conversations and narratives in CryptoChat and the fact that those conversations can run functions and store variables, allowing conversational choices to drastically alter the trajectory of a player's game)
 
Check out the table below to see the main topics and guides, each of these categories lead on to more in depth and specific articles themselves too.


{| class="wikitable"
|-
!colspan="2" | First Steps
|-
|[[Download LevelKit]] || Levelkit installation
|-
|[[Unity]] || Installing Unity and opening the Levelkit project
|-
|[[Other Prerequisites]] || IDE setup and some good advice
|-
|[[LevelKit GUI]] || Using the Levelkit tool
|}


The steps to making a level are detailed here: [[Building your First Level]] - but it's probably redundant and eventually worth deleting if everything is covered in the following list (TBC):


{| class="wikitable"
{| class="wikitable"
|-
|-
! Manual
!colspan="2" | Level Design and Mission Scripting
|-
|[[Mission Scripting]] || The Mission Script is the core file that contains the framework for everything in your level script. This is where the magic happens.
|-
|[[Lua API]] || All of the available Lua commands - Dig through these to get an idea of what you can do.
|-
|[[Mission Objects]] / [[Mission Object Set Up]] || How to create Interactive objects, Triggers and more.
|-
|[[Triggers and Examples]] ||
|-
|-
|[[Asset Creation Pipeline]]
|[[Spawn Points and Patrol Points]] ||
|-
|-
|[[Character Profiles]]
|[[ Interest Points]] ||
|-
|-
|[[Character Types and Prefabs]]
|[[Pre-made Hackable Devices]] || For placing Hackable Objects in your levels
|-
|-
|[[Conversations]]
|[[Device Scripting]] || For scripting the hackable interactions
|-
|-
|[[Creating Apps]]
|[[Layers and Tags]] ||
|-
|[[Colliders and Static Objects]] ||
|-
|-
|[[Data Scripting]]
|[[Setting up Doors]] ||
|-
|-
|[[Debugging Your Mods]]
|[[Setting up Vents]] ||
|-
|-
|[[Device Scripting]]
|[[Data Scripting]] ||
|-
|-
|[[Devices]]
|[[Conversations]] ||
|-
|-
|[[Game Progress]]
|[[Navmesh]] ||
|-
|-
|[[Getting Started with the LevelKit]]
|[[Culling]] ||
|-
|-
|[[How the SoundIDs are structured]]
|[[Lighting and Baking]] ||
|}
 
{| class="wikitable"
|-
|-
|[[Message Templates]]
! NPC Character Scripting
|-
|-
|[[Mission Objects]]
|[[Character Types and Prefabs]] - Overview of Characters and how to build them
|-
|-
|[[Mission Scripting]]
|[[Character Profiles]] - Scripting Character Personalities and Data Profiles
|-
|-
|[[Pre-made Hackable Devices]]
|[[Character Colours]] - LUTs and changing character colours
|-
|-
|[[Setting up Doors]]
|[[Agent Definitions]] - Scripting AI interactions for NPCs
|-
|-
|[[Triggering Sounds]]
|[[AI Gestures]] - A list of AI gestures you can use to call animations
|-
|-
|[[Audio Options]]
|[[Message Templates]] - Text Messages that NPCs receive
|-
|-
|[[Triggers and Examples]]
|[[Drones]] and [[Navcloud]] |
|}
|}


==[[:Category:LuaAPI|Lua Apis]]==
{| class="wikitable"
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!
|-
! Audio Options
|-
|[[Audio Options]] - probably an overview needs a lot of work
|-
|[[Triggering Sounds]]
|-
|[[SoundIDs Sound List]]
|-
|}


== A brief overview of how users will make custom missions ==
{| class="wikitable"
|-
!colspan ="2" | Art - 2D and 3D Pipeline
|-
|[[Asset Creation Pipeline]] || Art Pipeline Steps for adding your own 3D Models and Textures
|-
|[[Modular Art Library]] ||
|-
|[[Adding Icons]] ||
|-
|[[Texture Presets]] || (signs and pictures for example)
|-
|[[Modeling your own Hackable Devices]] ||
|}


# Download Unity and the provided LevelKit project
{| class="wikitable"
# Follow the instructions in LevelKit's interface to create a stub mission to build upon
|-
# Using our modular LevelKit pieces, create the geometry and layout to tell your visual story
! More Options
# Open up the stub mission script generated by LevelKit and fill in the logic for your mission
|-
# Build the Mission via LevelKit and test it in your copy of Off Grid
|[[Creating Apps]]
# Upload to Steam workshop or send to your friends
|-
 
|[[Debugging Your Mods]]
Now to go into a little more detail about those steps:
|-
 
|[[Debug Lua API]]
=== 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
|[[Game Progress]] (and linking levels into longer experiences)
 
|-
=== Follow the instructions in LevelKit's interface to create a stub mission to build upon ===
|[[Player Path Tool]] - for planning out gameplay and communicating ideas in a team
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. this will generate the dolfer structure and base file you need to make a mod. It should look something like this:
|}
 
<syntaxhighlight source lang="lua" line>
 
/Levels/
|-- SomeMod/
|      |-- Mission-1/
|       |      |-- Bundles/
|       |      |-- Content/
|       |      |      |--  
|       |      |-- level.json
|      |      |-- strings.lua
|       |      |-- missionImage.png
|       |-- Mission-2
|       |      |-- Bundles/
|      |      |-- Content/
|       |      |-- level.json
|      |      |-- strings.lua
|      |      |-- missionImage.png
|      |-- mod.json
|-- OtherMod/
 
</syntaxhighlight>
 
=== 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'''
 
[[Category:Modding]]

Latest revision as of 13:01, 27 March 2024

Players, modders, and hackers are able to use the game to create new and interesting levels with stories about surveillance, hacking and the Internet of Things or whatever else you are inspired to! Off Grid is heavily moddable, with an exposed Lua API allowing anyone to edit the game. Using their own free copy of the Unity games engine, anyone can build mods with the same tools that the development team use. With this level of control, players can build their own content: levels, hackable devices, apps, hacking tools, and stories - and share them with other players.

The core game logic and systems are written in C#, but we have created an exposed Lua API that all the gameplay is controlled by. Lua is flexible and easy to learn language that the players can use (with the help of this wiki) to create their own levels.

Modding Manual

There is a lot you can mod in Off-Grid, so it can be overwhelming to get started! With your help we will pack this wiki full of information and ideas to support and inspire your creations.

Please note: It is possible to make basic changes to the game without downloading all of the tools below. If you have a copy of Offgrid installed you can navigate to the project files edit them. See Basic Modding.

First Steps
Download LevelKit Levelkit installation
Unity Installing Unity and opening the Levelkit project
Other Prerequisites IDE setup and some good advice
LevelKit GUI Using the Levelkit tool

The steps to making a level are detailed here: Building your First Level - but it's probably redundant and eventually worth deleting if everything is covered in the following list (TBC):

Level Design and Mission Scripting
Mission Scripting The Mission Script is the core file that contains the framework for everything in your level script. This is where the magic happens.
Lua API All of the available Lua commands - Dig through these to get an idea of what you can do.
Mission Objects / Mission Object Set Up How to create Interactive objects, Triggers and more.
Triggers and Examples
Spawn Points and Patrol Points
Interest Points
Pre-made Hackable Devices For placing Hackable Objects in your levels
Device Scripting For scripting the hackable interactions
Layers and Tags
Colliders and Static Objects
Setting up Doors
Setting up Vents
Data Scripting
Conversations
Navmesh
Culling
Lighting and Baking
NPC Character Scripting
Character Types and Prefabs - Overview of Characters and how to build them
Character Profiles - Scripting Character Personalities and Data Profiles
Character Colours - LUTs and changing character colours
Agent Definitions - Scripting AI interactions for NPCs
AI Gestures - A list of AI gestures you can use to call animations
Message Templates - Text Messages that NPCs receive
Drones and Navcloud |
Audio Options
Audio Options - probably an overview needs a lot of work
Triggering Sounds
SoundIDs Sound List
Art - 2D and 3D Pipeline
Asset Creation Pipeline Art Pipeline Steps for adding your own 3D Models and Textures
Modular Art Library
Adding Icons
Texture Presets (signs and pictures for example)
Modeling your own Hackable Devices
More Options
Creating Apps
Debugging Your Mods
Debug Lua API
Game Progress (and linking levels into longer experiences)
Player Path Tool - for planning out gameplay and communicating ideas in a team