Moving away from cards.txt
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
46 posts
• Page 3 of 4 • 1, 2, 3, 4
Re: Moving away from cards.txt
by slapshot5 » 21 Sep 2010, 03:57
Ok. Thanks. I've committed that fix.Rob Cashwalker wrote:That is the correct fix.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Moving away from cards.txt
by slapshot5 » 21 Sep 2010, 04:02
With the new individual cards files, how would people feel about adding lines that are parsed as comments? Comments could start with a "#". Comments would only be valid on a per line basis. i.e.
This would be allowed:
-slapshot5
This would be allowed:
- Code: Select all
Name:Judge of Currents
ManaCost:1 W
Types:Creature Merfolk Wizard
Text:no text
PT:1/1
#Comment - my whenever keyword works!
K:WheneverKeyword:BecomesTapped:Type/Merfolk:Play:ModifyLife/1:ControllingPlayer_Self:ASAP:Yes_No:Initiator - OwnedByController:Whenever a Merfolk you control becomes tapped, you may gain 1 life.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/judge_of_currents.jpg
End
- Code: Select all
Name:Judge of Currents
ManaCost:1 W
Types:Creature Merfolk Wizard
Text:no text
PT:1/1 #Invalid comment
K:WheneverKeyword:BecomesTapped:Type/Merfolk:Play:ModifyLife/1:ControllingPlayer_Self:ASAP:Yes_No:Initiator - OwnedByController:Whenever a Merfolk you control becomes tapped, you may gain 1 life.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/judge_of_currents.jpg
End
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Moving away from cards.txt
by Rob Cashwalker » 21 Sep 2010, 11:26
Thanks for the fix. I forgot to do it last night before going to sleep.
Comments sound good.
Comments sound good.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Moving away from cards.txt
by friarsol » 21 Sep 2010, 17:41
So I just updated the Python script to handle the changes from cards.txt to cardsfolder/. This is based off local changes I had done to add Sets into cards.txt so this will add Sets into the Data files as well. Of course, we don't have to use them until things are setup, but I figured it'd be good to have it.
How do we want to handle sets? After running the updated script, this is the output for Abyssal Specter:
It seems weird now that we're parsing Name, ManaCost etc that Rarity, Picture, and Sets should be SVars. They really should just have their own parsing code block near the others. Thoughts?
How do we want to handle sets? After running the updated script, this is the output for Abyssal Specter:
- Code: Select all
Name:Abyssal Specter
ManaCost:2 B B
Types:Creature Specter
Text:Whenever Abyssal Specter deals damage to a player, that player discards a card.
PT:2/3
K:Flying
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/abyssal_specter.jpg
SVar:Sets:8ED,7ED,6ED,ICE,5ED
End
It seems weird now that we're parsing Name, ManaCost etc that Rarity, Picture, and Sets should be SVars. They really should just have their own parsing code block near the others. Thoughts?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Moving away from cards.txt
by slapshot5 » 21 Sep 2010, 18:18
We may want to associate rarities with sets. Clone for example is Rare in M10, but Uncommon in Revised.friarsol wrote:I figure a comma delimited list is probably all we need for Sets.
I would say they don't need to be SVars. I don't know what Rob's full master plan was though.friarsol wrote:It seems weird now that we're parsing Name, ManaCost etc that Rarity, Picture, and Sets should be SVars. They really should just have their own parsing code block near the others. Thoughts?
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Moving away from cards.txt
by DennisBergkamp » 21 Sep 2010, 18:59
Comments sound great!
As for the sets, this would indeed be a great feature... especially for drafting / questing.
As for the sets, this would indeed be a great feature... especially for drafting / questing.
-

DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Moving away from cards.txt
by Rob Cashwalker » 21 Sep 2010, 19:34
"Full Master plan"... great now I've entered the realm of dictators.....
Anyway...
Until these changes are made, the SVars need to stay as is. But to prepare, here is what I was thinking, and we can debate the pros and cons.
Set:{COD}:{Rarity}:{Set-specificPictureURL}
Set:{COD}:{Rarity}:{Set-specificPictureURL}
...
At some point, the madness of hard-coded rules text being assembled in the Card.getText() is going to bite us, so I'd like to have a separate text field automatically updated:
Oracle:{OracleText}
Anyway...
Until these changes are made, the SVars need to stay as is. But to prepare, here is what I was thinking, and we can debate the pros and cons.
Set:{COD}:{Rarity}:{Set-specificPictureURL}
Set:{COD}:{Rarity}:{Set-specificPictureURL}
...
At some point, the madness of hard-coded rules text being assembled in the Card.getText() is going to bite us, so I'd like to have a separate text field automatically updated:
Oracle:{OracleText}
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Moving away from cards.txt
by friarsol » 21 Sep 2010, 20:16
I think I like SetInfo better than just Set.Rob Cashwalker wrote:"Full Master plan"... great now I've entered the realm of dictators.....![]()
Anyway...
Until these changes are made, the SVars need to stay as is. But to prepare, here is what I was thinking, and we can debate the pros and cons.
Set:{COD}:{Rarity}:{Set-specificPictureURL}
Set:{COD}:{Rarity}:{Set-specificPictureURL}
...
At some point, the madness of hard-coded rules text being assembled in the Card.getText() is going to bite us, so I'd like to have a separate text field automatically updated:
Oracle:{OracleText}
I'm fine with an Oracle field that's only edited by the Script. Would it mostly be used for the Card Description? Trying to parse it for Ability description would probably be a nightmare.
I'll keep the Script locally until we figure out what we want with it.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Moving away from cards.txt
by Rob Cashwalker » 21 Sep 2010, 20:30
SetInfo it is.
Yes, just for the displayed card text. All the keywords, abilities and effects will carry their own text and descriptions and only use them when they need to prompt the user.
Yes, just for the displayed card text. All the keywords, abilities and effects will carry their own text and descriptions and only use them when they need to prompt the user.
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Moving away from cards.txt
by Chris H. » 21 Sep 2010, 21:30
`At some point, the madness of hard-coded rules text being assembled in the Card.getText() is going to bite us
Yeah, I have a lot of recent teeth marks to show off.
`so I'd like to have a separate text field automatically updated:
Oracle:{OracleText}
When this happens, would it make sense to also keep the "Text:" field? With the rules moved to the Oracle field, the Text field could then be used for the occasional Note. This would help to keep them separate from one another.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Moving away from cards.txt
by Rob Cashwalker » 21 Sep 2010, 23:39
Wouldn't it make more sense to have a field or SVar specifically for the occasional note?
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Moving away from cards.txt
by Chris H. » 21 Sep 2010, 23:56
`Rob Cashwalker wrote:Wouldn't it make more sense to have a field or SVar specifically for the occasional note?
I thought that I would bring it up while the planning stage is moving forward. I think that a field or a SVar that is designed for the occasional note would be a good thing.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Moving away from cards.txt
by Rob Cashwalker » 22 Sep 2010, 03:21
Here's some of my vision regarding the next generation of the keyword script. mtgrares, this may look familiar.
shock.txt:
shock.txt:
- Code: Select all
Name:Shock
ManaCost:R
Types:Instant
Text:Shock deals 2 damage to target creature or player.
Spell:DealDamage:Tgts$Creature,Player:NumDmg$2
End
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Moving away from cards.txt
by friarsol » 22 Sep 2010, 04:03
I bet that turns into this without too much trouble:
- Code: Select all
Name:Shrapnel Blast
Cost:1 R Sac<1/Artifact>
Types:Instant
Text:As an additional cost to play Shrapnel Blast, sacrifice an artifact. Shrapnel Blast deals 5 damage to target creature or player.
Spell:DealDamage:Tgts$Creature,Player:NumDmg$5
End
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Moving away from cards.txt
by Rob Cashwalker » 22 Sep 2010, 04:38
Hmm... now we're getting somewhere.
It also will easily become this.
prodigal_pyromancer.txt:
It also will easily become this.
prodigal_pyromancer.txt:
- Code: Select all
Name:Prodigal Pyromancer
Cost:2 R
Types:Creature Human Wizard
Text:Tap: Prodigal Pyromancer deals 1 damage to target creature or player.
PT:1/1
ActAbility:DealDamage:Tgts$Creature,Player:NumDmg$1:Cost$Tap
End
The Force will be with you, Always.
-

Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
46 posts
• Page 3 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 23 guests