You can visit here: https://reality-viewer.arweave.net/#/R4hLJ50NtQlheNFyEM6IvjwsIEi4-Ty8psSXlXfJSx0
This is a SuperLlama Bazaar Reality World in which there are several entities and customised worlds.
- SuperLlamas: Llamas with access to Real World Data using 0rbit.
- Atomic SuperLlamas: Every SuperLLama is an Atomic Asset and can only be accessed if the user owns it.
- Custom Worlds: Token Gated Worlds based on specific assets users can buy.
- Atomic Assets with Roles: Users can buy Music Allowance Atomic Asset to change the Background Music of the exclusive Big Table world.
- Custom Music: Users can set background music for an exclusive world if they own a specific atomic asset.
Process | Process Id |
---|---|
superLlamaBazaar | R4hLJ50NtQlheNFyEM6IvjwsIEi4-Ty8psSXlXfJSx0 |
bazaarCashier | aBSSTYd9CppyC5Udqb8GB-z4fCNyaNfXphgKeLNMZMI |
bazaarShopKeeper | CRZG8-73qdn8Nhxo4tRaDu9bnc40jMQ-CL2ciR1EaLI |
bazaarSuperLlamaSpawanning | REany43kMRpz7zZN4w2YoOqCCCXB9ZGKEjHsX9TXy30 |
standardSuperLlama | mydYOu9rRkK61bc0tU_mMlIurqoaP_erSQL-sNBdkFI |
priceFeedSuperLlama | 3Q28ws1uvhw8GpDOLup9aICIEc4G2BO9Un3nKiEHgzs |
musicAllowance | 32UGDRE6gw_GlKz-CcSfngGjppERFWs4Y2unJfDG-hI |
musicAllowanceRegistry | uvAJIfSMKCRgQ4q5jvquxLfHlXCBuYmdDbTTf6chNW4 |
bazaarDJ | Wsdc03LL22HNYmFjuOK07GE0h9cWC6uzGhYza-7rdhk |
bigTable | XPj6VGx6iKUSTdm9XKqp3JQ4HpjvXX7kHYW3D_PxqtU |
bigTableGuy | K6Ibj9ELAV0DF6AH-GXTtqCpmttmiRp-hZj2R1E1xZA |
bazaarBigTable | fNHqW6rghEbFZcn1p7k-vB4rqaGnLsjeyjrkkKxRhLI |
- Run AOS in
world
folder.aos superLlamaBazaar --module=ghSkge2sIUD_F00ym5sEimC63BDBuBrq4b5OcwxOjiw
- Save the process Id somewhere for future reference.
- Load
Reality.lua
,World.lua
, andChat.lua
.load Reality.lua .load World.lua .load Chat.lua
- Add this process's ID to https://reality-viewer.arweave.net/ and connect using a temporary wallet.
Congratulations you've ran your own world !
- Run AOS in
entities
folder. - Save the process Id somewhere for future reference.
- Set the
CHAT_TARGET
to your World Id you created. - Set the
POINTS_TOKEN
andPOINTS_TOKEN_DENOMINATION
to which ever token you are interested to get paid in. - Load
Cashier.lua
.load Cashier.lua
- Run AOS in
entities
folder. - Save the process Id somewhere for future reference.
- Set the
CHAT_TARGET
to your World Id you created. - Set the
CASHIER
to your Cashier Entitiy you created. - Load
Shopkeeper.lua
.load Shopkeeper.lua
- Change the Shopkeeper Process Id.
- Change the Cashier Process Id.
- Load
World.lua
.load World.lua
- Refresh your browser.
Congratulations! You now have two world entities.
This is a like a work around way to create Atomic Assets which can show up on Bazaar.
- Run AOS in the
atomic-assets
folder. - Save the process Id somewhere for future reference.
- Change the
Name
in theATOMIC_ASSET_STANDARD
to your SuperLlama's name. - Load the
aa-spawn.lua
.load aa-spawn.lua
- Send a message to the above Spawnning Process with the title for the Atomic Asset.
Send({Target = "<AA-Spawn>", Action ="CreateAA", Title = "Check"})
- Save the Atomic Process Id for future reference.
- Open your editor in AOS
.editor
- Create a message to the above Spawnning Process with the Atomic Asset Process Id and Lua Code.
Send({Target = "<AA-SPAWNSEnd>", Action = "AddSuperLlama", Child ="<ATOMIC_ASSET_ID>", Data=[[<YOUR SUPERLLAMA CODE>]]})
NOTE: You can use one of SuperLlama Code in
entities/superllamas
Congratulations! You have created an Atomic SuperLlama (Entity)
This is same like adding entities plus transferring the ownership of Atomic SuperLlama to Cashier so users can buy the Atomic SuperLlama to access it in your world.
- You need to add the
enum
in schema to present users the option to buy the Atomic SuperLlama.schema = json.encode({ BuySuperLlamas = { Title = "gm gm gm!!!", Description = "Select the Super Llama you want to buy.", Schema = { Tags = { type = "object", required = { "Bots", "Action" }, properties = { Bots = { title = "Select SuperLlama", type = "string", -- Add the Atomic SuperLlama here like "PriceFeed" enum = { "Standard", "PriceFeed" } }, Action = { type = "string", const = "BuySuperLlama" } } } } } })
- Load
Shopkeeper.lua
.load Shopkeeper.lua
- You need to add your Atomic SuperLlamas in the
SUPER_LLAMAS
table so that cashier can send the price to pay and the ownership to the user.-- Add the SuperLlama here with thier Atomic Asset Process ID and Price user need to pay for 1 Unit SUPER_LLAMAS = { Standard = { id = '<ATOMIC_ASSET_ID>', price = 5 }, PriceFeed = { id = '<ATOMIC_ASSET_ID>', price = 10 } }
- Load
Cashier.lua
.load Cashier.lua
In this you can add your own type of Entity or can add a PriceFeed SuperLlama like I will doing here.
- Change the Process Id of Price SuperLlama to your
ATOMIC_ASSET_ID
-- Change the Price SuperLlama Process ID ['<ATOMIC_ASSET_ID>'] = { Position = { 9, 8 }, Type = 'Avatar', Metadata = { DisplayName = 'Price SuperLlama', SkinNumber = 3, Interaction = { Type = 'SchemaForm', Id = 'PriceFeed' }, }, },
- Load the World
.load World.lua
We will be trasnfering ownership of the Atomic SuperLlama from your Spawnning Process to Cashier Process.
We are doing this so that Cashier will transfer ownership to user upon successful purchase and enabling users to interact with the Atomic SuperLLama.
Send Transfer
message From
your Spawnning Process to Atomic SuperLlam Process with Cashier as Recipient
Send({Target = ao.id, Action = "TransferOwnership", Child = "<ATOMIC_ASSET_ID>", Recipient = "<CASHIER_PROCESS_ID>"})
Congrats now your user will only be able to interact with your ATOMIC SuperLlama if they have ownership of it, and to buy they will need to request Shopkeeper and pay Cashier.
In this world, you can found a custom music already set. Also, you can provide an option to users to set Custom BGM.
RealityParameters = {
...
['Audio-0'] = {
Bgm = {
Type = 'Fixed',
Format = 'WEBM',
-- Set your custom music Arweave TxId
TxId = 'HxfGWmXJu9WB0ICCFEtvkpbFxDiJwXWV6P9dABJiOQA',
}
}
}
Handlers.add(
'Reality.UpdateParameters',
'UpdateAudio',
function(msg)
local audioId = msg.AudioId
RealityParameters['Audio-0'].Bgm.TxId = audioId
print('Updated audio to ' .. audioId)
end
)
Congrats! You will be able to change your World BGM.
Provide an option to change BGM to users who are holding a particular Atomic Asset.
The holders of this Music Allowance Atomic Asset will be able to change the BGM of the world.
- Go to Bazaar
- Create your profile. (This is one time thing)
- Click on Create from the Navigation Bar.
- You will be redirected to Helix.
- Click on Upload
- Click on Atomic Assets on top right.
- Upload any image of your choice.
- Give it a Title and Description.
- Select the License
- Then click on Upload.
- Go back to your Bazaar Profile, you will see your recently created Atomic Asset, click on it.
- Copy the Transaction Id, save it as it's your Music Allowance Atomic Asset's Process Id.
This entity will transfer Music Allowance Atomic Asset to the user in exchange of $PNTS tokens.
- Run AOS in
entities
- Save the Process Id for future reference.
- Change the process of Music Allowance Atomic Asset
-- Change the Music Allowance Process Id MUSIC_ALLOWANCE = "soTvSG4rCfZIUq5G43REP0CaGebjbiaRB7Dv2wrX5dY"
- Load the
MusicAllowanceRegistry.lua
.load MusicAllowanceRegistry.lua
This entity will change the World's BGM on user's request who holds Music Allowance Atomic Asset. Upon selecting the music user will need to pay some more $PNTS to change the music.
- Run AOS in
entities/bigTable
- Save the Process Id for future reference.
- Change the process of Music Allowance Atomic Asset
-- Change the Music Allowance Process Id MUSIC_ALLOWANCE = "soTvSG4rCfZIUq5G43REP0CaGebjbiaRB7Dv2wrX5dY"
- Change or Add the Music Ids and Titles
-- Change or add the Music Ids and Titles MUSIC = { Skyfall = { id = 'bsC6CNeAKTqllbDW1gL3P2u7ooOvSsTyHmlwq7Oc7y0' }, VivaLaVida = { id = 'bKCIjUaUCUjq0a0llpd5P3dbFOfNrbk2AVAg-bt4VbM' }, Fairytale = { id = '9ccU_xsAhpw4j6K26E5qneI8bi62iKVgF-sipOQY6ME' }, FeelingGood = { id = 'Z2EGtSXorgDB-R7K0MEp3SSGKkGSZZUJq1ITSjuYHZc' }, }
- Add titles in
enum
inserveSchema
function.Schema = { Tags = { type = "object", required = { "Recipient", "Action", "Music" }, properties = { Recipient = { type = "string", const = ao.id }, Action = { type = "string", const = "SetMusic" }, Music = { type = "string", title = "Select Music", -- Add titles here. enum = { "Skyfall", "VivaLaVida", "Fairytale", "FeelingGood" } } } } }
- Load
DJ.lua
.load DJ.lua
We need to transfer the ownership of Music Allowance Atomic Asset we created here to Music Allowance Registry we created in Step 4, so that Registry can sell the ownership to users giving them access to DJ we created in Step 5.
- Head to your Music Allowance Atomic Asset on Bazaar.
- Select the Transfer option.
- Enter Quantity you want to transfer (eg. 20)
- Enter the DJ's Process ID as Recipient address.
- Click on Transfer and sign the transactions.
Congratulations! Now users will be able to change the Background Music of you world after buying the Music Allowance Atomic Asset.
Follow the steps mentioned in here.
Here's mine.
This entity will be used to interact when the user is not the owner of Atomic Asset and would like to buy ownership.
- Run AOS in
entities/bigTable
aos bigTableGuy
- Edit
entities/bigTable/BigTableGuy.lua
You will need to change theBIG_TABLE
process Id to the Atomic Asset process Id you created above.-- Change this to the Atomic Asset used for Token Gating. BIG_TABLE = 'XPj6VGx6iKUSTdm9XKqp3JQ4HpjvXX7kHYW3D_PxqtU'
- Load
BigTableGuy.lua
.load BigTableGuy.lua
In this world we will need to edit Reality.lua
and World.lua
standard contract to make it token gated world.
- Run AOS in
world/BigTable
folder.We have started aaos AnotherWorld --module=ghSkge2sIUD_F00ym5sEimC63BDBuBrq4b5OcwxOjiw --cron 10-seconds
CRON
message here so that it will update the owners ofBIG_TABLE
Atomic Asset inBIG_TABLE_MEMBERS
every 10 seconds. - Save the process id for future reference.
- Edit the
BIG_TABLE
inBigTable.lua
-- Change this to your Atomic Asset for Token Gating. BIG_TABLE = 'XPj6VGx6iKUSTdm9XKqp3JQ4HpjvXX7kHYW3D_PxqtU'
- Edit the
BigTableWorld.lua
You need to change theBIG_TABLE_GUY
to the process id of the entity you created above.-- Change this to the process id of your entity. BIG_TABBLE_GUY = 'QI_YZ5ff5RYgzkkB9SsF76zpy3ZHYzroyAY-pdEDuTo'
- Load
BigTable.lua
,BigTableChat.lua
andBigTableWorld.lua
.load BigTable.lua .load BigTableWorld.lua .load BigTableChat.lua
- Update
CHAT_TARGET
inentities/bigTable/BigTableGuy.lua
to the process Id we just created fro BIG_TABLE world.-- Change this to the Chat Target for Big Table World CHAT_TARGET = 'fNHqW6rghEbFZcn1p7k-vB4rqaGnLsjeyjrkkKxRhLI'
- Load
BigTableGuy.lua
.load BigTableGuy.lua
So, this will create a world which will sending its Reality.Parameters
and Reality.EntitiesStatic
based on the condition check if the user is the owner of the Atomic Asset or not.
We need to connect the Main World to the New World so that user can travel back and forth.
- Edit
World.lua
Change theBig Table
entity to the process Id of the world created above.'-- Change the Big Table Process ID ['TQKAOPuE5OKZUBNBBxUKqSCG6qkft45F2ju9IvZSK-Y'] = { Position = { 14.6, 5.5 }, Type = 'Unknown', Metadata = { DisplayName = 'Big Table', Interaction = { Type = 'Warp', Size = { 2, 2 }, }, }, }
- Load
World.lua
.load World.lua
Congrats! Now your user can travel from one world to another if they hold some particular Atomic Asset.
If you have any queries, DM me on Twitter 🫡