Images by Set
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Images by Set
by Chris H. » 30 Nov 2010, 14:35
I ran a quick test with r3973 right before I started to upload the archive for the 11-30 beta. There were no pics in the pics folder and I placed a copy of the "none.pic" in the folder. It was not displayed in the deck editor or the battlefield when I tried a quick game.
This is a work in progress and we will have something to look forward to in a future beta.
This is a work in progress and we will have something to look forward to in a future beta.
-

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: Images by Set
by Rob Cashwalker » 30 Nov 2010, 15:24
Crap.. I didn't realize you'd do the beta today. The whole picture system may be broken.
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: Images by Set
by Hellfish » 30 Nov 2010, 15:40
Looks alright to me, I just played a few matches before I setup my pics. No log-spamming or slowdown as far as I can see. Certain cards are a bit iffy about showing up once I add my images, as I posted earlier, but nothing major.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Images by Set
by Chris H. » 30 Nov 2010, 15:44
`Rob Cashwalker wrote:Crap.. I didn't realize you'd do the beta today. The whole picture system may be broken.
That is OK. I do not mind releasing another beta in the near future if your and Sloth's projects come together in the near term.
The people participating in the deck building contest decided that today would be the last day for a new beta to be included in their contest. We did our best to meet their time schedule.
-

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: Images by Set
by Rob Cashwalker » 01 Dec 2010, 05:47
I just uploaded the last batch (I hope) of changes for the Set Images to work correctly.
My slowdowns were due to the HQ images. A couple hours with Paint Shop Pro doing batch resizing to 300 pixels tall, and I had no trouble playing a few rounds.
I found that the planeswalkers didn't use the copystats method in CardFactory, they pretty much built their card data in explicit code, with an SVar copy near the end of each walker's code block. So right there, I added a SetInfo copy, and then the walker's set info displayed correctly.
Someone needs to try Gravedigger-ing and other effects that may copy the card to make sure the set info copies over.
I do have a small bug with determining the most recent set... if no SetInfo is present in the card data, then the set defaults to Alpha.
My slowdowns were due to the HQ images. A couple hours with Paint Shop Pro doing batch resizing to 300 pixels tall, and I had no trouble playing a few rounds.
I found that the planeswalkers didn't use the copystats method in CardFactory, they pretty much built their card data in explicit code, with an SVar copy near the end of each walker's code block. So right there, I added a SetInfo copy, and then the walker's set info displayed correctly.
Someone needs to try Gravedigger-ing and other effects that may copy the card to make sure the set info copies over.
I do have a small bug with determining the most recent set... if no SetInfo is present in the card data, then the set defaults to Alpha.
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: Images by Set
by Huggybaby » 01 Dec 2010, 20:07
Just curious why it took so long? That job would ordinarily take a couple of minutes.Rob Cashwalker wrote:A couple hours with Paint Shop Pro doing batch resizing to 300 pixels tall, and I had no trouble playing a few rounds.
-

Huggybaby - Administrator
- Posts: 3229
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 754 times
- Been thanked: 601 times
Re: Images by Set
by Rob Cashwalker » 01 Dec 2010, 20:30
I couldn't select the folders all at once, I had to run the script in each folder. Also, I have a laptop which could theoretically be 1.6 GHz... but not usually. Part of why I was getting delays when the ImageCache was loading the files and doing the transformations.
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: Images by Set
by Sloth » 03 Dec 2010, 13:35
A creature with persist just came back from the graveyard without a picture. Does persist use some non-standard card zone moving code?
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Images by Set
by friarsol » 03 Dec 2010, 14:39
- Code: Select all
if(persist) {
PlayerZone ownerPlay = AllZone.getZone(Constant.Zone.Play, c.getOwner());
PlayerZone grave = AllZone.getZone(c);
grave.remove(c);
Card crd = AllZone.CardFactory.getCard(c.getName(), c.getOwner());
ownerPlay.add(crd);
crd.addCounter(Counters.M1M1, 1);
}
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Images by Set
by Rob Cashwalker » 03 Dec 2010, 15:55
Yeah, this is the sort of thing that's going to drive us nuts. Any time a new card is generated by CardFactory, this sort of problem is going to crop up. I hesitate to put the image assignment into CardFactory.getCard, because then you may bounce an M11 Llanowar Elves, that shows up in your hand as XED.
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: Images by Set
by friarsol » 03 Dec 2010, 16:02
At least the visual cue will help us fix the old code that's unnecessarily creating new cards instead of using the appropriate copy function.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Images by Set
by Rob Cashwalker » 03 Dec 2010, 16:11
Well, it's not unnecessary to create the new cards. That's what ensures that when you bounce the card, it forgets about any effects from being in play.
The real solution, is that the Card object needs its own copy method, which copies low-level data and abilities plus p/t type stuff, but not the pump bonuses, color-changing and other higher-level information. Then instead of creating new cards from CardFactory, the current card is just copied before going to the new zone.
The real solution, is that the Card object needs its own copy method, which copies low-level data and abilities plus p/t type stuff, but not the pump bonuses, color-changing and other higher-level information. Then instead of creating new cards from CardFactory, the current card is just copied before going to the new zone.
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: Images by Set
by timmermac » 04 Dec 2010, 16:04
As of r4098, when I put a downloaded picture into /res/pics, in the regular deck editor, clicking on the card still brings up a blank picture. Before, after putting a downloaded picture into that folder, I could click on the card and the picture would come up. I haven't had a chance to test this with quest mode yet, as the card I did this with is Fungus Sliver, which was just recently added to the SVN, and I haven't had a chance to do anything quest-related with r4098 yet.
Edit: I just downloaded a pic for All Hallow's Eve and put it into /res/pics. Upon clicking on the card in the Quest Mode deck editor, no picture comes up. This is not how it has been working for me in the past, even with the 11/30 beta.
Edit2: It has also happened with Hana Kami and Necrosavant.
Edit: I just downloaded a pic for All Hallow's Eve and put it into /res/pics. Upon clicking on the card in the Quest Mode deck editor, no picture comes up. This is not how it has been working for me in the past, even with the 11/30 beta.
Edit2: It has also happened with Hana Kami and Necrosavant.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: Images by Set
by timmermac » 06 Dec 2010, 17:24
Does it now make a difference what naming conventions we use to name picture files and where we put them in the pics folder? I'm in the process of copying the MWS HQ pics with the .full.jpg extensions inside their individual set folders into the pics folder.
Edit: Now I see what Rob means about slowdowns with the HQ pics... Wow. It's almost unplayable with HQ .full.jpg pics in the Pics folder.
Edit: Now I see what Rob means about slowdowns with the HQ pics... Wow. It's almost unplayable with HQ .full.jpg pics in the Pics folder.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: Images by Set
by Rob Cashwalker » 06 Dec 2010, 18:36
I just made an update that should ensure that a card without any SetInfo data in the card file will still be assigned a picture of some sort. As long as the normal picture URL works, and the card picture is downloaded....
Yeah, I don't know why the HQ pics are a problem, when they weren't before. Converting them to LQ (maintaining folders) did the trick for me. On a laptop without a large screen, HQ/LQ, it doesn't make a difference visually.
Yeah, I don't know why the HQ pics are a problem, when they weren't before. Converting them to LQ (maintaining folders) did the trick for me. On a laptop without a large screen, HQ/LQ, it doesn't make a difference visually.
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
Who is online
Users browsing this forum: No registered users and 11 guests