diff --git a/data/magic-blends.mse-include/new-blends b/data/magic-blends.mse-include/new-blends index 048d613d24..3d0946a7fa 100644 --- a/data/magic-blends.mse-include/new-blends +++ b/data/magic-blends.mse-include/new-blends @@ -365,6 +365,63 @@ pt_hybrid := [ overlay: overlay_hybrid ] +#### Blend an element that only occupies a small portion of the card, like a pt box, +#### so that its color matches that of the card behind it. +cropped_linear_blend := { + uncropped_linear_blend := linear_blend + linear_blend := { + uncropped_linear_blend( + x1: (x1 - offset_x/face_width) * face_width/width, + x2: (x2 - offset_x/face_width) * face_width/width, + y1: (y1 - offset_y/face_height) * face_height/height, + y2: (y2 - offset_y/face_height) * face_height/height + ) + } + card_hybrid[shape][color_count]() +} +cropped_card_hybrid := [ + radial: [ + 0: cropped_linear_blend + 1: cropped_linear_blend + 2: cropped_linear_blend + 3: cropped_linear_blend + 4: cropped_linear_blend + 5: cropped_linear_blend + 6: cropped_linear_blend + 7: cropped_linear_blend + ] + horizontal: [ + 0: cropped_linear_blend + 1: cropped_linear_blend + 2: cropped_linear_blend + 3: cropped_linear_blend + 4: cropped_linear_blend + 5: cropped_linear_blend + 6: cropped_linear_blend + 7: cropped_linear_blend + ] + vertical: [ + 0: cropped_linear_blend + 1: cropped_linear_blend + 2: cropped_linear_blend + 3: cropped_linear_blend + 4: cropped_linear_blend + 5: cropped_linear_blend + 6: cropped_linear_blend + 7: cropped_linear_blend + ] + overlay: [ + 0: cropped_linear_blend + 1: cropped_linear_blend + 2: cropped_linear_blend + 3: cropped_linear_blend + 4: cropped_linear_blend + 5: cropped_linear_blend + 6: cropped_linear_blend + 7: cropped_linear_blend + ] +] + ######################################################################## # P/T boxes of flip cards diff --git a/data/magic-m15-altered.mse-style/style b/data/magic-m15-altered.mse-style/style index 593428b3ee..4253cf1e9f 100644 --- a/data/magic-m15-altered.mse-style/style +++ b/data/magic-m15-altered.mse-style/style @@ -503,7 +503,7 @@ init script: } crown_img := { img := crown_main() - if card.transformation != "none" then + if not transform_symbol_is_empty(card.transformation) then img := set_mask(image:img, mask:"nodes/mask.png") if is_borderless() and is_frameless() and is_miracle() then img := set_mask(image:img, mask:"frame_masks/crown_miracle_borderless.png") @@ -1373,13 +1373,13 @@ card style: script: if center_map() then 55 - else if is_map() and card.transformation != "none" + else if is_map() and not transform_symbol_is_empty(card.transformation) then 65 else if is_map() then 60 - else if card.transformation != "none" and card.card_symbol != "none" + else if card.card_symbol != "none" and not transform_symbol_is_empty(card.transformation) then 78 - else if card.transformation != "none" + else if not transform_symbol_is_empty(card.transformation) then 58 else if card.card_symbol != "none" then 50 @@ -2539,7 +2539,7 @@ extra card style: render style: image image: { season_background() } visible: { is_season() } - mask: { if card.transformation != "none" then "nodes/mask.png" else "" } + mask: { if not transform_symbol_is_empty(card.transformation) then "nodes/mask.png" else "" } mutbar: z index: 730 left: 28 @@ -2564,7 +2564,7 @@ extra card style: z index: 610 render style: image image: { node_img() } - visible: {not is_map() and not is_clear() and card.transformation != "none"} + visible: {not is_map() and not is_clear() and not transform_symbol_is_empty(card.transformation)} crown: left: 0 top: {if is_devoid() then 1 else 0} diff --git a/data/magic-m15-mainframe-battles.mse-style/style b/data/magic-m15-mainframe-battles.mse-style/style index 93db4bda61..a040d59ccb 100644 --- a/data/magic-m15-mainframe-battles.mse-style/style +++ b/data/magic-m15-mainframe-battles.mse-style/style @@ -126,10 +126,10 @@ init script: is_spillover := { styling.image_style == "spillover" } has_left_symbol := { - styling.transform_symbol_side == "left" and card.transformation != "none" + styling.transform_symbol_side == "left" and not transform_symbol_is_empty(card.transformation) } has_right_symbol := { - styling.transform_symbol_side == "right" and card.transformation != "none" + styling.transform_symbol_side == "right" and not transform_symbol_is_empty(card.transformation) } transform_symbol_offset_left_1 := { if styling.transform_symbol_side == "right" then 401 @@ -333,7 +333,7 @@ card style: name: left: { if has_left_symbol() then 97 else 67 } top: { 21 + name_font_vertical()} - width: { 410 - max(15,card_style.casting_cost.content_width) - (if card.transformation != "none" then 35 else 0) } + width: { 410 - max(15,card_style.casting_cost.content_width) - (if not transform_symbol_is_empty(card.transformation) then 35 else 0) } height: 22 alignment: bottom shrink-overflow padding bottom: -2 @@ -607,7 +607,7 @@ extra card style: z index: 210 render style: image image: { namebar_background() } - mask: { if card.transformation == "none" then "" else template_prefix["namebar"] + styling.transform_symbol_side + "_symbol.png" } + mask: { if transform_symbol_is_empty(card.transformation) then "" else template_prefix["namebar"] + styling.transform_symbol_side + "_symbol.png" } notch: left: 0 top: 0 diff --git a/data/magic-m15-showcase-avatar-elemental.mse-style/style b/data/magic-m15-showcase-avatar-elemental.mse-style/style index 603f9f8a7b..7b61e51d6c 100644 --- a/data/magic-m15-showcase-avatar-elemental.mse-style/style +++ b/data/magic-m15-showcase-avatar-elemental.mse-style/style @@ -1,4 +1,4 @@ -mse version: 2.5.6 +mse version: 2.6.0 game: magic short name: Elemental full name: Avatar Showcase @@ -64,7 +64,21 @@ init script: italic: {""} ] - transform_symbol_disabled_1 := { true } + transform_symbol_offset_left_1 := { 5 } + transform_symbol_offset_top_1 := { 1 } + + transform_symbol_image_folder := { "/magic-m15-showcase-avatar-elemental.mse-style/transform/" } + transform_symbol_default_background := { "colored" } + transform_symbol_default_rim := { "none" } + transform_symbol_default_icon := { "colored" } + transform_symbol_default_rim_bevel := { true } + transform_symbol_default_icon_bevel := { true } + + card_symbol_offset_left_1 := { 4 } + card_symbol_offset_top_1 := { 2 } + + name_transform_symbol_offset_left_1 := { -12 } + casting_cost_transform_symbol_offset_left_1 := { 5 } casting_cost_offset_top_1 := { 1 } casting_cost_offset_left_1 := { 1 } swap_fonts_name_default := diff --git a/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/modal back.png b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/modal back.png new file mode 100644 index 0000000000..b372adeae8 Binary files /dev/null and b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/modal back.png differ diff --git a/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/modal front.png b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/modal front.png new file mode 100644 index 0000000000..4cc2a6fdd2 Binary files /dev/null and b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/modal front.png differ diff --git a/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/normal.png b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/normal.png new file mode 100644 index 0000000000..c6c502b90c Binary files /dev/null and b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/background/colored/normal.png differ diff --git a/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/modal back.png b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/modal back.png new file mode 100644 index 0000000000..8a8502f76b Binary files /dev/null and b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/modal back.png differ diff --git a/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/modal front.png b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/modal front.png new file mode 100644 index 0000000000..8a8502f76b Binary files /dev/null and b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/modal front.png differ diff --git a/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/normal.png b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/normal.png new file mode 100644 index 0000000000..8a8502f76b Binary files /dev/null and b/data/magic-m15-showcase-avatar-elemental.mse-style/transform/icon/texture/normal.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/style b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/style index 5e20d9cdd7..0390629ce9 100644 --- a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/style +++ b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/style @@ -1,4 +1,4 @@ -mse version: 2.1.2 +mse version: 2.6.0 game: magic short name: Woodland full name: Bloomburrow Showcase @@ -60,7 +60,16 @@ init script: italic: {""} ] - transform_symbol_disabled_1 := { true } + transform_symbol_offset_left_1 := { 6 } + transform_symbol_offset_top_1 := { -1 } + transform_symbol_image_folder := { "/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/" } + transform_symbol_modal_uses_normal_background := { true } + transform_symbol_default_background := { "colored" } + transform_symbol_default_rim := { "none" } + transform_symbol_default_icon := { "colored" } + + name_transform_symbol_offset_left_1 := { -4 } + swap_fonts_name_default := [ name: {"Beleren Bold"}, diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/a.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/a.png new file mode 100644 index 0000000000..c3596022db Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/a.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/b.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/b.png new file mode 100644 index 0000000000..c27ea66336 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/b.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/c.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/c.png new file mode 100644 index 0000000000..2bf143e381 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/c.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/g.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/g.png new file mode 100644 index 0000000000..f5ef98d63f Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/g.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/m.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/m.png new file mode 100644 index 0000000000..550fc5514e Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/m.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/r.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/r.png new file mode 100644 index 0000000000..7718eed3c7 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/r.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/u.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/u.png new file mode 100644 index 0000000000..a822393248 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/u.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/w.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/w.png new file mode 100644 index 0000000000..558e17ea7a Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/background/colored/normal/w.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/a.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/a.png new file mode 100644 index 0000000000..60885d2785 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/a.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/b.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/b.png new file mode 100644 index 0000000000..deccb62382 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/b.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/c.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/c.png new file mode 100644 index 0000000000..f311954e98 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/c.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/g.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/g.png new file mode 100644 index 0000000000..1d3d5fc2ad Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/g.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/m.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/m.png new file mode 100644 index 0000000000..721b4fb9b2 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/m.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/r.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/r.png new file mode 100644 index 0000000000..26963c175d Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/r.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/u.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/u.png new file mode 100644 index 0000000000..931e458221 Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/u.png differ diff --git a/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/w.png b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/w.png new file mode 100644 index 0000000000..e529d241ad Binary files /dev/null and b/data/magic-m15-showcase-bloomburrow-woodland.mse-style/transform/icon/texture/normal/w.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/acard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/acard.png index d2e9063542..048eb31760 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/acard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/acard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/bcard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/bcard.png index 12c5449fc5..4253bd6589 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/bcard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/bcard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ccard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ccard.png index 51db845ea3..410b2601c6 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ccard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ccard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/gcard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/gcard.png index 4366c5f106..7961327fa8 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/gcard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/gcard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/mcard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/mcard.png index 77a84b6f3c..0da47d8efa 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/mcard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/mcard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/rcard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/rcard.png index 1484b3eb74..b5c00b8583 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/rcard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/rcard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ucard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ucard.png index eddf5d4b57..36fe7e9f78 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ucard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/ucard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/wcard.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/wcard.png index ce6ef7a3fb..cd97258a38 100644 Binary files a/data/magic-m15-showcase-ixalan-caverns.mse-style/card/wcard.png and b/data/magic-m15-showcase-ixalan-caverns.mse-style/card/wcard.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/style b/data/magic-m15-showcase-ixalan-caverns.mse-style/style index 0eb848366f..03af592d5c 100644 --- a/data/magic-m15-showcase-ixalan-caverns.mse-style/style +++ b/data/magic-m15-showcase-ixalan-caverns.mse-style/style @@ -1,4 +1,4 @@ -mse version: 2.1.2 +mse version: 2.6.0 game: magic short name: Caverns full name: Ixalan Showcase @@ -64,9 +64,24 @@ init script: italic: {""} ] - transform_symbol_disabled_1 := { true } + transform_symbol_offset_left_1 := { if transform_symbol_is_mirrored() then 2 else 4 } + transform_symbol_offset_top_1 := { 0 } + + transform_symbol_image_folder := { "/magic-m15-showcase-ixalan-caverns.mse-style/transform/" } + transform_symbol_default_background := { "colored" } + transform_symbol_default_rim := { "none" } + transform_symbol_default_icon := { "colored" } + transform_symbol_default_rim_bevel := { true } + transform_symbol_default_icon_bevel := { true } + transform_symbol_default_icon_shadow := { true } + transform_symbol_icon_offset_left := { if transform_symbol_is_mirrored() then -1 else 0 } + transform_symbol_icon_offset_width := { if chosen(card.transformation, choice: "front triangle") or chosen(card.transformation, choice: "back triangle") then 14 else 4 } + transform_symbol_icon_offset_height := { if chosen(card.transformation, choice: "front triangle") or chosen(card.transformation, choice: "back triangle") then 14 else 4 } + transform_symbol_modal_uses_normal_background := { true } + nameline_offset_width_1 := { 2 } nameline_offset_left_1 := { -1 } + casting_cost_offset_top_1 := { 1 } swap_fonts_name_default := [ name: {"Beleren Bold"}, @@ -106,7 +121,6 @@ init script: is_promo := { styling.promo } is_unsorted := { styling.remove_from_autocount } - is_crowned := { styling.legend_crown == "yes" or (styling.legend_crown == "if legendary" and lang_setting("is_legendary")(card.super_type)) } diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/transform/background/colored/normal.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/transform/background/colored/normal.png new file mode 100644 index 0000000000..5bdf3add57 Binary files /dev/null and b/data/magic-m15-showcase-ixalan-caverns.mse-style/transform/background/colored/normal.png differ diff --git a/data/magic-m15-showcase-ixalan-caverns.mse-style/transform/icon/texture/normal.png b/data/magic-m15-showcase-ixalan-caverns.mse-style/transform/icon/texture/normal.png new file mode 100644 index 0000000000..c2e4e4925e Binary files /dev/null and b/data/magic-m15-showcase-ixalan-caverns.mse-style/transform/icon/texture/normal.png differ diff --git a/data/magic-mainframe-extras.mse-include/examples/symbol/shape/weather.png b/data/magic-mainframe-extras.mse-include/examples/symbol/shape/weather.png new file mode 100644 index 0000000000..39f96a4e74 Binary files /dev/null and b/data/magic-mainframe-extras.mse-include/examples/symbol/shape/weather.png differ diff --git a/data/magic-mainframe-extras.mse-include/examples/symbol/weather.png b/data/magic-mainframe-extras.mse-include/examples/symbol/weather.png new file mode 100644 index 0000000000..d206215fec Binary files /dev/null and b/data/magic-mainframe-extras.mse-include/examples/symbol/weather.png differ diff --git a/data/magic-modules.mse-include/card-symbols/readme.txt b/data/magic-modules.mse-include/card-symbols/readme.txt index 6985afb7a2..5917be8d33 100644 --- a/data/magic-modules.mse-include/card-symbols/readme.txt +++ b/data/magic-modules.mse-include/card-symbols/readme.txt @@ -1,4 +1,5 @@ -#### Consider using the Namelines module instead of this one +#### Consider using the Namelines module instead of this one. +#### It encompasses transformation symbols, card symbols, names and casting costs, all at once. #### To use this include in a template, add the following in the template headers: depends on: @@ -11,12 +12,16 @@ include file: /magic-modules.mse-include/card-symbols/card_fields include file: /magic-modules.mse-include/card-symbols/card_fields_dfc include file: /magic-modules.mse-include/card-symbols/card_fields_tfc -#### Default Field Placement (@375x523, w=1 h=1) +#### Default Field Placement +#### For 375x523 templates, w = h = 1 +#### For 750x1046 templates, w = h = 2 +#### etc... card symbol: left: (8, +18 if used, +28 with transform symbol)w top: 21h width: 23w height: 21h + #### Customization #### Optionally, you can adjust global alignment by defining the following functions in the init script, #### which must return an int corresponding to the number of pixels you want to shift things by: @@ -40,6 +45,7 @@ card_symbol_offset_top_3 := { 0 } card_symbol_offset_left_3 := { 0 } card_symbol_offset_width_3 := { 0 } card_symbol_offset_height_3 := { 0 } +etc... #### You can disable the symbols on some of the faces, #### by adding the following functions in the init script: diff --git a/data/magic-modules.mse-include/casting-costs/readme.txt b/data/magic-modules.mse-include/casting-costs/readme.txt index 1b36b92f79..cbac8d5127 100644 --- a/data/magic-modules.mse-include/casting-costs/readme.txt +++ b/data/magic-modules.mse-include/casting-costs/readme.txt @@ -1,4 +1,5 @@ #### Consider using the Namelines module instead of this one. +#### It encompasses transformation symbols, card symbols, names and casting costs, all at once. #### To use this include in a template, add the following in the template headers: depends on: @@ -16,12 +17,16 @@ include file: /magic-modules.mse-include/casting-costs/card_fields_tfc #### This adds a package option to select an alternate mana font for the casting cost. include file: /magic-modules.mse-include/casting-costs/styling_fields -#### Default Field Placement (@375x523, w=1 h=1) +#### Default Field Placement +#### For 375x523 templates, w = h = 1 +#### For 750x1046 templates, w = h = 2 +#### etc... casting cost: right: 346w top: 27h width: min(30w, content) + 5w height: 21h + #### Customization #### Optionally, you can define which face of the card the casting cost should snap to, #### by defining the following function in the init script: @@ -40,6 +45,10 @@ casting_cost_offset_left_1 := { 0 } casting_cost_offset_width_1 := { 0 } casting_cost_offset_height_1 := { 0 } +#### When there is a transformation symbol on the right of the card, +#### the casting cost needs to shift. To adjust by how much: +casting_cost_transform_symbol_offset_left_1 := { 0 } + #### For DFC or TFC templates, use: casting_cost_offset_top_2 := { 0 } casting_cost_offset_left_2 := { 0 } @@ -48,4 +57,5 @@ casting_cost_offset_height_2 := { 0 } casting_cost_offset_top_3 := { 0 } casting_cost_offset_left_3 := { 0 } casting_cost_offset_width_3 := { 0 } -casting_cost_offset_height_3 := { 0 } \ No newline at end of file +casting_cost_offset_height_3 := { 0 } +etc... diff --git a/data/magic-modules.mse-include/namelines/readme.txt b/data/magic-modules.mse-include/namelines/readme.txt index a896fd8907..871165e7cb 100644 --- a/data/magic-modules.mse-include/namelines/readme.txt +++ b/data/magic-modules.mse-include/namelines/readme.txt @@ -10,15 +10,6 @@ include file: /magic-modules.mse-include/namelines/card_fields_dfc include file: /magic-modules.mse-include/namelines/card_fields_tfc #### Customization -#### The transform symbols default to "none", defaults can be changed with -transform_symbol_default := -{ - stylesheet ## reload script when template changes - if margin_code == "transform1" then "front triangle" - else if margin_code == "transform2" then "back triangle" - else "eldrazi" -} - #### Optionally, you can define which face of the card the nameline should snap to, #### by defining the following function in the init script: nameline_face_1 := { 1 } @@ -50,7 +41,6 @@ casting_cost_offset_width_1 := { 0 } casting_cost_offset_height_1 := { 0 } transform_symbol_disabled_1 := { true } -transform_symbol_mirrored_1 := { true } transform_symbol_offset_top_1 := { 0 } transform_symbol_offset_left_1 := { 0 } transform_symbol_offset_width_1 := { 0 } @@ -61,6 +51,9 @@ transform_symbol_offset_height_1 := { 0 } name_card_symbol_offset_left_1 := { 0 } name_transform_symbol_offset_left_1 := { 0 } +#### For more in depth documentation about the transformation symbol, see this file: +/magic-modules.mse-include/symbols/readme.txt + #### For DFC or TFC templates, use: nameline_offset_top_2 := { 0 } nameline_offset_left_2 := { 0 } @@ -71,4 +64,3 @@ nameline_offset_left_3 := { 0 } nameline_offset_width_3 := { 0 } nameline_offset_height_3 := { 0 } etc... - diff --git a/data/magic-modules.mse-include/names/readme.txt b/data/magic-modules.mse-include/names/readme.txt index 82c4af65be..a855064790 100644 --- a/data/magic-modules.mse-include/names/readme.txt +++ b/data/magic-modules.mse-include/names/readme.txt @@ -1,4 +1,5 @@ -#### Consider using the Namelines module instead of this one +#### Consider using the Namelines module instead of this one. +#### It encompasses transformation symbols, card symbols, names and casting costs, all at once. #### To use this include in a template, add the following in the template headers: depends on: @@ -11,12 +12,16 @@ include file: /magic-modules.mse-include/names/card_fields include file: /magic-modules.mse-include/names/card_fields_dfc include file: /magic-modules.mse-include/names/card_fields_tfc -#### Default Field Placement (@375x523, w=1 h=1) +#### Default Field Placement +#### For 375x523 templates, w = h = 1 +#### For 750x1046 templates, w = h = 2 +#### etc... name: left: 32w + symbols_width top: 27h right: 341w - casting_cost height: 26h + #### Customization #### Optionally, you can define which face of the card the name should snap to, #### by defining the following function in the init script: @@ -37,10 +42,17 @@ name_offset_right_1 := { 0 } #### To increase/decrease the height of the name: name_offset_height_1 := { 0 } +#### When there is a transformation symbol on the left of the card, +#### the name needs to shift. To adjust by how much: +name_transform_symbol_offset_left_1 := { 0 } + #### For DFC or TFC templates, use: name_offset_top_2 := { 0 } name_offset_left_2 := { 0 } -name_offset_size_2 := { 0 } +name_offset_right_2 := { 0 } +name_offset_height_2 := { 0 } name_offset_top_3 := { 0 } name_offset_left_3 := { 0 } -name_offset_size_3 := { 0 } \ No newline at end of file +name_offset_right_3 := { 0 } +name_offset_height_3 := { 0 } +etc... diff --git a/data/magic-modules.mse-include/symbols/aetherprint.png b/data/magic-modules.mse-include/symbols/aetherprint.png deleted file mode 100644 index 1a3e3fe174..0000000000 Binary files a/data/magic-modules.mse-include/symbols/aetherprint.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/artifact.png b/data/magic-modules.mse-include/symbols/artifact.png deleted file mode 100644 index fafb152070..0000000000 Binary files a/data/magic-modules.mse-include/symbols/artifact.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/back triangle.png b/data/magic-modules.mse-include/symbols/back triangle.png deleted file mode 100644 index 5d7f1ec7a4..0000000000 Binary files a/data/magic-modules.mse-include/symbols/back triangle.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/background/black/modal back.png b/data/magic-modules.mse-include/symbols/background/black/modal back.png new file mode 100644 index 0000000000..3b007d5b19 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/black/modal back.png differ diff --git a/data/magic-modules.mse-include/symbols/background/black/modal front.png b/data/magic-modules.mse-include/symbols/background/black/modal front.png new file mode 100644 index 0000000000..2e5d30175b Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/black/modal front.png differ diff --git a/data/magic-modules.mse-include/symbols/background/black/normal.png b/data/magic-modules.mse-include/symbols/background/black/normal.png new file mode 100644 index 0000000000..80fac66976 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/black/normal.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/a.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/a.png new file mode 100644 index 0000000000..25d11d8c96 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/a.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/b.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/b.png new file mode 100644 index 0000000000..82b72a1f05 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/b.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/c.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/c.png new file mode 100644 index 0000000000..b63a228af9 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/c.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/g.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/g.png new file mode 100644 index 0000000000..611239a770 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/g.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/m.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/m.png new file mode 100644 index 0000000000..4d1e96014a Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/m.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/r.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/r.png new file mode 100644 index 0000000000..e8833b098a Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/r.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/u.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/u.png new file mode 100644 index 0000000000..dbf5f25508 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/u.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal back/w.png b/data/magic-modules.mse-include/symbols/background/colored/modal back/w.png new file mode 100644 index 0000000000..0f3e1953ba Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal back/w.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/a.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/a.png new file mode 100644 index 0000000000..e0ef307fe1 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/a.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/b.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/b.png new file mode 100644 index 0000000000..26a5701305 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/b.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/c.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/c.png new file mode 100644 index 0000000000..a696898fb1 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/c.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/g.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/g.png new file mode 100644 index 0000000000..ddb279c05b Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/g.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/m.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/m.png new file mode 100644 index 0000000000..2e95a7ffa2 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/m.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/r.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/r.png new file mode 100644 index 0000000000..a54f4603c1 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/r.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/u.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/u.png new file mode 100644 index 0000000000..063d09edb5 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/u.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/modal front/w.png b/data/magic-modules.mse-include/symbols/background/colored/modal front/w.png new file mode 100644 index 0000000000..e91d5ca5b2 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/modal front/w.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/a.png b/data/magic-modules.mse-include/symbols/background/colored/normal/a.png new file mode 100644 index 0000000000..ec7420cfa5 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/a.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/b.png b/data/magic-modules.mse-include/symbols/background/colored/normal/b.png new file mode 100644 index 0000000000..f4d54d4b42 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/b.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/c.png b/data/magic-modules.mse-include/symbols/background/colored/normal/c.png new file mode 100644 index 0000000000..e2129755ac Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/c.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/g.png b/data/magic-modules.mse-include/symbols/background/colored/normal/g.png new file mode 100644 index 0000000000..8e70a8a06f Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/g.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/m.png b/data/magic-modules.mse-include/symbols/background/colored/normal/m.png new file mode 100644 index 0000000000..cffc2377f3 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/m.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/r.png b/data/magic-modules.mse-include/symbols/background/colored/normal/r.png new file mode 100644 index 0000000000..fc1eb9ada0 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/r.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/u.png b/data/magic-modules.mse-include/symbols/background/colored/normal/u.png new file mode 100644 index 0000000000..94723c5aaf Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/u.png differ diff --git a/data/magic-modules.mse-include/symbols/background/colored/normal/w.png b/data/magic-modules.mse-include/symbols/background/colored/normal/w.png new file mode 100644 index 0000000000..110f796d74 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/colored/normal/w.png differ diff --git a/data/magic-modules.mse-include/symbols/background/white/modal back.png b/data/magic-modules.mse-include/symbols/background/white/modal back.png new file mode 100644 index 0000000000..da81973b2d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/white/modal back.png differ diff --git a/data/magic-modules.mse-include/symbols/background/white/modal front.png b/data/magic-modules.mse-include/symbols/background/white/modal front.png new file mode 100644 index 0000000000..093a52ab54 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/white/modal front.png differ diff --git a/data/magic-modules.mse-include/symbols/background/white/normal.png b/data/magic-modules.mse-include/symbols/background/white/normal.png new file mode 100644 index 0000000000..57afc0369a Binary files /dev/null and b/data/magic-modules.mse-include/symbols/background/white/normal.png differ diff --git a/data/magic-modules.mse-include/symbols/battle.png b/data/magic-modules.mse-include/symbols/battle.png deleted file mode 100644 index 86c512f01e..0000000000 Binary files a/data/magic-modules.mse-include/symbols/battle.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/blank.png b/data/magic-modules.mse-include/symbols/blank.png index 00196a00b7..e5fba861c8 100644 Binary files a/data/magic-modules.mse-include/symbols/blank.png and b/data/magic-modules.mse-include/symbols/blank.png differ diff --git a/data/magic-modules.mse-include/symbols/card_fields b/data/magic-modules.mse-include/symbols/card_fields index e64d09d623..dba342ec36 100644 --- a/data/magic-modules.mse-include/symbols/card_fields +++ b/data/magic-modules.mse-include/symbols/card_fields @@ -5,7 +5,7 @@ card style: width: { transform_symbol_width_1() + nameline_offset_height_1() } height: { if transform_symbol_disabled_1() then 0 else transform_symbol_height_1() + nameline_offset_height_1() } visible: { not transform_symbol_disabled_1() } - popup style: in place + popup style: menu include file: /magic.mse-game/symbols/menu_choice_images render style: image image: { transform_symbol_image(face: 1) } diff --git a/data/magic-modules.mse-include/symbols/card_fields_dfc b/data/magic-modules.mse-include/symbols/card_fields_dfc index 6c0ba5f32c..8b2d6e6b54 100644 --- a/data/magic-modules.mse-include/symbols/card_fields_dfc +++ b/data/magic-modules.mse-include/symbols/card_fields_dfc @@ -6,7 +6,7 @@ card style: width: { transform_symbol_width_2() + nameline_offset_height_2() } height: { if transform_symbol_disabled_2() then 0 else transform_symbol_height_2() + nameline_offset_height_2() } visible: { not transform_symbol_disabled_2() } - popup style: in place + popup style: menu include file: /magic.mse-game/symbols/menu_choice_images render style: image image: { transform_symbol_image(face: 2) } diff --git a/data/magic-modules.mse-include/symbols/card_fields_tfc b/data/magic-modules.mse-include/symbols/card_fields_tfc index a583e1f719..0fa0fc4ff4 100644 --- a/data/magic-modules.mse-include/symbols/card_fields_tfc +++ b/data/magic-modules.mse-include/symbols/card_fields_tfc @@ -6,7 +6,7 @@ card style: width: { transform_symbol_width_3() + nameline_offset_height_3() } height: { if transform_symbol_disabled_3() then 0 else transform_symbol_height_3() + nameline_offset_height_3() } visible: { not transform_symbol_disabled_3() } - popup style: in place + popup style: menu include file: /magic.mse-game/symbols/menu_choice_images render style: image image: { transform_symbol_image(face: 3) } diff --git a/data/magic-modules.mse-include/symbols/choices b/data/magic-modules.mse-include/symbols/choices index ec64d916a8..229a4c7744 100644 --- a/data/magic-modules.mse-include/symbols/choices +++ b/data/magic-modules.mse-include/symbols/choices @@ -1,87 +1,204 @@ -choice: front triangle -choice: day -choice: moon -choice: closed fan -choice: meld -choice: sparker -choice: - name: sparker (colored) - choice: default - choice: white - choice: blue - choice: black - choice: red - choice: green - choice: multicolor - choice: colorless - choice: artifact +choice: + name: position + choice: + name: default + line below: true + choice: + name: left + type: radio + choice: + name: right + type: radio +choice: + name: background + choice: + name: default + line below: true + choice: + name: colored + type: radio + choice: + name: black + type: radio + choice: + name: white + type: radio + choice: + name: none + type: radio +choice: + name: rim + choice: + name: default + line below: true + choice: + name: colored + type: radio + choice: + name: black + type: radio + choice: + name: white + type: radio + choice: + name: none + type: radio + line below: true + choice: shadow + choice: bevel +choice: + name: icon + choice: + name: default + line below: true + choice: + name: colored + type: radio + choice: + name: black + type: radio + choice: + name: white + type: radio + line below: true + choice: shadow + choice: bevel + choice: mirror + line below: true +choice: + name: front triangle + type: radio +choice: + name: day + type: radio +choice: + name: moon + type: radio +choice: + name: closed fan + type: radio +choice: + name: meld + type: radio +choice: + name: sparker + type: radio line below: true - -choice: back triangle -choice: night -choice: eldrazi -choice: compass -choice: open fan -choice: specialized +choice: + name: back triangle + type: radio +choice: + name: night + type: radio +choice: + name: eldrazi + type: radio +choice: + name: compass + type: radio +choice: + name: open fan + type: radio +choice: + name: specialized + type: radio choice: name: aetherprint + type: radio line below: true -choice: none -choice: lesson +choice: + name: none + type: radio +choice: + name: lesson + type: radio choice: name: custom symbol - choice: one - choice: two - choice: three - choice: four + type: radio + choice: + name: one + type: radio + choice: + name: two + type: radio + choice: + name: three + type: radio + choice: + name: four + type: radio + line below: true choice: name: extra - choice: comedy - choice: tragedy + type: radio + choice: + name: comedy + type: radio + choice: + name: tragedy + type: radio line below: true choice: name: modal front - choice: default - choice: white - choice: blue - choice: black - choice: red - choice: green - choice: multicolor - choice: colorless - choice: artifact + type: radio choice: name: modal back + type: radio line below: true - choice: default - choice: white - choice: blue - choice: black - choice: red - choice: green - choice: multicolor - choice: colorless - choice: artifact - -choice: multitype -choice: artifact -choice: battle -choice: creature -choice: enchantment -choice: fortress -choice: instant -choice: land -choice: planeswalker -choice: sorcery +choice: + name: multitype + type: radio +choice: + name: artifact + type: radio +choice: + name: battle + type: radio +choice: + name: creature + type: radio +choice: + name: enchantment + type: radio +choice: + name: fortress + type: radio +choice: + name: instant + type: radio +choice: + name: land + type: radio +choice: + name: planeswalker + type: radio +choice: + name: sorcery + type: radio choice: name: non standard - line below: true - choice: conspiracy - choice: dungeon - choice: emblem - choice: hero - choice: phenomenon - choice: plane - choice: scheme - choice: vanguard - line below: true \ No newline at end of file + type: radio + choice: + name: conspiracy + type: radio + choice: + name: dungeon + type: radio + choice: + name: emblem + type: radio + choice: + name: hero + type: radio + choice: + name: phenomenon + type: radio + choice: + name: plane + type: radio + choice: + name: scheme + type: radio + choice: + name: vanguard + type: radio \ No newline at end of file diff --git a/data/magic-modules.mse-include/symbols/closed fan.png b/data/magic-modules.mse-include/symbols/closed fan.png deleted file mode 100644 index 2093de2f7f..0000000000 Binary files a/data/magic-modules.mse-include/symbols/closed fan.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/comedy.png b/data/magic-modules.mse-include/symbols/comedy.png deleted file mode 100644 index 2403be6b55..0000000000 Binary files a/data/magic-modules.mse-include/symbols/comedy.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/compass.png b/data/magic-modules.mse-include/symbols/compass.png deleted file mode 100644 index ca542d135b..0000000000 Binary files a/data/magic-modules.mse-include/symbols/compass.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/conspiracy.png b/data/magic-modules.mse-include/symbols/conspiracy.png deleted file mode 100644 index c8d0116cc2..0000000000 Binary files a/data/magic-modules.mse-include/symbols/conspiracy.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/creature.png b/data/magic-modules.mse-include/symbols/creature.png deleted file mode 100644 index 450c63ff36..0000000000 Binary files a/data/magic-modules.mse-include/symbols/creature.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/day.png b/data/magic-modules.mse-include/symbols/day.png deleted file mode 100644 index 77aabbe684..0000000000 Binary files a/data/magic-modules.mse-include/symbols/day.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/dungeon.png b/data/magic-modules.mse-include/symbols/dungeon.png deleted file mode 100644 index 2a5ec83d89..0000000000 Binary files a/data/magic-modules.mse-include/symbols/dungeon.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/eldrazi.png b/data/magic-modules.mse-include/symbols/eldrazi.png deleted file mode 100644 index f8c21ac921..0000000000 Binary files a/data/magic-modules.mse-include/symbols/eldrazi.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/enchantment.png b/data/magic-modules.mse-include/symbols/enchantment.png deleted file mode 100644 index a4ce997b09..0000000000 Binary files a/data/magic-modules.mse-include/symbols/enchantment.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/front triangle.png b/data/magic-modules.mse-include/symbols/front triangle.png deleted file mode 100644 index 7a6ea64046..0000000000 Binary files a/data/magic-modules.mse-include/symbols/front triangle.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/hero.png b/data/magic-modules.mse-include/symbols/hero.png deleted file mode 100644 index d9a4353dc9..0000000000 Binary files a/data/magic-modules.mse-include/symbols/hero.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/aetherprint.png b/data/magic-modules.mse-include/symbols/icon/shape/aetherprint.png new file mode 100644 index 0000000000..ad16af786a Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/aetherprint.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/artifact.png b/data/magic-modules.mse-include/symbols/icon/shape/artifact.png new file mode 100644 index 0000000000..2f2a897344 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/artifact.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/back triangle.png b/data/magic-modules.mse-include/symbols/icon/shape/back triangle.png new file mode 100644 index 0000000000..39eb270aab Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/back triangle.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/battle.png b/data/magic-modules.mse-include/symbols/icon/shape/battle.png new file mode 100644 index 0000000000..2e54c6a2ab Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/battle.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/closed fan.png b/data/magic-modules.mse-include/symbols/icon/shape/closed fan.png new file mode 100644 index 0000000000..6bf8e48ab4 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/closed fan.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/comedy.png b/data/magic-modules.mse-include/symbols/icon/shape/comedy.png new file mode 100644 index 0000000000..391382469c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/comedy.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/compass.png b/data/magic-modules.mse-include/symbols/icon/shape/compass.png new file mode 100644 index 0000000000..890f790c9b Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/compass.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/conspiracy.png b/data/magic-modules.mse-include/symbols/icon/shape/conspiracy.png new file mode 100644 index 0000000000..f71e14dcdc Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/conspiracy.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/creature.png b/data/magic-modules.mse-include/symbols/icon/shape/creature.png new file mode 100644 index 0000000000..6619180314 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/creature.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/day.png b/data/magic-modules.mse-include/symbols/icon/shape/day.png new file mode 100644 index 0000000000..1f0663f37d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/day.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/dungeon.png b/data/magic-modules.mse-include/symbols/icon/shape/dungeon.png new file mode 100644 index 0000000000..0d25f8d4ea Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/dungeon.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/eldrazi.png b/data/magic-modules.mse-include/symbols/icon/shape/eldrazi.png new file mode 100644 index 0000000000..f3d1216966 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/eldrazi.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/emblem.png b/data/magic-modules.mse-include/symbols/icon/shape/emblem.png new file mode 100644 index 0000000000..e5b9506c97 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/emblem.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/enchantment.png b/data/magic-modules.mse-include/symbols/icon/shape/enchantment.png new file mode 100644 index 0000000000..98ce406ea2 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/enchantment.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/fortress.png b/data/magic-modules.mse-include/symbols/icon/shape/fortress.png new file mode 100644 index 0000000000..3241715cc5 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/fortress.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/front triangle.png b/data/magic-modules.mse-include/symbols/icon/shape/front triangle.png new file mode 100644 index 0000000000..0966d7c4a1 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/front triangle.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/hero.png b/data/magic-modules.mse-include/symbols/icon/shape/hero.png new file mode 100644 index 0000000000..187b3420ec Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/hero.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/instant.png b/data/magic-modules.mse-include/symbols/icon/shape/instant.png new file mode 100644 index 0000000000..847b0eb239 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/instant.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/land.png b/data/magic-modules.mse-include/symbols/icon/shape/land.png new file mode 100644 index 0000000000..64e38c9233 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/land.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/lesson.png b/data/magic-modules.mse-include/symbols/icon/shape/lesson.png new file mode 100644 index 0000000000..9fa7cd30f6 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/lesson.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/meld.png b/data/magic-modules.mse-include/symbols/icon/shape/meld.png new file mode 100644 index 0000000000..2d12417bae Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/meld.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/modal back centered.png b/data/magic-modules.mse-include/symbols/icon/shape/modal back centered.png new file mode 100644 index 0000000000..b8367e2612 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/modal back centered.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/modal back.png b/data/magic-modules.mse-include/symbols/icon/shape/modal back.png new file mode 100644 index 0000000000..8dc445bdac Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/modal back.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/modal front centered.png b/data/magic-modules.mse-include/symbols/icon/shape/modal front centered.png new file mode 100644 index 0000000000..60f70aa210 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/modal front centered.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/modal front.png b/data/magic-modules.mse-include/symbols/icon/shape/modal front.png new file mode 100644 index 0000000000..e0876ef6cc Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/modal front.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/moon.png b/data/magic-modules.mse-include/symbols/icon/shape/moon.png new file mode 100644 index 0000000000..e0178cd53f Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/moon.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/multitype.png b/data/magic-modules.mse-include/symbols/icon/shape/multitype.png new file mode 100644 index 0000000000..c6f5558846 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/multitype.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/night.png b/data/magic-modules.mse-include/symbols/icon/shape/night.png new file mode 100644 index 0000000000..5bb6927120 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/night.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/open fan.png b/data/magic-modules.mse-include/symbols/icon/shape/open fan.png new file mode 100644 index 0000000000..349cb285a2 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/open fan.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/phenomenon.png b/data/magic-modules.mse-include/symbols/icon/shape/phenomenon.png new file mode 100644 index 0000000000..d5a39feeef Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/phenomenon.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/plane.png b/data/magic-modules.mse-include/symbols/icon/shape/plane.png new file mode 100644 index 0000000000..e5bc01cdff Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/plane.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/planeswalker.png b/data/magic-modules.mse-include/symbols/icon/shape/planeswalker.png new file mode 100644 index 0000000000..3707131bc2 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/planeswalker.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/scheme.png b/data/magic-modules.mse-include/symbols/icon/shape/scheme.png new file mode 100644 index 0000000000..82997cb23e Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/scheme.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/sorcery.png b/data/magic-modules.mse-include/symbols/icon/shape/sorcery.png new file mode 100644 index 0000000000..ac10b61117 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/sorcery.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/sparker.png b/data/magic-modules.mse-include/symbols/icon/shape/sparker.png new file mode 100644 index 0000000000..4810633642 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/sparker.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/specialized.png b/data/magic-modules.mse-include/symbols/icon/shape/specialized.png new file mode 100644 index 0000000000..c06731168b Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/specialized.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/tragedy.png b/data/magic-modules.mse-include/symbols/icon/shape/tragedy.png new file mode 100644 index 0000000000..c49b5356b3 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/tragedy.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/shape/vanguard.png b/data/magic-modules.mse-include/symbols/icon/shape/vanguard.png new file mode 100644 index 0000000000..965ba6dd40 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/shape/vanguard.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/a.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/a.png new file mode 100644 index 0000000000..c949ed694c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/a.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/b.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/b.png new file mode 100644 index 0000000000..e8fef88ddd Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/b.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/c.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/c.png new file mode 100644 index 0000000000..7f9235a10f Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/c.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/g.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/g.png new file mode 100644 index 0000000000..95053da26d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/g.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/m.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/m.png new file mode 100644 index 0000000000..f9e626221d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/m.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/r.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/r.png new file mode 100644 index 0000000000..7ac9db2207 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/r.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/u.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/u.png new file mode 100644 index 0000000000..5aca86c55c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/u.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal back/w.png b/data/magic-modules.mse-include/symbols/icon/texture/modal back/w.png new file mode 100644 index 0000000000..bfe914a37d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal back/w.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/a.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/a.png new file mode 100644 index 0000000000..23e104d58c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/a.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/b.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/b.png new file mode 100644 index 0000000000..1b84197e2f Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/b.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/c.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/c.png new file mode 100644 index 0000000000..2adad642d6 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/c.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/g.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/g.png new file mode 100644 index 0000000000..83b7451221 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/g.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/m.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/m.png new file mode 100644 index 0000000000..df05888763 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/m.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/r.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/r.png new file mode 100644 index 0000000000..2884328b30 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/r.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/u.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/u.png new file mode 100644 index 0000000000..79ce73cbe9 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/u.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/modal front/w.png b/data/magic-modules.mse-include/symbols/icon/texture/modal front/w.png new file mode 100644 index 0000000000..8ca7feb11d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/modal front/w.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/a.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/a.png new file mode 100644 index 0000000000..0a1843914b Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/a.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/b.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/b.png new file mode 100644 index 0000000000..a364af11ef Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/b.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/c.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/c.png new file mode 100644 index 0000000000..96caa824c6 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/c.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/g.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/g.png new file mode 100644 index 0000000000..8bd1e570b8 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/g.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/m.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/m.png new file mode 100644 index 0000000000..f8180f70cf Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/m.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/r.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/r.png new file mode 100644 index 0000000000..ecfd24456e Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/r.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/u.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/u.png new file mode 100644 index 0000000000..217234ba12 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/u.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/normal/w.png b/data/magic-modules.mse-include/symbols/icon/texture/normal/w.png new file mode 100644 index 0000000000..ba10222eab Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/normal/w.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/off black.png b/data/magic-modules.mse-include/symbols/icon/texture/off black.png new file mode 100644 index 0000000000..8732ae45ba Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/off black.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/off white.png b/data/magic-modules.mse-include/symbols/icon/texture/off white.png new file mode 100644 index 0000000000..db81007286 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/off white.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/pure black.png b/data/magic-modules.mse-include/symbols/icon/texture/pure black.png new file mode 100644 index 0000000000..c04fb129cd Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/pure black.png differ diff --git a/data/magic-modules.mse-include/symbols/icon/texture/pure white.png b/data/magic-modules.mse-include/symbols/icon/texture/pure white.png new file mode 100644 index 0000000000..e5e7d5e4fe Binary files /dev/null and b/data/magic-modules.mse-include/symbols/icon/texture/pure white.png differ diff --git a/data/magic-modules.mse-include/symbols/instant.png b/data/magic-modules.mse-include/symbols/instant.png deleted file mode 100644 index e99e1a2669..0000000000 Binary files a/data/magic-modules.mse-include/symbols/instant.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/land.png b/data/magic-modules.mse-include/symbols/land.png deleted file mode 100644 index 43afc8e3cd..0000000000 Binary files a/data/magic-modules.mse-include/symbols/land.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/lesson.png b/data/magic-modules.mse-include/symbols/lesson.png deleted file mode 100644 index f336bbe2e8..0000000000 Binary files a/data/magic-modules.mse-include/symbols/lesson.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/meld.png b/data/magic-modules.mse-include/symbols/meld.png deleted file mode 100644 index 621366dd1b..0000000000 Binary files a/data/magic-modules.mse-include/symbols/meld.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/artifact.png b/data/magic-modules.mse-include/symbols/modalback/artifact.png deleted file mode 100644 index 6178e941cc..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/artifact.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/black.png b/data/magic-modules.mse-include/symbols/modalback/black.png deleted file mode 100644 index cd851b98fa..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/black.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/blue.png b/data/magic-modules.mse-include/symbols/modalback/blue.png deleted file mode 100644 index c25d293bc6..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/blue.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/colorless.png b/data/magic-modules.mse-include/symbols/modalback/colorless.png deleted file mode 100644 index fa2e6c7161..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/colorless.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/green.png b/data/magic-modules.mse-include/symbols/modalback/green.png deleted file mode 100644 index b06b358a03..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/green.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/multicolor.png b/data/magic-modules.mse-include/symbols/modalback/multicolor.png deleted file mode 100644 index a892559bf7..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/multicolor.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/red.png b/data/magic-modules.mse-include/symbols/modalback/red.png deleted file mode 100644 index 00a0df44ec..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/red.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalback/white.png b/data/magic-modules.mse-include/symbols/modalback/white.png deleted file mode 100644 index 0ae25acaf9..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalback/white.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/artifact.png b/data/magic-modules.mse-include/symbols/modalbackflipped/artifact.png deleted file mode 100644 index cb8fc9fbf5..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/artifact.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/black.png b/data/magic-modules.mse-include/symbols/modalbackflipped/black.png deleted file mode 100644 index bb2293a20c..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/black.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/blue.png b/data/magic-modules.mse-include/symbols/modalbackflipped/blue.png deleted file mode 100644 index b1c38ac1d1..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/blue.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/colorless.png b/data/magic-modules.mse-include/symbols/modalbackflipped/colorless.png deleted file mode 100644 index 3e0b5827d4..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/colorless.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/green.png b/data/magic-modules.mse-include/symbols/modalbackflipped/green.png deleted file mode 100644 index f6598917a0..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/green.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/multicolor.png b/data/magic-modules.mse-include/symbols/modalbackflipped/multicolor.png deleted file mode 100644 index 01e911600c..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/multicolor.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/red.png b/data/magic-modules.mse-include/symbols/modalbackflipped/red.png deleted file mode 100644 index f92662f2fd..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/red.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalbackflipped/white.png b/data/magic-modules.mse-include/symbols/modalbackflipped/white.png deleted file mode 100644 index d39f21d188..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalbackflipped/white.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/artifact.png b/data/magic-modules.mse-include/symbols/modalfront/artifact.png deleted file mode 100644 index adc9fad9e4..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/artifact.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/black.png b/data/magic-modules.mse-include/symbols/modalfront/black.png deleted file mode 100644 index ad8c19b423..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/black.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/blue.png b/data/magic-modules.mse-include/symbols/modalfront/blue.png deleted file mode 100644 index 22f6b58d2f..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/blue.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/colorless.png b/data/magic-modules.mse-include/symbols/modalfront/colorless.png deleted file mode 100644 index b215540cf4..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/colorless.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/green.png b/data/magic-modules.mse-include/symbols/modalfront/green.png deleted file mode 100644 index 66d0d4f882..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/green.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/multicolor.png b/data/magic-modules.mse-include/symbols/modalfront/multicolor.png deleted file mode 100644 index c99bcecf46..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/multicolor.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/red.png b/data/magic-modules.mse-include/symbols/modalfront/red.png deleted file mode 100644 index f5dd81400b..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/red.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfront/white.png b/data/magic-modules.mse-include/symbols/modalfront/white.png deleted file mode 100644 index a0b5fba3e4..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfront/white.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/artifact.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/artifact.png deleted file mode 100644 index 6327be4534..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/artifact.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/black.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/black.png deleted file mode 100644 index 5c5049edb5..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/black.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/blue.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/blue.png deleted file mode 100644 index f856b1adb4..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/blue.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/colorless.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/colorless.png deleted file mode 100644 index c1e807c240..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/colorless.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/green.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/green.png deleted file mode 100644 index 132f7d3f5f..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/green.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/multicolor.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/multicolor.png deleted file mode 100644 index f900c53d39..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/multicolor.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/red.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/red.png deleted file mode 100644 index 0e150b5bfd..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/red.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/modalfrontflipped/white.png b/data/magic-modules.mse-include/symbols/modalfrontflipped/white.png deleted file mode 100644 index e973da2275..0000000000 Binary files a/data/magic-modules.mse-include/symbols/modalfrontflipped/white.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/moon.png b/data/magic-modules.mse-include/symbols/moon.png deleted file mode 100644 index f83d3ac387..0000000000 Binary files a/data/magic-modules.mse-include/symbols/moon.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/mse-transformation-symbols/gimphelpers.py b/data/magic-modules.mse-include/symbols/mse-transformation-symbols/gimphelpers.py new file mode 100644 index 0000000000..9e02341cc0 --- /dev/null +++ b/data/magic-modules.mse-include/symbols/mse-transformation-symbols/gimphelpers.py @@ -0,0 +1,706 @@ +# +# Library that attempts to make it easier/less verbose to define Gimp plugins +# v0.0.00: 2024-11-19: First published version +# v0.0.01: 2024-11-21: Make undo and exception handling optional +# Return error as Gimp/GLib error +# v0.0.02: 2024-11-28: Add getArgValue() method and getArgValues() function +# v0.0.03: 2024-11-28: Fix initialisation of Choice values +# v0.0.04: 2024-11-28: Use less cutting-edge calls in getIcon() +# v0.0.05: 2024-12-01: Add context push/pop, +# v0.0.06: 2024-12-01: Add callProcedure +# Change GIMP_HELPERS_DEBUG to GIMPHELPERS_TRACE +# v0.0.07: 2024-12-02: Add GIMPHELPERS_PROCEDURES to narrow down debugging +# (automatic addition to /Test for the time being) +# v0.0.08: 2024-12-02: Skip showing dialog when no arguments +# Add procedure-level tracing +# v0.0.09: 2025-01-12: Add Aux/Result argument +# callProcedure: return results or throw exception +# Add I18N +# v0.0.11: 2025-01-13: Fix image marked dirty even if nothing happened +# v0.0.12: 2025-03-22: Fix File option to work with new Gimp File widget + +__version__ = (0, 0, 12) # Make it easier to check with code + +# © Copyright Ofnuts, 2024 + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +import gi + +gi.require_version('Gimp', '3.0') +from gi.repository import Gimp +gi.require_version('GimpUi', '3.0') +from gi.repository import GimpUi +gi.require_version('Gegl', '0.4') +from gi.repository import Gegl +from gi.repository import GObject +from gi.repository import GLib +from gi.repository import Gio + +import os +import traceback +from dataclasses import dataclass, field +from typing import Callable, Any +from enum import IntEnum + +def _(msg: str) -> str: return GLib.dgettext(None, msg) + +debug = 'GIMPHELPERS_TRACE' in os.environ + +def trace(fmt, *args): + if debug: + print(fmt.format(*args) if args else fmt) + +def isTraceEnabledFor(name: str): + if 'GIMPHELPERS_PROCEDURES' in os.environ: + return name in os.environ['GIMPHELPERS_PROCEDURES'].split(':') + else: + return False + +def enableTraceFor(name: str): + global debug + state=isTraceEnabledFor(name) + if state is not None: # something set at procedure level + debug=state + print(f'Debug for {name}: {debug}') + +# Makes it simpler to issue a translatable msg +# (f-strings don't work for this) +def message(fmt, *args): + Gimp.message(fmt.format(*args) if args else fmt) + +# +# Simple-minded GEGL helper for the time being +# +# Sample function to apply a GEGL operation on one drawable +def applyGeglOnBuffers(bufferIn,bufferOut,opName,**kwargs): + graph=Gegl.Node() + source=graph.create_child("gegl:buffer-source") + source.set_property('buffer',bufferIn) + sink=graph.create_child("gegl:write-buffer") + sink.set_property('buffer',bufferOut) + operation=graph.create_child(opName) + # Iterate named arguments, converting names_with_underscores to names-with-dashes + for name,value in kwargs.items(): + operation.set_property(name.replace('_','-'),value) + source.link(operation) + operation.link(sink) + sink.process() + bufferOut.flush() + +# Domain is root name of plugin +def getDomain(file): + return os.path.splitext(os.path.basename(file))[0] + +# Icon assumed to be in same directory with same name as plugin .py: +def getIcon(file): + return Gio.File.new_for_path(os.path.join(os.path.dirname(file), getDomain(file)+'.png')) + +# +# Closure to wrap provided function into one that handles dialog, exception, and undo +# + +# Short function to determine if it's worth showing the argument dialog +# Experimentally it seems that without arguments there is a single 'procedure' +# argument in the config. +# An alternative implementation would be to count the args and generate +# an alternative wrapper +def hasArgumentsInConfig(config: Gimp.ProcedureConfig) -> bool: + return len(GObject.list_properties(config)) > 1 + +def wrap(implementation: Callable, beforeDialog: Callable | None, afterDialog: Callable | None, catchErrors: bool): + implementationName = str(implementation) + trace(f'Wrapping {implementationName}') + + def wrapped(procedure: Gimp.ImageProcedure, + run_mode: Gimp.RunMode, + image: Gimp.Image, + drawables: list[Gimp.Drawable], + config: Gimp.ProcedureConfig, data: Any): + enableTraceFor(procedure.get_name()) + trace(f'entering wrapped({procedure=!r}, {run_mode=!r}, {image=!r}, {drawables=!r}, {config=!r}, {data=!r})') + if beforeDialog: + beforeDialog(procedure, run_mode, image, drawables, config, data) + if run_mode == Gimp.RunMode.INTERACTIVE and hasArgumentsInConfig(config): + GimpUi.init('AutoGeneratedDialog') + dialog = GimpUi.ProcedureDialog(procedure=procedure, config=config) + dialog.fill(None) + if not dialog.run(): + dialog.destroy() + return procedure.new_return_values(Gimp.PDBStatusType.CANCEL, GLib.Error()) + else: + dialog.destroy() + if afterDialog: + afterDialog(procedure, run_mode, image, drawables, config, data) + trace(f'Returned from dialog in {procedure.get_name()}') + if catchErrors: + Gimp.context_push() + if image: + # starting a group marks the image dirty, even if nothing else is done + isCleanOnEntry: bool = not image.is_dirty() + image.undo_group_start() + if isCleanOnEntry: + image.clean_all() # restore clean state + try: + trace(f'executing wrapped({procedure=!r}, {run_mode=!r}, {image=!r}, {drawables=!r}, {config=!r}, {data=!r})') + result=implementation(procedure, run_mode, image, drawables, config, data) + except Exception as e: + traceback.print_exc() + result=procedure.new_return_values(Gimp.PDBStatusType.EXECUTION_ERROR, GLib.Error(e.args[0])) + if image: + isCleanOnExit: bool = not image.is_dirty() + image.undo_group_end() + if isCleanOnExit: + image.clean_all() # restore clean state + + Gimp.context_pop() + return result + else: # Simplified + return implementation(procedure, run_mode, image, drawables, config, data) + + return wrapped + +# +# Plugin argument description classes +# +# Not implemented so far: +# * All 'aux' arguments +# * All 'return' arguments +# * No support for GUI dialog in current Gimp: +# * bytes +# * core_object_array +# * display +# * double_array +# * group_layer +# * int32_array +# * item +# * layer_mask +# * param +# * parasite +# * scaledColorPath +# * resource +# * selection +# * string_array +# * text_layer +# * uint +# * color_from_string: what is the point since it shows a palette like plain color? +# Color can already be initialized with Gegl.Color('red') + +# Base class, do not use directly! +@dataclass +class __BaseArg__: + name: str + label: str + blurb: str + + # Extract value directly from config object + # The benefit is that the implementation code doesn't need + # to know the name of the variable, and we replace a string + # (that cannot be checked by the IDE) by a variable name. + # Subclasses can also do their own thing (see Choice) + def getArgValue(self,config: Gimp.ProcedureConfig): + configValue=config.get_property(self.name) + return configValue + +@dataclass +class Boolean(__BaseArg__): + value: bool + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Brush(__BaseArg__): + value: str + noneOK: bool = False + defaultToContext: bool = False + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Channel(__BaseArg__): + noneOK: bool = True + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +# Slightly more complicated class to handle Choice because we want to be able +# to store some non-UI data as well +@dataclass +class Option: + name: str + label: str + blurb: str = '' + value: Any = None + sensitive: bool = True + +class Choice(__BaseArg__): + def __init__(self, name: str, label: str, blurb: str, value: str, + options: list[Option], + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE): + self.name=name + self.label=label + self.value=value + self.options=options + self.blurb=blurb + self.flags=flags + self.values=dict() + + # Careful because value can be something "falsy" like "False" or empty string + # This forbids "None" from being an explicit value, but well??? + for option in self.options: + if option.value is not None: # + trace(f'{self.name}: Adding "{option.name}": {option.value}') + self.values[option.name]=option.value + + def __getitem__(self,name): + return self.values[name] + + # Get/set value directly from config object + # The benefit is that the implementation code doesn't + # need to know the name of the choice variable nor the names of the choices + def getArgValue(self,config: Gimp.ProcedureConfig): + option,=config.get_properties(self.name) + trace(f'Value for choice {self.name}: {option=}, {self.values=}') + return self.values[option] if option in self.values else option + +@dataclass +class Color(__BaseArg__): + value: Gegl.Color + hasAlpha: bool = False + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Double(__BaseArg__): + valueMin: float + valueMax: float + valueDefault: float + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Drawable(__BaseArg__): + noneOK: bool = True + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class File(__BaseArg__): + action: Gimp.FileChooserAction = Gimp.FileChooserAction.ANY + noneOK: bool = False + default: str | list[str] | Gio.File | None = None + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Font(__BaseArg__): + value: Gimp.Font + noneOK: bool = False + defaultToContext: bool = False + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Gradient(__BaseArg__): + value: Gimp.Gradient + noneOK: bool = False + defaultToContext: bool = False + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class GroupLayer(__BaseArg__): + noneOK: bool = True + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Image(__BaseArg__): + noneOK: bool = True + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Int(__BaseArg__): + valueMin: int + valueMax: int + valueDefault: int + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Layer(__BaseArg__): + noneOK: bool = True + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class LayerMask(__BaseArg__): + noneOK: bool = True + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Palette(__BaseArg__): + value: Gimp.Palette + noneOK: bool = False + defaultToContext: bool = False + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class Pattern(__BaseArg__): + value: Gimp.Pattern + noneOK: bool = False + defaultToContext: bool = False + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +@dataclass +class String(__BaseArg__): + value: str = '' + flags: GObject.ParamFlags = GObject.ParamFlags.READWRITE + +# +# Mapping of argument declaration type to add_{}_argument calls +# Could possibly just use add_{}_argument(dataclasses.astuple(argDesc)) +def traceResourceArg(name: str, value: Gimp.Resource): + if value: + trace(f'++++ Adding {type(value)}: {value.get_name()}') + else: + trace(f'+*** {name} not defined!!!!!!!!!!') + +class ArgType(IntEnum): + ARG=0 + AUX=1 + RES=2 + +def notImplemented(procedure: Gimp.Procedure, argType: ArgType, argDesc: __BaseArg__): + raise Exception(f'Adding {argDesc.name}: {type(argDesc)} argument not implemented') + +def addBooleanArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Boolean): + addMethods: list[Callable] = [procedure.add_boolean_argument, + procedure.add_boolean_aux_argument, + procedure.add_boolean_return_value] + addMethods[argType](argDesc.name, _(argDesc.label), _(argDesc.blurb), + argDesc.value, + argDesc.flags) + +def addBrushArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Brush): + addMethods: list[Callable] = [procedure.add_brush_argument, + procedure.add_brush_aux_argument, + procedure.add_brush_return_value] + brush = Gimp.Brush.get_by_name(_(argDesc.value)) if argDesc.value else None + traceResourceArg(argDesc.label, brush) + trace(f'Flags: {argDesc.noneOK=}, {argDesc.defaultToContext=}') + addMethods[argType](argDesc.name, _(argDesc.label), _(argDesc.blurb), + argDesc.noneOK, + brush, + argDesc.defaultToContext, + argDesc.flags) + +def addChannelArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Channel): + addMethods: list[Callable] = [procedure.add_channel_argument, + procedure.add_channel_aux_argument, + procedure.add_channel_return_value] + addMethods[argType](argDesc.name, _(argDesc.label), _(argDesc.blurb), + argDesc.noneOK, + argDesc.flags) + +def addChoiceArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Choice): + addMethods: list[Callable] = [procedure.add_choice_argument, + procedure.add_choice_aux_argument, + procedure.add_choice_return_value] + choice = Gimp.Choice.new() + for index, option in enumerate(argDesc.options): + choice.add(option.name, index, _(option.label), _(option.blurb)) + choice.set_sensitive(option.name, option.sensitive) + addMethods[argType](argDesc.name, _(argDesc.label), _(argDesc.blurb), + choice, + argDesc.value, + argDesc.flags) + +def addColorArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Color): + addMethods: list[Callable] = [procedure.add_color_argument, + procedure.add_color_aux_argument, + procedure.add_color_return_value] + addMethods[argType](argDesc.name, _(argDesc.label), _(argDesc.blurb), + argDesc.hasAlpha, argDesc.value, + argDesc.flags) + +def addDoubleArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Double): + addMethods: list[Callable] = [procedure.add_double_argument, + procedure.add_double_aux_argument, + procedure.add_double_return_value] + addMethods[argType](argDesc.name, _(argDesc.label), _(argDesc.blurb), + argDesc.valueMin, argDesc.valueMax, argDesc.valueDefault, + argDesc.flags) + +def addDrawableArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Drawable): + addMethods: list[Callable] = [procedure.add_drawable_argument, + procedure.add_drawable_aux_argument, + procedure.add_drawable_return_value] + addMethods[argType](argDesc.name, _(argDesc.label), _(argDesc.blurb), + argDesc.noneOK, + argDesc.flags) + +def addFileArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: File): + addMethods: list[Callable] = [procedure.add_file_argument, + procedure.add_file_aux_argument, + procedure.add_file_return_value] + default: Gio.File | None = None + match argDesc.default: + case Gio.File() | None: + default=argDesc.default + case str(): + default=Gio.File.new_for_path(_(argDesc.default)) + case [*pathList] if all(isinstance(pathItem,str) for pathItem in pathList): + default=Gio.File.new_build_filenamev(*[_(p) for p in pathList]) + case _: + raise Exception(f"Unrecognized file description type {type(argDesc.default)} in File argument descriptor") + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.action, + argDesc.noneOK, + default, + argDesc.flags) + +def addFontArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Font): + addMethods: list[Callable] = [procedure.add_font_argument, + procedure.add_font_aux_argument, + procedure.add_font_return_value] + font = Gimp.Font.get_by_name(_(argDesc.value)) if argDesc.value else None + traceResourceArg('Font', font) + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.noneOK, + font, + argDesc.defaultToContext, + argDesc.flags) + +def addGradientArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Gradient): + addMethods: list[Callable] = [procedure.add_gradient_argument, + procedure.add_gradient_aux_argument, + procedure.add_gradient_return_value] + gradient = Gimp.Gradient.get_by_name(_(argDesc.value)) if argDesc.value else None + traceResourceArg('Gradient', gradient) + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.noneOK, + gradient, + argDesc.defaultToContext, + argDesc.flags) + +# def addGroupLayerArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: GroupLayer): +# addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), +# argDesc.noneOK, +# argDesc.flags) + +def addImageArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Image): + addMethods: list[Callable] = [procedure.add_image_argument, + procedure.add_image_aux_argument, + procedure.add_image_return_value] + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.noneOK, + argDesc.flags) + +def addIntArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Int): + addMethods: list[Callable] = [procedure.add_int_argument, + procedure.add_int_aux_argument, + procedure.add_int_return_value] + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.valueMin, argDesc.valueMax, argDesc.valueDefault, + argDesc.flags) + +def addLayerArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Layer): + addMethods: list[Callable] = [procedure.add_layer_argument, + procedure.add_layer_aux_argument, + procedure.add_layer_return_value] + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.noneOK, + argDesc.flags) + +# def addLayerMaskArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: LayerMask): +# addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), +# argDesc.noneOK, +# argDesc.flags) + +def addPaletteArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Palette): + addMethods: list[Callable] = [procedure.add_palette_argument, + procedure.add_palette_aux_argument, + procedure.add_palette_return_value] + palette = Gimp.Palette.get_by_name(_(argDesc.value)) if argDesc.value else None + traceResourceArg('Palette', palette) + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.noneOK, + palette, + argDesc.defaultToContext, + argDesc.flags) + +def addPatternArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: Pattern): + addMethods: list[Callable] = [procedure.add_pattern_argument, + procedure.add_pattern_aux_argument, + procedure.add_pattern_return_value] + pattern = Gimp.Pattern.get_by_name(_(argDesc.value)) if argDesc.value else None + traceResourceArg('Pattern', pattern) + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.noneOK, + pattern, + argDesc.defaultToContext, + argDesc.flags) + +def addStringArg(procedure: Gimp.Procedure, argType: ArgType, argDesc: String): + addMethods: list[Callable] = [procedure.add_string_argument, + procedure.add_string_aux_argument, + procedure.add_string_return_value] + addMethods[argType](argDesc.name, _(argDesc.label),_(argDesc.blurb), + argDesc.value, + argDesc.flags) + +# Dictionary of type -> function because this author hates long +# if/elif (or even "match" in Gimp3) +typeToArgProcs: dict[type, Callable]={ + Boolean: addBooleanArg, + Brush: addBrushArg, + Channel: addChannelArg, + Choice: addChoiceArg, + Color: addColorArg, + Double: addDoubleArg, + Drawable: addDrawableArg, + File: addFileArg, + Font: addFontArg, + Gradient: addGradientArg, + GroupLayer: notImplemented, + Image: addImageArg, + Int: addIntArg, + Layer: addLayerArg, + LayerMask: notImplemented, + Palette: addPaletteArg, + Pattern: addPatternArg, + String: addStringArg, + } + +# +# Plugin procedure description +# +@dataclass +class ProcedureDescription: + id: str + imageTypes: str + sensitivity: Gimp.ProcedureSensitivityMask + implementation: Callable[[Gimp.ImageProcedure,Gimp.RunMode,Gimp.Image, + list[Gimp.Drawable],Gimp.ProcedureConfig,Any],Gimp.ValueArray] + menuLabel: str | None = None + menuPath: str | list [str] | None = None + descShort: str | None = None + descLong: str | None = None + args: list[__BaseArg__] = field(default_factory=lambda: []) + auxArgs: list[__BaseArg__] = field(default_factory=lambda: []) + resArgs: list[__BaseArg__] = field(default_factory=lambda: []) + run_data: Any = None + beforeDialog: Callable[[Gimp.ImageProcedure,Gimp.RunMode,Gimp.Image,list[Gimp.Drawable],Gimp.ProcedureConfig,Any],None] | None = None + afterDialog: Callable[[Gimp.ImageProcedure,Gimp.RunMode,Gimp.Image,list[Gimp.Drawable],Gimp.ProcedureConfig,Any],None] | None = None + catchErrors: bool=True + +class HelpedPlugin(Gimp.PlugIn): + + # These class data are replaced by the data set in the derived plugin + procedures : list[ProcedureDescription]=[] + icon: Gio.File = None + author: str = '' + copyright: str = '' + year: str = '' + domain: str | None = None + +# Methods defined by the Gimp interface + def do_set_i18n(self, procname): + print(f'** do_set_i18n({procname=!r}): {self.domain} **') + if self.domain: + trace(f'{procname}: setting I18N domain to "{self.domain}"') + return True, self.domain, 'locale' + else: + return False,None,None + + def do_query_procedures(self): + trace(f'** do_query_procedures() **') + return [procDesc.id for procDesc in self.procedures] # convert to list + + def do_create_procedure(self, procName): + trace(f'Creating procedure {procName}') + matches = [procDesc for procDesc in self.procedures if procDesc.id==procName] + if not matches or len(matches) > 1: + return None + procDesc: ProcedureDescription = matches[0] + procedure: Gimp.Procedure = Gimp.ImageProcedure.new(self, procName, + Gimp.PDBProcType.PLUGIN, + wrap(procDesc.implementation, + procDesc.beforeDialog, + procDesc.afterDialog, + procDesc.catchErrors), + procDesc.run_data) + procedure.set_image_types(procDesc.imageTypes) + procedure.set_sensitivity_mask(procDesc.sensitivity) + if procDesc.menuLabel: + procedure.set_menu_label(_(procDesc.menuLabel)) + if procDesc.menuPath is None: + trace(f'No menu path defined for {procDesc.id}, skipped') + elif isinstance(procDesc.menuPath,list): + for p in procDesc.menuPath: + procedure.add_menu_path(_(p)) + else: + procedure.add_menu_path(_(procDesc.menuPath)) + # To /Test for quick access when debugging + if isTraceEnabledFor(procName): + trace(f'{procDesc.id} added to menu /Test)') + procedure.add_menu_path('/Test') + else: + trace(f'No menu label defined for {procDesc.id}, skipped') + if procDesc.descShort: + procedure.set_documentation(_(procDesc.descShort), _(procDesc.descLong),procName) + if self.icon: + procedure.set_icon_file(self.icon) + if self.author: + procedure.set_attribution(self.author,self.copyright,self.year) + + for arg in procDesc.args: + typeToArgProcs[type(arg)](procedure, ArgType.ARG, arg) + for aux in procDesc.auxArgs: + typeToArgProcs[type(aux)](procedure, ArgType.AUX, aux) + for res in procDesc.resArgs: + typeToArgProcs[type(res)](procedure, ArgType.RES, res) + + trace(f'End of creation for procedure {procName}') + return procedure + +# Get arguments from config object +def getConfigArgs(config: Gimp.ProcedureConfig, *argNames: str): + return [config.get_properties(arg)[0] for arg in argNames ] + +# Get arguments from config object +def getArgsValues(config: Gimp.ProcedureConfig, *args: __BaseArg__): + return [arg.getArgValue(config) for arg in args ] + +def callProcedure(procId: str, run_mode=Gimp.RunMode.NONINTERACTIVE, **kwargs): + procedure=Gimp.get_pdb().lookup_procedure(procId) + if procedure is None: + raise Exception(f'Procedure "{procId}" no found') + config: Gimp.ProcedureConfig = procedure.create_config() + #config.set_property('run-mode',run_mode) + for name,value in kwargs.items(): + if isinstance(value,list): + config.set_core_object_array(name.replace('_','-'),value) + else: + config.set_property(name.replace('_','-'),value) + result=procedure.run(config) + results = [result.index(i) for i in range(result.length())] + if results[0] is not Gimp.PDBStatusType.SUCCESS: + raise Exception(f'Error returned from procedure "{procId}": {results[0].value_name}') + return results[1:] + +def successReturn(procedure: Gimp.Procedure, *args) -> Gimp.ValueArray: + values: Gimp.ValueArray = procedure.new_return_values(Gimp.PDBStatusType.SUCCESS,GLib.Error()) + values.truncate(1) + for v in args: + values.append(v) + return values + +def errorReturn(procedure: Gimp.Procedure) -> Gimp.ValueArray: + values: Gimp.ValueArray = procedure.new_return_values(Gimp.PDBStatusType.EXECUTION_ERROR,GLib.Error()) + return values + + + + + diff --git a/data/magic-modules.mse-include/symbols/mse-transformation-symbols/mse-transformation-symbols.py b/data/magic-modules.mse-include/symbols/mse-transformation-symbols/mse-transformation-symbols.py new file mode 100644 index 0000000000..897d6f4e90 --- /dev/null +++ b/data/magic-modules.mse-include/symbols/mse-transformation-symbols/mse-transformation-symbols.py @@ -0,0 +1,207 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# This script takes normal symbol images and outputs images that can be used by MSE's transformation symbol module. +# +# To Install this script, open GIMP 3.X or later, go to "Edit" menu > "Preferences", then under "Folders", select "Plug-ins". +# Select one of the folders in the list, then click on the icon to the right labeled "Show file location in the file manager". +# It will open the system explorer, navigate inside the folder named "plug-ins", then copy the folder (not the contents) +# named "mse-transformation-symbols" found in "data/magic-modules.mse-include/symbols/" inside this "plug-ins" folder. Restart GIMP. +# +# To use this script, open the blank symbol image "data/magic-modules.mse-include/symbols/blank.png", and add your symbol in the circle. +# Your symbol must be white on the image's black background. Save this image in a folder, then go to "Tools" menu > "Transformation Symbols...". +# Select the folder you saved your image in. (You can save multiple different images if you want.) Click OK. The script will create +# a sub folder called "shape", where it will store the results. Save these in "data/magic-modules.mse-include/symbols/icon/shape/". +# +# Thanks to Ofnuts for the helper scripts. + +import gi +gi.require_version('Gimp', '3.0') +gi.require_version('Gegl', '0.4') +from gi.repository import Gimp, Gegl, GLib, Gio +import sys, os, time, re, math +from gimphelpers import * + +def _(text): return GLib.dgettext(None, text) + +directoryArg = File('directory', + _('Directory'), + _('Directory where files are loaded'), + action = Gimp.FileChooserAction.CREATE_FOLDER, + noneOK = False) + +runMode = Gimp.RunMode.INTERACTIVE + +def cleanName(name): + name = name.strip() + name = re.sub(r'( copy| \#[0-9]+)+$', '', name) + name = re.sub(r'.jpeg|.jpg|.png|.webp$', '', name) + return name + +def fileFromPathComponents(path:list[str]) -> Gio.File: + return Gio.file_new_for_path(GLib.build_filenamev(path)) + +def run(procedure: Gimp.ImageProcedure, + run_mode: Gimp.RunMode, + image: Gimp.Image, + drawables: list[Gimp.Drawable], + config: Gimp.ProcedureConfig, + data: Any) -> Gimp.ValueArray: + + #### Read user input + directory = directoryArg.getArgValue(config) + directory_path = directory.get_path() + directory_name = os.path.basename(directory_path) + + #### Create save directory + save_directory: Gio.File = fileFromPathComponents([directory_path]+['shape']) + save_directory_path = save_directory.get_path() + save_directory_type = save_directory.query_file_type(Gio.FileQueryInfoFlags.NONE) + match save_directory_type: + case Gio.FileType.DIRECTORY: #### Already there + pass; + case Gio.FileType.UNKNOWN: #### Not already there + save_directory.make_directory_with_parents(None) + case _: + raise Exception(f'{save_directory_path} is not a directory') + + #### Set up context + pdb = Gimp.get_pdb() + + image = Gimp.Image.new(706, 706, Gimp.ImageType.RGB_IMAGE) + display = Gimp.Display.new(image) + + curve_points = [0.0, 0.0, 0.478, 0.227, 0.517, 0.662, 1.0, 1.0] + black = Gegl.Color.new("black") + grey = Gegl.Color.new("#808080") + + load_layer_group = Gimp.GroupLayer.new(image) + load_layer_group.set_name(directory_name) + image.insert_layer(load_layer_group, None, 0) + + #### Load image files + file_names = os.listdir(directory_path) + for file_name in file_names: + file_path = os.path.join(directory_path, file_name) + file_path_lower = file_path.lower() + if (not os.path.isdir(file_path)) and (file_path_lower.endswith('.png') or file_path_lower.endswith('.webp') or file_path_lower.endswith('.jpg') or file_path_lower.endswith('.jpeg')): + file = Gio.File.new_for_path(file_path) + layer = Gimp.file_load_layer(Gimp.RunMode.NONINTERACTIVE, image, file) + width = layer.get_width() + height = layer.get_height() + if width != 706 or height != 706: + Gimp.message(f'ERROR: Image {file_name} is not 706x706 pixels!') + layer.delete() + continue + layer.set_name(file_name) + image.insert_layer(layer, load_layer_group, 0) + Gimp.displays_flush() + layer.set_visible(False) + layers = load_layer_group.get_children() + + #### Erase the rim + image.select_ellipse(Gimp.ChannelOps.REPLACE, 137, 137, 432, 432) + Gimp.Selection.invert(image) + Gimp.context_set_foreground(black) + for layer in layers: + layer.set_visible(True) + Gimp.displays_flush() + layer.edit_fill(Gimp.FillType.FOREGROUND) + Gimp.displays_flush() + layer.set_visible(False) + + Gimp.context_set_foreground(grey) + for layer in layers: + layer.set_visible(True) + image.set_selected_layers([layer]) + Gimp.displays_flush() + + #### Turn black/white mask into grey/transparent + mask = layer.create_mask(Gimp.AddMaskType.COPY) + layer.add_mask(mask) + image.select_item(Gimp.ChannelOps.REPLACE, layer) + Gimp.Selection.all(image) + layer.edit_fill(Gimp.FillType.FOREGROUND) + layer.remove_mask(Gimp.MaskApplyMode.APPLY) + Gimp.Selection.none(image) + Gimp.displays_flush() + + #### Rotate -90° + rotate_270_procedure = pdb.lookup_procedure('gimp-item-transform-rotate-simple') + rotate_270_config = rotate_270_procedure.create_config() + rotate_270_config.set_property('item', layer) + rotate_270_config.set_property('rotate-type', Gimp.RotationType.DEGREES270) + rotate_270_config.set_property('auto-center', True) + rotate_270_result = rotate_270_procedure.run(rotate_270_config) + layer = rotate_270_result.index(1) + Gimp.displays_flush() + + #### Add bevel + bevel_procedure = pdb.lookup_procedure('script-fu-add-bevel') + bevel_config = bevel_procedure.create_config() + bevel_config.set_property('run-mode', Gimp.RunMode.NONINTERACTIVE) + bevel_config.set_property('image', image) + bevel_config.set_core_object_array('drawables', [layer]) + bevel_config.set_property('adjustment', 24) + bevel_config.set_property('toggle', False) + bevel_config.set_property('toggle-2', False) + bevel_procedure.run(bevel_config) + Gimp.Selection.none(image) + Gimp.displays_flush() + + #### Rotate 90° + rotate_90_procedure = pdb.lookup_procedure('gimp-item-transform-rotate-simple') + rotate_90_config = rotate_90_procedure.create_config() + rotate_90_config.set_property('item', layer) + rotate_90_config.set_property('rotate-type', Gimp.RotationType.DEGREES90) + rotate_90_config.set_property('auto-center', True) + rotate_90_result = rotate_90_procedure.run(rotate_90_config) + layer = rotate_90_result.index(1) + Gimp.displays_flush() + + #### Increase contrast + layer.curves_spline(Gimp.HistogramChannel.VALUE, curve_points) + Gimp.displays_flush() + + #### Save + save_file: Gio.File = fileFromPathComponents([save_directory_path]+[cleanName(layer.get_name()) + '.png']) + export_image = Gimp.Image.new(layer.get_width(), layer.get_height(), image.get_base_type()) + export_layer = Gimp.Layer.new_from_drawable(layer, export_image) + export_layer.set_offsets(0, 0) + export_image.insert_layer(export_layer, None, 0) + global runMode + ok = Gimp.file_save(runMode, export_image, save_file, None) + runMode = Gimp.RunMode.WITH_LAST_VALS + export_image.delete() + if not ok: + Exception('Failed to save') + Gimp.displays_flush() + layer.set_visible(False) + + time.sleep(0.5) + display.delete() + Gimp.displays_flush() + return successReturn(procedure) + +class DescriptionClass(HelpedPlugin): + procedures = [ + ProcedureDescription( + 'mse-transformation-symbols', + '*', + Gimp.ProcedureSensitivityMask.ALWAYS, + run, + args = [ + directoryArg, + ], + menuLabel = _('Transformation Symbols...'), + menuPath = ['/Tools/[MSE]'], + descShort = _('Create beveled versions of transformation symbols'), + descLong = _('Load all the image files in directoryArg. Create beveled versions for use in the MSE transformation symbol module.'), + ) + ] + domain = getDomain(__file__) + icon = getIcon(__file__) + author = 'GenevensiS' + year = '2026' + +Gimp.main(DescriptionClass.__gtype__, sys.argv) diff --git a/data/magic-modules.mse-include/symbols/multitype.png b/data/magic-modules.mse-include/symbols/multitype.png deleted file mode 100644 index 47a3cf14f0..0000000000 Binary files a/data/magic-modules.mse-include/symbols/multitype.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/night.png b/data/magic-modules.mse-include/symbols/night.png deleted file mode 100644 index 6be984a10f..0000000000 Binary files a/data/magic-modules.mse-include/symbols/night.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/not found.png b/data/magic-modules.mse-include/symbols/not found.png new file mode 100644 index 0000000000..9c1b86e969 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/not found.png differ diff --git a/data/magic-modules.mse-include/symbols/open fan.png b/data/magic-modules.mse-include/symbols/open fan.png deleted file mode 100644 index 3536517da0..0000000000 Binary files a/data/magic-modules.mse-include/symbols/open fan.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/phenomenon.png b/data/magic-modules.mse-include/symbols/phenomenon.png deleted file mode 100644 index c03c5de5a0..0000000000 Binary files a/data/magic-modules.mse-include/symbols/phenomenon.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/plane.png b/data/magic-modules.mse-include/symbols/plane.png deleted file mode 100644 index b66f79e5bd..0000000000 Binary files a/data/magic-modules.mse-include/symbols/plane.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/planeswalker.png b/data/magic-modules.mse-include/symbols/planeswalker.png deleted file mode 100644 index 4d7eb3a77f..0000000000 Binary files a/data/magic-modules.mse-include/symbols/planeswalker.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/readme.txt b/data/magic-modules.mse-include/symbols/readme.txt index 9bf22eb123..fcae4d9e6e 100644 --- a/data/magic-modules.mse-include/symbols/readme.txt +++ b/data/magic-modules.mse-include/symbols/readme.txt @@ -1,4 +1,5 @@ -#### Consider using the Namelines module instead of this one +#### Consider using the Namelines module instead of this one. +#### It encompasses transformation symbols, card symbols, names and casting costs, all at once. #### To use this include in a template, add the following in the template headers: depends on: @@ -11,54 +12,173 @@ include file: /magic-modules.mse-include/symbols/card_fields include file: /magic-modules.mse-include/symbols/card_fields_dfc include file: /magic-modules.mse-include/symbols/card_fields_tfc -#### Default Field Placement (@375x523, w=1 h=1) +#### Default Field Placement +#### For 375x523 templates, w = h = 1 +#### For 750x1046 templates, w = h = 2 +#### etc... transformation: - left: 13w, 319 mirrored + left: 13w, 319 right hand top: 19h width: 43w height: 43h + #### Customization -#### The symbols default to "none", defaults can be changed with +#### The symbol is composed of three parts: the background, the rim and the icon. +#### You can query the values selected by the user with the following functions: + +#### Shape of the icon (for example: "lesson", "compass", "front triangle", "back triangle", etc...) +transform_symbol_shape() + +#### Render options for the icon ("colored", "black", or "white") +transform_symbol_icon() + +#### Render options for the rim ("colored", "black", "white", or "none") +transform_symbol_rim() + +#### Render options for the background ("colored", "black", "white", or "none") +transform_symbol_background() + +#### Bevel and shadow options for the rim and icon (true or false) +transform_symbol_rim_has_bevel() +transform_symbol_rim_has_shadow() +transform_symbol_icon_has_bevel() +transform_symbol_icon_has_shadow() + +#### Is the symbol on the right of the card (true or false) +transform_symbol_is_right() + +#### Is the symbol icon mirrored (true or false, default false) +transform_symbol_is_mirrored() + +#### Each part of the symbol has default values. +#### The icon shape defaults to "front triangle" if it's a front face (that is, when it is linked to a back face), +#### "back triangle" if it's a back face, and "none" otherwise. To override this behavior, redefine this function: transform_symbol_default := { - stylesheet ## reload script when template changes - if margin_code == "transform1" then "front triangle" - else if margin_code == "transform2" then "back triangle" - else "eldrazi" + if get_back_face(card) != nil then "front triangle" + else if get_front_face(card) != nil then "back triangle" + else "none" } -#### Optionally, you can adjust global alignment by defining the following functions in the init script, -#### which must return an int corresponding to the number of pixels you want to shift things by: -#### To shift everything up/down: -transform_symbol_offset_top_1 := { 0 } +#### By default, the symbol is on the right when the card is both a back face, +#### and at the same time is not a modal DFC. In all other cases the symbol is on the left. +#### To override this behavior, redefine this function. It must output either "left" or "right". +transform_symbol_default_position := +{ + if get_front_face(card) != nil + and not contains(transform_symbol_shape(), match: "modal") + then "right" else "left" +} -#### To shift everything left/right: -transform_symbol_offset_left_1 := { 0 } +#### By default, the right-side icon is not mirrored relative to the left-side +#### To have the right-side be mirrored, redefine this function +transform_symbol_is_mirrored := +{ + transform_symbol_is_right() +} -#### To increase/decrease the size: +#### By default, the background of the symbol is colored if the card is a modal DFC, +#### and black otherwise. To override this behavior, redefine this function. +#### It must output either "colored", "black", "white" or "none". +transform_symbol_default_background := +{ + if contains(transform_symbol_shape(), match: "modal") + then "colored" else "black" +} + +#### By default, the symbol has a white rim around it. To override this behavior, redefine this function. +#### It must output either "colored", "black", "white" or "none". +transform_symbol_default_rim := +{ + "white" +} + +#### By default, the symbol has a black icon if the card is the front of a modal DFC, +#### and a white one otherwise. To override this behavior, redefine this function. +#### It must output either "colored", "black" or "white". +transform_symbol_default_icon := +{ + if transform_symbol_shape() == "modal front" + then "black" else "white" +} + +#### By default, the rim and icon have no bevel effect, and no shadow. +#### To override this behavior, redefine these functions. They must output either true or false. +transform_symbol_default_rim_bevel := { false } +transform_symbol_default_rim_shadow := { false } +transform_symbol_default_icon_bevel := { false } +transform_symbol_default_icon_shadow := { false } +#### To change the shadow color: +transform_symbol_default_rim_shadow_color := { if transform_symbol_background() == "black" or transform_symbol_icon() == "black" then rgb(100,100,100) else rgb(0,0,0) } +transform_symbol_default_icon_shadow_color := { if transform_symbol_background() == "black" or transform_symbol_icon() == "black" then rgb(100,100,100) else rgb(0,0,0) } + +#### To change the folder from which the symbol images are taken: +#### You must write the path of the folder starting from the data folder. +#### The image files must have the same names, and be placed in the same subfolders as the +#### ones in the default folder (/magic-modules.mse-include/symbols/), and must all be PNGs. +#### You can omit some images and it will use the default ones instead. +transform_symbol_image_folder := { "/magic-modules.mse-include/symbols/" } + +#### If there is only one color for all the frames, then instead of +#### making a folder containing the 8 variants (w u b r g m c a), +#### make a single PNG image file with the same name as that folder. + +#### If the modal symbols need to use the same background as the normal ones: +transform_symbol_modal_uses_normal_background := { true } + +#### If you need to move the icon placement within the symbol image: +transform_symbol_icon_offset_top := { 0 } +transform_symbol_icon_offset_left := { 0 } +transform_symbol_icon_offset_width := { 0 } +transform_symbol_icon_offset_height := { 0 } + +#### Optionally, you can adjust global alignment of the entire symbol by defining the following functions, +#### which must return an int corresponding to the number of pixels you want to shift things by: +transform_symbol_offset_top_1 := { 0 } +transform_symbol_offset_left_1 := { 0 } transform_symbol_offset_width_1 := { 0 } transform_symbol_offset_height_1 := { 0 } -#### To move the symbol to the right of the card: -transform_symbol_mirrored_1 := { true } - -#### When the symbol is on the right of the card, transform_symbol_offset_left_1's effect if flipped +#### When the symbol is on the right of the card, transform_symbol_offset_left_1's effect is flipped #### (Positive numbers will shift to the left) +#### When a symbol is present on the card, the name or casting cost need to move. +#### You can increase/decrease the amount by which they do: +name_transform_symbol_offset_left_1 := { 0 } +casting_cost_transform_symbol_offset_left_1 := { 0 } + #### For the other faces on DFCs use: transform_symbol_offset_top_2 := { 0 } transform_symbol_offset_left_2 := { 0 } transform_symbol_offset_width_2 := { 0 } transform_symbol_offset_height_2 := { 0 } -transform_symbol_offset_mirrored_2 := { 0 } transform_symbol_offset_top_3 := { 0 } transform_symbol_offset_left_3 := { 0 } transform_symbol_offset_width_3 := { 0 } transform_symbol_offset_height_3 := { 0 } -transform_symbol_offset_mirrored_3 := { 0 } +etc... #### You can disable the symbols on some of the faces, #### by adding the following functions in the init script: transform_symbol_disabled_1 := { true } transform_symbol_disabled_2 := { true } transform_symbol_disabled_3 := { true } + + + +#### A GIMP script is provided to turn normal symbol images into the kind of images this module uses. + +#### To Install this script, open GIMP 3.X or later, go to "Edit" menu > "Preferences", then under "Folders", select "Plug-ins". +#### Select one of the folders in the list, then click on the icon to the right labeled "Show file location in the file manager". +#### It will open the system explorer, navigate inside the folder named "plug-ins", then copy the folder (not the contents) +#### "data/magic-modules.mse-include/symbols/mse-transformation-symbols/" into this "plug-ins" folder. Restart GIMP. + +#### To use this script, open the blank symbol image "data/magic-modules.mse-include/symbols/blank.png", and add your symbol in the circle. +#### Your symbol must be white on the blank's black background. Save as a PNG into a folder. You may save multiple of these symbols there. +#### Then go to "Tools" menu > "Transformation Symbols...". Select the folder you saved your image in. Click OK. +#### This will create a sub folder in that folder named "shape", containing the converted version of all symbols in the folder. + +#### For custom symbols, move this folder to "data/magic-mainframe-extras.mse-include/" or a subfolder inside +#### An example is provided, the link "examples/symbols/weather.png" will load "weather.png" or "shape/weather.png" as needed. +#### For new built-in symbols, add the converted images to "data/magic-modules.mse-include/symbols/icon/shape/", +#### And remember to update the "choices" file and the require_exclusive_choice list in transform_symbol_script in "magic.mse-game/script" diff --git a/data/magic-modules.mse-include/symbols/rim/shape/modal back.png b/data/magic-modules.mse-include/symbols/rim/shape/modal back.png new file mode 100644 index 0000000000..9094f90513 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/shape/modal back.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/shape/modal front.png b/data/magic-modules.mse-include/symbols/rim/shape/modal front.png new file mode 100644 index 0000000000..b587edc60d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/shape/modal front.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/shape/normal.png b/data/magic-modules.mse-include/symbols/rim/shape/normal.png new file mode 100644 index 0000000000..1c41423f4a Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/shape/normal.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/a.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/a.png new file mode 100644 index 0000000000..c949ed694c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/a.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/b.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/b.png new file mode 100644 index 0000000000..e8fef88ddd Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/b.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/c.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/c.png new file mode 100644 index 0000000000..7f9235a10f Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/c.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/g.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/g.png new file mode 100644 index 0000000000..95053da26d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/g.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/m.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/m.png new file mode 100644 index 0000000000..f9e626221d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/m.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/r.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/r.png new file mode 100644 index 0000000000..7ac9db2207 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/r.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/u.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/u.png new file mode 100644 index 0000000000..5aca86c55c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/u.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal back/w.png b/data/magic-modules.mse-include/symbols/rim/texture/modal back/w.png new file mode 100644 index 0000000000..bfe914a37d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal back/w.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/a.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/a.png new file mode 100644 index 0000000000..23e104d58c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/a.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/b.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/b.png new file mode 100644 index 0000000000..1b84197e2f Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/b.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/c.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/c.png new file mode 100644 index 0000000000..2adad642d6 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/c.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/g.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/g.png new file mode 100644 index 0000000000..83b7451221 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/g.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/m.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/m.png new file mode 100644 index 0000000000..df05888763 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/m.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/r.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/r.png new file mode 100644 index 0000000000..2884328b30 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/r.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/u.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/u.png new file mode 100644 index 0000000000..79ce73cbe9 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/u.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/modal front/w.png b/data/magic-modules.mse-include/symbols/rim/texture/modal front/w.png new file mode 100644 index 0000000000..8ca7feb11d Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/modal front/w.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/a.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/a.png new file mode 100644 index 0000000000..fa586020f4 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/a.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/b.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/b.png new file mode 100644 index 0000000000..fc3ab3b714 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/b.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/c.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/c.png new file mode 100644 index 0000000000..f5086d4114 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/c.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/g.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/g.png new file mode 100644 index 0000000000..f8b416ec46 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/g.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/m.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/m.png new file mode 100644 index 0000000000..a9759ab48f Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/m.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/r.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/r.png new file mode 100644 index 0000000000..a26c303018 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/r.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/u.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/u.png new file mode 100644 index 0000000000..1befe47a1c Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/u.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/normal/w.png b/data/magic-modules.mse-include/symbols/rim/texture/normal/w.png new file mode 100644 index 0000000000..ae346d45cf Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/normal/w.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/off black.png b/data/magic-modules.mse-include/symbols/rim/texture/off black.png new file mode 100644 index 0000000000..8732ae45ba Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/off black.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/off white.png b/data/magic-modules.mse-include/symbols/rim/texture/off white.png new file mode 100644 index 0000000000..db81007286 Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/off white.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/pure black.png b/data/magic-modules.mse-include/symbols/rim/texture/pure black.png new file mode 100644 index 0000000000..c04fb129cd Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/pure black.png differ diff --git a/data/magic-modules.mse-include/symbols/rim/texture/pure white.png b/data/magic-modules.mse-include/symbols/rim/texture/pure white.png new file mode 100644 index 0000000000..e5e7d5e4fe Binary files /dev/null and b/data/magic-modules.mse-include/symbols/rim/texture/pure white.png differ diff --git a/data/magic-modules.mse-include/symbols/scheme.png b/data/magic-modules.mse-include/symbols/scheme.png deleted file mode 100644 index 1d84a11faa..0000000000 Binary files a/data/magic-modules.mse-include/symbols/scheme.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sorcery.png b/data/magic-modules.mse-include/symbols/sorcery.png deleted file mode 100644 index c47b45ed67..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sorcery.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker.png b/data/magic-modules.mse-include/symbols/sparker.png deleted file mode 100644 index 949918b5d9..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/artifact.png b/data/magic-modules.mse-include/symbols/sparker/artifact.png deleted file mode 100644 index b94eb24f2c..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/artifact.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/black.png b/data/magic-modules.mse-include/symbols/sparker/black.png deleted file mode 100644 index d99168d3c5..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/black.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/blue.png b/data/magic-modules.mse-include/symbols/sparker/blue.png deleted file mode 100644 index 2f34f57e17..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/blue.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/colorless.png b/data/magic-modules.mse-include/symbols/sparker/colorless.png deleted file mode 100644 index 72946024a6..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/colorless.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/green.png b/data/magic-modules.mse-include/symbols/sparker/green.png deleted file mode 100644 index 829cb389a1..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/green.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/multicolor.png b/data/magic-modules.mse-include/symbols/sparker/multicolor.png deleted file mode 100644 index 43410c3ec1..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/multicolor.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/red.png b/data/magic-modules.mse-include/symbols/sparker/red.png deleted file mode 100644 index 4b55e080ba..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/red.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/sparker/white.png b/data/magic-modules.mse-include/symbols/sparker/white.png deleted file mode 100644 index 7901759da7..0000000000 Binary files a/data/magic-modules.mse-include/symbols/sparker/white.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/specialized.png b/data/magic-modules.mse-include/symbols/specialized.png deleted file mode 100644 index 081c24c04d..0000000000 Binary files a/data/magic-modules.mse-include/symbols/specialized.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/structure.png b/data/magic-modules.mse-include/symbols/structure.png deleted file mode 100644 index a9e41c7abd..0000000000 Binary files a/data/magic-modules.mse-include/symbols/structure.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/tragedy.png b/data/magic-modules.mse-include/symbols/tragedy.png deleted file mode 100644 index 2ec7a028b8..0000000000 Binary files a/data/magic-modules.mse-include/symbols/tragedy.png and /dev/null differ diff --git a/data/magic-modules.mse-include/symbols/vanguard.png b/data/magic-modules.mse-include/symbols/vanguard.png deleted file mode 100644 index a1bc62ab18..0000000000 Binary files a/data/magic-modules.mse-include/symbols/vanguard.png and /dev/null differ diff --git a/data/magic.mse-game/card_fields b/data/magic.mse-game/card_fields index 9296ea2f05..b6fb0ab361 100644 --- a/data/magic.mse-game/card_fields +++ b/data/magic.mse-game/card_fields @@ -616,7 +616,7 @@ card field: ############################################################## Transform/Lesson card field: - type: choice + type: multiple choice name: transformation description: The transformation symbol of the card. show statistics: false @@ -624,9 +624,10 @@ card field: card list column: 0940 card list width: 100 include file: /magic-modules.mse-include/symbols/choices - default: stylesheet; transform_symbol_default(value, margin_code:"transform1") + default: stylesheet; card.linked_card_1; transform_symbol_default(value, margin_code:"transform1") + script: transform_symbol_script(value, margin_code:"transform1") card field: - type: choice + type: multiple choice name: transformation 2 description: The second transformation symbol of the card. show statistics: false @@ -634,9 +635,10 @@ card field: card list column: 0941 card list width: 100 include file: /magic-modules.mse-include/symbols/choices - default: stylesheet; transform_symbol_default(value, margin_code:"transform2") + default: stylesheet; card.linked_card_1; transform_symbol_default(value, margin_code:"transform2") + script: transform_symbol_script(value, margin_code:"transform2") card field: - type: choice + type: multiple choice name: transformation 3 description: The third transformation symbol of the card. show statistics: false @@ -644,7 +646,8 @@ card field: card list column: 0942 card list width: 100 include file: /magic-modules.mse-include/symbols/choices - default: stylesheet; transform_symbol_default(value, margin_code:"transform3") + default: stylesheet; card.linked_card_1; transform_symbol_default(value, margin_code:"transform3") + script: transform_symbol_script(value, margin_code:"transform3") ############################################################## Future Sight type symbols card field: diff --git a/data/magic.mse-game/script b/data/magic.mse-game/script index f3aeef5172..92cdb04a61 100644 --- a/data/magic.mse-game/script +++ b/data/magic.mse-game/script @@ -3364,67 +3364,417 @@ typesymbol_for := } typesymbol_type := { typesymbol_for(type) } ############################################################## Transform/Lesson symbols +############ Default behavior (input is the value of the field) transform_symbol_default := { - stylesheet - if margin_code == "transform1" then "none" - else if margin_code == "transform2" then "none" + if get_back_face(card) != nil then "front triangle" + else if get_front_face(card) != nil then "back triangle" else "none" } +transform_symbol_default_position := +{ + if get_front_face(card) != nil + and not contains(input, match: "modal") + then "right" else "left" +} +transform_symbol_default_background := +{ + if contains(input, match: "modal") + then "colored" else "black" +} +transform_symbol_default_rim := +{ + "white" +} +transform_symbol_default_rim_bevel := { false } +transform_symbol_default_rim_shadow := { false } +transform_symbol_default_rim_shadow_color := +{ + if transform_symbol_background(input) == "black" or transform_symbol_rim(input) == "black" then rgb(100,100,100) else rgb(0,0,0) +} +transform_symbol_default_icon := +{ + if contains(input, match: "modal front") + then "black" else "white" +} +transform_symbol_default_icon_bevel := { false } +transform_symbol_default_icon_mirror := { false } +transform_symbol_default_icon_shadow := { false } +transform_symbol_default_icon_shadow_color := +{ + if transform_symbol_background(input) == "black" or transform_symbol_icon(input) == "black" then rgb(100,100,100) else rgb(0,0,0) +} +transform_symbol_default_map := +[ + rim: + [ + render: { transform_symbol_default_rim() } + bevel: { transform_symbol_default_rim_bevel() } + shadow: { transform_symbol_default_rim_shadow() } + mirror: { false } + ] + icon: + [ + render: { transform_symbol_default_icon() } + bevel: { transform_symbol_default_icon_bevel() } + shadow: { transform_symbol_default_icon_shadow() } + mirror: { transform_symbol_default_icon_mirror() } + ] +] + +transform_symbol_script := +{ + input := transform_symbol_backwards_compatibility() + input := require_exclusive_choice(choices: "position default, position left, position right") + input := require_exclusive_choice(choices: "background default, background colored, background black, background white, background none") + if contains(last_change, match: "rim ") then input := transform_symbol_clean_option_choices(option: "rim") + else if contains(last_change, match: "icon ") then input := transform_symbol_clean_option_choices(option: "icon") + input := require_exclusive_choice(choices: "front triangle, " + + "day, " + + "moon, " + + "closed fan, " + + "meld, " + + "sparker, " + + "back triangle, " + + "night, " + + "eldrazi, " + + "compass, " + + "open fan, " + + "specialized, " + + "aetherprint, " + + "none, " + + "lesson, " + + "custom symbol one, " + + "custom symbol two, " + + "custom symbol three, " + + "custom symbol four, " + + "extra comedy, " + + "extra tragedy, " + + "modal front, " + + "modal back, " + + "multitype, " + + "artifact, " + + "battle, " + + "creature, " + + "enchantment, " + + "fortress, " + + "instant, " + + "land, " + + "planeswalker, " + + "sorcery, " + + "non standard conspiracy, " + + "non standard dungeon, " + + "non standard emblem, " + + "non standard hero, " + + "non standard phenomenon, " + + "non standard plane, " + + "non standard scheme, " + + "non standard vanguard") + input +} +transform_symbol_backwards_compatibility := + #### remove sparker and modal color options + replace@(match: "(sparker|modal front|modal back)( [(]colored[)])? (default|white|blue|black|red|green|multicolor|colorless|artifact)", replace: "_1") + + #### add new render options + { + if not chosen(input, choice: "position default") + and not chosen(input, choice: "position left") + and not chosen(input, choice: "position right") + then "position default, background default, rim default, icon default, " + input + else input + } +transform_symbol_clean_option_choices := +{ + #### If the user selected default, remove all other choices + if last_change == option + " default" then replace(input, match: option + " (colored|black|white|none|shadow|bevel|mirror), ", replace: "") + #### If the user selected something other than default, and we were on default, populate other options so they reflect the default values + else if contains(input, match: option + " default") then ( + input := replace(input, match: option + " default, ", replace: "") + bevel := contains(last_change, match: "bevel") + shadow := contains(last_change, match: "shadow") + mirror := contains(last_change, match: "mirror") + addition := (if bevel or shadow or mirror then ", " + option + " " + transform_symbol_default_map[option]["render"]() else "") + + (if not bevel and transform_symbol_default_map[option]["bevel"]() then ", " + option + " bevel" else "") + + (if not shadow and transform_symbol_default_map[option]["shadow"]() then ", " + option + " shadow" else "") + + (if not mirror and transform_symbol_default_map[option]["mirror"]() then ", " + option + " mirror" else "") + replace(input, match: last_change, replace: last_change + addition) + ) + #### If the user selected something other than default, and we weren't on default, just require exclusive + else require_exclusive_choice(input, choices: option + " colored, " + option + " black, " + option + " white, " + option + " none") +} + transform_symbol_field := { if input <= 1 then card.transformation else card["transformation_" + input] } -transform_symbol_is_mirrored := +transform_symbol_style := { if input <= 1 then card_style.transformation else card_style["transformation_" + input] } + +############ Actual values, taking into account user choices (input is the value of the field) +transform_symbol_shape := + replace@(match: "^.*, ", replace: "") + + replace@(match: "extra |non standard ", replace: "") +transform_symbol_background := +{ + if chosen(input, choice: "background default") then transform_symbol_default_background(input) + else if chosen(input, choice: "background colored") then "colored" + else if chosen(input, choice: "background black") then "black" + else if chosen(input, choice: "background white") then "white" + else "none" +} +transform_symbol_rim := +{ + if chosen(input, choice: "rim default") then transform_symbol_default_rim(input) + else if chosen(input, choice: "rim colored") then "colored" + else if chosen(input, choice: "rim black") then "black" + else if chosen(input, choice: "rim white") then "white" + else "none" +} +transform_symbol_icon := +{ + if chosen(input, choice: "icon default") then transform_symbol_default_icon(input) + else if chosen(input, choice: "icon colored") then "colored" + else if chosen(input, choice: "icon black") then "black" + else "white" +} +transform_symbol_is_empty := match@(match: ", none$") +transform_symbol_is_right := +{ + chosen(input, choice: "position right") + or ( + chosen(input, choice: "position default") + and transform_symbol_default_position(input) == "right" + ) +} +transform_symbol_rim_has_bevel := +{ + chosen(input, choice: "rim bevel") + or ( + chosen(input, choice: "rim default") + and transform_symbol_default_rim_bevel(input) + ) +} +transform_symbol_rim_has_shadow := +{ + chosen(input, choice: "rim shadow") + or ( + chosen(input, choice: "rim default") + and transform_symbol_default_rim_shadow(input) + ) +} +transform_symbol_icon_has_bevel := +{ + chosen(input, choice: "icon bevel") + or ( + chosen(input, choice: "icon default") + and transform_symbol_default_icon_bevel(input) + ) +} +transform_symbol_icon_has_shadow := +{ + chosen(input, choice: "icon shadow") + or ( + chosen(input, choice: "icon default") + and transform_symbol_default_icon_shadow(input) + ) +} +transform_symbol_icon_has_mirror := +{ + chosen(input, choice: "icon mirror") + or ( + chosen(input, choice: "icon default") + and transform_symbol_default_icon_mirror(input) + ) +} + +############ Image creation (input is the 'template' blending function input, so: w,u,b,r,g,m,c,a) +transform_symbol_background_image := +{ + color_name := "background/" + background + "/" + variant + "/" + input + ".png" + noncolor_name := "background/" + background + "/" + variant + ".png" + #### Try to find the folder with the color variants first, fall back on the non colored file, finally fall back on module files + image := if exists_in_package(transform_folder + color_name) then transform_folder + color_name + else if exists_in_package(transform_folder + noncolor_name) then transform_folder + noncolor_name + else if exists_in_package("/magic-modules.mse-include/symbols/" + color_name) then "/magic-modules.mse-include/symbols/" + color_name + else "/magic-modules.mse-include/symbols/" + noncolor_name + image := resize_image(image, width:width, height:height) + + if transform_right then image := flip_image(image, horizontal: true) + image +} +transform_symbol_rim_image := { - if input <= 1 - then transform_symbol_mirrored_1() - else if input == 2 - then transform_symbol_mirrored_2() - else transform_symbol_mirrored_3() + #### Get the image that contains the texture + color_name := if rim == "colored" then "/texture/" + variant + "/" + input + ".png" + else "/texture/" + (if transform_bevel_rim then "off " else "pure ") + rim + ".png" + noncolor_name := if rim == "colored" then "/texture/" + variant + ".png" else color_name + #### Try to find the folder with the color variants first, fall back on the non colored file, if still no dice try the icon files, finally fall back on module files + color_image := if exists_in_package(transform_folder + "rim" + color_name) then transform_folder + "rim" + color_name + else if exists_in_package(transform_folder + "rim" + noncolor_name) then transform_folder + "rim" + noncolor_name + else if exists_in_package(transform_folder + "icon" + color_name) then transform_folder + "icon" + color_name + else if exists_in_package(transform_folder + "icon" + noncolor_name) then transform_folder + "icon" + noncolor_name + else "/magic-modules.mse-include/symbols/rim" + color_name + color_image := resize_image(color_image, width:width, height:height) + + #### Get the image that contains the shape + shape_name := "rim/shape/" + variant + ".png" + shape_image := if exists_in_package(transform_folder + shape_name) then transform_folder + shape_name else "/magic-modules.mse-include/symbols/" + shape_name + shape_image := resize_image(shape_image, width:width, height:height) + if not transform_bevel_rim then shape_image := fill_image(shape_image, color: rgb(128,128,128)) + + #### Bake the texture onto the shape + rim_image := combine_blend(image1: color_image, image2: shape_image, combine: "lightmap relative") + + #### Mirror + if transform_right then rim_image := flip_image(rim_image, horizontal: true) + + #### Shadow last so the sun's position doesn't get flipped + if transform_shadow_rim then rim_image := add_drop_shadow(rim_image, offset_x: -0.04, offset_y: 0.03, alpha: 0.9, blur_radius: 0.01, color: transform_symbol_default_rim_shadow_color(transform_field)) + rim_image +} +transform_symbol_icon_image := +{ + #### Get the image that contains the texture + color_name := if icon == "colored" then "icon/texture/" + variant + "/" + input + ".png" + else "icon/texture/" + (if transform_bevel_icon then "off " else "pure ") + icon + ".png" + noncolor_name := if icon == "colored" then "icon/texture/" + variant + ".png" else color_name + #### Try to find the folder with the color variants first, fall back on the non colored file, finally fall back on module files + color_image := if exists_in_package(transform_folder + color_name) then transform_folder + color_name + else if exists_in_package(transform_folder + noncolor_name) then transform_folder + noncolor_name + else "/magic-modules.mse-include/symbols/" + color_name + color_image := resize_image(color_image, width:width, height:height) + + #### Get the image that contains the shape + shape_name := "icon/shape/" + transform_shape + ".png" + shape_image := if transform_custom_path != "" + then transform_custom_path + else if exists_in_package(transform_folder + shape_name) + then transform_folder + shape_name + else "/magic-modules.mse-include/symbols/" + shape_name + #### Offsets + shape_image := crop_image( + resize_image( + shape_image, + width:width+2*transform_symbol_icon_offset_width(transform_field), + height:height+2*transform_symbol_icon_offset_height(transform_field) + ), + offset_x: transform_symbol_icon_offset_width(transform_field)-transform_symbol_icon_offset_left(transform_field), + offset_y: transform_symbol_icon_offset_height(transform_field)-transform_symbol_icon_offset_top(transform_field), + width:width, + height:height + ) + if not transform_bevel_icon then shape_image := fill_image(shape_image, color: rgb(128,128,128)) + + #### Bake the texture onto the shape + icon_image := combine_blend(image1: color_image, image2: shape_image, combine: "lightmap relative") + + #### Mirror + if transform_mirror_icon then icon_image := flip_image(icon_image, horizontal: true) + + #### Shadow last so the sun's position doesn't get flipped + if transform_shadow_icon then icon_image := add_drop_shadow(icon_image, offset_x: -0.06, offset_y: 0.045, alpha: 0.9, blur_radius: 0.015, color: transform_symbol_default_icon_shadow_color(transform_field)) + icon_image +} +transform_symbol_template := +{ + icon := transform_symbol_icon(transform_field) + rim := transform_symbol_rim(transform_field) + background := transform_symbol_background(transform_field) + + variant := if transform_symbol_modal_uses_normal_background(transform_field) or not contains(transform_shape, match: "modal") then "normal" else transform_shape + if (background == "none" or transform_symbol_modal_uses_normal_background(transform_field)) and contains(transform_shape, match: "modal") then transform_shape := transform_shape + " centered" + + image := transform_symbol_icon_image(width:width, height:height, variant:variant) + + if rim != "none" then ( + rim_image := transform_symbol_rim_image(width:width, height:height, variant:variant) + image := insert_image(base_image: rim_image, inserted_image: image, offset_x: 0, offset_y: 0) + ) + if background != "none" then ( + background_image := transform_symbol_background_image(width:width, height:height, variant:variant) + image := insert_image(base_image: background_image, inserted_image: image, offset_x: 0, offset_y: 0) + ) + + image } transform_symbol_image := { - map := face_coordinates_map(face) - if map.width == 0 or map.height == 0 + face_map := face_coordinates_map(face) + if face_map.width == 0 or face_map.height == 0 then "" else ( - shape := transform_symbol_field(face) - link := clean_transform_symbol_shape(shape) - if transform_symbol_is_mirrored(face) then link := flip_transform_symbol_shape(link) - if contains(link, match:"/default") then ( - color := sparker_card_color(card_color_field(face)) - link := replace(link, match:"/default", replace:"/"+color) + transform_field := transform_symbol_field(face) + transform_shape := transform_symbol_shape(transform_field) + + ## check for custom icon + transform_custom_path := "" + slug := "" + old_custom := true + custom_syms := ["custom symbol one", "custom symbol two", "custom symbol three", "custom symbol four"] + sym_index := position(of:transform_shape in:custom_syms) + if sym_index >= 0 then slug := custom_symbol_slug(sym_index+1) + if slug != "" then ( + fs := split_custom_directory(slug) + transform_custom_path := "/magic-mainframe-extras.mse-include/" + fs.directory + "shape/" + fs.filename + old_custom := not exists_in_package(transform_custom_path) + if old_custom then transform_custom_path := "" ) - case shape of - "none": "", - "custom symbol one": custom_symbol_1(), - "custom symbol two": custom_symbol_2(), - "custom symbol three": custom_symbol_3(), - "custom symbol four": custom_symbol_4(), - else: "/magic-modules.mse-include/symbols/" + link + ".png"; - ) -} -clean_transform_symbol_shape := - replace@(match: "modal front ", replace: "modalfront/") + - replace@(match: "modal back ", replace: "modalback/") + - replace@(match: "sparker [(]colored[)] ", replace: "sparker/") + - replace@(match: "extra |non standard ", replace: "") -flip_transform_symbol_shape := - replace@(match: "modalfront/", replace: "modalfrontflipped/") + - replace@(match: "modalback/", replace: "modalbackflipped/") + + if transform_shape == "none" then "" + else if sym_index >= 0 and old_custom then ( + funcs := [custom_symbol_1, custom_symbol_2, custom_symbol_3, custom_symbol_4] + funcs[sym_index]() + ) + else ( + transform_style := transform_symbol_style(face) + transform_bevel_rim := transform_symbol_rim_has_bevel(transform_field) + transform_shadow_rim := transform_symbol_rim_has_shadow(transform_field) + transform_bevel_icon := transform_symbol_icon_has_bevel(transform_field) + transform_shadow_icon := transform_symbol_icon_has_shadow(transform_field) + transform_mirror_icon := transform_symbol_icon_has_mirror(transform_field) + transform_right := transform_symbol_is_right(transform_field) + transform_folder := transform_symbol_image_folder(transform_field) + if not ends_dash(transform_folder) then transform_folder := transform_folder + "/" + + template := transform_symbol_template + colored_lands := false + color_background( + input: card_color_field(face), + type: "whatever", + base_hybrid: cropped_card_hybrid, + multicolor_blend: "white" + hybrid_blend: "white" + artifact_blend: "white" + offset_x: transform_style.left, + offset_y: transform_style.top, + width: transform_style.width, + height: transform_style.height, + face_width: face_map.width, + face_height: face_map.height + ) + ) + ) +} + +transform_symbol_icon_offset_top := { 0 } +transform_symbol_icon_offset_left := { 0 } +transform_symbol_icon_offset_width := { 0 } +transform_symbol_icon_offset_height := { 0 } + +transform_symbol_image_folder := { "/magic-modules.mse-include/symbols/" } +transform_symbol_modal_uses_normal_background := { false } #### General form transform_symbol_left := { map := face_coordinates_map(face) - mirrored := transform_symbol_is_mirrored(1) - if mirrored then offset := -offset + transform_field := transform_symbol_field(face) + right_side := transform_symbol_is_right(transform_field) + if right_side then offset := -offset if map.width > map.height then ( - if mirrored then map.left + 455 * map.width/523 + offset + if right_side then map.left + 455 * map.width/523 + offset else map.left + 52 * map.width/523 + offset ) else ( - if mirrored then map.left + 319 * map.width/375 + offset + if right_side then map.left + 319 * map.width/375 + offset else map.left + 13 * map.width/375 + offset ) } @@ -3453,39 +3803,36 @@ transform_symbol_height := #### Specific faces transform_symbol_face_1 := { 1 } transform_symbol_disabled_1 := { false } -transform_symbol_mirrored_1 := { false } transform_symbol_offset_top_1 := { 0 } transform_symbol_offset_left_1 := { 0 } transform_symbol_offset_width_1 := { 0 } transform_symbol_offset_height_1 := { 0 } -transform_symbol_left_1 := { transform_symbol_left(face:transform_symbol_face_1(), offset:transform_symbol_offset_left_1()) } -transform_symbol_top_1 := { transform_symbol_top(face:transform_symbol_face_1(), offset:transform_symbol_offset_top_1()) } -transform_symbol_width_1 := { transform_symbol_width(face:transform_symbol_face_1(), offset:transform_symbol_offset_width_1()) } -transform_symbol_height_1 := { transform_symbol_height(face:transform_symbol_face_1(), offset:transform_symbol_offset_height_1()) } +transform_symbol_left_1 := { transform_symbol_left(face:transform_symbol_face_1(), offset:transform_symbol_offset_left_1(transform_symbol_field(1))) } +transform_symbol_top_1 := { transform_symbol_top(face:transform_symbol_face_1(), offset:transform_symbol_offset_top_1(transform_symbol_field(1))) } +transform_symbol_width_1 := { transform_symbol_width(face:transform_symbol_face_1(), offset:transform_symbol_offset_width_1(transform_symbol_field(1))) } +transform_symbol_height_1 := { transform_symbol_height(face:transform_symbol_face_1(), offset:transform_symbol_offset_height_1(transform_symbol_field(1))) } transform_symbol_face_2 := { 2 } transform_symbol_disabled_2 := { false } -transform_symbol_mirrored_2 := { false } transform_symbol_offset_top_2 := { 0 } transform_symbol_offset_left_2 := { 0 } transform_symbol_offset_width_2 := { 0 } transform_symbol_offset_height_2 := { 0 } -transform_symbol_left_2 := { transform_symbol_left(face:transform_symbol_face_2(), offset:transform_symbol_offset_left_2()) } -transform_symbol_top_2 := { transform_symbol_top(face:transform_symbol_face_2(), offset:transform_symbol_offset_top_2()) } -transform_symbol_width_2 := { transform_symbol_width(face:transform_symbol_face_2(), offset:transform_symbol_offset_width_2()) } -transform_symbol_height_2 := { transform_symbol_height(face:transform_symbol_face_2(), offset:transform_symbol_offset_height_2()) } +transform_symbol_left_2 := { transform_symbol_left(face:transform_symbol_face_2(), offset:transform_symbol_offset_left_2(transform_symbol_field(2))) } +transform_symbol_top_2 := { transform_symbol_top(face:transform_symbol_face_2(), offset:transform_symbol_offset_top_2(transform_symbol_field(2))) } +transform_symbol_width_2 := { transform_symbol_width(face:transform_symbol_face_2(), offset:transform_symbol_offset_width_2(transform_symbol_field(2))) } +transform_symbol_height_2 := { transform_symbol_height(face:transform_symbol_face_2(), offset:transform_symbol_offset_height_2(transform_symbol_field(2))) } transform_symbol_face_3 := { 3 } transform_symbol_disabled_3 := { false } -transform_symbol_mirrored_3 := { false } transform_symbol_offset_top_3 := { 0 } transform_symbol_offset_left_3 := { 0 } transform_symbol_offset_width_3 := { 0 } transform_symbol_offset_height_3 := { 0 } -transform_symbol_left_3 := { transform_symbol_left(face:transform_symbol_face_3(), offset:transform_symbol_offset_left_3()) } -transform_symbol_top_3 := { transform_symbol_top(face:transform_symbol_face_3(), offset:transform_symbol_offset_top_3()) } -transform_symbol_width_3 := { transform_symbol_width(face:transform_symbol_face_3(), offset:transform_symbol_offset_width_3()) } -transform_symbol_height_3 := { transform_symbol_height(face:transform_symbol_face_3(), offset:transform_symbol_offset_height_3()) } +transform_symbol_left_3 := { transform_symbol_left(face:transform_symbol_face_3(), offset:transform_symbol_offset_left_3(transform_symbol_field(3))) } +transform_symbol_top_3 := { transform_symbol_top(face:transform_symbol_face_3(), offset:transform_symbol_offset_top_3(transform_symbol_field(3))) } +transform_symbol_width_3 := { transform_symbol_width(face:transform_symbol_face_3(), offset:transform_symbol_offset_width_3(transform_symbol_field(3))) } +transform_symbol_height_3 := { transform_symbol_height(face:transform_symbol_face_3(), offset:transform_symbol_offset_height_3(transform_symbol_field(3))) } ############################################################## Tombstone/Alchemy symbols card_symbol_default := { "" } @@ -4275,11 +4622,10 @@ casting_cost_height := casting_cost_transform_symbol_shift := { - if transform_symbol_field(face) == "none" or disabled - then 0 + if disabled then 0 else ( map := face_coordinates_map(face) - 29 * -(min(map.width, map.height)/375) - offset + 29 * -(min(map.width, map.height)/375) + offset ) } @@ -4288,33 +4634,60 @@ casting_cost_offset_top_1 := { 0 } casting_cost_offset_left_1 := { 0 } casting_cost_offset_width_1 := { 0 } casting_cost_offset_height_1 := { 0 } +casting_cost_transform_symbol_offset_left_1 := { 0 } casting_cost_right_1 := { casting_cost_right(face:nameline_face_1(), offset:casting_cost_offset_left_1()) } casting_cost_top_1 := { casting_cost_top(face:nameline_face_1(), offset:casting_cost_offset_top_1()) } casting_cost_width_1 := { casting_cost_width(face:nameline_face_1(), offset:casting_cost_offset_width_1()) } casting_cost_height_1 := { casting_cost_height(face:nameline_face_1(), offset:casting_cost_offset_height_1()) } -casting_cost_transform_symbol_shift_1 := { casting_cost_transform_symbol_shift(face:nameline_face_1(), offset:name_transform_symbol_offset_left_1() + nameline_offset_height_1(), disabled:transform_symbol_disabled_1() or (not transform_symbol_mirrored_1())) } +casting_cost_transform_symbol_shift_1 := +{ + transform_field := transform_symbol_field(1) + casting_cost_transform_symbol_shift( + face: nameline_face_1(), + offset: casting_cost_transform_symbol_offset_left_1(transform_field) - nameline_offset_height_1(), + disabled: transform_symbol_disabled_1() or transform_symbol_shape(transform_field) == "none" or not transform_symbol_is_right(transform_field) + ) +} casting_cost_disabled_2 := { false } casting_cost_offset_top_2 := { 0 } casting_cost_offset_left_2 := { 0 } casting_cost_offset_width_2 := { 0 } casting_cost_offset_height_2 := { 0 } +casting_cost_transform_symbol_offset_left_2 := { 0 } casting_cost_right_2 := { casting_cost_right(face:nameline_face_2(), offset:casting_cost_offset_left_2()) } casting_cost_top_2 := { casting_cost_top(face:nameline_face_2(), offset:casting_cost_offset_top_2()) } casting_cost_width_2 := { casting_cost_width(face:nameline_face_2(), offset:casting_cost_offset_width_2()) } casting_cost_height_2 := { casting_cost_height(face:nameline_face_2(), offset:casting_cost_offset_height_2()) } -casting_cost_transform_symbol_shift_2 := { casting_cost_transform_symbol_shift(face:nameline_face_2(), offset:name_transform_symbol_offset_left_2() + nameline_offset_height_2(), disabled:transform_symbol_disabled_2() or (not transform_symbol_mirrored_2())) } +casting_cost_transform_symbol_shift_2 := +{ + transform_field := transform_symbol_field(2) + casting_cost_transform_symbol_shift( + face: nameline_face_2(), + offset: casting_cost_transform_symbol_offset_left_2(transform_field) - nameline_offset_height_2(), + disabled: transform_symbol_disabled_2() or transform_symbol_shape(transform_field) == "none" or not transform_symbol_is_right(transform_field) + ) +} casting_cost_disabled_3 := { false } casting_cost_offset_top_3 := { 0 } casting_cost_offset_left_3 := { 0 } casting_cost_offset_width_3 := { 0 } casting_cost_offset_height_3 := { 0 } +casting_cost_transform_symbol_offset_left_3 := { 0 } casting_cost_right_3 := { casting_cost_right(face:nameline_face_3(), offset:casting_cost_offset_left_3()) } casting_cost_top_3 := { casting_cost_top(face:nameline_face_3(), offset:casting_cost_offset_top_3()) } casting_cost_width_3 := { casting_cost_width(face:nameline_face_3(), offset:casting_cost_offset_width_3()) } casting_cost_height_3 := { casting_cost_height(face:nameline_face_3(), offset:casting_cost_offset_height_3()) } -casting_cost_transform_symbol_shift_3 := { casting_cost_transform_symbol_shift(face:nameline_face_3(), offset:name_transform_symbol_offset_left_3() + nameline_offset_height_3(), disabled:transform_symbol_disabled_3() or (not transform_symbol_mirrored_3())) } +casting_cost_transform_symbol_shift_3 := +{ + transform_field := transform_symbol_field(3) + casting_cost_transform_symbol_shift( + face: nameline_face_3(), + offset: casting_cost_transform_symbol_offset_left_3(transform_field) - nameline_offset_height_3(), + disabled: transform_symbol_disabled_3() or transform_symbol_shape(transform_field) == "none" or not transform_symbol_is_right(transform_field) + ) +} ############################################################## Name offsets name_left := @@ -4348,8 +4721,7 @@ name_height := name_transform_symbol_shift := { - if transform_symbol_field(face) == "none" or card_symbol_field(face) == "none" or disabled - then 0 + if disabled then 0 else ( map := face_coordinates_map(face) 29 * (min(map.width, map.height)/375) + offset @@ -4377,8 +4749,16 @@ name_left_1 := { name_left(face:nameline_face_1(), offset:name_offset_left_1 name_top_1 := { name_top(face:nameline_face_1(), offset:name_offset_top_1()) } name_right_1 := { name_right(face:nameline_face_1(), offset:name_offset_right_1()) } name_height_1 := { name_height(face:nameline_face_1(), offset:name_offset_height_1()) } -name_card_symbol_shift_1 := { name_card_symbol_shift(face:nameline_face_1(), offset:name_card_symbol_offset_left_1(), disabled:card_symbol_disabled_1()) } -name_transform_symbol_shift_1 := { name_transform_symbol_shift(face:nameline_face_1(), offset:name_transform_symbol_offset_left_1() + nameline_offset_height_1(), disabled:transform_symbol_disabled_1() or transform_symbol_mirrored_1()) } +name_card_symbol_shift_1 := { name_card_symbol_shift(face:nameline_face_1(), offset:name_card_symbol_offset_left_1(), disabled:card_symbol_disabled_1()) } +name_transform_symbol_shift_1 := +{ + transform_field := transform_symbol_field(1) + name_transform_symbol_shift( + face:nameline_face_1(), + offset:name_transform_symbol_offset_left_1(transform_field) + nameline_offset_height_1(), + disabled: transform_symbol_disabled_1() or transform_symbol_shape(transform_field) == "none" or transform_symbol_is_right(transform_field) + ) +} name_disabled_2 := { false } name_offset_top_2 := { 0 } @@ -4392,8 +4772,16 @@ name_left_2 := { name_left(face:nameline_face_2(), offset:name_offset_left_2 name_top_2 := { name_top(face:nameline_face_2(), offset:name_offset_top_2()) } name_right_2 := { name_right(face:nameline_face_2(), offset:name_offset_right_2()) } name_height_2 := { name_height(face:nameline_face_2(), offset:name_offset_height_2()) } -name_card_symbol_shift_2 := { name_card_symbol_shift(face:nameline_face_2(), offset:name_card_symbol_offset_left_2(), disabled:card_symbol_disabled_2()) } -name_transform_symbol_shift_2 := { name_transform_symbol_shift(face:nameline_face_2(), offset:name_transform_symbol_offset_left_2() + nameline_offset_height_2(), disabled:transform_symbol_disabled_2() or transform_symbol_mirrored_2()) } +name_card_symbol_shift_2 := { name_card_symbol_shift(face:nameline_face_2(), offset:name_card_symbol_offset_left_2(), disabled:card_symbol_disabled_2()) } +name_transform_symbol_shift_2 := +{ + transform_field := transform_symbol_field(2) + name_transform_symbol_shift( + face:nameline_face_2(), + offset:name_transform_symbol_offset_left_2(transform_field) + nameline_offset_height_2(), + disabled: transform_symbol_disabled_2() or transform_symbol_shape(transform_field) == "none" or transform_symbol_is_right(transform_field) + ) +} name_disabled_3 := { false } name_offset_top_3 := { 0 } @@ -4407,8 +4795,16 @@ name_left_3 := { name_left(face:nameline_face_3(), offset:name_offset_left_3 name_top_3 := { name_top(face:nameline_face_3(), offset:name_offset_top_3()) } name_right_3 := { name_right(face:nameline_face_3(), offset:name_offset_right_3()) } name_height_3 := { name_height(face:nameline_face_3(), offset:name_offset_height_3()) } -name_card_symbol_shift_3 := { name_card_symbol_shift(face:nameline_face_3(), offset:name_card_symbol_offset_left_3(), disabled:card_symbol_disabled_3()) } -name_transform_symbol_shift_3 := { name_transform_symbol_shift(face:nameline_face_3(), offset:name_transform_symbol_offset_left_3() + nameline_offset_height_3(), disabled:transform_symbol_disabled_3() or transform_symbol_mirrored_3()) } +name_card_symbol_shift_3 := { name_card_symbol_shift(face:nameline_face_3(), offset:name_card_symbol_offset_left_3(), disabled:card_symbol_disabled_3()) } +name_transform_symbol_shift_3 := +{ + transform_field := transform_symbol_field(3) + name_transform_symbol_shift( + face:nameline_face_3(), + offset:name_transform_symbol_offset_left_3(transform_field) + nameline_offset_height_3(), + disabled: transform_symbol_disabled_3() or transform_symbol_shape(transform_field) == "none" or transform_symbol_is_right(transform_field) + ) +} ############################################################## Nameline offsets nameline_face_1 := { 1 } @@ -4768,15 +5164,24 @@ verify_symbol_image := { ) ) } + +custom_symbol_slug := { + style_src := styling["custom_symbol_{input}"] or else styling["custom_symbol_{english_number(input)}"] or else styling.custom_symbol or else "" + src := if style_src != "" then style_src else set["custom_symbol_{input}"] + array := split_comma(src) + if not has_png(array.0) or (array.1 or else "" == "Not found") + then "" + else array.0 +} custom_symbol_image := { src := if style_src != "" then style_src else set["custom_symbol_"+input] array := split_comma(src) if not has_png(array.0) or (array.1 or else "" == "Not found") - then "/magic-modules.mse-include/symbols/aetherprint.png" + then "/magic-modules.mse-include/symbols/not found.png" else ( link := "/magic-mainframe-extras.mse-include/" + array.0 if array.3 or else "" == "+" then link := enlarge(link, border_size:0.189) - link + to_image(link) ) }@(style_src:"") custom_symbol_1 := { diff --git a/data/magic.mse-game/set_fields b/data/magic.mse-game/set_fields index 36137b8956..3d94b11541 100644 --- a/data/magic.mse-game/set_fields +++ b/data/magic.mse-game/set_fields @@ -381,22 +381,22 @@ set field: set field: type: text name: custom symbol 1 - description: Set this image in magic-symbols.mse-include as Custom Symbol 1. Symbols less than 512px wide will be padded by 19%, change + to - to disable. + description: Set this image in magic-mainframe-extras.mse-include as Custom Symbol 1. Symbols less than 512px wide will be padded by 19%, change + to - to disable. script: verify_symbol_image(value) set field: type: text name: custom symbol 2 - description: Set this image in magic-symbols.mse-include as Custom Symbol 2. Symbols less than 512px wide will be padded by 19%, change + to - to disable. + description: Set this image in magic-mainframe-extras.mse-include as Custom Symbol 2. Symbols less than 512px wide will be padded by 19%, change + to - to disable. script: verify_symbol_image(value) set field: type: text name: custom symbol 3 - description: Set this image in magic-symbols.mse-include as Custom Symbol 3. Symbols less than 512px wide will be padded by 19%, change + to - to disable. + description: Set this image in magic-mainframe-extras.mse-include as Custom Symbol 3. Symbols less than 512px wide will be padded by 19%, change + to - to disable. script: verify_symbol_image(value) set field: type: text name: custom symbol 4 - description: Set this image in magic-symbols.mse-include as Custom Symbol 4. Symbols less than 512px wide will be padded by 19%, change + to - to disable. + description: Set this image in magic-mainframe-extras.mse-include as Custom Symbol 4. Symbols less than 512px wide will be padded by 19%, change + to - to disable. script: verify_symbol_image(value) diff --git a/data/magic.mse-game/symbols/menu_choice_images b/data/magic.mse-game/symbols/menu_choice_images index eeee962560..8405703819 100644 --- a/data/magic.mse-game/symbols/menu_choice_images +++ b/data/magic.mse-game/symbols/menu_choice_images @@ -16,35 +16,8 @@ choice images: aetherprint: /magic.mse-game/symbols/aetherprint.png sparker: /magic.mse-game/symbols/sparker.png - sparker (colored) default: /magic.mse-game/symbols/sparker.png - sparker (colored) white: /magic.mse-game/symbols/sparker/white.png - sparker (colored) blue: /magic.mse-game/symbols/sparker/blue.png - sparker (colored) black: /magic.mse-game/symbols/sparker/black.png - sparker (colored) red: /magic.mse-game/symbols/sparker/red.png - sparker (colored) green: /magic.mse-game/symbols/sparker/green.png - sparker (colored) multicolor: /magic.mse-game/symbols/sparker/multicolor.png - sparker (colored) colorless: /magic.mse-game/symbols/sparker/colorless.png - sparker (colored) artifact: /magic.mse-game/symbols/sparker/artifact.png - - modal front default: /magic.mse-game/symbols/modalfront/colorless.png - modal front white: /magic.mse-game/symbols/modalfront/white.png - modal front blue: /magic.mse-game/symbols/modalfront/blue.png - modal front black: /magic.mse-game/symbols/modalfront/black.png - modal front red: /magic.mse-game/symbols/modalfront/red.png - modal front green: /magic.mse-game/symbols/modalfront/green.png - modal front multicolor: /magic.mse-game/symbols/modalfront/multicolor.png - modal front colorless: /magic.mse-game/symbols/modalfront/colorless.png - modal front artifact: /magic.mse-game/symbols/modalfront/artifact.png - - modal back default: /magic.mse-game/symbols/modalback/colorless.png - modal back white: /magic.mse-game/symbols/modalback/white.png - modal back blue: /magic.mse-game/symbols/modalback/blue.png - modal back black: /magic.mse-game/symbols/modalback/black.png - modal back red: /magic.mse-game/symbols/modalback/red.png - modal back green: /magic.mse-game/symbols/modalback/green.png - modal back multicolor: /magic.mse-game/symbols/modalback/multicolor.png - modal back colorless: /magic.mse-game/symbols/modalback/colorless.png - modal back artifact: /magic.mse-game/symbols/modalback/artifact.png + modal front: /magic.mse-game/symbols/modal front.png + modal back: /magic.mse-game/symbols/modal back.png multitype: /magic.mse-game/symbols/multitype.png artifact: /magic.mse-game/symbols/artifact.png diff --git a/data/magic.mse-game/symbols/modalback/black.png b/data/magic.mse-game/symbols/modal back.png similarity index 100% rename from data/magic.mse-game/symbols/modalback/black.png rename to data/magic.mse-game/symbols/modal back.png diff --git a/data/magic.mse-game/symbols/modalfront/black.png b/data/magic.mse-game/symbols/modal front.png similarity index 100% rename from data/magic.mse-game/symbols/modalfront/black.png rename to data/magic.mse-game/symbols/modal front.png diff --git a/data/magic.mse-game/symbols/modalback/artifact.png b/data/magic.mse-game/symbols/modalback/artifact.png deleted file mode 100644 index 02dc55b496..0000000000 Binary files a/data/magic.mse-game/symbols/modalback/artifact.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalback/blue.png b/data/magic.mse-game/symbols/modalback/blue.png deleted file mode 100644 index 7d2a883ba6..0000000000 Binary files a/data/magic.mse-game/symbols/modalback/blue.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalback/colorless.png b/data/magic.mse-game/symbols/modalback/colorless.png deleted file mode 100644 index 52e96102ac..0000000000 Binary files a/data/magic.mse-game/symbols/modalback/colorless.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalback/green.png b/data/magic.mse-game/symbols/modalback/green.png deleted file mode 100644 index 51b50cb3b7..0000000000 Binary files a/data/magic.mse-game/symbols/modalback/green.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalback/multicolor.png b/data/magic.mse-game/symbols/modalback/multicolor.png deleted file mode 100644 index 6f5bc8c8e4..0000000000 Binary files a/data/magic.mse-game/symbols/modalback/multicolor.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalback/red.png b/data/magic.mse-game/symbols/modalback/red.png deleted file mode 100644 index 023c1bc08c..0000000000 Binary files a/data/magic.mse-game/symbols/modalback/red.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalback/white.png b/data/magic.mse-game/symbols/modalback/white.png deleted file mode 100644 index 03a822c16d..0000000000 Binary files a/data/magic.mse-game/symbols/modalback/white.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalfront/artifact.png b/data/magic.mse-game/symbols/modalfront/artifact.png deleted file mode 100644 index fca3817810..0000000000 Binary files a/data/magic.mse-game/symbols/modalfront/artifact.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalfront/blue.png b/data/magic.mse-game/symbols/modalfront/blue.png deleted file mode 100644 index a97500ba2f..0000000000 Binary files a/data/magic.mse-game/symbols/modalfront/blue.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalfront/colorless.png b/data/magic.mse-game/symbols/modalfront/colorless.png deleted file mode 100644 index e6f55776ca..0000000000 Binary files a/data/magic.mse-game/symbols/modalfront/colorless.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalfront/green.png b/data/magic.mse-game/symbols/modalfront/green.png deleted file mode 100644 index b261735f3e..0000000000 Binary files a/data/magic.mse-game/symbols/modalfront/green.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalfront/multicolor.png b/data/magic.mse-game/symbols/modalfront/multicolor.png deleted file mode 100644 index 21b8430ccd..0000000000 Binary files a/data/magic.mse-game/symbols/modalfront/multicolor.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalfront/red.png b/data/magic.mse-game/symbols/modalfront/red.png deleted file mode 100644 index a841fadf88..0000000000 Binary files a/data/magic.mse-game/symbols/modalfront/red.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/modalfront/white.png b/data/magic.mse-game/symbols/modalfront/white.png deleted file mode 100644 index 08e15438bf..0000000000 Binary files a/data/magic.mse-game/symbols/modalfront/white.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/not found.png b/data/magic.mse-game/symbols/not found.png new file mode 100644 index 0000000000..a4fa98bb71 Binary files /dev/null and b/data/magic.mse-game/symbols/not found.png differ diff --git a/data/magic.mse-game/symbols/sparker/artifact.png b/data/magic.mse-game/symbols/sparker/artifact.png deleted file mode 100644 index b8daeb1f8f..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/artifact.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/sparker/black.png b/data/magic.mse-game/symbols/sparker/black.png deleted file mode 100644 index cf7f1d8de0..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/black.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/sparker/blue.png b/data/magic.mse-game/symbols/sparker/blue.png deleted file mode 100644 index 9c291a60d3..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/blue.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/sparker/colorless.png b/data/magic.mse-game/symbols/sparker/colorless.png deleted file mode 100644 index 06d3d2ab2e..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/colorless.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/sparker/green.png b/data/magic.mse-game/symbols/sparker/green.png deleted file mode 100644 index f632dbda77..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/green.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/sparker/multicolor.png b/data/magic.mse-game/symbols/sparker/multicolor.png deleted file mode 100644 index 6a1dfa4b7b..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/multicolor.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/sparker/red.png b/data/magic.mse-game/symbols/sparker/red.png deleted file mode 100644 index 2b525f50d0..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/red.png and /dev/null differ diff --git a/data/magic.mse-game/symbols/sparker/white.png b/data/magic.mse-game/symbols/sparker/white.png deleted file mode 100644 index 1ef0730f30..0000000000 Binary files a/data/magic.mse-game/symbols/sparker/white.png and /dev/null differ