It is currently 07 Sep 2025, 23:56
   
Text Size

2000 cards limit

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

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

Re: 2000 cards limit

Postby gmzombie » 01 Dec 2011, 00:16

mok do you remember the code or how to decode the csv error on csv2dat? im trying to limit it down to see where the error is but i keep getting error at offset 0x215e
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: 2000 cards limit

Postby Mok » 01 Dec 2011, 00:48

gmzombie wrote:mok do you remember the code or how to decode the csv error on csv2dat? im trying to limit it down to see where the error is but i keep getting error at offset 0x215e
That's just a hex offset in file at the problem. But it's pretty easy to spot. Load the file into notepad without word wrap, and all lines starting with a quote are likely to be a problem... there's usually excessive number of quotes in these lines too. BTW: I believe the best approach for the final csv would be to leave the original cards in their original place and add all new cards after them. As unless you recoded all of the cards, some of them were looking for specific cards by their ids in the code (and in main engine).
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: 2000 cards limit

Postby Gargaroz » 01 Dec 2011, 01:07

As for the current version, the only annoying problem is that thing Orion mentioned, but it's probably linked to the "special cards" we added to implement new functions, like the Rules Engine or Deadbox.
After that, there's all the thing we don't know how to do : it's possible to change the targets of a spell / ability ? It's possible to "counter" an activated / triggered ability ? And lastly : could we introduce a "stack system" more similar to the actual one ?
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: 2000 cards limit

Postby Mok » 01 Dec 2011, 01:23

Gargaroz wrote:After that, there's all the thing we don't know how to do : it's possible to change the targets of a spell / ability ? It's possible to "counter" an activated / triggered ability ? And lastly : could we introduce a "stack system" more similar to the actual one ?
Nope without big changes to the original engine. Originally I was adding cards slowly as I tried to understand the engine to the point such changes could be done but then I had the stupid hd crash. So unless someone does the big work from scratch, it's likely not going to happen.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: 2000 cards limit

Postby foolosopher » 01 Dec 2011, 01:33

Mok wrote: I can probably help fixing these if anyone will attempt it at all.
Just found about this thread and came running. Never expected to see you back, so it was a big surprise. A big thanks from me also for your work.
Anyway, I will try to help you any way I can. I 've spent some time trying to find a way around this, but my understanding of assembly was quite limited and trying to overcome it with some advanced tools, like ollydbg and cheatengine lately, was giving a quite slow progress, as my time to spend on this was also limited.

Mok wrote:Hm. If someone wanted to decompile the exe to C (there was no decompiler at the time I started), the best bet would be to use original magic.exe from version 1.3 or 1.3.2. The original exe was compiled with no optimizations making a lot of code bloated and hard to read in asm and I ended up rewriting a lot of code or converting to asm macros. This surely looks like **** after decompilation since it was never compiled in the first place. While the original code is not really compatible with todays version, it may look a LOT better when decompiled as it was originally C. But you'd still need to rename/define all the structs/enums/labels before attempting it as the decompiled code with variables like a, b, c and so on is as readable as raw asm
Now my two cents. When we looked into this with gmzombie and snacko among a few others, we disassembled a few .exes using IDA and PE but
the produced asm code was too big (around 50MBs). In that code, however, there were a lot of code caves (db 0; etc.) and when removed, there remained about 15MBs of asm code, but it was still too much for me to understand how it works. I think we disassembled the versions before and after lonefox c api was added.
Anyway, after that we compared the two files but couldn't figure out the differences that led to the increased card tables. We have posted our findings though in this thread

viewtopic.php?f=56&t=973&start=45
You might find something useful from there.
We also disassembled the exe into c, but there were around 1500 errors and as many warnings when I tried to compile it. I tried to fix some and managed to lower them to 1100 I think, but then dropped it. The produced c code was like embedded C with some standard repeating errors, but I wasn't sure how to fix them. There were also some libraries or references missing that were causing many of those errors. All in all, maybe it's worth taking a shot at this, if we want to have some proper c sources produced.
Concerning function, variables names etc. PE and ,i think IDA also, have some functions that can produce original names or something similar.
One more thing, I had found a python plugin for IDA that converted produced asm into c++, but was taking quite long even for small chunks of code, but in case you want to check it out, let me know.
Finally, to close up the sheet posting, I 'm also here to help, you guys show the way.
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: 2000 cards limit

Postby gmzombie » 01 Dec 2011, 03:05

deck editor.jpg
my idea of new buttons
Mok wrote:
gmzombie wrote:mok do you remember the code or how to decode the csv error on csv2dat? im trying to limit it down to see where the error is but i keep getting error at offset 0x215e
BTW: I believe the best approach for the final csv would be to leave the original cards in their original place and add all new cards after them. As unless you recoded all of the cards, some of them were looking for specific cards by their ids in the code (and in main engine).
this is my plan as i have taken the original 952 or however many it was cards that were done from microprose and in my finding of the csvs that i have i have gone through everyone since early 2009 up to jan 1 2010 and have added the rest of the cards at the end of the file. i believe in not only preserving the original integrity of the original cards, even the ones that currently dont work unless they cant be done with the current engine ie sharazad, or chaos orb, etc, but also to make this the most complete csv ever. On a side note, im going to pic your brain for a second, do you remember how to add buttons into the deck builder like the one you did for 8th edition. While i was trying like hell to find the hack for the bmp code we got to change the button for 8th edition to another button all together. but now we have a problem with that of course is we would like to add more buttons. here is a ref pic of what i thought it would look like if it was possible or if we couldnt change each button for the sets we have now into card blocks like they do for the actual game and have checkmarks to not show sets..I dont want to go off on a tangent right now just curious if you remember how hard it was to do this. Im sure there would have to be more set codes added too..

EDIT: i figured out why that cs didnt work...lol thats what i get for doing it while sleepy. i forgot to add the other columns just had the first one..anyways fixing that up now
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: 2000 cards limit

Postby gmzombie » 01 Dec 2011, 06:13

i hate this CSV crap...lol i can take a perfect file that i dont edit and create a cards.dat but as soon as i add 1 line it gives me an error. then if i take out that line it still gives me the same error?? wth? anyways ill get it sooner or later
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: 2000 cards limit

Postby gmzombie » 01 Dec 2011, 13:34

ok i think i found a way to make the csv right. just gonna take some time due to using sky magic editor and finding problems in csv. don't understand it just gonna go with it..lol
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: 2000 cards limit

Postby 0rion79 » 01 Dec 2011, 13:42

GMZombie, are you remembering to add tokens and missing cards that were removed from Constructed but not implemented in Limited?
User avatar
0rion79
 
Posts: 1520
Joined: 24 Feb 2009, 18:33
Location: Italy
Has thanked: 94 times
Been thanked: 61 times

Re: 2000 cards limit

Postby gmzombie » 01 Dec 2011, 20:16

what i have done so far is taken all the cards that were put into the game first. so i used 20090213 as a base because it didnt remove any or fhte original cards from 0-952. then i believe it went up to 1437 or whatnot. anyways i took all the updated cards that were either switched out from another slot already in use or added the new cards till i gotten to the 1998 card limit we had before just all the cards that were changed out in the original 952 were then added to the end of the csv. ive only gotten to almost the end of 2009 patches but i havent gotten a csv to update even though i took each part from a different manalink.csv that was able to create a dat file. what im currently doing is taking the csv file i have and putting it in skymagic editor to find the errors that i have encountered so far. for every error i wrote down the id and changed it to an empty for the time being. i will re add them later via skymagic. my problem is i cant see how this csv ever worked due to the fact that i have prolly over 50 or so fixes to do and im only in the 630's...dont know what im doing wrong so i thought id just go about this till i get it working just right.
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: 2000 cards limit

Postby Mok » 01 Dec 2011, 20:34

gmzombie wrote:what i have done so far is taken all the cards that were put into the game first. so i used 20090213 as a base because it didnt remove any or fhte original cards from 0-952. then i believe it went up to 1437 or whatnot. anyways i took all the updated cards that were either switched out from another slot already in use or added the new cards till i gotten to the 1998 card limit we had before just all the cards that were changed out in the original 952 were then added to the end of the csv. ive only gotten to almost the end of 2009 patches but i havent gotten a csv to update even though i took each part from a different manalink.csv that was able to create a dat file. what im currently doing is taking the csv file i have and putting it in skymagic editor to find the errors that i have encountered so far. for every error i wrote down the id and changed it to an empty for the time being. i will re add them later via skymagic. my problem is i cant see how this csv ever worked due to the fact that i have prolly over 50 or so fixes to do and im only in the 630's...dont know what im doing wrong so i thought id just go about this till i get it working just right.
Hmm... maybe it going to be faster and easier automatically? Ie. Get 3(?) csv files first, the one before any major changes (before switching any card positions), and the 2(?) current ones (or any additional ones) then simply write a program that will read-in all of them, use the original one as a base and then just parse the extra ones. If the name of the card is already in the list (duplicate) it will check if the card was previously coded, if not, replace with newer version, if yes, it will just write a warning or something and continue. If the card was not in the list, it will add it at the end. repeat till done. I can do it probably, but I would need all the csv files that are "current" plus the old one with unchanged initial order.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: 2000 cards limit

Postby gmzombie » 02 Dec 2011, 00:31

working on getting the right update manalinks to you as we speak. there will be probably around 10-15 and i think i will have covered the 2009-2011 all the way through to the latest and the golden year mods..

If anybody has V3 and V4 of the golden years mod i need them. cant download either of them. will need them ASAP!! thanks
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: 2000 cards limit

Postby Gargaroz » 02 Dec 2011, 00:59

gmzombie, use the latest GoldenYears version, it contains everything and no slot was changed. Plus, the CSV is the correct one, with many wrong values replaced.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: 2000 cards limit

Postby gmzombie » 02 Dec 2011, 01:19

last golden years was v4 final correct? this is also missing off the download it says invalid at the site.
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

Re: 2000 cards limit

Postby gmzombie » 02 Dec 2011, 01:56

ok here is the csvs that i believe will give us the most bang for the buck. the base csv is manalink20090213.csv if you do 2 at a time i composed a list on how to do them

0213 vs 0602 = new1
new1 vs 20091224 both versions of csv = new2
new2 vs 20100222
new3 vs 20100625
new4 vs 20100811
new5 vs 20110101
new6 vs 20110130
new7 vs 20110401
new8 vs 20110717
new9 vs GYmodV1
new10 vs GYmodV2
new11 vs GYmodV3
new12 vs GYmodV4
new13 vs 20111201
New 14
I think that will be the best way as it adds in cards without sacrificing the base areas for the most cards. i dont right now have the V3 or V4 though i have asked for it on this thread so if you see it you will need those. If we get V4 before this has started we can just use V4 instead of v1/v2/v3/v4 as v4 has everything as gargaroz said. hope this helps
Attachments
All Magic Alphas.rar
csv files
(1.93 MiB) Downloaded 346 times
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 857
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 200 times
Been thanked: 51 times

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 12 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 12 users online :: 0 registered, 0 hidden and 12 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 12 guests

Login Form