SDK7 library to connect Decentraland scenes to the custom Quest System
npm install lsc-questing-dclSteps to complete. Each Step is made up of Tasks to complete.A Quest can have at least one (1) but many Steps, and each Step can have at lease one (1) but many Tasks.
- All Tasks of a Step must be completed for the Step to be completed.
- All Steps of a Quest must be completed for the Quest to be marked completed for the user.
Quest Master inside the Cyberpunk City
Install the npm package
Download and install the The Forge Decentraland package by running the following command:
``bash
npm i lsc-questing-dcl
`System Connection
ts
import {LSCQuestAction,LSCQuestConnect} from 'lsc-questing-dcl'
`$3
Parameter(s): - questId (string)
`ts
LSCQuestConnect("BhVrZ6")
`Starting a Quest
For quests that require an explicit start task, use the function below.
Parameter(s):
- questId (string)
`ts
LSCQuestStart("BhVrZ6")
`Completing Quest Action
Quests require a step and a task. Quest users will complete task(s) for each step.Parameter(s):
- questId (string)
- stepId (string)
- taskId (string)
`ts
LSCQuestAction("BhVrZ6", "7QOOkw","SV0AE")
`Quest Leaderboard Display
Decentraland creators can display a 3d leaderboard on their scene for any Quest.Parameter(s):
- questId (string)
- transform (TransformType)
- updateInterval (number)
- limit (number)
- order (string)
- sortBy (string)
- completedUsers (boolean)
- showBackground (boolean)
- title (string)
`ts
LSCQuestLeaderboard(
"WDepF5" //questId
{
position: Vector3.create(8,5,14),
rotation: Quaternion.fromEulerDegrees(0,0,0),
scale: Vector3.create(1,1,1)
}, //Transform of the leaderboard position in worlda
5, // updateInterval in seconds
10, // limit of users to show
'asc', // order 'asc' or 'desc'
'elapsedTime', // sortBy 'elapsedTime' 'progress'
true, // completed users only
true, // showBackground
"Egg Hunt 2025" // title
)
`Quest Testing Locally
To test your scene setup locally, you must call this function BEFORE connecting to your quest. This will tell our server to allow the quest creator to connect to the quest system without failing authentication.Parameter(s):
- localUser (boolean)
`ts
LSCQuestLocalCreator(true)
``