# Installation

> Install Sky Activities, configure its dependencies and permissions, and verify the included venues.

## Requirements

<table>
<thead>
  <tr>
    <th>
      Requirement
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        sky_base
      </code>
    </td>
    
    <td>
      Framework, inventory, account and database integration
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        oxmysql
      </code>
    </td>
    
    <td>
      Persistent settings, activity definitions and kart records
    </td>
  </tr>
  
  <tr>
    <td>
      OneSync
    </td>
    
    <td>
      Server-side entities and separate match sessions
    </td>
  </tr>
  
  <tr>
    <td>
      GTA V game build <code>
        2189
      </code>
      
       or newer
    </td>
    
    <td>
      Bundled activity content and standard karts
    </td>
  </tr>
</tbody>
</table>

The current standalone version does not require `sky_jobs_base`. Use current Sky Base and configure it to use `oxmysql` as its SQL provider. Keep your framework, inventory and any required map dependencies running before the resources that use them. In `server.cfg`, keep an existing `sv_enforceGameBuild` value of `2189` or higher. If it is missing or lower, set `sv_enforceGameBuild 2189` and restart the whole server; a resource restart alone does not change the content build.

## Install

<steps>

### Place the resource

Copy the folder containing `fxmanifest.lua` to your server's resources directory and keep its name **sky_activities**. Include `source/html`, `stream`, `data`, `config`, `shared` and the other shipped files.

The release includes the built UI, sport weapons and Sky maps. Read the bundled `INSTALL.md` before the first start. The former separate `sky_activity_weapons` resource is obsolete; remove its start entry when upgrading from that arrangement.

### Prepare the database

Connect `oxmysql` to your database. Startup migrations create the Activities tables; `import.sql` is the manual schema reference. The database account needs the permissions required by those migrations and normal reads/writes.

Back up `sky_activities_definitions`, `sky_activities_settings`, `sky_activities_kart_profiles` and `sky_activities_kart_payments` before updates. They hold saved locations, operator settings, kart choices and payment records.

### Start the resources

Enable OneSync and use this order after your framework and inventory:

```cfg [server.cfg]
ensure oxmysql
ensure sky_base
# Start optional map resources and their dependencies here.
ensure sky_activities
```

The Sky maps are already part of `sky_activities`; they need no separate map resource. Third-party bowling maps must be installed separately. See [Bowling MLOs](../mapping/bowling-mlos) for exact resource names and conflicting-map instructions.

### Set startup options and permissions

Check `config/config.lua`. Activities uses the language selected in Sky Base and falls back to English. The default administrator groups are `admin` and `superadmin`. The editor also accepts the ACE permission:

```cfg [server.cfg]
add_ace group.admin sky.activities.admin allow
```

This grants the permission to the named group; use your server's existing administrator assignments. Reserve routing buckets **62000–62255** for Activities, or change `Config.BucketStart` and `Config.BucketCount` to an unused range.

### Configure anticheat permissions

Apply the [Anticheat & resource protection](./anticheat) instructions before testing. Activities creates equipment, temporary sport weapons, local player clones and race karts, and uses scripted cameras and movement.

</steps>

## First verification

With standard activity installation enabled, visit the Activity Center at `1024.1989, -2399.1038, 30.1206`. Open a sport at its television or interaction marker. Open `/activitiesconfig` as an administrator and check the supplied activities, rules and activation state.

Join a game, leave with `/leaveactivity`, and confirm the player's controls and previous location are restored. Try a private solo test, then a game with another player. Check both the server console and client F8 log if models, menus or interactions fail.

`InstallVenuePresets` installs missing standard activities on resource startup. Turning it off prevents that installation step; manage already saved activities in the editor. See [Configuration](./configuration) before changing this setting.
