It is currently 19 Apr 2024, 20:20
   
Text Size

CardArtLib

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

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

Re: CardArtLib

Postby Snacko » 08 Dec 2011, 20:29

I updated the package now it works correctly with deck.exe so you can also test with Mok changes.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: CardArtLib

Postby Aswan jaguar » 24 Dec 2011, 14:30

I tested with Mok changes and works fine but now with a more exact csv file I have problem with the special characters in this card Kongming, "Sleeping Dragon". " " if you could fix them too would be nice.
---
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: CardArtLib

Postby Snacko » 24 Dec 2011, 15:56

Should work if you name it
Kongming, _Sleeping Dragon_.txt
as all illegal characters get replaced by _, " being no exception.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: CardArtLib

Postby Aswan jaguar » 24 Dec 2011, 17:55

I already tried
Kongming, _Sleeping Dragon_ and didn't work I tried then
Kongming, __Sleeping Dragon__ but it didn't work either.
I had to omit the " " special characters for the card to show up.
---
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: CardArtLib

Postby Snacko » 24 Dec 2011, 18:35

Are you using the mok provided dll ? As he strips all the extra characters.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: CardArtLib

Postby Mok » 24 Dec 2011, 23:07

Snacko wrote:Are you using the mok provided dll ? As he strips all the extra characters.
Indeed. Some characters aren't locale friendly and cause problems when file name is converted to/from unicode using default system locale. For example AE symbol in my locale is replaced by another character on the same code.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: CardArtLib

Postby Sonic » 24 Dec 2011, 23:38

I think it may be the characters in the csv file which are causing problem.
The characters themselves are Left/Right Quotation symbols “ ” (Unicode 201C and 201D.
I'll change them to the standard keyboard entered quotation symbol " (Unicode 0022), this should solve the problem.
You'd probably get the same problem with Pang Tong, “Young Phoenix” if the card was active - although these are the only two cards with quotation symbols in their names.

I'll get back to you.

Edit:

Yep, that solves the problem. I'll post a new csv and dat file after Christmas.

Just found the Oracle has no 'Text Rules' for the Dual Lands - so I've got to add them now. :roll:
I know these cards are rare - but... :-s
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: CardArtLib

Postby Mok » 25 Dec 2011, 00:21

Sonic wrote:Yep, that solves the problem. I'll post a new csv and dat file after Christmas.
Please don't post a new csv. I'm currently making changes and not keen on starting again.
Just found the Oracle has no 'Text Rules' for the Dual Lands - so I've got to add them now. :roll:
I know these cards are rare - but... :-s
That's quite normal. New versions of these cards have special backgrounds just like basic lands so text isn't needed... in our case unfortunately the backgrounds are the same as other lands.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: CardArtLib

Postby Aswan jaguar » 25 Dec 2011, 10:29

Exactly as Sonic said that special left/right quotation marks were the problem.
---
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: CardArtLib

Postby Sonic » 26 Dec 2011, 07:32

Mok wrote:Please don't post a new csv. I'm currently making changes and not keen on starting again.
It would only be for typo and parameter error checking. I'm keeping track of the changes against the original posted beta file you're currently working on, so they can be incorporated into your modded csv later.
Like I said, I knew there would be errors in the beta release. Purely because it was a such a rush to get a working 2000+ csv up and running.
Although, I was hoping for more feedback from others, as I've personally found a few.

Mok wrote:
Just found the Oracle has no 'Text Rules' for the Dual Lands - so I've got to add them now. :roll:
I know these cards are rare - but... :-s
That's quite normal. New versions of these cards have special backgrounds just like basic lands so text isn't needed... in our case unfortunately the backgrounds are the same as other lands.
The 'Dual Lands' were never reprinted after Revised. The wording on the original cards conforms to that of their later dual and multi-mana producing replacements listed in the Oracle - as in:

{T}: Add either {G} or {U} to your mana pool.

The difference being that the original cards have further rules which identify them as being both types of land and are affected by spells and abilities which affect both types.
So I'm still a bit surprised that the basic tap instructions were missing from the Oracle.
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: CardArtLib

Postby Snacko » 02 Jan 2012, 18:39

Fixed loading of cards for anyone not using Us Windows (codepage 1252). Same link.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: CardArtLib

Postby Mok » 03 Jan 2012, 19:39

Snacko wrote:Fixed loading of cards for anyone not using Us Windows (codepage 1252). Same link.
I'm thinking about extending cardartlib.dll with 1 extra function that will scan and update the main card_ptr array with real number of images available for every card. Magic.exe will call it right after loading cards.dat (and only if the new function is available). While it will slow down starting of magic.exe slightly (scanning a directory of possibly ~15k+ images takes a while even without reading any) it will allow us to ignore updating csv with some random values that will differ from user to user. Putting it in this dll will not tie the code to only 1 specific way of storing the images. What do you think about it Snacko? Can you add this to your mod? I'm thinking of something like:
void UpdateImages(*card_ptr_array, number_of_cards). The only thing to do will be updating an int at offset 0x44 (num_pics in manalink.h definition) that holds number of available images. AFAIR it should be set to 1 even if there's no image available at all (csv values of 0 are changed to 1 by the code that loads cards.dat).

Edit: just to clarify, card_ptr_array is the same thing defined in manalink.h as cards_ptr and residing in the exe at 0x73bb00

Edit2: After implementing it, it really slows down starting magic.exe with 15k+ images... so not sure if it's a good idea, I'll prolly scrap it.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: CardArtLib

Postby Snacko » 03 Jan 2012, 21:37

Yeah it is slow with so many images. However this idea can be useful if the person generating the dat has all images and can rescan the value once.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 31 guests


Who is online

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

Login Form