It is currently 26 Aug 2025, 10:55
   
Text Size

Custom Card Creation

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

Custom Card Creation

Postby sagephoenix » 30 Sep 2011, 04:47

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?
sagephoenix
 
Posts: 177
Joined: 29 Aug 2011, 14:07
Has thanked: 57 times
Been thanked: 3 times

Re: Custom Card Creation

Postby moomarc » 30 Sep 2011, 05:30

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.
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Custom Card Creation

Postby Max mtg » 30 Sep 2011, 10:16

It's possible, I confirm it.
Otherwise it would be impossible to have scripted any innistrad card for example.
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: Custom Card Creation

Postby sagephoenix » 02 Oct 2011, 04:34

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.
sagephoenix
 
Posts: 177
Joined: 29 Aug 2011, 14:07
Has thanked: 57 times
Been thanked: 3 times

Re: Custom Card Creation

Postby Hellfish » 02 Oct 2011, 06:25

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.
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Custom Card Creation

Postby sagephoenix » 02 Oct 2011, 13:14

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
sagephoenix
 
Posts: 177
Joined: 29 Aug 2011, 14:07
Has thanked: 57 times
Been thanked: 3 times

Re: Custom Card Creation

Postby Hellfish » 02 Oct 2011, 20:16

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.
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
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: Custom Card Creation

Postby randallross420 » 21 Oct 2011, 03:16

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
randallross420
 
Posts: 49
Joined: 24 Jun 2011, 00:46
Location: new orleans, LA
Has thanked: 23 times
Been thanked: 1 time

Re: Custom Card Creation

Postby Accountancy » 21 Oct 2011, 12:38

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.
Accountancy
 
Posts: 230
Joined: 14 Aug 2009, 12:39
Has thanked: 22 times
Been thanked: 2 times

Re: Custom Card Creation

Postby friarsol » 21 Oct 2011, 13:51

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Custom Card Creation

Postby randallross420 » 21 Oct 2011, 16:07

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 :)
randallross420
 
Posts: 49
Joined: 24 Jun 2011, 00:46
Location: new orleans, LA
Has thanked: 23 times
Been thanked: 1 time

Re: Custom Card Creation

Postby sagephoenix » 31 Oct 2011, 05:06

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?
sagephoenix
 
Posts: 177
Joined: 29 Aug 2011, 14:07
Has thanked: 57 times
Been thanked: 3 times

Re: Custom Card Creation

Postby jeffwadsworth » 31 Oct 2011, 14:37

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
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Custom Card Creation

Postby jeffwadsworth » 31 Oct 2011, 14:42

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.
Last edited by jeffwadsworth on 31 Oct 2011, 17:04, edited 1 time in total.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Custom Card Creation

Postby friarsol » 31 Oct 2011, 14:59

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Next

Return to Forge

Who is online

Users browsing this forum: No registered users and 40 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 40 users online :: 0 registered, 0 hidden and 40 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 40 guests

Login Form