Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




Formal Request Thread
Moderator: CCGHQ Admins
Re: Formal Request Thread
by Xander9009 » 22 Mar 2015, 04:01
The idea was this:
Necrotic Ooze has a few abilities to handle abilities from dead creatures.
It has a list of names associated with numbers. This is a hard-coded list which links a given creature with its activated abilities. (For this to work right, really, it needs to be a list of names with each name associated with a chest which contains the numbers for the abilities to better handle creatures with multiple abilities.)
Whenever it finds a creature in a graveyard with an activated ability, add that activated ability ID to the list of current abilities if and only if the list does not already contain that number.
Whenever it finds a creature card being removed from a graveyard with an activated ability, check if any other creature card in a graveyard has that same ability. If so, do nothing. If not, remove the activated ability ID from the list of current abilities.
Now, you have a list of ability IDs (each ID being the resource_id of the ability to grant) which should be granted to Necrotic Ooze. If that list has 10 or fewer abilities, then grant them all. If it has more than 10 abilities, then grant abilities 1 through 9 in the list and grant an activated ability that says "{0}: Next". When this ability is activated, stop granting abilities 1 through 9 and start granting abilities 10 through 18. If it is activated again, stop granting 10-18 and start granting 19-27. And so one, and so forth. (Really, I'd do it slightly differently so that if, say, there 13 abilities, then it would originally grant 1-9 and then next would grant 5-13, so there's always the maximum number available. But that's a minor detail.)
Necrotic Ooze has a few abilities to handle abilities from dead creatures.
It has a list of names associated with numbers. This is a hard-coded list which links a given creature with its activated abilities. (For this to work right, really, it needs to be a list of names with each name associated with a chest which contains the numbers for the abilities to better handle creatures with multiple abilities.)
- When Necrotic Ooze enters the battlefield, check each creature card in all graveyards for activated abilities.
- When a creature card is put into a graveyard from anywhere, check if it has an activated ability.
- When a creature card is removed from a graveyard, check if it has an activated ability.
Whenever it finds a creature in a graveyard with an activated ability, add that activated ability ID to the list of current abilities if and only if the list does not already contain that number.
Whenever it finds a creature card being removed from a graveyard with an activated ability, check if any other creature card in a graveyard has that same ability. If so, do nothing. If not, remove the activated ability ID from the list of current abilities.
Now, you have a list of ability IDs (each ID being the resource_id of the ability to grant) which should be granted to Necrotic Ooze. If that list has 10 or fewer abilities, then grant them all. If it has more than 10 abilities, then grant abilities 1 through 9 in the list and grant an activated ability that says "{0}: Next". When this ability is activated, stop granting abilities 1 through 9 and start granting abilities 10 through 18. If it is activated again, stop granting 10-18 and start granting 19-27. And so one, and so forth. (Really, I'd do it slightly differently so that if, say, there 13 abilities, then it would originally grant 1-9 and then next would grant 5-13, so there's always the maximum number available. But that's a minor detail.)
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by nivmizzet1 » 23 Mar 2015, 03:59
could someone please look into the CW version of Pride of the Clouds for me? The forecast ability doesn't seem to be working as it should.
I should mention that I used code from CW versions of Proclamation of Rebirth and Skyscribing as a template for the forecast ability.
I should mention that I used code from CW versions of Proclamation of Rebirth and Skyscribing as a template for the forecast ability.
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Re: Formal Request Thread
by Xander9009 » 23 Mar 2015, 04:17
It's got two mistakes I see right off the bat. First up, the ability needs to be "<ACTIVATED_ABILITY active_zone="ZONE_HAND">" Secondly, it's a dual-color costed ability which doesn't remove the card from your hand. For whatever reason, that seems to cause the game to crash. thefiremind discovered this. However, I recall a game update corrected something to do with forecast abilities, but I don't know if it was that. So, try changing the ability so it's activable from the hand and see if it works. If it crashes or otherwise doesn't work still, it might simply not be possible. Although, you might be able to get a workaround by setting the cost in a generic cost and PayManaCost() function rather than doing it in a normal cost tag.
For an example of generic costs, look at Kessig Wolf Run. Thanks to it being a land with a mana ability and an activated ability with a mana cost with X, it couldn't be coded like normal so it ended up with one. Just note that the code is aimed at making sure the payer can pay X+1 (which is why it has to be generic) rather than X.
For an example of generic costs, look at Kessig Wolf Run. Thanks to it being a land with a mana ability and an activated ability with a mana cost with X, it couldn't be coded like normal so it ended up with one. Just note that the code is aimed at making sure the payer can pay X+1 (which is why it has to be generic) rather than X.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by zysron » 23 Mar 2015, 06:22
xander... i get what your saying about how to handle more than ten abilities... not so much about the "chest" which i am assuming would be something like if this happens check this data. as for doing 1-9 10-18... 1-9 10-17 19-26 etc. reason being is after ninth tenth is "next" making the next ten "previous", 8 abilities, then "next" this way there should be less wear and tear on the engine having to cycle all the way through back to the first set. but how would you be able to get it to even move on to the next and would the abilities be in order on the card? or would they be in order of entering the grave?... it would have to be in order on the card with next and previous being constant static abilities and everytime you switched between one set and another it would start the inquiry( i'm sory for saying inquiry instead of query it just sounds better) for those sets of cards, but would someone (if they tried) be able to crash the game switching back and forth like that too much?... i would suggest a fill in the blanks type thing in the wad. necrotic ooze with no abilities until filled out by the player... unless that "chest" you were talking about covered the creature abilities and name... i just dont see how it can be done with all creatures but even ten ... most people know what things they want in their grave yard for this card... me i would have these cards
this is a deck spoiler nothing more
this kinda set up in a deck can probably cause a few problems for opponents
this is a deck spoiler nothing more
- | Open
- #1 Burnished Hart
#2 Royal Assassin
#3 Kjeldoran Dead (b:regen)
#4 Pack Rat
#5 Geth, Lord of the Vault
#6 Drana, Kalastria Bloodchief
#7 Avatar of Woe
#8 Griselbrand
#9 Scrib Nibblers
#10 was thinking Gilder Bairn but requires blue or green where as Pili-Pala cost colorless
this kinda set up in a deck can probably cause a few problems for opponents
Last edited by zysron on 23 Mar 2015, 08:03, edited 1 time in total.
Re: Formal Request Thread
by zysron » 23 Mar 2015, 07:52
xander said,
"Nacatl War-Pride isn't possible as far as I know."
this is not code please dont expect the code its just suggestions
it wouldnt be absolutly correct b/c in the real game the tokens wouldnt have exile, it would be necatle that exiles tokens created by him. plus if you copied one of those tokens Or used Rhys the Redeemed to double the copies then you wouldnt have to exile the new copies. but rhys is a very dangerous card, engine wise, when you make token copies of creatures... (causes major fps loss and freezes if you have to many copies of a creature card, compared to token cards which stack and count) which is why i suggest simple tokens with exile instead of actual copies.
"Nacatl War-Pride isn't possible as far as I know."
this is not code please dont expect the code its just suggestions
- | Open
- i was looking up other cards to see what all abilities can be done similar in a way to warpride
Hero of Bladehold has the attack trigger token creator and the tapped and attacking modifier
Satyr Piper has the must be blocked code
and Borrowing 100,000 Arrows (Borrowing Arrows in wad) has the creature counter
modify tapped to just regular creatures
also in 2013 base game expansion with simic deck has the spell Biomantic Mastery
which would give a better code than arrows for creature counting but i cannot find it amongst all the different decks i threw in there
would just need warpride tokens with 3/3 must be blocked if able and has exile at the beginning of the next end step
so would be when attack trigger query creatures defending player controls = x, create x warpride tokens tapped and attacking defending player
it wouldnt be absolutly correct b/c in the real game the tokens wouldnt have exile, it would be necatle that exiles tokens created by him. plus if you copied one of those tokens Or used Rhys the Redeemed to double the copies then you wouldnt have to exile the new copies. but rhys is a very dangerous card, engine wise, when you make token copies of creatures... (causes major fps loss and freezes if you have to many copies of a creature card, compared to token cards which stack and count) which is why i suggest simple tokens with exile instead of actual copies.
Last edited by zysron on 23 Mar 2015, 08:02, edited 1 time in total.
Re: Formal Request Thread
by zysron » 23 Mar 2015, 07:59
lol sorry if there is one thing i know its my cards i love this game.
and since way back firemind, someone or you said the easiest way to make cards is to copy and paste existing abilities, mixing abilities shouldnt be too much harder... ... right?
and since way back firemind, someone or you said the easiest way to make cards is to copy and paste existing abilities, mixing abilities shouldnt be too much harder... ... right?
Re: Formal Request Thread
by RiiakShiNal » 23 Mar 2015, 11:00
Xander9009 is correct in that Nacatl War-Pride can't be coded. The problem is in the first ability "Nacatl War-Pride must be blocked by exactly one creature if able". The engine gives us the ability to specify that a creature must be blocked if able (CHARACTERISTIC_MUST_BE_BLOCKED_IF_ABLE) and/or must be blocked by all creatures if able (CHARACTERISTIC_ALL_CREATURES_MUST_BLOCK_THIS_IF_ABLE). It also gives us a partial ability to specify how many creatures must block it with CHARACTERISTIC_CANT_BE_BLOCKED_EXCEPT_BY_TWO_OR_MORE_CREATURES and CHARACTERISTIC_CANT_BE_BLOCKED_EXCEPT_BY_THREE_OR_MORE_CREATURES. However, there is no way to state that it must be blocked by exactly one creature. We also can't approximate "Creature A must block Creature B if able", there have been a lot of discussions, but no one has been able to come up with a method that follows MtG rules closely enough to be used.zysron wrote:xander said,
"Nacatl War-Pride isn't possible as far as I know."
this is not code please dont expect the code its just suggestions
- | Open
- i was looking up other cards to see what all abilities can be done similar in a way to warpride
Hero of Bladehold has the attack trigger token creator and the tapped and attacking modifier
Satyr Piper has the must be blocked code
and Borrowing 100,000 Arrows (Borrowing Arrows in wad) has the creature counter
modify tapped to just regular creatures
also in 2013 base game expansion with simic deck has the spell Biomantic Mastery
which would give a better code than arrows for creature counting but i cannot find it amongst all the different decks i threw in there
would just need warpride tokens with 3/3 must be blocked if able and has exile at the beginning of the next end step
so would be when attack trigger query creatures defending player controls = x, create x warpride tokens tapped and attacking defending player
it wouldnt be absolutly correct b/c in the real game the tokens wouldnt have exile, it would be necatle that exiles tokens created by him. plus if you copied one of those tokens Or used Rhys the Redeemed to double the copies then you wouldnt have to exile the new copies. but rhys is a very dangerous card, engine wise, when you make token copies of creatures... (causes major fps loss and freezes if you have to many copies of a creature card, compared to token cards which stack and count) which is why i suggest simple tokens with exile instead of actual copies.
The second ability isn't the problem and can be created fairly easily.
Rhys the Redeemed can fairly easily be coded, and copies of tokens can stack, the issue is when you start getting large amounts of tokens you can cause the game to crash, though by the time you have that many tokens you should have been able to win the match so that is more of a player problem in this case.
Generally, mixing abilities isn't that difficult, but getting some effects is impossible with the support we have from the engine. If you can show a card that works properly and ensures a card "must be blocked by exactly one creature" or "creature A must block creature B" then I will concede that Nacatl War-Pride is possible.zysron wrote:lol sorry if there is one thing i know its my cards i love this game.
and since way back firemind, someone or you said the easiest way to make cards is to copy and paste existing abilities, mixing abilities shouldnt be too much harder... ... right?
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Formal Request Thread
by tinisking » 23 Mar 2015, 16:32
Hey Guys! Just a couple of cards for my Affinity deck.
1) Spellskite
2) Vault Skirge
3) Etched Champion
Kind Regards,
tinisking
1) Spellskite
2) Vault Skirge
3) Etched Champion
Kind Regards,
tinisking
- tinisking
- Posts: 12
- Joined: 25 Oct 2013, 03:53
- Has thanked: 0 time
- Been thanked: 0 time
Re: Formal Request Thread
by Xander9009 » 23 Mar 2015, 17:00
I thought about having a previous button, but I would only have a previous button if there were at least 5 pages worth of abilities without the previous button.zysron wrote:xander... i get what your saying about how to handle more than ten abilities... not so much about the "chest" which i am assuming would be something like if this happens check this data. as for doing 1-9 10-18... 1-9 10-17 19-26 etc. reason being is after ninth tenth is "next" making the next ten "previous", 8 abilities, then "next" this way there should be less wear and tear on the engine having to cycle all the way through back to the first set. but how would you be able to get it to even move on to the next and would the abilities be in order on the card? or would they be in order of entering the grave?... it would have to be in order on the card with next and previous being constant static abilities and everytime you switched between one set and another it would start the inquiry( i'm sory for saying inquiry instead of query it just sounds better) for those sets of cards, but would someone (if they tried) be able to crash the game switching back and forth like that too much?... i would suggest a fill in the blanks type thing in the wad. necrotic ooze with no abilities until filled out by the player... unless that "chest" you were talking about covered the creature abilities and name... i just dont see how it can be done with all creatures but even ten ... most people know what things they want in their grave yard for this card... me i would have these cards
this is a deck spoiler nothing more
- | Open
- #1 Burnished Hart
#2 Royal Assassin
#3 Kjeldoran Dead (b:regen)
#4 Pack Rat
#5 Geth, Lord of the Vault
#6 Drana, Kalastria Bloodchief
#7 Avatar of Woe
#8 Griselbrand
#9 Scrib Nibblers
#10 was thinking Gilder Bairn but requires blue or green where as Pili-Pala cost colorless
this kinda set up in a deck can probably cause a few problems for opponents
<10: Grant all abilities.
11-36: Grant abilities in blocks of 9, with tenth slot reserved for "Next".
>36: Grant abilities in blocks of 8, with first slot reserved for "Previous" and tenth slot reserved for "Next".
You could potentially make it so you have a back button if there are more than 2 pages, or more than 3 pages, but I would have to test it out in game and see how it feels (and as much as I want to see the system work, I'm not going to be coding this; I'm just interested in discussing it).
The abilities would be in order based on their order on the card. Each ability would be required to have a resource_id, and they would go in order based on that ID. When a new creature enters the graveyard, the granted abilities would change if that creature's ability had a lower resource_id than any of the currently active ability on the card. This could be avoided, but it would require a lot of code (relatively) for a rather small change.
And as long as the game can actually handle the card being so long, then no, there wouldn't be much of an issue with it being activated back and forth. Assuming, of course, the abilities were all coded correctly.
You could potentially do what you're thinking about setting the card up beforehand, but then the opponent's creatures wouldn't be considered and that wouldn't really be much better than how it's already coded.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by nivmizzet1 » 23 Mar 2015, 17:23
hooray, it worked. No need for generic costsXander9009 wrote:It's got two mistakes I see right off the bat. First up, the ability needs to be "<ACTIVATED_ABILITY active_zone="ZONE_HAND">" Secondly, it's a dual-color costed ability which doesn't remove the card from your hand. For whatever reason, that seems to cause the game to crash. thefiremind discovered this. However, I recall a game update corrected something to do with forecast abilities, but I don't know if it was that. So, try changing the ability so it's activable from the hand and see if it works. If it crashes or otherwise doesn't work still, it might simply not be possible. Although, you might be able to get a workaround by setting the cost in a generic cost and PayManaCost() function rather than doing it in a normal cost tag.
For an example of generic costs, look at Kessig Wolf Run. Thanks to it being a land with a mana ability and an activated ability with a mana cost with X, it couldn't be coded like normal so it ended up with one. Just note that the code is aimed at making sure the payer can pay X+1 (which is why it has to be generic) rather than X.

unrelated: did I add Drogskol Captain to the CW cards? I was supposed to at the same time as pride of the clouds, and I thought I did, but it's not showing up. I'm going to add it again tonight and if there's any duplication then I guess you can do whatever's necessary to fix it on your end.
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Re: Formal Request Thread
by Nick26 » 23 Mar 2015, 20:29
Hi guys,
could someone help me to code Narset Transcendent second and last ability? The second one expecially seems quite nasty to code.
could someone help me to code Narset Transcendent second and last ability? The second one expecially seems quite nasty to code.
Re: Formal Request Thread
by Xander9009 » 23 Mar 2015, 21:03
I'm not seeing it at all, so I'd guess you forgot it.nivmizzet1 wrote:did I add Drogskol Captain to the CW cards? I was supposed to at the same time as pride of the clouds, and I thought I did, but it's not showing up. I'm going to add it again tonight and if there's any duplication then I guess you can do whatever's necessary to fix it on your end.
For the second ability, you can find the "next instant or sorcery spell this turn" on Chandra, the Firebrand, Howl of the Horde, or Overmaster (all included in the CW, if you have it, otherwise Chandra will be in the Planeswalker Pool and Howl of the Horde will be in volrathxp's mod). For "from your hand", just check TriggerObject():GetErstwhileZone() == ZONE_HAND. To give it rebound, just look at a card with Rebound. You'll see that upon resolution, it is exiled (but but it is stored in a pointer and protected to refer to later), and a delayed trigger is made. The delayed trigger will be almost exactly the same except "card" will be the stored card rather than EffectSource(). If you use teh delayed trigger setup that the normal rebound spells use, then card will be "local card = EffectDC():Get_CardPtr(0)". That should be everything necessary. It won't truly grant rebound, but will instead cause the exact same effect as if it did have rebound.Nick26 wrote:Hi guys,
could someone help me to code Narset Transcendent second and last ability? The second one expecially seems quite nasty to code.
For the last ability, this is the code for "You can't cast creature spells."
- Code: Select all
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You can’t cast creature spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vous ne pouvez pas jouer de sorts de créature.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[No puedes jugar hechizos de criatura.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Du kannst keine Kreaturenzauber spielen.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Non puoi lanciare magie creatura.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたはクリーチャー呪文をプレイできない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[You can’t cast creature spells.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Вы не можете разыгрывать заклинания существ.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Você não pode jogar mágicas de criatura.]]></LOCALISED_TEXT>
<FILTER filter_id="0">
local filter = ClearFilter()
filter:SetZone( ZONE_ANYWHERE )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_TEAM, OP_IS, EffectController():GetTeam() )
</FILTER>
<CONTINUOUS_ACTION layer="8" filter_id="0">
if FilteredCard() ~= nil then
local characteristics = FilteredCard():GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_CANT_BE_PLAYED, 1 )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by nivmizzet1 » 24 Mar 2015, 02:26
Are you seeing it now? Because I tried to add it almost immediately after writing that.Xander9009 wrote:I'm not seeing it at all, so I'd guess you forgot it.nivmizzet1 wrote:did I add Drogskol Captain to the CW cards? I was supposed to at the same time as pride of the clouds, and I thought I did, but it's not showing up. I'm going to add it again tonight and if there's any duplication then I guess you can do whatever's necessary to fix it on your end.
______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Re: Formal Request Thread
by Xander9009 » 24 Mar 2015, 02:29
Yup.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by nivmizzet1 » 24 Mar 2015, 06:06
coolXander9009 wrote:Yup.

______________________________________
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
my DOTP 2014 Main mod page - my DOTP 2014 OP Decks mod page - Community WAD
- nivmizzet1
- Posts: 617
- Joined: 21 Mar 2013, 10:10
- Has thanked: 100 times
- Been thanked: 25 times
Who is online
Users browsing this forum: No registered users and 15 guests