Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Modding

A topic by ashtorak created Jul 01, 2022 Views: 613 Replies: 2
Viewing posts 1 to 3
(5 edits)

Mod support currently is very basic. See here for a short how to. You need to download my template project ("MODJECT" in the download section at the bottom) and open it in the same Unity version (as in file name) . Opening it may take a while. When it's done you can open the "OutdoorsScene" in the Assets folder to have the same stuff as in the video, but it's not necessary. The plane helps to align the objects above ground level. There is also a ship and raptor model as reference now.

For the moment this is mostly made for loading some models into the game. But I might do more with it later along the way.

Note: The mod files only work together with the game when it was compiled with the same unity version. So, normally the current MODJECT version will work together with the current game version. Just need to make sure to use the same Unity version as well.

The problem is that the mod files only always work together with just one game version. Wich sucks majorly. Probably have to find another way, if I want to go forward with modding. Any tips on how to load external models in a simple way are highly appreciated.

Some more technical details below:

At the start of the game it loads in all the catalogs it finds in the Data/mods-folder and extracts the item addresses from the ones that are labeled with 'Prefab' and their names and puts them into the dropdown selector. The actual game object is only loaded, when you click on 'Spawn', which may take a while and even freeze the game, if you have ray tracing active or so.

In the latest version with the label 'Raptor' or 'Ship' the prefab's contents are used to switch out the corresponding models.

It's using the addressable frame work as shown in this video. The setup is pretty much the same. The main difference is that I save the addresses in a list in the OnCompleted function:

foreach (IResourceLocation resourceLocation in locations)
{
    prefabAddressList.Add(resourceLocation.PrimaryKey);
}

then put the names in the dropdown options and spawn them this way with the number coming from the dropdown:

public AsyncOperationHandle<GameObject> spawn()
{
    return Addressables.InstantiateAsync(prefabAddressList[selectedPrefabNumber]);
}

It's a pretty simple, but effective frame work with the async stuff, when you understand how it works. Let's see how it turns out in the future :)

If you are trying this out and have any issues, please don't hesitate to contact me on Twitter or best here as a reply.

(2 edits)

The zip file with mods that can be downloaded contains the default Raptor / Starship model and an additional one each (not very detailed one though) and the so called "base" files with the following items:

  • Boar
  • Eiffel Tower
  • Raptor V1 by Alex Svan
  • Saturn V on stand
  • 100 T90 tanks (there is an old tweet somewhere on @ashtorak that explains why)