Implementing custom card sets on Forge
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Implementing custom card sets on Forge
by freddyjsg » 02 Jun 2013, 15:38
Hi, I wanted to know if it was possible for somebody to help me scripting a custom set on forge. The set is called Iamur; I have most of commons scripted, but some of them look difficult.
Here is the .pdf for the set
My main worry is about two of the mechanics, Melody and swallow.
Here is the .pdf for the set
My main worry is about two of the mechanics, Melody and swallow.
- Attachments
-
- Iamur.pdf
- (11.33 MiB) Downloaded 1107 times
Re: Implementing custom card sets on Forge
by Max mtg » 04 Jun 2013, 19:48
The idea of new sets imlemented with Forge is very great!
Yet, it looks like we miss human resources for tasks like this one, unfortunatelly.
Yet, it looks like we miss human resources for tasks like this one, unfortunatelly.
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: Implementing custom card sets on Forge
by freddyjsg » 04 Jun 2013, 23:33
Yeah, there were others from the same author, but i thouht Iamur would be the easiest to script. As you said, unfortunately there isn't a lot of people interested. I will continue with what i can, and wait. By the way, can you help me with these two cards. Statues of Emerien crashes when ETB activates, and Forgotten Glory crashes even in deck editor.
Here are the cards:
Forgotten Glory
Instant (U)
Put two 0/1 Fish creature tokens that are all colors onto the battlefield, then creatures you control get +1/+1 until end of turn.
The temple has long since been vanquished by nature, but merfolk still venture to the ruins and gaze at its glory.
Statues of Emerien
Creature — Spirit Wall (C)
Flash (You may cast this spell any time you could cast an instant.)
Defender
When Statues of Emerien enters the battlefield, prevent all combat damage that would be dealt to you this turn.
2/2
Here are the cards:
Forgotten Glory
Instant (U)
Put two 0/1 Fish creature tokens that are all colors onto the battlefield, then creatures you control get +1/+1 until end of turn.
The temple has long since been vanquished by nature, but merfolk still venture to the ruins and gaze at its glory.
Statues of Emerien
Creature — Spirit Wall (C)
Flash (You may cast this spell any time you could cast an instant.)
Defender
When Statues of Emerien enters the battlefield, prevent all combat damage that would be dealt to you this turn.
2/2
- Attachments
-
- forgotten_glory.txt
- (659 Bytes) Downloaded 266 times
-
- statues_of_emerien.txt
- (619 Bytes) Downloaded 243 times
Re: Implementing custom card sets on Forge
by Max mtg » 04 Jun 2013, 23:49
I am not good at card scripting and focus on general development. That's to say don't expect much from me.
Yet, there's something that is easy to note.
The first script you provided is a bit malformed. The subabities linked to other abilities via SubAbility$ word should be declared as DB and don't need a cost.
Yet, there's something that is easy to note.
The first script you provided is a bit malformed. The subabities linked to other abilities via SubAbility$ word should be declared as DB and don't need a cost.
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: Implementing custom card sets on Forge
by moomarc » 04 Jun 2013, 23:52
I didn't have time to actually test, but the reason this was crashing in all zones is because you had the subability scripted as a Spell ability (used SP instead of DB at the start of the script line.) A quich pointer here - Spells cast from hand get A:SP at the start of the first line. Every subability will get DB. For activated abilities start with A:AB then go on to DB subabilities. The base ability never starts with DB.
- Forgotten Glory | Open
- Code: Select all
Name:Forgotten Glory
ManaCost:3 W
Types:Instant
A:SP$ Token | Cost$ 3 W | TokenAmount$ 2 | TokenName$ Fish | TokenTypes$ Creature,Fish | TokenColors$ Green,White,Blue,Black,Red | TokenOwner$ You | TokenPower$ 0 | TokenToughness$ 1 | SubAbility$ Anthem | SpellDescription$ Put two 0/1 Fish creature tokens that are all colors onto the battlefield, then creatures you control get +1/+1 until end of turn.
SVar:Anthem:DB$ PumpAll | ValidCards$ Creature.YouCtrl | NumAtt$ 1 | NumDef$ 1
Oracle:Put two 0/1 Fish creature tokens that are all colors onto the battlefield, then creatures you control get +1/+1 until end of turn.
SetInfo:IAM Uncommon
-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: Implementing custom card sets on Forge
by freddyjsg » 05 Jun 2013, 03:41
Thanks for the reply, it's very useful. I will continue with everything i can.
Re: Implementing custom card sets on Forge
by Kilvoctu » 15 Jul 2013, 19:21
Hello, how are you doing on that custom set, freddy? Since my opponents have dwindled for hard-copy MtG over the years, I finally made the decision to download Forge. Incidentally, it motivated me to continue on my years-long work on my custom set (Google 'mtg touhou' and check the first mtgsalvation link if interested), importing it in to playtest.
I picked up the scripting fairly quickly (thanks for making it simple, devs), and managed to write 93/172 of my cards over the past some days. If you're still workin' on it, perhaps we can pool our collective knowledge and help one another.
There've been a few cards that cause me issues; here's one for now:
Both the cards I used as reference for the second effect, Melira, Sylvok Outcast and Melira's Keepers, have their counter-centric abilities as keywords. Figured to try the simple approach seen here, but no avail..
I picked up the scripting fairly quickly (thanks for making it simple, devs), and managed to write 93/172 of my cards over the past some days. If you're still workin' on it, perhaps we can pool our collective knowledge and help one another.
There've been a few cards that cause me issues; here's one for now:
- Skillful Graze | Open
- Code: Select all
Name:Skillful Graze
ManaCost:2 W
Types:Instant
A:SP$ Effect | Cost$ 2 W | Name$ Skillful Graze Effect | StaticAbilities$ STPrevent | Subability$ DBPump | SpellDescription$ Prevent all damage that would be dealt to creatures you control this turn. Creatures you control can't have counters placed on them this turn.
SVar:STPrevent:Mode$ PreventDamage | EffectZone$ Command | Target$ Creature.YouCtrl
SVar:DBPump:DB$Pump | Defined$ Creature.YouCtrl | KW$ Creatures you control can't have counters placed on them.
Oracle:Prevent all damage that would be dealt to creatures you control this turn.\nCreatures you control can't have counters placed on them this turn.
Both the cards I used as reference for the second effect, Melira, Sylvok Outcast and Melira's Keepers, have their counter-centric abilities as keywords. Figured to try the simple approach seen here, but no avail..
Last edited by Kilvoctu on 18 Jul 2013, 20:30, edited 1 time in total.
- Kilvoctu
- Posts: 4
- Joined: 15 Jul 2013, 09:09
- Has thanked: 0 time
- Been thanked: 0 time
Re: Implementing custom card sets on Forge
by Max mtg » 15 Jul 2013, 19:54
I am very happy to see that forge becomes a platform for custom card sets. Keep up the good work in that direction.
As for keywords, remember that they are hardcoded, that is there's a finite set of those recognized by the engine. A keyword you've seen on other card will work only if it's written literally in the same way.
As for keywords, remember that they are hardcoded, that is there's a finite set of those recognized by the engine. A keyword you've seen on other card will work only if it's written literally in the same way.
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: Implementing custom card sets on Forge
by friarsol » 15 Jul 2013, 19:55
Firstly, you want to be using a PumpAll, not Pump. Something like Overrun does this. Secondly, I'd definitely use the keyword that's used by Melira's Keepers and Tatterskite: "CARDNAME can't have counters placed on it." I can't guarantee that it'll work, but that's the way I'd go if this was a card I was trying to script.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing custom card sets on Forge
by Kilvoctu » 16 Jul 2013, 01:27
Yup, a big reason I chose Forge to begin with (I used the handy "List of Rules Engine Software" wiki link to make my decision) was the ability to script custom cards (and all sorts of other things for power users). I was also pleasantly surprised at the simplicity of it all. With most of the time spent just looking up syntax of related cards, I've been able to enjoyably knock out a good number of cards each day.
Indeed, I've noticed the matter of hardcoded keywords since many of the first cards I worked with were easy ones with only keywords. Didn't think my solution up there would work, but felt it was worth a try. Unfortunately, friarsol, your suggestion didn't seem to remedy the issue. I'll see what I can do about it after I have a go at the remaining cards, in order to reduce my WIP pool as much as possible. Think I'll probably have a go at creating a little custom world for this set after I'm done too, lol.
Indeed, I've noticed the matter of hardcoded keywords since many of the first cards I worked with were easy ones with only keywords. Didn't think my solution up there would work, but felt it was worth a try. Unfortunately, friarsol, your suggestion didn't seem to remedy the issue. I'll see what I can do about it after I have a go at the remaining cards, in order to reduce my WIP pool as much as possible. Think I'll probably have a go at creating a little custom world for this set after I'm done too, lol.
- Kilvoctu
- Posts: 4
- Joined: 15 Jul 2013, 09:09
- Has thanked: 0 time
- Been thanked: 0 time
Re: Implementing custom card sets on Forge
by moomarc » 16 Jul 2013, 05:11
The reason the pumpAll sub ability isn't working is because you've used Defined$Creatures.YouCtrl. Defined only takes parameters like Remembered or TriggeredCard etc whereas Creature.youCtrl is a 'valid card' specification. You'll need to use ValidCards$Creatures.YouCtrl instead.
-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: Implementing custom card sets on Forge
by drdev » 02 Aug 2013, 14:43
I thought I'd mention that I'm starting up development on a GUI Card/Set Editor that will make it much easier to create and manage custom sets and write scripts for each card. It will include support for generating scripts from discrete fields (like name, type, subtype, mana cost, abilities, p/t, etc.) and support for generating a card image to go with each card. I will also add tools to copy existing sets/cards as templates for new custom sets/cards, as well as add support for creating random cards/sets based on a few parameters.
I also hope to add tools to help test cards by either running automated AI vs. AI games or manual Human vs. AI games using an edited card in combination with other cards, where you can configure the starting board state. Note that these tools will also help us test existing cards and cards that will be scripted in the future as new Magic sets are released.
I hope these new features will lower the barrier to entry of creating and sharing custom sets. If you have any ideas, please let me know and I'll try to incorporate them. I'll be sure to touch base as I make progress.
Click here for more details on the development proposal.
I also hope to add tools to help test cards by either running automated AI vs. AI games or manual Human vs. AI games using an edited card in combination with other cards, where you can configure the starting board state. Note that these tools will also help us test existing cards and cards that will be scripted in the future as new Magic sets are released.
I hope these new features will lower the barrier to entry of creating and sharing custom sets. If you have any ideas, please let me know and I'll try to incorporate them. I'll be sure to touch base as I make progress.
Click here for more details on the development proposal.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 205 guests