It is currently 19 Apr 2024, 00:03
   
Text Size

Old deck builder after some cleaning

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

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

Old deck builder after some cleaning

Postby Mok » 14 Jan 2012, 02:08

Here is first version of old Deck Builder after some minor code cleaning. I'm aware that Dave is writing a replacement but before it's ready it's might be enough plus there are people who like old db too.

Before installing, please rename/move/delete your DBArt directory (and only that one). Some files were renamed, some removed and the old version was filled with useless files so it's better to clean it.

The changes aren't big but need testing:
- since there's no "official" graphics for db, I added crude support for skins. Simply storing different gfx files in a subdirectory inside DBArt will allow you to chose it as a "skin". Sorry, it's not selectable inside the db (it wasn't really made to easily unload and reload the skin graphics) but after running it once (just run Deck.exe and exit), you can edit config in Manalink.ini now. Put the name of your skin subdirectory in line "Skin=" in [DeckBuilder] section. Default skin is selected by either putting an empty value or "." there. I included the couple of example "skins" made from the files gmzombie posted in the beta thread. These are called "classic", "revised" and "dark" if you want to try, just put for example skin=classic to get the original graphics from 1997.
All graphics files are mandatory apart for an extra background for the stats buttons that were always grey before. You can see it changed if you select "classic" skin. Otherwise the buttons will be grey as usual.
The included .pic files are in reality .png if you'd like to view the contents outside of db.

- the previously crashing creature list selector should work again using new creature types (unfortunately still only inside DB, the game won't use extra subtypes). Multi-selection here works a bit differently than before, but nothing unusual.

- the "other" expansions button (or 8th edition or whatever) has a new submenu that allows you to select cards by expansion name(s). It uses the same selector as creature subtypes so should be easy to use. Just remember you have to enable the filter in the selector too, choosing only an expansion won't do. Enabling this filter will override all expansion buttons, so if you enable it, the state of the old 4th edition, astral, dark etc. buttons won't matter until you disable the filter again, and only the cards that have new expansion rarity columns in manalink.xls will be displayed. So data cards, effects, tokens, avatars etc. will not be displayed if the filter is active even if all cards are enabled.

- there are 2 debug options in config now (in Manalink.ini after running db once). First is ViewAll (switched off by default), if you switch it to 1, DB will display all coded and non-coded (and tokens, effects etc.) cards (faulty cards might still not display though).
2nd option is called ReadbyName (default is 0), this switches DB to read (and only read) decks by the card names instead of card ids. This will obviously work only if card names are proper but in majority of cases it should be fine (in case the name is wrong, it will display a requester and skip loading the card, you can edit the deck in notepad and correct the name in such case). Why this option? It's useful if card order changed and you want to use your old decks. Simply switch the option to ReadByName=1 and load your old deck and save it. The card ids required by magic.exe will be corrected. Obviously if you have a lot of decks it will be bothersome and in such case some script that will do it automatically will be better, but otherwise this should be helpful.

- the crash when using minimize option is gone.

- there's a couple of other minor changes (multicolored cards have a menu that was disabled before, some minor extensions to enchantments menu etc), and there's also preliminary code that should make DB look a bit better in different resolutions/aspect ratio, hard to tell if it's better or worse :D

There were also some minor changes to drawcardlib.dll, maybe it will fix the text displaying problems (but I doubt it). Also the backgrounds for colored artifacts have their own images now (unfortunately just copied normal colored cards at the moment, as I don't have anything suitable for them).

Link: http://www.mediafire.com/?u58n6at6cuhsfy1 (UPDATED: v2)
Included Magic.exe/*.dat/*.dll are from latest xls update from Sonic but without the latest code from Gargaroz. Still it might work a bit better as I compiled the dll against the corrected order of card ids.

Post DB bugs here and I'll try to fix them if possible. Don't post card bugs from this version anywhere, wait for a proper next beta from Gargaroz first :)
Last edited by Mok on 15 Jan 2012, 01:11, edited 1 time in total.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: Old deck builder after some cleaning

Postby gmzombie » 14 Jan 2012, 03:09

dude i was going to say this deckbuilder does look better and im running 1280x768. it seemed bigger and text was clearer. Will this work with the duel as in better resolution or just deck builder?
this is awesome
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: Old deck builder after some cleaning

Postby Dave » 14 Jan 2012, 12:43

i think this looks really great.

I have some suggestions if you're up to it:
1. There is room below the 'big card'. Maybe there could come a textbox which works like a filter on cardname/rules text. That way you can search for cards which affect goblins or something like that.
2. In the expansion list filter-options for standard,vintage,extended and perhaps a way to change which sets are in them
But that might be difficult since you have to store these booleans as expansion-info in your .dat

If #1 could be added, i dont't see the need for another deckbuilder, coz this one is really cool as it is
Dave
 
Posts: 97
Joined: 09 Jan 2010, 13:30
Has thanked: 16 times
Been thanked: 14 times

Re: Old deck builder after some cleaning

Postby Aswan jaguar » 14 Jan 2012, 14:30

Thanks,looks nice and no crashes.


Mok wrote:
2nd option is called ReadbyName (default is 0), this switches DB to read (and only read) decks by the card names instead of card ids. This will obviously work only if card names are proper but in majority of cases it should be fine (in case the name is wrong, it will display a requester and skip loading the card, you can edit the deck in notepad and correct the name in such case). Why this option? It's useful if card order changed and you want to use your old decks. Simply switch the option to ReadByName=1 and load your old deck and save it. The card ids required by magic.exe will be corrected. Obviously if you have a lot of decks it will be bothersome and in such case some script that will do it automatically will be better, but otherwise this should be helpful.
I tested a bit, loaded 2 decks that had cards with wrong numbers and came up with 2 cards per deck that had wrong names before and couldn't add them I skipped them then found the same cards in DB and added them to decks and saved.Went to duels decks were not there so I opened the deck with notepad and saw that DB added an Air Elemental 0 card to both decks that's why they weren't load,when I erased that decks loaded with no 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: Old deck builder after some cleaning

Postby Mok » 14 Jan 2012, 15:32

Dave wrote:1. There is room below the 'big card'. Maybe there could come a textbox which works like a filter on cardname/rules text. That way you can search for cards which affect goblins or something like that.
2. In the expansion list filter-options for standard,vintage,extended and perhaps a way to change which sets are in them
But that might be difficult since you have to store these booleans as expansion-info in your .dat
Nice ideas, worth trying to implement. Another thing that's missing (from both DB and the game) is a sideboard. There were signs that MPS actually planned adding it (some disabled parts of code) but probably they killed the game before it was fully done. Not sure unfortunately if I'll be able to do much, we'll see.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: Old deck builder after some cleaning

Postby Mok » 14 Jan 2012, 15:36

Aswan jaguar wrote:I tested a bit, loaded 2 decks that had cards with wrong numbers and came up with 2 cards per deck that had wrong names before and couldn't add them I skipped them then found the same cards in DB and added them to decks and saved.Went to duels decks were not there so I opened the deck with notepad and saw that DB added an Air Elemental 0 card to both decks that's why they weren't load,when I erased that decks loaded with no problem.
Can you give me a deck like that (before saving it)? I converted quite a few decks and no extra Air Elementals in any of them. So what you did is:
- select deck
- while it loaded, there were wrong names for some cards and they weren't the same as deck builder proposed, so you chose to skip them
- manually added "wrong" cards
- save
Now, extra air elemental cards are there?

EDIT: Ah, I see the problem. If the card is skipped it attempts to add 0 cards with id 0 (which is air elemental), it should skip all attempts to add "0" cards. I'll fix it for next version.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: Old deck builder after some cleaning

Postby gmzombie » 14 Jan 2012, 16:28

the one and only thing i see wrong or is happening to me is if i try to just start deck.exe it will not load it flashes up and exits. i can load it up via magic.exe and going into the deck builder icon but wont work the other way...NOT a big deal just happened to notice that.
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: Old deck builder after some cleaning

Postby Gargaroz » 14 Jan 2012, 16:50

Mok, could you please post the XLS files (manalink and ct_all) you used to create this version ? Since you corrected the ones posted by Sonic, I really need them.
----
- 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: Old deck builder after some cleaning

Postby Mok » 14 Jan 2012, 18:12

gmzombie wrote:the one and only thing i see wrong or is happening to me is if i try to just start deck.exe it will not load it flashes up and exits. i can load it up via magic.exe and going into the deck builder icon but wont work the other way...NOT a big deal just happened to notice that.
Curious. Are you using Deck.exe from original magic or some replacement (Snacko did one AFAIR)? Not happening here so far on either XP or Vista 64-bit.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: Old deck builder after some cleaning

Postby Mok » 14 Jan 2012, 18:13

Gargaroz wrote:Mok, could you please post the XLS files (manalink and ct_all) you used to create this version ? Since you corrected the ones posted by Sonic, I really need them.
It's in the beta thread, where Sonic posted his version too.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: Old deck builder after some cleaning

Postby gmzombie » 14 Jan 2012, 18:28

let me check as i have a few versions on my comp due to hacking and modding of some sorts lol.

EDIT: ok the deck.exe from 1997 which is the original when loaded up gives me a visual studio just in time debugger and will not load all the way up. UN handled exception error occurred in deck.exe [5484]
the snacko version just dosent load up but this is only when i try to load up deck.exe independently and not when magic.exe is running. Snackos version December 9th just flashes up for a second and doesn't load either. it may be my fault i don't know if anybody else has even ran into this. im running windows xp sp3
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: Old deck builder after some cleaning

Postby Mok » 14 Jan 2012, 18:38

gmzombie wrote:EDIT: ok the deck.exe from 1997 which is the original when loaded up gives me a visual studio just in time debugger and will not load all the way up. UN handled exception error occurred in deck.exe [5484]
the snacko version just dosent load up but this is only when i try to load up deck.exe independently and not when magic.exe is running. Snackos version December 9th just flashes up for a second and doesn't load either. it may be my fault i don't know if anybody else has even ran into this. im running windows xp sp3
Nah, not your fault, something is wrong. Too bad, I hoped that maybe Snacko's version will show some exception. The problem with asm tinkering of other people's code is that it's easy to mess the stack or heap in a way that will still work for most of the people but not for all. It's likely some bug in db but I need to reproduce it to fix :( Oh well, another one of the annoying type. Will see if I can trace it.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: Old deck builder after some cleaning

Postby gmzombie » 14 Jan 2012, 18:41

would it help if i sent you the copy i have

Edit b y the way just curious really if it could be done to set all core editions to the fourth edition button. Or if it is even able to adjust any of the set buttons to use different sets..I'm just curious due to the fact that when the fil?ter is active we can't use those buttons. I'm thinking it has something to do with the new exp. Column correct. Don't get me wrong I like this new edition to the deck editor just thinking outside the box box for the newbies..thanks for everything so far also.
Last edited by gmzombie on 14 Jan 2012, 19:26, edited 1 time in total.
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: Old deck builder after some cleaning

Postby Mok » 14 Jan 2012, 19:17

gmzombie wrote:would it help if i sent you the copy i have
Nope, since it's not "deck.exe" that fails, but the main db: deckdll.dll. In fact deck.exe simply starts the dll and not much else (that's why it's so short).
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Re: Old deck builder after some cleaning

Postby Mok » 15 Jan 2012, 01:20

Uploaded new version (link updated in first post):

- fixed bug with skipping cards when reading decks via names
- hopefully fixed a crash bug when launching DB from deck.exe on some systems
- added crude possibility to search rules text

The search is primitive and while accepts wildcards like * or ? does not search for specific words so the order is important. So typing "haste*vigilance" will give different results than "vigilance*haste". Also it searches unfiltered text so you can use tags to look for mana symbols etc. Some less known ones:
|I - snow symbol
|Q - untap symbol
|2B,|2U,|2R... |BU,|BW,|GR... |PB,|PU,|PR... and so on, various special mana costs.
Also remember that some colors and basic land names are prefixed by |H or |S type tags, so "all swamps" will likely not work but "all*swamps" will.

The search control is ugly and lack "clear" button for now so you need to delete the text to remove the filtering.
Mok
Programmer
 
Posts: 163
Joined: 23 Nov 2011, 14:28
Has thanked: 1 time
Been thanked: 61 times

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 15 guests


Who is online

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

Login Form