Log in

Guide to CSV editing

Here's a simple guide to CSV editing.
Original text by Orion79.

1 - the best thing to edit the CSV file is not to use Skymagic Editor (which is great for the exe, instead) but Microsoft Excel (or another program that could edit the CSV database type). Depending on your version, activate filters and lock the first horizontal line for better view. While you work, feel free to use grasseto style and any color to mark your cards: they won't be saved in the CSV format.

2 - tags. Some are very intuitive, others are not.

ID - is the card's ID. It must be in progressive order. Just to prevent bugs, if you had to switch slots select a bunch of the first 3 slots (from 0 to 4, eg) and drag to the end of the table: it will re-number all the slots, fixing any mistake.
Full Name: it is the card's full name that will appear in the deck editor.

CODED CARD: 0 = no or token; 1 is yes, which will made the card to appear in the deck editor.

Name - card's name in the game.

Expansion - This is tricky, because most of you often do a lot of mistakes with that. It makes the cards to appear in the rigth set both for deck editor and sealed deck game.
0008h - Astral Set/Manalik 2.0
0020h - the Dark set
04h - Arabian Nights
01000h - Token
0100h - Legends
0800h - Unlimited
40h - 8th Edition
0002h - Antiquities
1000h - Rules Engine reserved slot
Sets names may be changed editing the CueCards.txt file, so if you are planning to release new Limited sets, you may edit those values (and maybe evolve GMZombie's special DLL)

Card Type
1 - Artifact
2 - Enchantment
3 - Instant
4 - Interrupt
5 - Land
6 - Sorcery
7 - Creature
8 - Token

DB Card Type 2: This category gives precious advices to AI about how to use cards. It may also have occasional consequences on deck editor.
0 = None
1 = Ante card (if a card has its value, it may screw up with deck editor and showing the deck in non-ante games.
2 = Stealing (eg. Control Magic)
3 = counterspell
4 = X spell
5 = Discard effect
6 = Draw cards/return from graveyard/tutor
7 = Gain life
8 = Prevent damage (as Oasis or Greater Realm of Preservation)
9 = Destroy lands
10 = Provides mana
11 = "Entangle" effect (slow down the game, as Boomerang or Stasis)
12 = Inflatable/creatures' mana-activated abilities
Since some cards may have multiple effects, when you code new cards you have to choose a priority. All previous lands have "provides mana" even if they have other effects, while X casting cost is often selected if there are no other effects.

Rarity
1 - Common
2 - Rare
4 - Uncommon
3 - Chronicles Special (Uncommon almost rare)

Req Colorless; Black; Blue; Green; Red; White: They are just the required mana of each kind.

Num Pics: As the name suggests, it tells how many arts that card has. If it is wong, you may have an empty gray image or other arts won't figure out.

Mod Direct Fire [...] Mod Library Manipulation: These modalities tell how the AI uses some cards. They are cumulative with the previous flags. The general rule is that 1 means "direct effect"; 2 is "interact with main effect". Eg, for Mod Direct Fire, Disintegrate has 1 since it deals direct damage, while Mana Flare or Rukh Egg have 2 since the first one helps to deal more damage and the second one is an ideal target for bolts.
Then there are other special values in detail:
Mod Land Destructor: 4 = alternative mana sources and similar; 5 = Land Sacrifice (Balance, Zuran Orb); 6 = cards that protect lands (Consacrate).
Mod Discard - 4 cards that protect the hand (Library of Leng), 5 = Mass discarding (Balance)
Mod Gain Life = when it is 2, they are cards as Fastbond or Hurricane that also harm the human player. 3 = prevention; 4 = loss of life (not damage), but this may not be right since value 4 is not present in any original Microprose-coded card.
Mod Enchantments 1 = is enchantment; 2 = draw with enchantments (Verduran Enchantress) 4 = source that destroy them; 5 = source that forces sacrifice.
Mod Artifacts 1 = is artifact; 2 protect them (Guardian Beast); 4 = source that destroy them; 5 = manipulation (tap, steal); 6 = side effects (Crumble, Hurkyl's Recall, Xenic Poltergeist) 7 = clone artifact.
Mod Creature 1 = is creature; 2 = pump creatures; 3 = resurrection & good side effects; 4 = source that destroy them; 5 = creatures that kill other creatures (Royal Assassin) and stealing spells (Control Magic); 6 = spells that may be used to hold creatures OR at own advantage(Spirit Link, Tawnos's Coffin) 7 = steal from graveyard and clone.
Mod Library Manipulation 1 = tutor, 2 = support (very rare, better not to use); 3 = millstone effect.

Mod Dummy 1, 2, 3 and 4: Unknown & unused (0 to all slots by default)

AI Inc Power/Toughness: Indicates the enhancement granted by inflatable creatures and spells. So Giant Growth gives +3/+3 and so you have to put 3 and 3 in each value.

AI Power; AI Toughness: It indicates the effective creature's power & toughness used by AI. So, if Triskelion is by fact a 4/4, use 4 in each field even if it is a 1/1 creature with 3 +1/+1 counters on it.

AI Base Value: It goes from 0 to 200. It is used in several chances, as for sealed deck creation or AI's targeting processes. Higher is a value, more powerful a card is for AI.

Dependent Arifact / Creature / Wall: It tells if a card is (1) or is not (dependant) from such permanents. Probably value 2 may be used but for sure let's just use value 0 or 1. Eg. Mishra's Workshop may only be used with artifacts and so giving 1 to it will make the AI to use it only for interaction with artifacts.

Sleighted Color: Values go from 2 to 56 and each means if a card may be hacked or not. Those values are cumulative and may be summed:
2 = black, 4 = blue, 8 = Green; 16 = Red; 32 = White.

VS Black/Blue/Green/Red/White: It is used to tell if a card has any specific effect vs. the specific color, as Northern Paladin vs. Black

For Black/Blue/Green/Red/White: It is used to tell if a card has any specific effect at advantage of a specific color. Eg, Kaisa is at Green advantage. Values may be only 0 (no) or 1 (yes)

Count as Black/Blue/Green/Red/White: It is used to tell if a card has any specific effect at advantage of a specific color. Eg, Kaisa is at Green advantage. Values may be only 0 (no) or 1 (yes)

Vs. Black/Blue/Green/Red/White Land: It is used to tell if a card is used to destroy any specific kind of basic land. Eg, Flashfires vs. Plains. Values may be only 0 (no) or 1 (yes)

For Black/Blue/Green/Red/White Land: It has a very generic meaning, in fact is used to tell if a card may get advantage from the presence that kind of land into play. It includes Gauntlet of Power as well as Drain Life. Values may be only 0 (no) or 1 (yes)

Counts as a Black/Blue/Green/Red/White Land: It is used for lands that produce more than one kind of mana. Values may be only 0 (no) or 1 (yes).

AI Flying; Banding; Trample; First Strike; Wall; Landhome: It is used to tell the AI if a specific card has that ability or not. Values are 1 = yes; 2 = gives/gains; 3 = special; 4 = removes that ability.

Exp Rarity: It is used to calculate reprinting of cards into different sets. It is a 5-numbers value: ABCDEh where A is 8th Edition; B Chronicles, C Revised, D 5th Eidition; E 4th Edition and values may be:
0 = no reprinting
5 = common
1 = uncommon
7 = special chronicles
9 = rare
So a card as Birds of Paradise that has 10099h is Uncommon in 8th edition, no repringing in Chronicles and 5th and rare in 4th and Revised edition.

Power/Toughness: Those are the true values for the deck editor and game. Using 100 as value (or 101, 102 ecc.) means that a creature figures as */* as Keldon Warlord.

Num of DB Abilities: This doesn't really matter but helps to check that each creature has the proper abilities for the deck editor filters. Hope that one day we may extend the flags.

DBA from 1 to 8 are the slots to add creatures's static abilities, which are:
1 Banding
2 ?
3 First/Double Strike
4 Flying
5 Forestwalk
6 Vigilance
7 Islandwalk
8 ?
9 Mountainwalk
11 Poison/Infect
12 Protection (Black)
13 Protection (Red)
14 Protection (White)
15 Haste
16 Rampage
17 Regeneration
18 Stonning/Deathtouch
19 Swampwalk
20 Trample
21 Reach
22 Gives Banding
23 Gives First Stirke
24 Gives Flying
25 Gives Forestwalk
26 Gives Vigilance
28 Gives Mountainwalk
29 Gives Islandwalk
30 Gives Mountainwalk
35 Gives Protection from White
36 Gives Haste
38 Gives Regeneration
39 Gives Deathtouch
40 Gives Swampwalk
41 Gives Trample
42 Gives Reach
It may be very useful for deck editor filters. "Gives" also means "gains", as pump knights that gives flying or first strike to themselves.

Mana Source Colors: As land types, it is very important for all those spells - creatures and artifacts mostly - that provide mana. Those values are cumulative and may be summed:
2 = black, 4 = blue, 8 = Green; 16 = Red; 32 = White.

Inflatable: Means if a creature may be pumped in power or toughtnes: only 0 (no) or 1 (yes).

Hack Color: As above, it tells if a spell has any land-related ability that may be changed with Magical Hack or similar spells. Values are the same:
2 = Black, 4 = Blue, 8 = Green; 16 = Red; 32 = White, related to lands of course.

Hack Mode: It is really a mistery. I can't figure it out. Values go from 1 to 7.

Enchant Type OWN/OPP: it is about the kind of enchantment that is played by player and AI point of views.
OWNER:
1 = gives advantage to self/creatures
2 = directly harm/hamper opponent or its creatures
3 = steals permanents
4 = double use 1+2, eg. Spirit Link
8 = affects lands (Spreading Seas, Evil Presence)
OPPONENT:
1 = is harming/hampering me or creatures and must be destroyed
2 = is giving advantage to my opponent
3 = affects lands (Spreading Seas, Evil Presence)
4 = double use 1+2, eg. Spirit Link
8 = steals permanents

Subtype(1)/Subtype 2: It is used for creatures' race and work and for other permanents types.
Here are some general rules
1 - always use left column (Subtype 1) for each non-creature artifact to add value 44, which is very helpful in the deck editor.
2 - For creatures, it is much better to add their race in left column (Subtype 1) and their work in right column (subtype 2). So if we have a Human Soldier, the ID for Human goes on left column and the ID for Soldier goes in the column on the right. It helps with Adaptive Automaton.
3 - Enchantments may be tagged with creatures ID (as Legendary or Planeswalkers ID) only using the column on the right.
4 - Legendary attribute is obsolete and may be included only for creature filters purpose.
For the complete list of available subtypes, check List_of_CSV_Subtypes

Type Text: describes with words the kind of spell and its subtypes.

Rules Text & Flavor Text: The original card's text with abilities. The space is limited, so for cards with a long text as Planeswalkers there may be the need to re-adapt it.
Use "\n" for "carriage return". "Tap" symbol is "|T", mana symbol are "|B", "|U", "|G", "|R", "|W", 1 colorless mana is "|1" and so until 9. "x mana" symbol is "|X".

Damage Text: It is used very rarely and only by very few spells which cause special damage or life loss, as Sylvan Library.

Effect Title Text & Effect Text: They are used to name and describe temporary effects, as Exalted effect or inflatable/pump abilities.

Legacy Title Text & Legacy Text: They are used to name and describe long-lasting effects, as Ifh-Biff Efreet effect. It is very similar to Effect Title & Text and much depends from how a card has been coded. Usually, if you see the orange background behind a card that you are using and there is no text, simply fill those values with the proper text. It adds a lot of nice flavor to the game.

For integration, you could also look at Manalink.csv_Definition