Writing New Cards
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Writing New Cards
by mtgrares » 26 Sep 2008, 16:50
I'm surprised people are posting the code for new cards. I think it is great. MTG Forge isn't perfect but I'm glad people enjoy it and that new cards can be added to it. MTG Forge can't support every card but it can implement a wide variety. So in case you don't know, as the author of MTG Forge, I say, "Play on, and have fun". Version 2 is slowly coming.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Writing New Cards
by DennisBergkamp » 26 Sep 2008, 20:25
Exactly, it can implement a wide variety, I think this is awesome. You did a great job Forge, I think there's hundreds of cards that can still be added easily!
Sometimes it's not as smooth... I was working on implementing Hunting Grounds the other day, and I thought I got it to work sort of (I don't think I used the right instance of "Ability" because whenever I had it trigger, it would ask me to pay a manacost of 0), but then I tried putting a Mystic Snake into play with it, countering something my opponent was playing. It's weird, every time I did this it would counter my opponent's spell, but my Mystic Snake would end up in the graveyard as well Some other cards are probably very difficult or even impossible to implement into the current system, but that's understandable, looking at the complexity of MTG.
One thing I would really like to see in V2 is the ability to add creatures that have triggered abilities when attacking and/or dealing combat damage.
Until then I'll just keep adding random cards to V1
Sometimes it's not as smooth... I was working on implementing Hunting Grounds the other day, and I thought I got it to work sort of (I don't think I used the right instance of "Ability" because whenever I had it trigger, it would ask me to pay a manacost of 0), but then I tried putting a Mystic Snake into play with it, countering something my opponent was playing. It's weird, every time I did this it would counter my opponent's spell, but my Mystic Snake would end up in the graveyard as well Some other cards are probably very difficult or even impossible to implement into the current system, but that's understandable, looking at the complexity of MTG.
One thing I would really like to see in V2 is the ability to add creatures that have triggered abilities when attacking and/or dealing combat damage.
Until then I'll just keep adding random cards to V1
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Writing New Cards
by Rob Cashwalker » 27 Sep 2008, 03:18
Well, I'm just doing what I've been doing all along, but I figured I might as well post it in plain-view.
I just hope someone (and I hope it's you, mtgrares) has been compiling (in both the collection meaning and the code meaning) these, so that we can all enjoy.
I just hope someone (and I hope it's you, mtgrares) has been compiling (in both the collection meaning and the code meaning) these, so that we can all enjoy.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Writing New Cards
by GandoTheBard » 27 Sep 2008, 15:31
Yeah I too would love to see these code snippets added, compiled and distributed.
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Writing New Cards
by mtgrares » 27 Sep 2008, 17:02
Probably the best way to distribute new cards is for one person to add all new cards to their version of MTG Forge and send the source code to me (mtgrares yahoo com) or attach it to a post. The job wouldn't be easy and some of it would be tedious, but your effort would be redistributed to a bunch of other thankful people. Just a thought.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Writing New Cards
by Mr.Chaos » 27 Sep 2008, 19:22
I emailed mtgrares about just this thing earlier this week.
So many cards are added by so many people, but nobody has the whole package anymore.
Since I know nothing about coding, I am totally dependant on the beta releases by mtgrares or by one of you coders.
So, please, combine as much of the cards added lately and lets see a new beta so we ALL can enjoy these new cards.
So many cards are added by so many people, but nobody has the whole package anymore.
Since I know nothing about coding, I am totally dependant on the beta releases by mtgrares or by one of you coders.
So, please, combine as much of the cards added lately and lets see a new beta so we ALL can enjoy these new cards.
= coder at work, according to a coder.It does explain some of the bugs.
- Mr.Chaos
- Tester
- Posts: 625
- Joined: 06 Sep 2008, 08:15
- Has thanked: 0 time
- Been thanked: 0 time
Re: Writing New Cards
by DennisBergkamp » 27 Sep 2008, 20:49
Alright, I'll submit my cards directly to Forge then. I'll try to only send the ones that are bug free....
Or maybe it would be easier to have a single thread here in the forums just for the purpose of submitting cards? Either way
Or maybe it would be easier to have a single thread here in the forums just for the purpose of submitting cards? Either way
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Adding cards to common.txt, uncommon.txt, rare.txt
by Chris H. » 27 Nov 2008, 20:12
Assume for the moment that someone wanted to add a card to MTG Forge. Lets say the Onulet.mtgrares wrote:Probably the best way to distribute new cards is for one person to add all new cards to their version of MTG Forge and send the source code to me (mtgrares yahoo com) or attach it to a post. The job wouldn't be easy and some of it would be tedious, but your effort would be redistributed to a bunch of other thankful people. Just a thought.
After doing some research we would find that this card has different rarities depending on which card set this was included within.
If we included the name for this card in all three files:
common.txt
uncommon.txt
rare.txt
then this card would show up too often. Would it be best to add the name Onulet to only common.txt and then let the user decide to increase/decrease the frequency?
Onulet
3
Artifact Creature - Construct
2/2
When Onulet is put into a graveyard from play, you gain 2 life.
Set/Rarity:
Masters Edition (Magic Online only) Common
Fourth Edition Rare
Revised Edition Rare
Antiquities Uncommon
-
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: Writing New Cards
by GandoTheBard » 27 Nov 2008, 21:23
I think we can disregard the commonalities introduced by the masters sets because they are very specialized to reflect a niche. On the other hand if Onulet was remade today it might very well be a common and if you really like it and want to see it in alot of drafts then you should select that rarity. Putting it in all three rarities will ensure it showing up doubles in some packs. I am pretty sure thats a good way to get a goofy draft but have fun with it I guess.
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Writing New Cards
by mtgrares » 01 Dec 2008, 19:01
You can add the card name multiple times to common.txt, uncommon.txt, or rare.txt. So if you really want to see Shock, just add a bunch of them. The code that reads these files isn't "smart" so it just reads all the cards names and spits out booster packs.
common.txt
Shock
Shock
Shock
Shock
Shock
Shock
Shock
Shock
...other cards
common.txt
Shock
Shock
Shock
Shock
Shock
Shock
Shock
Shock
...other cards
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: Writing New Cards
by Rob Cashwalker » 02 Dec 2008, 20:02
This is how I thought it would work.
Gando, I'm going to pick up the code on the rarity editor again. Would you like to see this part implemented - to make a particular card more common?
Gando, I'm going to pick up the code on the rarity editor again. Would you like to see this part implemented - to make a particular card more common?
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Writing New Cards
by GandoTheBard » 03 Dec 2008, 03:27
Yeah I think that is a fairly useful idea. I think overall we want even distribution as per the way real packs run but if that isn't possible maybe the right twiddling with the frequencies (not rarity) of the cards will help with that.Rob Cashwalker wrote:This is how I thought it would work.
Gando, I'm going to pick up the code on the rarity editor again. Would you like to see this part implemented - to make a particular card more common?
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Writing New Cards
by Chris H. » 03 Dec 2008, 21:09
I'm sorry for not getting back to you earlier. I have been busy with research and have found over 50 cards that I believe can be added without any additional coding.GandoTheBard wrote:I think we can disregard the commonalities introduced by the masters sets because they are very specialized to reflect a niche.
I will want to add these cards to common.txt, uncommon.txt and to rare.txt. I'm not familiar enough with the various card sets and which of these are considered master sets. Can you explain to me which specific sets you are refering to. Please.
-
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: Writing New Cards
by GandoTheBard » 03 Dec 2008, 23:58
The Masters sets I & II are called just that. They are online only and are immediately classed as being Classic only cards. (Some of them may be in other sets that are not restricted to classic but thats a different story.)
visit my personal homepage here: http://outofthebrokensky.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
Listen to my podcast with famed AJ_Impy "Freed from the Real" on http://puremtgo.com
-
GandoTheBard - Tester
- Posts: 1043
- Joined: 06 Sep 2008, 18:43
- Has thanked: 0 time
- Been thanked: 0 time
Re: Writing New Cards
by Chris H. » 04 Dec 2008, 12:08
Thank you. Looking through my database I see that some of the cards are included in the following set:GandoTheBard wrote:The Masters sets I & II are called just that. They are online only and are immediately classed as being Classic only cards. (Some of them may be in other sets that are not restricted to classic but thats a different story.)
Masters Edition II (Magic Online only)
I will ignore the rarity value for this card set.
-
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
40 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 147 guests