Quest Generator API
Generate customizable quests for your game
For a more detailed guide, click here
Quick Start Guide

Quest Generator selects the perfect quest option from the ones available in your game tailored the player’s personality, goal or anything else! This in an API service and it works in two stages. To explain, We will use this simple quest system

Preparing Data

Lets use some sample quest data to use this api

Target

Deathclaw “Deathclaws are formidable reptilian creatures. They are large, agile, and incredibly strong, with razor-sharp claws capable of tearing through almost anything.”
Cazador Cazadors are large, mutated insects resembling a combination of wasps and tarantulas.
Bandits “Bandits are individuals who have turned to a life of crime and violence in the post-apocalyptic world”

Location

Hidden Valley “Hidden Valley is a secluded and heavily fortified bunker complex”
Nipton “Nipton is a small town located in the southern Mojave Wasteland. Before the Great War, it was a modest settlement known for its lottery system and thriving trade with passing caravans”
Novak “Novac is a small settlement located along the Long 15 highway in the Mojave Wasteland. It is known for its iconic dinosaur-shaped motel sign”

Target is one of the fields which for you is one of the options where a choice needs to be made to generate a quest. Location is another such field

Deathclaw is one of the options, given along with its description. This is one of the choices for the field


The description should be unique to the option for best results.

JSON

For our API, this data can be structured in JSON as

{
  "fields": {
    "target": {
      "desc": "Choose your target for this quest:",
      "data": [
        {"Deathclaw": "Deathclaws are formidable reptilian creatures. They are large, agile, and incredibly strong, with razor-sharp claws capable of tearing through almost anything."},
        {"Cazador": "Cazadors are large, mutated insects resembling a combination of wasps and tarantulas."},
        {"Bandits": "Bandits are individuals who have turned to a life of crime and violence in the post-apocalyptic world."}
      ]
    },
    "location": {
      "desc": "Select your quest's location:",
      "data": [
        {"Hidden Valley": "Hidden Valley is a secluded and heavily fortified bunker complex."},
        {"Nipton": "Nipton is a small town located in the southern Mojave Wasteland. Before the Great War, it was a modest settlement known for its lottery system and thriving trade with passing caravans."},
        {"Novac": "Novac is a small settlement located along the Long 15 highway in the Mojave Wasteland. It is known for its iconic dinosaur-shaped motel sign."}
      ]
    }
  }
}

Sending Request

https://authdev.xgaming.club/xquest/init

Provide the quest options in your game using the init endpoint [POST]

After sending the request, you should receive something like

Run in Hoppscotch
{
    "key": “abcd1234”,
    "message": "Request received, processing data in background"
}

Save this key

Quest Generation

Now to generate quest, use the generate endpoint [POST]
https://authdev.xgaming.club/xquest/generate


Provide the quest goal, and the fields that you need in JSON like this

Run in Hoppscotch
{
  "goal": "slay the strongest beast",
  "key": "065axpke",
  "fields": [
    "target",
    "location"
  ],
  "n": 1
}

The n parameter picks a random option from top n best matching options. At n=1 you get the same output every time. At n>1, you get more diverse outputs.

{
    "location": "Hidden Valley",
    "target": "Deathclaw"
}

Checking Status

Your data takes a little while to process. To check its status, use [GET]

https://authdev.xgaming.club/xquest/view_data/<key>
This returns all data for a key

Run in Hoppscotch
{
    "fields": {
        "location": {
            "data": [
                {
                    "Hidden Valley": "Hidden Valley is a secluded and heavily fortified bunker complex."
                },
               …
            ],
            "desc": "Select your quest's location:"
        },
        "target": {
		….
        }
    },
    "key": "065axpke",
    "status": true
}

If status is true, data has been processed and quests are ready to be generated

Need help? Suggestions? Feedback?
contact@xgaming.club