Comment on page
Create a Rental Asset
In this guide we will be creating a Rental Asset and implementing it in a game. You can find other guides that explain how to create other types of Assets in the Working with Assets section in the How-to guides of the LootLocker documentation.
The Rental Complexity adds the ability to create time-based Assets that grant specific Assets which expire after a certain amount of time.
The Rental Complexity adds the ability to create an Asset that grants specific Assets which expire after a certain amount of time. The Rental Complexity is split across two tabs, Rental Content and Rental Tiers. In Rental Content, you can define the specific Assets that are granted while the Rental Asset is active. In Rental Tiers, you can define the duration of the Asset. This tab also allows you to define variations of the duration in case you want to have the same Asset with different rental durations.
Before you create the Asset, you will want to configure a Rental Asset Context, so that LootLocker know what and how you plan on using the Asset in your game.
An Asset Context is a way to group and describe Assets. All Assets must be assigned an Asset Context when being created. Defining the Context of an Asset lets your game know what type of Asset it is, and lets LootLocker know what sort of information or logic will be stored in the Asset and any special relationships it should have, for example with Character Classes and Default Loadouts.
The Context Configuration menu can be found in the Game Settings menu by clicking the
Settingsicon on the left bar of the Management Interface.
Click on the
Context Configurationtab at the top of the Game Settings menu. You should be taken to a menu that looks like this.
You will notice that there is already one context configured, Feature Unlocks. This is by design as this type of Context needs to exist by default in case it is used to unlock other Contexts.
To create a new Context, click the
Add Contextbutton. As we want to create a Rental Asset, select
Rental Assetfrom the Complexity dropdown menu.
- Name: Rental
- Friendly Name: (can leave this blank if the Friendly Name is the same as the Name)
- Detachable?: No
- User Facing?: Yes
- Depends On: Independent (No Asset)
Save Contextsto save this Context. It should now look like this:
You've now set up the Rental Asset Context and are ready to create a Rental Asset!
Now lets navigate to the Asset Manager to create the Rental Asset. The Asset Manager can be accessed by clicking the
Contentbutton of the side bar and selecting
To create an Asset, click the
Add Assetbutton in the top right corner of the Asset Manager. Fill in an Asset Name and select the
RentalContext from the drop down menu. Click
Createto create the Asset.
Once the Asset has been created, you will be taken to the Asset's page where you can see all of it's stored information and data. The most important fields when setting up a Rental Asset are in the
Rental Tierstabs at the top of the Asset's page. This is where we will define the content of the Rental Asset and define the different rental periods available in the game.
To start, we will first navigate to the Rental Content tab and click
Add an Assetto add an Asset to this Rental Asset. These are the actual Assets that will be temporarily added o your player's inventory when they own an active Rental Asset.
Next, we will create two rental tiers by navigating to the Rental Tiers tab and clicking
Add Rental Tier. Each rental tier requires the following information:
- Name: The name of this specific tier, which will be displayed in-game
- Duration: Enter a number and select a corresponding period (Seconds, Minutes, Hours, Days, etc)
- Price: (Optional) Price in case the Asset is to be sold in-game
- Sales Price: (Optional) Discount price for the Asset
For the first rental tier we will set a duration of
20 Secondsand for the second rental tier we will create a duration of
2 Minutes. We will not set a Price or Sales Price for this Asset in this tutorial. With everything set up, your rental tiers should look like this:
The final step is to activate the Asset so that it is sent to the game and players can access the Asset. To do this, click the
Activatebutton on the right side of the Asset menu. Clicking Activate will automatically Activate and save any changes you have made to the Asset.
All of the work we've done so far has been in the Stage Environment of LootLocker - where you can make changes to Assets and settings and easily test those changes before sending them to the Live Environment for your players to see in their game. While we usually suggest testing all changes against the Stage Environment first, for the purpose of this tutorial we will push the new Asset to the Live Environment and test it there.
To merge the Rental Asset into the Live Environment, click the
Review Changesbutton in the side bar of the Management Console.
This will take you to the Differences screen where you can see all the differences between the Stage and Live Environments of your data in LootLocker. To calculate these differences you will need to switch to the Live Environment by clicking the
Switch to Livebutton on this screen. This will automatically switch you to the Live Environment and calculate the differences between the two states. You will be taken to a screen that looks like this:
Since we want to push both the new Asset and the new Context information we will tick the boxes next to both entries and then select
Push Selected to Live. In the confirmation modal that appears, click
Mergeto merge the changes into the Live Environment.
Congratulations, you have now created a Rental Asset and merged it into the Live Environment - ready to be sent to your game!