It is currently 18 Jul 2025, 13:13
   
Text Size

Custom Set Editor - Sneak preview

Continuing Development of MicroProse's Magic: The Gathering!

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

Re: Custom Set Editor - Sneak preview

Postby Bog Wraith » 06 Jan 2010, 21:00

ok, thanx for the heads up on it! 8)
'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.
User avatar
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

Postby mathusalem » 06 Jan 2010, 22:00

Ok what do you think of that ?
Attachments
custom set editor copie.jpg
User avatar
mathusalem
 
Posts: 459
Joined: 24 Feb 2009, 21:00
Has thanked: 6 times
Been thanked: 4 times

Re: Custom Set Editor - Sneak preview

Postby 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.
DrJones
 
Posts: 18
Joined: 01 Jan 2010, 15:41
Has thanked: 0 time
Been thanked: 0 time

Re: Custom Set Editor - Sneak preview

Postby Bog Wraith » 06 Jan 2010, 23:11

mathusalem wrote:Ok what do you think of that ?
Mathy, you have a great designer's eye. It shows on all the graphics you work on.

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! 8)
'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.
User avatar
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

Postby mathusalem » 06 Jan 2010, 23:40

:oops: :oops: t'ankiou !
I hope Jatill will like it as well
User avatar
mathusalem
 
Posts: 459
Joined: 24 Feb 2009, 21:00
Has thanked: 6 times
Been thanked: 4 times

Re: Custom Set Editor - Sneak preview

Postby jatill » 07 Jan 2010, 13:02

mathusalem wrote::oops: :oops: t'ankiou !
I hope Jatill will like it as well
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.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Custom Set Editor - Sneak preview

Postby jatill » 07 Jan 2010, 13:04

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 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.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Custom Set Editor - Sneak preview

Postby mathusalem » 07 Jan 2010, 13:09

jatill wrote:
mathusalem wrote::oops: :oops: t'ankiou !
I hope Jatill will like it as well
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.
it shouldn't take long actually.
User avatar
mathusalem
 
Posts: 459
Joined: 24 Feb 2009, 21:00
Has thanked: 6 times
Been thanked: 4 times

Re: Custom Set Editor - Sneak preview

Postby DrJones » 07 Jan 2010, 13:42

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.
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.
DrJones
 
Posts: 18
Joined: 01 Jan 2010, 15:41
Has thanked: 0 time
Been thanked: 0 time

Re: Custom Set Editor - Sneak preview

Postby jatill » 07 Jan 2010, 14:04

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.
Thanks for the tip on define. Good to know; I'm sure we'll take your suggestion.

My editor doesn't compile anything. The function will read from MagicCustom.exe at the start of the same, as you suggest.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Custom Set Editor - Sneak preview

Postby 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 ?
User avatar
mathusalem
 
Posts: 459
Joined: 24 Feb 2009, 21:00
Has thanked: 6 times
Been thanked: 4 times

Re: Custom Set Editor - Sneak preview

Postby 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)
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Custom Set Editor - Sneak preview

Postby 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.
Last edited by jatill on 07 Jan 2010, 21:41, edited 1 time in total.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Custom Set Editor - Sneak preview

Postby 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
Gargaroz
Programmer
 
Posts: 7097
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 595 times

Re: Custom Set Editor - Sneak preview

Postby jatill » 07 Jan 2010, 21:44

Gargaroz wrote: all the cards are disappeared from the columns. What can I do now ?
Oops, that was a bug. Here's the new exe with sweet new graphics.
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!
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

PreviousNext

Return to ManaLink 3.0

Who is online

Users browsing this forum: No registered users and 4 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form