From 21a84e6674cc13f79d5cf77fef4ed8235fa84a4d Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Tue, 12 May 2026 23:34:34 +0200 Subject: [PATCH 1/3] rename append string to name to prepend appending means to add to the end of something, the option adds to the start instead --- .../export-template | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/data/magic-cockatrice-v2.mse-export-template/export-template b/data/magic-cockatrice-v2.mse-export-template/export-template index a0f639ad8c..b10dd5eabc 100644 --- a/data/magic-cockatrice-v2.mse-export-template/export-template +++ b/data/magic-cockatrice-v2.mse-export-template/export-template @@ -47,8 +47,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 @@ -225,7 +225,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 "+"\" # 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 @@ -373,7 +373,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 +383,7 @@ 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+"\" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -464,7 +464,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 "+"\" # 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 +527,7 @@ 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+"\" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -632,7 +632,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 +642,7 @@ 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+"\" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -732,7 +732,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 +742,7 @@ 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+"\" + + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color +"\n "+"\" @@ -833,7 +833,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 "+"\ Date: Tue, 12 May 2026 23:57:19 +0200 Subject: [PATCH 2/3] add ensure unique image name option --- .../README.txt | 5 ++++ .../export-template | 25 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) 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 b10dd5eabc..d1a9336e8e 100644 --- a/data/magic-cockatrice-v2.mse-export-template/export-template +++ b/data/magic-cockatrice-v2.mse-export-template/export-template @@ -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 @@ -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:"") @@ -233,6 +241,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 @@ -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 "+"\" @@ -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 @@ -383,6 +395,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color @@ -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 @@ -472,6 +486,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\"" + card_number() + "\"" + ">"+setcode+"\" +"\n "+"\" # Color @@ -527,6 +542,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color @@ -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 @@ -642,6 +659,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color @@ -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 @@ -742,6 +761,7 @@ script: else if contains(card.rarity,match:"mythic") then "\"mythic\"" else if contains(card.rarity,match:"rare") then "\"rare\"" else "\"\"") + + " num=\""+cardnumber+"\"" + " splitterPath=\""+"/"+options.prepend_String_To_Names+strip_card_name(card_name())+"." + file_type() + "\" >"+setcode+"\" +"\n "+"\" # Color @@ -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 @@ -841,6 +862,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 @@ -910,6 +932,7 @@ script: 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 := { From 0fa03ef0e8981970fc533a84048f91b6ae6e1352 Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Wed, 13 May 2026 00:22:00 +0200 Subject: [PATCH 3/3] update version --- data/magic-cockatrice-v2.mse-export-template/export-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/magic-cockatrice-v2.mse-export-template/export-template b/data/magic-cockatrice-v2.mse-export-template/export-template index d1a9336e8e..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: