NFTs in Space

In recent times, NFTs are taking off in popularity. So it only makes sense that they would eventually land on the space station.

Overview

This lesson will be using Community Content to bring NFTs into the moon space station project. This will include displaying NFT art, restricting access to token owners, and rewarding chat messages.

What is an NFT?

NFT stands for non-fungible token. They are uniquely-identifiable pieces of data stored on a public blockchain. They are most commonly known for being associated with an asset such as an image or video that can be sold for a high amount of cryptocurrency. Transactions of NFTs are recorded on the blockchain and will track who the current owner is by using their crypto wallet address.

Linking a Crypto Wallet to Core

In order for Core to recognize a player’s collection of NFTs, they must first link their MetaMask account, a popular crypto wallet, to their Core account. This can be done following this tutorial.

NFT Marketplace

In Core, an NFT can be specified by a player’s MetaMask wallet, Owner Address, Contract Address, or Token ID.

The last three pieces of information are available on the OpenSea website which is a NFT marketplace and database of information about NFTs.

Adding a VIP Room

Find an area for a new VIP room. This room will be restricted to certain players and be displaying NFT art.

Duplicate the Room 01

In the Hierarchy, expand the Sci-fi Base 01 Template and select the Room 01 group. Duplicate the group by using the Ctrl + W keyboard shortcut. Rename the duplicated group to VIP Room. Position the entire group to the desired area.

Tidy the Entrance

The entrance to the VIP room should have a doorway. Use the Core Content window to find the Sci-fi Tileset objects for doorways and pillars.

Adding a VIP Access Teleporter

The doorway to the VIP room needs to block access to certain players. This will be done by using a Community Content template.

Importing the Community Content

Open the Community Content window and search for VIP Access Teleporter by Core Academy. Click the Import button.

Adding to the Scene

Open the Project Content window. Drag and drop the VIP Access Teleporter – Non-members Out template into the scene by the doorway. Position and rotate the template so the VIP barrier is in the doorway facing outwards.

Test the Project

Preview the project. If your Core account is not linked to a MetaMask wallet containing an NFT, then it should teleport you back when overlapping the barrier.

Edit the Properties

Select VIP Access Teleporter – Non-members Out template and open the Properties window. By default, the CheckContract property should be active so only players with a NFT can pass the barrier. In order to allow the creator to always pass the barrier for testing, activate the CheckNames property and set the VIP_Names property to [your Core username], Bot1, Bot2.

Test the Project

You should now be able to walk through the barrier into the VIP room.

Adding an NFT Portrait

The VIP room should have some NFT art on the walls. There is another template in Community Content that can easily show NFT art.

Importing the Community Content

Open the Community Content window and search for NFT Slideshow by Core Academy. Click the Import button.

Adding to the Scene

Open the Project Content window. Drag and drop the NFT Slideshow – Snoop CryptoPunks template into the VIP room. Position, rotate, and scale the template so it is on the wall of the VIP room.

Test the Project

Preview the project. After a moment, the NFT art should load into the portrait. The player can also interact with it to change the displayed image with a slideshow.

Edit the Properties

Select NFT Slideshow – Snoop CryptoPunks template and open the Properties window. The NFT art in the slideshow is chosen using the custom properties as filters.

Change the following custom properties to show the WVRPS collection from Snoop Dogg.

  • Set the Title custom property to Snoop WVRPS.
  • Set the ContractAddresses custom property to 0xcBC67Ea382F8a006d46EEEb7255876BeB7d7f14d.

Finding a Contract Address

A collection of NFTs shares a contract address which can be found using the OpenSea website.

Test the Project

There should now be a new NFT art being displayed.

Add More NFT Art

Fill in the VIP room with more NFT Slideshow templates. Feel free to change the custom properties to display any type of NFT you desire.

Group the NFT CC

Select the NFT Slideshow templates and VIP Access Teleporter template in the Hierarchy. Group them together by using the Ctrl + G keyboard shortcut. Name the group NFT CC.

Add Chat Rewards

The last Community Content using NFTs will be a Chat Rewards system. The player will be able to type a message in chat to receive a certain resource, which can also be restricted to VIP members.

Importing the Community Content

Open the Community Content window and search for Chat Rewards by Core Academy. Click the Import button.

Add the Template

From the Project Content window, drag and drop the Chat Rewards – GM template into the NFT CC group in the Hierarchy.

Enable Player Storage

The Chat Rewards system uses Player Storage so the resources given to the player will be persistent if they leave and return to the project.

Select the Game Settings object in the Hierarchy and open the Properties window. Activate the Enable Player Storage property.

Test the Project

Press the Play button and open the Chat window by pressing the Enter key. Then type GM into the chat.

The Chat Reward Prerequisites

If you do not have a crypto wallet with an NFT and it is not the correct time of day (5:30 to 13:30 UTC), then it will not reward the player.

Edit the Properties

Select the Chat Rewards – GM template in the Hierarchy and open the Properties window.

Change the following custom properties:

  • Set the StartTime custom property to 0:0.
  • Set the StopTime custom property to 24:0.
  • Deactivate the CheckTokens property.

Replay the Project

The player should now be able to claim the Chat Reward once per day.

Summary

This NFT VIP room is just one example of the many things Community Content can add to your metaverse. Now that you have a foundation of what Core has to offer, it’s up to you to use the tools to their full potential!

Post a comment

Leave a Comment

Scroll to Top