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




Community Wad
Moderator: CCGHQ Admins
Re: Community Wad
by Xander9009 » 23 Aug 2016, 18:54
In the process of adding in the new tokens from Eldritch Moon, I decided there really needed to be a way to disable the token variety if people want to. So, I came up with a relatively simple solution. If you don't want a card to produce different versions of tokens, then here's the gist of it.
That simple. If you don't have a loose files directory (if you don't know, then you probably don't), then open up Riiak's Deck Builder, click Tools->Setup Custom Data Folder. Now in your game folder there will be a folder named "DATA_DLC_DECK_BUILDER_CUSTOM". Place the LOL file in "\DATA_DLC_DECK_BUILDER_CUSTOM\DATA_ALL_PLATFORMS\FUNCTIONS\".
From then on, the CW_Tokens function I wrote to randomize the art tokens use will only produce the first token in the list. This means they'll stack.
If this method of handling options is acceptable to everyone, I might include a few other options this way, such as error messages and basic lands having manual mana abilities.
One alternative I considered was adding a manager token creation to every card (there would only be one manager created per player, no matter how many cards use it). That manager would ask at the beginning of the game for several user-specified options. This way, within the same game, two players could choose different options. One could have a variety of tokens and the other only has one art per token type. One player might want manual mana abilities on their lands but the other player doesn't.
- Go here, open the Options folder, and download the CW_TOKENS_ONLY_USE_ONE_TOKEN.LOL file.
- Place that file in your game folder somewhere in a loose file directory the game can read.
That simple. If you don't have a loose files directory (if you don't know, then you probably don't), then open up Riiak's Deck Builder, click Tools->Setup Custom Data Folder. Now in your game folder there will be a folder named "DATA_DLC_DECK_BUILDER_CUSTOM". Place the LOL file in "\DATA_DLC_DECK_BUILDER_CUSTOM\DATA_ALL_PLATFORMS\FUNCTIONS\".
From then on, the CW_Tokens function I wrote to randomize the art tokens use will only produce the first token in the list. This means they'll stack.
If this method of handling options is acceptable to everyone, I might include a few other options this way, such as error messages and basic lands having manual mana abilities.
One alternative I considered was adding a manager token creation to every card (there would only be one manager created per player, no matter how many cards use it). That manager would ask at the beginning of the game for several user-specified options. This way, within the same game, two players could choose different options. One could have a variety of tokens and the other only has one art per token type. One player might want manual mana abilities on their lands but the other player doesn't.
_______________________________
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: Community Wad
by Xander9009 » 25 Aug 2016, 18:11
Recruiter of the Guard has been added to Gatherer, so its multiverse ID and filename have been changed. Any decks using it will break the game until those decks are corrected.
I'm also going to go ahead and remove the Darksteel Forge as I mentioned a couple days ago.
EDIT: No decks in the CW Decks folder appear to have used either card, so those should not need to be updated. Please make sure your local decks are good before reporting issues. Note that if you open the Deck Builder after updating the CW (after it repacks, which it hasn't yet), then it will tell you if any need attended to.
EDIT 2: Trygon Predator is another duplicate I've just happened across. The older one ("TRYGON_PREDATOR_CW_97112") will be deleted in the next couple of days.
EDIT 3: I've been working over the last couple of days to change various functions. The most noticeable one right now will be planeswalkers showing an error message at the start of the game. These error messages will be dealt with soon.
Also, all cards that refer to enchantments are being changed to use a custom set of functions which will differentiate between enchantments and planeswalkers. They can all be found at the end of D14_PLW.LOL. They're very easy to use.
For the filter ones, which are slightly less self-explanatory than the PLW_IsEnchantment(oCard) type functions, simply place it in place of filter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT). It requires the filter and the zone it's intended to function in. PLW_FilterAddEnchantment(filter, ZONE_BATTLEFIELD), for example, will add enchantments to "filter", but it will also remove planeswalkers unless Enchanted Evening is in play. This removes the need for planeswalkers to have a protection filter. Now, the cards themselves will contain the code needed to prevent them from targeting planeswalkers as if they were enchantments.
All of the cards from the list of protection filter cards in the D14_PLW.LOL file have been corrected. There are roughly 150 more to deal with, which will hopefully be done tomorrow. I'm not certain, though.
Once that's done, I'll be working on all of the planeswalkers, removing their protection filters (and hopefully removing some of their lag, which is already very low compared to how it used to be), and replacing their manager token creation functions for the CW standard one, which will remove the error messages they're currently showing.
After that, it's on to manifest cards, which I've simplified SO MUCH. They now require only a single function call to manifest a card, and everything else is taken care of. I'm planning to do the same for morph eventually. both of these will take much longer, though. They may even wait until after EMN is fully coded.
I'm also going to go ahead and remove the Darksteel Forge as I mentioned a couple days ago.
EDIT: No decks in the CW Decks folder appear to have used either card, so those should not need to be updated. Please make sure your local decks are good before reporting issues. Note that if you open the Deck Builder after updating the CW (after it repacks, which it hasn't yet), then it will tell you if any need attended to.
EDIT 2: Trygon Predator is another duplicate I've just happened across. The older one ("TRYGON_PREDATOR_CW_97112") will be deleted in the next couple of days.
EDIT 3: I've been working over the last couple of days to change various functions. The most noticeable one right now will be planeswalkers showing an error message at the start of the game. These error messages will be dealt with soon.
Also, all cards that refer to enchantments are being changed to use a custom set of functions which will differentiate between enchantments and planeswalkers. They can all be found at the end of D14_PLW.LOL. They're very easy to use.
For the filter ones, which are slightly less self-explanatory than the PLW_IsEnchantment(oCard) type functions, simply place it in place of filter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT). It requires the filter and the zone it's intended to function in. PLW_FilterAddEnchantment(filter, ZONE_BATTLEFIELD), for example, will add enchantments to "filter", but it will also remove planeswalkers unless Enchanted Evening is in play. This removes the need for planeswalkers to have a protection filter. Now, the cards themselves will contain the code needed to prevent them from targeting planeswalkers as if they were enchantments.
All of the cards from the list of protection filter cards in the D14_PLW.LOL file have been corrected. There are roughly 150 more to deal with, which will hopefully be done tomorrow. I'm not certain, though.
Once that's done, I'll be working on all of the planeswalkers, removing their protection filters (and hopefully removing some of their lag, which is already very low compared to how it used to be), and replacing their manager token creation functions for the CW standard one, which will remove the error messages they're currently showing.
After that, it's on to manifest cards, which I've simplified SO MUCH. They now require only a single function call to manifest a card, and everything else is taken care of. I'm planning to do the same for morph eventually. both of these will take much longer, though. They may even wait until after EMN is fully 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: Community Wad
by tmxk2012917 » 26 Aug 2016, 16:51
The message that 'PLW_CreatUniqueTokenForEachPlayer is a deprecated function for ...' was shown whenever I used a deck containing plws in game
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 27 Aug 2016, 03:44
Explained in the post above yours. It's part of an update I'm doing and will go away in a few days.tmxk2012917 wrote:The message that 'PLW_CreatUniqueTokenForEachPlayer is a deprecated function for ...' was shown whenever I used a deck containing plws in game
_______________________________
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: Community Wad
by tmxk2012917 » 27 Aug 2016, 03:46
sorry. I did not pay attention to the posts above.
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by tmxk2012917 » 30 Aug 2016, 20:28
Elspeth, sun's champion disappeared after I updated CW yesterday. Is it removed?
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 30 Aug 2016, 21:45
IMPORTANT POST FOR MODDERS: PLEASE READ
Dack Fayden
Daretti, Scrap Savant
Elspeth, Knight-Errant
Elspeth, Sun's Champion
----
Speaking of which, there are two major changes for those coding cards. Referencing enchantments and making planeswalkers.
Mostly directed at migookman, but still at anyone who makes cards: All (or at least nearly all) cards that reference enchantments now have a set of functions for doing so. Please make sure you use those. They allow planeswalkers and enchantment references to properly work together. They're very simple. Just keep in mind that if the function takes a card, that's the only parameter. If a function does NOT take a card, then it also needs the intended zone (so it knows whether or not Enchanted Evening should affect it). The functions:
For the filters, here's an example.
For planeswalkers, mostly info for fallenangle, there've been two minor changes.
1: Don't include the planeswalker protection functions. They are no longer needed. The functions above allow the same result, but with three benefits. A) There is no list that need updated when a new set comes out. B) There is no constantly running string comparisons with dozens of card names to determine protection status. C) Protection doesn't actually protect from everything. The functions above will prevent them from being affected by anything that shouldn't as long as the cards use those functions, and since they're in every example, including the base game cards which I corrected and included, that should be the result. Hopefully.
2: Make sure to use the function CW_General_CreateManagers("_MANAGER_PLANESWALKER") instead of the original manager creation. It's part of a standarzisation of a very basic and widespread function. Everything that makes managers uses the ebove except those that use RSN_Characteristics_CreateManagers, which I haven't done yet because it's such a large list of cards.
----
Lastly, there was a change awhile back which corrected broken behavior. No cards were able to damage planeswalkers. The normal damage function didn't work on them. So I created PLW_DealDamageToPlaneswalker(Source, Target, Amount). It uses the same body as the ability on the manager that makes them take damage from creatures, but with a modified triggerset being fired. It's still not perfect, but now when Brutal Expulsion targets a planeswalker, that planeswalker loses 2 loyatly counters and should trigger any deals damage or takes damage triggers like normal. Before, it simply did nothing. (It might have triggered normally, but I don't remember. I don't think it did.)
All of these functions are in D14_PLW.lol. So, fallenangle, please make sure before you update that file yourself on your end that you get the current one, otherwise when you send it to me, the new functions will be missing.
I did a batch update of planeswalkers yesterday and apparently a couple had disappeared in the process. Not to worry. I made a backup in case anything went wrong, and they've all four been put back in.tmxk2012917 wrote:Elspeth, sun's champion disappeared after I updated CW yesterday. Is it removed?
Dack Fayden
Daretti, Scrap Savant
Elspeth, Knight-Errant
Elspeth, Sun's Champion
----
Speaking of which, there are two major changes for those coding cards. Referencing enchantments and making planeswalkers.
Mostly directed at migookman, but still at anyone who makes cards: All (or at least nearly all) cards that reference enchantments now have a set of functions for doing so. Please make sure you use those. They allow planeswalkers and enchantment references to properly work together. They're very simple. Just keep in mind that if the function takes a card, that's the only parameter. If a function does NOT take a card, then it also needs the intended zone (so it knows whether or not Enchanted Evening should affect it). The functions:
- PLW_FilterAddEnchantments(fFilter, iZone)
- PLW_FilterRemoveEnchantments(fFilter, iZone)
- PLW_FilterAddPlaneswalkers(fFilter)
- PLW_FilterRemovePlaneswalkers(fFilter)
- PLW_IsPlaneswalker(oCard)
- PLW_IsEnchantment(oCard)
For the filters, here's an example.
- Example | Open
- Code: Select all
-- Filter all artifacts and enchantments you don't control.
-- Original filter:
local filter = ClearFilter()
filter:Add(FE_TEAM, OP_NOT, EffectController():GetTeam())
local subfilter = filter:AddSubFilter_Or()
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT)
-- New filter. Almost identical; only one line is different.
local filter = ClearFilter()
filter:Add(FE_TEAM, OP_NOT, EffectController():GetTeam())
local subfilter = filter:AddSubFilter_Or()
subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
PLW_FilterAddEnchantments(subfilter, ZONE_BATTLEFIELD)
For planeswalkers, mostly info for fallenangle, there've been two minor changes.
1: Don't include the planeswalker protection functions. They are no longer needed. The functions above allow the same result, but with three benefits. A) There is no list that need updated when a new set comes out. B) There is no constantly running string comparisons with dozens of card names to determine protection status. C) Protection doesn't actually protect from everything. The functions above will prevent them from being affected by anything that shouldn't as long as the cards use those functions, and since they're in every example, including the base game cards which I corrected and included, that should be the result. Hopefully.
2: Make sure to use the function CW_General_CreateManagers("_MANAGER_PLANESWALKER") instead of the original manager creation. It's part of a standarzisation of a very basic and widespread function. Everything that makes managers uses the ebove except those that use RSN_Characteristics_CreateManagers, which I haven't done yet because it's such a large list of cards.
----
Lastly, there was a change awhile back which corrected broken behavior. No cards were able to damage planeswalkers. The normal damage function didn't work on them. So I created PLW_DealDamageToPlaneswalker(Source, Target, Amount). It uses the same body as the ability on the manager that makes them take damage from creatures, but with a modified triggerset being fired. It's still not perfect, but now when Brutal Expulsion targets a planeswalker, that planeswalker loses 2 loyatly counters and should trigger any deals damage or takes damage triggers like normal. Before, it simply did nothing. (It might have triggered normally, but I don't remember. I don't think it did.)
All of these functions are in D14_PLW.lol. So, fallenangle, please make sure before you update that file yourself on your end that you get the current one, otherwise when you send it to me, the new functions will be missing.
_______________________________
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: Community Wad
by nivmizzet1 » 02 Sep 2016, 14:47
There's a bug with Puresteel Paladin 's metalcraft ability; all equipments get the 'equip 0' ability, but it can only be activated on some equipments (in my case, the equipments that were already on the battlefield before Puresteel Paladin were the ones where equip 0 couldn't be acitivated). This problem must be relatively new (within the last year) because it didn't occur previously.
EDIT: and it's weird, after the attack step I was suddenly able to use the equip 0 on those equipments, and it remained that way for the duration of the game (and no, I wasn't in the attack phase when trying to equip before; and even if I was then that would mean a bug with the equipment that allowed me to equip).
EDIT: and it's weird, after the attack step I was suddenly able to use the equip 0 on those equipments, and it remained that way for the duration of the game (and no, I wasn't in the attack phase when trying to equip before; and even if I was then that would mean a bug with the equipment that allowed me to equip).
______________________________________
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: Community Wad
by MasterXploder7 » 03 Sep 2016, 10:49
Not really code but its an error from the deck builder. I fell out of Magic for a while. The card quality from R&D has made me really sad (their focus on limiting combos) and its been a bit of a downer. But hey Eldritch Moon and the sneakies from kaladesh (along with the reading "Home Sick" from the MTG sight) rekindled my passion. I have also read through the thread a bit. I am glad the whipping boy is out of the attic 

- Code: Select all
9/3/2016 6:42:19 AM: Low: System.Xml - The 'AVAILABILITY' start tag on line 76 position 4 does not match the end tag of 'INTERVENING_IF'. Line 78, position 5.:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
at System.Xml.XmlTextReaderImpl.ParseEndElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml)
at RSN.DotP.CardInfo.ParseXML(String strXML)
at RSN.DotP.CardInfo..ctor(String strFilename, String strXML, String strWad, GameDirectory gdData)
at RSN.DotP.WadWrapper.LoadCards(FileStream fsInput, GameDirectory gdData)
Extra Information:
Unable to load card: OPAL_ACROLITH_CW_5784.xml in DATA_DLC_COMMUNITY_CORE
"Hate is an everlasting wellspring from which it is eternally sustained." - Nirkana Revenant
- MasterXploder7
- Posts: 293
- Joined: 18 Jan 2014, 10:55
- Has thanked: 28 times
- Been thanked: 11 times
Re: Community Wad
by Xander9009 » 03 Sep 2016, 19:15
Fixed Opal Acrolith. I'll check Puresteel Paladin later on.
_______________________________
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: Community Wad
by tmxk2012917 » 06 Sep 2016, 03:28
Sunpetal Grove did not give me mana. I could not active it. And I also have the same problem with Puresteel Paladin
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 08 Sep 2016, 13:27
Which Sunpetal Grove were you using? Filename?
EDIT: Actually, same for Puresteel Paladin. There's a vanilla version and a CW version. Are you using the CW version?
EDIT: Actually, same for Puresteel Paladin. There's a vanilla version and a CW version. Are you using the CW version?
_______________________________
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: Community Wad
by tmxk2012917 » 08 Sep 2016, 14:22
I am not sure given that that card is lncluded in a CW deck. I will check it laterXander9009 wrote:Which Sunpetal Grove were you using? Filename?
EDIT: Actually, same for Puresteel Paladin. There's a vanilla version and a CW version. Are you using the CW version?
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by nivmizzet1 » 09 Sep 2016, 13:25
I just got this message when opening the deck builder.
The Puresteel Paladin I was using was the CW version9/09/2016 10:52:53 PM: Log Opened.
9/09/2016 10:52:53 PM: Low: Card (RECRUITER_OF_THE_GUARD_CW_XXX in DATA_DLC_COMMUNITY_CORE) has a multiverse id that is problematic: XXX
______________________________________
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: Community Wad
by Xander9009 » 09 Sep 2016, 13:27
I've got Puresteel Paladin in my test deck to look at soon.nivmizzet1 wrote:I just got this message when opening the deck builder.The Puresteel Paladin I was using was the CW version9/09/2016 10:52:53 PM: Log Opened.
9/09/2016 10:52:53 PM: Low: Card (RECRUITER_OF_THE_GUARD_CW_XXX in DATA_DLC_COMMUNITY_CORE) has a multiverse id that is problematic: XXX
As for Recruiter of the Guard, you should update your CW. It was put in before the MultiverseID was known, but it was given its proper ID a couple weeks ago.
_______________________________
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
Who is online
Users browsing this forum: No registered users and 10 guests