MiniGolf Maker

MiniGolf Maker

Not enough ratings
Official Course Creator Guide - Modding
By Road Turtle Games
Learn the ins and outs of creating and publishing your own mods for MiniGolf Maker!
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hello and welcome to the official guide for modding MiniGolf Maker! This guide will teach you everything you need to know about creating your own custom objects, styles, music and ambient sounds.

Modding for MiniGolf Maker is done through the Unity game engine, which is free to download. This guide will assume a basic knowledge of how to work with Unity and will not explain in detail how to use it. If you are not familiar with using Unity, there are a lot of tutorials on Youtube and Unity's Official Learn Site[learn.unity.com] to help you.
Download Unity and the Modding Package
First things first, you will need to download Unity and the official Modding package.

Download Unity
First, you need to download Unity[unity3d.com]. MiniGolf Maker is built using Unity 2021.1, so that will be the preferred version for you to use. However, I have verified that mods will work when built using the latest official version Unity 2020.3.

Download The Modding Package
Next you will need to download the modding package. This package contains all the scripts needed to build and manage your mods as well as an example mod. You can download the modding package here[cloud.roadturtlegames.com].

Create a New Project and Import the Modding Package
Finally, you will need to create a new Unity project and import the modding package. When you create your project, make sure you use the 3D Template (not High Definition RP or Universal Render Pipeline).

Once you have the project created, go to Assets > Import Package > Custom Package. Navigate to where you downloaded the modding package in the previous step and select it. Unity will display a window showing the package contents. Just click the Import button, let Unity do its thing, and you're all set!

*Note: When you import the modding package you may see errors in the console about not being able to import .blend files. This is normal.
Mod Folder Structure
Before we get into the specifics of modding we should take a look at and understand the folder structure of a mod's files. To help us we can look at the Example Mod included in the modding project:


Every mod will have a Root folder in which all of its assets are contained. For the example mod the root folder is the Example Mod folder. You generally have the freedom to organize the files and folders inside of your mod's root folder however you like, but there is one special folder that needs to be in your mod.

_Resources Folder
The folder named "_Resources" is where you will put all of the assets that contain metadata about the mod's objects, styles, music, etc. This folder is where the game will actually look to determine what assets the mod contains. These metadata assets will contain the asset's ID, name, and any other information needed for specific types of assets. You will learn more about these assets in the upcoming sections. This folder should always be at the topmost level below the root folder.

Models, textures, sound files, and any other source assets should not be placed in the _Resources folder.

Working With Multiple Mods
It is possible to work with multiple mods in the modding project, you can simply have a root folder for each mod. However it is important that every mod be self-contained. That is, a mod's root folder should contain all assets needed for the mod to work. Currently, having mods share assets or depend on other mods is not officially supported.
MiniGolf Maker Mod Manager
The MiniGolf Maker Mod Manager is the main hub where you manage and build your mods.

To open the mod manager window, navigate to Window > MiniGolf Maker Mod Manager.



Creating Mods
To create a new mod, click the Create New Mod button in the top left. You will be prompted to choose or create the root folder of your mod. You can select an empty folder.

When you confirm the selected root folder, a new mod will appear in the mod list and the folder will be populated with some example folders, including the _Resources folder.

IMPORTANT: Changes you make in the Mod Manager will not be saved until you click the Save Mods button.

Clicking the Add Existing Mod will add a new mod without creating any folders. You can also drag-and-drop folders onto the mod manager window, and a mod will be created for it.

Mod Info
  • ID - An automatically generated unique ID for this mod. This ID will be different for every single mod.
  • Mod Name - A name you can give your mod that will be shown in the Course Creator (you can choose a different name when you upload to the Steam Workshop).
  • Root Folder - The folder that contains all of this mod's content. You can change this by using the Change Root button.
  • Contents - This will show you all of the content in the mod.

Remove Mod
To remove a mod from the mod manager, click the Remove button. This will not delete the mod's assets from your project. You must click the Save Mods button to save.
Creating Custom Objects
To start you will have to have some models that you would like to use. Unity is very flexible and can import many types of models, so as long as it works in Unity, it will work with MiniGolf Maker. Similarly, you can import whatever textures you need in whatever format you like as long as Unity supports it.

Create Prefab(s)
You will need to create prefabs for your models, and assign materials, create colliders, etc. for the prefab. Just make sure that the prefab is saved within the correct mod's root folder.

Create Course Creator Prefab(s)
Now is where MiniGolf Maker's mod tools come in. Once you have your prefabs set up, you will need to create the metadata asset MiniGolf Maker needs to be able to see and categorize your custom object. You can create a Course Creator Prefab using 2 different methods:

The Manual Way
Right click in the Project view and navigate to Create > MiniGolf Maker > Course Creator Prefab. Alternatively you can use the Assets menu in the top toolbar.

This will create new asset in the selected folder.


Course Creator Prefabs have a few properties:
  • Prefab ID - A globally unique ID for this prefab. It is recommended that this be a GUID string, which you can generate here[www.guidgenerator.com].
  • Prefab Game Object - A reference to the prefab you created earlier.
  • Name - The prefab's name that will be shown in the Course Creator.
  • Category - The category this object will appear under.
  • Theme - The theme this object is a part of, if any. This is used for filtering the Course Creator's object list.
  • Tags - Any applicable tags for this object. You can select as many tags as you like. Note that tags are only applicable for certain categories. The category a tag corresponds to is denoted by the first part of the tag name (e.g. "Greens_", "Props_", etc.)
  • Subcategory - The subcategory this object will appear under.
  • Thumbnail Position Offset - An optional position offset to apply to the object when generating the thumbnail for it. This is useful if the object appears to be inside of the floor in the thumbnail image.
  • Thumbnail Distance Modifier - An optional value to increase or decrease the camera distance in the thumbnail. A value of 0 means there will be no modifier. A value < 1 will move the camera closer and a value > 1 will move the camera further away.

When you create a Course Creator Prefab this way, all fields will be empty.

The Easier Way
An easier way to create a Course Creator Prefab is to select the prefab(s) in either the Hierarchy or Project view and right-click and navigate to MiniGolf Maker > Create Prefabs From Selection in the context menu.

If you have selected objects that are not already prefabs, you will be prompted to create prefabs from them and select the folder they will be saved in. You will then be prompted to choose the folder to save the new Course Creator Prefabs in (Make sure you create them inside of your mod's _Resources folder!). The newly created prefabs will have an automatically generated ID, name, and will be linked to the prefab object.
Creating Custom Green Styles
First lets go ahead and create the green style asset that will be put into the _Resources folder.

Right click in the Project view and navigate to Create > MiniGolf Maker > Styles > Green Style. Alternatively you can use the Assets menu in the top toolbar. Again, make sure you put this asset in the _Resources folder.


Green Styles have a few properties:
  • Style ID - A globally unique ID for this style. It is recommended that this be a GUID string, which you can generate here[www.guidgenerator.com].
  • Style Name - The style name that will be shown in the Course Creator.
  • Base Material - The Unity Material that the green style will use.
  • Physics - An asset for holding the various physics settings for the green style.

Create the Green Material
Next you will need to create the Material that your green style will use. This material must use the MiniGolf Maker/Greens shader included with the mod tools. This shader very closely matches Unity's Standard shader. You can set up this material with any textures you like.



Create the Green Style Physics
Finally, you can create special green physics for your green style. This is not strictly necessary; If you do not create your own physics asset the default green physics will be used.

To create a new green style physics asset, right click in the Project view and navigate to Create > MiniGolf Maker > Styles > Green Style Physics. Alternatively you can use the Assets menu in the top toolbar.


Green Style Physics have the following properties:
  • Physics ID - A globally unique ID for this asset. It is recommended that this be a GUID string, which you can generate here[www.guidgenerator.com].
  • Surface Type - Whether the green is Hard or Soft. Used for playing the appropriate ball sounds.
  • Physic Material - The Unity Physic Material that the green style will use.
  • Base Drag - The base amount of drag applied to the ball when it is rolling on the green.
  • Deceleration - An extra amount of drag applied to the ball when it is rolling on the green.
  • Slope Threshold - How sensitive the ball is to slopes. Higher values mean the ball can come to a complete stop on steeper slopes. Lower values will cause the ball to keep rolling on shallow slopes.
  • Slow Down Threshold - Once the ball's speed goes below this value, it will begin to more quickly slow down based on the Slow Down Speed.
  • Slow Down Speed - How quickly the ball will slow down once it's speed goes below the Slow Down Threshold.
Creating Custom Flag Styles
First you will need to create the flag style asset to put into your mod's _Resources folder. To create the flag style asset navigate to Create > MiniGolf Maker > Styles > Flag Style.


Flag styles only have a few properties:
  • Style ID - A globally unique ID for this style. It is recommended that this be a GUID string, which you can generate here[www.guidgenerator.com].
  • Style Name - The style name that will be shown in the Course Creator.
  • Flag Prefab - The prefab that will be used for this flag style. This needs to be a FlagStylePrefab object.

Creating a Flag Style Prefab
Flag styles require a special type of prefab to be used. You can find an example of this prefab in the Example Mod. To add the flag style prefab component to your object, go to Add Component > MiniGolf Maker > Styles > Flag Style Prefab.


The flag style prefab has 3 properties:
  • Colorable Renderer - The object that will be colored based on the flag style color in the Course Creator. Usually this will be the actual flag object.
  • Flagpole Object - The object that contains the flagpole. This object and its children will be hidden on holes not currently being played on.
  • Hole Radius - The radius of the cup. This is used when generating the green around the flagpole. Make sure this exactly matches the radius of your cup model or you may see a gap between the green and the cup.

The Example Mod includes .blend files for the flagpole and cup models and also the flag shape models. You can use these as a reference if you are creating custom models for flag styles.
Adding Custom Music
Creating custom music is very simple. Like with creating custom prefabs, there are 2 ways you can create a custom music asset:

The Manual Way
Right click in the Project view and navigate to Create > MiniGolf Maker > Course Creator Music. Alternatively you can use the Assets menu in the top toolbar.


Course Creator Music has a few properties:
  • TrackID - A globally unique ID for the music. It is recommended that this be a GUID string, which you can generate here[www.guidgenerator.com].
  • Track Name - The music's name that will be shown in the Course Creator.
  • Category - The category the music will appear under.
  • Audio Clip - The Audio Clip asset associated with this music.

When you create a Course Creator Music asset this way, all fields will be empty.

The Easier Way
The easier way is to select the audio clip(s) in Project view and right-click and navigate to MiniGolf Maker > Create Music From Selection in the context menu.

You will be prompted to choose the folder to save the new Course Creator Music assets in (Make sure you create them inside of your mod's _Resources folder!). The newly created music assets will have an automatically generated ID, name, and will be linked to the appropriate audio clip asset.
Adding Custom Ambient Sounds
Creating custom ambient sounds is exactly the same process as creating custom music.

The Manual Way
Right click in the Project view and navigate to Create > MiniGolf Maker > Environment > Environment Ambient Sound. Alternatively you can use the Assets menu in the top toolbar.


Ambient sounds have only a few properties:
  • Sound Name - The ambient sound name that will be shown in the Course Creator.
  • Sound ID - A globally unique ID for the ambient sound. It is recommended that this be a GUID string, which you can generate here[www.guidgenerator.com].
  • Audio Clip - The Audio Clip asset associated with this ambient sound.

When you create an ambient sound asset this way, all fields will be empty.

The Easier Way
The easier way is to select the audio clips(s) in Project view and right-click and navigate to MiniGolf Maker > Environment > Create Ambient Sound From Selection in the context menu.

You will be prompted to choose the folder to save the new assets in (Make sure you create them inside of your mod's _Resources folder!). The newly created ambient sound assets will have an automatically generated ID, name, and will be linked to the appropriate audio clip asset.
Building Your Mod
Building your mods is done from the MiniGolf Maker Mod Manager explained in an earlier section.



To build a mod, you can either click the Build button for each individual mod, or you can click the Build All Mods button to build all mods in the list. Messages will be logged to the console to let you know if the build succeeded. The build process may take several minutes depending on the size of your mod(s).

Local Mods Folder
Mods you build with the mod manager will automatically be put in the My Documents\My Games\MiniGolf Maker\Mods folder.

All you have to do is start the game and your mods will be loaded from this folder.
Publishing Your Mod
Now that you've got your mod all set up, it's time to publish it.

Publishing is done from inside MiniGolf Maker by going to the Course Creator and selecting Manage Mods.


Here you will see all of your local mods. Mods that have already been uploaded to the Workshop will have an indicator on the right-hand side. You can click the cloud icon to publish, or click the trash can icon to delete the mod.


Publishing a mod is pretty much the same as publishing a course. You can set the workshop name, the description, change notes, and visibility of the workshop item. You can also upload a preview image that other players will see when browsing the workshop.
Using Mods in Courses
Finally it's time to actually use your mods in a course! The good news is that you don't have to do anything special here. Your modded content will appear in the appropriate place (the object list, styles window, music window, etc.) and you can use them just as you would the built-in content.

Publishing a Course With Mods
When it comes time to publish your course, however, you may have to do some extra steps before you can actually upload your course to the workshop.

Mods must be uploaded to the workshop before you can publish a course that uses them. This ensures that whenever someone wants to subscribe to or download a course, they will get all of the mods the course uses too.

On bottom right of the publish course menu you will see the View Used Mods button:



When you click this it will open up a list that shows all of the mods that the course uses:



Mods with the warning indicator have not been uploaded to the workshop and will prevent you from publishing your course. You can click on the cloud icon to publish these mods. Once all mods have been published you can publish your course.

MiniGolf Maker will automatically set your mod workshop items as dependencies of the course workshop item (so players will be prompted to subscribe to the mods when subscribing to the course), but it is still a good idea to double-check that the dependencies have been set up correctly. Required mods will show on the right-hand side of the course's workshop page below the owner controls.