Import Libraries

An API will be created that will contain the functions and require libraries needed to parse the NFT metadata so the data for the map layout can be retrieved. The data we will be accessing is Base64 encoded, and has another set of data inside that is also encoded. So a little bit of work needs to be done to turn the format being used for the NFT into something the Map Builder API can read. To make this task a little easier, the provided libraries are included below and can be imported into the project.

The template includes the following libraries. Download the file and drag tit into the Editor. The script libraries will appear under **My Scripts** in the **Project Content** tab.

  • Base64
    A modified version of an open source library that works in Core that will decode the NFT string.
  • JSON
    A library that can decode a JSON string into a Lua table to make accessing properties easier.
  • SVG Parser
    A parser that has been created specifically for Crypts and Caverns NFTs that will parse SVG data into ACSII format.
Scroll to Top