Script reference - better documentation needed!
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Script reference - better documentation needed!
by pufthemajicdragon » 07 Feb 2015, 20:53
I'm trying to teach myself this scripting language as best as I can by making custom cards with custom effects. The trouble is that referencing existing cards doesn't give me much guidance, and there are a million key words, commands, and functions that aren't documented on the wiki.
The ones I'm having trouble with right now are imprinting and remembering cards. But there are so many others that I have trouble with too. Is there an existing reference somewhere that includes all of these functions? Or is it just a trial and error kind of thing?
The ones I'm having trouble with right now are imprinting and remembering cards. But there are so many others that I have trouble with too. Is there an existing reference somewhere that includes all of these functions? Or is it just a trial and error kind of thing?
- pufthemajicdragon
- Posts: 23
- Joined: 08 Jan 2013, 04:17
- Has thanked: 7 times
- Been thanked: 2 times
Re: Script reference - better documentation needed!
by Hellfish » 13 Feb 2015, 08:04
It's mostly trial and error / copy pasting, unfortunately. I'll hopefully be able to take an hour this weekend to update at least the trigger wiki page, I just gotta catch up with the added triggers.
What is the problem with imprinting/remembering, specifically?
What is the problem with imprinting/remembering, specifically?
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Script reference - better documentation needed!
by Hexadecimal » 13 Feb 2015, 12:00
Forgive my ignorance, but where can I find the wiki ?
- Hexadecimal
- Posts: 69
- Joined: 08 Oct 2013, 20:36
- Has thanked: 6 times
- Been thanked: 2 times
Re: Script reference - better documentation needed!
by elcnesh » 13 Feb 2015, 12:17
http://www.slightlymagic.net/wiki/Forge_APIHexadecimal wrote:Forgive my ignorance, but where can I find the wiki ?
- elcnesh
- Posts: 290
- Joined: 16 May 2014, 15:11
- Location: Netherlands
- Has thanked: 34 times
- Been thanked: 92 times
Re: Script reference - better documentation needed!
by pufthemajicdragon » 17 Feb 2015, 18:34
Trial and error has hit a dead end
I'm trying to create a custom planeswalker with the ability to put a token into play, which token grants a bonus to its controller's creatures based on the number of loyalty counters on the planeswalker.
Text: -5 loyalty counters: Put an enchantment token into play with: "Each creature you control gains +1/+1 for each loyalty counter on Custom Planeswalker"
When I create the token, I call "ImprintToken" so Planeswalker can always reference its tokens. But I need a way to remember the Planeswalker on the token, so the token knows how many loyalty counters are on Planeswalker. Now I've looked at the code for almost every card that uses the Remember or Imprint key words and for the life of me I can't figure out how they work.
Best guess of how it might look (but this doesn't work):
The best workaround idea I have is to mimic Saproling Burst and push the number of loyalty counters to the token by adding counters to the token, and then count those counters. But I'd much rather make it work natively.
I'm trying to create a custom planeswalker with the ability to put a token into play, which token grants a bonus to its controller's creatures based on the number of loyalty counters on the planeswalker.
Text: -5 loyalty counters: Put an enchantment token into play with: "Each creature you control gains +1/+1 for each loyalty counter on Custom Planeswalker"
When I create the token, I call "ImprintToken" so Planeswalker can always reference its tokens. But I need a way to remember the Planeswalker on the token, so the token knows how many loyalty counters are on Planeswalker. Now I've looked at the code for almost every card that uses the Remember or Imprint key words and for the life of me I can't figure out how they work.
Best guess of how it might look (but this doesn't work):
- Code: Select all
A:AB$ Token | Cost$ SubCounter<5/LOYALTY> | Planeswalker$ True | TokenAmount$ 1 | TokenName$ Custom Planeswalker Token | TokenTypes$ Enchantment | TokenOwner$ You | TokenColors$ White | ImprintTokens$ True | Ultimate$ True | SpellDescription$ Put an enchantment token onto the battlefield under your control with "Creatures you control get +1/+1 for each loyalty counter on Custom Planeswalker."
S:Mode$ Continuous | Affected$ Card.IsImprinted | AddStaticAbility$ STPump | AddSVar$ Y & YCleanup
SVar:STPump:Mode$ Continuous | ImprintCards$ OriginalHost | Affected$ Creature.YouCtrl | AddPower$ Y | AddToughness$ 1 | Description$ Creatures you control get +1/+1 for each loyalty counter on Custom Planeswalker.
SVar:Y:Count$TotalCounters_LOYALTY_Card.IsImprinted+namedCustom Planeswalker
The best workaround idea I have is to mimic Saproling Burst and push the number of loyalty counters to the token by adding counters to the token, and then count those counters. But I'd much rather make it work natively.
- pufthemajicdragon
- Posts: 23
- Joined: 08 Jan 2013, 04:17
- Has thanked: 7 times
- Been thanked: 2 times
Re: Script reference - better documentation needed!
by Midori » 06 Mar 2015, 23:39
I might be not as skilled at scripting, but have you looked at the code of Gutter Grime already?
Im refering to this line.
The Remembered card is defined in the token creation effect by RememberSource$ True.
Im refering to this line.
- Code: Select all
SVar:GutterGrimePT:Remembered$CardCounters.SLIME
The Remembered card is defined in the token creation effect by RememberSource$ True.
- Code: Select all
SVar:DBToken:DB$ Token | TokenAmount$ 1 | TokenName$ Ooze | TokenTypes$ Creature,Ooze | TokenOwner$ You | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | TokenImage$ G X X Ooze ISD | TokenSVars$ GutterGrimePT | RememberSource$ True | TokenStaticAbilities$ Static
Re: Script reference - better documentation needed!
by pufthemajicdragon » 06 Mar 2015, 23:46
OMG that looks perfect! I think the "RememberSource$ True" command is exactly what I needed. I'll give it a whirl when I get home from work!
I'd been trying to find a card that closely matched what I was trying to do, but when there are 10,000+ card scripts to read through one by one....
:Edit:
Worked perfectly! You're my new hero!
I'd been trying to find a card that closely matched what I was trying to do, but when there are 10,000+ card scripts to read through one by one....
:Edit:
Worked perfectly! You're my new hero!
- pufthemajicdragon
- Posts: 23
- Joined: 08 Jan 2013, 04:17
- Has thanked: 7 times
- Been thanked: 2 times
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 40 guests