diff --git a/data/magic-cockatrice-v2.mse-export-template/README.txt b/data/magic-cockatrice-v2.mse-export-template/README.txt index c19cf727c8..7fa3b3b9c0 100644 --- a/data/magic-cockatrice-v2.mse-export-template/README.txt +++ b/data/magic-cockatrice-v2.mse-export-template/README.txt @@ -24,6 +24,11 @@ The description of the set under “Set Type” in Cockatrice, such as Promo or Export Images Whether to export images and at what quality. JPG images are lower quality but smaller file sizes. PNG images can’t be uploaded to Planesculptors anymore. +Ensure Unique Image Names +Adds the set code and number to the end of image files, allowing different printings to have unique art. +This requires at least the cockatrice 3.0 update which adds the option to differentiate custom images by using the format [cardname]_[setcode]_[setnumber].[extension]. +Custom images using this option are able to work next to canon printings, as well as having multiple printings in one set for eg promos. + Tokens in Separate XML Separates the tokens into their own file. This is no longer necessary but is still supported. diff --git a/data/magic-cockatrice-v2.mse-export-template/export-template b/data/magic-cockatrice-v2.mse-export-template/export-template index a0f639ad8c..711bd76d3a 100644 --- a/data/magic-cockatrice-v2.mse-export-template/export-template +++ b/data/magic-cockatrice-v2.mse-export-template/export-template @@ -1,9 +1,9 @@ mse version: 2.5.0 short name: Cockatrice -full name: Exporter v2.2 +full name: Exporter v2.3 position hint: 100 icon: icon.png -version: 2024-09-23 +version: 2026-05-13 installer group: magic/Export/cockatrice depends on: @@ -35,6 +35,11 @@ option field: choice: JPG choice: PNG initial: no +option field: + type: boolean + name: ensure Unique Image Names + description: Adds the set code and number to the end of image files, allowing different printings to have unique art (requires cockatrice 3.0 or newer) + initial: no option field: type: boolean name: tokens In Separate XML @@ -47,8 +52,8 @@ option field: initial: no option field: type: text - name: append String To Names - description: Appended to the front of all card names and image names. + name: prepend String To Names + description: Added to the front of all card names and image names. option field: type: multiple choice name: rarities to export @@ -112,6 +117,9 @@ script: # escaped set code setcode := xml_escape(set.set_code) + # cardnumber, simply use card_number() as it needs to be unique + cardnumber := xml_escape(card_number()) + #functions for the !exportname command exporter_name_filter := filter_text@(match:"!exporte?r?name [^\n\<]+") exporter_name_grabber := replace@(match:"!exporte?r?name ", replace:"") @@ -225,7 +233,7 @@ script: write_normal := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name()))+"\" + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name()))+"\" # Set +"\n "+"\"+setcode+"\" +"\n "+"\" # Color @@ -268,7 +277,9 @@ script: # Name +"\n "+"\"+xml_escape(strip_card_name(card_name())+(if options.append_Set_Code_To_Tokens then " " + setcode else ""))+"\" # Set - +"\n "+"\"+setcode+"\" + +"\n "+"\"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -301,7 +312,7 @@ script: write_flip := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name())) + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name())) #+" // "+strip_card_name(card.name_2) +"\" # Set @@ -311,6 +322,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + ">"+setcode+"\" +"\n "+"\" # Color @@ -373,7 +385,7 @@ script: write_double := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name())) + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name())) #+" | ("+strip_card_name(card.name_2)+")" +"\" # Set @@ -383,7 +395,8 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") - + " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" + + " num=\""+cardnumber+"\"" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -426,6 +439,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+strip_card_name(card.name_2)+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color II @@ -464,7 +478,7 @@ script: write_walker := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name()))+"\" + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name()))+"\" # Set +"\n "+"\"+setcode+"\" +"\n "+"\" # Color @@ -517,7 +532,7 @@ script: write_double_walker := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name())) + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name())) #+" | ("+strip_card_name(card.name_2)+")" +"\" # Set @@ -527,7 +542,8 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") - + " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" + + " num=\""+cardnumber+"\"" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -584,6 +600,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+strip_card_name(card.name_2)+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color II @@ -632,7 +649,7 @@ script: write_sparker := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name())) + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name())) #+" | ("+strip_card_name(card.name_2)+")" +"\" # Set @@ -642,7 +659,8 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") - + " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" + + " num=\""+cardnumber+"\"" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -684,6 +702,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+strip_card_name(card.name_2)+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color II @@ -732,7 +751,7 @@ script: write_sacrificer := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name())) + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name())) #+" | ("+strip_card_name(card.name_2)+")" +"\" # Set @@ -742,7 +761,8 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") - + " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" + + " num=\""+cardnumber+"\"" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -800,6 +820,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+strip_card_name(card.name_2)+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color II @@ -833,7 +854,7 @@ script: write_leveler := { "\n "+"\" # Name - +"\n "+"\"+xml_escape(options.append_String_To_Names+strip_card_name(card_name()))+"\" + +"\n "+"\"+xml_escape(options.prepend_String_To_Names+strip_card_name(card_name()))+"\" # Set +"\n "+"\"+setcode+"\" +"\n "+"\" # Color @@ -907,9 +929,10 @@ script: else write_single_image() } format_file_name := { - options.append_String_To_Names + options.prepend_String_To_Names + input + (if is_token() and options.append_Set_Code_To_Tokens then " " + set.set_code else "") + + (if options.ensure_Unique_Image_Names then "_" + set.set_code + "_" + card_number() else "") + "." + file_type() } write_single_image := {