Database Schema & Cheatsheet
Database Schema & Cheatsheet
This page provides an overview of the database structure used in Fantasy Tennis, showing the key tables, their columns, and relationships. The schema diagram below visually represents how different entities connect within the system.
Schema

Tables of Interest
Tables might worth looking into as they are important on setting up your own Fantasy Tennis Server Configuration inside the Database.
Config
The `config` table is used to store various server wide settings that control gameplay mechanics, security settings, logging behavior, and feature toggles. Each configuration entry consists of:
- name – The unique identifier of the config setting.
- description – A short explanation of what the setting controls (may be null).
- value – The actual configured value.
- type – The data type of the value (e.g., boolean, int, double, string).
Administrators can modify these values to tweak server behavior, enable or disable features, and adjust game mechanics dynamically.
Below is a list of currently supported configuration values along with their default settings.
Name | Type | Default Value | Description |
---|---|---|---|
anticheat.enabled | boolean | false | Enables or disables the built-in anticheat (JFTSE exclusive). |
anticheat.port | int | 1337 | Port used for the anticheat system (JFTSE exclusive). |
dev.packets.handle | boolean | false | Handles developer/debug packets. |
packets.id.translate.enabled | boolean | true | Enables translation of packet IDs. |
logging.packets.all.enabled | boolean | true | Enables logging of all network packets. |
network.encryption.enabled | boolean | false | Enables network encryption for secure communication. |
password.encryption.enabled | boolean | false | Encrypts player passwords upon login. |
player.level.max | int | 60 | Maximum player level (JFTSE exclusive, levels above 65 require client modifications). |
command.room.mode.change.player.level | int | 60 | Minimum required level to change room mode via command. |
game.bonus.global.gold | int | 5 | Global gold bonus multiplier (Single Player). |
game.bonus.global.exp | int | 5 | Global experience bonus multiplier (Single Player). |
game.bonus.wongame.exp | double | 0.2 | Experience bonus for winning a game (Basic & Battle). |
game.bonus.wongame.gold | double | 0.2 | Gold bonus for winning a game (Basic & Battle). |
logging.packets.console-output.enabled | boolean | true | Enables logging of packets in console output. |
matchplay.guardian.hard.won.ranking-point.multiplier | double | 1.0 | Multiplier applied to ranking points in Guardian Hard mode. |
game.map.allow.snowmoon | boolean | false | Allows Snow Moon map in Guardian mode. |
Notes:
- Config values marked as JFTSE exclusive are unique to this server implementation and may not be available in other Fantasy Tennis servers.
- Those values represent the development chosen defaults and does not represent values set within the JFTSE hosted server.
M_Scenarios
Each game mode has multiple scenarios. A scenario marked as "default" is always selected first. If multiple scenarios are active (`status = 1`), the default scenario is prioritized. If multiple active scenarios are marked as default, the first one retrieved from the database is chosen.
Scenario types:
- Guardian Normal (non Boss Battle) → `GUARDIAN`
- Boss Guardian → `BOSS_BATTLE`
- Boss Guardian v2 (new mechanics defined through scripting) → `BOSS_BATTLE_V2`
S_Maps
Defines all available maps and references client map id's.
id | bossPlayTime | breathTime | description | isBossStage | map | name | playTime | triggerBossTime | useBreathTime |
---|---|---|---|---|---|---|---|---|---|
1 | [NULL] | 100 | [NULL] | 0 | 0 | Rubycrab | [NULL] | [NULL] | 0 |
2 | [NULL] | 100 | [NULL] | 0 | 1 | Emerald Beach | [NULL] | [NULL] | 0 |
3 | 10 | 100 | [NULL] | 0 | 2 | Twinkle Town | 15 | 10 | 0 |
4 | [NULL] | 100 | [NULL] | 0 | 3 | The Aeolos | [NULL] | [NULL] | 0 |
5 | [NULL] | 100 | [NULL] | 0 | 5 | Life Wood | [NULL] | [NULL] | 0 |
6 | 5 | 100 | [NULL] | 1 | 4 | Snow Moon | [NULL] | 8 | 0 |
7 | 5 | 100 | [NULL] | 1 | 6 | Arena | [NULL] | 3 | 0 |
8 | 5 | 100 | [NULL] | 1 | 7 | Monslava | [NULL] | 3 | 0 |
9 | 5 | 100 | [NULL] | 1 | 8 | Monslava Blue | [NULL] | 3 | 0 |
10 | 5 | 100 | [NULL] | 1 | 9 | Devaberg | [NULL] | 3 | 0 |
11 | 5 | 100 | [NULL] | 1 | 10 | Atlantis | 8 | 4 | 0 |
12 | 5 | 100 | [NULL] | 1 | 11 | Temple | [NULL] | 3 | 0 |
13 | [NULL] | 100 | [NULL] | 0 | 12 | Room of Shadow | [NULL] | [NULL] | 0 |
14 | 5 | 100 | [NULL] | 1 | 13 | Machine City | [NULL] | 3 | 0 |
15 | 5 | 100 | [NULL] | 1 | 14 | Dance Time | [NULL] | 3 | 0 |
Guardian_2_Maps
Connects a guardian (or boss guardian) to a map with a specific scenario. Each scenario has a unique set of guardians available for matches.
Skill_2_Guardians
Links skills to guardians. The connection is made through `Guardian_2_Maps`, associating skills with a guardian in a specific scenario and map. If no `guardian_2_maps` entry is set, it defaults to `btItem`, which is predefined for guardian types. `btItem` is shared among similar guardian types (e.g., Dokaro and related "ro" types).
S_Guardian_Multipliers
Defines multipliers for Guardian Mode, applicable for gold or experience.
These multipliers can be linked in the `S_Relationships` table.
id | description | multiplier |
---|---|---|
1 | default exp multiplier | 1.0 |
2 | default gold multiplier | 1.0 |
3 | exp x3 | 3.0 |
4 | exp x4 | 4.0 |
5 | exp x5 | 5.0 |
6 | exp x6 | 6.0 |
7 | exp x7 | 7.0 |
8 | gold x7 | 7.0 |
9 | gold x5 | 5.0 |
10 | gold x3 | 3.5 |
11 | exp x3 | 3.5 |
S_Relationships
Defines connections between various entities within the game, enabling precise control over item drops, multipliers, and other gameplay mechanics. Relationships are established using two key fields:
- `id_f` (`id_from`): Represents the originating entity of the relationship, such as a Product or Multiplier.
- `id_t` (`id_to`): Represents the target entity of the relationship, such as a Guardian, Boss Guardian, or Map.
When linking products specifically to guardians, the `productIndex` from the product definition is used for `id_f`, and the `guardian_2_maps.id` (not the direct Guardian or Boss Guardian ID) is used for `id_t`. Each relationship is further described by its type and role, defining how it influences gameplay.
Relationships can be individually toggled on or off via the `status` field.
Advanced Item Drop Control (Role ID 1)
Additionally, enhanced item drop control is available specifically for the Item Drop role (role ID 1):
- Default item weight is 20.0 when no specific weight is provided.
- A fixed weight of 15.0 is used to determine scenarios where no item is awarded (displayed as an "X").
- Drop exclusivity can be defined specifically for:
- `forHardMode`: Drops exclusive to Guardian Hard Mode.
- `forRandomMode`: Drops exclusive to Guardian Random Mode.
- The `levelReq` field, currently unused, is reserved for future use to restrict drops based on player levels in a planned progression system.
Quantity Determination for Item Drops:
Condition | Quantity Result |
---|---|
`qty` is set, `qtyMin`/`qtyMax` not set | Exact quantity from `qty` |
`qty` not set, `qtyMin`/`qtyMax` set | Random quantity between `qtyMin` and `qtyMax` |
All quantity fields NULL | Defaults based on item type:
|
`qty` and `qtyMin`/`qtyMax` both set | Random quantity between `qtyMin` and `qtyMax` |
S_Relationship_Types
Defines supported relationship types, describing what entities can be linked together:
id | Description |
---|---|
1 | Product to Guardian |
2 | Product to Boss Guardian |
3 | Product to Map |
4 | Multiplier to Guardian |
5 | Multiplier to Boss Guardian |
6 | Multiplier to Map |
7 | Product to Map (Guardian Mode) |
8 | Product to Sell Price |
S_Relationship_Roles
Defines the supported roles that relationships can take, describing their in game functionality:
id | Description |
---|---|
1 | Item Drop |
2 | Exp Multiplier |
3 | Gold Multiplier |
4 | Item Sell Price |
K_Status
Defines the different status types used in game.
id | Description |
---|---|
1 | Active |
2 | Inactive |
Notes & Additional Information
- The database schema is subject to updates as new mechanics and features are introduced.
- Some tables may have additional columns not explicitly documented if they are not required for core functionality.
- Unused fields, such as `levelReq` in `S_Relationships`, are placeholders for future game progression updates.