Difference between revisions of "Modding"

From Onset Developer Wiki
Line 26: Line 26:
 
|SDK Download
 
|SDK Download
 
|-
 
|-
|1.0.0
+
|1.0.0 - 1.2.0
 
|UE 4.23
 
|UE 4.23
 
|https://dev.playonset.com/OnsetModding_423_v1.0.zip
 
|https://dev.playonset.com/OnsetModding_423_v1.0.zip
 +
|-
 +
|1.2.1
 +
|UE 4.25
 +
|https://dev.playonset.com/OnsetModding_425_v1.1.zip
 
|}
 
|}
  

Revision as of 18:12, 9 June 2020

The Onsets Scripting API is what other games call "modding". Since scripting is the main feature of Onsets, Onset can be seen as modding "by default".

This guide is just for how to import additional 3D models to Onset.

Workflow

Onset uses the Unreal Engine and therefore uses it's modding pipeline to load additional content.

You can import any 3D models from any 3D program into Unreal (FBX, OBJ). Unreal will create a .pak file out of your assets that can then be loaded in Onset.

OnsetModdingWorkflow.png

Lua Modding Functions

Onset Engine Version & Modding SDK

Versions
Onset Version Engine Version SDK Download
1.0.0 - 1.2.0 UE 4.23 https://dev.playonset.com/OnsetModding_423_v1.0.zip
1.2.1 UE 4.25 https://dev.playonset.com/OnsetModding_425_v1.1.zip

Install Unreal Engine

You first need to install the Unreal Engine. See the above table for what version is required.

https://docs.unrealengine.com/en-US/GettingStarted/Installation/index.html

Setup project

After installing the Unreal Engine, download the SDK for the correct engine version from above.

Extract the OnsetModding folder to your Unreal Projects folder. It's usually located in your Documents folder.

Double click on the OnsetModding.uproject. It will open the Unreal Engine. At the first launch Unreal compiles shaders which takes some time. The CPU usage will be 100% and the loading screen will be stuck at 45% for some time.

StartOnsetModding.png

Go to Edit -> Plugins

Mod PluginsOpen.png

Select "New Plugin"

Mod Plugins1.png

Select "Content Only". Enter a mod name. Make sure "Show Content Directory" is ticked. Then click "Create Plugin". The name of the mod is really important as we need that later one. So remember that.

Mod PluginsCreate.png

You will see this message.

Mod MyFirstModCreated.png

Introduce Content

Open the Content Browser.

Mod OpenContentBrowser.png

Click this icon to get a folder overview.

Mod ContentBrowserEnhance.png

All files that you import will need to be placed inside your mod content folder (MyFirstMod).

If you are familiar with Unreal then you can skip this:
Import3DModel You can also watch any Unreal tutorial on YouTube on how to add and setup your models in Unreal.

Package your content

Open the Onset Pak Creator window.

OpenOnsetPakCreator.png

  1. Select your mod from the left side.
  2. Click 'Browse' to select a location where the .pak file will be placed. For example D:\OnsetModPackage
  3. Click Create .pak

PakCreatorWindow.PNG

The packaging process can take a moment. When it's done you will find the .pak file in your specified folder.

PakCreatorDone.PNG

PakFileDoneInFolder.PNG

Load the pak file in a client Lua script

To view the contents of your .pak file you can use the UnrealPak tool. It is located under C:\Program Files\Epic Games\UE_4.23\Engine\Binaries\Win64

UnrealPakList.PNG

LoadPak("/MyFirstMod/", "../../../OnsetModding/Plugins/MyFirstMod/Content/")