Implementing variants
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Implementing variants
by Hellfish » 24 Nov 2012, 09:06
God damn Swing, it drives me to drink..
How does it make sense for a ChangeListener registered on all 7 opponent radio buttons to only fire once and act as if it came from radio button number one no matter which one you select?And the JavaBeans PropertyChangeListener never fires..
Committed for now and will keep hacking away at it. If anyone spots the problem, be my guest... (WARNING: Code is WIP,but you knew that)
How does it make sense for a ChangeListener registered on all 7 opponent radio buttons to only fire once and act as if it came from radio button number one no matter which one you select?And the JavaBeans PropertyChangeListener never fires..
Committed for now and will keep hacking away at it. If anyone spots the problem, be my guest... (WARNING: Code is WIP,but you knew that)
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: Implementing variants
by moomarc » 24 Nov 2012, 09:33
Haha. If I was any good in graphics from a java perspective I'd probably be far more useful in Forge development. Alas, its not to be. One day I'll learn java properly instead of just tinkering and learning as I go by watching what everyone else does (and checking stackoverflow when I need something specific that I haven't seen elsewhere).
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by moomarc » 24 Nov 2012, 11:15


-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by Hellfish » 24 Nov 2012, 11:37
Huh, is that why I suddenly had like 20 scripts listed as not added to the project?
I'll update and see. You might have to simply delete the project and check out Variants again. If it's the same problem I had when merging AbilityWork it's either that or alot of faffing about with TortoiseSVN.
EDIT: Seems fine, at least.
Committed!

I'll update and see. You might have to simply delete the project and check out Variants again. If it's the same problem I had when merging AbilityWork it's either that or alot of faffing about with TortoiseSVN.
EDIT: Seems fine, at least.

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: Implementing variants
by moomarc » 24 Nov 2012, 11:47
Fresh checkout sounds good. So if you need to revert that commit, please do. In future I'll leave merges to those that know more than me.Hellfish wrote:Huh, is that why I suddenly had like 20 scripts listed as not added to the project?![]()
I'll update and see. You might have to simply delete the project and check out Variants again. If it's the same problem I had when merging AbilityWork it's either that or alot of faffing about with TortoiseSVN.

-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by Hellfish » 24 Nov 2012, 11:49
Doesn't look like a revert is needed.Don't worry about it! 

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: Implementing variants
by moomarc » 24 Nov 2012, 12:00
I think I know what happened. I was 90% through the merge to my local copy when you committed the first bits for the new Vanguard options/setup screen. I didn't want to mess anything up so I undid the merge and started again. Problem is that I wasn't yet aware of the handy undo merge feature and just did a replace with latest from repository. This deleted the new files without removing their references or something similar. Anyway, glad you were able to fix it and no harm was done. I'll just go back to scripting cards and commanding those dastardly pixels.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by moomarc » 24 Nov 2012, 12:17
I also think I know what your problem with the match not starting is. Selecting the number of opponents sets the number of tabs correctly for the games setup, but for the match it takes it as the number of players, not the number of opponents. So trying to start with only one opponent crashes with the index out of bounds error.
Aside from that it works perfectly as far as I can tell. Only issue is the one that Archenemy had before (and I suspect multiplayer games will continue to have for a while). The case in question being the play fields not resetting when the number of players decreases between matches.
Aside from that it works perfectly as far as I can tell. Only issue is the one that Archenemy had before (and I suspect multiplayer games will continue to have for a while). The case in question being the play fields not resetting when the number of players decreases between matches.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by moomarc » 24 Nov 2012, 13:13
Hellfish wrote:Doesn't look like a revert is needed.Don't worry about it!

-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by Hellfish » 24 Nov 2012, 13:41
Alright, I'll take a look after IKEA. 

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: Implementing variants
by Hellfish » 24 Nov 2012, 14:25
Are you sure the changes weren't merged? I'm seeing changes from r18352 in the branch.
EDIT:Ah,wait, scripts are affected. :S Let's see...Alright, I think I can fix this no sweat. Kind of exciting to explore Subclipse... This once.

EDIT:Ah,wait, scripts are affected. :S Let's see...Alright, I think I can fix this no sweat. Kind of exciting to explore Subclipse... This once.


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: Implementing variants
by moomarc » 24 Nov 2012, 14:38
In that case I'll limit my failed attempts at merging to this once.Hellfish wrote:Are you sure the changes weren't merged? I'm seeing changes from r18352 in the branch.
EDIT:Ah,wait, scripts are affected. :S Let's see...Alright, I think I can fix this no sweat. Kind of exciting to explore Subclipse... This once.![]()

-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by moomarc » 24 Nov 2012, 17:37
So I went through each avatar and manually inserted the setinfo line in their scripts, but it turns out that without the set having an index in setdata.txt it crashes the set downloader. Inversely, adding the Vanguard set to setdata.txt makes the cards available in the deck editor. I'll revert the upload with the setinfo lines for now, but what is the best way to handle this? The images are uploaded with the files Base64-encrypted, but should there maybe just be a separate download button and just use a url list like tokens?
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by Hellfish » 24 Nov 2012, 17:45
Token-like list sounds like a good alternative(maybe "Download nontraditional cards" to include schemes and planes), although I thought I explicitly excluded Vanguard types from the deckeditor. :/moomarc wrote:So I went through each avatar and manually inserted the setinfo line in their scripts, but it turns out that without the set having an index in setdata.txt it crashes the set downloader. Inversely, adding the Vanguard set to setdata.txt makes the cards available in the deck editor. I'll revert the upload with the setinfo lines for now, but what is the best way to handle this? The images are uploaded with the files Base64-encrypted, but should there maybe just be a separate download button and just use a url list like tokens?
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: Implementing variants
by moomarc » 24 Nov 2012, 17:49
I guess not. As soon as it's in setdata it's also in deck editor. And is there some easy way to revert the commit that I'm just not seeing, or do I have to revert each file individually then commit?Hellfish wrote:Token-like list sounds like a good alternative(maybe "Download nontraditional cards" to include schemes and planes), although I thought I explicitly excluded Vanguard types from the deckeditor. :/moomarc wrote:So I went through each avatar and manually inserted the setinfo line in their scripts, but it turns out that without the set having an index in setdata.txt it crashes the set downloader. Inversely, adding the Vanguard set to setdata.txt makes the cards available in the deck editor. I'll revert the upload with the setinfo lines for now, but what is the best way to handle this? The images are uploaded with the files Base64-encrypted, but should there maybe just be a separate download button and just use a url list like tokens?

Edit: Nevermind. I found it. Will commit the revert shortly.
Edit2: Revert done. I'll probably only have a chance to re-upload the images to cardforge with normal names on Monday, then get the url list done and a download button hooked up.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Who is online
Users browsing this forum: No registered users and 28 guests