Page 1 of 1

Implementing custom card sets on Forge

PostPosted: 02 Jun 2013, 15:38
by freddyjsg
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.

Re: Implementing custom card sets on Forge

PostPosted: 04 Jun 2013, 19:48
by Max mtg
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.

Re: Implementing custom card sets on Forge

PostPosted: 04 Jun 2013, 23:33
by freddyjsg
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

Re: Implementing custom card sets on Forge

PostPosted: 04 Jun 2013, 23:49
by Max mtg
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.

Re: Implementing custom card sets on Forge

PostPosted: 04 Jun 2013, 23:52
by moomarc
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
For Statues of Emerien, check the script of Ethersworn Shieldmage and just change the valid cards. The trigger should create an Effect that holds the static ability you scripted.

Re: Implementing custom card sets on Forge

PostPosted: 05 Jun 2013, 03:41
by freddyjsg
Thanks for the reply, it's very useful. I will continue with everything i can.

Re: Implementing custom card sets on Forge

PostPosted: 15 Jul 2013, 19:21
by Kilvoctu
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:

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.
First effect works (extrapolated from Safe Passage).
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..

Re: Implementing custom card sets on Forge

PostPosted: 15 Jul 2013, 19:54
by Max mtg
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.

Re: Implementing custom card sets on Forge

PostPosted: 15 Jul 2013, 19:55
by friarsol
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.

Re: Implementing custom card sets on Forge

PostPosted: 16 Jul 2013, 01:27
by Kilvoctu
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.

Re: Implementing custom card sets on Forge

PostPosted: 16 Jul 2013, 05:11
by moomarc
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.

Re: Implementing custom card sets on Forge

PostPosted: 02 Aug 2013, 14:43
by drdev
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.