It is currently 30 Apr 2024, 01:04
   
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 foolosopher » 09 Dec 2011, 12:26

ΟΚ tried again with updated deck and managed to see it in duel, it probably was what Orion said, some card didn't exist, funny though 'cause usually a non existing card is translated acording to its ID, unless that ID doesn't exist, which shouldn't be the case. One more thing is that I used reflecting_pool and once cast it lasted for one round and then went to graveyard. :-?

One other thing @Mok, when saying fix the card_data_t you mean change the struct to what you posted in page 2, or change some values transfered in the exe, essentially correcting the exe?
I plan to check this during the weekend.
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 Sonic » 09 Dec 2011, 12:51

gmzombie wrote:all cards are in there should be no cards removed and simply put even cards that werent coded were left in there spot due to the fact that alot of some previously uncoded cards were in fact coded ie. safehaven, preacher and so on.

if i get an answer on the set allocations i will try to update that with up to date set numbers so we can have a better way to arrange and find cards. On that note i think adding buttons will be good but there is just to many sets vs buttons. even if we create buttons like the pic i upped in this thread about deck builder on page 4 there is only at least on that pic 28 buttons for sets and the current total set list in magic is 13 core editions and 57 current expansion sets but there is only 18 current expansion blocks/cycles. im thinking that set blocks/cycles are the way to go with a sub menu indicating which set is selected to be included much like the current unlimited, revised, fourth menu . even that seems to be a hell of a lot of work due to the fact that we currently dont know how the deck builder even does it for the unlimited,revised,fourth option. The key here is how easy is it to add buttons and make them follow suit with sets and such. Im willing to help with whatever when we get to this point. lets stay on plans and first get this 2k problem fixed. unless its an easy fix the deck builder that is.

EDIT: Oh yea i was looking through the new csv and some things could be wrong like exp rarity for black lotus is 0h isnt that a rare card
Er... Why weren't the New Limited mod cards included?
:(
Working On: Life, the Universe, and Everything.
User avatar
Sonic
Apprentice
 
Posts: 827
Joined: 27 Feb 2010, 00:37
Has thanked: 3 times
Been thanked: 161 times

Re: 2000 cards limit

Postby Mok » 09 Dec 2011, 13:04

foolosopher wrote:One more thing is that I used reflecting_pool and once cast it lasted for one round and then went to graveyard. :-?
It's probably one of the non original cards so it just used code from another random one that matches the previous cardid ;)
One other thing @Mok, when saying fix the card_data_t you mean change the struct to what you posted in page 2, or change some values transfered in the exe, essentially correcting the exe?
I plan to check this during the weekend.
Yep. card_data_t is inside magic.exe.

Some useless info: I use that name from your sources, I wouldn't call anything card_data or card_instance, too long to type :D For card_data_t I used CT (card types or some such) and original authors used CI (you can see it in the shandalar.exe where some of the original messages are left: "AddType error: no room in ci to add another type"). For the main card structure, the one accessed by cards_ptr (which was added by me to shorten the code, the original struct was accessed directly by a stupidly long code) the authors used name CD and I copied it ("AddCard error: No more room in cd to add a card").
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: 2000 cards limit

Postby Gargaroz » 09 Dec 2011, 13:19

Sonic, don't mind for now : the current version is for testing purposes. A LOT of stuff is to be updated in order to work fully, and we should plan a complete new CSV organized per expansions, that employ all the available space we have.
And we have a massive work of relocation to do on Magic.exe.
----
- 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 » 09 Dec 2011, 18:22

Sonic wrote:
gmzombie wrote:all cards are in there should be no cards removed and simply put even cards that werent coded were left in there spot due to the fact that alot of some previously uncoded cards were in fact coded ie. safehaven, preacher and so on.

if i get an answer on the set allocations i will try to update that with up to date set numbers so we can have a better way to arrange and find cards. On that note i think adding buttons will be good but there is just to many sets vs buttons. even if we create buttons like the pic i upped in this thread about deck builder on page 4 there is only at least on that pic 28 buttons for sets and the current total set list in magic is 13 core editions and 57 current expansion sets but there is only 18 current expansion blocks/cycles. im thinking that set blocks/cycles are the way to go with a sub menu indicating which set is selected to be included much like the current unlimited, revised, fourth menu . even that seems to be a hell of a lot of work due to the fact that we currently dont know how the deck builder even does it for the unlimited,revised,fourth option. The key here is how easy is it to add buttons and make them follow suit with sets and such. Im willing to help with whatever when we get to this point. lets stay on plans and first get this 2k problem fixed. unless its an easy fix the deck builder that is.

EDIT: Oh yea i was looking through the new csv and some things could be wrong like exp rarity for black lotus is 0h isnt that a rare card
Er... Why weren't the New Limited mod cards included?
:(
I thought i got everything up. let me create a new one with v2. sorry i thought i got it all but i will make the change right now
Attachments
Manalink.rar
here is with v2 2011 dec 2
(657.49 KiB) Downloaded 331 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

Re: 2000 cards limit

Postby Gargaroz » 09 Dec 2011, 20:49

Gmzombie, thanks for your effort, but we need to completely re-think the CSV structure and make one that will be brand-new except for the sets coded until 8th edition.
However, I have good news : I updated the C DLL with the final changes, tried to patch in a card in slot 4110 and it worked ! So, it seems that our editor is perfectly able to handle the updated version of Magic.exe.
Now, an huge amount of work await us : tomorrow I'll post a new thread with the things to do and a plan for the new CSV.
----
- 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 » 09 Dec 2011, 23:11

i think i know where your coming from. you want a csv that is able to be gone through and be able to look for and find each card in each set concurrently..maybe not the right word but you want to be able to see complete sets in order or at least together am i correct?>
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 » 10 Dec 2011, 07:21

This thread is becoming more and more cluttered but oh well, posting it here anyway:
A proposal to get rid of get_id_by_name() and fix some of the magic numbers in the C code. While doing some initial testing with modified card_data_t (and getting strange errors), I noticed the cards are both referenced by get_id_by_name and by magic numbers (cIDs without enums). Just search the src directory for a number 1847 to know what I mean... What I propose is to modify csv2exe a bit so it outputs a C header file (and optionally an asm include file in case there's asm code that uses any cIDs as numbers or any people still write cards using asm) that included a card id for each card in csv. That way your normal compilation order would be to create csv -> make cards.dat and say cardid.h or cid.h or whatever -> compile manalinkeh.dll. The syntax would be autocreated to something like:
original: get_id_by_name("Mayor of Avabruck");
changed: CID_Mayor_of_Avabruck or card_id_Mayor_of_Avabruck or cid_MAYOROFAVABRUCK or whatever you chose. Some characters prolly would need to be removed or changed to _ or whatever due to limitations of C compiler.

Regardless if you agree or not, the code still needs to be cleaned out of direct card ids in numerical form as it will fail with new combined csv unless you take care to keep the order (which is already annoying for the cards in magic.exe).
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: 2000 cards limit

Postby 0rion79 » 10 Dec 2011, 07:29

Sounds like a very good idea. Do you expect any issue about editing the CSV with Microsoft Excel or about Magic Duel? Decks are created storing cards hsing their ID rather than by name.
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 Mok » 10 Dec 2011, 07:34

0rion79 wrote:Sounds like a very good idea. Do you expect any issue about editing the CSV with Microsoft Excel or about Magic Duel? Decks are created storing cards hsing their ID rather than by name.
I always edited csv with excel. Not sure if newer versions of excel produce usable csv though as I still use office 2k3 which is a bit... dated :P
As for decks... again it shouldn't be hard to write a simple tool that will get a name of deck, an old cards.dat (or csv) and a new cards.dat (or csv) and output new deck with fixed card ids.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: 2000 cards limit

Postby 0rion79 » 10 Dec 2011, 09:02

Got an idea about CSV/dat. Since Mok claims that the database can be extended to 30,000+ slots, and since I've seen that on Gatherer there are listed more or less 12.000 cards, maybe it would be more convenient to prepare a CSV with ALL cards ever printed listed by set order and then by alphabetical order, with all fields = 0. Then we code only the ones that we need time by time, whithout loosing time with lame cards, and have a clean and precise database that would be useful for sealed decks and blocks. What do you think?
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 Aswan jaguar » 10 Dec 2011, 09:09

Yes, but you have to keep the original cards at their spots.so it will still be a little messy.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: 2000 cards limit

Postby 0rion79 » 10 Dec 2011, 09:45

I think it wouldn't be a problem, because the process would start following the original Microprose's position. Instead, it would be more difficult to include for sealed deck purposes cards as Shatter, that has been reprinted as basic card in several expansion sets, unles we can extend or modify the CSV column which is responsible of re-printing. That would really be a thought job!
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 Mok » 10 Dec 2011, 10:18

0rion79 wrote:Got an idea about CSV/dat. Since Mok claims that the database can be extended to 30,000+ slots, and since I've seen that on Gatherer there are listed more or less 12.000 cards, maybe it would be more convenient to prepare a CSV with ALL cards ever printed listed by set order and then by alphabetical order, with all fields = 0. Then we code only the ones that we need time by time, whithout loosing time with lame cards, and have a clean and precise database that would be useful for sealed decks and blocks. What do you think?
Only as long as code that searches through the whole dat is gone. Othewise it will take so much longer to scan the huge struct.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: 2000 cards limit

Postby Dave » 10 Dec 2011, 10:43

Wouldn't it be better if we use a free database (MySql) which can generate the csv needed for manalink. In that db we can put all cards that now exist, coded or not. In the generated csv will appear only the coded cards.
A new deckeditor can access this db via sql(build in vs2005/2008/2010). Since it will be our deckeditor we can make all filters we desire.
And we can make a form to add/change cards with required fields/explanation,etc.

The id-field would be an identity-field and therefore is unique.
The existing cards get the id they already have.
The new added cards id will always be last_id +1. So no more problems with id's
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

PreviousNext

Return to Development

Who is online

Users browsing this forum: No registered users and 17 guests


Who is online

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

Login Form