It is currently 02 Dec 2020, 21:04
   
Text Size

Card Development Questions

Post MTG Forge Related Programming Questions Here

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

Re: Card Development Questions

Postby Marek14 » 16 Mar 2015, 18:43

Can't see the problem, but I think there might be a problem with original Sutured Ghoul's code (though not the part you copied). If I read the code correctly, it initializes P/T of Sutured Ghoul once when it enters the battlefield, and then forgets the remembered cards, but that's not correct. Gatherer ruling says:

If any of the creature cards you exile has a characteristic-defining ability that defines its power and/or toughness, that ability will apply. For example, if Dungrove Elder is exiled this way, its power and toughness while it's in exile are equal to the number of Forests you control, and Sutured Ghoul's power and toughness will change as the number of Forests you control changes. If the characteristic-defining ability can't be applied (for instance, it relies on a choice made as the card enters the battlefield), then use 0.
So Sutured Ghoul should statically check the total power and toughness of exiled cards and change when their P/T changes or when they leave exile or get re-exiled.
Last edited by Marek14 on 16 Mar 2015, 18:53, edited 1 time in total.
Marek14
Tester
 
Posts: 2679
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 271 times

Re: Card Development Questions

Postby friarsol » 16 Mar 2015, 18:50

Midori, you should repost your whole script again, so we can see it with the latest changes...
friarsol
Global Moderator
 
Posts: 7557
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 952 times

Re: Card Development Questions

Postby Midori » 16 Mar 2015, 19:13

friarsol wrote:Midori, you should repost your whole script again, so we can see it with the latest changes...
Here is the latest version of the code.
Code: Select all
Name:Living Lore
ManaCost:3 U
Types:Creature Avatar
P/T:*/*
K:ETBReplacement:Copy:ChooseSpell
SVar:ChooseSpell:DB$ ChooseCard | Defined$ You | Amount$ 1 | Choices$ Sorcery.YouOwn,Instant.YouOwn | ChoiceTitle$ Exile a instant or sorcery card from your graveyard. | ChoiceZone$ Graveyard | RemenberChosen$ True | SubAbility$ ExileSpell |SpellDescription$ As CARDNAME enters the battlefield, exile a instant or sorcery card from your graveyard. CARDNAME's power and toughness are each equal to the exiled card's converted mana cost.
SVar:ExileSpell:DB$ ChangeZone | ChangeType$ Remembered | Origin$ Graveyard | Destination$ Exile | SubAbility$ AnimateLore
SVar:AnimateLore:DB$ Animate | Defined$ Self | Power$ TotalPower | Toughness$ TotalPower | Permanent$ True | References$ TotalPower
SVar:TotalPower:Remembered$CardManaCost
T:Mode$ DealtCombatDamageOnce | ValidSource$ Self | Execute$ TrigSacLore | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage, you may sacrifice it. If you do, you may cast the exiled card without paying its mana cost.
SVar:TrigSacLore:AB$ Play | Cost$ Sac<1/CARDNAME> | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ForgetRemembered$ True
SVar:RemRandomDeck:True
Midori
 
Posts: 55
Joined: 20 Apr 2014, 12:43
Has thanked: 1 time
Been thanked: 4 times

Re: Card Development Questions

Postby friarsol » 16 Mar 2015, 19:43

I doubt this will fix it, but it probably should be -

K:ETBReplacement:Other:ChooseSpell

I'd recommend animating before Exiling just to see if that helps, otherwise someone with a debugger will need to go in and see what's going on, it looks fine for the most part (aside from copy/pasted names that no longer make sense "total power")
friarsol
Global Moderator
 
Posts: 7557
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 952 times

Re: Card Development Questions

Postby Midori » 16 Mar 2015, 20:03

friarsol wrote:I doubt this will fix it, but it probably should be -

K:ETBReplacement:Other:ChooseSpell

I'd recommend animating before Exiling just to see if that helps, otherwise someone with a debugger will need to go in and see what's going on, it looks fine for the most part (aside from copy/pasted names that no longer make sense "total power")
Ok thanks, ill see if that works. If its fine ill use "X" instead of "TotalPower"

Marek14 wrote:Can't see the problem, but I think there might be a problem with original Sutured Ghoul's code (though not the part you copied). If I read the code correctly, it initializes P/T of Sutured Ghoul once when it enters the battlefield, and then forgets the remembered cards, but that's not correct. Gatherer ruling says:

If any of the creature cards you exile has a characteristic-defining ability that defines its power and/or toughness, that ability will apply. For example, if Dungrove Elder is exiled this way, its power and toughness while it's in exile are equal to the number of Forests you control, and Sutured Ghoul's power and toughness will change as the number of Forests you control changes. If the characteristic-defining ability can't be applied (for instance, it relies on a choice made as the card enters the battlefield), then use 0.
So Sutured Ghoul should statically check the total power and toughness of exiled cards and change when their P/T changes or when they leave exile or get re-exiled.
I absolutlely agree, but Sutured Ghoul was the best reference i could find since the code of The Mimeoplasm is very... special.
I think instead of "DB$ Animate" ill try to use "Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True"

Edit:
It still doesn't work. Apparently it just won't exile the spell. Here the current code. I hope i didn't make more grammar mistakes.
Edit Living Lore Code | Open
Code: Select all
Name:Living Lore
ManaCost:3 U
Types:Creature Avatar
P/T:*/*
K:ETBReplacement:Other:ChooseSpell
SVar:ChooseSpell:DB$ ChooseCard | Defined$ You | Amount$ 1 | Choices$ Sorcery.YouOwn,Instant.YouOwn | ChoiceTitle$ Exile a instant or sorcery card from your graveyard. | ChoiceZone$ Graveyard | RemenberChosen$ True | SubAbility$ ExileSpell |SpellDescription$ As CARDNAME enters the battlefield, exile a instant or sorcery card from your graveyard.
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the exiled card's converted mana cost.
SVar:ExileSpell:DB$ ChangeZone | ChangeType$ Remembered | Origin$ Graveyard | Destination$ Exile | SubAbility$ AnimateLore
SVar:X:Remembered$ CardManaCost
T:Mode$ DealtCombatDamageOnce | ValidSource$ Self | Execute$ TrigSacLore | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage, you may sacrifice it. If you do, you may cast the exiled card without paying its mana cost.
SVar:TrigSacLore:AB$ Play | Cost$ Sac<1/CARDNAME> | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ForgetRemembered$ True
SVar:RemRandomDeck:True
But the good news: The card has now card text. Even though its abilities arent displayed in the correct order.

Edit 2
I have played a bit with the code. the static ability for P/T seems to work (i coded the card as 0/1 with the ability and it is a 0/0 in my hand). So the issue is very likely the replacement effect that is supposed to exile a card. While i can choose a valid card in my graveyard, it won't exile that card (and that card is most likely not remembered as well).
Edit 2 Living Lore Code | Open
Code: Select all
Name:Living Lore
ManaCost:3 U
Types:Creature Avatar
P/T:*/*
K:ETBReplacement:Other:ChooseSpell
SVar:ChooseSpell:DB$ ChooseCard | Defined$ You | Amount$ 1 | Choices$ Sorcery.YouOwn,Instant.YouOwn | ChoiceTitle$ Exile a instant or sorcery card from your graveyard. | ChoiceZone$ Graveyard | RemenberChosen$ True | SubAbility$ ExileSpell |SpellDescription$ As CARDNAME enters the battlefield, exile a instant or sorcery card from your graveyard.
S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | SetToughness$ X | Description$ CARDNAME's power and toughness are each equal to the exiled card's converted mana cost.
SVar:ExileSpell:DB$ ChangeZone | ChangeType$ Remembered | Origin$ Graveyard | Destination$ Exile
SVar:X:Remembered$ CardManaCost
T:Mode$ DealtCombatDamageOnce | ValidSource$ Self | Execute$ TrigSacLore | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage, you may sacrifice it. If you do, you may cast the exiled card without paying its mana cost.
SVar:TrigSacLore:AB$ Play | Cost$ Sac<1/CARDNAME> | Defined$ Remembered | Amount$ All | Controller$ You | WithoutManaCost$ True | Optional$ True | ForgetRemembered$ True
SVar:RemRandomDeck:True
Last edited by Midori on 16 Mar 2015, 23:13, edited 1 time in total.
Midori
 
Posts: 55
Joined: 20 Apr 2014, 12:43
Has thanked: 1 time
Been thanked: 4 times

Re: Card Development Questions

Postby Marek14 » 16 Mar 2015, 20:44

Sutured Ghoul also uses ETBReplacement:Copy: -- is that correct?
Marek14
Tester
 
Posts: 2679
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 271 times

Re: Card Development Questions

Postby Alvy01 » 16 Mar 2015, 21:59

Heys guys sorry for posting twice in one day about the same topic but I only have two abilities for my custom cards that I just can't seem to get working. Thanks in advance to anyone who is able to help.

My first issue is a planeswalker ultimate that is supposed to be: You get an emblem with "Whenever you cast an instant spell, copy it. You may choose new targets for the copy." Here's my code so far for this ability I'm sure both of these needs some more work to get functioning:

A:AB$ Effect | Cost$ SubCounter<6/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Octavius, Spellweaver emblem | Image$ octavius_spellweaver_emblem | Triggers$ TrigSpellCast | SVars$ TrigCopy,CopySpellAbility | Duration$ Permanent | AILogic$ Always | SpellDescription$ You get an emblem with "Whenever you cast an instant spell, you may copy that spell. You may choose new targets for the copy."
SVar:TrigSpellCast:Mode$ SpellCast | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigCopy | TriggerDescription$ Whenever you cast an instant spell, you may copy that spell. You may choose new targets for the copy.
SVar:TrigCopy:AB$ CopySpellAbility | Cost$ 0 | Defined$ TriggeredSpellAbility

The second issue is another planeswalker ultimate, which is: You get an emblem with "You have no max hand size, on your upkeep you gain life equal to the number of cards in your hand." Here's the code so far.

A:AB$ Effect | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Marcus, Knight Enchanter emblem | Image$ marcus_knight_enchanter_emblem | Triggers$ EOTTrig | SVars$ MarcusEmblem | Duration$ Permanent | SpellDescription$ You get an emblem with "You have no max hand size, on your upkeep you gain life equal to the number of cards in your hand."SVar:EOTTrig:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | SpellDescription$ You have no maximum hand size. At the beginning of your upkeep, you gain X life, where X is the number of cards in your hand.SVar:MarcusEmblem:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.YouCtrl | PresentZone$ Hand | PresentCompare$ GT4 | TriggerZones$ Battlefield | Execute$ TrigGainLife | TriggerDescription$ You have no maximum hand size. At the beginning of your upkeep, you gain X life, where X is the number of cards in your hand.
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | References$ X
SVar:X:Count$InYourHand

Again thanks in advance if anyone can help I'm still trying to get a grasp on the script language and I'm not a programmer or anything.
Alvy01
 
Posts: 9
Joined: 16 Mar 2015, 13:39
Has thanked: 3 times
Been thanked: 0 time

Re: Card Development Questions

Postby Midori » 16 Mar 2015, 23:45

"Alvy01" | Open
Alvy01 wrote:Heys guys sorry for posting twice in one day about the same topic but I only have two abilities for my custom cards that I just can't seem to get working. Thanks in advance to anyone who is able to help.

My first issue is a planeswalker ultimate that is supposed to be: You get an emblem with "Whenever you cast an instant spell, copy it. You may choose new targets for the copy." Here's my code so far for this ability I'm sure both of these needs some more work to get functioning:

A:AB$ Effect | Cost$ SubCounter<6/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Octavius, Spellweaver emblem | Image$ octavius_spellweaver_emblem | Triggers$ TrigSpellCast | SVars$ TrigCopy,CopySpellAbility | Duration$ Permanent | AILogic$ Always | SpellDescription$ You get an emblem with "Whenever you cast an instant spell, you may copy that spell. You may choose new targets for the copy."
SVar:TrigSpellCast:Mode$ SpellCast | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigCopy | TriggerDescription$ Whenever you cast an instant spell, you may copy that spell. You may choose new targets for the copy.
SVar:TrigCopy:AB$ CopySpellAbility | Cost$ 0 | Defined$ TriggeredSpellAbility

The second issue is another planeswalker ultimate, which is: You get an emblem with "You have no max hand size, on your upkeep you gain life equal to the number of cards in your hand." Here's the code so far.

A:AB$ Effect | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Marcus, Knight Enchanter emblem | Image$ marcus_knight_enchanter_emblem | Triggers$ EOTTrig | SVars$ MarcusEmblem | Duration$ Permanent | SpellDescription$ You get an emblem with "You have no max hand size, on your upkeep you gain life equal to the number of cards in your hand."SVar:EOTTrig:Mode$ Continuous | Affected$ You | SetMaxHandSize$ Unlimited | SpellDescription$ You have no maximum hand size. At the beginning of your upkeep, you gain X life, where X is the number of cards in your hand.SVar:MarcusEmblem:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | IsPresent$ Card.YouCtrl | PresentZone$ Hand | PresentCompare$ GT4 | TriggerZones$ Battlefield | Execute$ TrigGainLife | TriggerDescription$ You have no maximum hand size. At the beginning of your upkeep, you gain X life, where X is the number of cards in your hand.
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X | References$ X
SVar:X:Count$InYourHand

Again thanks in advance if anyone can help I'm still trying to get a grasp on the script language and I'm not a programmer or anything.
There are a lot of things i see here.
"TriggerZones$ Battlefield" -> "TriggerZones$ Command" for example (a emblem can't trigger on the battlefield, since it is in your command zone)
Im not so sure about the first Ultimate, but for the second Ultimate, you should try to reference from Tamiyo, the Moon Sage (for how to script an emblem with static and triggered abilities) and Venser's Journal (since it is basically your emblem as artifact).
Remember, the unlimited hand ist a static ability and not a trigger. Therefore you need to use StaticAbilities$ for the unlimited hand and Trigger$ for the lifegain.
Midori
 
Posts: 55
Joined: 20 Apr 2014, 12:43
Has thanked: 1 time
Been thanked: 4 times

Re: Card Development Questions

Postby Alvy01 » 17 Mar 2015, 14:59

Thank you for your help and for pointing those cards out to me I now can get it to give the unlimited hand size but the gain life isn't happening and I'm not sure why. Here's the revised code:

A:AB$ Effect | Cost$ SubCounter<0/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Marcus, Knight Enchanter emblem | Image$ marcus_knight_enchanter_emblem | StaticAbilities$ UnlimitedHand | Triggers$ MarcusGainLife | SVars$ TrigGainLife | Stackable$ False | Duration$ Permanent | AILogic$ Always | SpellDescription$ You get an emblem with "You have no maximum hand size" and "At the beginning of your upkeep, you gain 1 life for each card in your hand."
SVar:UnlimitedHand:Mode$ Continuous | EffectZone$ Command | Affected$ You | SetMaxHandSize$ Unlimited | Description$ You have no maximum hand size.
SVar:MarcusGainLife:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Command | Execute$ TrigGainLife | TriggerDescription$ At the beginning of your upkeep, you gain 1 life for each card in your hand.
SVar:TrigGainLife:AB$GainLife | Cost$ 0 | LifeAmount$ X | References$ X
SVar:X:Count$InYourHand
Alvy01
 
Posts: 9
Joined: 16 Mar 2015, 13:39
Has thanked: 3 times
Been thanked: 0 time

Re: Card Development Questions

Postby friarsol » 17 Mar 2015, 15:28

You aren't passing the "X" SVar into the created Effect. So when TrigGainLife gets run, it tries to look up "X" which it can't find, so assumes it's 0.
friarsol
Global Moderator
 
Posts: 7557
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 952 times

Re: Card Development Questions

Postby Alvy01 » 17 Mar 2015, 15:39

[code][/code]Oh I made the same mistake twice now thank you, would you have any advice on the first ultimate I had a few posts back I'm still stumped on that one
Alvy01
 
Posts: 9
Joined: 16 Mar 2015, 13:39
Has thanked: 3 times
Been thanked: 0 time

Re: Card Development Questions

Postby friarsol » 17 Mar 2015, 16:06

Alvy01 wrote:would you have any advice on the first ultimate I had a few posts back I'm still stumped on that one
Are you talking about the Octavius one? Did you already change the Zone it triggers in to Command?

This looks just like Chandra's second ability, except it is permanent, instead of a one time use. That ability is:

Chandra's -2 | Open
A:AB$Effect | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | Name$ Chandra, the Firebrand effect. | Image$ chandra_the_firebrand_effect | Triggers$ TrigCopy | SVars$ TrigCopyMain,DBCleanup | SpellDescription$ When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.
SVar:TrigCopy:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | OneOff$ True | Execute$ TrigCopyMain | TriggerZones$ Command | TriggerDescription$ When you cast your next instant or sorcery spell this turn, copy that spell. You may choose new targets for the copy.
SVar:TrigCopyMain:AB$ CopySpellAbility | Cost$ 0 | Defined$ TriggeredSpellAbility | SubAbility$ DBCleanup


so yours would be something like:

Octavius | Open
A:AB$ Effect | Cost$ SubCounter<6/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Octavius, Spellweaver emblem | Image$ octavius_spellweaver_emblem | Triggers$ TrigCopy | SVars$ TrigCopyMain | SpellDescription$ You get an emblem with "Whenever you cast an instant spell, you may copy that spell. You may choose new targets for the copy."
SVar:TrigCopy:Mode$ SpellCast | ValidCard$ Instant | ValidActivatingPlayer$ You | Execute$ TrigCopyMain | TriggerZones$ Command | TriggerDescription$ Whenever you cast an instant spell, you may copy that spell. You may choose new targets for the copy.
SVar:TrigCopyMain:AB$ CopySpellAbility | Cost$ 0 | Defined$ TriggeredSpellAbility


There seems like there's a handful of differences here, all of which probably combine into why it's not working.
friarsol
Global Moderator
 
Posts: 7557
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 952 times

Re: Card Development Questions

Postby Alvy01 » 17 Mar 2015, 19:20

Awesome thanks so much you guys. I'm not sure why Chandra didn't come up when I was searching for a similar ability. The code worked perfectly with the small addition of a Duration$ Permanent. Thanks again the assistance is much appreciated.
Alvy01
 
Posts: 9
Joined: 16 Mar 2015, 13:39
Has thanked: 3 times
Been thanked: 0 time

Re: Card Development Questions

Postby rikkusguardian » 28 Mar 2015, 06:48

Hey there! I'm a bit new to making cards for Forge, but I wanted to design a planeswalker to support Selesnya / Token players.

For her -2 ability, I wanted her to Populate first (make a copy of a token I control on my field) then put a +0/+2 counter on a target creature I control.

"-2: Populate, then put a +0/+2 counter on target creature you control."

But when i use this...

Code: Select all
A:AB$ ChooseCard | Cost$ SubCounter<2/LOYALTY> | Planeswalker$ True | Defined$ You | Amount$ 1 | Choices$ Creature.token+YouCtrl | AILogic$ AtLeast1 | SubAbility$ DBCopy | Mandatory$ True |  SpellDescription$ Populate, then put a +0/+2 counter on target creature you control. (Put a token onto the battlefield that's a copy of a creature token you control.)
SVar:DBCopy:DB$ CopyPermanent | Defined$ ChosenCard | SubAbility$ DBPutCounter
SVar:DBPutCounter:DB$ PutCounter | CounterNum$ 1 | CounterType$ P0P2 | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Creature+YouCtrl | TgtPrompt$ Select target creature | SpellDescription$ Put a +0/+2 counter on up to one target creature.
I am accidentally forced to instead put the counter on a creature BEFORE i populate. Darn...what If i was planning to have that counter be put on my newest populated token?
rikkusguardian
 
Posts: 15
Joined: 04 Jul 2013, 10:29
Has thanked: 6 times
Been thanked: 0 time

Re: Card Development Questions

Postby friarsol » 28 Mar 2015, 13:29

rikkusguardian wrote:"-2: Populate, then put a +0/+2 counter on target creature you control."

I am accidentally forced to instead put the counter on a creature BEFORE i populate. Darn...what If i was planning to have that counter be put on my newest populated token?
No offense, but it's just bad card design. It's doing exactly what you said it should do.

Targets are chosen before an ability goes on the stack. So the token that might be created can never be a legal target for that ability. You would need an ability like Bolster, which chooses the creature as it resolves.

Also, +0/+2 counters have only been used once (21 years ago), and while Forge handles them just fine, it's probably better not to use these types of counter.
friarsol
Global Moderator
 
Posts: 7557
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 952 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 16 guests


Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 16 guests

Login Form