Custom Card Creation
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
22 posts
• Page 2 of 2 • 1, 2
Re: Custom Card Creation
by mightycucumber » 22 Nov 2011, 06:00
Hi there! 
I just discovered MTG Forge a few days ago and in the mean time I've been experimenting doing a custom card myself - with no success though... I searched the Forums trying to spot something that could help me with this, and this thread seemed the most appropriate.
The thing is, I've been trying to create the card "Bone Dancer", which still isn't available in the game's database. I tried to seek cards that had similar effects, but when I compiled everything (the best way I could manage, because I'm still a noob, lol) nothing worked out...
The card's quite simple actually:
Bone Dancer (Black Creature).
Mana Cost: 1 B B
Creature - Zombie
P/T: 2/2
Rarity - Rare
CARD TEXT: Whenever Bone Dancer attacks and isn’t blocked, you may put the top creature card of defending player’s graveyard onto the battlefield under your control. If you do, Bone Dancer assigns no combat damage this turn.
I was hoping you guys could help coming up with an easy way to code this bloody thing, since it's the last card I need to recreate my real-life deck, and it was really disappointing to see that it was the only one which was not included in the database xD
Sorry for bothering you guys, and thanks in advance in case you wish to help me. Much appreciated!

I just discovered MTG Forge a few days ago and in the mean time I've been experimenting doing a custom card myself - with no success though... I searched the Forums trying to spot something that could help me with this, and this thread seemed the most appropriate.
The thing is, I've been trying to create the card "Bone Dancer", which still isn't available in the game's database. I tried to seek cards that had similar effects, but when I compiled everything (the best way I could manage, because I'm still a noob, lol) nothing worked out...
The card's quite simple actually:
Bone Dancer (Black Creature).
Mana Cost: 1 B B
Creature - Zombie
P/T: 2/2
Rarity - Rare
CARD TEXT: Whenever Bone Dancer attacks and isn’t blocked, you may put the top creature card of defending player’s graveyard onto the battlefield under your control. If you do, Bone Dancer assigns no combat damage this turn.
I was hoping you guys could help coming up with an easy way to code this bloody thing, since it's the last card I need to recreate my real-life deck, and it was really disappointing to see that it was the only one which was not included in the database xD
Sorry for bothering you guys, and thanks in advance in case you wish to help me. Much appreciated!

- mightycucumber
- Posts: 4
- Joined: 22 Nov 2011, 05:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Custom Card Creation
by moomarc » 22 Nov 2011, 07:54
Just added Bone Dancer. If you can't wait for the next beta or nightly build, here's the script. Just create a txt file in "/res/cardsfolder/b" named bone_dancer.txt and use this:
- Bone Dancer | Open
- Code: Select all
Name:Bone Dancer
ManaCost:1 B B
Types:Creature Zombie
Text:no text
PT:2/2
T:Mode$ AttackerUnblocked | ValidCard$ Card.Self | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ DBChangeZone | TriggerDescription$ Whenever CARDNAME attacks and isn't blocked, you may put the top creature card of defending player's graveyard onto the battlefield under your control. If you do, CARDNAME assigns no combat damage this turn.
SVar:DBChangeZone:DB$ChangeZoneAll | Cost$ 0 | Origin$ Graveyard | Destination$ Battlefield | ChangeType$ Creature.TopGraveyardCreature+YouDontCtrl | GainControl$ True | ChangeNum$ 1 | SubAbility$ DBNoCombatDamage
SVar:DBNoCombatDamage:DB$Pump | Defined$ Self | KW$ HIDDEN CARDNAME assigns no combat damage
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/bone_dancer.jpg
SetInfo:WTH|Rare|http://magiccards.info/scans/en/wl/4.jpg
Oracle:Whenever Bone Dancer attacks and isn't blocked, you may put the top creature card of defending player's graveyard onto the battlefield under your control. If you do, Bone Dancer assigns no combat damage this turn.
End
-Marc
-
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
by mightycucumber » 22 Nov 2011, 15:52
Thanks man, you don't know what that means to me! 
I'd never figure that out... Thanks so much once again!

I'd never figure that out... Thanks so much once again!

- mightycucumber
- Posts: 4
- Joined: 22 Nov 2011, 05:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Custom Card Creation
by mightycucumber » 22 Nov 2011, 17:02
Hey, it's me again, sorry. I did everything you said (unziped the file into the folder, deleted the .zip file and then added the bone_dancer.txt with th code you gave me to the folder b).
The question is, when I fire Forge, I get two different errors: :/
and
Did I do something wrong or is there any problem with the code of the card itself? Thanks in advance!
The question is, when I fire Forge, I get two different errors: :/
- | Open
- This is a Crash Report. An error has occurred. Please save this message to a file.
Please follow the instructions at this address to submit this Crash Report, plus what you were doing at the time:
http://tinyurl.com/3zzrnyb
Reporting bugs in Forge is very important. We thank you for your time.
null
Version:
Forge version 1.1.7-r11770
OS: Windows 7 Version: 6.1 Architecture: x86
Java Version: 1.6.0_26 Vendor: Sun Microsystems Inc.
Detailed error trace:
java.lang.NullPointerException
at forge.card.CardRulesReader.parseLine(CardRulesReader.java:68)
at forge.CardReader.loadCard(CardReader.java:385)
at forge.CardReader.loadCard(CardReader.java:531)
at forge.CardReader.loadCardsUntilYouFind(CardReader.java:281)
at forge.CardReader.run(CardReader.java:233)
at forge.card.cardfactory.PreloadingCardFactory.readCards(PreloadingCardFactory.java:90)
at forge.card.cardfactory.PreloadingCardFactory.<init>(PreloadingCardFactory.java:60)
at forge.AllZone.getCardFactory(AllZone.java:286)
at forge.view.swing.ApplicationView.setModel(ApplicationView.java:144)
at forge.view.swing.Main.main(Main.java:48)
and
- | Open
- This is a Crash Report. An error has occurred. Please save this message to a file.
Please follow the instructions at this address to submit this Crash Report, plus what you were doing at the time:
http://tinyurl.com/3zzrnyb
Reporting bugs in Forge is very important. We thank you for your time.
CardDb has not yet been initialized, run setup() first
Version:
Forge version 1.1.7-r11770
OS: Windows 7 Version: 6.1 Architecture: x86
Java Version: 1.6.0_26 Vendor: Sun Microsystems Inc.
Detailed error trace:
java.lang.NullPointerException: CardDb has not yet been initialized, run setup() first
at forge.item.CardDb.instance(CardDb.java:40)
at forge.item.ItemPool.<init>(ItemPool.java:42)
at forge.deck.Deck.setMain(Deck.java:214)
at forge.deck.DeckManager.readDeck(DeckManager.java:388)
at forge.deck.DeckManager.readAllDecks(DeckManager.java:330)
at forge.deck.DeckManager.<init>(DeckManager.java:127)
at forge.AllZone.getDeckManager(AllZone.java:556)
at forge.view.swing.OldGuiNewGame.<init>(OldGuiNewGame.java:102)
at forge.view.swing.ApplicationView$4.run(ApplicationView.java:177)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Did I do something wrong or is there any problem with the code of the card itself? Thanks in advance!

- mightycucumber
- Posts: 4
- Joined: 22 Nov 2011, 05:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Custom Card Creation
by moomarc » 22 Nov 2011, 17:42
There's definitely not something wrong with the script, unless there's something in it that was only added since the last beta but I doubt it (I assume you're using the latest beta). In your cardsfolder there should only be a folder for each letter (each with a few hundred txt files) and nothing else. If you're still struggling, just grab the latest daily build that Chris would have posted. It should be in there.
-Marc
-
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
by mightycucumber » 22 Nov 2011, 18:08
Since the code's not wrong, I assume it works on your version - where did you get the version you are using from, and where am I able to find the newest builds? (if you don't mind me asking of course
)
Thanks in advance!
EDIT: Just forget it, I was the one to blame: I assumed I had to rearange the code as the remaining ones were (with the code all in the same line) instead of the way you showed me. Sorry 'bout that. :T
Thanks man!

Thanks in advance!

EDIT: Just forget it, I was the one to blame: I assumed I had to rearange the code as the remaining ones were (with the code all in the same line) instead of the way you showed me. Sorry 'bout that. :T
Thanks man!

- mightycucumber
- Posts: 4
- Joined: 22 Nov 2011, 05:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Custom Card Creation
by moomarc » 22 Nov 2011, 18:57
Glad you got it sorted out. You'll see that some scripts appear on one line with little squares where a line break would be, while others appear as it looks above. This just depends on where the script is written.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
22 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 27 guests