Profiles - cressie176/Load64 GitHub Wiki

1. Overview

              ┌───────────────────────────┐
              │                           │
              │    LaunchConfiguration    │
              │                           │
              ├───────────────────────────┤
              │ game_id: integer [pk, fk] │
              └───────────────────────────┘
                            ┼
                            ○
                            │
                            │
                            ○
                           ╱│╲
┌───────────────────────────────────────────────────────┐
│                                                       │
│                   ProfileSelection                    │
│                                                       │
├───────────────────────────────────────────────────────┤
│                                                       │
│ id: integer [pk]                                      │
│ launch_configuration_id: id [fk, required]            │
│ profile_id: integer [fk, required]                    │
│ order: integer [required, unique(LaunchConfiguration) │
│                                                       │
└───────────────────────────────────────────────────────┘
                           ╲│╱
                            ○
                            │
                            │
                            ┼
     ┌────────────────────────────────────────────┐            ┌─────────────────────┐
     │                                            │           ╱│                     │
     │                  Profile                   │┼○────────○─│    ViceArgument     │
     │                                            │           ╲│                     │
     ├────────────────────────────────────────────┤            └─────────────────────┘
     │                                            │            ┌─────────────────────┐
     │ id: integer [pk]                           │           ╱│                     │
     │ name: text [unique, required]              │┼○────────○─│     KeyMapping      │
     │ default: boolean [required]                │           ╲│                     │
     │                                            │            └─────────────────────┘
     ├────────────────────────────────────────────┤            ┌─────────────────────┐
     │                                            │           ╱│                     │
     │ There can be at most one default profile   │┼○────────○─│ EnvironmentVariable │
     │                                            │           ╲│                     │
     │                                            │            └─────────────────────┘
     └────────────────────────────────────────────┘

Profiles define reusable configuration that can be applied to one or more games, avoiding duplication when many games share the same key mappings, environment variables, or VICE arguments.

A game's launch configuration references one or more profiles by name. Profiles are applied in order — later profiles override earlier ones where conflicts occur.

At most one profile may be marked as the default. When a launch configuration has inherit_default_profile set to true (the default), the default profile is automatically applied first, before any explicitly assigned profiles. When inherit_default_profile is false, the default profile is not applied automatically; the user may still add it explicitly to the profile list, in which case it applies at the position it appears.

2. Tables

Profile

Field Type PK FK Nullable Unique Description
id integer yes Surrogate primary key.
name text yes Display name for the profile (e.g. "multiplayer").
default boolean Whether this is the default profile. At most one row may be true.

ProfileSelection

Field Type PK FK Nullable Unique Description
id integer yes Surrogate primary key.
launch_configuration_id integer yes The launch configuration this selection belongs to.
profile_id integer yes The profile being assigned.
order integer yes (per launch_configuration) Application order. Lower values are applied first; later profiles win.

3. Example

profile

id name default
1 default true
2 multiplayer false
3 shmups false

profile_selection (game 42 has Fast Load then Multiplayer applied in order)

id launch_configuration_id profile_id order
1 42 1 1
2 42 2 2
⚠️ **GitHub.com Fallback** ⚠️