Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Utilities
DOTP 2012 - Deck Editor Revised
Moderator: CCGHQ Admins
Re: DOTP 2012 - Deck Editor Revised
by Eglin » 30 May 2012, 22:57
This is such quality software! Thank you so much for providing it to us. I doubt I would've endeavored to make new decks if not for your program, and I suspect that I'm not alone. Thanks.
Re: DOTP 2012 - Deck Editor Revised
by thefiremind » 30 May 2012, 23:56
Same for me, and I feel ashamed that I didn't thank you before... the fact is, at first I was just a lurker on these forums. But now I'm not, so I want to say: thanks a million for your work!Eglin wrote:I doubt I would've endeavored to make new decks if not for your program, and I suspect that I'm not alone. Thanks.
I tried version 2 and I like the improvements, but I noticed some things that made me come back to version 1:
- I can't understand the new process of illustration import when making a new card. I have my new picture on the Desktop, I double-click on the new card, I select that picture, I am asked for a new name (and I give it the same), then a message says "Process aborted", but the picture has been copied to the illustrations directory, it just doesn't appear on the card. I tried to re-select the picture, this time from the illustrations directory, and it finally appeared on the card. Am I doing something wrong?
- I made a new card but I noticed it wasn't read by the program. So I opened the XML file and I noticed that the <CARD_V2> line was nowhere to be found! (The closure, </CARD_V2>, was in the correct place.)
- When I import abilities from other cards, the return sequence inside them is just "\n", while it was "\r\n" in version 1 (and it is in the rest of the XML file). I usually give the last tweaks on the card with Notepad, and "\n" without "\r" has no effect on Notepad, so I see each ability all in one line. If it's not too difficult, could you please use "\r\n" inside the imported abilities again (except inside the localised text)? I used the C++ escape characters to explain, but just to be clear, "\r" should be ASCII character #13, while "\n" should be #10.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 01:23
Thanks for the kind remarks!
Lol, thefiremind, I hear ya ... I'm really the same way ... always kinda lurking, or observing ...
Anyways, I'll check out the issues you were describing. Doesn't sound like you were doing anything wrong. Unfortuneately being just a 1 man workshop doesn't give me much time for testing, although I do try to test as much as I can but even sometimes simple things ( see previous post about search functionality lol ) make it past me ... actually Eglin should be testing more thoroughly / providing feedback so expect some changes in the next few weeks ...
Lol, thefiremind, I hear ya ... I'm really the same way ... always kinda lurking, or observing ...
Anyways, I'll check out the issues you were describing. Doesn't sound like you were doing anything wrong. Unfortuneately being just a 1 man workshop doesn't give me much time for testing, although I do try to test as much as I can but even sometimes simple things ( see previous post about search functionality lol ) make it past me ... actually Eglin should be testing more thoroughly / providing feedback so expect some changes in the next few weeks ...
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 01:45
1. I can't understand the new process of illustration import when making a new card. I have my new picture on the Desktop, I double-click on the new card, I select that picture, I am asked for a new name (and I give it the same), then a message says "Process aborted", but the picture has been copied to the illustrations directory, it just doesn't appear on the card. I tried to re-select the picture, this time from the illustrations directory, and it finally appeared on the card. Am I doing something wrong?
I think, not sure, but if you right click on the card image in Card Info ( after the failure ) and click Refresh the image should display correctly ( without having to select again choosing the png file from the illustrations directory ). Either way I think I know what was causing it and have got a fix in already place for it.
2. I made a new card but I noticed it wasn't read by the program. So I opened the XML file and I noticed that the <CARD_V2> line was nowhere to be found! (The closure, </CARD_V2>, was in the correct place.)
Wow, sometimes I baffle myself. I edited the entire line out for <CARD_V2> instead of just what was no longer needed ... since if it was a custom card I flagged it as such as an attribute ( i.e. <CARD_V2 custom="true"> ) because in v1 custom cards had to be in the cards directory ( with CORE cards ). Needless to say, this has been remedied. Thanks! ( and apologies )
3. When I import abilities from other cards, the return sequence inside them is just "\n", while it was "\r\n" in version 1 (and it is in the rest of the XML file). I usually give the last tweaks on the card with Notepad, and "\n" without "\r" has no effect on Notepad, so I see each ability all in one line. If it's not too difficult, could you please use "\r\n" inside the imported abilities again (except inside the localised text)? I used the C++ escape characters to explain, but just to be clear, "\r" should be ASCII character #13, while "\n" should be #10.
Will look into this ...
I think, not sure, but if you right click on the card image in Card Info ( after the failure ) and click Refresh the image should display correctly ( without having to select again choosing the png file from the illustrations directory ). Either way I think I know what was causing it and have got a fix in already place for it.
2. I made a new card but I noticed it wasn't read by the program. So I opened the XML file and I noticed that the <CARD_V2> line was nowhere to be found! (The closure, </CARD_V2>, was in the correct place.)
Wow, sometimes I baffle myself. I edited the entire line out for <CARD_V2> instead of just what was no longer needed ... since if it was a custom card I flagged it as such as an attribute ( i.e. <CARD_V2 custom="true"> ) because in v1 custom cards had to be in the cards directory ( with CORE cards ). Needless to say, this has been remedied. Thanks! ( and apologies )
3. When I import abilities from other cards, the return sequence inside them is just "\n", while it was "\r\n" in version 1 (and it is in the rest of the XML file). I usually give the last tweaks on the card with Notepad, and "\n" without "\r" has no effect on Notepad, so I see each ability all in one line. If it's not too difficult, could you please use "\r\n" inside the imported abilities again (except inside the localised text)? I used the C++ escape characters to explain, but just to be clear, "\r" should be ASCII character #13, while "\n" should be #10.
Will look into this ...
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 03:39
thefiremind:
All 3 items have been fixed ( I'm pretty sure I got the selecting image issue resolved ) and an update posted. Please let me know if you find anything else
All 3 items have been fixed ( I'm pretty sure I got the selecting image issue resolved ) and an update posted. Please let me know if you find anything else
Re: DOTP 2012 - Deck Editor Revised
by thefiremind » 31 May 2012, 09:12
Wow, you have been super-fast! Thanks a lot! The image import is flawless now.
There's still a little indentation problem in the imported abilities. I'll give you an example:
The expected result, in the example, should be the following:
Another thing I noticed: when I save a deck, the tag always_available="true" disappears, and the deck appears locked in the game. I'd suggest to make this tag selectable in the Deck Info (so that it persists after saving the deck if it was in the deck before saving)... or to always add it, if you need a simpler solution.
Oh and I'd like to see a feature, but it's not really important, so add it just if you feel it's worth. Since I always used your Deck Editor, all my cards have the tag custom="true". Now that you decided to remove it, I don't like to have most cards with that tag and the new ones without it. Of course it takes less than 5 seconds to copy and paste the tag from another card, but would it be possible to put a checkbox in the card editor that lets the user select if he wants that tag or not?
There's still a little indentation problem in the imported abilities. I'll give you an example:
- Code: Select all
<TOUGHNESS value="4" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION>
local characteristics = Object():GetCurrentCharacteristics()
characteristics:Badge_Set( BADGE_FLYING )
characteristics:FX_Set( SPECIAL_EFFECT_FLYING)
characteristics:CanOnlyBeBlockedBy_Set(EVASION_INDEX_FLYING )
characteristics:CanBlock_Set( EVASION_INDEX_FLYING )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
The expected result, in the example, should be the following:
- Code: Select all
<TOUGHNESS value="4" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flying]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION>
local characteristics = Object():GetCurrentCharacteristics()
characteristics:Badge_Set( BADGE_FLYING )
characteristics:FX_Set( SPECIAL_EFFECT_FLYING)
characteristics:CanOnlyBeBlockedBy_Set(EVASION_INDEX_FLYING )
characteristics:CanBlock_Set( EVASION_INDEX_FLYING )
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
Another thing I noticed: when I save a deck, the tag always_available="true" disappears, and the deck appears locked in the game. I'd suggest to make this tag selectable in the Deck Info (so that it persists after saving the deck if it was in the deck before saving)... or to always add it, if you need a simpler solution.
Oh and I'd like to see a feature, but it's not really important, so add it just if you feel it's worth. Since I always used your Deck Editor, all my cards have the tag custom="true". Now that you decided to remove it, I don't like to have most cards with that tag and the new ones without it. Of course it takes less than 5 seconds to copy and paste the tag from another card, but would it be possible to put a checkbox in the card editor that lets the user select if he wants that tag or not?
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 14:25
I'll see about correcting the indentation but what you have as expected results should have the "code" indented right ( actually does this in the example )? Since it's under the node? Not that the indentation even really affects anything. For example, alot of the "code" ( from CORE cards ) has some identation issues. Irrating at times, I know.
Deck Info actually does have a dropdown in the lower left that allows you to set the always available flag ( or never available ). By default any new deck has the always available flag set. The issue you're describing though is b/c of a syntax error when reading the deck XML. I was looking for "always available" instead of "always_available". Thanks for finding this! Update with a fix is forthcoming ...
Is there a reason for wanting to keep the "custom" attribute? I realize it doesn't hurt anything having it in there but isn't needed anymore. If you save a card ( even those that you import, not CORE ) it will remove it but I understand that you probably have tons of cards and that would be a chore to do for each one. Will try to think of a way to handle this more elagantly.
Also found and fixed an issue with selecting deck box images. Fix will be in next update.
Deck Info actually does have a dropdown in the lower left that allows you to set the always available flag ( or never available ). By default any new deck has the always available flag set. The issue you're describing though is b/c of a syntax error when reading the deck XML. I was looking for "always available" instead of "always_available". Thanks for finding this! Update with a fix is forthcoming ...
Is there a reason for wanting to keep the "custom" attribute? I realize it doesn't hurt anything having it in there but isn't needed anymore. If you save a card ( even those that you import, not CORE ) it will remove it but I understand that you probably have tons of cards and that would be a chore to do for each one. Will try to think of a way to handle this more elagantly.
Also found and fixed an issue with selecting deck box images. Fix will be in next update.
Re: DOTP 2012 - Deck Editor Revised
by thefiremind » 31 May 2012, 15:07
I'm trying to follow the majority of the core cards, and they have the indentation that I showed you as expected result, without further indentation of the code.jstauffer wrote:I'll see about correcting the indentation but what you have as expected results should have the "code" indented right ( actually does this in the example )? Since it's under the node? Not that the indentation even really affects anything. For example, alot of the "code" ( from CORE cards ) has some identation issues. Irrating at times, I know.
I guess it's never too late to learn about a new dropdown!jstauffer wrote:Deck Info actually does have a dropdown in the lower left that allows you to set the always available flag ( or never available ). By default any new deck has the always available flag set. The issue you're describing though is b/c of a syntax error when reading the deck XML. I was looking for "always available" instead of "always_available". Thanks for finding this! Update with a fix is forthcoming ...
I'm glad I've been helpful.
Well, the other solution would be to clean all the other cards. If you include a way to do this "batch style" (one click and it's done) without touching anything else inside the XML files during the process, it will be OK as well. Just choose how to handle it, I'll be happy with any solution as long as I can maintain uniformity on my cards.jstauffer wrote:Is there a reason for wanting to keep the "custom" attribute? I realize it doesn't hurt anything having it in there but isn't needed anymore. If you save a card ( even those that you import, not CORE ) it will remove it but I understand that you probably have tons of cards and that would be a chore to do for each one. Will try to think of a way to handle this more elagantly.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 16:37
Uploaded an update that fixes the following:
Issue with reading deck XML and not setting the "always_available" attribute properly
Issue with selecting deck box images
Another update is being worked on and includes:
A "cleaup" utility on the Content Info form that when clicked will ask you if you want to set all decks to ALWAYS_AVAILABLE and remove the CUSTOM attribute from all cards
An issue I found when saving a deck where the is_color attributes aren't set ( unless the deck is loaded as the current deck ).
Fixing format of the ability XML. I using built-in .NET functions to format the ability XML ( to display on the Ability form ). The issue is previously I was using some overly complex logic to extract the ability info from the card whereas now I'm just grabbing the outer XML of the ability nodes. However by doing this it doesn't format it hence the reason for using the aforementioned .NET functions to format it. It seems that these functions don't do an incredibly great job. Anyways, looking inot this.
Issue with reading deck XML and not setting the "always_available" attribute properly
Issue with selecting deck box images
Another update is being worked on and includes:
A "cleaup" utility on the Content Info form that when clicked will ask you if you want to set all decks to ALWAYS_AVAILABLE and remove the CUSTOM attribute from all cards
An issue I found when saving a deck where the is_color attributes aren't set ( unless the deck is loaded as the current deck ).
Fixing format of the ability XML. I using built-in .NET functions to format the ability XML ( to display on the Ability form ). The issue is previously I was using some overly complex logic to extract the ability info from the card whereas now I'm just grabbing the outer XML of the ability nodes. However by doing this it doesn't format it hence the reason for using the aforementioned .NET functions to format it. It seems that these functions don't do an incredibly great job. Anyways, looking inot this.
Re: DOTP 2012 - Deck Editor Revised
by thefiremind » 31 May 2012, 16:48
I understand what you mean: some months ago I tried to code a card editor (I don't say deck editor because I coded only the card editing, and not even completely), then I gave up, but before giving up, I had to face the problem of the ability formatting, and I wrote a function that extracted the abilities by reading the XML as a simple text file. I remember it worked quite well, but it was an added complexity that I would have been happy to eliminate.jstauffer wrote:Fixing format of the ability XML. I using built-in .NET functions to format the ability XML ( to display on the Ability form ). The issue is previously I was using some overly complex logic to extract the ability info from the card whereas now I'm just grabbing the outer XML of the ability nodes. However by doing this it doesn't format it hence the reason for using the aforementioned .NET functions to format it. It seems that these functions don't do an incredibly great job. Anyways, looking inot this.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 17:45
Ok, I think I may have got the ability XML formatting ironed out.
I've posted yet another update which fixes this and previously mentioned issues. Please see release notes for more detail.
I've posted yet another update which fixes this and previously mentioned issues. Please see release notes for more detail.
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 17:59
Actually have posted an update on top of the one I just posted. I didn't like that the new "cleanup" utility didn't use the progress dialog so fixed that and changed things so that the cards are refreshed after checking if application is a new version during initialization.
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 18:04
Also if anyone is willing to write up some help ( preferably in html ) for Deck Editor Revised I'd be more than happy to add it in.
Re: DOTP 2012 - Deck Editor Revised
by thefiremind » 31 May 2012, 18:19
That's why I wrote "without touching anything else inside the XML files during the process"... the cleanup utility has a very bad bug: it deletes all the localised text for the cards' titles and flavour, except for English. My DLC is localised in all languages and it took me days for achieving this, so I'd prefer not to lose that text.
(It also adds 2 spaces before each "<![CDATA" in the abilities, but I think it's a consequence of your fix for the indentation and it's not critical.)
(It also adds 2 spaces before each "<![CDATA" in the abilities, but I think it's a consequence of your fix for the indentation and it's not critical.)
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: DOTP 2012 - Deck Editor Revised
by jstauffer » 31 May 2012, 19:56
I can actually change things so that I'm pulling in other language data so that it will get written back out. Is there anything else?
You also mentioned earlier that you "touch up" a few things in notepad after using Deck Editor Revised. What exactly are you doing? Is this something I could implement so you wouldn't have to?
You also mentioned earlier that you "touch up" a few things in notepad after using Deck Editor Revised. What exactly are you doing? Is this something I could implement so you wouldn't have to?
Who is online
Users browsing this forum: No registered users and 12 guests