150 lines
6.5 KiB
Markdown
150 lines
6.5 KiB
Markdown
# SessionZero Design Doc `WIP`
|
|
|
|
## Overview
|
|
SessionZero is designed to be a supplimentary companion app for TTRPG games, both in-person and digital. The core of the system revolves around it's fully data-driven system that uses solely user-generated content, therefore there is no storefront for officially licensed material or systems, and can be used for ANY game system.
|
|
|
|
## Definitions:
|
|
- **Game**: A Game is the core of all game sessions, housing all of the game and player data.
|
|
- **Game Template**: A template for a Game containing ***Datapacks***, ***Modules***, and other metadata.
|
|
- **Datapack**: A Datapack is a collection of related ***Datasets***, ***Templates***, used to serve a ***Game*** with data.
|
|
- **Dataset**: A collection of ***SZ Objects*** and associated resource files (images, etc).
|
|
- **SZ Object Template**: A template used to define an ***SZ Object***, like a blueprint, holding a set of fields and their expected value type, as well as allowing fields that can be populated by other ***SZ Objects*** of a defined type/template.
|
|
- **SZ Object**: An "instanced" data object that holds a set of fields and values of various types, defined by an ***SZObjectTemplate***.
|
|
- **Game Character Template**: A special ***SZ Object Template*** for a ***Game Character***, specifying the fields and value type, and serving as the main source of truth for a ***Game***, acting like a "Player Sheet".
|
|
- **Game Character**: A special **SZ Object** instance defined by a ***Game Character Template***.
|
|
- **The Archives**: A database of user-generated-content where users can upload or download data for games.
|
|
- **Module**: A module is akin to a plugin or game modification, and contains application logic/functionality, UI, etc, and can be created and shared by anyone.
|
|
|
|
|
|
## Game
|
|
A 'Game' is the core part of the application. It contains the Character Template and any data needed for the chosen game, as well as all individual player data and session data. These can be ran offline or in an online game session as either the Game Master or just a player. Games also have a built in chat where you can run commands or chat with other players (These chats are not encrypted in any way and are stored in the game's save data).
|
|
|
|
### Play-by-Post `WIP`
|
|
A special online-only Game type where gameplay is conducted asyncronously by each player ***`More details are needed for this Game type`***.
|
|
|
|
## Client and Server relation
|
|
The core application is designed to be ran locally with no internet connection or account required. This mainly includes managing offline Games utilizing the data-creation tools, and any other capability provided by Modules.
|
|
|
|
For online games, you connect to the server that is hosting that particular game, and create/use a profile unique to that specific game. This hosting capabilty comes in three forms, a self-hostable dedicated server, a temporary server ran on the host machine (requires port forwarding and sharing of personal IP address, or alternatively a VPN), or using the official SessionZero server (limited availibily, more details need to be added for possible pricing or if this is even feasible).
|
|
|
|
For downloading Datapacks, Game Templates, Modules, etc, 'The Archives' is a source of repositories of user-generated data where you can download or share (if you have permission). You can add or remove repository sources within the application.
|
|
|
|
## Modules `WIP`
|
|
|
|
## Data `WIP`
|
|
### TODO
|
|
- How do we redefine the data structure to better handle a dependency tree down the line.
|
|
- Dot (.) Notation should be the way to access items within a dataset (ex. `SessionZero.szcore-test-items.test-item` would grab the 'test-item' SZ Object from the 'SessionZero.szcore-test-items' dataset)
|
|
- Excluding SZ Object instances, all unique id fields must be prefixed with an author name (ex. `SessionZero.szcore-game-template`, where 'SessionZero' is the author, and 'szcore-game-template' is the rest of the unique id)
|
|
|
|
> <span style="color:red">All of the following examples are psuedocode and not final</span>
|
|
|
|
### Game Template
|
|
```ini
|
|
[metadata]
|
|
id = SessionZero.szcore-game
|
|
name = SessionZero Core Game Template
|
|
author = SessionZero Team
|
|
description = '''
|
|
SessionZero Core Game Template
|
|
'''
|
|
|
|
# TODO: figure out how to list dependencies of datapacks, templates, and modules
|
|
[datapacks]
|
|
[templates]
|
|
[modules]
|
|
```
|
|
### Game Object
|
|
```json
|
|
|
|
```
|
|
|
|
### Datapack
|
|
```ini
|
|
# Proposed metadata for a Datapack
|
|
|
|
[metadata]
|
|
id = SessionZero.szcore-datapack
|
|
name = Test Datapack
|
|
author = SessionZero Team
|
|
description = '''
|
|
SessionZero Test Datapack
|
|
'''
|
|
# TODO: reference to datasets and templates
|
|
```
|
|
|
|
### Dataset
|
|
|
|
```ini
|
|
# Proposed metadata for a Dataset
|
|
|
|
[metadata]
|
|
id = SessionZero.szcore-test-items
|
|
name = Test Items Dataset
|
|
# The template ID to use for SZ Object instances
|
|
template-id = szcore-item
|
|
# Must match the template datatype
|
|
datatype = item
|
|
author = SessionZero Team
|
|
description = '''
|
|
SessionZero Test Dataset
|
|
'''
|
|
```
|
|
|
|
### Sz Object Template
|
|
|
|
```ini
|
|
# Psuedocode for the structure of an SZ Object Template
|
|
|
|
# TODO: Finish examples of using dependencies and formulas and lists
|
|
|
|
[metadata]
|
|
id = SessionZero.szcore-item
|
|
name = SzCore Item
|
|
# This is an arbitrary value and can be anything (ex. item, npc, weapon, etc.)
|
|
datatype = item
|
|
author = SessionZero Team
|
|
description = '''
|
|
SessionZero Core Item Template
|
|
'''
|
|
# Can also have any custom metadata
|
|
|
|
# This is a top-level field
|
|
[name]
|
|
# This denotes the field's type (text, number, boolean, formula, reference)
|
|
type = text
|
|
|
|
# This is a field in a "Group"
|
|
[stats.damage]
|
|
type = number
|
|
# An optional default value
|
|
default = 10
|
|
|
|
[example]
|
|
type = reference
|
|
# Denotes that this value is a list of values of the designated type
|
|
is-list = true
|
|
# A special thing for reference types to specify what 'datatype' is allowed
|
|
reference-type = item
|
|
# Makes the reference only allowed to be an instance of the specified template
|
|
reference-type-template = szcore-item
|
|
```
|
|
|
|
### SZ Object Instance
|
|
|
|
The id field in an SZ Object instance does not need an additional prefix like templates and other abojects, as it will assume the author prefix from the dataset that contains the SZ Object (an SZ Object cannot stand alone, it must be a part of a dataset)
|
|
|
|
```json
|
|
{
|
|
"metadata": {
|
|
"id": "test-item",
|
|
"name": "Test Item",
|
|
"template-id": "SessionZero.szcore-item",
|
|
"datatype": "item",
|
|
"author": "SessionZero Team",
|
|
"description": "A test item",
|
|
},
|
|
|
|
}
|
|
```
|