# Licence and credit

The SDK is free, for free and paid games alike. The condition is the credit "Powered by 360sona", and the avatar
items stay Microsoft's and its partners'. The [Developer Terms](https://360sona.com/devterms.html) and the SDK Licence in your
download (`LICENSE.txt`) are the rules; this page is how they apply in code.

## What it costs

Nothing. There are no paid tiers, no trial limits and no revenue share. App ids are free.

## The credit

Show "Powered by 360sona", linking to https://360sona.com, where your users see the avatars. The SDK does it for
you:

| Where | What the SDK does | To move or replace it |
|---|---|---|
| `sona_draw`, `sona_snapshot` | Draws the badge in a corner of the frame | `sona_draw_options.credit_corner`; `SONA_DRAW_NO_CREDIT` turns it off |
| The web Renderer SDK | Draws the same badge over the canvas | `credit: false` |
| Unity, Godot, Unreal | `SonaCredit`, the addon's and the plugin's badge | Each component's own switch |
| Exported files (PNG, GLB, VRM, FBX) | Writes the credit into the file's metadata | Leave it there |
| Sprite sheet frames | No badge on a frame | Show the credit in the game |

If you turn the badge off, put the line in your credits, about page or store page. To draw the badge yourself, in
your own UI:

```c
sona_credit credit;
if (sona_credit_get(ctx, 1, &credit) == SONA_OK) {
  /* credit.rgba is credit.width x credit.height pixels; link it to credit.url */
}
```

```cpp
sona_credit credit;
if (ctx.credit(1, credit) == SONA_OK) {
  // credit.rgba is credit.width x credit.height pixels; link it to credit.url
}
```

```csharp
var credit = ctx.GetCredit(1);
// credit.Rgba is credit.Width x credit.Height pixels; link it to credit.Url
```

```rust
let credit = ctx.credit(1)?;
// credit.rgba is credit.width x credit.height pixels; link it to credit.url
```

```python
credit = ctx.credit(1)
# credit["rgba"] is credit["width"] x credit["height"] pixels; link it to credit["url"]
```

The second argument is the scale: one, two or three times the badge's size. The wording is always "Powered by 360sona".

## What you may do

| You may | You may not |
|---|---|
| Ship the SDK in a free or paid game or app | Sell avatar items, or put them in paid content |
| Show Xbox 360 avatars, and say that your game uses them | Call your game an Xbox game, or say Microsoft or 360sona endorses it |
| Let a player export their own avatar, with the credit in the file | Use the exporter to collect items or animations |
| Draw avatars on your own servers (cards, gamerpics) | Scrape the catalogue or the asset server, or gather avatars in bulk |
| Dress your own characters from the catalogue | Put licensed brands on what you sell or promote: use plain clothes (`style=plain`, `plain=1`, the `no-licensed` [filter](guides/filters.md)) |
| Read the SDK's open sources (headers, bindings, samples) | Reverse engineer the library, or keep items, textures, models or animations in a usable form outside it |

## Your download

> **Warning:** Each download is made for one app id and stamped for it. Use your own, do not pass it on, and ship
> the library only inside your game.

`sona-licence.json` is checked when the context opens; an app or a build that has been turned off
answers `SONA_E_APP` or `SONA_E_BUILD` ([signed releases and revocation](guides/release.md)).

## Players' data

Sign in with 360sona and the gamertag lookup give you data that belongs to the player. Use it only for what your
sign-in page said, have a privacy policy, and delete it when the player asks or removes your app.

> **Warning:** Never ask for a 360sona password, and never put tokens or keys in a web page.

## Trademarks

360sona is not affiliated with or endorsed by Microsoft. Xbox and Xbox 360 are Microsoft's trademarks, and the avatar
items are the work of Microsoft and its partners. "Xbox 360 avatars" describes what the SDK draws; use it that way,
and use no Microsoft logo or art.

The short answers: [what may a game ship?](answers/what-may-i-ship.md)
