Custom Set Editor - Sneak preview
Continuing Development of MicroProse's Magic: The Gathering!
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
55 posts
• Page 2 of 4 • 1, 2, 3, 4
Re: Custom Set Editor - Sneak preview
by Bog Wraith » 06 Jan 2010, 21:00
ok, thanx for the heads up on it! 

'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
-
Bog Wraith - Global Mod 1 (Ret)
- Posts: 1108
- Joined: 28 May 2008, 22:40
- Location: Shandalar
- Has thanked: 425 times
- Been thanked: 153 times
Re: Custom Set Editor - Sneak preview
by mathusalem » 06 Jan 2010, 22:00
Ok what do you think of that ?
-
mathusalem - Posts: 459
- Joined: 24 Feb 2009, 21:00
- Has thanked: 6 times
- Been thanked: 4 times
Re: Custom Set Editor - Sneak preview
by DrJones » 06 Jan 2010, 22:19
I took a look at the code and I think you problems might arise with this editor and cards like Punishing Fire where the code expects the card to have a certain card ID. Usually hard coded numbers always cause problems, and the alternative of generating a cards.h file full of lines such as:
"#define CARD_PUNISHING_FIRE 1645"
to avoid magic numbers isn't great either, as it would require compiling afterwards. Now that I talk about code, how about adding a "#define Opp (1-player)" line at the start of the code? It would make the card functions more readable. I used Opp because it's shorter than Opponent.
"#define CARD_PUNISHING_FIRE 1645"
to avoid magic numbers isn't great either, as it would require compiling afterwards. Now that I talk about code, how about adding a "#define Opp (1-player)" line at the start of the code? It would make the card functions more readable. I used Opp because it's shorter than Opponent.
- DrJones
- Posts: 18
- Joined: 01 Jan 2010, 15:41
- Has thanked: 0 time
- Been thanked: 0 time
Re: Custom Set Editor - Sneak preview
by Bog Wraith » 06 Jan 2010, 23:11
Mathy, you have a great designer's eye. It shows on all the graphics you work on.mathusalem wrote:Ok what do you think of that ?
This is clean, neat and well organized. The eye stays on a level plane and the functions are laid out efficiently & logically.
I really like the look of this GUI old friend!

'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
-
Bog Wraith - Global Mod 1 (Ret)
- Posts: 1108
- Joined: 28 May 2008, 22:40
- Location: Shandalar
- Has thanked: 425 times
- Been thanked: 153 times
Re: Custom Set Editor - Sneak preview
by mathusalem » 06 Jan 2010, 23:40


I hope Jatill will like it as well
-
mathusalem - Posts: 459
- Joined: 24 Feb 2009, 21:00
- Has thanked: 6 times
- Been thanked: 4 times
Re: Custom Set Editor - Sneak preview
by jatill » 07 Jan 2010, 13:02
I like it, but I'm concerned about the load time. The app already takes 30 seconds to loads; I'm not sure how much longer adding the images would take.mathusalem wrote::oops:t'ankiou !
I hope Jatill will like it as well
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: Custom Set Editor - Sneak preview
by jatill » 07 Jan 2010, 13:04
I don't know a ton about C, but doesn't a define lock in the value? player is dynamic, so would opp change every time player changes?DrJones wrote:I took a look at the code and I think you problems might arise with this editor and cards like Punishing Fire where the code expects the card to have a certain card ID. Usually hard coded numbers always cause problems, and the alternative of generating a cards.h file full of lines such as:
"#define CARD_PUNISHING_FIRE 1645"
to avoid magic numbers isn't great either, as it would require compiling afterwards. Now that I talk about code, how about adding a "#define Opp (1-player)" line at the start of the code? It would make the card functions more readable. I used Opp because it's shorter than Opponent.
I'm aware of the hard-coded id issue, and I have plans to solve it. I wrote a function called get_id_by_name, so we can refer to cards by name instead, so it doesn't matter when the ids change.
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: Custom Set Editor - Sneak preview
by mathusalem » 07 Jan 2010, 13:09
it shouldn't take long actually.jatill wrote:I like it, but I'm concerned about the load time. The app already takes 30 seconds to loads; I'm not sure how much longer adding the images would take.mathusalem wrote::oops:t'ankiou !
I hope Jatill will like it as well
-
mathusalem - Posts: 459
- Joined: 24 Feb 2009, 21:00
- Has thanked: 6 times
- Been thanked: 4 times
Re: Custom Set Editor - Sneak preview
by DrJones » 07 Jan 2010, 13:42
Define is used by the C preprocessor to change all instances of A for B before compiling. It's like using the replace text function in a text editor. So in this case it replaces "Opp" by the string "(1-player)", instead of the value player had at that point. Define itself has to be used with care because bad use generates bugs hard to spot, but in this case is totally safe. Using a function to get the ids works as long as the function is in an extern dll that is compiled by your editor, or reads the list from a file at the start of the game.jatill wrote:I don't know a ton about C, but doesn't a define lock in the value? player is dynamic, so would opp change every time player changes?
I'm aware of the hard-coded id issue, and I have plans to solve it. I wrote a function called get_id_by_name, so we can refer to cards by name instead, so it doesn't matter when the ids change.
- DrJones
- Posts: 18
- Joined: 01 Jan 2010, 15:41
- Has thanked: 0 time
- Been thanked: 0 time
Re: Custom Set Editor - Sneak preview
by jatill » 07 Jan 2010, 14:04
Thanks for the tip on define. Good to know; I'm sure we'll take your suggestion.DrJones wrote:Using a function to get the ids works as long as the function is in an extern dll that is compiled by your editor, or reads the list from a file at the start of the game.
My editor doesn't compile anything. The function will read from MagicCustom.exe at the start of the same, as you suggest.
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: Custom Set Editor - Sneak preview
by mathusalem » 07 Jan 2010, 14:34
Jatill, do you need the image in a specific format to try it ? if you want I can make a png with working buttons on Fireworks. it takes transparencies. or is th jpeg sufficient ?
-
mathusalem - Posts: 459
- Joined: 24 Feb 2009, 21:00
- Has thanked: 6 times
- Been thanked: 4 times
Re: Custom Set Editor - Sneak preview
by jatill » 07 Jan 2010, 14:38
jpg is probably best.
Everything is separate images, so I'd need 1 background image, 1 for each button, etc. (the buttons are just copy, paste, and search - save and exit are gone)
Everything is separate images, so I'd need 1 background image, 1 for each button, etc. (the buttons are just copy, paste, and search - save and exit are gone)
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: Custom Set Editor - Sneak preview
by jatill » 07 Jan 2010, 19:55
Okay, I have a "working" version ready for testing. Any brave volunteers?
Here are the instructions:
http://www.slightlymagic.net/wiki/My_20 ... n_and_FAQs
You probably want to back up your magic directory, just in case (though I don't think anything bad will happen). The instructions reference several different downloads. Right now they are all zipped together here:
http://axifile.com?9498084
and you'll actually need to overwrite the exe in that file with this one:
http://axifile.com?3678449
Good luck, and please report back, success or fail.
Here are the instructions:
http://www.slightlymagic.net/wiki/My_20 ... n_and_FAQs
You probably want to back up your magic directory, just in case (though I don't think anything bad will happen). The instructions reference several different downloads. Right now they are all zipped together here:
http://axifile.com?9498084
and you'll actually need to overwrite the exe in that file with this one:
http://axifile.com?3678449
Good luck, and please report back, success or fail.
Last edited by jatill on 07 Jan 2010, 21:41, edited 1 time in total.
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
Re: Custom Set Editor - Sneak preview
by Gargaroz » 07 Jan 2010, 21:31
Ops, I did a mistake : I run the my2000.exe with the old version of customseteditor.exe. Then, when I realized, I overwrited the old program and re-run my2000.exe, but, alas, all the cards are disappeared from the columns. What can I do now ?
----
- 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
- 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: Custom Set Editor - Sneak preview
by jatill » 07 Jan 2010, 21:44
Oops, that was a bug. Here's the new exe with sweet new graphics.Gargaroz wrote: all the cards are disappeared from the columns. What can I do now ?
http://axifile.com?3678449
I'm not sure if I need to create another installer for this or not. If so, It'll have to wait until tomorrow. Enjoy!
Apps by jatill: http://www.slightlymagic.net/wiki/Other_Apps_by_jatill
55 posts
• Page 2 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 1 guest