Page 1 of 2

Custom Card Creation

PostPosted: 30 Sep 2011, 04:47
by sagephoenix
Is there a way to create my own custom cards in Forge? I tried making one and putting it in the cards folder but I got an error message saying it couldn't find the card or something?

Re: Custom Card Creation

PostPosted: 30 Sep 2011, 05:30
by moomarc
sagephoenix wrote:Is there a way to create my own custom cards in Forge? I tried making one and putting it in the cards folder but I got an error message saying it couldn't find the card or something?
It SHOULD work. Posting the exact error log would also help resolve the issue. Perhaps posting your script would help too as one of the scripting guru's here might see what's causing it to fail (there's possibly a missing mandatory field). If there's no problem with the script, just make sure that the card is in the correct folder within cardfolder and that the original zip file has been deleted.

Re: Custom Card Creation

PostPosted: 30 Sep 2011, 10:16
by Max mtg
It's possible, I confirm it.
Otherwise it would be impossible to have scripted any innistrad card for example.

Re: Custom Card Creation

PostPosted: 02 Oct 2011, 04:34
by sagephoenix
I'm not sure what the problem was before, but I started over and it will let me create custom cards now. Unfortunately, my card doesn't appear to be working.

Code: Select all
Name:Kasimir's Wolf
ManaCost:W U
Types: Creature Wolf
Text: CARDNAME gets +2/+2 as long as you control a permanent named Kasimir the Lone Wolf.
PT:2/2
SVar:BuffedBy:Permanent.named
SVar:Rarity:Common
SVar:Picture: http://i53.tinypic.com/11l2yqf.jpg
SetInfo:LEG|Common| http://i53.tinypic.com/11l2yqf.jpg
Oracle: Kasimir's Wolf gets +2/+2 as long as you control a permanent named Kasimir the Lone Wolf.
End
http://i51.tinypic.com/21cts93.jpg

I'm 100% I coded something wrong because I am very new to this. The code was based off of Liu Bei, Lord of Shu's code.

Re: Custom Card Creation

PostPosted: 02 Oct 2011, 06:25
by Hellfish
The text field is mostly used for effects that the card has that is hardcoded. In other words, it's only of cosmetic use.
Liu Bei, Lord of Shu is apparently hardcoded though I think it could be converted to script using Sloth's StaticAbility code. For your card it would be something along the lines of
Code: Select all
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 2 | AddToughness$ 2 | IsPresent$ Card.namedKasimir the Lone Wolf | Description$ CARDNAME gets +2+/+2 as long as you control a permanent named Kasimir the Lone Wolf.
This line will specify that the card has a Continuous static ability that affects itself (Card.Self basically means "Any type of card that is me.", me being this exact copy of the card). I think AddPower and AddToughness are selfexplanatory :) .IsPresent specifies that a card that matches the expression must be on the battlefield for this static ability to run.Description is what is actually written on the card.

The SVar:BuffedBy line is an AI aid that lets it know if it should play any other cards in conjunction with this.In your case it would be
Code: Select all
SVar:BuffedBy:Permanent.namedKasimir the Lone Wolf
NOTE that I havn't tested any of this so it may need tweaking. Check out the wiki for more info.

Re: Custom Card Creation

PostPosted: 02 Oct 2011, 13:14
by sagephoenix
Code: Select all
Name:Kasimir's Wolf
ManaCost:W U
Types: Creature Wolf
Text:
PT:2/2
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 2 | AddToughness$ 2 | IsPresent$ Card.namedKasimir the Lone Wolf | Description$ CARDNAME gets +2+/+2 as long as you control a permanent named Kasimir the Lone Wolf.
SVar:BuffedBy:Permanent.namedKasimir the Lone Wolf
SVar:Rarity:Common
SVar:Picture: http://i53.tinypic.com/11l2yqf.jpg
SetInfo:LEG|Common| http://i53.tinypic.com/11l2yqf.jpg
Oracle: Kasimir's Wolf gets +2/+2 as long as you control a permanent named Kasimir the Lone Wolf.
End
The code manages to give him +2/+2, but it does it all the time. Even when Kasimir the Lone Wolf is not present.

http://i54.tinypic.com/ngshu9.jpg

Re: Custom Card Creation

PostPosted: 02 Oct 2011, 20:16
by Hellfish
My bad, static abilities do not support the IsPresent parameter yet. You can solve it this way.
Code: Select all
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 2 | AddToughness$ 2 | CheckSVar$ Kasimirs | Description$ CARDNAME gets +2+/+2 as long as you
and adding the line
Code: Select all
SVar:Kasimirs:Count$Valid Card.YouCtrl+namedKasimir the Lone Wolf
The CheckSVar parameter tells the StaticAbility system to calculate the value of the formula in the named SVar and compare it to a certain value (which we don't need to provide since it defaults to Greater than or Equal to 1). The new SVar line contains script that counts how many permanents you control that are named Kasimir of the Lone Wolf.

Re: Custom Card Creation

PostPosted: 21 Oct 2011, 03:16
by randallross420
hello. since we are on the subject of custom cards, i was wondering if someone could help me with the coding for a card i made for fun. i'll first off say that i'm not at all saavy with the programming aspect of forge. i pretty much tried to reverse engineer the card by using other cards with similar effects and combine them into one text document but it did not work out.

here is the card, and thanks in advance, any help is appreciated.

greedy squatter 3r/w
creature - goblin nomad mythic
When greedy squatter enters the battlefield, destroy target land.
At the beginning of your upkeep, you draw a card and you gain one life.
You may play an additional land on each of your turns.
2/2

Re: Custom Card Creation

PostPosted: 21 Oct 2011, 12:38
by Accountancy
The first problem is that card is WAAAAAAAAAY too good and completely off-colour, but other than that fine. Also a lot of text and a hybrid cost make it iffy that anyone will bother coding it for you, but you never know.

Re: Custom Card Creation

PostPosted: 21 Oct 2011, 13:51
by friarsol
randallross420 wrote:greedy squatter 3r/w
creature - goblin nomad mythic
When greedy squatter enters the battlefield, destroy target land.
At the beginning of your upkeep, you draw a card and you gain one life.
You may play an additional land on each of your turns.
2/2
It'd probably be easier to post what you have and that way you can learn from it, but I know the Exploration ability isn't scriptable. The first ability you can get from Avalanche Riders. The second is a combination of some cards.

Re: Custom Card Creation

PostPosted: 21 Oct 2011, 16:07
by randallross420
friarsol wrote:It'd probably be easier to post what you have and that way you can learn from it
will do. this is what i came up with.
Name:Greedy Squatter
ManaCost:3 RW
Types:Creature Goblin Nomad
Text:You may play an additional land on each of your turns.
PT:2/2T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDestroy | TriggerDescription$ When Greedy Squatter enters the battlefield, destroy target land.
SVar:TrigDestroy:DB$Destroy | ValidTgts$ Land | TgtPrompt$ Select a land.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ At the beginning of your upkeep, you draw a card and you gain 1 life.
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 | SubAbility$ SVar=DBGainLife
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 1SVar:Rarity:Mythic
SVar:Picture:http://imageshack.us/photo/my-images/853/greedysquatter.jpgSetInfo:M12|Mythic|http://imageshack.us/photo/my-images/853/greedysquatter.jpgOracle:When Greedy Squatter enters the battlefield, destroy target land.\nAt the beginning of your upkeep, you draw a card and you gain 1 life.\nYou may play an additional land on each of your turns.End
can anyone see what i did wrong?
thanks in advance :)

Re: Custom Card Creation

PostPosted: 31 Oct 2011, 05:06
by sagephoenix
If I wanted to make a card like "This creature gets +1/+1 for each planeswalker you control." How would I go about doing this?

Re: Custom Card Creation

PostPosted: 31 Oct 2011, 14:37
by jeffwadsworth
sagephoenix wrote:If I wanted to make a card like "This creature gets +1/+1 for each planeswalker you control." How would I go about doing this?
Bare-bones:

S:Mode$ Continuous | Affected$ Card.Self | AddPower$ +X | AddToughness$ +X
SVar:X:Count$Valid Planeswalker+YouCtrl

Re: Custom Card Creation

PostPosted: 31 Oct 2011, 14:42
by jeffwadsworth
randallross420 wrote:
friarsol wrote:It'd probably be easier to post what you have and that way you can learn from it
will do. this is what i came up with.
Name:Greedy Squatter
ManaCost:3 RW
Types:Creature Goblin Nomad
Text:You may play an additional land on each of your turns.
PT:2/2T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDestroy | TriggerDescription$ When Greedy Squatter enters the battlefield, destroy target land.
SVar:TrigDestroy:DB$Destroy | ValidTgts$ Land | TgtPrompt$ Select a land.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDraw | TriggerDescription$ At the beginning of your upkeep, you draw a card and you gain 1 life.
SVar:TrigDraw:AB$Draw | Cost$ 0 | Defined$ You | NumCards$ 1 | SubAbility$ SVar=DBGainLife
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ 1SVar:Rarity:Mythic
SVar:Picture:http://imageshack.us/photo/my-images/853/greedysquatter.jpgSetInfo:M12|Mythic|http://imageshack.us/photo/my-images/853/greedysquatter.jpgOracle:When Greedy Squatter enters the battlefield, destroy target land.\nAt the beginning of your upkeep, you draw a card and you gain 1 life.\nYou may play an additional land on each of your turns.End
can anyone see what i did wrong?
thanks in advance :)
The Execute$ TrigDestroy should point to a AB$, not a DB$.
AB$ Destroy | Cost$ 0 | ...........


Also, make sure you are carriage returning things correctly. It can lead to parsing errors.

Re: Custom Card Creation

PostPosted: 31 Oct 2011, 14:59
by friarsol
jeffwadsworth wrote:The Execute$ TrigDestroy should point to a AB$, not a DB$.
AB$ Destroy | Cost$ 0 | ...........
Jeff, this isn't true. In fact, I recommend using a DB for certain Triggers, so they can be tested properly (specifically the Foul Imp type cards, but most ETB abilities really). And if you use a DB then the Cost parameter isn't required.