card_fields rewrite and magic-modules.mse-include (#21)

Overhauls the card_fields file to allow for template designers more freedom in manipulating data.

Adds magic-modules.mse-include, a large scale include file for building templates in a standardized way. Applying this to existing frames will be coming in future updates.
This commit is contained in:
GenevensiS
2024-05-25 00:57:47 +02:00
committed by GitHub
parent 44b059e2f7
commit fd4b8e4c89
1195 changed files with 13325 additions and 3633 deletions

View File

@@ -9,18 +9,18 @@
########################################################################
include file: masks
mask_hybrid_with_land := { false }
mask_hybrid_with_gold := { false }
mask_multi_land_with_color := { false }
template := { input + "{type}.jpg" }
land_template := { ( if input == "a" then "c" else input)+ "l{type}.jpg" }
offset := 0
mask_hybrid_with_land := { false }
mask_hybrid_with_gold := { false }
mask_multi_land_with_color := { false }
template := { input + "{type}.jpg" }
land_template := { ( if input == "a" then "c" else input) + "l{type}.jpg" }
offset := 0
# For what value should thumbnails of hybrids be made?
hybrid_previews := "hybrid"
hybrid_previews := "hybrid"
# Are there templates for colored lands, land_template(...)?
colored_lands := true
trim_colors :=
colored_lands := true
trim_colors :=
replace@(match:"(, )?(multicolor|hybrid|artifact|land|horizontal|vertical|radial)", replace:"")
watermark_colors := {
@@ -41,27 +41,27 @@ hybrid_color := {
check_colors := card.card_color
if face != "" then check_colors := face
trimmed := trim_colors(check_colors)
if trimmed == "white, blue" then "wu"
else if trimmed == "white, black" then "wb"
else if trimmed == "white, red" then "rw"
else if trimmed == "white, green" then "gw"
else if trimmed == "blue, black" then "ub"
else if trimmed == "blue, red" then "ur"
else if trimmed == "blue, green" then "gu"
else if trimmed == "black, red" then "br"
else if trimmed == "black, green" then "bg"
else if trimmed == "red, green" then "rg"
else if trimmed == "white, blue, reversed" then "uw"
else if trimmed == "white, black, reversed" then "bw"
else if trimmed == "white, red, reversed" then "wr"
else if trimmed == "white, green, reversed" then "wg"
else if trimmed == "blue, black, reversed" then "bu"
else if trimmed == "blue, red, reversed" then "ru"
else if trimmed == "blue, green, reversed" then "ug"
else if trimmed == "black, red, reversed" then "rb"
else if trimmed == "black, green, reversed" then "bg"
else if trimmed == "red, green, reversed" then "gr"
else "mm"
if trimmed == "white, blue" then "wu"
else if trimmed == "white, black" then "wb"
else if trimmed == "white, red" then "rw"
else if trimmed == "white, green" then "gw"
else if trimmed == "blue, black" then "ub"
else if trimmed == "blue, red" then "ur"
else if trimmed == "blue, green" then "gu"
else if trimmed == "black, red" then "br"
else if trimmed == "black, green" then "bg"
else if trimmed == "red, green" then "rg"
else if trimmed == "white, blue, reversed" then "uw"
else if trimmed == "white, black, reversed" then "bw"
else if trimmed == "white, red, reversed" then "wr"
else if trimmed == "white, green, reversed" then "wg"
else if trimmed == "blue, black, reversed" then "bu"
else if trimmed == "blue, red, reversed" then "ru"
else if trimmed == "blue, green, reversed" then "ug"
else if trimmed == "black, red, reversed" then "rb"
else if trimmed == "black, green, reversed" then "bg"
else if trimmed == "red, green, reversed" then "gr"
else "mm"
}@(face:"")
########################################################################
# Combining multiple colors (hybrids)
@@ -78,8 +78,8 @@ card_hybrid_2 := {linear_blend(
overlay_hybrid := [
1: { template( colors[0] ) }
2: {combine_blend(
image1: template( colors[0] ),
image2: template( colors[1] ),
image1: template( colors[0] ),
image2: template( colors[1] ),
combine: "symmetric overlay"
)}
]
@@ -87,7 +87,7 @@ overlay_hybrid := [
# vertical version of a horizontal hybrid
vertical_card_hybrid := {
do_linear_blend := linear_blend
do_linear_blend := linear_blend
linear_blend := { do_linear_blend(x1: 0, x2: 0, y1: x1, y2: x2) }
card_hybrid.horizontal[color_count]()
}
@@ -102,7 +102,7 @@ horizontal_card_hybrid := [
x2: 0.4, y2: 0
image2: linear_blend(
image1: template( colors[(to_int(offset) + 1 ) mod 3] ),
image2: template( colors[(to_int(offset) + 2 ) mod 3] ),
image2: template( colors[(to_int(offset) + 2 ) mod 3] ),
x1: 0.6, y1: 0
x2: 0.78, y2: 0
)
@@ -124,15 +124,15 @@ horizontal_card_hybrid := [
)))}
5: {linear_blend(
image1: template( colors[(to_int(offset) + 0 ) mod 5] ),
image1: template( colors[(to_int(offset) + 0 ) mod 5] ),
x1: 2.0 / 15, y1: 0
x2: 4.0 / 15, y2: 0
image2: linear_blend(
image1: template( colors[(to_int(offset) + 1 ) mod 5] ),
image1: template( colors[(to_int(offset) + 1 ) mod 5] ),
x1: 5.0 / 15, y1: 0
x2: 7.0 / 15, y2: 0
image2: linear_blend(
image1: template( colors[(to_int(offset) + 2 ) mod 5] ),
image1: template( colors[(to_int(offset) + 2 ) mod 5] ),
x1: 8.0 / 15, y1: 0
x2: 10.0 / 15, y2: 0
image2: linear_blend(
@@ -198,19 +198,19 @@ card_hybrid := [
radial: [
0: { template( "c") }
1: { template( colors[0]) }
2: card_hybrid_2
2: card_hybrid_2
3:{linear_blend(
image1: card_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 3] +
image1: card_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 3] +
colors[(to_int(offset) + 1 ) mod 3] ),
image2: template( colors[(to_int(offset) + 2 ) mod 3] ),
image2: template( colors[(to_int(offset) + 2 ) mod 3] ),
x1: 0, y1: 0.55
x2: 0, y2: 0.77
)}
4:{linear_blend(
image1: card_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 4] +
colors[(to_int(offset) + 1 ) mod 4] ),
image2: card_hybrid_2( colors: colors[(to_int(offset) + 3 ) mod 4] +
image2: card_hybrid_2( colors: colors[(to_int(offset) + 3 ) mod 4] +
colors[(to_int(offset) + 2 ) mod 4] ),
x1: 0, y1: 0.4
x2: 0, y2: 0.62
@@ -219,7 +219,7 @@ card_hybrid := [
5: {linear_blend(
image1: linear_blend(
image1: card_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 5] +
colors[(to_int(offset) + 1 ) mod 5] ),
colors[(to_int(offset) + 1 ) mod 5] ),
image2: card_hybrid_2( colors: colors[(to_int(offset) + 4 ) mod 5] +
colors[(to_int(offset) + 2 ) mod 5] ),
x1: 0, y1: 0.19
@@ -235,7 +235,7 @@ card_hybrid := [
image1: card_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 6] +
colors[(to_int(offset) + 1 ) mod 6] ),
image2: card_hybrid_2( colors: colors[(to_int(offset) + 5 ) mod 6] +
colors[(to_int(offset) + 2 ) mod 6] ),
colors[(to_int(offset) + 2 ) mod 6] ),
x1: 0, y1: 0.19
x2: 0, y2: 0.35
),
@@ -267,7 +267,7 @@ card_hybrid := [
]
horizontal: horizontal_card_hybrid
vertical: [
1: { template( colors[0]) }
1: { template( colors[0]) }
2: { linear_blend(
image1: template( colors[0] ),
image2: template( colors[1] ),
@@ -350,7 +350,7 @@ pt_hybrid := [
x1: 0, y1: -1.5
x2: 0, y2: 0.7
)}
7: { template( colors[(to_int(offset) + 4 ) mod 7]) }
7: { template( colors[(to_int(offset) + 4 ) mod 7]) }
]
horizontal: horizontal_pt_hybrid
vertical: [
@@ -799,7 +799,7 @@ stamp_hybrid := [
image2: template( colors[(to_int(offset) + 3) mod 6] ),
x1: -0.3, y1: 0
x2: 1.3, y2: 0
)}
)}
7: { template( colors[(to_int(offset) + 4 ) mod 7]) }
]
horizontal: horizontal_stamp_hybrid
@@ -858,10 +858,10 @@ color_background := {
if colors == "" then colors == "c"
# 'shape' / type of hybrid
shape := if chosen(choice:"horizontal" ) then "horizontal"
else if chosen(choice:"vertical" ) then "vertical"
else if chosen(choice:"overlay" ) then "overlay"
else "radial"
shape := if chosen(choice:"horizontal" ) then "horizontal"
else if chosen(choice:"vertical" ) then "vertical"
else if chosen(choice:"overlay" ) then "overlay"
else "radial"
# Determine background (allows styles to hook something else here)
color_combination(folder:folder)
@@ -983,36 +983,36 @@ font_color_positions := [
# Determine whether light or dark fonts should be used
font_white := {
hybrid := chosen(choice:"hybrid" )
artifact := chosen(choice:"artifact" )
colors := sort_text( order: "(wubrg)"
, (if chosen(choice:"white" ) then "w")
+ (if chosen(choice:"blue" ) then "u")
+ (if chosen(choice:"black" ) then "b")
+ (if chosen(choice:"red" ) then "r")
+ (if chosen(choice:"green" ) then "g"))
+ (if artifact then "a")
hybrid := chosen(choice:"hybrid" )
artifact := chosen(choice:"artifact" )
colors := sort_text( order: "(wubrg)"
, (if chosen(choice:"white" ) then "w")
+ (if chosen(choice:"blue" ) then "u")
+ (if chosen(choice:"black" ) then "b")
+ (if chosen(choice:"red" ) then "r")
+ (if chosen(choice:"green" ) then "g"))
+ (if artifact then "a")
font_colors_white(
if chosen(choice:"land") then "l"
else if input == "artifact, multicolor" then "a"
else if chosen(choice:"multicolor") then "m"
else if artifact and not hybrid then "a"
else if colors == "" then "c"
else colors[
else if input == "artifact, multicolor" then "a"
else if chosen(choice:"multicolor") then "m"
else if artifact and not hybrid then "a"
else if colors == "" then "c"
else colors[
font_color_positions[
if chosen(choice:"horizontal") then "horizontal"
else if chosen(choice:"vertical") then "vertical"
else if chosen(choice:"overlay") then "overlay"
else "radial"
][number_of_items(in: colors)]
]
if chosen(choice:"horizontal") then "horizontal"
else if chosen(choice:"vertical") then "vertical"
else if chosen(choice:"overlay") then "overlay"
else "radial"
][number_of_items(in: colors)]
]
)
}
font_color := { if font_white() then rgb(255,255,255) else rgb(0,0,0) }
#####Watermark Blending
watermark_hybrid:= {
watermark_hybrid := {
linear_blend(
image1: colors[0] + input + ".png"
image2: colors[1] + input + ".png"
@@ -1043,38 +1043,106 @@ set_watermark_blend := {
)
}
spotlight_watermark_blend := {
if face == false then face := card.card_color
wmc := watermark_colors(face:face)
c1 := "/magic-watermarks.mse-include/spotlight/" + wmc.0 + (if contains(face, match:"land") then "l") + "spotlight.png"
c2 := "/magic-watermarks.mse-include/spotlight/" + wmc.1 + (if contains(face, match:"land") then "l") + "spotlight.png"
if contains(input, match:".png,") then (
face := [1:card.card_color, 2:card.card_color_2, 3:card.card_color_3][face]
if type_name(input) == "string" and contains(input, match:".png,") then (
array := split_text(input+",,", match:",")
input := array.0
l := min(to_number(array.1),500)
h := min(to_number(array.2),500)
)
wmc := watermark_colors(face:face)
c1 := wmc.0 + (if contains(face, match:"land") then "l") + "spotlight.png"
c2 := wmc.1 + (if contains(face, match:"land") then "l") + "spotlight.png"
wmdir := "/magic-watermarks.mse-include/spotlight/"
if (h != 500 or l != 500) then (
c1 := crop(c1, height:h, width:l, offset_x:0, offset_y:0)
c2 := crop(c2, height:h, width:l, offset_x:0, offset_y:0)
wmdir := wmdir + "1024/"
c1 := crop(wmdir+c1, height:h, width:l, offset_x:0, offset_y:0)
c2 := crop(wmdir+c2, height:h, width:l, offset_x:0, offset_y:0)
)else(
c1 := wmdir + c1
c2 := wmdir + c2
)
mask := input
set_alpha(
alpha: 0.75
alpha: alpha
input:
linear_blend(
image1:
masked_blend(
light: input
dark: c1
mask: input
mask: mask
)
image2:
masked_blend(
light: input
dark: c2
mask: input
mask: mask
)
x1: 0.4, y1: 0
x2: 0.6, y2: 0
)
)
}@(h:500,l:500,face:false)
}@(h:500,l:500,face:1,alpha:0.2)
shadow_watermark_blend := {
set_combine(
combine:"shadow",
set_alpha(
alpha: 0.5,
drop_shadow(
offset_x: -0.01,
offset_y: 0.03,
blur_radius: 0.02,
alpha: 1,
color: rgb(0,0,0),
enlarge(
border_size: 0.03,
invert_image(input)
)
)
)
)
}
glow_watermark_blend := {
set_combine(
combine:"glow",
set_alpha(
alpha: 0.3,
drop_shadow(
offset_x: -0.01,
offset_y: 0.03,
blur_radius: 0.02,
alpha: 1,
color: rgb(0,0,0),
enlarge(
border_size: 0.03,
invert_image(input)
)
)
)
)
}
watermark_blend :=
{
dark_textbox := (face == 1 and invert_watermark())
or (face == 2 and invert_watermark2())
or (face == 3 and invert_watermark3())
invert_base_image := false
if dark_textbox then
(
alpha := dark_alpha
spotlight_alpha := dark_spotlight_alpha
invert_base_image := true
)
backup := if custom then set.blend_with_colors else set.use_blended_watermarks
option := styling.watermark_render or else backup
if colored then set_alpha(alpha: alpha, input)
else if option == "yes" or option == "blend with colors" then spotlight_watermark_blend(h:h, l:l, face:face, alpha: spotlight_alpha, input)
else if option == "shadow" then shadow_watermark_blend(input)
else if option == "glow" then glow_watermark_blend(input)
else if invert_base_image then set_alpha(alpha: alpha, invert_image(input))
else set_alpha(alpha: alpha, input)
}@(h:500,l:500,colored:false,face:1,alpha:0.25,spotlight_alpha:0.75,dark_alpha:0.25,dark_spotlight_alpha:0.35,custom:false)

View File

@@ -39,7 +39,16 @@ card dpi: 300
############################################################## Extra scripts
init script:
card_shape := { "counter" }
faces_coordinates := {
[
[
left: 0,
top: 0,
width: ((if styling.increase_height then 520 else 420) + increased_width()),
height: (if styling.increase_height then 260 else 160)
]
]
}
guild_mana := { styling.use_guild_mana_symbols }
ancestral_mana := { false }

View File

@@ -1,7 +1,13 @@
mse version: 0.3.9
mse version: 2.0.0
full name: Magic The Gathering, modern identities
version: 2012-02-23
version: 2024-01-29
depends on:
package: magic.mse-game
version: 2014-06-25
# This file doesn't do anything, other files in this directory can be included
# in game/style files:
# watermarks Includes references to the watermark images, to be used in a style file
#### This file doesn't do anything.
#### Other files in this directory can be included in game/style files.
#### This include covers the color indicator dot.
#### This include is being phased out in favor of magic-modules.mse-include/indicators

View File

@@ -918,7 +918,7 @@ card style:
styling.center_text == "always"
then "middle center"
else "middle left"
z index: 2
z index: 3
padding left: 6
padding right: 4
line height hard: {if is_modal(card.rule_text) then 0.9 else 1.2 }
@@ -949,7 +949,7 @@ card style:
styling.center_text == "always"
then "middle center"
else "middle left"
z index: 2
z index: 3
padding left: 6
padding right: 4
line height hard: {if is_modal(card.rule_text_2) then 0.9 else 1.2 }
@@ -980,7 +980,7 @@ card style:
styling.center_text == "always"
then "middle center"
else "middle left"
z index: 2
z index: 3
padding left: 6
padding right: 4
line height hard: {if is_modal(card.rule_text) then 0.9 else 1.2 }
@@ -989,11 +989,11 @@ card style:
line height hard max: {if is_modal(card.rule_text) then 1.0 else 1.3 }
line height line max: 1.6
watermark:
left: { min(page_coords[page_1_side()][(if is_spot() then "spot_watermark" else "watermark")], page_coords[page_3_side()][(if is_spot() then "spot_watermark" else "watermark")]) }
top: { if is_spot() then 330 else max(page_1_top(), page_3_top()) }
left: { page_coords[page_1_side()][(if is_spot() then "spot_watermark" else "watermark")] }
top: { if is_spot() then 330 else page_1_top() }
width: { if is_spot() then 150 else 168}
bottom: {if is_spot() then 470 else 481}
z index: 1
z index: 2
render style: image
popup style: in place
alignment: middle center
@@ -1003,11 +1003,21 @@ card style:
top: { page_2_top() }
width: { if is_spot() then 154 else 167}
bottom: {if is_spot() then 470 else 481}
z index: 1
z index: 2
render style: image
popup style: in place
alignment: middle center
include file: /magic-watermarks.mse-include/watermarks
include file: /magic-watermarks.mse-include/watermarks_back
watermark 3:
left: { page_coords[page_3_side()][(if is_spot() then "spot_watermark" else "watermark")] }
top: { if is_spot() then 330 else page_3_top() }
width: { if is_spot() then 154 else 167}
bottom: {if is_spot() then 470 else 481}
z index: 2
render style: image
popup style: in place
alignment: middle center
include file: /magic-watermarks.mse-include/watermarks_third
############################# PT
pt:
z index: 2

View File

@@ -13,9 +13,6 @@ depends on:
depends on:
package: magic-default-image.mse-include
version: 2007-09-23
depends on:
package: magic-watermarks.mse-include
version: 2007-09-23
depends on:
package: magic-identity-new.mse-include
version: 2012-01-22
@@ -28,9 +25,15 @@ depends on:
depends on:
package: magic-mainframe-extras.mse-include
version: 2018-01-01
depends on:
package: magic-modules.mse-include
version: 2024-05-20
depends on:
package: magic-pride.mse-include
version: 2021-05-26
version: 2024-05-22
depends on:
package: magic-watermarks.mse-include
version: 2007-09-23
card width: 375
card height: 523
@@ -245,7 +248,7 @@ init script:
+ (if box_leveler() then -5 else 0)
+ (if aug_leveler(input) then 4 else 0)
}
custom_watermark_a := {if styling.card_watermark == "" or not contains(styling.card_watermark, match:".png") then "/magic-watermarks.mse-include/planeswalker.png" else "/magic-watermarks.mse-include/" + styling.card_watermark}
custom_watermark_a := {if styling.card_watermark == "" or not contains(styling.card_watermark, match:".png") then "/magic-modules.mse-include/watermarks/other/planeswalker.png" else "/magic-mainframe-extras.mse-include/" + styling.card_watermark}
special_text := {if is_leveler() then ((if card.level_0 != "" then "[" + level_label(0) + " " + card.level_0 + "] " else "") + card.level_1_text + (if card.pt != "" then " [" + card.pt + "]" else "") + "\n"
+ (if card.level_1 != "" then "[" + level_label(1) + " " + card.level_1 + "] " else "") + card.level_2_text + (if card.pt_2 != "" then " [" + card.pt_2 + "]" else "") + "\n"
+ (if card.level_2 != "" then "[" + level_label(2) + " " + card.level_2 + "] " else "") + card.level_3_text + (if card.pt_3 != "" then " [" + card.pt_3 + "]" else "") + (if card.level_4_text != "" then "\n" else "")
@@ -258,7 +261,7 @@ init script:
card_shape := {if is_leveler() then "leveler" else "normal"}
white_text := {is_full_art() or is_fnm() or is_inverted()}
alch_compatible := {styling.text_box_mana_symbols == "/magic-mana-small.mse-symbol-font"}
rare_width := {
cw := card_style.rarity.content_width
cw := if cw > 44 then (if set.print_fix != "" then set.print_fix else 22) else if cw < 22 then 22 else cw
@@ -628,7 +631,6 @@ card style:
alignment: {if center_map() then "center bottom shrink-overflow" else "left bottom shrink-overflow" }
padding bottom: 0
z index: 2
font:
font:
name: { name_font() }
italic name: { name_font_italic() }
@@ -952,7 +954,8 @@ card style:
render style: image
popup style: in place
alignment: middle center
include file: /magic-watermarks.mse-include/watermarks
include file: /magic.mse-game/watermarks/menu_choice_images
image: { watermark_scripts[card.watermark](face:watermark_face_1()) }
############################# Levels
level 0:
z index: 7
@@ -1519,7 +1522,6 @@ extra card field:
save value: true
editable: true
extra card style:
promo label:
left: 40

View File

@@ -55,6 +55,7 @@ init script:
# styling stuff
card_shape := {"token"}
card_name_for_level := {if set.alias_as_cardname and card.alias != "" then card.alias else card.name}
shrink_name := {if styling.shrink_name_text != "" then to_int(styling.shrink_name_text) else 0 }
note_cleaner := replace@(match:"\\+", replace:"")
num_cleaner := replace@(match:"[0-9]", replace:"")
@@ -215,7 +216,7 @@ init script:
arrow_to_room := {
span := span_array(y)
span2 := span_array(y+1)
interface := sort_list(join_arrays(a1:span, a2:span2), remove_duplicates:true)
interface := sort_list((span+span2), remove_duplicates:true)
if x >= length(interface)
then 0
else (
@@ -266,7 +267,7 @@ init script:
[58, 138, 198, 278, -10]
]
arrow_x := {
arr := sort_list(join_arrays(a1:span_array(y), a2:span_array(y+1)), remove_duplicates:true)
arr := sort_list((span_array(y)+span_array(y+1)), remove_duplicates:true)
if y >= max_level() or x >= length(arr)
then 0
else if use_fast() then (
@@ -343,7 +344,7 @@ init script:
}
add_level_lanes := {
ml := max_level()
walls := sort_list(join_arrays(a1:span_array(line), a2:span_array(line+1)), remove_duplicates:true)
walls := sort_list((span_array(line)+span_array(line+1)), remove_duplicates:true)
len := length(walls)
y := 380-line_offset(line)
baseline := wall_crop("new_masks/"+s+"lane.png", offset:y)

View File

@@ -173,7 +173,8 @@ init script:
else if contains(input, match: "-") then "loyalty down"
else "loyalty naught"
}
has_identity := { styling.color_indicator_dot }
has_identity := { false }
has_identity_2 := { false }
is_unsorted := {styling.remove_from_autocount}
is_hybrid := {contains(card.card_color, match:"hybrid")}
is_legend := { styling.legendary_symbol }

View File

@@ -155,6 +155,22 @@ init script:
}
####### Shape things
faces_coordinates := {
[
[
left: 0,
top: 0,
width: 375,
height: 523
],
[
left: 377,
top: 0,
width: 375,
height: 523
]
]
}
card_shape := {if contains(styling.dfc_type, match: "modal") then "modal double faced" else "transform double faced"}
a_saga := {is_saga() or is_class()}
b_saga := {back_saga() or back_class()}
@@ -969,6 +985,7 @@ styling field:
choice: use hovering pt
choice: use hovering loyalty
choice: use holofoil stamps
choice: use backface rarity
choice: center front
choice: center back
choice: center first name
@@ -1269,7 +1286,7 @@ card style:
type 2:
left: { if back_map() then 462 else if has_identity2() then "429" else "409" }
top: { (if back_map() then 297.5 else if back_saga() or back_class() then 444 else if back_four_abilities() then 261 else 296) + shrink_type2() }
width: { if back_map() then 205 else (if has_identity2() then "290" else "310") - rare_width() }
width: { if back_map() then 205 else (if has_identity2() then "290" else "310") - (if chosen(styling.other_options, choice:"use backface rarity") and set.shorten_types_for_rarity then rare_width() else 0) }
height: { if back_map() then 18 - shrink_type2() else 20 - shrink_type2()}
alignment: {if back_map() then "center top shrink-overflow" else "top shrink-overflow"}
z index: 2
@@ -1330,7 +1347,7 @@ card style:
rarity 2:
right: { if back_map() then 576 else 721}
top: { if back_saga() or back_class() then 445 else if back_map() then 53 else if back_normal() then 297 else if back_four_abilities() then 262 else 297 }
width: {if set.shorten_types_for_rarity then 44 else 0}
width: { if chosen(styling.other_options, choice:"use backface rarity") and set.shorten_types_for_rarity then 44 else 0 }
height: 22
z index: 3
render style: image

View File

@@ -277,17 +277,6 @@ card style:
size: 6.25
color: white
weight: bold
card number m15:
left: { if styling.center_set_info then 222 else 161 }
top: 362
width: 81
height: 12
z index: -1
font:
name: Relay-Medium
size: 6.25
color: white
weight: bold
############################################################## Extra card fields
extra card field:
type: text

View File

@@ -277,17 +277,6 @@ card style:
size: 7
color: white
weight: bold
card number m15:
left: { if styling.center_set_info then 360 else 270 }
top: 542
width: 120
height: 19
z index: -1
font:
name: Relay-Medium
size: 7
color: white
weight: bold
############################################################## Extra card fields
extra card field:
type: text

View File

@@ -79,7 +79,8 @@ init script:
}
card_shape := {"planeswalker"}
card_name_for_level := {if set.alias_as_cardname and card.alias != "" then card.alias else card.name}
# Is the card a promo card?
is_promo := { styling.promo }

View File

@@ -14,8 +14,8 @@ depends on:
package: magic-default-image.mse-include
version: 2007-09-23
depends on:
package: magic-watermarks.mse-include
version: 2007-09-23
package: magic-modules.mse-include
version: 2024-05-20
depends on:
package: magic-identity-new.mse-include
version: 2012-01-22
@@ -70,6 +70,27 @@ init script:
has_pt_2 := { card.power_2 != "" or card.toughness_2 != "" }
card_shape := { "double faced" }
faces_coordinates := {[
[
left: 0,
top: 0,
width: 188,
height: 261
],
[
left: 0,
top: 263,
width: 188,
height: 260
],
[
left: 193,
top: 0,
width: 375,
height: 523
]
]}
has_identity := { styling.color_indicator_dot }
has_identity_2 := {styling.color_indicator_dot_2 }
is_unsorted := {styling.remove_from_autocount}
@@ -610,7 +631,8 @@ card style:
render style: image
popup style: in place
alignment: middle center
include file: /magic-watermarks.mse-include/watermarks
include file: /magic.mse-game/watermarks/menu_choice_images
image: { watermark_scripts[card.watermark](face:1) }
watermark 2:
left: 59
top: 422
@@ -620,7 +642,8 @@ card style:
render style: image
popup style: in place
alignment: middle center
include file: /magic-watermarks.mse-include/watermarks
include file: /magic.mse-game/watermarks/menu_choice_images
image: { watermark_scripts[card.watermark](face:2) }
visible: { styling.three_cards }
watermark 3:
left: 310
@@ -631,7 +654,8 @@ card style:
render style: image
popup style: in place
alignment: middle center
include file: /magic-watermarks.mse-include/watermarks
include file: /magic.mse-game/watermarks/menu_choice_images
image: { watermark_scripts[card.watermark](face:3) }
############################# PT
pt:
z index: 12

View File

@@ -373,11 +373,11 @@ card style:
scale down to: 6
alignment:
script:
if card.rule_text == "" then "middle " else "top " + (if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
if card.rule_text == "" then "middle " else "top " + (if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
then "center"
else "left")
z index: 3

View File

@@ -35,6 +35,24 @@ card dpi: 150
####### images from digiman
############################################################## Extra scripts
init script:
faces_coordinates := {
[
[
left: 0,
top: 0,
width: 375,
height: 523
],
[
left: 377,
top: 0,
width: 375,
height: 523
]
]
}
card_shape := { "transform double faced" }
# Load scripts for image box
include file: /magic-default-image.mse-include/scripts

View File

@@ -86,20 +86,20 @@ init script:
}
2: textbox_hybrid_2
3: { linear_blend(
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 3] + colors[(to_int(offset) + 1 ) mod 3] ),
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 3] + colors[(to_int(offset) + 1 ) mod 3] ),
x1: 0, y1: 0.55
x2: 0, y2: 0.77
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] ))
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] ))
)}
4: { linear_blend(
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 4] + colors[(to_int(offset) + 1 ) mod 4] ),
image2: textbox_hybrid_2( colors: colors[(to_int(offset) + 3 ) mod 4] + colors[(to_int(offset) + 2 ) mod 4] ),
image2: textbox_hybrid_2( colors: colors[(to_int(offset) + 3 ) mod 4] + colors[(to_int(offset) + 2 ) mod 4] ),
x1: 0, y1: 0.4
x2: 0, y2: 0.62
)}
5: { linear_blend(
image1: linear_blend(
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 5] + colors[(to_int(offset) + 1 ) mod 5] ),
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 5] + colors[(to_int(offset) + 1 ) mod 5] ),
image2: textbox_hybrid_2( colors: colors[(to_int(offset) + 4 ) mod 5] + colors[(to_int(offset) + 2 ) mod 5] ),
x1: 0, y1: 0.19
x2: 0, y2: 0.35),
@@ -118,7 +118,7 @@ init script:
x2: 0.4, y2: 0
image2: linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 1 ) mod 3] )),
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] )),
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] )),
x1: 0.6, y1: 0
x2: 0.78, y2: 0
))}
@@ -137,15 +137,15 @@ init script:
x2: 0.85, y2: 0
)))}
5: { linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 0 ) mod 5] )),
image1: shorten_textbox_image(template( colors[(to_int(offset) + 0 ) mod 5] )),
x1: 2.0 / 15, y1: 0
x2: 4.0 / 15, y2: 0
image2: linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 1 ) mod 5] )),
image1: shorten_textbox_image(template( colors[(to_int(offset) + 1 ) mod 5] )),
x1: 5.0 / 15, y1: 0
x2: 7.0 / 15, y2: 0
image2: linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 5] )),
image1: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 5] )),
x1: 8.0 / 15, y1: 0
x2: 10.0 / 15, y2: 0
image2: linear_blend(
@@ -609,11 +609,11 @@ card style:
scale down to: 6
alignment:
script:
if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
then "middle center"
else "middle left"
z index: 2

View File

@@ -342,11 +342,11 @@ card style:
scale down to: 6
alignment:
script:
if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
then "middle center"
else "middle left"
z index: 2

View File

Before

Width:  |  Height:  |  Size: 362 KiB

After

Width:  |  Height:  |  Size: 362 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 768 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

View File

@@ -11,21 +11,22 @@ mfsfiles/ contains images that can be shared across most Mainframe templates
Some example images are provided:
Transform/Lesson Circles
aetherprint.png, comedy.png, tragedy.png
Mainframe Rarity
DISc.png, DISu.png, DISr.png, DISm.png, DISmp.png, DISs.png
examples/symbol/aetherprint.png, examples/symbol/comedy.png, examples/symbol/tragedy.png
Custom Saga chapter
discovery.png
examples/symbol/discovery.png
Replacement Saga chapters
doom/ folder
examples/doom/ folder
Mainframe Rarity
examples/rarity/ folder (DISc.png, DISu.png, DISr.png, DISm.png, DISmp.png, DISs.png)
use examples/rarity/DIS.png as the mainframe rarity name
Custom Legend Crowns
cajun/legend/ folder
examples/legend/ folder
Mainframe Custom Mana
cajun/small, cajun/large, cajun/future folders
examples/small, examples/large, examples/future folders
Custom Border
colorless.png
examples/border/colorless.png
Adventure Decorations
decoration/ folder
examples/decoration/ folder
these images can be used as the forms
decoration/clight.png
decoration/light.png;color
examples/decoration/clight.png
examples/decoration/light.png;color

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -178,6 +178,14 @@ symbol:
code: r6
image: chapter6.png
image font size: 40
###################################################################################### Alchemy Symbols
symbol:
code: A-
image: alchemy old.png
enabled: {card.card_symbol == "alchemy old"}
symbol:
code: A-
image: alchemy.png
###################################################################################### Phy Hybrid
symbol:
code: H/W/U

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,12 @@
card style:
card symbol:
left: { card_symbol_left_1() + nameline_offset_left_1() }
top: { card_symbol_top_1() + nameline_offset_top_1() }
width: { card_symbol_width_1() + nameline_offset_height_1() }
height: { if card_symbol_disabled_1() then 0 else card_symbol_height_1() + nameline_offset_height_1() }
visible: { not card_symbol_disabled_1() }
popup style: in place
include file: /magic.mse-game/card-symbols/menu_choice_images
render style: image
image: { card_symbol_image(face: 1) }
z index: 810

View File

@@ -0,0 +1,13 @@
include file: /magic-modules.mse-include/card-symbols/card_fields
card style:
card symbol 2:
left: { card_symbol_left_2() + nameline_offset_left_2() }
top: { card_symbol_top_2() + nameline_offset_top_2() }
width: { card_symbol_width_2() + nameline_offset_height_2() }
height: { if card_symbol_disabled_2() then 0 else card_symbol_height_2() + nameline_offset_height_2() }
visible: { not card_symbol_disabled_2() }
popup style: in place
include file: /magic.mse-game/card-symbols/menu_choice_images
render style: image
image: { card_symbol_image(face: 2) }
z index: 810

View File

@@ -0,0 +1,13 @@
include file: /magic-modules.mse-include/card-symbols/card_fields_dfc
card style:
card symbol 3:
left: { card_symbol_left_3() + nameline_offset_left_3() }
top: { card_symbol_top_3() + nameline_offset_top_3() }
width: { card_symbol_width_3() + nameline_offset_height_3() }
height: { if card_symbol_disabled_3() then 0 else card_symbol_height_3() + nameline_offset_height_3() }
visible: { not card_symbol_disabled_3() }
popup style: in place
include file: /magic.mse-game/card-symbols/menu_choice_images
render style: image
image: { card_symbol_image(face: 3) }
z index: 810

View File

@@ -0,0 +1,4 @@
choice: none
choice: tombstone
choice: alchemy
choice: alchemy old

View File

@@ -0,0 +1,48 @@
#### Consider using the Namelines module instead of this one
#### To use this include in a template, add the following in the template headers:
depends on:
package: magic-modules.mse-include
version: 2024-05-20
#### Also add this, unindented, before the card style section:
include file: /magic-modules.mse-include/card-symbols/card_fields
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
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)
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:
#### To shift everything up/down:
card_symbol_offset_top_1 := { 0 }
#### To shift everything left/right:
card_symbol_offset_left_1 := { 0 }
#### To increase/decrease the size:
card_symbol_offset_width_1 := { 0 }
card_symbol_offset_height_1 := { 0 }
#### For the other faces on DFCs use:
card_symbol_offset_top_2 := { 0 }
card_symbol_offset_left_2 := { 0 }
card_symbol_offset_width_2 := { 0 }
card_symbol_offset_height_2 := { 0 }
card_symbol_offset_top_3 := { 0 }
card_symbol_offset_left_3 := { 0 }
card_symbol_offset_width_3 := { 0 }
card_symbol_offset_height_3 := { 0 }
#### You can disable the symbols on some of the faces,
#### by adding the following functions in the init script:
card_symbol_disabled_1 := { true }
card_symbol_disabled_2 := { true }
card_symbol_disabled_3 := { true }

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Some files were not shown because too many files have changed in this diff Show More