Card Development Questions
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Card Development Questions
 by craygz » 01 Jan 2011, 06:23
by 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.
			
		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
 by SoulStorm » 01 Jan 2011, 07:45
by 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
			
		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
Re: Card Development Questions
 by friarsol » 02 Jan 2011, 05:17
by 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
 by Sloth » 02 Jan 2011, 10:08
by 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
- 
				 
 Sloth
- Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Development Questions
 by Jaedayr » 06 Jan 2011, 19:37
by 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.
			
		Re: Card Development Questions
 by friarsol » 06 Jan 2011, 19:59
by friarsol » 06 Jan 2011, 19:59 
AB is for Abilities. SP is for Spells. DB is for Drawbacks.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.
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
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
 by timmermac » 06 Jan 2011, 20:28
by 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
		Re: Card Development Questions
 by Jaedayr » 06 Jan 2011, 21:11
by 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
Re: Card Development Questions
 by slapshot5 » 06 Jan 2011, 22:18
by slapshot5 » 06 Jan 2011, 22:18 
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".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
-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
 by Chris H. » 06 Jan 2011, 22:37
by 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.
			
		Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents.

- 
				 
 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
 by friarsol » 06 Jan 2011, 22:45
by friarsol » 06 Jan 2011, 22:45 
Except for the cases where Spells have Abilities. Simply: you "Cast" a Spell, you "Activate" an Ability. No matter what the source card is.Chris H. wrote:Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Development Questions
 by Chris H. » 06 Jan 2011, 22:50
by Chris H. » 06 Jan 2011, 22:50 
`friarsol wrote:Except for the cases where Spells have Abilities. Simply: you "Cast" a Spell, you "Activate" an Ability. No matter what the source card is.Chris H. wrote:Oh, and "A:SP$" is used for instants and sorceries while "A:AB$" is used for permanents.
I did not consider that possibility. Do you have an example in mind? You peaked my curiosity.

- 
				 
 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
 by friarsol » 06 Jan 2011, 23:01
by friarsol » 06 Jan 2011, 23:01 
Many and many.Chris H. wrote:I did not consider that possibility. Do you have an example in mind? You peaked my curiosity.
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
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
 by Jaedayr » 07 Jan 2011, 00:18
by 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.
			
		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
Re: Card Development Questions
 by slapshot5 » 07 Jan 2011, 03:12
by slapshot5 » 07 Jan 2011, 03:12 
You don't need to add hyphens in the Types: field. Just list them as:Jaedayr wrote:Also I noticed that the info box in game has an extra hyphen in the name "Creature - - Human Monger"
- Code: Select all
- Creature Human Monger
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Who is online
Users browsing this forum: No registered users and 20 guests
 
 