More Games
SpadesEuchrePitchHeartsWhist500PinochleOh HellBridge

Uploading Decks

Trickster Cards allows upload of decks in Join and Practice games when the “Allow deck upload” game rule option is set to Yes.

To upload decks in a Join or Practice game:

  • Create the game using the “More Games/Rules” button and, on the rules form, set the option labeled “Allow deck upload” to Yes. Ensure the other options are as you want them and create the game using the “Create” button at the bottom of the form.
  • After you’ve created the game, go to the Current Game item in the main menu. In the Current Game menu panel, click or tap the “Upload Decks” button.
  • In the Upload Decks panel, click or tap the “Click to Choose File(s)…” button. This will open a system dialog where you can select one or more files for upload. Select the file(s) you want click “Open” or “OK” on the select file dialog.
  • The decks found in the file(s) you selected will be shown in the panel below a button labeled “Add Decks to Game.” If the selected file(s) did not contain any decks or contained errors in the format of the decks, an error message will be present instead.
  • Click or tap the “Add Decks to Game” button to add the decks to your current game. The first deck in the list will be used when cards are dealt next. If you’re in a Practice game and want to use the uploaded decks immediately, click on your player name and choose “Deal New Cards.”

Decks are uploaded from files in PTN format (Bridge games may also use LIN or PBN format). LIN is a format used by Bridge Base for representing games; PBN stands for Portable Bridge Notation and is used for the same. Both are plain text files but with different data formats. PTN is a format based on PBN with additions to support all of Trickster Cards’ games.

The easiest way to get a PTN file to upload is to use the “Export Hand” button – also in the Current Game menu item – when you’re in a Practice game. This exports the deck associated with the current deal.

LIN Format

LIN-format files generally have a “.lin” file extension. Trickster Cards also accepts LIN files with “.xml” or “.txt” file extensions. On iPhones and iPads, use the “.txt” extension.

Trickster Cards only extracts the deck data – the “md” tag – in a LIN file. Each “md” tag is extracted in order.

The structure of the “md” tag is:

md

The “md” tag

|

A vertical bar divider

1-4

An optional single digit indicating the dealer
1=S, 2=W, 3=N, 4=E

South’s hand

A sequence of suit and rank letters (see below)

,

A comma separates each hand

West’s hand

,

North’s hand

,

Present only if East’s hand is present

East’s hand

Optional; computed if missing

The above sequence may be on a line by itself or may be preceded and followed by “|” divider characters. The east hand and its preceding comma may be omitted. In this case, the east hand contains the 13 cards not in the S, W, and N hands.

If the digit indicating the dealer is missing, then the dealer is assumed to be south.

Each hand is represented as a sequence of suits introduced by the first letter of Spades, Hearts, Diamonds, and Clubs. The ranks of the cards follow the suit letter. The following rank letters are used:

A

Ace

K

King

Q

Queen

J

Jack

T

Ten

9, 8, 7, … 2

Ranks 9 – 2

Hands must consist of 13 cards. Not all suits need be present in a hand. After all hands are processed (or computed, in the case of a missing east hand), the deck is checked to ensure it contains exactly one of each of the 52 cards in a standard deck.

PBN Format

PBN files generally have a “.pbn” file extension. Trickster Cards also accepts PBN files with a “.txt” file extension. On iPhones and iPads, use the “.txt” extension.

Trickster Cards only extracts the deck data – the deal tag – in a PBN file. Each deal tag is extracted in order. Each PBN tag exists on its own line.

The PBN format is documented at the website https://www.tistis.nl/pbn/. The following is from the PBN standard 2.1:

3.4.11 The Deal tag

The Deal tag value gives the cards of each hand. The tag value is defined as "<first>:<1st_hand> <2nd_hand> <3rd_hand> <4th_hand>". The 4 hands are given in clockwise rotation. A space character exists between two consecutive hands. The direction of the <1st_hand> is indicated by <first>, being W (West), N (North), E (East), or S (South). The cards of each hand are given in the order: spades, hearts, diamonds, clubs. A dot character "." exists between two consecutive suits of a hand. The cards of a suit are given by their ranks. The ranks are defined as (in descending order):

A, K, Q, J, T, 9, 8, 7, 6, 5, 4, 3, 2

Note that the 'ten' is defined as the single character "T". If a hand contains a void in a certain suit, then no ranks are entered at the place of that suit.

All hands must be specified for Trickster Cards to import the deal tag. The side identified by <first> indicates the dealer. If <first> is omitted, then the first hand and the dealer are assumed to be south.

After all hands are processed, the deck is checked to ensure it contains exactly one of each of the 52 cards in a standard deck.

Examples

The following is an example of a simple LIN file with 4 decks. In this example, the dealer’s hand is the 1st, 2nd, 3rd, and 4th hands. The 4th hand may be omitted, in which case it’s computed to be the cards not in the first 3 hands. Here, we have specified it.

md|1SA75HJT5DQ742CA85,SKQJ986H82D63C642,S32HK943DKJ9CQJT7,ST4HAQ76DAT85CK93|

md|2S862HQJ942D95CAQ2,SKJ973HK7DA84C964,S4HT5DKQJT632CJT8,SAQT5HA863D7CK753|

md|3SJ982HK53DJ87C765,ST63HJ82DAT93CK32,SQ5HAQT94DQ5CQJT8,SAK74H76DK642CA94|

md|4SKQJ82HAQDT42CJT3,S974HJ752DK7CA962,ST5HKT6D9853CQ874,SA63H9843DAQJ6CK5|

This example is the PBN format of the same 4 deals.

[Deal "S:A75.JT5.Q742.A85 KQJ986.82.63.642 32.K943.KJ9.QJT7 T4.AQ76.AT85.K93"]

[Deal "W:862.QJ942.95.AQ2 KJ973.K7.A84.964 4.T5.KQJT632.JT8 AQT5.A863.7.K753"]

[Deal "N:J982.K53.J87.765 T63.J82.AT93.K32 Q5.AQT94.Q5.QJT8 AK74.76.K642.A94"]

[Deal "E:KQJ82.AQ.T42.JT3 974.J752.K7.A962 T5.KT6.9853.Q874 A63.9843.AQJ6.K5"]