It is currently 28 Apr 2024, 22:28
   
Text Size

Add New Cards: Comprehensive Tutorial

Downloads, Guides , General Support
PLEASE "SEARCH" BEFORE YOU POST!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Re: Add New Cards: Comprehensive Tutorial

Postby SEE » 11 Jun 2009, 20:16

Beating my head against the level 1 card "5. Next we need to find an empty space to put our new code." in my effort to create an implementation of Living Plane. Help?
SEE
 
Posts: 26
Joined: 29 May 2009, 17:37
Has thanked: 0 time
Been thanked: 0 time

Re: Add New Cards: Comprehensive Tutorial

Postby Snacko » 11 Jun 2009, 20:30

I wouldn't advise to code the new cards via asm, as with C it's much easier to code and let others review your code and fix it if needed.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Add New Cards: Comprehensive Tutorial

Postby SEE » 11 Jun 2009, 21:05

Okay. Where do I find the C code for Living Lands and/or Kormus Bell, then?
SEE
 
Posts: 26
Joined: 29 May 2009, 17:37
Has thanked: 0 time
Been thanked: 0 time

Re: Add New Cards: Comprehensive Tutorial

Postby jatill » 12 Jun 2009, 12:04

SEE wrote:Okay. Where do I find the C code for Living Lands and/or Kormus Bell, then?
Heh, funny thing. Living Plane is the only card I have attempted in the last few months and have not been able to figure out. So good luck with that. It's probably just a 1-line change from Living Lands, but damned if I can't find that 1 line. If you can successfully hack Living Lands into Living Plane (just overwrite it), let me know and I can add it in.

But to answer your actual questions...

Only new cards are coded in C, so Living Lands is not. There is an old decompiled version of Magic.exe that is close to what you want, and that can be found here: http://savefile.com/files/2088274

Otherwise, to find space to plop ASM code, you'll need to basically scan the code after the last ASM card was added and look for a bunch of blank lines. I haven't checked, but my notes say this is around 452499. (more likely, this is where Demonic Hordes used to live).

Good luck.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Add New Cards: Comprehensive Tutorial

Postby SEE » 12 Jun 2009, 21:51

jatill wrote:Otherwise, to find space to plop ASM code, you'll need to basically scan the code after the last ASM card was added and look for a bunch of blank lines. I haven't checked, but my notes say this is around 452499. (more likely, this is where Demonic Hordes used to live).
Yeah. Definitely no blank space near that address.

Hmm, there isn't a heck of a lot of space left in Magic.exe. Puzzling out references in the older board posts, is this what MalanlinEx.dll was for? There seems to be lots of "2020 AND BYTE PTR DS:[EAX],AH" in ManalinkEx.dll
SEE
 
Posts: 26
Joined: 29 May 2009, 17:37
Has thanked: 0 time
Been thanked: 0 time

Re: Add New Cards: Comprehensive Tutorial

Postby jatill » 13 Jun 2009, 12:15

SEE wrote:
jatill wrote:Otherwise, to find space to plop ASM code, you'll need to basically scan the code after the last ASM card was added and look for a bunch of blank lines. I haven't checked, but my notes say this is around 452499. (more likely, this is where Demonic Hordes used to live).
Yeah. Definitely no blank space near that address.

Hmm, there isn't a heck of a lot of space left in Magic.exe. Puzzling out references in the older board posts, is this what MalanlinEx.dll was for? There seems to be lots of "2020 AND BYTE PTR DS:[EAX],AH" in ManalinkEx.dll
Oh yeah. It's been so long I forgot all about that file. Yes, use the dll instead. The 2020 lines are the ones you want to overwrite.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Add New Cards: Comprehensive Tutorial

Postby Salbei » 14 Oct 2009, 10:39

the link in the first post doesn´t work anymore - reupload please.
Retired a long time ago. I will not reply.
User avatar
Salbei
DEVELOPER
 
Posts: 1053
Joined: 04 Jun 2009, 10:58
Location: Germany
Has thanked: 3 times
Been thanked: 2 times

Re: Add New Cards: Comprehensive Tutorial

Postby rampage » 10 Aug 2010, 18:54

Jatill mentions a decompiled Magic.exe a few posts up. I was hoping to look into that, but I think the file has been removed from the linked site. Does anyone still have that file, and could repost?
rampage
 
Posts: 5
Joined: 17 May 2010, 03:42
Has thanked: 0 time
Been thanked: 0 time

Re: Add New Cards: Comprehensive Tutorial

Postby foolosopher » 29 Aug 2010, 13:01

You can find some sources from gmzombie here
http://home.comcast.net/~gmzombie/index.html
but not the decompiled Magic.exe that you were looking.
Anyway if anyone has a link for it could you post here, I 'd like to take a look at it also?
thx
I long for the time where one man could make a difference...
foolosopher
 
Posts: 189
Joined: 19 May 2010, 20:53
Location: Greece
Has thanked: 13 times
Been thanked: 17 times

Re: Add New Cards: Comprehensive Tutorial

Postby frankzappa » 28 Dec 2010, 13:59

Do you have to write unique code for most cards? Or are most cards using the same lines of code that others use? I'm just wondering if it would be possible to get a card making wizard made. Then anyone could just use the wizard to make a card in no time, kind of like how they made the Neverwinter Nights toolset which makes making further stuff easier.

Is that wishful thinking? :)

I'm not a programmer but I know some professional programmers.
frankzappa
 
Posts: 44
Joined: 27 Dec 2010, 06:55
Has thanked: 0 time
Been thanked: 0 time

Re: Add New Cards: Comprehensive Tutorial

Postby aww1979 » 02 Jan 2011, 17:28

There is the skymagic editor, but it's only for fairly prmitive cards. For instance, I once made a Scaled Wurm with it. In general, skymagic only can make cards that could be built somehow using the effects or abilities of previous cards. Jatill and the other coders have been doing the cards from scratch, as far as I know. They have written some functions for common abilities, so you don't have to rewrite cascade or flashback or horsemanship from scratch, though.
aww1979
Tester
 
Posts: 1717
Joined: 03 Mar 2009, 19:36
Has thanked: 0 time
Been thanked: 2 times

Previous

Return to Installation and Troubleshooting

Who is online

Users browsing this forum: No registered users and 22 guests


Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 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 22 guests

Login Form