It is currently 23 Apr 2024, 17:27
   
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 craygz » 01 Jan 2011, 06:23

sorry for bumping this thread and maybe asking a silly question. using the keyword list + the examples "floating around" in the cardfolder i tried to create one of the cards i request in the Card Requests thread.

even though i believe it should theoretically work it does not. (to be more precise the pumps don't resolve into actual abilities - the level-up part of the creature works perfectly fine) it seems like the keyword "tap: add G" is not interchangeable with keywords like "flying" or similar. is that by design, not yet implemented or did i do something else horrible wrong?
i would be grateful for any advice or help you could provide.

Code: Select all
Name:Joraga Treespeaker
ManaCost:G
Types:Creature Elf Druid
Text:no text
PT:1/1
K:stSetPT:1:1:LevelGE1:1:2:LevelGE5:1:4:no text.
K:stPumpSelf:Creature.countersGE1LEVEL:0/0/tap: add G G:no Condition:Tap: Add G G to your mana pool.
K:stPumpOther:Creature.Elf+YouCtrl:0/0/tap: add G G:isPresent Creature.countersGE5LEVEL+Self:Elves you control have "Tap: Add G G to your mana pool."
K:Level up:1 G
K:maxLevel:5
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/jraga_treespeaker.jpg
SetInfo:ROE|Uncommon|http://magiccards.info/scans/en/roe/190.jpg
End
craygz
 
Posts: 9
Joined: 31 Dec 2010, 23:50
Has thanked: 0 time
Been thanked: 0 time

Re: Card Development Questions

Postby SoulStorm » 01 Jan 2011, 07:45

Craygz, I don't believe Joraga Treespeaker can be added strictly through keyword at this time. AbilityFactory will probably be able to handle cards like this in the future. The syntax that can be used with stPump is limited.

I'm still in the very early learning stages myself, so one of the more experienced developers will probably be able to give you a much better answer to your question. You can check out the API for more information as well: http://www.slightlymagic.net/wiki/Forge_API
SoulStorm
 
Posts: 423
Joined: 24 Jun 2010, 22:48
Has thanked: 16 times
Been thanked: 11 times

Re: Card Development Questions

Postby friarsol » 02 Jan 2011, 05:17

For those looking for some new cards to do I just went through Prophecy and found a bunch. They'll be good practice, plus it'll beef up one of the sets that we have not as many cards in.

Code: Select all
Alexi, Zephyr Mage (similar to Mishra's Helix)
Bog Glider
Devastate
Endbringer's Revel
Excavation
Fault Riders
Foil
Hazy Homunculus
Inflame (similar to Opportunist)
Jeweled Spirit
Jolrael's Favor
Keldon Arsonist
Mine Bearer
Quicksilver Wall
Snag
Stormwatch Eagle
Sword Dancer
Thrive
Trenching Steed
Veteran Brawlers (i think this can be done, might be tricky)
Wall of Vipers
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Sloth » 02 Jan 2011, 10:08

I want to note that the AI can't react correctly to the following cards:
Code: Select all
Hazy Homunculus
Veteran Brawlers (i think this can be done, might be tricky)
Wall of Vipers
Maybe we shouldn't rush to add them?
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Card Development Questions

Postby Jaedayr » 06 Jan 2011, 19:37

Now for the totally noob question of the day. What do AB, DB and SP mean when used in AbilityFactory? I am guessing that they denote when an ability can be used but am really not sure.
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby friarsol » 06 Jan 2011, 19:59

Jaedayr wrote:Now for the totally noob question of the day. What do AB, DB and SP mean when used in AbilityFactory? I am guessing that they denote when an ability can be used but am really not sure.
AB is for Abilities. SP is for Spells. DB is for Drawbacks.

The only non-obvious one is a Drawback, which can be attached to any AF to chain AFs to each other on resolution. You shouldn't see Drawback on it's own.

Wheel of Fortune could be coded something like this:
Code: Select all
A:SP$Discard | Cost$ 2 R | Defined$ Each | Mode$ Hand | SubAbility$ SVar=DBDraw
SVar:DBDraw:DB$Draw | NumCards$ 7 | Defined$ Each
this designates that Wheel of Fortune is a spell, but it also has a drawback.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby timmermac » 06 Jan 2011, 20:28

I am trying to add a card to my local copy of the game, just to see if I can, and to see if I can add a few other cards that I'd like to use on as well. I'm hoping this can be done with just a text file, because I know pretty much nothing about coding in Java. Right now, my attempt is Doomsday Specter. Is this card possible to add with just a text file, or would it have to be coded? So far, my attempts to do it have resulted in epic failure, as the text file has been killing my local copy. The text I've been trying to use is in the Card Requests topic.
"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
User avatar
timmermac
Tester
 
Posts: 1512
Joined: 17 May 2010, 20:36
Has thanked: 18 times
Been thanked: 95 times

Re: Card Development Questions

Postby Jaedayr » 06 Jan 2011, 21:11

I am trying to add Silverglade Elemental by using info from existing cards. I can't get it to work and don't know if it is something simple or if it will require more than just the txt file. Any advice is appreciated. Here is what does not work.

Code: Select all
Name:Silverglade Elemental
ManaCost:4 G
Types:Creature Elemental
Text:no text
PT:4/4
K:SP$ChangeZone | Cost$ 4 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Forest | ChangeNum$ 1 | SpellDescription$ When CARDNAME enters the battlefield, you may search your library for a Forest card and put that card onto the battlefield. If you do, shuffle your library.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/silverglade_elemental.jpg
End
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby slapshot5 » 06 Jan 2011, 22:18

Jaedayr wrote:I am trying to add Silverglade Elemental by using info from existing cards. I can't get it to work and don't know if it is something simple or if it will require more than just the txt file. Any advice is appreciated. Here is what does not work.

Code: Select all
Name:Silverglade Elemental
ManaCost:4 G
Types:Creature Elemental
Text:no text
PT:4/4
K:SP$ChangeZone | Cost$ 4 G | Origin$ Library | Destination$ Battlefield | ChangeType$ Forest | ChangeNum$ 1 | SpellDescription$ When CARDNAME enters the battlefield, you may search your library for a Forest card and put that card onto the battlefield. If you do, shuffle your library.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/silverglade_elemental.jpg
End
Well, AbilityFactory doesn't handle "enters the battlefield" abilities yet, so it won't work anyway. And you need to preface the SP$ChangeZone line with an "A", not a "K".

-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 Chris H. » 06 Jan 2011, 22:37

Yeah, AbilityFactory does not yet handle enters the battlefield variants. It is on the to do list.

Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents. :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 friarsol » 06 Jan 2011, 22:45

Chris H. wrote:Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents. :D
Except for the cases where Spells have Abilities. Simply: you "Cast" a Spell, you "Activate" an Ability. No matter what the source card is.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Card Development Questions

Postby Chris H. » 06 Jan 2011, 22:50

friarsol wrote:
Chris H. wrote:Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents. :D
Except for the cases where Spells have Abilities. Simply: you "Cast" a Spell, you "Activate" an Ability. No matter what the source card is.
`
I did not consider that possibility. Do you have an example in mind? You peaked my curiosity. :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 friarsol » 06 Jan 2011, 23:01

Chris H. wrote:I did not consider that possibility. Do you have an example in mind? You peaked my curiosity. :D
Many and many.
One simple one: Cycling. Currently Cycling is it's own keyword, but it could be done using AFs...

Code: Select all
AB$Draw | Cost$ 2 Discard<1/CARDNAME> | NumCards$ 1
and a complex one:

Hammer of Bogardan 's return ability
Code: Select all
A:AB$ChangeZone | Cost$ 2 R R R | Origin$ Graveyard | Destination$ Hand | ActivatingZone$ Graveyard | ActivatingPhases$ Upkeep | PlayerTurn$ True | SpellDescription$ Return Hammer of Bogardan from your graveyard to your hand. Activate this ability only during your upkeep.
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 » 07 Jan 2011, 00:18

YACDQ - yet another card development question

I created Sailmonger using text from Arnjlot's Ascent and can play it just fine but when I activate it and pay the cost it does not do anything to my creature. However, the AI had no problem using it on it's own creature and it worked fine.

Code: Select all
Name:Sailmonger
ManaCost:3 U
Types:Creature - Human Monger
Text:no text
PT:3/3
A:AB$Pump | Cost$ 2 | AnyPlayer$ True | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Flying | SpellDescription$ Target creature gains flying until end of turn.
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/sailmonger.jpg
End
Also I noticed that the info box in game has an extra hyphen in the name "Creature - - Human Monger"
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

Re: Card Development Questions

Postby slapshot5 » 07 Jan 2011, 03:12

Jaedayr wrote:Also I noticed that the info box in game has an extra hyphen in the name "Creature - - Human Monger"
You don't need to add hyphens in the Types: field. Just list them as:
Code: Select all
Creature Human Monger
Don't know why that card isn't working for you.
-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 39 guests


Who is online

In total there are 39 users online :: 0 registered, 0 hidden and 39 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 39 guests

Login Form