CardDb exception
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
41 posts
• Page 3 of 3 • 1, 2, 3
Re: CardDb exception
by Max mtg » 04 Sep 2011, 11:14
The "NEW" column is back in shop AND deckeditor for quest mode.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: CardDb exception
by Sloth » 04 Sep 2011, 12:55
Good work Max. This feature is much appreciated (and much more obvious now).Max mtg wrote:The "NEW" column is back in shop AND deckeditor for quest mode.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: CardDb exception
by friarsol » 04 Sep 2011, 14:20
Yea that should work.Max mtg wrote:10182 - added a column with number of decks.
May I close issue 102 with that?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: CardDb exception
by ArsenalNut » 04 Sep 2011, 15:50
Reading the Innistrad script thread, reminded me about the missing SetInfo exception. I know the SetInfo line is in the process of being deprecated. Is that going to be done before the next biweekly release?
The current release doesn't need SetInfo line for testing card scripts like Innistrad but a release based on the current trunk would. This might cause a lot of crash reports if people aren't aware of the change.
The current release doesn't need SetInfo line for testing card scripts like Innistrad but a release based on the current trunk would. This might cause a lot of crash reports if people aren't aware of the change.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: CardDb exception
by Max mtg » 04 Sep 2011, 16:49
If we are loading card data from cardname.txt, SetInfo should not be ever deprecated. It is a mandatory field, no card without it would show in deckeditor. And it does not, there is an exception thrown during load of such cards.ArsenalNut wrote:Reading the Innistrad script thread, reminded me about the missing SetInfo exception. I know the SetInfo line is in the process of being deprecated. Is that going to be done before the next biweekly release?
The current release doesn't need SetInfo line for testing card scripts like Innistrad but a release based on the current trunk would. This might cause a lot of crash reports if people aren't aware of the change.
A way to add support of Innistrad is like this:
1. Add a line to res\blockdata\setdata.txt
- Code: Select all
Index:78|Code2:ISD|Code3:ISD|Name:Innistrad
UPD: already done #1
Did I get you right that a clear error message should be added there instead of just throwing?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: CardDb exception
by ArsenalNut » 04 Sep 2011, 18:27
I may have miss interpreted FriarSol intentions about SetInfo. He was only asking about the URL part of the SetInfo. (See http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=5272)Max mtg wrote:
If we are loading card data from cardname.txt, SetInfo should not be ever deprecated. It is a mandatory field, no card without it would show in deckeditor. And it does not, there is an exception thrown during load of such cards.
If the SetInfo is going to be required for card scripts in future releases, I think a clear error message is better than throwing an exception which generates a crash report. Can you setup it up so that cards with missing info are just ignored and the user is given a message that the card was ignored?Max mtg wrote:Did I get you right that a clear error message should be added there instead of just throwing?
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: CardDb exception
by Max mtg » 04 Sep 2011, 18:38
friarsol meant only the URL part of the SetInfo line (and I agree that URL is optional here), but the set name and rarity (and number of images if the card has more than one) are to be kept.
Ok, I'll make something about that
Ok, I'll make something about that
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: CardDb exception
by friarsol » 05 Sep 2011, 15:08
While I'm fine with the Rarity SVar being removed, I don't think that SetInfo should be required, as this is an easy way to cause incorrect Rarity (or Set data) to the cards. We have an automated script that adds this data, but the script cannot be run for cards in the latest set until it exists in magiccards.info.
Instead of ignoring cards without SetInfo, I'd much prefer these cards to be listed as Unknown for both Rarity and Set if all SetInfo data is missing, so they can appear in the deck editors. Since running the SetInfoScript shouldn't be necessary for the normal Card Scripting process.
Instead of ignoring cards without SetInfo, I'd much prefer these cards to be listed as Unknown for both Rarity and Set if all SetInfo data is missing, so they can appear in the deck editors. Since running the SetInfoScript shouldn't be necessary for the normal Card Scripting process.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: CardDb exception
by Chris H. » 05 Sep 2011, 16:17
With our new nightly builds I try to run the setInfoScript.py script and the oracleScript.py script right before I run the nightly build script.
People enjoy scripting the new card sets. We want to encourage them to play test their card scripts before they are submitted. These people should not have to install Python in order to run these scripts themselves.
People enjoy scripting the new card sets. We want to encourage them to play test their card scripts before they are submitted. These people should not have to install Python in order to run these scripts themselves.
-
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: CardDb exception
by Max mtg » 05 Sep 2011, 16:19
viewtopic.php?f=52&t=5315&start=22Chris H. wrote:People enjoy scripting the new card sets. We want to encourage them to play test their card scripts before they are submitted. These people should not have to install Python in order to run these scripts themselves.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: CardDb exception
by Chris H. » 05 Sep 2011, 17:02
`Max mtg wrote:viewtopic.php?f=52&t=5315&start=22Chris H. wrote:People enjoy scripting the new card sets. We want to encourage them to play test their card scripts before they are submitted. These people should not have to install Python in order to run these scripts themselves.
Ah, thank you for the quick fix.
-
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
41 posts
• Page 3 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 30 guests