ieants.cc Forums

Games and Entertainment => Games General => Magic: the Gathering => Topic started by: Den on 2009-Aug-20 08:33

Title: Shena'Fu's Online Card Creator
Post by: Den on 2009-Aug-20 08:33
Someone on MTGSalvation suggested making a client-server card creator. So I created this online card creator (https://ieants.cc/magic/cc/).

Please post only issues or suggestions for the online card creator in this topic.

Please post you card creations at the other topic. (https://ieants.cc/smf/index.php?topic=119.0)

Images by FirePenguinMaster, ComicBookGuy, Vogon, et al.

Over 146,000 cards have been created since 2009.

Changelog
[spoiler]
8/22/17
Added QR code for card image

6/22/17
Rearranged form fields
Hide hints/instructions by default
Added Show Instructions button

6/20/17
Make radio buttons label clickable

6/16/17
Added Genres, which alters the card types and supertypes. [Magic, Earth, Space]

6/15/17
Added CBG frame

6/14/17
Added Classic-Shifted Art BG frame

6/13/17
Card list by creator @ https://ieants.cc/magic/cclist.php?creator=

11/7/16
Added Full Art frame

11/5/16
Allow set icon and rarity. (not done for all frames yet.)
Use imagick instead of gd. (not done for all frames yet.)
Better help section.

10/20/16
Added energy mana. Use 'e' in mana cost or {e} in rules text.

4/18/16
Change Classic and Modern frames to Amiri bold font type:

1/13/16
Added colorless mana symbol (diamond shaped).

10/18/15
Added Planeswalker, flip and split frames.
Main font Molengo-Regular.ttf
Rules text parse word by word (in filp and split.) (Was line by line).

1/1/13
Hybrid and Phyrexian mana in the form 2/c, c/2, c/d, d/c, p/c, c/p. e.g. 2/ww/p

4/1/12
Image URL shorter and more legible.

11/20/11
Added Creator field.

1/8/11:
Added Planar Chaos aka "Planeshift" and FirePenguinMaster's (FPM) frames.

11/17/10
Added supertype Ongoing, types Scheme and Emblem

5/20/10
Added Space frames.

5/13/10
Added future-shifted frames.

5/11/10:
Added 8th edition (modern) frames.
[/spoiler]


((TODO))
.script to create all WotC cards
.high def images of frames (done: vogonhd, vogon full art, planeswalker)
.fix slash to %2F in card names. fix redirection accept %2F
.add metadata to image. including URL to card creator for this card.
.languauge support. east asian.
.fix parentheses orphan on new line
Title: Re: Online Card Creator
Post by: Dykotomee on 2011-Sep-05 07:43
I'm an experienced PHP/JavaScript developer, and of all the CC tools out there, yours seems to look the most promising. Is there any chance of collaboration on this? I'd love to further the project, and I have some ideas I can suggest too.

- Michael

~ ><>
Title: Re: Online Card Creator
Post by: Den on 2011-Sep-14 19:18
I'm interested in hearing your ideas and how you plan to expand on the CC.
Title: Re: Online Card Creator
Post by: bakert on 2012-Jun-14 01:30
Hey.  Thanks for approving my membership.  I tried to join to comment on this thread about the card creator.  I think we ended up having a conversation on MTG Salvation already.

Still interested in the source to have a go at adding hybrid and as insurance in case your version disappears but very happy with the program!

Thanks!
Title: Re: Online Card Creator
Post by: Den on 2015-Oct-18 19:25
Added flip and split frames. Flip and split cards: use ;; to separate each half in corresponding fields. (e.g. Fire;;Ice) For an example, see Fire;;Ice (http://goo.gl/vbBAuq) and Budoka Gardener;;Dokai, Weaver of Life (http://goo.gl/C6Q9jI)

Added Planeswalker frames.
Ex. Koth of the Hammer (http://goo.gl/pp0kpU)
Title: Re: Online Card Creator
Post by: Den on 2016-Jan-13 17:40
Added colorless mana. Use 'c' in mana cost or {c} in rules text.
[mana]c[/mana]
Title: Re: Online Card Creator
Post by: Den on 2016-Apr-18 21:30
Change Classic and Modern frames to Amiri bold font type: https://github.com/google/fonts/tree/master/ofl/amiri (https://github.com/google/fonts/tree/master/ofl/amiri)
Title: Re: Online Card Creator
Post by: Den on 2016-Nov-05 15:48
Title: Re: Online Card Creator
Post by: Den on 2016-Nov-07 20:01
Title: Re: Online Card Creator
Post by: Den on 2017-Jun-13 19:42
https://ieants.cc/magic/cclist.php?creator=

You can view a list of all your cards via above URL and add your creator name at the end of the address.

Over 110,000 cards have been created since 2009.
Title: Re: Online Card Creator
Post by: Den on 2017-Jun-14 23:56
6/14/17
Added Classic-Shifted Art BG frame

6/15/17
Added CBG frame

6/16/17
Added Genres, which alters the card types and supertypes. [Magic, Earth, Space]
Title: Re: Online Card Creator
Post by: Den on 2017-Jun-20 20:05
6/20/17
Make radio buttons label clickable

6/22/17
Rearranged form fields
Hide hints/instructions by default
Added Show Instructions button

Title: Re: Online Card Creator
Post by: Den on 2017-Aug-22 02:53
8/22/17
Added QR code for card image
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2017-Oct-03 03:16
10/03/2017
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2017-Oct-14 04:54
10/14/2017

added Delayed supertype

10/30/2017

added direct link to view the list of cards by creator
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Jan-24 20:29
1/24/2018

blended trims and rules box for two-color cards (in classic, modern, and planeshift frames for now). takes into account mana symbols in both mana cost and rules text.

1/27/2018

added Token supertype
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Feb-03 22:51
2/3/2018

added Playing Card frame

Playing Card options
Form FieldFunction


Thus you can use playing card frame for a card with nothing but a bunch of text. If you have art with transparent background, you can try to overlap the art and rules text for something fancy.
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Sep-01 23:19
9/1/2018

- converted Planeswalker frame to Imagick
- centered rules text vertically

9/2/2018

- set timeout for art URL

9/3/2018

- Planeswalker frame to accept nonloyalty abilities
- Planeswalker frame to accept any amount of abilities
- flavortext emdash
- set rules text font to amiri-regular
- fix apostrophe in cardnames in database
- remove duplicate cardnames in database
- cardname font: Kurale

9/4/2018

- more spacing between rules and flavor texts
- trim extraneous newlines and whitespace
- support watermark

9/5/2018

- fix mana symbols cut off
- prevent recursive art
- fix finally really fit long text inside box

9/6/2018

- converted Future frame to Imagick
- Unemploy word wrap to find font size. Reiterate whole texts word by word. Slower, but should be more consistent in outputting biggest text size that fits the text box.

9/7/2018

- sanitize query
- aliases as replacement strings (between two @@ symbols)

9/8/2018

- text render: early escape when lettery exceeds textboxheight, instead of processing entire text
- increase initial rules text size
- separate instructions page: https://ieants.cc/magic/cchints.php (https://ieants.cc/magic/cchints.php)

9/9/2018

- moved alias replacements to client side javascript
Title: Re: Shena'Fu's Online Card Creator Aliases
Post by: Den on 2018-Sep-07 23:27
List of aliases. Enclose alias on the left column between two @@ symbols. For instance, @ett@ in rules text will become 'enters the battlefield tapped'. Some aliases will take a variable. For instance @dd2@ becomes 'deals 2 damage'. Some aliases have both lower- and upper-case versions.

br />= gy = graveyardbr />= bf = battlefieldbr />= lib = librarybr />= syl = search your librarybr />= Syl = Search your librarybr />= pt = power and toughnessbr />= ias = instant and sorcerybr />= ios = instant or sorcerybr />= to = target opponentbr />= To = Target opponentbr />= tc = target creaturebr />= Tc = Target creaturebr />= tcp = target creature or playerbr />= tcpw = target creature or planeswalkerbr />= tcy = target creature you controlbr />= Tcy = Target creature you controlbr />= tco = target creature an opponent controlsbr />= Tco = Target creature an opponent controlsbr />= tp = target playerbr />= Tp = Target playerbr />= tpw = target planeswalkerbr />= youpw = you or a planeswalker you controlbr />= anyt = any targetbr />= ec = each creaturebr />= Ec = Each creaturebr />= ecy = each creature you controlbr />= Ecy = Each creature you controlbr />= cy = creature you controlbr />= cys = creatures you controlbr />= Cys = Creatures you controlbr />= cmc = converted mana costbr />= et = enters the battlefieldbr />= ett = enters the battlefield tappedbr />= uet = until end of turnbr />= Uet = Until end of turnbr />= dcd = deals combat damagebr />= dd([0-9xyzXYZ]+) = deals $1 damagebr />= g(\+|\-)([0-9xyzXYZ]+) = get $1$2/$1$2br />= gs(\+|\-)([0-9xyzXYZ]+) = gets $1$2/$1$2br />= emblem = You get an emblem with "br />= upkyou = At the beginning of your upkeepbr />= upkopp = At the beginning of each opponent's upkeepbr />= upkall = At the beginning of each player's upkeepbr />= endyou = At the beginning of your end stepbr />= endnext = At the beginning of the next end stepbr />= ctr(.*) = put a $1 counter onbr />= Ctr(.*) = Put a $1 counter onbr />
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Sep-10 03:54
9/10/2018

- added frames: classicshift (=default frame), CBG Horizontal (good for sideways card, long texts, vertical arts, and PWs)
- card type font: Kurale

9/10/2018

- font for card name, type, P/T: Arima Madurai (bold) (most frames), Righteous (CBG Horizontal frame)

9/13/2018

- added card types: Elite, Hero, Conspiracy, Phenomenon. Also Magical and Super for Earth genre.

Pro-tip: You can get "Super Hero" on the type line by choosing Earth genre.

- remove emdash if no supertype and type

Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Sep-17 13:36
9/17/2018

- added supertype: Host
- changed Space supertype: Elite -> Mega
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Sep-28 03:05
09/28/2018

- add delay timer to cclist.php to mitigate 503 Service Unavailable in Firefox, Chrome

09/29/2018

- added aliases:
= @dcd@ = deals combat damage

- font for card name, type, artist, creator: Fondamento
- font for power/toughness: Amiri
- playing card frame: mana cost vertically : added watermark :
- FPM frame: reverse mana cost order : center card name
- tweak artist and creator texts
- replace card types for Earth genre: Villain, Power (were Conspiracy, Phenomenon)

Pro-tip: Choose Earth genre to get types like "Super Villain", "Super Power",  "Super Villain Power".

10/01/2018

- form redesign: dropdown selectables: color, border, frame, symbols
- added choice of symbols (mana aesthestics)
- reorganize folders: fonts, symbols
- new mana symbols: 'f' for infinity, 'k' for planar chaos
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Oct-02 20:46
2018/10/02

- new page to showcase random cards: https://ieants.cc/magic/ccrand.php

2018/10/03

- new frame: Vogon HD: large, high resolution, more space for texts, including card name, type, rules, and P/T. mana vertical on top left. P/T at bottom left margin. set icon at bottom right corner. work in progress. see examples in attachment.

- converted to OOP classes: classicshift, vogonhd

2018/10/04

- ignore () parentheses in manacost
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Oct-06 18:48
2018/10/05

- bitbucket repo - https://bitbucket.org/Shenafu/online-card-creator/src

2018/10/06

- improve Vogon HD aesthetics - land - seams - blend - type icons

2018/10/07

- PW abilities accept more bracket types - [](){} or bracketless

2018/10/08

- vertical mana - don't reverse arrangement - instead user should use reverse notation in input; e.g. [mana]ww3[/mana] should be new standard notation
- genre and subtypes update immediately on element load - no more waiting for body onload

2018/10/09

- new frames: Vogon Full Art - art takes entire card

2018/10/10

; improve cardimage_makeLinearText() ; accepts array as argument ; added shadow option ;
; reorganize Frame dropdown selection ; Vogon HD and Full Art near the top
; Vogon Full Art ; shrink rules text box for planeswalkers

2018/10/11

; Vogon Full Art ; new method of compositing text ; write text on temporary image ; composite using imagick::COMPOSITE_LUMINIZE
; fix Vogon Full Art PW flavor text vertical alignment
; shrink Vogon Full Art rules text initial font size
; cclist and ccrand show 12 cards

2018/10/12

; change Vogon Full Art font for rules text ; Muli regular and Cantarell italic ; sans serif ; less aliasing
; PW rules text starting font size proportional to total (abilities + flavor texts)
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Oct-14 00:32
2018/10/13

` leveler cards under Vogon HD and Vogon Full Art frame ` P/T and levels separated by double semicolon ;; ` level values set between brackets [](){}
` hints for leveler

see examples in attachments

2018/10/14 - 15

; alter cardfuncs.php functions to accept arguments as arrays
; remaining frames into OOP classes and Imagick
; transparent images for FPM, Full Art

2018/10/18

; options hasshadow renamed to shadowcolor ; default FALSE
; Full Art artifact wrong filename
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Nov-01 14:59
2018/11/01

; manacost accept any letter
; added Pokemon genre and energy symbols:

{c} Colorless
{d} Darkness
{o} Dragon
{y} Fairy
{f} Fighting
{r} Fire
{g} Grass
{l} Lightning
{m} Metal
{p} Psychic
{w} Water
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Nov-08 14:31
2018/11/08

; Vogon HD ; Planeswalker art full height, with mask on bottom
; Vogon HD ; Planeswalker rules box and starting font size shrunk
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2018-Nov-13 22:04
2018/11/13

; Earth and Space genres ; Emblem type becomes Paradigm

2018/11/14

; PW rules box abilities height proportional to text length
; Scenes rules box, loyalty like Planeswalkers

2018/11/17

; resize linear texts
; security fixes

2018/11/18

; rules text ; bold text between angled brackets <>
; Vogon frames ; fix leveler P/T not separated
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Feb-09 02:03
2019/02/09

; divider between rules and flavor texts
; added frame ; Vogon Split
; resize heights for Vogon HD art and rules box
; Vogon HD rules box brightened;  easier to read and more emphasis for art

2019/02/11

; fix show card images with special URL/escape characters in name and creator

2019/02/13

; reworked frame ; Vogon HD ; extra bar ; eliminated black border
; added field ; 'extra' text that may appear before rules


2019/02/14

; Vogon HD ; extrabar opacity
; Planeswalkers rules accept <> angled brackets as loyalty cost
; all frames ; include extra text to rules text
; Vogon Full Art ; remove border; art expand to edge
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Feb-20 16:00
2019/02/20

; added symbols and genre ; MBS

{m} Mind
{b} Body
{s} Soul
{n} Generic
{f} Force
{g} Gear
{h} Hi-Tech
{t} Talent
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Mar-01 18:55
2019/03/01

; Vogon HD, Vogon Full Art ; only blend for Magic/Space genres

2019/03/02

; rules text ; underline text between _underscores_
; update hints

2019/03/05

; added more colors options for frames ; artifact ; orange ; yellow ; cyan ; purple ; brown
; Vogon HD frames ; added 5 colors

2016/03/06

; fix color options ; yellow attribute missing
; Vogon Full Art ; added 5 new colors
; Vogon HD frames ; new colors fix emboss and decor
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Mar-11 17:06
2019/03/12

; new fonts that support Cyrillic and Latin extended characters ; text = Crimson (https://github.com/skosch/Crimson/tree/master/Desktop%20Fonts/TTF) ; name = Albertus Medium (http://ukrfonts.com/info/index.php?v=20&id=1316)

2019/03/13

; SQL db ; convert table and columns to utf8-unicode-ci
; cclist.php ; sort by utf8-bin ; cyrillic and asian at end
; CBG and Space frames ; mb_strtoupper() works on non-ASCII
; all files ; Unix newlines
; cc.php ; replace fonts ; Crimson and Albertus
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Jul-23 13:06
2019/07/23

[[Changelog]]
> page title includes card name and creator
> page URL query reduced to only card name and creator
> every card page includes link to discuss card (opens to Dissenter (https://dissenter.com/url) server)
> post (not get) card submissions
> rewrite URL > magic/cc/creator/cardname > magic/cc.php?creator=$1&cardname=$2
> rewrite URL > magic/cclist/creator/page > magic/cclist.php?creator=$1&page=$2
> cclist and ccrand link cards to new URL formats
> update hints
> ymtc2img > redirect with header('Location:') to imagick URL instead of echo image > to reduce number of concurrent processes

[[Examples of new URLS]]

> https://ieants.cc/magic/cc/Gnomes/Duyu Gnoumi, Extraordinaire (https://ieants.cc/magic/cc/Gnomes/DuyuGnoumi,Extraordinaire)
> card discussion (https://dissenter.com/discussion/begin?url=https://ieants.cc/magic/cc/Gnomes/Duyu%2520Gnoumi%252C%2520Extraordinaire)
> https://ieants.cc/magic/cclist/gnomes/1 (https://ieants.cc/magic/cclist/gnomes/1)
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Aug-17 01:49
2019/08/17

; added Disqus comment section for each card; replaced Dissenter link
; added alias replacement for 'sacrifice'

br />= @sac@ = sacrificebr />= @Sac@ = Sacrificebr />


2019/08/18

; updated instructions
; added spaces or punctuations after most alias replacements
; added alias replacements

br />= @t@ = targetbr />= @c@ = creaturebr />= @p@ = playerbr />= @pw@ = planeswalkerbr />= @a@ = artifactbr />= @e@ = enchantmentbr />= @o@ = opponentbr />


; rules text font size delta relative to original font size
; fixed linear text aligned left ; placement of text in vertical position (e.g. Vogon Split Card card types)
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Sep-07 14:48
2019/09/07

; updated hints
; added columns to rules text

   * Use <<<< to print to left column.
   * Use >>>> to print to right column.
   * Use <<>> to exit column mode.
   
Ex. rules text for Lovestruck Beast (see attachments):

<<<<
<Heart's Desire> {g}
<Sorcery -- Adventure>
Create a 1/1 white Human creature token.
>>>>
~ can't attack unless you control a 1/1 creature.
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Sep-27 16:58
2019/09/27

; reduce font size for planeswalkers rules

2019/09/28

; improve planeswalker rules height proportions to accommodate short abilities
; playing card frame ; double frame size ; art behind rules text
; mana cost options ; angle 180

2019/09/30

; clarify hints for mana symbols in rules text
; draw loyalty symbols after effect ; so loyalty symbols appear above dividing line
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Oct-17 09:41
2019/10/17

; rarity colors now gradient textures
; default set icon

2019/10/19

; cardfuncs_makeArtImage ; options property for confirm composite
; playing card frame ; rules text overlay inverse matches art

2019/10/23

; seticon better placement
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Nov-01 23:30
2019/11/01

; rules options ; xalign, yalign ; default center, center
; Vogon Full Art rules ; center bottom
; Playing card rules ; center center
; Flip frame ; fix 2nd rules text Y

2019/11/04

; rulestext newline ratio + flavortext padding ; smaller

2019/11/09

; vogon frames ; increase Name box height
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Nov-13 18:30
2019/11/13

; new Vogon LS frames ; landscape format, for arts that stretch lengthwise from left to right
see attachments for examples

2019/11/15

; vogonls ; plane type shouldn't behave like scene
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Nov-15 16:09
2019/11/15

; new Vogon GC frames ; like greeting card ; art (and seticon) on left half ; all else on right half ; see attachments for examples

Pro-tip: Watermark can be used as custom fancy borders or decoration for the right half.
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Nov-16 19:20
2019/11/16

; vogonhd ; show extrabar only if extra field has text ; scene like PW layout only if loyalty is set

2019/11/17 - 19

; vogon HD, LS, split frames ; drop shadow in rules box from top and right ; -30, 30, 53, 40% (LS 30%) ; makes art pop out toward viewer & lowers rules box's brightness (which steals the art's attention)

2019/11/22

; vogonhd ; redo frames to make art 3d illusion effect

Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2019-Nov-29 15:56
2019/11/29

; art, watermark, set icon ; allow special instructions at end of URL ; can chain multiple instructions
; hints updated
; over 126,000 cards created
; suppress deprecated function Imagick::setImageOpacity
; vogonls ; show rules box only if extra, rules, flavor texts exists

2019/11/30

; type icons moved into genre subfolders


Art instructions:


##crop, x, y, w, h
##rotate, degrees
##alpha, value (between 0.0 and 1.0)
##flip (around x-axis)
##flop (around y-axis)


ex

(Ichorid from Gatherer)

before

https://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=35923&type=card


after
https://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=35923&type=card##crop,26,30,171,137

ex.
Split cards

(Illusion;;Reality from Scryfall)

before
https://img.scryfall.com/cards/art_crop/front/8/e/8e7dd90a-4f93-43aa-b503-18289fdd571e.jpg?1562928558;;https://img.scryfall.com/cards/art_crop/front/8/e/8e7dd90a-4f93-43aa-b503-18289fdd571e.jpg?1562928558

after
https://img.scryfall.com/cards/art_crop/front/8/e/8e7dd90a-4f93-43aa-b503-18289fdd571e.jpg?1562928558##crop,0,0,377,254;;https://img.scryfall.com/cards/art_crop/front/8/e/8e7dd90a-4f93-43aa-b503-18289fdd571e.jpg?1562928558##crop,377,0,377,254

ex.
chaining multiple instructions

##crop, 0,0,300,250##flip##rotate, 90##alpha,0.5
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2020-Jan-07 02:58
2020/01/06

; normalize table
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2020-Feb-07 02:05
2020/02/07
; over 128,000 cards created

2020/02/18
; rules text ; mana brackets support contiguous length of mana codes
(e.g. {2ggg/w} is now valid)
; fonts ; Kelvinch, Ubuntu ; support Latin, Greek, Cyrillic

2020/02/27
; browser-side save filename for image becomes 'CARDNAME by CREATOR.png'
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2020-Mar-08 17:43
2020/03/08

; added symbols ; suits for playing cards ; {CDHS}
; image url ; allow underscore
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Jan-31 14:54
2020/05 - 2021/12

; legendary names ; text color enhanced
; new color option ; Blend ; for 2 or 3 colors
; hybrid mana 2/c
; playing card ; color = background color
; card importer ; https://ieants.cc/magic/ccimport
; replace CARDNAME with card's name
; ccrand ; allow creator field
; vogongc ; blend left half too
; flavor text ; regular font inside brackets []
; playing frames ; extra becomes title
; Overlay URL to image
; alias ; retain cursor position
; seticon ; new options ; keep ratio ; align right
; cardfuncs ; `` backticks = store and restore blocks of text, card traits
; leveler ; print flavortext
; split cards ; each half watermark, overlay
; PW rules text proportional to num abilities
; shade rules box partitions ; pw, levelers
; card type ; Avatar
; escape kara '\'
; card list ; form to input creator
; VOGON Split ; add flavor text, extras ; frame color from extra 2nd, 3rd text split
; custom mana ;
; over 146,000 cards created



2022/01/31

; added new frame ; Vogon VT ; for vertical art, like Saga

Saga syntax like Levelers. Use double semicolon ;; to create subsections, inside P/T and rules text.


2022/02/01-02

; new image manipulation command ; ##pad,direction,amount,color
; new image manipulation command ; ##tint,color
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Feb-02 23:40
Created Gab account and group to showcase cards created with Shena'Fu's online card creator.

"ShenaFusCardCreator" is user account: https://gab.com/ShenaFusCardCreator

"Custom Card Creations" is group name: https://gab.com/groups/59724
* Group is not restricted to this specific card creator. Anyone may showcase cards created from any online or offline card creator.
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Feb-15 16:06
2022/02/15

; new mana symbols ; hybrid Phyrexian ; tribrid
; new mana format ; A/B/C

* type hybrid Phyrexian and tribrid symbols in any order:


p/b/r = r/b/p = b/p/r , etc.

u/b/r = r/b/u = b/u/r , etc.



2022/02/20

; hybrid colorless + colored mana ; {c/d}

ex. {c/w} and {w/c} are equivalent. this creates a mana cost that can be paid with colorless mana or white mana

Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Mar-01 18:44
2022/03/01

; new frame ; Vogon Biz ; make your own business cards

Vogon Biz card options:
FieldOutputNote or example



2022/03/02

; custom mana ; now accepts URL to file ; VSV or JSON

* In VSV, each data row holds exactly two values. The first value is the mana code. The second value is the URL to the image.

* In JSON, each key is the mana code, and each value is the URL to the image.

Examples:

* https://ieants.cc/magic/custommana/business.vsv
* https://ieants.cc/magic/custommana/business.json

Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Mar-21 16:41
2022/03/21

; custom type icon URL

Some frames automatically display a type icon that represents the card's type. Usually shown in the top left corner of the card.

Now you can use your own type icon by providing a URL to the image. It works for all frames (except CBG Horizontal).

Ex.

- lesson - https://static.wikia.nocookie.net/mtgsalvation_gamepedia/images/b/b2/STX_Scroll_icon.jpg/revision/latest/scale-to-width-down/185?cb=20210331053459
- day / night (use ##crop command to get the correct half) - https://t00.deviantart.net/KfZi9h-OLoiCklG-ilfSn9leFjk=/fit-in/150x150/filters:no_upscale():origin()/pre00/3fe9/th/pre/f/2011/359/7/3/night_and_day_symbols_for_double_face_cards_by_greateralinoe-d4jr8mg.png


Split cards can use one or two URLS, which may be different images. Two URLS are separated by double semicolons ;; . If only one URL is given and no double semicolons, both halves get same icon.

Ex. same icons for both halves
http://myUrl1

Ex. different icons
http://myUrl1;;http://myUrl2

Ex. only left half gets icon
http://myUrl1;;

Ex. only right half gets icon
;;http://myUrl2
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Mar-23 20:02
2022/03/23

; new frames ; Vogon Deco ; Art Deco style, including fonts

In Vogon Deco, the P/T now also acts like Mana Cost. Use Mana Cost and P/T to display symbols in fixed positions on the card. Use space in Mana Cost or P/T to levae a position blank and advance to the next position. Mana Cost surrounds the art; P/T surrounds the rules.

Recommend you utilize Custom Mana to use your own symbols.

The symbols appear quite large, like some other CCGs. Vogon Deco is great frame if your CCG or card uses a lot of symbols. You can put even more (smaller) icons in the extra bar (which behaves like rules, so use rules syntax.)

Even for Magic, you can use icons for evergreen keywords, like flying, haste, trample, etc.




2022/03/24

; flavor text ; allow bold text with <>




2022/03/26

; use Stored Procedures




2022/03/27

; tribrid mana ; i/n/f = infinite ; c/h/a = chaos (planeswalk)
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Mar-31 12:18
Possible to allow custom or user defined frames ?



Any comments and suggestions welcome.
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Apr-03 00:48
2022/04/03




; new image manipulation command ; ##transparent,color,alpha
; color is HTML format: 6-hex-digits with leading hash #
; alpha is float between 0.0 and 1.0

Ex. turn cyan invisible
##transparent,#00ffff,0.0




; allow multiple images per field ; all image URLs ; delimiter double dollars $$

All image fields (seticon, typeicon, watermark, overlay, art) may accept multiple images. At the end of the URL, append $$ double dollars for each extra image. Each image can also have their own image manipulation commands. These commands go before the $$.

Not to be confused with double semicolons ;; that separates each half of a split card. $$ and ;; can work together to provide multiple images to one or both halves.

Ex. two images on top of each other
https://ieants.cc/magic/symbols/guilds/mana_rw.png$$https://ieants.cc/magic/symbols/guilds/mana_wu.png

Ex. two guild symbols side by side
https://ieants.cc/magic/symbols/guilds/mana_rw.png##pad,r,205##alpha,0.1618$$https://ieants.cc/magic/symbols/guilds/mana_wu.png##pad,l,205##alpha,0.1618

Here we pad images to "push" them to left or right. Then alpha the images.

Ex. each half of a split card gets two different watermarks (total 4 different watermarks)
https://ieants.cc/magic/symbols/guilds/mana_rw.png##pad,r,205##alpha,0.1618$$https://ieants.cc/magic/symbols/guilds/mana_wu.png##pad,l,205##alpha,0.1618;;https://ieants.cc/magic/symbols/guilds/mana_gw.png##pad,r,205##alpha,0.1618$$https://ieants.cc/magic/symbols/guilds/mana_br.png##pad,l,205##alpha,0.1618

Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Apr-17 07:20

2022/04/04 - 2022/04/17
 update hints
 image commands  raise to 9
 ccimg  allow query string options for w=, h=
 cclist, ccrand  resize images to h=523
 cclist, ccrand  open cards in new tabs where target=cardname or creator or _blank
 seticon  fix crash if invalid URL
 ##pad  allow transparent background
 PW or Leveler  fix crash if ability is blank
 vogon frames  darken seams on green frames
 playing card  art is see-through where rules texts are
 playing card  text is white if background is black
 blending  option for custom, premade blend masks

Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-14 18:43
2022/10/14

; allow custom frames ; provide URL to .von or .json file

Design your own frames. Arrange elements anywhere on the card as you please. Customize font sizes, arrange texts, resize art elements, select background images.

Choose "Custom" from the "Frame" drop down menu. Then, in the "Custom Frame" input field, provide a URL to a .von or .json file, that defines your custom frame.

sample files
https://ieants.cc/magic/customframe/cf-0.von
https://ieants.cc/magic/customframe/cf-1.von
https://ieants.cc/magic/customframe/cf-1.json
https://ieants.cc/magic/customframe/movie.von
https://ieants.cc/magic/customframe/fullartrules.von
https://ieants.cc/magic/customframe/sportscard.von


Also see attached sample images resulting from these custom frames.

Basic layout of the frame definition files is an array composed of sections (which are objects or hashes). The sections are drawn and painted on the card in the same order in the root array. So rearrange, add, or remove sections as you please.

Each section must state a section type. Each type has their own options parameters. Use "cf-0.von" as template; it contains most common options you may need for every section. Eventually I would write more detailed instructions in a dedicated help page.

Section types may be repeated. For instance, a text section to print the card name, and another text section to print card type. (Warning: Meta section should not be repeated. This creates a new image and undoes all previous sections. )

Text section prints everything on a single line. Rules section prints across multiple lines, and allows bold and italic and other advanced formatting.

For text and rules types, the "text" option may contain special code to insert strings from other fields. Such as inserting card name, card type, etc. Enclose them inside angled brackets and dash <- ->.
Ex.
`text`<-cardname->
`text`Illus. by <-artist->
`text`<-supertype-> <-cardtype->
`rulestext`<-rulestext->
`flavortext`<-flavortext->

For text, rules, and cost types, can also set the font types. Text and cost has only the "font" option. Rules has four options: textfont, boldfont, italicfont, and bolditalicfont. Omitting them will use default fonts.

Fonts are limited to my webhost server. Below are the fonts available. May add more upon request. Use exact spelling, including capitalization, and extension.

[spoiler]

[/spoiler]

You can also paint static images using the image-drawing sections (art, watermark, seticon, typeicon, overlay.) Their options are respectively: arturl, wmurl, seticonurl, typeiconurl, overlayurl. You can also apply image manipulation commands after the URL.

Ex.
,arturl,https://ieants.cc/images/kara-fansy_logo.png
,wmurl,https://ieants.cc/images/kara-fansy_logo.png##alpha,0.618

Note that different section types have nuances. for instance, watermark is always centered around given x,y options. seticon replaces magenta #FF00FF with rarity colors.



Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-15 19:13
2022/10/15 - 17

; frame_vogonhd, vogonvt ; bigger mana cost symbols
; cardfuncs ; multi-column tables ; using <<|C|, where C = number of columns ; subsequent pipes | will advance to next column ; pipes will create new rows when it reaches last column

Behavior for <<<< and >>>> are unchanged. These will create exactly two-column tables. Except pipes can also be used to advance these columns, and new rows if necessary.

All columns on the same row will have equal width.

Examples:

(Empty square brackets [] is used facilitate indentation.)

Column of digits:
<<|4|[]     9|[]     9|[]     9|[]     9
|[]     8|[]     8|[]     8|[]     8
|[]     7|[]     7|[]     7|[]     7
|[]     6|[]     6|[]     6|[]     6
|[]     5|[]     5|[]     5|[]     5
|[]     4|[]     4|[]     4|[]     4
|[]     3|[]     3|[]     3|[]     3
|[]     2|[]     2|[]     2|[]     2
|[]     1|[]     1|[]     1|[]     1
|[]     0|[]     0|[]     0|[]     0

Calendar:
<<|1|[]  2022                    October
<<|7|[]    M|[]    T|[]    W|[]    T|[]    F|[]    S|[]    S
|[]     |[]     |[]     |[]     |[]     |[]    1|[]    2
|[]    3|[]    4|[]    5|[]    6|[]    7|[]    8|[]    9
|[]   10|[]   11|[]   12|[]   13|[]   14|[]   15|[]   16
|[]   17|[]   18|[]   19|[]   20|[]   21|[]   22|[]   23
|[]   24|[]   25|[]   26|[]   27|[]   28|[]   29|[]   30
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-18 17:51
2022/10/18

; frame_custom ; conditions to match before drawing section

A section may have an optional array named "if". The section will only be drawn and appear on the card, if the "if" conditions are met. Each condition is represented by an array.

The root "if" is a nested array of any depth. Two basic types of condition arrays: boolean logic operators; and special functions to test the card's properties.

(In these examples, lines that begin with double parentheses (( , act as comments, and are allowed within VON files.)

Ex.
{
   ,section,overlay
   [if
      (( is planeswalker
      [,iscardtype,true,7]
   ]
}



Possible boolean operators are (at the time of this writing): AND, OR, NOT.

AND takes any number of conditions. All conditions must be met for this AND to return true.

Note the root "if" is essentially an AND condition. In this case, you must NOT prefix it with an AND declaration.

Ex. if card is artifact and creature:
[
   ,and
   [,iscardtype,true,1]
   [,iscardtype,true,4]
]

Ex. root if
[if
   [,iscardtype,true,1]
   [,iscardtype,true,4]
]

OR takes any number of conditions. One or more conditions must be met for this OR to return true.

Ex. if card is historic (legendary, artifact, and/or Saga):
[
   ,or
   [,issupertype,true,0]
   [,iscardtype,true,1]
   [,isintext,true,subtype,/Saga/]
]

NOT returns the opposite boolean value of the first given condition.

Ex. not a creature:
[
   ,not
   [,iscardtype,true,4]
]

Ex. nesting boolean conditions

[if
   (( if enchantment creature and/or a God
   [
      ,or
      [
         ,and
         [,iscardtype,true,2]
         [,iscardtype,true,4]
      ]
      [,isintext,true,subtype,/God/]
   ]
]

[if
   (( neither artifact nor creature
   [
      ,not
      [
         ,or
         [,iscardtype,true,1]
         [,iscardtype,true,4]
      ]
   ]
]



Other condition arrays are functions to test a card's property or other logic. These arrays have the following basic layout:

array[0] = the function's name
array[1] = the desired result, in boolean. See table below for valid boolean values.
array[...] = the remaining elements are parameters passed to the function, if necessary

List of Booleans
truefalse
10
yesno
onoff


The following functions are valid (at the time of this writing).

"iscardtype" takes an integer that corresponds to the card's type. This value can be found in the same order as the form in the card creator's page. Start counting from 0. (0 = tribal)

Ex. is a land
   [,iscardtype,yes,3]

Ex. NOT a land
   [,iscardtype,no,3]

"issupertype" takes an integer that corresponds to the card's supertype. This value can be found in the same order as the form in the card creator's page. Start counting from 0. (0 = legendary)

Ex. is basic
   [,issupertype,yes,1]

Ex. NOT basic
   [,issupertype,no,1]

"isintext" matches a pattern within a card's property.

List of Properties
PropertyAliases
cardnamename
manacostcostmana
powertoughnessptloyaltystat
subtype
extra
rulestextrules
flavortextflavor
seticon
typeicon
watermark
overlay
art
artist
creator


Patterns must be enclosed in identical delimiters. Legal delimiters are symbols such as "/|~#

Patterns may have modifiers after the second delimiter. A common one is "i" modifier, that matches both upper and lower case (makes the pattern case insensitive.)

List of Modifiers
ModifierUsage
iCase insensitive


Ex. "Circle" in card name
   [,isintext,true,name,"Circle"]

Ex. Warrior is NOT in subtype
   [,isintext,no,subtype,"Warrior"]

Ex. Matches "fish" but case doesn't matter
   [,isintext,yes,subtype,/fish/i]

Ex. extra field is not empty
[if
   [,isintext,true,extra,/.+/]
]
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-19 20:41
2022/10/19

; frame_custom ; save image temporarily

Can save current image temporarily, that can be redrawn later. Use section "saveimage" to save. Then in an image-drawing section (art, watermark, seticon, typeicon, overlay), put its URL as "<-savedimage->". You can also apply image manipulation commands.

Ex.
{
   ,section,saveimage
}
{
   ,section,art
   {options
      ,arturl,<-savedimage->##alpha,0.618
   }
}
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-21 00:01
2022/10/20

; frame_custom ; rulespw, ruleslevel, textlevel

Use section type "rulespw" and "ruleslevel" to print rules for Planeswalkers and Levelers, respectively. They act like rules section, but also take extra pertinent options.

Behoove to use conditions to make such sections only appear for relevant cards.

"rulespw" has extra options to customize the loyalty costs and lines that divide the abilities.

Ex.
   {
      ,section,rulespw
      [if
         (( is planeswalker
         [,iscardtype,true,7]
      ]
      {options
         ,fontsize,50.0
         ,minfontsize,12.0
         ,textboxx,130
         ,textboxy,580
         ,textboxwidth,550
         ,textboxheight,394

         ,lcfontsize,38.0
         ,loyaltycostx,5
         ,loyaltycosty,518
         ,loyaltycostw,120
         ,loyaltycosth,76

         ,dividerx,0
         ,dividerw,690
      }
   }

"ruleslevel" has extra options to customize the level information and lines that divide the abilities.

Ex.
   {
      ,section,ruleslevel
      [if
         (( is leveler, pt has ;;
         [,isintext,yes,pt,/;;/]
      ]
      {options
         ,fontsize,66.0
         ,minfontsize,12.0
         ,textletterx,0
         ,textlettery,0
         ,textboxx,86
         ,textboxy,580
         ,textboxwidth,584
         ,textboxheight,394
         ,rulestext,<-rules->
         ,flavortext,<-flavor->

         ,levelfontsize,44.0
         ,levelcostx,70
         ,levelcosty,580
         ,levelcostw,127
         ,levelcosth,88
         ,levelimage,https://ieants.cc/magic/frames/frame_vogonhd/levelup.png

         ,linex,6
         ,linew,673
         ,strokew,5
      }
   }

Use section "textlevel" to split the text across several parts. The text box will be divided evenly by the number of parts created by double semicolons ;;. Text will appear on the same row.

Extra options include "strokew" to define the width of the dividing lines, and "addflavor" which adds another part if flavor text is provided by the card. This latter is particularly useful if this text is placed alongside the rules box, and has an angle of 90 or 270 (which rotates the text clockwise by that many degrees).

Ex.
   {
      ,section,textlevel
      [if
         (( is leveler, pt has ;;
         [,isintext,yes,pt,/;;/]
      ]
      {options
         ,font,crimson-regular.ttf
         ,fontsize,40.0
         ,textx,33
         ,texty,572
         ,wmax,400
         ,textalign,center
         ,angle,270
         ,addflavor,true
         ,strokew,5
         ,text,<-pt->
      }
   }
   
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-23 12:59
2022/10/24

; frame_custom ; sections may "split"

Some sections may have an array called "split" that splits a section into several parts, delimited in its "*url" or "*text" fields by double semicolons ;;. Additional options can alter the parameters for each part. Such as placing them at different locations, or alignments, or angle. (Split doesn't cut an image into smaller parts. Rather, you can provide several URLs delimited by ;; and they will be all drawn on the card.)

"split" array holds more "options" objects. Options after the first one only need to specify the parameters that differ from the previous. All parameters will carry to subsequent parts unless altered again. If no parameters differ, provide an empty object, to denote an extra part exists.

The first options object can be outside or inside the split array. If outside, it must still be called "options". But objects inside the array do not and should not be named.

Ex. first options inside split. total 4 parts, all inside.
Where manacost field contains four parts, like "g;;w;;u;;b"
   {
      ,section,cost
      [split
         {
            ,manacostx,350
            ,manacosty,76
            ,manaiconwidth,48
            ,manaiconheight,48
            ,manaalign,left
            ,altmana,true
            ,manacost,<-cost->
         }
         {
            ,manaalign,right
            ,manacosty,600
         }
         {
            ,vertical,true
            ,manacosty,200
         }
         {
            ,manaalign,center
            ,manacosty,400
         }
      ]
   }

Ex. first options outside split. total 3 parts: 1 outside, 2 inside.
Where powertoughness field contains three parts, like "1/1;;2/2;;4/4"
   {
      ,section,text
      {options
         ,fontsize,48.0
         ,textx,375
         ,texty,39
         ,wmax,620
         ,textalign,center
         ,text,<-pt->
      }
      [split
         {
            ,texty,339
         }
         {
         }
      ]
   }

Sample VON files
https://ieants.cc/magic/customframe/split.von
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-26 12:45
2022/10/26

; allow text outlines ; outlinecolor, outlineratio
; allow shadow width multiplier ; shadowratio
; allow turn text into all upper- or lower-case ; allupper, alllower



Ex. in custom frames
[[VON]]

[
   {
      ,section,text
      {options
         ,fontsize,48.0
         ,textx,375
         ,texty,39
         ,wmax,620
         ,shadowcolor,#71218A
         ,shadowratio,0.2
         ,outlinecolor,#ff0000
         ,outlineratio,0.02
         ,allupper,true
         ,textalign,center
         ,text,<-subtype->
      }
   }
   {
      ,section,ruleslevel
      {options
         ,fontsize,50.0
         ,minfontsize,12.0
         ,textletterx,0
         ,textlettery,0
         ,textboxx,86
         ,textboxy,580
         ,textboxwidth,584
         ,textboxheight,394
         ,textcolor,#ffffff
         ,shadowcolor,#000000
         ,shadowratio,0.2
         ,outlinecolor,#00ff00
         ,outlineratio,0.01
         ,alllower,true
         ,rulestext,<-rulestext->
         ,flavortext,<-flavortext->
      }
   }
]
Title: Re: Shena'Fu's Online Card Creator
Post by: Den on 2022-Oct-29 03:18
2022/10/29

; rules text ; variable width tables

format is :
<<#comma-separated values|
Where values are relative sizes for each column.  Sizes of 0 zeros are ignored. so ex. 3,1,3 will have left and right columns that are 3 times wider than central column.

previous methods of creating tables, namely <<<< and <<|number| , still create equal-width columns.

all methods still allow pipes | , to advance columns.

Ex. These three lines of codes produce identical tables of two columns of equal widths
<<<<

<<|2|

<<#1,1|

Ex. column ratios 5-1-4
<<#5,1,4|Lengthy header|number|lengthy notes

Ex. column percentages 50-10-40
<<#50,10,40|Lengthy header|number|lengthy notes

Ex. stats sheet
<<#1,3,1,3|14|Fitness
|8|Intellect
|11|Strength
|11|Wisdom
|12|Dexterity
|14|Charisma