It is currently 26 Apr 2024, 11:39
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby Splinterverse » 23 Oct 2016, 22:46

Xander9009 wrote:Gonti, Lord of Luxury and Oath of Nissa (and I think Mycosynth Lattice) are still in my testing folder because I've had very little time these last few days. I gave them a very brief test, but they weren't working yet. When I get them working, I'll post about them.

Careful about adding cards like Widespread Panic and Saproling Infestation without making the necessary changes to other cards for them to properly work. Users will almost universally expect that they will work. When they only work a very small number of cards, they'll post a bug report. You should probably keep those cards on your end until their needed code has been distributed, or else put a disclaimer directly on the card in the form of an empty static ability with the ability's text stating it will not fully work yet. Then, when someone gets around to distributing the code, that text can be removed or the card can be added. (This is the same idea behind the (Not functional) text on Oath of Nissa you mentioned.
I'll upload versions with messages on them. Is there a way to mass replace? Obviously, we want to be careful and not damage code, but perhaps there is a safe way that we can go about it. For example, searching for :ShuffleLibrary() and replacing it with :ShuffleLibrary()+return+code could potentially work.

I might be willing to go into all of the kicker cards and update. I think there are only a little over 100.

EDIT TO ADD: Disclaimers have been added to Saproling Infestation and Widespread Panic; these have been re-uploaded.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 75 times

Re: Community Wad

Postby Xander9009 » 23 Oct 2016, 23:24

Splinterverse wrote:Is there a way to mass replace? Obviously, we want to be careful and not damage code, but perhaps there is a safe way that we can go about it.

I might be willing to go into all of the kicker cards and update. I think there are only a little over 100.
It's a simple matter to add new code to a card based on pre-existing code, but it's difficult to make sure it doesn't mess up anything already there.

You can do it in notepad++ using the search feature. Choose find in file, set up the pattern to match *.xml. Set the folder to be your cards folder.

You need to set the string to match as follows:
Code: Select all
<UTILITY_ABILITY qualifier="Kicker">(.*?)(<COST .*? />)(.*?)<\/UTILITY_ABILITY>
Then, replace that with this:
Code: Select all
<UTILITY_ABILITY qualifier="Kicker">$1$2SomeNewTextToAdd$3<\/UTILITY_ABILITY>
Obviously, you'd replace SomeNewTextToAdd with the new ability. Replace newlines with "\r\n". Replace tabs with "\t". Set the search to use regex, and check the . matches newline option.

I'd try this on a test folder containing a few cards with kickers and a few without. See hwo it behaves. You can hit "Replace in Files" to replace all instances of one with the other.

The idea behind this: You match this: "<UTILITY_ABILITY qualifier="Kicker">(.*?)(<COST .*? />)(.*?)<\/UTILITY_ABILITY>"
In that, you'll see ".*?". This matches any number length of string containing any characters, but only as many as necessary for the entire thing to produce a match. That is, it's "non greedy". It'll only match as much what's needed, not just as much as it possible can. This is important because otherwise if a card happened to have multiple utility abilities, then they would be seen as the same one.

There are three sets of parentheses. Each set of parentheses is a substring which is can be referenced by the replacement. To reference one, you use $1, or $2, or so on (in the order they're encountered).

So, you check if a card contains some kicker with a cost. You replace that kicker with the same text, but with a new bit of text added in after the first instance of <COST... />. This will not automatically catch cards whose kicker cost only contains <COST type="Generic">...</COST> blocks. While it would be possible to make it do both, it'd be much more complicated to explain the bits and pieces.

However, even after this, it'd be up to you to check them and make sure everything performed as expected.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby erjerjerj » 24 Oct 2016, 17:27

First of all I would like to thank all the modders here for their great work.

I would like to share the following bug report:

Morbid Curiosity: sacrifice happens, but nothing else.

Relentless Dead: 1. the card let me choose itself for the second part of paying X (never had enough mana so far, so i don't know if it actually enabling return to the battlefield of itself)
2. When I have paid X for another zombie card (it was Prized Amalgam by the way), it returned to my hand instead of to the battlefield.

Prized Amalgam: 1. The card returns to the battlefield immediately instead of at the end of the turn.
2. It returns untapped.
3. After a zombie token was killed, I have generated a new one on another turn and Prized Amalgam triggered.
4. Same as 3, but the token was the oppenent's (the PC's) token (I think it was 1/1 Human)

Can all/part of them be fixed?

Thanks,
Eran
erjerjerj
 
Posts: 32
Joined: 23 Oct 2016, 11:58
Has thanked: 20 times
Been thanked: 3 times

Re: Community Wad

Postby Splinterverse2 » 24 Oct 2016, 20:58

Xander, do you have any idea how I might be able to generate a spreadsheet that has all of the missing cards on it with just two columns (name and rule text, no flavor text or type or anything)?

Having something like this would enable me to more easily research upcoming coding via my phone as well as helping me organize my coding efforts.
Splinterverse2
 
Posts: 52
Joined: 20 Sep 2016, 13:52
Has thanked: 13 times
Been thanked: 0 time

Re: Community Wad

Postby Xander9009 » 24 Oct 2016, 22:29

erjerjerj wrote:First of all I would like to thank all the modders here for their great work.

I would like to share the following bug report:

Morbid Curiosity: sacrifice happens, but nothing else.

Relentless Dead: 1. the card let me choose itself for the second part of paying X (never had enough mana so far, so i don't know if it actually enabling return to the battlefield of itself)
2. When I have paid X for another zombie card (it was Prized Amalgam by the way), it returned to my hand instead of to the battlefield.

Prized Amalgam: 1. The card returns to the battlefield immediately instead of at the end of the turn.
2. It returns untapped.
3. After a zombie token was killed, I have generated a new one on another turn and Prized Amalgam triggered.
4. Same as 3, but the token was the oppenent's (the PC's) token (I think it was 1/1 Human)

Can all/part of them be fixed?

Thanks,
Eran
Should all be fixable, though I won't be able to do so soon.

Splinterverse2 wrote:Xander, do you have any idea how I might be able to generate a spreadsheet that has all of the missing cards on it with just two columns (name and rule text, no flavor text or type or anything)?

Having something like this would enable me to more easily research upcoming coding via my phone as well as helping me organize my coding efforts.
In the resources folder, which is inside the CW Tools folder.
https://drive.google.com/drive/folders/ ... sp=sharing

Open it with Excel, Open Office, or Google Spreadsheets to open the Missing Card Text.txt file. For Google Drive, just use File->Import->My Drive->"Missing Card Text"->Search. It'll probably be able to automatically detect that it's tab delimited, but if it doesn't, the make sure you check it manually.

The file is updated whenever the tracker updates. Let me know if it has problems. It was sort of a hasty addition to the tracker program's code.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby Splinterverse » 25 Oct 2016, 11:01

erjerjerj wrote:First of all I would like to thank all the modders here for their great work.

I would like to share the following bug report:

Morbid Curiosity: sacrifice happens, but nothing else.
Hi, erjerjerj. I took a look at Morbid Curiousity and I think I know what the issue is. I've tried a couple quick fixes and tested them, but they didn't work. However, I do know of more involved solution that is likely to work. I won't have time to implement it until tomorrow though. I will work on it tomorrow and test it. I will post here the results and upload it (if I get it working, which I believe is likely).

Thanks for reporting the bugs. Please continue to do so as it is a big help to this project.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 75 times

Re: Community Wad

Postby Splinterverse » 25 Oct 2016, 11:09

Xander9009 wrote:In the resources folder, which is inside the CW Tools folder.
https://drive.google.com/drive/folders/ ... sp=sharing

Open it with Excel, Open Office, or Google Spreadsheets to open the Missing Card Text.txt file. For Google Drive, just use File->Import->My Drive->"Missing Card Text"->Search. It'll probably be able to automatically detect that it's tab delimited, but if it doesn't, the make sure you check it manually.

The file is updated whenever the tracker updates. Let me know if it has problems. It was sort of a hasty addition to the tracker program's code.
This is a massive help! Thanks much Xander!!!! :)
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 75 times

Re: Community Wad

Postby Xander9009 » 25 Oct 2016, 12:22

erjerjerj wrote:First of all I would like to thank all the modders here for their great work.

I would like to share the following bug report:

Morbid Curiosity: sacrifice happens, but nothing else.

Relentless Dead: 1. the card let me choose itself for the second part of paying X (never had enough mana so far, so i don't know if it actually enabling return to the battlefield of itself)
2. When I have paid X for another zombie card (it was Prized Amalgam by the way), it returned to my hand instead of to the battlefield.

Prized Amalgam: 1. The card returns to the battlefield immediately instead of at the end of the turn.
2. It returns untapped.
3. After a zombie token was killed, I have generated a new one on another turn and Prized Amalgam triggered.
4. Same as 3, but the token was the opponent's (the PC's) token (I think it was 1/1 Human)

Can all/part of them be fixed?

Thanks,
Eran
Everything is fixed. (To be fair, I only realized the obvious fix for points 3 and 4 of Prized Amalgam as I was typing this, so that hasn't been tested.)

Splinterverse, the simple fix that worked for Morbid Curiosity was to add LKI_Shield="1" to the COST tag. The problem was that the pointer was nil. The only provides a pseudo-pointer with access to LKI information (I know that's redundant like ATM machine), but for CMC, that's all we need.

I went ahead and moved the cost's RTA code to the main ability RTA to remove a layer of complication just to play on the safe side.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby thefiremind » 25 Oct 2016, 12:31

A suggestion I'd like to give since I saw Prized Amalgam wasn't working properly: maybe sometimes you'd find code that is impossible to replicate in DotP2014, but when a card has been coded in Magic Duels, I'd take a look at the code used there first. :wink: At the very least, you could snatch the art and save some time by not having to find/resize/convert it.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Community Wad

Postby Xander9009 » 25 Oct 2016, 12:45

thefiremind wrote:A suggestion I'd like to give since I saw Prized Amalgam wasn't working properly: maybe sometimes you'd find code that is impossible to replicate in DotP2014, but when a card has been coded in Magic Duels, I'd take a look at the code used there first. :wink: At the very least, you could snatch the art and save some time by not having to find/resize/convert it.
In fact, all of the art from Magic Duels is already in use. It's too good of a resource to leave unused. Although, looking at their code, it's either bugged or they fixed an engine-side issue. The points 3 and 4 from the bug report suggested that (and I confirmed through testing that) if a token dies, and then another identical token is made, then the game recycles the old pointer, meaning it starts in the graveyard where the previous token ended. So, it's considered to have entered from the graveyard. I added a check to ensure the trigger object isn't a token, since tokens can't enter from the graveyard ever anyway, but the code in Magic Duels lacks that check.
I did at least notice they were checking that you own the card, which I wasn't doing. That's important to ensure it came from your graveyard, though in both theirs and the copy in the CW, it lacks the check that if it's cast, you were the one to cast it. But I don't know if there is a way for you to cast another player's cards from their graveyard, so that might be irrelevant.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby nivmizzet1 » 25 Oct 2016, 14:35

NANTUKO_MENTOR_CW_29981 (1).xml
This card was in the community wad.
Should it have the " (1)"?
I'm guessing no.
nivmizzet1
 
Posts: 613
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Xander9009 » 25 Oct 2016, 17:03

nivmizzet1 wrote:NANTUKO_MENTOR_CW_29981 (1).xml
This card was in the community wad.
Should it have the " (1)"?
I'm guessing no.
Nope. Google Drive occasionally messes up and can't decide which version to keep. That's what started the Auto Upload folder. The files are all taken to my computer and dealt with manually. Some occasionally still slip through, though, and it's out of our control.

Someone must have already gotten rid of it, because I don't see it.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby nivmizzet1 » 25 Oct 2016, 23:30

Xander9009 wrote:
nivmizzet1 wrote:NANTUKO_MENTOR_CW_29981 (1).xml
This card was in the community wad.
Should it have the " (1)"?
I'm guessing no.
Nope. Google Drive occasionally messes up and can't decide which version to keep. That's what started the Auto Upload folder. The files are all taken to my computer and dealt with manually. Some occasionally still slip through, though, and it's out of our control.

Someone must have already gotten rid of it, because I don't see it.
I should've been more clear -- it was in "Community Loose Files\Community Wad Core\DATA_DLC_COMMUNITY_CORE\DATA_DLC_COMMUNITY_CORE\DATA_ALL_PLATFORMS\CARDS". I've changed it now.
nivmizzet1
 
Posts: 613
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Splinterverse » 26 Oct 2016, 00:12

Xander9009 wrote:I went ahead and moved the cost's RTA code to the main ability RTA to remove a layer of complication just to play on the safe side.
That's exactly what I was going to do next. Thanks for taking care of it.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 75 times

Re: Community Wad

Postby erjerjerj » 26 Oct 2016, 10:27

Xander9009 wrote:
thefiremind wrote:A suggestion I'd like to give since I saw Prized Amalgam wasn't working properly: maybe sometimes you'd find code that is impossible to replicate in DotP2014, but when a card has been coded in Magic Duels, I'd take a look at the code used there first. :wink: At the very least, you could snatch the art and save some time by not having to find/resize/convert it.
In fact, all of the art from Magic Duels is already in use. It's too good of a resource to leave unused. Although, looking at their code, it's either bugged or they fixed an engine-side issue. The points 3 and 4 from the bug report suggested that (and I confirmed through testing that) if a token dies, and then another identical token is made, then the game recycles the old pointer, meaning it starts in the graveyard where the previous token ended. So, it's considered to have entered from the graveyard. I added a check to ensure the trigger object isn't a token, since tokens can't enter from the graveyard ever anyway, but the code in Magic Duels lacks that check.
I did at least notice they were checking that you own the card, which I wasn't doing. That's important to ensure it came from your graveyard, though in both theirs and the copy in the CW, it lacks the check that if it's cast, you were the one to cast it. But I don't know if there is a way for you to cast another player's cards from their graveyard, so that might be irrelevant.
Thanks you all, for the quick response.

Maybe Rise from the Grave counts for casting another player's card from their graveyard?
erjerjerj
 
Posts: 32
Joined: 23 Oct 2016, 11:58
Has thanked: 20 times
Been thanked: 3 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 31 guests

cron

Who is online

In total there are 31 users online :: 0 registered, 0 hidden and 31 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 31 guests

Login Form