Freemium Mod Implementation Guide

If you have a premium mod and want to use the Freemium model, there are a couple of functions that you will want to implement within your mod.

Freemium mods will allow the mod to be installed and downloaded without requiring ownership. This will allow servers to add these freemium mods without forcing players to purchase them in order to connect. Instead the ownership checks have to be implemented by the mod author wherever they want to gate the functionality of their content to require ownership.

Enabling Freemium

If you have a premium mod, you will find in the project control panel the option to "Enable Freemium". By enabling this option users will be able to download your mod without owning it. As the mod author you will have to implement the ownership checks on features within your own mod code using the functions detailed below.

OwnsPremiumMod

This function is your primary implementation. In any area where you want to restrict access to a feature to premium ownership, Get a reference to the player controller for the player and check this function with the Project ID of your mod. It can be called on clients and servers.

ShowCustomModDeeplinkPrompt

This is a helper function that you can call to show a prompt to the user, the prompt does take input focus so be reasonable with where you implement it, otherwise a regular hud notification might be better.

If the user confirms the prompt then they will be taken out of the game and back to the main menu to go to the mod page (Similar to the option for viewing custom cosmetics applied to other players or structures.)

Editor Testing

By default OwnsPremiumMod should return true in editor. You can test both owned and unowned states using the cheat command TogglePremiumModOwnershipChecks.

This cheat should also work in the live game but a little differently. In the live game it can only disable your legitimate mod ownership status and will not give access to mods mods you don't own.