It is currently 28 Apr 2024, 02:40
   
Text Size

Creating New Cards

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

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

Creating New Cards

Postby jatill » 09 Mar 2012, 13:58

I have about 3 hours to do coding today, so I was hoping someone can get me up and running really quickly so I can add some new cards.
I have the new version of magic installed, and build.pl works for me.
So what's involved with adding new cards these days? (i.e. I don't think the old tools work any more, right?)

Also, which folder do I put sonic's card art into? I have no card art in my game.
Thanks.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Creating New Cards

Postby Aswan jaguar » 09 Mar 2012, 16:19

If your cardartfolder is named(CardArtManalink) and for Shandalar (CardArtShandalar) all you need must be this dll by Snacko:
viewtopic.php?f=56&t=5708#p74517 and you may need the install vs2010sp1 for dependencies same link.

For coding cards Gargaroz has to answer the new way of coding cards and what has changed.
---
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: Creating New Cards

Postby jatill » 09 Mar 2012, 18:43

Looks like I was missing the dll. All set with the images now.
Has anyone ever looked into is it's possible to make this game run in a window?
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Creating New Cards

Postby Gargaroz » 09 Mar 2012, 19:56

Sensei, you need to locate the "magic_updater" folder : in that, there are "manalink" and "ct_all" in both XLS and CSV version. The first is the CSV file, the second regards the EXE (cards_data). You could edit the XLS file and then convert them to CSV or edit directly the CSV, then double click on "magic_updater.bat" and then check the "errors.txt" file to see if everything is gone rigth (ignore any warning, they're only harmelss differences). Then, the updated files are in the folder "updated_files" (duh).
However, I'm going to release a new patch on the weekend, so it's better if you install that first and the add your changes ;)
----
- 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: Creating New Cards

Postby jatill » 09 Mar 2012, 20:45

I'll wait until your patch to begin making any changes, but I have a few more questions.
1) What generated the manalink.xls file? Some script, I assume. Do we have that script, so future expansions are automatically added?
2) Is there a xls to csv converter somewhere?
3) One card I want to add is Jack in the Mox from Unglued. Will I have trouble adding an Unglued card?
4) Is there any tool like the old SkyEditor for creating cards? If not, perhaps I should spend my time creating that tool instead of adding cards for now.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Creating New Cards

Postby CirothUngol » 10 Mar 2012, 04:21

Has anyone ever looked into is it's possible to make this game run in a window?
If Manalink was DirectX based we could use D3D-Windower (great little app).
My solution was to use a Virtual Machine. Grab the VMWare Appliance at the link in my sig (look in the "Manalink 2.x 20100109" folder), load the OS updates (VisualC, etc) and install Manalink 3.0... works like a charm.
"I thought the day had brought enough horrors for our ragged band, but the night was far worse."
-Lucilde Fiksdotter


Shandalar 2012 Revisited
Magic: The Gathering Abandonware
User avatar
CirothUngol
Programmer
 
Posts: 431
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 107 times

Re: Creating New Cards

Postby Gargaroz » 10 Mar 2012, 15:58

Sensei,
1) You've to ask Sonic, which is the main keepers and cleaner of the Manalink.csv. I think was directly imported from Gatherer. I don't know if you can simply add new columns to the Manalink.csv, I fear we've to rename something : there are all these "duel deck" fields that are pretty useless, if you ask me. Howver, you need to ask Mok since the expansion system was devised by him.

2) You could do it through Excel itself, just choose "Save as" and pick ".csv" as format. If you haven't Excel, ask Sonic which is more proficient than me in this field.

3) You could group it in the same group of Maelstrom Wanderer, which is still to be released in paper magic. I don't think you want to release the entire Unglued set, right ? :)

4) No, not yet. And if you could do it, it will be really useful so go on ;)
----
- 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: Creating New Cards

Postby jatill » 12 Mar 2012, 14:47

If you save Manalink.xls as a csv in Excel, it will look like this:
1,Ancestral Recall,1,Ancestral Recall,|U|U,800h,2,3,2,0,0,1,0,0,0,1,0h,0,0,0,0,0,0,0,1003h,-1,-1,-1,-1,-1,-1,211,211,0,Instant,Target player draws three cards.,,,,,,,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

However, the version of the csv that I get when I download uses semi-colons, like this:

1;Ancestral Recall;1;Ancestral Recall;|U|U;800h;2;3;2;0;0;1;0;0;0;1;0h;0;0;0;0;0;0;0;1003h;-1;-1;-1;-1;-1;-1;211;211;0;Instant;Target player draws

I'm pretty sure I need the 2nd format, right? So I'm unsure how to convert the xls to that unless there is a script. Hopefully I'll hear from Sonic about that.


Edit: I see that I can change my windows settings to do this. Seems like a hassle, though.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Creating New Cards

Postby jatill » 12 Mar 2012, 19:26

Can someone explain the 'new types' fields in manalink.xls? I can't intuit those fields.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Creating New Cards

Postby Aswan jaguar » 12 Mar 2012, 20:36

About the new types as Mok said:

There's now 7 extra columns before old Subtype1 and Subtype2. These are new and incompatible with the old subtypes. Originally I planned only to expand old subtypes, but that would only prolong the bugs in the current code like treating other types/subtypes like creature types whenever a card is animated and so on. The "new" definition is in file "stypes.h". The old subtypes are unchanged and currently no code uses new types at all (except deckbuilder to find artifact creatures as you removed creature subtype from artifacts in your versions which was used by the db).

Gargaroz made code for "new type" so creatures with 3 and more subtypes now can have all of the subtypes working not like before when only 2 creature types could be effective for most subtypes.
---
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: Creating New Cards

Postby Sonic » 13 Mar 2012, 13:15

Sorry Jatill, I only came across this thread after your PM. I’ve now had a bit of time to prepare some stuff you might find helpful.

If you haven’t already added ‘Jack in the Mox’, I thought I’d save you some time getting back into the swing of things by adding the basic entry parameters for the card to the latest Manalink.xls and Ct_all.xls files. You’ll find the Manalink.xls entry below ‘Goblin Tutor’ (slot 1256), and the Ct_all.xls entry at row 4720 just above the ‘DataCard’ entry.
Mok chose to mark the ‘Goblin Tutor’ entry row in green in the Manalink.xls file, as this is the only Unglued card currently coded and Unglued and isn’t included in the new Set Rarity columns. I’ve included the cards artwork as well.

As Aswan jaguar said, you can find the new types codes in the ‘stypes.h’ file in the ‘src folder’. The codes are generally arranged as a card types appear in their ‘Type Text’ entries. So, for example, a ‘Legendary Creature — Spirit’ would have the code ‘F0h’ (Legendary) in New Types 1, ‘1001h’ (Creature) in New Types 2 and ‘BCh’ (Spirit) in New Types 3.
To be honest, as all 1200+ cards in the file are already set up with the new and old type codes, the easiest way to deal with the New Types and Sub Types fields is to find a card with matching ‘Type Text’ entry to the one your entering, and just copy all the row cells from this cards ‘New Type 1’ to ‘Subtype 2’ columns and paste them into the new card entry.

As I mentioned in reply to your PM, I’ve got an xls2csv script and batch conversion file for the Manalink.xls and Ct_all.xls files.
The files in this archived ‘magic_updater’ folder are slightly different to those provided in the update archive - being based on an alternative batch conversion process Mok developed to take care of the entire conversion process with a single batch file. So copy the folder to a different destination other than the Magic installation folder.

You’ll also need to download this program – XLS2CSV Converter version 1.2.0.2701: http://xls2csv.genxcrowd.com/download – install it, and copy the ‘xls2csv.exe’ from the xls2csv program installation folder into the ‘magic_updater’ folder.

Copy your edited Manalink.xls and Ct_all.xls files into the ‘magic_updater’ folder, and the current Magic.exe into the ‘magic_updater\current_magic_exe’ folder.
Run the ML_Convert.Bat file – it will first produce the semi-colon delimited Manalink.csv and Ct_all.csv files – followed by the card_id.h, Cards.dat, DBinfo.dat, Rarity.dat files, and an updated Magic.exe which are all then moved into the ‘updated_files’ folder.
It also produces a XLS2CSVLOGFILE file which shows the xls2csv conversion info, and an Errors.txt file - most of the information in this file can be ignored according to Mok.

I should warn you though - the conversion process is ruthless. If there’s a single parameter error in the Manalink.xls file, the conversion won’t produce a full set of dat files and the Errors.txt will report a parsing error code. Unfortunately, neither Gargaroz nor I have been able to work out what the codes actually relate to, but up to now we’ve always managed to trace down any errors manually.

Me still just being an xls/csv cardart grunt; Gargaroz is the man for the new specifics of the manalink files parameters and coding wizardry. But if you do need any help with Excel give me a heads up. Although, you’ll probably find enough uncoded card entries already in the Manalink.xls file to play with without the need to have any detailed Excel knowledge. Unless you fancy coding any other cards from the two sets we specifically didn’t include in the Manalink.xls… :-"

For_Jatill.zip – http://www.mediafire.com/?bumgrygel55o4si

Have fun… Sonic
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: Creating New Cards

Postby jatill » 14 Mar 2012, 18:06

Thanks for the instructions. Everything is going smoothly now. Almost 20 cards in. Good times.
jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times

Re: Creating New Cards

Postby Sonic » 14 Mar 2012, 23:28

jatill wrote:Thanks for the instructions. Everything is going smoothly now. Almost 20 cards in. Good times.
Nice to have you back.
Drop me a list of the cards you're thinking of coding and I'll make haste with the artwork.

All the best... Sonic
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: Creating New Cards

Postby jatill » 15 Mar 2012, 12:26

jatill
DEVELOPER
 
Posts: 2118
Joined: 24 Feb 2009, 16:35
Has thanked: 5 times
Been thanked: 17 times


Next

Return to Development

Who is online

Users browsing this forum: No registered users and 39 guests


Who is online

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

Login Form