Page 1 of 10

Words that Cards.txt recognizes

PostPosted: 22 Oct 2008, 17:41
by mtgrares
There seems to be some confusion about what keywords that cards.txt recognizes. The only valid keywords are in readme.html and are listed below. All the other card text that you see is just text, it doesn't do anything.

Defender
Fear
Flash
Flying
Forestwalk
Haste
Indestructible
Islandwalk
Mountainwalk
Plainswalk
Pump B: 1/1
Reach
Shadow
Swampwalk
tap: add 1
tap: add B
tap: add G
tap: add R
tap: add U
tap: add W
This creature can block as though it had flying.
This creature can block only creatures with flying.
This creature cannot block
Trample
Unblockable
Vigilance

Re: Words that Cards.txt recognizes

PostPosted: 22 Oct 2008, 17:44
by GandoTheBard
I dont think there is any confusion on our end...those words are the limit for YOUR version. The 10-18 version has some changes to it compiled by jpb and contributed by Rob and Dennis (afaik).

Re: Words that Cards.txt recognizes

PostPosted: 22 Oct 2008, 19:59
by DennisBergkamp
I haven't tried adding any keywords (yet). But it's true, I think Rob added a bunch.

Re: Words that Cards.txt recognizes

PostPosted: 22 Oct 2008, 21:19
by jpb
cycling and regenerate have been added to 10-18. comes into play tapped has not. You will need to reference posts on this forum to learn how to use these keywords.

Re: Words that Cards.txt recognizes

PostPosted: 23 Oct 2008, 02:59
by Rob Cashwalker
The only ones that made it in so far are:

Cycling:{mana cost}

and

RegenerateMe:{mana cost}

Cycling currently doesn't work with lands. Neither Pump, Cycling or RegenerateMe can be added to cards with explicit code definitions.

How sweet it is!

PostPosted: 04 Dec 2008, 23:53
by Chris H.
I want to thank everyone for their efforts in creating Words that Cards.txt recognizes.



Image


Image

Re: Words that Cards.txt recognizes

PostPosted: 05 Dec 2008, 01:32
by Chris H.
While adding the Hellkite Overlord card I discovered that RegenerateMe: will take two different mana costs for activating:


Hellkite Overlord
4 B R R G
Creature Dragon
no text
8/8
Flying
Trample
Haste
Pump R: 1/0
RegenerateMe:B G


The Pump ability on the other hand appears to only take a single mana cost to activate and will not use negative numbers. I'm not asking anyone to make any changes to the code base to accommodate me. I tried to add the following cards and had no success. I tried. #-o


Battlefield Percher
3 B B
Creature Bird
no text
2/2
Flying
This creature can block only creatures with flying.
Pump 1 B: 1/1


Cavern Thoctar
5 G
Creature Beast
no text
5/5
Pump 1 R: 1/0


Foxfire Oak
5 G
Creature Treefolk Shaman
no text
3/6
Pump R R: 3/0
Pump R G: 3/0
Pump G G: 3/0


Rune-Cervin Rider
3 W
Creature Elf Knight
no text
2/2
Flying
Pump G G: 1/1
Pump G W: 1/1
Pump W W: 1/1


Talonrend
4 U
Creature Elemental
no text
0/5
Flying
Pump U: +1/-1
Pump R: +1/-1


Tyrranax
4 G G
Creature Beast
no text
5/4
Pump 1 G: -1/+1

Re: Words that Cards.txt recognizes

PostPosted: 05 Dec 2008, 12:36
by nixrage
what is pump? is that the add +x/+x to a creature?

Re: Words that Cards.txt recognizes

PostPosted: 05 Dec 2008, 13:56
by Chris H.
nixrage wrote:what is pump? is that the add +x/+x to a creature?
Yes. There is a list of words that are currently recognized that helps us to add new cards.

Inside of the forge folder there is a file named "cards.txt" that contains the data for the cards that are currently included within the game. Load this file into a text editor and take a look. 8-[

Be careful not to change anything in this file without having a backup. :oops:

You could try to make up a fantasy card to give yourself some practice in this area. Search for an entry named "Tortuga". This is a fantasy card created by Rares. Somewhere on his blog site you can find a matching jpg for this card which you can then add to your copy of the game. :idea:

Image

Re: Words that Cards.txt recognizes

PostPosted: 05 Dec 2008, 15:30
by Rob Cashwalker
Pump as written by rares, would only accept a single character mana cost, and only positive pump values.

I had made up PumpPT, PumpK and PumpPTK to deal with multi-character mana costs, positive or negative values, and keywords. It hasn't been added to the source yet.

Re: Words that Cards.txt recognizes

PostPosted: 05 Dec 2008, 15:43
by Chris H.
Rob Cashwalker wrote:I had made up PumpPT, PumpK and PumpPTK to deal with multi-character mana costs, positive or negative values, and keywords. It hasn't been added to the source yet.
I will keep the data for these several cards incase you decide to have "PumpPT, PumpK and PumpPTK" added to the source.

While looking through the cards.txt file I found the following:

Darkling Stalker
3 B
Creature Shade Spirit
no text
1/1
RegenerateMe:B
PTPump B:+1/+1

The rest of the creatures use the Pump command. Curious. :?:

Re: Words that Cards.txt recognizes

PostPosted: 05 Dec 2008, 17:29
by mtgrares
I don't know the legal values for PumpPT, PumpK and PumpPTK. jpb added them to the source. I'll add cashwalker's code if you want to send it to me (mtgrares yahoo com) or post it here, either way is fine.

Re: Words that Cards.txt recognizes

PostPosted: 05 Dec 2008, 17:52
by Rob Cashwalker
It's been so long since I did those pumps.... Yeah, PTPump is the right syntax.

The mana cost is any space-delimited string of chracters, just like the mana cost of a card.

The P/T pumps can be just the numbers for positive, or you can include the explicit plus sign. Negatives would of course require the minus sign. I didn't implement a good AI for using a negative ability, and I don't think the cards I had submitted along with it included any.

The Keyword pumps allow any of the usual keywords that cards.txt allows at any given time. EXCEPT pumping a creature to have a pump keyword, because the delimiters ":" and "/" in the keyword syntax would break the initial KPump code.... ie:
"KPump R:PTPump R:+1/+0"
Would not work, but
"KPump U:Flying"
would work as expected
and I'm not sure if I implemented removal of a keyword like
"KPump W:-Defender"
but I probably should.

PTKPump would follow the following syntax:
"PTKPump R G:+1/+0/Trample"

Re: Words that Cards.txt recognizes

PostPosted: 06 Dec 2008, 18:25
by Chris H.
Chris H. wrote:While looking through the cards.txt file I found the following:

Darkling Stalker
3 B
Creature Shade Spirit
no text
1/1
RegenerateMe:B
PTPump B:+1/+1

The rest of the creatures use the Pump command. Curious. :?:
I put together a Darkling Stalker play-test deck. I discovered that I could regenerate the Darkling Stalker but could not pump it up. I tried PTPump and PumpPT and several other possibilities. I finally changed it to the Pump command and it worked correctly.

The game is interpreting the PTPump command as a text string to display in the text box. The game recognizes the word Pump and if anything is wrong with the data that follows then the game will display a simple error message when starting.

An updated Words that Cards.txt recognizes

PostPosted: 07 Dec 2008, 01:17
by Chris H.
While studying the cards.txt file I came across the following card:


Charcoal Diamond
2
Artifact
no text
tap: add B
Comes into play tapped.


Hmmm. As a test I created a fake card with only one ability, "Comes into play tapped."

Notice the period at the end of the string. I placed this card into a play test deck and discovered that the fake card came into place tapped.


It looks like the list of valid keywords that cards.txt recognizes are:

Comes into play tapped.
Cycling:{mana cost}
Defender
Fear
Flash
Flying
Forestwalk
Haste
Indestructible
Islandwalk
Mountainwalk
Plainswalk
Pump B: 1/1
Reach
RegenerateMe:{mana cost}
Shadow
Swampwalk
tap: add 1
tap: add B
tap: add G
tap: add R
tap: add U
tap: add W
This creature can block as though it had flying.
This creature can block only creatures with flying.
This creature cannot block
Trample
Unblockable
Vigilance