Mercury Fallen Guide

Modding Guide - Custom Artwork for Mercury Fallen

Modding Guide – Custom Artwork

Overview

Modding Guide covering how to setup and use custom models and images in your mod.

Overview

Mercury Fallen supports custom 2D & 3D artwork. You will need 3D modelling software to create your content. This section will cover how to import your content into Unity and export it so that it can be used in your mod.

Be sure to check out the Getting Started guide for information for basic information on mod setup and structure.
[link]

Unity Installation

Mercury Fallen uses Unity Engine version 2018.4.32. Download Unity using the following link:

[link]


Unity Hub Recommended

Unity Setup

You will need to install the Mercury Fallen Mod Tools package available in your Steam game library under tools.

Launch the Mercury Fallen – Mod Tools from Steam. This will open a folder containing a Unity project folder and mod example files. The “Mercury Fallen – Mod Tools” folder will need to be opened in Unity.

Open Unity HUB and click the Add button. Browse to the Mercury Fallen – Mod Tools folder located in the mod tools folder opened from Steam. Click Select Folder to add the project to Unity.

Click the Mercury Fallen – Mod Tools in the list to open the project. You will be prompted to install the correct Unity version if it’s not already installed.

Model & Texture Info

Model Details

Be sure to keep your objects low poly. Especially given that objects are not seen close up.

Scale

Models are designed to fit onto the floor grid. Each floor tile is 1×1 meter in size.

Model Pivot

The models pivot should be at world center (0, 0, 0). The pivot represents the center of the objects footprint. So a 3×2 tile object will still have it’s pivot at world center but the object mesh may be offset from center depending on how it should appear within it’s footprint area.

Format

Export to FBX format from your 3D modelling software

Texture Size

This depends on the detail/size of the object. This can range from 128×128 for smaller objects up to 512×512 for larger objects. Often 256×256 is a good texture size for most objects.

Material Textures

Mercury Fallen uses a custom Physically Based Rendering material. PBR materials require color, metallic and roughness maps. The custom Mercury Fallen standard shader used for Unity materials is broken down as follows.

Main Texture

This is the main color texture

Normal Map

While recommended, a normal map is not required

MREM

The MREM texture uses the texture color channels for following properties.

Red Channel = Grayscale metallic values

Blue Channel = Grayscale roughness values

Green Channel = Optional grayscale emission mask

Importing Your Asset

It is recommended to import your content to the Export Content folder in the Project panel.

Select the Export Content folder in the Project panel.

Drag and Drop your model and textures to the Project panel

Asset Preparation

Prefab

Once your mesh is imported, drag it from the Project panel to the Hierarchy panel. Your model will appear in the scene. Simply drag it back to the to Project panel from the hierarchy panel to create a prefab instance.

You can now double click the prefab instance in the Project panel to open the prefab editor. Inside the prefab editor you can now assign your materials and setup custom colliders as shown below.

Materials

Right click inside the Project window, inside your models folder, and select Create->Material. Be sure to name your material something unique.

Select the material and in the inspector set the Shader to Mercury Fallen->MF_Standard. Drag and drop your Main Color texture, BumpMap and MREM to the correct slots on the material.

Any other texture slots/values can remain with their default values.

Colliders

Colliders are generated automatically for your model, but in some instances this may not be desired or function as expected. Colliders can be created manually.

Double click your prefab to open the prefab editor.

Right click the top level of your object in the hierarchy panel and select Create Empty.

Rename the new gameobject “Collider”

Select the Collider gameobject and in the inspector click the Add Component button and choose Box Collider

Click the Edit Collider Button and adjust your collider to fit your model

Creating An Object Icon

Included with the Mod Tool is the Prefab Icon Maker. This utility can be used to generate icon sprites for your custom objects.

Open the Prefab Icon Maker under the Mercury Fallen menu.

Object Prefab

Drag and drop your model prefab from the Project panel to the Object Prefab field

Packing Tag

The packing tag is used to generate a folder to store your icons as well as the sprites packing tag for use in a sprite atlas. It is recommended that all of the icon for your mod should use the same packing tag.

Camera Preset

The camera preset drop down has a collection of default camera values used when capturing your icon.

Object/Camera Values

These sliders are used to position the object and camera when previewing/saving your icon.

Preview

Clicking the preview button will display a sample of the generated icon below the button. Be sure to adjust the Object/Camera values until the icon looks good.

Save Icon

After previewing your icon and making sure that it looks just right, click the Save Icon button to save your icon. Saved icons will be stored in the Icons/[packing tag] folder under Assets.

Assign Asset Bundle

All of the assets included in your mod will need to be assigned an asset bundle tag. This includes all models, prefabs, textures and icons. Any assets not assigned an asset bundle tag will not be exported.

Select one or more assets in the Project panel.

At the bottom of the Inspector panel select None and then New…

Enter a name for your asset bundle.

If adding new assets to an asset bundle tag you already created, then select your asset bundle tag in the list.

Exporting Your Assets

Open the Mod Tool by selecting Mercury Fallen->Mod Tool from the top menu.

You can either load an existing mod folder or create a new mod.

Load Mod
Choose an existing mod to load from the mod folder located in the UserMods folder. Select a mods folder to load.

Create Mod
This will open a prompt to create a new mod folder. Once created it will setup the mod folder in the UserMods folder. It will also setup a default modinfo.xml file and data folder for your content.

Once your mod is loaded or created you can export your content. You can also edit the mod info from here and any changes.

Click the Export Assets to export your model content.

Your exported content will be stored in the Data folder inside your mod folder. Clicking “Open Mod Folder” button will open a file browser to your mods folder.

The *.asset files should be included with your mod.

*.manifest files are also generated which do not need to be included in your final mod upload. The manifest files can be opened in a text editor and contain a list of the assets that are included in your asset bundle. The listed asset paths can be used in your mod for referencing the prefab and or any sprite files.

SteamSolo.com