It is currently 14 Oct 2025, 14:05
   
Text Size

Information pending...

Moderator: CCGHQ Admins

Re: Information pending...

Postby merdok » 07 Jun 2015, 09:12

thefiremind wrote:That's exactly the problem, decompiling LOL files isn't an "exact science", it's a sort of reverse engineering, only simple code gets decompiled 1:1, what you obtained is probably different from what the original file wanted to do.

EDIT: ...Or maybe there's something else I don't know. Only once I meddled with a UI LOL file, and I made it by re-declaring the same function I wanted to modify in a different LUA file, leaving the original untouched. And someone told me it would have worked, otherwise I wouldn't have even attempted. :)
So basically, i can decompile a lol file, take the function which is interesting for me, create a new lol file and redeclare the function there with my own code and it should work? Will the game load a lol file with a custom name which i created?
merdok
 
Posts: 24
Joined: 31 May 2015, 20:33
Has thanked: 1 time
Been thanked: 11 times

Re: Information pending...

Postby thefiremind » 07 Jun 2015, 10:16

merdok wrote:So basically, i can decompile a lol file, take the function which is interesting for me, create a new lol file and redeclare the function there with my own code and it should work? Will the game load a lol file with a custom name which i created?
Correct, but your file should be a lua file, not lol. No need to compile 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: 722 times

Re: Information pending...

Postby merdok » 07 Jun 2015, 10:29

thefiremind wrote:Correct, but your file should be a lua file, not lol. No need to compile it.
But the extension of the file should be lol not lua, right? Or does the game load files with lua extension too?
merdok
 
Posts: 24
Joined: 31 May 2015, 20:33
Has thanked: 1 time
Been thanked: 11 times

Re: Information pending...

Postby thefiremind » 07 Jun 2015, 11:02

merdok wrote:Or does the game load files with lua extension too?
It does. In the first DotP they weren't compiled, so I guess it's the backwards compatibility we find in so many places in all these games.

EDIT: I'm very sorry, but so long has passed since I was modding DotP2014 that I forgot that we were still using LOL extension even with uncompiled code. I don't know how I ended up being convinced that we were using LUA extension... :oops:
Last edited by thefiremind on 08 Jun 2015, 11:59, edited 1 time in total.
< 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: 722 times

Re: Information pending...

Postby merdok » 07 Jun 2015, 11:43

thefiremind wrote:It does. In the first DotP they weren't compiled, so I guess it's the backwards compatibility we find in so many places in all these games.
Ok, i got it. I managed to modify a complete lol file and load it into the game, but it seems buggy. I guess some of the functions are broken after the decompile. I would like to redeclare (replace) just one function from the lol file but i didn't manage to do that yet :/
merdok
 
Posts: 24
Joined: 31 May 2015, 20:33
Has thanked: 1 time
Been thanked: 11 times

Re: Information pending...

Postby Tejahn » 07 Jun 2015, 12:57

thefiremind wrote:If you need a "helper" batch file in order to do this, just tell me and I'll post my version (it has a batch file and I added the possibility to specify the names of all 3 files involved).
Yes. Can you provide the tools you use and your new file that displays Wakestone Gargoyle in the card pool? That would be a most helpful.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Information pending...

Postby thefiremind » 07 Jun 2015, 13:25

Tejahn wrote:Yes. Can you provide the tools you use and your new file that displays Wakestone Gargoyle in the card pool? That would be a most helpful.
There you go:
Code: Select all
http://www11.zippyshare.com/v/1FAqy9xI/file.html
The ZED I included is the final version after the edit (you can see by the size that it has uncompressed data) so if you put it in your game folder you should see Wakestone Gargoyle.
My version of spirolone's ZedToZip needs 3 arguments, and they need extension:
  1. The original ZED file
  2. The uncompressed and edited ZIP file
  3. The destination ZED file
You can open the bat file with Notepad for an example (I renamed the original ZED file with the "backup_" prefix before everything else).
< 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: 722 times

Re: Information pending...

Postby Tejahn » 07 Jun 2015, 22:38

Thoughtrender Lamia.png
Thoughtrender Lamia


Success! I too was able to add Thoughtrender Lamia with the art displaying correctly in the card pool. And the NYX CARD FRAME shows up as well. However, as you can see in the screenshot above, I'm still having trouble getting her subtype to appear.

Below are the steps I took to try to make the subtype appear in game.

1.) I added LAMIA in all caps to the SPECS/CREATURE_TYPES.txt file.

2.) I added the LAMIA subtype to the TEXT_PERMANENT/ SYSTEM_TEXT0008.xml file by copying the NAGA information and changing it to LAMIA everywhere it said NAGA.

Is there another file I need to edit (.LOL perhaps)? If anyone discovers the correct method be sure to let me know. I plan on releasing a set for 2015.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Information pending...

Postby thefiremind » 07 Jun 2015, 23:39

Tejahn wrote:Is there another file I need to edit (.LOL perhaps)?
Normally, you should add a constant that associates a number to CREATURE_TYPE_LAMIA, which will be CREATURE_TYPE_NAGA + 1. The problem is, I can't see where CREATURE_TYPE_NAGA has been declared, so I may be wrong, but you can try. Make a new .lol file with Notepad (call it Tejahn_Constants.lol or something like that) in Data_All_Platforms\Functions, and write this:
Code: Select all
CREATURE_TYPE_LAMIA = SIZE_OF_TYPE_BAND * CARD_TYPE_CREATURE + 224
(assuming that CREATURE_TYPE_NAGA would be +223).

EDIT: Corrected. It should be .lol, not .lua (I'm rustier than I thought... #-o)
Last edited by thefiremind on 08 Jun 2015, 12:01, edited 1 time in total.
< 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: 722 times

Re: Information pending...

Postby Tejahn » 07 Jun 2015, 23:44

Thanks! I'll report my results after I run a test.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Information pending...

Postby Tejahn » 08 Jun 2015, 02:42

It didn't work. We'll have to delve deeper.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Information pending...

Postby thefiremind » 08 Jun 2015, 11:53

I'm going to temporarily transform my Wakestone Gargoyle into a Gargoyle Lamia creature, and make some tests.

EDIT: It works now, it's just that the Functions file should have .lol extension and not .lua. See the edits on my previous posts on this page. And apologies to merdok for giving him wrong information... I was really convinced about that until I opened my DotP2014 mods! #-o

By the way, if someone has already checked all the creature types that are missing (other than Lamia), please write them here, I'll make "universal" .txt, .xml and .lol files that cover them all, so that you can add them to your personal mods.
< 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: 722 times

Re: Information pending...

Postby merdok » 08 Jun 2015, 14:09

thefiremind wrote:I'm going to temporarily transform my Wakestone Gargoyle into a Gargoyle Lamia creature, and make some tests.

EDIT: It works now, it's just that the Functions file should have .lol extension and not .lua. See the edits on my previous posts on this page. And apologies to merdok for giving him wrong information... I was really convinced about that until I opened my DotP2014 mods! #-o

By the way, if someone has already checked all the creature types that are missing (other than Lamia), please write them here, I'll make "universal" .txt, .xml and .lol files that cover them all, so that you can add them to your personal mods.
Yeah, the lua files didn't work for me too. I thought maybe in Magic 2015 it changed. But the decompiled lol files works fine :)
merdok
 
Posts: 24
Joined: 31 May 2015, 20:33
Has thanked: 1 time
Been thanked: 11 times

Re: Information pending...

Postby Tejahn » 08 Jun 2015, 15:13

@TFM: That's fantastic!

And I'm at work right now posting this from my phone so it's difficult for me to provide a complete list. However, the links below are recent up to Fate Reforged. For the Elite Creature type we'll have to use the Compound Word technique similar to how Planeswalkers were implemented in 2014. Obsolete commodities are provided also in case someone wants to bring them back.

Card Types
mtgsalvation.gamepedia.com/Card_type

Challenger Types
http://www.mtgsalvation.gamepedia.com/Challenge_decks

Creature Types
http://www.mtgsalvation.gamepedia.com/Creature_type

Obsolete
http://www.mtgsalvation.gamepedia.com/O ... card_types
Last edited by Tejahn on 09 Jun 2015, 02:20, edited 3 times in total.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

Re: Information pending...

Postby Tejahn » 08 Jun 2015, 23:11

@TFM: Can you post your files that made the LAMIA subtype appear in game? I followed your edited instructions but I'm still unable to make it appear.
Tejahn
 
Posts: 430
Joined: 14 May 2013, 01:35
Has thanked: 25 times
Been thanked: 25 times

PreviousNext

Return to 2015

Who is online

Users browsing this forum: cadoc21 and 2 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 3 users online :: 1 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: cadoc21 and 2 guests

Login Form