It is currently 18 Apr 2024, 11:49
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

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

Re: Card Development Questions

Postby SoulStorm » 30 Dec 2010, 07:45

So I was thinking about trying to add Chronozoa and Lost Auramancers to the game.

The goes to the graveyard with no time counters trigger is already java coded thanks to Deadly Grub. The replication ability of Chronozoa is java coded by cards like Mirror-Sigil Sergeant and Sprouting Phytohydra. The code for Lost Auramancers is taken care of by Academy Rector. Beyond identifying the right bits of code (which I may or may not be able to do) and changing some names and numbers are there other difficulties that a non-programmer such as myself is likely to run into?
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby Chris H. » 30 Dec 2010, 13:36

I would like to welcome SoulStorm and Jaedayr to the list of contributors to the SVN and to our dev team. Welcome aboard.

And thank you for your recent submissions. =D>
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: Card Development Questions

Postby SoulStorm » 30 Dec 2010, 20:18

Thanks for the help in getting started!
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby SoulStorm » 30 Dec 2010, 22:24

Can we get a clone parameter for AB/SP/DB$Token for cards like Spitting Image and Followed Footsteps?
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby Chris H. » 31 Dec 2010, 02:45

SoulStorm wrote:So I was thinking about trying to add Chronozoa and Lost Auramancers to the game.

The goes to the graveyard with no time counters trigger is already java coded thanks to Deadly Grub. The replication ability of Chronozoa is java coded by cards like Mirror-Sigil Sergeant and Sprouting Phytohydra. The code for Lost Auramancers is taken care of by Academy Rector. Beyond identifying the right bits of code (which I may or may not be able to do) and changing some names and numbers are there other difficulties that a non-programmer such as myself is likely to run into?
`
I was able to modify the code block for Academy Rector. We now have Lost Auramancers added to the SVN.
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: Card Development Questions

Postby SoulStorm » 31 Dec 2010, 04:55

Thanks Chris, I'm looking forward to taking a long hard look at the code.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby Chris H. » 31 Dec 2010, 13:44

SoulStorm wrote:Thanks Chris, I'm looking forward to taking a long hard look at the code.
`
You're welcome. Chronozoa may be past my abilities. I know how to create a destroy command now and I can have this command activate the spell ability. I can create a simple token inside of the spell ability that would give the token the easier non-parsed keywords. But the keywords like Vanishing have parameters which complicate the situation.

And giving these tokens the destroy command to create even more of these tokens, ouch. And with the new set image code I am not sure if the picture would show up or not for these tokens.

Chronozoa appears to be beyond my abilities at this time. :(
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: Card Development Questions

Postby slapshot5 » 31 Dec 2010, 15:09

SoulStorm - please try to follow Oracle text as much as possible when submitting new cards. If you need help mashing the text around (like Cenn's Enlistment is tricky with the Retrace part), post it.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

Re: Card Development Questions

Postby SoulStorm » 31 Dec 2010, 20:56

Chris H. wrote:You're welcome. Chronozoa may be past my abilities. I know how to create a destroy command now and I can have this command activate the spell ability. I can create a simple token inside of the spell ability that would give the token the easier non-parsed keywords. But the keywords like Vanishing have parameters which complicate the situation.

And giving these tokens the destroy command to create even more of these tokens, ouch. And with the new set image code I am not sure if the picture would show up or not for these tokens.

Chronozoa appears to be beyond my abilities at this time. :(
Well, if it's beyond your ability, I'm not even going to try playing around with it. Apparently I can't even get the card text correct. #-o :mrgreen:

I'll work on that Slapshot.

I looked at the code, which you seem to have merged quite seemlessly into the Academy Rector code. I actually had to playtest Lost Auramancers, because I couldn't figure out how you had Lost Auramancers go to the graveyard instead of being exiled. Granted, I only spent about 5 minutes looking at the code, but I'm not sure if more time would have helped. :-k

I also didn't understand how you were going to make the SacMe code work with Lost Auramancers need to have 0 time counters on it when it goes to the graveyard. If we had AI code for TakeMyCounters, that I could see, but there aren't many cards that do that. Vampire Hexmage being the best example that occurs to me.
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby Jaedayr » 31 Dec 2010, 21:08

I decided to try to add Balduvian Horde, based on the card text for Minotaur Explorer.

Code: Select all
Name:Minotaur Explorer
ManaCost:1 R
Types:Creature Minotaur
Text:When CARDNAME enters the battlefield, sacrifice it unless you discard a card at random.
PT:3/3
SVar:Rarity:Uncommon
SVar:Picture:http://resources.wizards.com/magic/cards/od/en-us/card31786.jpg
SetInfo:ODY|Uncommon|http://magiccards.info/scans/en/od/206.jpg
End
Code: Select all
Name:Balduvian Horde
ManaCost:2 R R
Types:Creature Human Barbarian
Text:When CARDNAME enters the battlefield, sacrifice it unless you discard a card at random.
PT:5/5
SVar:Rarity:Rare
SVar:Picture:http://resources.wizards.com/magic/cards/od/en-us/balduvian_horde.jpg
End
However, the minotaur works while the horde does not. :?: I know the text for minotaur was updated earlier for Oracle format, is there something I am missing somewhere to make this (and then Pillaging Horde) work?
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby friarsol » 31 Dec 2010, 21:18

Jaedayr, the Explorer's card file doesn't actually do any of the work of the card. It lives inside of a code block in the CardFactory_Creatures. So this needs both sections. Adding Balduvian and Pillaging is relatively painless though, since we can generalize that code block and add in the other two Hordes.

Edit: I added the portion necessary in the Java file. Sync and try your card files again.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Jaedayr » 31 Dec 2010, 21:50

Thank you for the quick and helpful response Sol! I am working on it now and hopefully will soon add those cards.

Just a noob question, is the intent to someday have the text in the txt file actually trigger what goes on inside CardFactory_Creatures? So once the actions have been added for one card, adding other cards will not involve cardfactory changes, merely text changes? Or am I dreaming/hallucinating again?
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby friarsol » 31 Dec 2010, 22:01

That's the idea of AbilityFactory. As much as possible should be geared towards filling out cards just by Card Scripting. The next big piece of the puzzle is getting triggers working in this area. I have a few smaller things I want to clean up and get working, but as soon as I'm done with that I think Triggers might be my next large project.

This doesn't mean parsing Oracle text that is listed in the Text field. It means scripting similarly to how AFs are working now with SubAbilities being quite important for triggers.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby SoulStorm » 31 Dec 2010, 22:15

Sol, the impending arrival of Triggers is very exciting. I've been waiting on that one sort of patiently for awhile now. The whenever keyword can do some things with triggers, but it's poorly documented and my experiments with it have been more frustrating than fruitful. Triggers along with SubAbilities is going to allow for a lot of very cool cards to be added through card text. Thanks for all the hard work!
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby Chris H. » 01 Jan 2011, 00:28

SoulStorm wrote:I looked at the code, which you seem to have merged quite seemlessly into the Academy Rector code. I actually had to playtest Lost Auramancers, because I couldn't figure out how you had Lost Auramancers go to the graveyard instead of being exiled. Granted, I only spent about 5 minutes looking at the code, but I'm not sure if more time would have helped. :-k

I also didn't understand how you were going to make the SacMe code work with Lost Auramancers need to have 0 time counters on it when it goes to the graveyard. If we had AI code for TakeMyCounters, that I could see, but there aren't many cards that do that. Vampire Hexmage being the best example that occurs to me.
`
Ah, the test with the exile code is right after the GameActionUtil.showYesNoDialog(). The code looks like this:

Code: Select all
if (GameActionUtil.showYesNoDialog(card, question.toString())) {
    if (card.getName().equals("Academy Rector")) {
        AllZone.GameAction.exile(card);
    }
`
Oh, and the SacMe SVar... I meant to delete that line. I copied the Academy Rector card file and then modified it for the Lost Auramancers card file. I forgot to delete the SacMe SVar.
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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 53 guests


Who is online

In total there are 53 users online :: 0 registered, 0 hidden and 53 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 53 guests

Login Form