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) Magic Duels
Magic Duels tests and results
Moderator: CCGHQ Admins
Re: Magic Duels tests and results
by Nick26 » 03 Feb 2017, 17:16
I have been doing a lot of experiments later and finally I have good news I want to thank thefiremind for the big idea of using an hex editor to edit cards. So, this is what I did and what I found out:
1) Using notepad++ (and unicode) I tried to make a custom shock, that is "shock_111111". I changed 396159 to 111111 instead of just 1 becouse I did not want to change the lenght of the file (since the card name is written in the card file too). The card did not work.
2) I did the same thing using HxD, an hex editor and... it WORKED!! Then I tried to change the casting cost from to and the damage dealt from 2 to 9 and again, it worked perfectly, the card showed up ingame and it does what it is supposed to do
3) I tried then to change the damage from 2 to 20 adding bytes with the hex editor but unfortunately the card was not recognized by the game. I made other experiments like changing the name to shock_1 or the casting cost to 10 (so, adding a digit) but again, the card did not work.
So apparently, there is an issue when we change the file lenght, may be the file lenght is coded somewhere in the file or there is some kind of checksum, I have no idea. Also, notepad++ and other text editors do not work, no clue why. Anyway, the custom zed still works fine!
edit: while building my "new" coin farm deck I realised that now it is no longer possible to build a deck with more than 4 copies of the same card (not a big issue actually) and with 15 or less lands.
1) Using notepad++ (and unicode) I tried to make a custom shock, that is "shock_111111". I changed 396159 to 111111 instead of just 1 becouse I did not want to change the lenght of the file (since the card name is written in the card file too). The card did not work.
2) I did the same thing using HxD, an hex editor and... it WORKED!! Then I tried to change the casting cost from to and the damage dealt from 2 to 9 and again, it worked perfectly, the card showed up ingame and it does what it is supposed to do
3) I tried then to change the damage from 2 to 20 adding bytes with the hex editor but unfortunately the card was not recognized by the game. I made other experiments like changing the name to shock_1 or the casting cost to 10 (so, adding a digit) but again, the card did not work.
So apparently, there is an issue when we change the file lenght, may be the file lenght is coded somewhere in the file or there is some kind of checksum, I have no idea. Also, notepad++ and other text editors do not work, no clue why. Anyway, the custom zed still works fine!
edit: while building my "new" coin farm deck I realised that now it is no longer possible to build a deck with more than 4 copies of the same card (not a big issue actually) and with 15 or less lands.
Re: Magic Duels tests and results
by thefiremind » 03 Feb 2017, 21:38
You're welcome, but that's strange because when I tried, it didn't work. It's worth noticing that I didn't do exactly as you did: my test with the hex editor only involved changing the card's text, but I didn't change the Multiverse ID because I was hoping to override the original card. I tried to change the Multiverse ID of a card while keeping the file uncompiled, and I couldn't see the card in game.Nick26 wrote:I want to thank thefiremind for the big idea of using an hex editor to edit cards.
There actually is information in .METADATA\FileData.xml about the position (and thus also the length) of the files inside the ZED, but it has never mattered. What probably happens is that the compiled Lua code is not valid anymore if you insert bytes.Nick26 wrote:So apparently, there is an issue when we change the file lenght, may be the file lenght is coded somewhere in the file or there is some kind of checksum, I have no idea.
You usually can't edit binary files with text editors: some bytes get lost and/or headers are added.Nick26 wrote:Also, notepad++ and other text editors do not work, no clue why.
By adding your test results with mine, for now I would assume that:
- We can't override existing cards the usual way. Sure, we can make a copy with a different name and then change all the references to it in the card pools and campaign/AI decks that use it, but I'd find it highly impractical. If there's a better way, we might have to wait for the next expansion in order to find out.
- If we add new cards, they need to be compiled. Now, this doesn't seem a big deal... if we can actually produce compiled files that the game happily reads. As far as I know, it should be enough to use luac from a 32-bit version of Lua 5.1.x, and then change the 6th byte from 00 to 5F. But will it really be all we need? I'll test more.
EDIT 2: The tutorial can be found here. Let me know if it works for you.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Magic Duels tests and results
by Nick26 » 05 Feb 2017, 07:05
It works great, thanks Unfortunately now I will have to learn the new code (which is driving me crazy with all those brackets).
Re: Magic Duels tests and results
by Xander9009 » 05 Feb 2017, 07:35
Well, the changes are fairly straightforward. More than likely, someone will eventually create a map for the different name changes of various tags and attributes, and once that's done, a converter should be relatively simple. (Not exactly "easy", but not too difficult, at least.)
_______________________________
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: Magic Duels tests and results
by Nick26 » 05 Feb 2017, 10:05
That would be really nice! Today after 3 hours straight of work I have been finally able to recode Emrakul, The Promised End
Re: Magic Duels tests and results
by thefiremind » 05 Feb 2017, 11:02
I find the various nested brackets a little confusing, too: the XML was definitely easier to check with a quick glance. However you can choose to make local variables and code parts of the card one at a time, much like I did with the card pools (I made a table tCards with the card list and then added it to the card pool at the end), it could be helpful in order to reduce nesting.Nick26 wrote:Unfortunately now I will have to learn the new code (which is driving me crazy with all those brackets).
EDIT: Here are the interpreted cards from Amonkhet, if someone is interested.
- Code: Select all
http://www61.zippyshare.com/v/QwjgQ1Ek/file.html
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Magic Duels tests and results
by magius74 » 04 May 2017, 00:48
Hey a new set is out for Magic Duels, been playing it. Does the new set have anything to add or change in the development of this project? Just curious. I've been watching this forum for awhile.
Re: Magic Duels tests and results
by Xander9009 » 04 May 2017, 19:13
Hey firemind, that link you posted to the interpreted cards (originally, all of them) is expired. I'm trying to match up all of the tags and attributes to build a converter, but I've only got one card (Abandon Reason) in both versions (XML and interpreted lol), which makes it a bit difficult. Any chance you've still got the file? I'm not sure anyone would use a converter, but it'd be nice to have one, I think.
_______________________________
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: Magic Duels tests and results
by thefiremind » 04 May 2017, 21:36
You can produce the interpreted versions quite easily by following the tutorial I posted here.Xander9009 wrote:that link you posted to the interpreted cards (originally, all of them) is expired.
That's the main reason I gave up trying to make one: there's almost no demand.Xander9009 wrote:I'm not sure anyone would use a converter
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Magic Duels tests and results
by Xander9009 » 04 May 2017, 21:45
I forgot about the tutorial. Thanks.
_______________________________
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: Magic Duels tests and results
by Nick26 » 14 May 2017, 06:29
That's sad, a converter would be so helpfull. I have been trying to code Phyrexian Obliterator and Cryptic Command for like two months but with no results. Did anyone manage to code those cards?thefiremind wrote:That's the main reason I gave up trying to make one: there's almost no demand.
Re: Magic Duels tests and results
by MasterXploder7 » 13 Jun 2017, 18:26
http://magic.wizards.com/en/articles/ar ... 2017-06-13
I posted this in the "unlock all the cards" forum as well. I figure you guys might want to see it too.
I posted this in the "unlock all the cards" forum as well. I figure you guys might want to see it too.
"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: Magic Duels tests and results
by Xander9009 » 13 Jun 2017, 18:28
Made a thread just for this. (I was already planning to, but you beat me to it lol.)MasterXploder7 wrote:http://magic.wizards.com/en/articles/archive/magic-digital/magic-digital-next-update-2017-06-13
I posted this in the "unlock all the cards" forum as well. I figure you guys might want to see it too.
_______________________________
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
Автомобили Haval 2024
by plape » 16 Aug 2024, 01:21
Заказать Хавейл - Подробнее тут [url][/url]
[url][/url]
[url][/url]
[url][/url]
-
plape - Posts: 1
- Joined: 12 Aug 2024, 21:10
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 1 guest