Pictures and Rarity as SVars and Conversion Scripts
 Posted: 10 Aug 2010, 04:54
Posted: 10 Aug 2010, 04:54So I'm almost done writing the migration script to go through the rarity & pictures files and add them in as SVars inside the cards.txt file and have found a few more cards that seem to exist in the text files, but are no longer in cards.txt
These are:
Warp Artifact
Feedback
Fiery Mantle
I'm not sure exactly why these are gone. But once we move over to a single file system, those remains will be lost. Nothing major, but if they were in there as reminders, I guess this will be the last one.
Here's a sample of one of the entries in cards.txt after the migration has taken place:
One: What should we do for alternate pictures? All the basic and snow basic lands have like 3 additional pictures. Do we want to take them on as a comma delimited list?
So we would have
SVar:Picture:http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159285,http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159286,http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159284,http://resources.wizards.com/magic/cards/unh/en-us/card73958.jpg
For the 10 basic lands.
And when Picture is parsed, it would just have to split(',') the String into an Array (or ArrayList). And do whatever it does now to choose.
Two: The not very old, but soon to be obsolete python script needs to be updated to insert into cards.txt, but grabbing the same info it already does. This shouldn't be all that difficult to accomplish, and when I find some time will be able to get that up.
The main other thing needed to be done is change code to look for Picture and Rarity SVars and properly use them. I think Rob said he was already looking into that which is great. It's easy when you only have to do half the work 
 
Maybe we could split up the Card class into a CardBase with a lookup to a CardDetail. The CardBase could be used for things like the Deck Editor and the Card Shop, since all it really needs is things found in cards.txt (Name, CC, Image, Rarity, Card Text) but doesn't need all of the bloat of the in-game related stuff. And then while playing in game, we can just load in 120 or so Card Details we need when we start up the game? We might take a decent load of the heap by doing it this way.
			These are:
Warp Artifact
Feedback
Fiery Mantle
I'm not sure exactly why these are gone. But once we move over to a single file system, those remains will be lost. Nothing major, but if they were in there as reminders, I guess this will be the last one.
Here's a sample of one of the entries in cards.txt after the migration has taken place:
- Code: Select all
- Wild Nacatl
 G
 Creature Cat Warrior
 Wild Nacatl gets +1/+1 as long as you control a Mountain. Wild Nacatl gets +1/+1 as long as you control a Plains.
 1/1
 SVar:Rarity:Common
 SVar:Picture:http://www.wizards.com/global/images/magic/general/wild_nacatl.jpg
One: What should we do for alternate pictures? All the basic and snow basic lands have like 3 additional pictures. Do we want to take them on as a comma delimited list?
So we would have
SVar:Picture:http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159285,http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159286,http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=159284,http://resources.wizards.com/magic/cards/unh/en-us/card73958.jpg
For the 10 basic lands.
And when Picture is parsed, it would just have to split(',') the String into an Array (or ArrayList). And do whatever it does now to choose.
Two: The not very old, but soon to be obsolete python script needs to be updated to insert into cards.txt, but grabbing the same info it already does. This shouldn't be all that difficult to accomplish, and when I find some time will be able to get that up.
The main other thing needed to be done is change code to look for Picture and Rarity SVars and properly use them. I think Rob said he was already looking into that which is great. It's easy when you only have to do half the work
 
 Maybe we could split up the Card class into a CardBase with a lookup to a CardDetail. The CardBase could be used for things like the Deck Editor and the Card Shop, since all it really needs is things found in cards.txt (Name, CC, Image, Rarity, Card Text) but doesn't need all of the bloat of the in-game related stuff. And then while playing in game, we can just load in 120 or so Card Details we need when we start up the game? We might take a decent load of the heap by doing it this way.


