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, 18:30
I might be able to solve things before then, the pics are still on the server,right?
Also, unrelated, while you're working with the pic downloads, could you take a look at a few? They don't seem to want to download.
AEthertow [SHM - Shadowmoor]
Circle of Protection: Black [9ED - Core Set - Ninth Edition]
Circle of Protection: Red [9ED - Core Set - Ninth Edition]
EDIT: Which deck editor showed the avatars? I updated to the revision before you reverted the setinfo and added setdata. I still don't see em in the (normal, main menu) deck editor. They're not being downloaded either, but still.
Also, unrelated, while you're working with the pic downloads, could you take a look at a few? They don't seem to want to download.
AEthertow [SHM - Shadowmoor]
Circle of Protection: Black [9ED - Core Set - Ninth Edition]
Circle of Protection: Red [9ED - Core Set - Ninth Edition]
EDIT: Which deck editor showed the avatars? I updated to the revision before you reverted the setinfo and added setdata. I still don't see em in the (normal, main menu) deck editor. They're not being downloaded either, but still.
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, 19:14
Yep, pictures are still up at the moment. And I was just a bit thick and had copied across an avatar or two to my local trunk so that I could test to see whether the set info was indeed causing the crash. While I was at it I checked the deck editor to see if they appeared with the additional changes after changing setdata. I think today was just a bad day for me.Hellfish wrote:I might be able to solve things before then, the pics are still on the server,right?
Also, unrelated, while you're working with the pic downloads, could you take a look at a few? They don't seem to want to download.
AEthertow [SHM - Shadowmoor]
Circle of Protection: Black [9ED - Core Set - Ninth Edition]
Circle of Protection: Red [9ED - Core Set - Ninth Edition]
EDIT: Which deck editor showed the avatars? I updated to the revision before you reverted the setinfo and added setdata. I still don't see em in the (normal, main menu) deck editor. They're not being downloaded either, but still.
Let me know whether you come right with the downloads or whether you want me to convert afterall. Sorry for messing you around today.
-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, 19:27
No worries, I know to appreciate a veteran tester 
I just ran the LQ Set Image Downloader and all of the avatars plus the three cards I mention above get response code 301, which is "permanently moved", which is the default when the images don't exist on the server I think.
Are the avatars in a directory called "VAN" or "VG"? I think it needs to be called "VAN" to work.
EDIT:Shit,sorry, they *are* in "VAN", I just messed up my setdata entry >_> The avatars are downloading fine now!

I just ran the LQ Set Image Downloader and all of the avatars plus the three cards I mention above get response code 301, which is "permanently moved", which is the default when the images don't exist on the server I think.
Are the avatars in a directory called "VAN" or "VG"? I think it needs to be called "VAN" to work.
EDIT:Shit,sorry, they *are* in "VAN", I just messed up my setdata entry >_> The avatars are downloading fine now!

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 » 25 Nov 2012, 10:04
I think Vanguard is in a satisfactory state now. Unless any bugs are found I'll probably move on to either adding Scheme decks to Archenemy mode or possibly add a Planechase mode.
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 Max mtg » 25 Nov 2012, 10:25
about renames in cardDb:
implementing getTraditionalCards with filter will slow down iterations.
You'd better have a separate collection of non-traditional cards and return it when requested.
I hardly imagine a situation when some code needs standard and oversized cards in a single list.
Rollback that rename please.
implementing getTraditionalCards with filter will slow down iterations.
You'd better have a separate collection of non-traditional cards and return it when requested.
I hardly imagine a situation when some code needs standard and oversized cards in a single list.
Rollback that rename please.
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: Implementing variants
by moomarc » 25 Nov 2012, 10:39
Sounds great! I'll try scripts a test script or two for each variant. For Planechase I'll just use mockup triggers for now until I know how you've actually implemented it, probably something like
- Number of opponents selection works correctly for game setup screen, but is translated to number of players including you when the match starts. ie: 3 opponents will create a match against two opponents only. This causes a crash at match start when trying to play only one opponent.
- Match starts fine when all avatars are random. Trying to select a specific avatar for any player prevents the game progressing to the match screen after pressing Start.
As for Max's issue, I had also considered the fact that it might make more sense to have it as a separate collection. In any instances where both are needed, as I think it might need for the downloads, it can just add one collection to the other.
- Code: Select all
T:Mode$ PlanarRoll | Result$ Chaos | Execute$ ChaosEvent
- Number of opponents selection works correctly for game setup screen, but is translated to number of players including you when the match starts. ie: 3 opponents will create a match against two opponents only. This causes a crash at match start when trying to play only one opponent.
- Match starts fine when all avatars are random. Trying to select a specific avatar for any player prevents the game progressing to the match screen after pressing Start.
As for Max's issue, I had also considered the fact that it might make more sense to have it as a separate collection. In any instances where both are needed, as I think it might need for the downloads, it can just add one collection to the other.
-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 » 25 Nov 2012, 11:09
Sure thing!Max mtg wrote:about renames in cardDb:
implementing getTraditionalCards with filter will slow down iterations.
You'd better have a separate collection of non-traditional cards and return it when requested.
I hardly imagine a situation when some code needs standard and oversized cards in a single list.
Rollback that rename please.
Oh, I will look into these issues right away! Test scripts would also be really usefulmoomarc wrote:Sounds great! I'll try scripts a test script or two for each variant. For Planechase I'll just use mockup triggers for now until I know how you've actually implemented it, probably something likeThen for Vanguard, just to make sure you're aware of the few outstanding issues I know of:
- Code: Select all
T:Mode$ PlanarRoll | Result$ Chaos | Execute$ ChaosEvent
- Number of opponents selection works correctly for game setup screen, but is translated to number of players including you when the match starts. ie: 3 opponents will create a match against two opponents only. This causes a crash at match start when trying to play only one opponent.
- Match starts fine when all avatars are random. Trying to select a specific avatar for any player prevents the game progressing to the match screen after pressing Start.

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 friarsol » 25 Nov 2012, 14:35
I'm not sure what the overall plan is, but if that's the case would it be better to merge this back into the main branch and then start a separate branch for Schemes or Planes?Hellfish wrote:I think Vanguard is in a satisfactory state now. Unless any bugs are found I'll probably move on to either adding Scheme decks to Archenemy mode or possibly add a Planechase mode.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by Hellfish » 25 Nov 2012, 14:58
That is an option.Some minor archenemy changes have crept in but none affect anything, I'm pretty sure.
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 » 25 Nov 2012, 16:45
In the meantime, here's one Archenemy scheme:
- Code: Select all
Name:A Display of My Dark Power
ManaCost:no cost
Types:Scheme
Text:no text
T:Mode$ StartScheme | Execute$ DarkEffect | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, until your next turn, whenever a player taps a land for mana, that player adds one mana to his or her mana pool of any type that land produced.
SVar:DarkEffect:AB$ Effect | Cost$ 0 | Name$ Dark Power Scheme | Duration$ UntilYourNextTurn | Triggers$ DarkPower | SVars$ DarkMana
SVar:DarkPower:Mode$ TapsForMana | ValidCard$ Land | Execute$ DarkMana | TriggerZones$ Command | Static$ True | TriggerDescription$ Whenever a player taps a land for mana, that player adds one mana to his or her mana pool of any type that land produced.
SVar:DarkMana:AB$ ManaReflected | Cost$ 0 | ColorOrType$ Type | Valid$ Defined.Triggered | ReflectProperty$ Produced | Defined$ TriggeredPlayer
SVar:Rarity:Common
SVar:Picture:http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=212578&type=card
SetInfo:ARC|Common|http://magiccards.info/extras/scheme/archenemy/a-display-of-my-dark-power.jpg
End
-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 » 25 Nov 2012, 17:43
Picked up one more small bug. Karn's static ability isn't working properly. I can't work out what the problem is; it has the EffectZone$ Command parameter, but the atrifacts die straight away, going directly to the graveyard. I tried changing the count method to test it, but it still died.
-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 Max mtg » 25 Nov 2012, 19:35
There's another source of problems:
1. Magic constants - right in code.
2. String comparisons (the very cardtype has an EnumSet to check if there there are any non-standard types present)
3. getType evaluated 3 times.
Solution:
- Code: Select all
public boolean isTraditional() {
return !(getType().contains("Vanguard") || getType().contains("Scheme") || getType().contains("Plane"));
}
1. Magic constants - right in code.
2. String comparisons (the very cardtype has an EnumSet to check if there there are any non-standard types present)
3. getType evaluated 3 times.
Solution:
- Code: Select all
public boolean isTraditional() {
return !getCard().getType().isVanguard(); // add scheme and plane checks later
}
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: Implementing variants
by Hellfish » 26 Nov 2012, 07:47
Thanks Max. I understand what you want for the system,I just don't have as clear a vision for it.(that sentence made more sense in my head) I'll try harder not to sabotage things.
I'll look into Karn and hopefully merge before friday.Thanks,Marc.
I'll look into Karn and hopefully merge before friday.Thanks,Marc.
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 Sloth » 26 Nov 2012, 09:13
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Implementing variants
by moomarc » 26 Nov 2012, 11:08
Thanks for looking into it. I've looked where I could but I can't see what's wrong. It's exactly the same as March of the Machines except that it works from the Command zone (well should work) and has the additional YouCtrl affected restriction. I also tried with a different parameter name and count method (X:Number$4) to check if it was just some issue with AffectedX, but the same thing happened. Hope that helps narrow it down for you. I also tried adding AffectedZone$Battlefield and removing the References param but neither of those made a difference either.
-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 55 guests