Content Packs

Content packs have more commonly been used to store prefab ID’s for the helmet app MRE. This section will cover more about content packs including what they are how they are used and what benefit they can bring to MREs.

What are content packs? #

This is the RAW output of a JSON file which is messy to read but can be switched to parsed modes for easy editing.

They are a simple form of JSON files that are editable via your Altspace account. Content packs often contain information that helps an MRE configure and load up correctly. The advantage of using content packs is the ability to customise the MRE without having to implement code changes.

Although the average user wouldn’t be familiar with content packs beyond their initial purpose it is handy to know they are formatted in JSON.

JSON is a programming language that is light-weight and makes for easy data construction without relying on a database to put settings in. In Altspace these JSON content packs become ‘config’ files for MREs.

Practical uses for content packs #

Altspace has a helmet/wearable MRE app that is hosted on Altspace’s servers and the main feature of this MRE app is the ability to wear items to certain slots on your avatar. This MRE has a built-in function to accept a string in the URL of the MRE that contains a content pack ID.

Example Content Pack For Helmet App MRE #

For reference the content pack ID on Altspace for this code is: 1734289044898054585

Which means the RAW content pack is accessed via the URL: https://account.altvr.com/api/content_packs/1734289044898054585/raw

Which will give you this output of JSON. This content pack sets the name, prefabID, rotation, position and scale etc of wearables.

{
  "halo": {
    "scale": {
      "x": 0.2,
      "y": 0.2,
      "z": 0.2
    },
    "position": {
      "x": 0,
      "y": 0.3,
      "z": 0
    },
    "rotation": {
      "x": -90,
      "y": 3,
      "z": 3
    },
    "resourceId": "artifact:1734277982572249124"
  },
  "beanie": {
    "scale": {
      "x": 0.2,
      "y": 0.2,
      "z": 0.2
    },
    "position": {
      "x": 0,
      "y": 0.08,
      "z": 0
    },
    "rotation": {
      "x": -90,
      "y": 0,
      "z": 0
    },
    "resourceId": "artifact:1734278020723638325"
  },
  "beanie1": {
    "scale": {
      "x": 0.1,
      "y": 0.1,
      "z": 0.1
    },
    "position": {
      "x": 0,
      "y": 0.2,
      "z": 0
    },
    "rotation": {
      "x": -90,
      "y": 180,
      "z": 0
    },
    "resourceId": "artifact:1712630440231175141",
    "attachPoint": "left-hand"
  },
  "beerhat": {
    "scale": {
      "x": 0.275,
      "y": 0.275,
      "z": 0.275
    },
    "position": {
      "x": 0,
      "y": 0.1,
      "z": 0
    },
    "rotation": {
      "x": 0,
      "y": 0.1,
      "z": 0
    },
    "resourceId": "artifact:1734278008006508591"
  },
  "options": {
    "previewMargin": 4
  },
  "policehat": {
    "scale": {
      "x": 0.275,
      "y": 0.275,
      "z": 0.275
    },
    "position": {
      "x": 0,
      "y": 0.075,
      "z": 0
    },
    "rotation": {
      "x": -90,
      "y": 0,
      "z": 0
    },
    "resourceId": "artifact:1734277969989337116"
  },
  "firemanhat": {
    "scale": {
      "x": 0.275,
      "y": 0.275,
      "z": 0.275
    },
    "position": {
      "x": 0,
      "y": 0.15,
      "z": 0
    },
    "rotation": {
      "x": -90,
      "y": 180,
      "z": 0
    },
    "resourceId": "artifact:1734277995155161128"
  }
}

Creating a content pack #

You can create a content pack by your AltVR.com account and access content packs in the menu under ‘More’. The direct link can also be accessed here: https://account.altvr.com/content_packs

For the helmet MRE app you type helmets when prompted in the pack type. For other MRE’s including Luminosity’s MRE’s just leave it blank. Once you have created a content pack you can refer to it. This content pack is now hosted as a JSON file on Altspace’s servers.

Trying out a content pack (helmet MRE) #

You can spawn an MRE with this link and swap the X’s for your content pack ID.

wss://mres.altvr.com/helmets?content_pack=XXXXXXXXXXXXXXXXXX

For example, the Bunny ear has the MRE link: wss://mres.altvr.com/helmets?content_pack=1707919814573424688/

This means if you wanted to open up that MRE content pack the link would be: https://account.altvr.com/api/content_packs/1707919814573424688/raw

Powered by BetterDocs