Page 80 of 253

Re: Community Wad

PostPosted: 08 Sep 2015, 16:20
by nivmizzet1
Urborg, Tomb of Yawgmoth is no longer working

Re: Community Wad

PostPosted: 08 Sep 2015, 16:21
by Xander9009
So, I've got a problem. I'm fixing up all cards that refer to the swamp subtype of cards on the battlefield so they count ALL lands if there's an Urborg, Tomb of Yawgmoth or a Blanket of Night on the battlefield. The problem is unrelated to those cards, that's going well. But I came across Nylea's Presence and realized it probably has the same problem. A single card having multiple basic subtypes causes infinite mana issues.

Should I just remove the subtype granting so the mana production still works, or should I actually go through and change ALL basic subtype filters to use a function like the swamps are now doing so that they can all check?

(Also, I just realized I need to fix all cards with Swampwalk as well to make them unblockable if there's an urborg or blanket out.)

EDIT: I'll get it back up and working when I finish distributing the swamp filter function.

Re: Community Wad

PostPosted: 08 Sep 2015, 16:31
by nivmizzet1
Xander9009 wrote:So, I've got a problem. I'm fixing up all cards that refer to the swamp subtype of cards on the battlefield so they count ALL lands if there's an Urborg, Tomb of Yawgmoth or a Blanket of Night on the battlefield. The problem is unrelated to those cards, that's going well. But I came across Nylea's Presence and realized it probably has the same problem. A single card having multiple basic subtypes causes infinite mana issues.

Should I just remove the subtype granting so the mana production still works, or should I actually go through and change ALL basic subtype filters to use a function like the swamps are now doing so that they can all check?

(Also, I just realized I need to fix all cards with Swampwalk as well to make them unblockable if there's an urborg or blanket out.)

EDIT: I'll get it back up and working when I finish distributing the swamp filter function.
It sounds like a lot of work (and I know it is). I'm happy enough with just having it how it was before, but of course it would be so awesome if you can get it working. As you're the one that's going to do it I think it's fair to say that the decision should be yours -- if you're comfortable spending the time to do it and think it's worth it then go for it -- I know I will be using it if you do do it.

Re: Community Wad

PostPosted: 08 Sep 2015, 16:33
by Xander9009
nivmizzet1 wrote:
Xander9009 wrote:So, I've got a problem. I'm fixing up all cards that refer to the swamp subtype of cards on the battlefield so they count ALL lands if there's an Urborg, Tomb of Yawgmoth or a Blanket of Night on the battlefield. The problem is unrelated to those cards, that's going well. But I came across Nylea's Presence and realized it probably has the same problem. A single card having multiple basic subtypes causes infinite mana issues.

Should I just remove the subtype granting so the mana production still works, or should I actually go through and change ALL basic subtype filters to use a function like the swamps are now doing so that they can all check?

(Also, I just realized I need to fix all cards with Swampwalk as well to make them unblockable if there's an urborg or blanket out.)

EDIT: I'll get it back up and working when I finish distributing the swamp filter function.
It sounds like a lot of work (and I know it is). I'm happy enough with just having it how it was before, but of course it would be so awesome if you can get it working. As you're the one that's going to do it I think it's fair to say that the decision should be yours -- if you're comfortable spending the time to do it and think it's worth it then go for it -- I know I will be using it if you do do it.
Just to be clear, are you referring to Nylea's Presence or Urborg, Tomb of Yawgmoth? Because I'm definitely doing Urborg (it's almost done, actually).

Re: Community Wad

PostPosted: 08 Sep 2015, 19:59
by MasterXploder7
Nylea's Presence - For this, or any other card that is like this (if any), could you take away the "produce mana" function? for instance the MM Sol Ring only produces mana if you make it. where as all lands can be tapped naturally or by manual manafunctions. is it possible to give it " {T}: add one color of any mana to your mana pool" and making it so it HAS to be tapped manually?

If this works, would it be a generalized solution for Urborg? (i understand that would mean that the AI would have to tap lands for it to work but its food for thought in my opinion)

Re: Community Wad

PostPosted: 08 Sep 2015, 20:06
by Xander9009
MasterXploder7 wrote:Nylea's Presence - For this, or any other card that is like this (if any), could you take away the "produce mana" function? for instance the MM Sol Ring only produces mana if you make it. where as all lands can be tapped naturally or by manual manafunctions. is it possible to give it " {T}: add one color of any mana to your mana pool" and making it so it HAS to be tapped manually?

If this works, would it be a generalized solution for Urborg? (i understand that would mean that the AI would have to tap lands for it to work but its food for thought in my opinion)
Urborg already only adds manual mana abilities to other permanents and I've already removed the auto-tap ability from Nylea's effect because it cannot work properly. So, this is already the goal. (Although, as you mentioned Sol Ring, I'd like to point out that was modified recently to allow AI to auto-tap it.)

In other words, yes, I agree, and I'm already doing that haha. (Urborg itself, for the record, can auto-tap, because it itself has the Swamp subtype. It just doesn't add that subtype to anything else.)

Re: Community Wad

PostPosted: 08 Sep 2015, 20:11
by MasterXploder7
I FEEL SMART \^.^/

i just updated my CW and got this message for Stone Idol Trap.
"9/8/2015 4:06:04 PM: Low: System.Xml - The 'TRIGGERED_ABILITY' start tag on line 26 position 4 does not match the end tag of 'SPELL_ABILITY'. Line 47, position 4.:
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: STONE_IDOL_TRAP_CW_191552.xml in DATA_DLC_COMMUNITY_CORE"

You will have to inform me on the inner workings of how you will make Urborg work. I am very interested that.
Yawgmoth be praised.

Re: Community Wad

PostPosted: 08 Sep 2015, 20:32
by Xander9009
MasterXploder7 wrote:I FEEL SMART \^.^/

i just updated my CW and got this message for Stone Idol Trap.
"9/8/2015 4:06:04 PM: Low: System.Xml - The 'TRIGGERED_ABILITY' start tag on line 26 position 4 does not match the end tag of 'SPELL_ABILITY'. Line 47, position 4.:
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: STONE_IDOL_TRAP_CW_191552.xml in DATA_DLC_COMMUNITY_CORE"

You will have to inform me on the inner workings of how you will make Urborg work. I am very interested that.
Yawgmoth be praised.
I'm aware of the Stone Idol Trap error. I fixed it earlier today.

As for Urborg, it works like this:
Urborg itself is a swamp.
Urborg grants a manual "T: Add B to your mana pool." ability to all lands.
Whenever Urborg changes zones, it sets a specific int to 1 if there is an Urborg in play and 0 otherwise.
Each card that checks lands on the battlefield for the LAND_TYPE_SWAMP subtype instead calls a function, CW_General_SwampFilter(filter).
That function checks the int set by Urborg to see if there is currently an Urborg in play (this way it doesn't use a filter to check, and that allows it to be used inside filters without interfering with them).
If the int is 1 (there's an Urborg in play, so all lands should be swamps), then the function calls "filter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)". If the int is 0, then it calls "filter:Add(FE_SUBTYPE, OP_IS, LAND_TYPE_SWAMP)".
There's an optional second parameter which, if set to 1 or true, causes "OP_IS" to become "OP_NOT". (Although, I think I'm going to change this so that instead of being "true", you actually use "OP_NOT" as the parameter. I'm undecided.)

This way, the subtype swamp is not added to things (except Urborg itself), so there's no infinite/free mana issue. Each land can tap for B like it should be able to. Each card that cares about swamps will count all lands as swamps if there's an Urborg in play. (The exact same setup is used for Blanket of Night. The function checks both int before deciding which filter function to call.)

Re: Community Wad

PostPosted: 08 Sep 2015, 23:38
by RiiakShiNal
It's unclear how you are making Urborg, Tomb of Yawgmoth a Swamp so I'll comment. If you want to make Urborg, Tomb of Yawgmoth a Swamp you should do so from an Ability and not by simply adding the sub-type to the card's XML otherwise you will unintentionally allow cards that allow players to search their decks for Swamps to search for Urborg, Tomb of Yawgmoth even though they should not be able to.

Re: Community Wad

PostPosted: 09 Sep 2015, 02:14
by nivmizzet1
Xander9009 wrote:
Just to be clear, are you referring to Nylea's Presence or Urborg, Tomb of Yawgmoth? Because I'm definitely doing Urborg (it's almost done, actually).
OK, wow. I was talking about urborg's. That's awesome then! :D :D I don't have any decks or plans to use Nylea's Presence, so I can't really comment on that -- but correct me if I'm wrong, if you've done it for Urborg then wouldn't it be realtively easy to do for Nylea?

Re: Community Wad

PostPosted: 09 Sep 2015, 02:18
by Xander9009
It would be rather different, actually. Nylea doesn't affect all lands, just one, so I can't simply replace the filter for "LAND_TYPE_FOREST" with a function the same way I am for Urborg. And even if I could, I'd still need to go through and replace not just all swamp references, but all forests, plains, mountains, islands, and even for the supertype BASIC. Probably possible, but a LOT more work.

Re: Community Wad

PostPosted: 09 Sep 2015, 02:30
by nivmizzet1
Xander9009 wrote:It would be rather different, actually. Nylea doesn't affect all lands, just one, so I can't simply replace the filter for "LAND_TYPE_FOREST" with a function the same way I am for Urborg. And even if I could, I'd still need to go through and replace not just all swamp references, but all forests, plains, mountains, islands, and even for the supertype BASIC. Probably possible, but a LOT more work.
damn, you ninja'd me (I edited my post); but the essence of my post essentially remained the same so not a big deal that you wouldn't have seen it. Yeah, that is a lot more work, I wasn't really thinking.

Re: Community Wad

PostPosted: 09 Sep 2015, 02:38
by Xander9009
The changes needed for Urborg to work are done. Now to test them (well, some of them...) and Urborg and Blanket themselves and make sure they're working. And fix Urborg, since it apparently became broken...

Re: Community Wad

PostPosted: 09 Sep 2015, 02:41
by Xander9009
RiiakShiNal wrote:It's unclear how you are making Urborg, Tomb of Yawgmoth a Swamp so I'll comment. If you want to make Urborg, Tomb of Yawgmoth a Swamp you should do so from an Ability and not by simply adding the sub-type to the card's XML otherwise you will unintentionally allow cards that allow players to search their decks for Swamps to search for Urborg, Tomb of Yawgmoth even though they should not be able to.
Thank you. Sorry I didn't notice your post initially. That's exactly how I made it a swamp (by adding the subtype) and completely overlooked that it would allow searching for it. Ironically, I immediately noticed the issue of replacing the filter for cards which search for swamps, just not for urborg itself... I'll definitely get that corrected.

Re: Community Wad

PostPosted: 09 Sep 2015, 20:49
by Xander9009
Next repack should have a fully working Urborg, Tomb of Yawgmoth and Blanket of Night including all cards that reference swamps on the battlefield. If anyone notices a missed card or a card being affected while it's not in play, please let me know.

To ALL modders: if you make something that references swamps in play, you MUST use the new functions rather than the typical method of determining swamp status.

For a filter, simply replace
filter:Add(FE_SUBTYPE, OP_IS, LAND_TYPE_SWAMP)
with
CW_General_SwampFilter(filter).

If you need it to exclude swamps, add true after the filter. If your filter has a different name ("subfilter", "fFilter", "oFilter"), use that rather than "filter", of course.

To determine a single card's swamp status, usually you use
Card:GetSubType():Test(LAND_TYPE_SWAMP)
Now, you should replace that with
CW_General_IsSwamp(Card)