Skip to main content

Setup a Schema

Not Released

PlayMakers is not currently released for productive usage. The material below is a preview reference.

Please contact us to get started.

What is a contribution schema ?

A schema is a json-type file that we came up with so that a studio can list every component that they deem necessary to check a submission.

You may also want your schema to include some rules, namely a set of technical and artistic specifications wrapping up all the demands that a text, an image, or even a mesh file should have. This way, their contribution should be game-compliant. Among others, a rule can check whether the text is of a specific length, whether an image has a transparent background, ...

note

A rule can sometimes propose corrections, in the case where creators' assets/inputs didn't meet with its requirements. For example, the transparent background rule can remove the background from a submitted image if it has one. Among others, this newly created image can be found in the exported archive.

We implemented an interactive way to set up schemas, using Blocky Tools. By describing json content, these allow you to define samples of blocks and assemble them in regard of a certain logic.

Guide to set up your schema using PlayMakers Editor

Here you are, making your first steps on your Studio Dashboard, way to go! As you may want to set up schemas, you can follow this non-exhaustive guide to help you to do so.

After clicking on the schemas tab, a default page, explaining what a rule is, is browsed for your first coming. Once you’ve read everything, you can select “Got it!”

Studio Dashboard's schema tab page for newcomers

Then, select “Add new schema”

Studio Dashboard's schema tab page

From now on, you have two possibilities.

Automatic setup

The first one is dashed in red, only by way of illustration. A schema is automatically set up after having provided a few fiiles. Once PlayMakers’ technology is finished carrying out an automatic detection of rules that your asset(s) may contain. If you wish it so, you can edit these rules later.

Studio Dashboard's automatic preset in schema tab

Manual setup

Another possibility, where you don't have to provide any content, is to manually set up your schema. As a starting point, this will pop up a preset with our recommended rules for a given type. You can then add other rules on top that you deem relevant. This second possibility offers you more leverage over your demands and creativity.

Studio Dashboard's manual preset in schema tab

The dashed tab refers to the types of schemas you can work on. Note that selecting one type at this point doesn’t prevent you in any case from including other types of schemas in your work later. The option Empty allows you to build a schema from scratch.

Studio Dashboard's preset of schema blocks

Studio Dashboard's PlayMakers Editor

Of course, PlayMakers Editor is not the only way to set up a schema, even though it is more user-friendly! Indeed, you can directly write json content if you wish it so. Note that PlayMakers’ technology automatically translates the latter into assembled schema blocks in PlayMakers Editor and so does it the other way around.

Studio Dashboard's json tab in the schema-rules tab

caution

Be careful, as long as Studio Dashboard is not saying that your work is saved, switching tab will lose progress.

You can see on your left a tooltip listing all the required elements to build a schema. The tab Object lists specific ready-to-use schema blocks. Let's select the SchemaImage block highlighted in red. Simply drag it to the workspace and drop it.

You can add several elements to an object:

  • a label, which is the name you wish to give to the object
  • a comment, explaining the purpose of the object for example
  • a crossed box to make the object optional
  • keys, that expect an input from the user (text, image, number,...). A key takes as entries:
    • a name
    • their type
    • an optional comment, describing the purpose of the key for example
  • other schemas in the section Sub, that are then called subschemas or children.
  • rules :
    • in the section Store that can be used to create dependencies with a parent. Such rules can be called outside their child object by reference
    • in the section Rules. Such rules can only be called within their object

Studio Dashboard's Object tab in PlayMakers Editor

note

You can throw out this schema block either by dragging it to the dustbin located at the bottom-right of the workspace and then dropping it or by pressing DEL on the keyboard.

Interactive SchemaImage without its key

For a SchemaImage, if you plan on using only one key, meaning that you want the creators to submit only one image, you can avoid dragging & dropping a key as we already included one in the SchemaImage's definition. You may hold concurrently as many keys as images you plan on receiving. Don't forget to give your keys different names!

tip

A rule of thumb is to always put a key, being predefined or not, (and the right one, corresponding to its schema type) so that you are sure that the schema block has indeed at least one key.

Interactive SchemaImage with its key

Now, you may want your schema to check for some properties of a contribution.

Simply go to the tab Rule and choose, among the right sub-tab(s), the rule(s) you wish to apply. Drag it to the corresponding part of the schema block and drop it. In our case, having a SchemaImage block, we choose a key of the same type.

Overview of the ImageRules in Studio Dashboard's schema-rules-interactive tab

Overview of the ImageRules in Studio Dashboard's schema-rules-interactive tab

A schemaImage with its ruleSize in PlayMakers Editor

Now, your schema setup has come to an end. Don’t forget that it cannot be published unless you name it! In our case, “My Asset” is the schema example’s name.

Final step to publish the project

Well done, your schema is now published and ready to receive constributions in your Makers Hub.