Skip to content

chao-master/TSSSFF-Generator

Repository files navigation

TSSSFF-Generator

This project is no longer as maintained as it used to be, instead see the projects forks:

Using

A live example can be found on my website and is free to use for all Safe for work cards.

The tool is hopefully self explanatory:

  • Click and type on each field to edit them.
  • Hover over the Icons to get to change them.
  • Card types can be changed by hovering the card type on the left of the card.
  • Special symbols can be added with escapes such as \earth A full list is given below and on the page.

##Credits and thanks.

Forking

You are welcome to fork the project and run your own instance in terms with the LICENSE.

It would be nice if improvements are feed back into the main project with Pull requests but it is not necessary to do so.

To setup your own instance of the system you will need to read the Creating the table and Adding Special cards sections below.

The system runs using psql and apache.

Creating the table

At current the code is setup to use a psql database connection.

The connection is currently hard coded in dbInterface.php to my connection details But this is easily changeable

The table exists with the following schema

CREATE TABLE tsssff_savedcards2 (
    editkey character(32) NOT NULL UNIQUE,
    viewkey character(32) NOT NULL UNIQUE,
    classes character varying(50) NOT NULL,
    name character varying(50) NOT NULL,
    attr character varying(50),
    effect text NOT NULL,
    flavour text NOT NULL,
    image text NOT NULL,
    copyright text NOT NULL,

    CONSTRAINT effect CHECK ((effect <> ''::text)),
    CONSTRAINT flavour CHECK ((flavour <> ''::text)),
    CONSTRAINT image CHECK ((image <> ''::text)),
    CONSTRAINT copyright CHECK ((copyright <> ''::text)),
    CONSTRAINT name CHECK (((name)::text <> ''::text)),
    CONSTRAINT classes CHECK (((classes)::text <> ''::text)),
    CONSTRAINT editkey CHECK (((editkey)::text <> ''::text)),
    CONSTRAINT viewkey CHECK (((viewkey)::text <> ''::text))

);

(The table is called tsssff_savedcards2 due to historic reasons, namely I overhauled the structure and still have the old legacy cards, feel free to change it a later commit at a milestone point proably will)

Adding Special cards

The creator can only save cards with hexadecimal editkeys and viewkeys this allows for non hexadecimal keys to be used for special cards that are impossible for anyone to edit even if they extract the editkey from the code. Such a key SPC-404 is used for the special 404 card.

However such keys must be added manually to the database, here is an example for the SPC-404, referenced in code.

INSERT INTO tsssff_savedcards2 VALUES (
    'SPC-404',
    'SPC-404',
    'card pony female earthPony',
    'Card Not Found',
    '404 Error, Pinkie Pie, Not a card',
    'Oh Look aint this a fun way to show an error message. Yep your card wasnt found. Unless you wanted this.',
    '"Argh no no no no! How can we play the game if the cards have all gone missing", "I dont think they are under the... wait pinkie thats the ground how did you"    -Impossible Games night',
    'https://derpicdn.net/img/view/2013/2/17/246336.jpeg',
    'Art: sirzi, Card:Ripp_');

Alternately a card can be created with the editor when the UPDATE command used to modify the editkey and viewkey in the database as necessary.

##Misc

###Special symbols. The following escapes are valid on the editor to create the special symbols:

  • \earth
  • \unicorn
  • \pegasus
  • \alicorn
  • \male
  • \female
  • \malefemale
  • \time
  • \ship

In the database these are saved as the Unicode symbols the modified fonts use.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published