It is currently 12 Sep 2025, 17:10
   
Text Size

CardDb exception

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: CardDb exception

Postby 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

Postby Sloth » 04 Sep 2011, 12:55

Max mtg wrote:The "NEW" column is back in shop AND deckeditor for quest mode.
Good work Max. This feature is much appreciated (and much more obvious now).
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: CardDb exception

Postby friarsol » 04 Sep 2011, 14:20

Max mtg wrote:10182 - added a column with number of decks.
May I close issue 102 with that?
Yea that should work.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: CardDb exception

Postby 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.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: CardDb exception

Postby Max mtg » 04 Sep 2011, 16:49

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.
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.

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
2. Add aprropriate SetInfo to the cards you are developing

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

Postby ArsenalNut » 04 Sep 2011, 18:27

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.
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:Did I get you right that a clear error message should be added there instead of just throwing?
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?
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: CardDb exception

Postby 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
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

Postby 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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: CardDb exception

Postby 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.
User avatar
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

Postby Max mtg » 05 Sep 2011, 16:19

Chris 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.
viewtopic.php?f=52&t=5315&start=22
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

Postby Chris H. » 05 Sep 2011, 17:02

Max mtg wrote:
Chris 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.
viewtopic.php?f=52&t=5315&start=22
`
Ah, thank you for the quick fix.
User avatar
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

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 33 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 33 users online :: 0 registered, 0 hidden and 33 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 33 guests

Login Form