Author Topic: How to use BBC tags for Magic content  (Read 14461 times)

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 991
  • Selina is my Superstar
    • View Profile
    • Amuseum
How to use BBC tags for Magic content
« on: October 24, 2008, 09:10:44 AM »
I added some useful BBC tags for Magic cards, symbols, and decks.

When you are writing a message, you can see three rows of BBC tags above the text box. The third row is for Magic. The icons in order are (1) card, (2) mana symbol, and (3) deck.

CARD LINK
The first icon with the Magic card back is for creating a link to autocard. The code for a single card is
Code: [Select]
[card]cardname[/card]
So for example
Code: [Select]
[card]zap[/card]will create
zap

If you want to type an alternate name, put the real card name inside the opening brackets, like so
Code: [Select]
[card=shadowmage infiltrator]Finkel[/card]will create
Finkel

MANA SYMBOLS
The second icon is for mana symbols and other symbols; it has all five colored mana symbols in a circle. The code for inserting symbols is
Code: [Select]
[mana]CC[/mana]
Put the entire cost inside, like so
Code: [Select]
[mana]1RG[/mana]and it comes out


Hybrids halves should be separated by a slash '/', in any order. Both of these work:
Code: [Select]
[mana]R/G[/mana]
Code: [Select]
[mana]G/R[/mana]

The monocolor hybrids use the digit 2 in place of a color, in any order. Both of these work:
Code: [Select]
[mana]2/w[/mana]
Code: [Select]
[mana]w/2[/mana]

Put a space between the numbers if you have two consecutively, but want them to show up separately. For instance, a number and a monocolor hybrid should be separated by a space.
Code: [Select]
[mana]4 2/w[/mana]
Code: [Select]
[mana]2 4[/mana]

These are the valid letters, numbers, and hybrids that can be used within the mana tags:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 i

w u b r g c x y z s t q p k

w/u u/w u/b b/u b/r r/b r/g g/r w/b b/w u/r r/u b/g g/b r/w w/r g/u u/g

2/w w/2 2/u u/2 2/b b/2 2/r r/2 2/g g/2

p/w w/p p/u u/p p/b b/p p/r r/p p/g g/p p/c c/p



SMILEYS
Alternatively, you can use the 'smiley' mana icons, listed after the more familiar smileys. Just click the ones you need and the mana symbols will be added right at the text cursor. The codes for the Magic smileys all start with :m followed by the number or letter of the color(s). For instance,
Code: [Select]
:m4 :mwproduces
:m4 :mw

Hybrid mana use the order of the color or number in the top left half, then the bottom right half. For instance,
Code: [Select]
:m2wmakes
:m2w

Phyrexian hybrid mana use mphC, where C is the color. For instance,
Code: [Select]
:mphwmakes
:mphw

Smiley code for Planeswalk and Chaos/Planechase symbol are
Code: [Select]
:mpw
:mpc
:mpw :mpc


DECKLIST
The third icon turns a list of cards into a deck listing with autocards. The code to produce a deck list formatting is
Code: [Select]
[deck=decktitle]decklist[/deck]
The deck title is optional. If you want to leave it blank, then use the simpler code
Code: [Select]
[deck]decklist[/deck]
If you have a sideboard, simply put the word "sideboard" on its own line, then the cards below it.

Comments can come after a card if they are put inside curly brackets or after double dash, e.g.:
Code: [Select]
3 Healing Salve {comment }
1 Flash -- restricted

For example, using the following code to create a decklist
Code: [Select]
[deck=Merfish]
--Lands
4 Wanderwine Hub
4 Adarkar Wastes
2 Horizon Canopy
4 Terramorphic Expanse
3 Gemstone Mine
2 Faerie Conclave
3 Snow-Covered Island
1 Snow-Covered Plains
1 Snow-Covered Forest

--Creatures
4 Silvergill Adept
4 Riptide Pilferer
4 Lord of Atlantis --[b]my namesake on other forums[/b]
4 Merrow Reejerey
3 Tarmogoyf --[mana]1g[/mana]

--Spells
4Ponder
3Psionic Blast
3 Unstable Mutation
4 Bound in Silence
3 Ajani Goldmane {should be [card]Reveillark[/card]}

--sideboard
4 Unsummon
4 Rune Snag
4 Oblivion Ring
3 Disenchant
[/deck]

will produce a nicely formatted deck listing:
Apprentice MTGO
 Merfish
--Lands
4 Wanderwine Hub
4 Adarkar Wastes
2 Horizon Canopy
4 Terramorphic Expanse
3 Gemstone Mine
2 Faerie Conclave
3 Snow-Covered Island
1 Snow-Covered Plains
1 Snow-Covered Forest

--Creatures
4 Silvergill Adept
4 Riptide Pilferer
4 Lord of Atlantis --my namesake on other forums
4 Merrow Reejerey
3 Tarmogoyf --
--Spells
4 Ponder
3 Psionic Blast
3 Unstable Mutation
4 Bound in Silence
3 Ajani Goldmane {should be Reveillark}
--sideboard
4 Unsummon
4 Rune Snag
4 Oblivion Ring
3 Disenchant

Note: If you input a deck list from Magic WorkStation or wizards forums, our script is smart enough to ignore the set IDs and count separators. This way, you can simply cut and paste; don't worry about editing the text just so autocard will come up correctly. For instance, if you have something like this:
Code: [Select]
[deck]
 {MWS set tags}
4 [EVE] Archon of Justice

 {wizards forums}
4*Ballynock Trapper {input}
4 x Cenn's Enlistment {output}

 {other ways to count card}
x4 Zap
4x Flare
Xira Arien
[/deck]

all the set IDs are simply ignored, giving a cleaner look:
Apprentice MTGO
 Decklist
{MWS set tags}
4 Archon of Justice

 {wizards forums}
4 Ballynock Trapper {input}
4 Cenn's Enlistment {output}
{other ways to count card}
4 Zap
4 Flare
Xira Arien

Apprentice MTGO
 Decklist
--range of numbers
1-2 Frogmite
3-4 Eternal Witness

FYI: the regex pattern I use is /^\s*(\/\/.*|SB: )?(?:x?(?=\d))?(\d+(?=\s*)?\-?(?=\s*)?\d*)?\s*(\s?x |\*|\[\w+?])?\s*([^{]*?)\s*?({.*}|--.*)?\s*$/

DISCLAIMER
This site is NOT affiliated with Magic's creators, Wizards of the Coast. All card images and mana symbols are copyright Wizards of the Coast. Code modifications to the forum software, SMF, are made by me and are in the public domain. The SMF mod can be downloaded at http://custom.simplemachines.org/mods/index.php?mod=2364
« Last Edit: January 21, 2016, 07:54:45 PM by Den »

Apidea

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: How to use BBC tags for Magic content
« Reply #1 on: February 08, 2011, 02:45:06 AM »
Great mod, Is It possible install to smf 1.1.12?

Den

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 991
  • Selina is my Superstar
    • View Profile
    • Amuseum
Re: How to use BBC tags for Magic content
« Reply #2 on: February 09, 2011, 06:50:20 PM »
I don't have 1.1.2 forum, so I wouldn't be able to test it. However, you can download the mod and extract the source code. Mainly you need the new functions and new BBC codes inserted into the array. Pay attention to the global variables which might be different between 1.x and 2.x; i.e. $modSettings, $settings, $context, etc..

ADMIN

  • Administrator
  • Member
  • *****
  • Posts: 22
    • View Profile
Phyrexian Hybrid Mana Symbols
« Reply #3 on: April 19, 2011, 11:04:46 PM »
Phyrexian Hybrid Mana Symbols (in SMF Package v1.3)

Code: [Select]
[mana]p/C[/mana] [mana]C/p[/mana]
e.g. [mana]p/w[/mana] [mana]w/p[/mana]







Code: [Select]
:mphC
e.g. :mphw
:mphw
:mphu
:mphb
:mphr
:mphg
:mphc
« Last Edit: January 21, 2016, 08:53:46 PM by ADMIN »


ADMIN

  • Administrator
  • Member
  • *****
  • Posts: 22
    • View Profile
Re: How to use BBC tags for Magic content
« Reply #5 on: January 21, 2016, 08:54:12 PM »
v1.8
added colorless (diamond) mana, using letter c
added infinite mana, using letter i
changed chaos letter to k