Editing
Technical:Back-end Server
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Player persistence === All in-game data must be persisted to the database so that players will keep their characters and game progress between all of the servers. {| class="wikitable" |+characters !Key !Type !Nullable / Default !Description |- |id |uuid (PK) |NOT NULL | |- |user_id |users.id (FK) |NOT NULL | |- |name |varchar |NOT NULL |Display name of the character, set by player |- |title |varchar | |In-game character title, only assignable via admin APIs |- |inventory |jsonb |NOT NULL |Serialized in-game inventory |- |stats |jsonb |NOT NULL |Serialized in-game statistics |- |journal |jsonb | |Placeholder |- |last_pos |text |NOT NULL |Stringified vector3f (third dimension is a placeholder) |- |created_at |timestamptz | | |- |updated_at |timestamptz | | |- |last_login |timestamptz | | |} Since player statistics and inventory is on a per-character basis, creating multiple characters may not be desirable. For that reason, multiple "outfits" will be implemented instead. The outfits table contains the actual character customization data. Each character will have at least one outfit entry. {| class="wikitable" |+outfits !Key !Type !Nullable / Default !Description |- |id |serial (PK) |NOT NULL | |- |character_id |characters.id (FK) |NOT NULL | |- |name |varchar |NOT NULL, "Default" |Set by player |- |data |bytea |NOT NULL |Serialized character customization data |- |active |boolean |true |Currently used outfit for character |} Some people do not get along. Some people get along really well. This table covers both of those cases. {| class="wikitable" |+relationships !Key !Type !Nullable / Default !Description |- |id |serial (PK) |NOT NULL | |- |type |enum * block * friend |NOT NULL | |- |user_id |users.id (FK) |NOT NULL | * User who blocked * User who sent friend request |- |target_id |users.id (FK) |NOT NULL | * Blocked user * Friended user |- |target_name |varchar | |Last known character name at the time of blocking |- |accepted |boolean | | * Always true for "block" * Target player has to accept for the relationship to be valid |- |seen_at |timestamptz | |Used for displaying friend request only once |- |created_at |timestamptz | | |} {| class="wikitable" |+parties !Key !Type !Nullable / Default !Description |- |id |serial (PK) |NOT NULL | |- |created_at |timestamptz | | |- |user_id |users.id (FK) |NOT NULL |Created by user, does not have to be current leader |} {| class="wikitable" |+party_members !Key !Type !Nullable / Default !Description |- |id |serial (PK) |NOT NULL | |- |party_id |parties.id (FK) |NOT NULL | |- |invited_by_id |users.id (FK) |NOT NULL | |- |user_id |users.id (FK) |NOT NULL | |- |accepted |boolean |false |User has to accept for the membership to be valid |- |leader |boolean |false | * First user in party always gets true |- |created_at |timestamptz | | |}
Summary:
Please note that all contributions to Trotland Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Trotland Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Technical
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information