Adventure Overhaul +custom border +paritions (#47)
ADVENTURE OVERHAUL * Adventures can now customize both halves of the card, allowing for two pages. * Each side can be an Adventure page, an Adventure page with only a name, a full text page, a flattened Adventure page, a flattened page with only the name, or blank. * A decorations field has been set up, which allows adding additional flair around the pages to help set variants apart. * Also we have better page images now. PARTITIONS * Partitions are finally live! * Frames can add the card field "partition select" to access partition code, no additional scripting is needed. * MSE handles partitions 0-9 and A-Z. Assign cards partitions 0-9 to sort before the default count at A, B-M to sort after it, and N-Z to sort after it and not be counted in the main set count, for card numbers like 301/300. * The Set field "last main partition" allows the user to change the behavior by putting a replacement for M in the option. * Card numbers default to the March of the Machine numbering of "0001" now * But 001/099, 001, 1/99, 1, and 1000/0099 are now supported, with a second option to set overcounted cards to display with or without the main set count. * Currently this is supported on M15 Mainframe and M15 Adventures. The rest are coming soon. EXTRA THING * Added Custom Border support to M15 Mainframe and M15 Adventures, which let you use magic-mainframe-extras to set up an additional border frame akin to Nyx and Vehicle. This is the finalized version used for Revolution's Ruin and Colorless frames. BACKEND STUFF * Adventures is trying out some new backend stuff that will get expanded upon in the coming patches: * retooled the Landless array to be less jank * retooled the template script a little to make it easier to hook out images with complicated links, most notably user-submitted ones like custom crowns and custom borders * blend masks are now in their own folder * discovered that 'styling.name or else ""' is legal code in script, which means we can make adding style options to frames *way* easier. the entire custom font code is now offloaded to scripts, and templates can access it without needing to copy paste anything beyond the styling field. --------- Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
mse version: 2.0.0
|
||||
game: magic
|
||||
short name: M15 Adventures
|
||||
full name: After M15 Adventures
|
||||
short name: M15 Adventure
|
||||
full name: Mainframe
|
||||
icon: card-sample.png
|
||||
installer group: magic/m15 style/split cards
|
||||
position hint: 011
|
||||
|
||||
version: 2024-01-05
|
||||
version: 2024-05-24
|
||||
depends on:
|
||||
package: magic.mse-game
|
||||
version: 2014-06-25
|
||||
@@ -48,22 +48,99 @@ init script:
|
||||
#Should multicolor lands with basic land types have a colored name?
|
||||
mask_multi_land_with_color := { styling.colored_multicolor_land_name }
|
||||
|
||||
template_prefix := [card: "" card2: "" card3: "reverse/" card4: "reverse/" crown: "legend/" nyx: "nyx/" spotpt: "spotlight/" spot: "spotlight/" page: "spotlight/" pt: "" stamp: "" snowtexture:"snow/" alias:"alias/" identity: "/magic-identity-new.mse-include/" identity2: "/magic-identity-new.mse-include/"]
|
||||
template_suffix := [card: "card.jpg" card2: "card2.png" card3: "card.jpg" card4: "card2.png" crown: "crown.png" nyx: "nyx.png" spotpt: "pt.png" spot: "card.png" page: "card2.png" pt: "pt.png", stamp: "stamp.jpg" alias:"alias.png" snowtexture:"snow.png" identity: "identity.png" identity2: "identity.png"]
|
||||
template := { template_prefix[type] + input + template_suffix[type] }
|
||||
land_template := { template_prefix[type] + input + (if input == "a" or type == "nyx" then "" else "l") + template_suffix[type] }
|
||||
template_prefix := [
|
||||
card: "cards/",
|
||||
double_page: "double_page/",
|
||||
single_page: "single_page/",
|
||||
null_page: "null_page/",
|
||||
binding: "binding/",
|
||||
double_flat: "double_flat/",
|
||||
single_flat: "single_flat/",
|
||||
pt: "pts/",
|
||||
stamp: "stamps/",
|
||||
spot: "spotlight/",
|
||||
spotpt: "spotlight/",
|
||||
spotpage: "spotlight/",
|
||||
crown: "legend/",
|
||||
nyx: "nyx/",
|
||||
snowtexture: "snow/",
|
||||
alias: "alias/",
|
||||
identity: "/magic-identity-new.mse-include/",
|
||||
identity2: "/magic-identity-new.mse-include/"
|
||||
]
|
||||
template_suffix := [
|
||||
card: "card.jpg",
|
||||
double_page: "page.png",
|
||||
single_page: "page.png",
|
||||
null_page: "page.png",
|
||||
binding: "block.jpg",
|
||||
double_flat: "page.png",
|
||||
single_flat: "page.png",
|
||||
pt: "pt.png",
|
||||
stamp: "stamp.jpg",
|
||||
spot: "card.png",
|
||||
spotpt: "pt.png",
|
||||
spotpage: "card2.png",
|
||||
crown: "crown.png",
|
||||
nyx: "nyx.png",
|
||||
alias: "alias.png",
|
||||
snowtexture: "snow.png",
|
||||
identity: "identity.png",
|
||||
identity2: "identity.png"
|
||||
]
|
||||
template := {
|
||||
if type_name(harder_script[type] or else nil) == "function"
|
||||
then harder_script[type](input, land:false)
|
||||
else template_prefix[type] + input + template_suffix[type]
|
||||
}
|
||||
land_template := {
|
||||
if type == "decoration"
|
||||
then page_decoration_template(input, land:true)
|
||||
else template_prefix[type] + input + (if landless(type) or input == "a" then "" else "l") + template_suffix[type]
|
||||
}
|
||||
landless := {
|
||||
landless_ar[input] or else false
|
||||
}
|
||||
landless_ar := [
|
||||
alias: true,
|
||||
binding: true,
|
||||
double_flat: true,
|
||||
double_page: true,
|
||||
null_page: true,
|
||||
nyx: true,
|
||||
single_flat: true,
|
||||
single_page: true,
|
||||
spot: true,
|
||||
spotpage: true,
|
||||
spotpt: true
|
||||
]
|
||||
# Use land templates for previews because they show more contrast
|
||||
hybrid_previews := "land,hybrid"
|
||||
card_background2 := { color_background(type:"card2", base_hybrid:card_hybrid) }
|
||||
card_background3 := { color_background(type:"card3", base_hybrid:card_hybrid) }
|
||||
card_background4 := { color_background(type:"card4", base_hybrid:card_hybrid) }
|
||||
spot_background := { color_background(type:"spot", base_hybrid:card_hybrid) }
|
||||
page_background := { color_background(type:"page", base_hybrid:card_hybrid) }
|
||||
alias_bar := { color_background(type:"alias", base_hybrid:card_hybrid) }
|
||||
spot_pt := { color_background(type:"spotpt", base_hybrid:card_hybrid) }
|
||||
crown_background := { color_background(type:"crown", base_hybrid: card_hybrid)}
|
||||
nyx_background := { color_background(type:"nyx", base_hybrid:card_hybrid) }
|
||||
snow_background := { color_background(type:"snowtexture", base_hybrid:card_hybrid) }
|
||||
|
||||
card_background := { color_background(type:"card", base_hybrid:card_hybrid, folder:"blend_masks/") }@(offset:0 )
|
||||
card_ptbox := { color_background(type:"pt", base_hybrid:pt_hybrid, folder:"blend_masks/") }@(offset:0 )
|
||||
card_identity := { color_background(type:"identity", base_hybrid:identity_hybrid, folder:"blend_masks/") }@(offset:0 )
|
||||
card_identity_2 := { color_background(type:"identity2", base_hybrid:identity_hybrid, folder:"blend_masks/") }@(offset:0 )
|
||||
card_stamp := { color_background(type:"stamp", base_hybrid:stamp_hybrid, folder:"blend_masks/") }@(offset:0 )
|
||||
|
||||
null_page_blend := { color_background(type:"null_page", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
single_page_blend := { color_background(type:"single_page", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
double_page_blend := { color_background(type:"double_page", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
binding_background := { color_background(type:"binding", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
double_flat_page_blend := { color_background(type:"double_flat", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
single_flat_page_blend := { color_background(type:"single_flat", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
page_spread_blend := { color_background(type:"pages", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
decoration_background := { color_background(type:"decoration", base_hybrid:card_hybrid, folder:"blend_masks/")}
|
||||
|
||||
spot_background := { color_background(type:"spot", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
spot_page_background := { color_background(type:"spotpage", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
spot_pt := { color_background(type:"spotpt", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
|
||||
alias_bar := { color_background(type:"alias", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
crown_background := { color_background(type:"crown", base_hybrid: card_hybrid, folder:"blend_masks/")}
|
||||
nyx_background := { color_background(type:"nyx", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
snow_background := { color_background(type:"snowtexture", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
|
||||
# Use the normal tap symbol
|
||||
mana_t := {
|
||||
if styling.tap_symbol == "old" then "old"
|
||||
@@ -106,196 +183,242 @@ init script:
|
||||
chop_correction2 := { 0 }
|
||||
is_unsorted := {styling.remove_from_autocount}
|
||||
|
||||
shrink_type := {if styling.shrink_typeline_text != "" then to_int((if comma_count(styling.shrink_typeline_text) == "" then styling.shrink_typeline_text else split_text(match:",", styling.shrink_typeline_text).0)) else 0 }
|
||||
shrink_name := {if styling.shrink_name_text != "" then to_int((if comma_count(styling.shrink_name_text) == "" then styling.shrink_name_text else split_text(match:",", styling.shrink_name_text).0)) else 0 }
|
||||
shrink_type2 := {if styling.shrink_typeline_text != "" then to_int((if comma_count(styling.shrink_typeline_text) != "" then split_text(match:",", styling.shrink_typeline_text).1)) else 0 }
|
||||
shrink_name2 := {if styling.shrink_name_text != "" then to_int((if comma_count(styling.shrink_name_text) != "" then split_text(match:",", styling.shrink_name_text).1)) else 0 }
|
||||
shrink_type := {if styling.shrink_typeline_text != "" then to_number((if comma_count(styling.shrink_typeline_text) == "" then styling.shrink_typeline_text else split_text(match:",", styling.shrink_typeline_text).0)) else 0 }
|
||||
shrink_name := {if styling.shrink_name_text != "" then to_number((if comma_count(styling.shrink_name_text) == "" then styling.shrink_name_text else split_text(match:",", styling.shrink_name_text).0)) else 0 }
|
||||
shrink_type2 := {if styling.shrink_typeline_text != "" then to_number((if comma_count(styling.shrink_typeline_text) != "" then split_text(match:",", styling.shrink_typeline_text).1)) else 0 }
|
||||
shrink_name2 := {if styling.shrink_name_text != "" then to_number((if comma_count(styling.shrink_name_text) != "" then split_text(match:",", styling.shrink_name_text).1)) else 0 }
|
||||
use_main_rarity := { contains(set.mainframe_rarity_name, match: ".png")}
|
||||
un_png := replace@(match:".png", replace: "")
|
||||
use_evobar := {contains(styling.other_options, match:"pokemon evobar")}
|
||||
is_skinned := {contains(styling.other_options, match:"godzilla style alias")}
|
||||
|
||||
card_shape := {"adventure"}
|
||||
|
||||
# alternate rarity color
|
||||
alt_rarity := {styling.alt_rarity_color}
|
||||
|
||||
|
||||
### Customize fonts
|
||||
swap_font := {styling.apply_custom_fonts}
|
||||
name_font := {
|
||||
swap_font_name(
|
||||
src:styling.custom_name_font,
|
||||
font_name: "Beleren Bold"
|
||||
)
|
||||
}
|
||||
name_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_name_font,
|
||||
font_size: 16
|
||||
) - shrink_name()
|
||||
}
|
||||
name_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_name_font,
|
||||
font_color: "black"
|
||||
)
|
||||
}
|
||||
name_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_name_font
|
||||
)
|
||||
}
|
||||
name_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_name_font
|
||||
)
|
||||
}
|
||||
swap_fonts_name2_default := [
|
||||
name: {"Beleren Bold"},
|
||||
size: {12},
|
||||
color: {"white"},
|
||||
vertical: {0},
|
||||
italic: {""}
|
||||
]
|
||||
swap_fonts_type2_default := [
|
||||
name: {"Beleren Bold"},
|
||||
size: {11},
|
||||
color: {"white"},
|
||||
vertical: {0},
|
||||
italic: {""}
|
||||
]
|
||||
swap_fonts_pt_default := [
|
||||
name: {"Beleren Bold"},
|
||||
size: {16},
|
||||
color: {if is_vehicle() then "white" else "black"},
|
||||
vertical: {0},
|
||||
italic: {""}
|
||||
]
|
||||
|
||||
name2_font := {
|
||||
swap_font_name(
|
||||
src:styling.custom_name_2_font,
|
||||
font_name: "Beleren Bold"
|
||||
page_decoration_template := {
|
||||
src := "/magic-mainframe-extras.mse-include/"
|
||||
str := styling.page_decoration
|
||||
if not contains(str, match:".png") then (
|
||||
src := ""
|
||||
str := ""
|
||||
)
|
||||
}
|
||||
name2_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_name_2_font,
|
||||
font_size: 12
|
||||
) - shrink_name2()
|
||||
}
|
||||
name2_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_name_2_font,
|
||||
font_color: "white"
|
||||
)
|
||||
}
|
||||
name2_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_name_2_font
|
||||
)
|
||||
}
|
||||
name2_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_name_2_font
|
||||
)
|
||||
}
|
||||
|
||||
type_font := {
|
||||
swap_font_name(
|
||||
src:styling.custom_type_font,
|
||||
font_name: "Beleren Bold"
|
||||
)
|
||||
}
|
||||
type_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_type_font,
|
||||
font_size: 13
|
||||
) - shrink_type()
|
||||
}
|
||||
type_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_type_font,
|
||||
font_color: "black"
|
||||
)
|
||||
}
|
||||
type_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_type_font
|
||||
)
|
||||
}
|
||||
type_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_type_font
|
||||
)
|
||||
}
|
||||
|
||||
type2_font := {
|
||||
swap_font_name(
|
||||
src:styling.custom_type_2_font,
|
||||
font_name: "Beleren Bold"
|
||||
)
|
||||
}
|
||||
type2_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_type_2_font,
|
||||
font_size: 11
|
||||
) - shrink_type2()
|
||||
}
|
||||
type2_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_type_2_font,
|
||||
font_color: "white"
|
||||
)
|
||||
}
|
||||
type2_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_type_2_font
|
||||
)
|
||||
}
|
||||
type2_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_type_2_font
|
||||
)
|
||||
}
|
||||
|
||||
body_font := {
|
||||
swap_font_name(
|
||||
src:styling.custom_body_font,
|
||||
font_name: "MPlantin"
|
||||
)
|
||||
}
|
||||
body_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_body_font,
|
||||
font_size: 13
|
||||
)
|
||||
}
|
||||
body_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_body_font,
|
||||
font_color: "black"
|
||||
)
|
||||
}
|
||||
body_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_body_font
|
||||
)
|
||||
}
|
||||
body_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_body_font
|
||||
)
|
||||
}
|
||||
|
||||
pt_font := {
|
||||
swap_font_name(
|
||||
src:styling.custom_pt_font,
|
||||
font_name: "Beleren Bold"
|
||||
)
|
||||
}
|
||||
pt_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_pt_font,
|
||||
font_size: 16
|
||||
)
|
||||
}
|
||||
pt_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_pt_font,
|
||||
font_color: if is_vehicle() then "white" else "black"
|
||||
)
|
||||
}
|
||||
pt_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_pt_font
|
||||
)
|
||||
}
|
||||
pt_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_pt_font
|
||||
c := ""
|
||||
pt := ""
|
||||
l := ""
|
||||
|
||||
if contains(str, match:";color") then c := input
|
||||
|
||||
if contains(str, match:";pt")
|
||||
and (right_name() and card.pt != "") then pt := "_pt";
|
||||
|
||||
if land and contains(str, match:";land") then l := "l"
|
||||
|
||||
replace(
|
||||
str,
|
||||
match:"([^;]*/)?([^/;]+)([.]png)(;.+)?",
|
||||
replace:{src + _1 + c + l + _2 + pt + _3}
|
||||
)
|
||||
}
|
||||
|
||||
page_script := {
|
||||
flip := if input == "none"
|
||||
then false
|
||||
else if input == "blank page" then
|
||||
if side == "left" then true else false
|
||||
else if side == "right" then
|
||||
true
|
||||
else false;
|
||||
|
||||
adj_color := if flip then color + ", reversed" else color
|
||||
|
||||
img := case input of
|
||||
"name and type page": double_page_blend(adj_color),
|
||||
"name page": single_page_blend(adj_color),
|
||||
"blank page": null_page_blend(adj_color),
|
||||
"name and type flat": mask_dblflat(double_flat_page_blend(adj_color)),
|
||||
"name flat": mask_sngflat(single_flat_page_blend(adj_color)),
|
||||
else: "";
|
||||
|
||||
if flip then flip_horizontal(img) else img
|
||||
}
|
||||
mask_dblflat := {
|
||||
if no_divider() then
|
||||
set_mask(image: input, mask:"double_mask.png")
|
||||
else input
|
||||
}
|
||||
mask_sngflat := {
|
||||
if no_divider() then
|
||||
set_mask(image:input, mask:"single_mask.png")
|
||||
else input
|
||||
}
|
||||
named_page := contains@(match:"name")
|
||||
left_name := {
|
||||
style_check := if is_spot() then "name and type page" else if is_reversed() then styling.right_style else styling.left_style
|
||||
named_page(style_check)
|
||||
}
|
||||
right_name := {
|
||||
style_check := if is_spot() then "none" else if is_reversed() then styling.left_style else styling.right_style
|
||||
named_page(style_check)
|
||||
}
|
||||
left_page_img := {
|
||||
page_script(
|
||||
if is_spot() then "name and type page" else if is_reversed() then styling.right_style else styling.left_style,
|
||||
color: (if left_name() then card.card_color_2 else card.card_color),
|
||||
side: "left"
|
||||
)
|
||||
}
|
||||
right_page_img := {
|
||||
page_script(
|
||||
if is_spot() then "none" else if is_reversed() then styling.left_style else styling.right_style,
|
||||
color: (if right_name() then (if left_name() then card.card_color_3 else card.card_color_2) else card.card_color),
|
||||
side: "right"
|
||||
)
|
||||
}
|
||||
|
||||
page_1_side := {
|
||||
## the main text of the card
|
||||
## two pages, gone
|
||||
## left side page, on the right
|
||||
## right side page or no pages, on the left
|
||||
if left_name() and right_name() then "none"
|
||||
else if left_name() then "right"
|
||||
else "left"
|
||||
}
|
||||
page_2_side := {
|
||||
## the adventure text of the card
|
||||
## two pages, left (check reverse)
|
||||
## left side page, left
|
||||
## right side page, right
|
||||
## no pages, gone
|
||||
if left_name() and right_name() then
|
||||
if is_reversed() then "right" else "left"
|
||||
else if left_name() then "left"
|
||||
else if right_name() then "right"
|
||||
else "none"
|
||||
}
|
||||
page_3_side := {
|
||||
## the second adventure text of the card
|
||||
## two pages, right (check reverse)
|
||||
## else, gone
|
||||
if left_name() and right_name() then
|
||||
if is_reversed() then "left" else "right"
|
||||
else if left_name() == right_name() then
|
||||
if is_reversed() then "left" else "right"
|
||||
else "none"
|
||||
}
|
||||
|
||||
reverser := ["left":"right", "right":"left"]
|
||||
page_style := {
|
||||
str := if input == "none" then ""
|
||||
else if is_reversed() then styling[reverser[input] + "_style"]
|
||||
else styling[input + "_style"]
|
||||
|
||||
if is_spot() then
|
||||
"double"
|
||||
else if contains(str, match:"type") then
|
||||
"double"
|
||||
else if contains(str, match:"name") then
|
||||
"single"
|
||||
else "null"
|
||||
}
|
||||
page_flat := {
|
||||
str := if input == "none" then ""
|
||||
else if is_reversed() then styling[reverser[input] + "_style"]
|
||||
else styling[input + "_style"]
|
||||
|
||||
if is_spot() then false else contains(str, match:"flat")
|
||||
}
|
||||
page_1_flat := {page_flat(page_1_side())}
|
||||
page_2_flat := {page_flat(page_2_side())}
|
||||
page_3_flat := {page_flat(page_3_side())}
|
||||
page_top := [
|
||||
"double": 375,
|
||||
"single": 358,
|
||||
"null": 332
|
||||
]
|
||||
page_1_top := {page_top[page_style(page_1_side())]}
|
||||
page_2_top := {page_top[page_style(page_2_side())]}
|
||||
page_3_top := {page_top[page_style(page_3_side())]}
|
||||
page_coords := [
|
||||
"left": [
|
||||
"page": 18,
|
||||
"name_left": 32,
|
||||
"name_right": 178,
|
||||
"cost": 180,
|
||||
"type": 32,
|
||||
"text": 27,
|
||||
"decoration": 0,
|
||||
"flavor bar": 10,
|
||||
"watermark": 20,
|
||||
"spot_watermark": 30
|
||||
],
|
||||
"right": [
|
||||
"page": 188,
|
||||
"name_left": 197,
|
||||
"name_right": 28,
|
||||
"cost": 345,
|
||||
"type": 197,
|
||||
"text": 190,
|
||||
"decoration": 175,
|
||||
"flavor bar": 175
|
||||
"watermark": 188,
|
||||
"spot_watermark": 195
|
||||
],
|
||||
"none": [
|
||||
"page": 500,
|
||||
"name_left": 500,
|
||||
"name_right": -10,
|
||||
"cost": 500,
|
||||
"type": 500,
|
||||
"text": 500,
|
||||
"decoration": 500,
|
||||
"flavor bar": 500
|
||||
"watermark": 500,
|
||||
"spot_watermark": 500
|
||||
]
|
||||
]
|
||||
|
||||
no_divider := {chosen(styling.other_options, choice:"no flat page divider")}
|
||||
|
||||
custom_border_image := {
|
||||
src := styling.custom_border_source
|
||||
ps := split_text(src, match:"-color-")
|
||||
if length(ps) > 1 then
|
||||
"/magic-mainframe-extras.mse-include/" + ps[0] + input + (if land then "l" else "") + ps[1]
|
||||
else
|
||||
"/magic-mainframe-extras.mse-include/" + src
|
||||
}
|
||||
custom_border_blend := { color_background(type:"custom_border", base_hybrid:card_hybrid, folder:"blend_masks/") }
|
||||
is_custom := {contains(styling.frames, match:"custom border") and contains(styling.custom_border_source, match:".png")}
|
||||
|
||||
# this goes at the very end
|
||||
harder_script := [
|
||||
custom_border: custom_border_image,
|
||||
decoration: page_decoration_template
|
||||
]
|
||||
############################################################## Set info fields
|
||||
set info style:
|
||||
symbol:
|
||||
@@ -331,6 +454,11 @@ styling field:
|
||||
choice: nyx
|
||||
choice: vehicle
|
||||
choice: snow
|
||||
choice: custom border
|
||||
styling field:
|
||||
type: text
|
||||
name: custom border source
|
||||
description: Use this file from magic-mainframe-extras as a custom vehicle-like frame. if colored, name images like "wborder.png" and put "-color-border.png" here.
|
||||
styling field:
|
||||
type: multiple choice
|
||||
name: auto frames
|
||||
@@ -346,6 +474,33 @@ styling field:
|
||||
choice: godzilla style alias
|
||||
choice: pokemon evobar
|
||||
choice: prerelease stamp
|
||||
choice: no flat page divider
|
||||
styling field:
|
||||
type: choice
|
||||
name: left style
|
||||
description: Choose the type of the page section.
|
||||
choice: name and type page
|
||||
choice: name page
|
||||
choice: blank page
|
||||
choice: name and type flat
|
||||
choice: name flat
|
||||
choice: none
|
||||
initial: name and type page
|
||||
styling field:
|
||||
type: choice
|
||||
name: right style
|
||||
description: Choose the type of the page section.
|
||||
choice: name and type page
|
||||
choice: name page
|
||||
choice: blank page
|
||||
choice: name and type flat
|
||||
choice: name flat
|
||||
choice: none
|
||||
initial: blank page
|
||||
styling field:
|
||||
type: text
|
||||
name: page decoration
|
||||
description: Image link from magic-mainframe-extras to layer over the adventure. Add ";color" for color dependent or ";pt" for pt dependent.
|
||||
styling field:
|
||||
type: boolean
|
||||
name: remove from autocount
|
||||
@@ -498,19 +653,28 @@ card style:
|
||||
top: 0
|
||||
width: 375
|
||||
height: 523
|
||||
z index: 0
|
||||
z index: -1
|
||||
render style: image
|
||||
popup style: in place
|
||||
image: { if is_spot() then spot_background() else if is_reversed() then card_background3() else card_background() }
|
||||
image: { if is_spot() then spot_background() else card_background() }
|
||||
card color 2:
|
||||
left: {if is_spot() then 21 else if is_reversed() then 187 else 20}
|
||||
left: {if is_spot() then 21 else page_coords[page_2_side()]["page"]}
|
||||
top: {if is_spot() then 319 else 327}
|
||||
width: {if is_spot() then 170 else 169}
|
||||
height: {if is_spot() then 170 else 155}
|
||||
z index: 0
|
||||
width: 170
|
||||
height: {if is_spot() then 170 else 156.5}
|
||||
z index: 1
|
||||
render style: image
|
||||
popup style: in place
|
||||
image: { if is_spot() then page_background() else if is_reversed() then card_background4() else card_background2() }
|
||||
image: { if is_spot() then spot_page_background() else if left_name() then left_page_img() else right_page_img() }
|
||||
card color 3:
|
||||
left: {page_coords[page_3_side()]["page"]}
|
||||
top: 327
|
||||
width: 170
|
||||
height: 156.5
|
||||
z index: 1
|
||||
render style: image
|
||||
image: {right_page_img()}
|
||||
visible: {left_name() and right_name()}
|
||||
############################# Name line
|
||||
name:
|
||||
left: { (if is_spot() then 22 else 0) + (if card.card_symbol=="none" then 32 else 50) }
|
||||
@@ -526,9 +690,9 @@ card style:
|
||||
size: { name_font_size() }
|
||||
color: { name_font_color() }
|
||||
name 2:
|
||||
left: { if is_reversed() then 197 else 32}
|
||||
top: { 328 + (if is_spot() then 2 else 0)+ name2_font_vertical()}
|
||||
right: { (if is_reversed() then 28 else 178) - card_style.casting_cost_2.content_width }
|
||||
left: { page_coords[page_2_side()]["name_left"] }
|
||||
top: { (if is_spot() or not page_2_flat() then 330 else 328) + (if is_spot() then 2 else 0)+ name2_font_vertical()}
|
||||
right: { page_coords[page_2_side()]["name_right"] - card_style.casting_cost_2.content_width }
|
||||
height: { 20 - shrink_name2() }
|
||||
alignment: bottom shrink-overflow
|
||||
z index: 2
|
||||
@@ -537,6 +701,18 @@ card style:
|
||||
italic name: { name2_font_italic() }
|
||||
size: { name2_font_size() }
|
||||
color: { name2_font_color() }
|
||||
name 3:
|
||||
left: { page_coords[page_3_side()]["name_left"] }
|
||||
top: { (if is_spot() or not page_3_flat() then 330 else 328) + (if is_spot() then 2 else 0)+ name2_font_vertical()}
|
||||
right: { page_coords[page_3_side()]["name_right"] - card_style.casting_cost_3.content_width }
|
||||
height: {if page_style(page_3_side()) == "null" then 0 else 20 - shrink_name2() }
|
||||
alignment: bottom shrink-overflow
|
||||
z index: 2
|
||||
font:
|
||||
name: { name2_font() }
|
||||
italic name: { name2_font_italic() }
|
||||
size: { name2_font_size() }
|
||||
color: { name2_font_color() }
|
||||
alias:
|
||||
left: {if is_skinned() then 45 else 33}
|
||||
top: 53
|
||||
@@ -568,8 +744,8 @@ card style:
|
||||
z index: 2
|
||||
padding top: 0
|
||||
casting cost 2:
|
||||
right: {if is_reversed() then 345 else 180}
|
||||
top: { if is_spot() then 330 else 328}
|
||||
right: {page_coords[page_2_side()]["cost"]}
|
||||
top: { if is_spot() then 330 else if page_2_flat() then 328 else 329}
|
||||
width: { max(30, card_style.casting_cost_2.content_width) + 5 }
|
||||
height: 23
|
||||
alignment: middle right
|
||||
@@ -580,6 +756,19 @@ card style:
|
||||
always symbol: true
|
||||
z index: 2
|
||||
padding top: 0
|
||||
casting cost 3:
|
||||
right: {page_coords[page_3_side()]["cost"]}
|
||||
top: { if is_spot() then 330 else if page_3_flat() then 328 else 329}
|
||||
width: { max(30, card_style.casting_cost_3.content_width) + 5 }
|
||||
height: {if page_style(page_3_side()) == "null" then 0 else 23}
|
||||
alignment: middle right
|
||||
symbol font:
|
||||
name: magic-mana-large
|
||||
size: 12
|
||||
alignment: middle right
|
||||
always symbol: true
|
||||
z index: 2
|
||||
padding top: 0
|
||||
card symbol:
|
||||
left: {if card.card_symbol=="none" then 20 else 30}
|
||||
top: 29
|
||||
@@ -610,7 +799,7 @@ card style:
|
||||
image: { card_identity() }
|
||||
type:
|
||||
left: { (if is_spot() then 50 else 0) + (if has_identity() then (if is_spot() then 50 else 52) else 32) }
|
||||
top: { shrink_type() + if is_spot() then 298 else 296}
|
||||
top: { shrink_type() + type_font_vertical() + if is_spot() then 298 else 296}
|
||||
width: { (if has_identity() then "290" else "310") - rare_width() - (if is_spot() then 73 else 0) }
|
||||
height: { 20 - shrink_type() }
|
||||
alignment: { if is_spot() then "top center shrink-overflow" else "top shrink-overflow"}
|
||||
@@ -632,10 +821,24 @@ card style:
|
||||
visible: {has_identity2()}
|
||||
image: {card_identity_2()}
|
||||
type 2:
|
||||
left: {(if is_reversed() then 197 else 32) + (if has_identity2() then 20 else 0)}
|
||||
top: {shrink_type2() + 352 + (if is_spot() then 1 else 0)}
|
||||
left: {page_coords[page_2_side()]["type"] + (if has_identity2() then 20 else 0)}
|
||||
top: {shrink_type2() + (if is_spot() or not page_2_flat() then 353 else 352)}
|
||||
width: {155 - (if has_identity2() then 20 else 0)}
|
||||
height: { 20 - shrink_type2() }
|
||||
height: { if page_style(page_2_side()) == "double" then 20 - shrink_type2() else 0}
|
||||
alignment: top shrink-overflow
|
||||
z index: 1
|
||||
padding top: 2
|
||||
font:
|
||||
name: { type2_font() }
|
||||
italic name: { type2_font_italic() }
|
||||
size: { type2_font_size() }
|
||||
color: { type2_font_color() }
|
||||
separator color: red
|
||||
type 3:
|
||||
left: {page_coords[page_3_side()]["type"] + (if has_identity2() then 20 else 0)}
|
||||
top: {shrink_type2() + (if is_spot() or not page_3_flat() then 353 else 352)}
|
||||
width: {155 - (if has_identity2() then 20 else 0)}
|
||||
height: { if page_style(page_3_side()) == "double" then 20 - shrink_type2() else 0 }
|
||||
alignment: top shrink-overflow
|
||||
z index: 1
|
||||
padding top: 2
|
||||
@@ -693,9 +896,9 @@ card style:
|
||||
else symbol_variation(symbol: set.masterpiece_symbol, variation: "mythic rare")
|
||||
############################# Text box
|
||||
text:
|
||||
left: {if is_reversed() then 27 else 200}
|
||||
top: { 328 + to_int(chop_top()) + body_font_vertical() }
|
||||
width: {if is_reversed() then 157 else 143}
|
||||
left: {page_coords[page_1_side()]["text"]}
|
||||
top: { (if is_spot() then 335 else page_1_top()) + to_int(chop_top()) + body_font_vertical() }
|
||||
width: {if is_spot() then 157 else if page_style(page_1_side()) == "null" then 157 else 143}
|
||||
bottom: { (if is_spot() then 464 else 481) - to_int(chop_bot()) }
|
||||
font:
|
||||
name: { body_font() }
|
||||
@@ -724,9 +927,9 @@ card style:
|
||||
line height hard max: {if is_modal(card.rule_text) then 1.0 else 1.3 }
|
||||
line height line max: 1.6
|
||||
text 2:
|
||||
left: {if is_reversed() then 190 else 29}
|
||||
top: { 375 + to_int(back_chop_top()) + body_font_vertical()}
|
||||
width: 157
|
||||
left: {page_coords[page_2_side()]["text"]}
|
||||
top: { page_2_top() + to_int(back_chop_top()) + body_font_vertical()}
|
||||
width: {if is_spot() then 157 else if page_style(page_1_side()) == "null" then 157 else 143}
|
||||
bottom: { (if is_spot() then 464 else 481) - to_int(back_chop_bot()) }
|
||||
font:
|
||||
name: { body_font() }
|
||||
@@ -754,21 +957,52 @@ card style:
|
||||
line height soft: 0.9
|
||||
line height hard max: {if is_modal(card.rule_text_2) then 1.0 else 1.3 }
|
||||
line height line max: 1.6
|
||||
text 3:
|
||||
left: {page_coords[page_3_side()]["text"]}
|
||||
top: { page_3_top() + to_int(chop_top()) + body_font_vertical() }
|
||||
width: {if page_style(page_1_side()) == "null" then 157 else 143}
|
||||
bottom: { (if is_spot() then 464 else 481) - to_int(chop_bot()) }
|
||||
font:
|
||||
name: { body_font() }
|
||||
italic name: { body_font_italic() }
|
||||
size: { body_font_size() }
|
||||
scale down to: 6
|
||||
color: { body_font_color() }
|
||||
symbol font:
|
||||
name: { styling.text_box_mana_symbols }
|
||||
size: 13
|
||||
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"
|
||||
then "middle center"
|
||||
else "middle left"
|
||||
z index: 2
|
||||
padding left: 6
|
||||
padding right: 4
|
||||
line height hard: {if is_modal(card.rule_text) then 0.9 else 1.2 }
|
||||
line height line: 1.5
|
||||
line height soft: 0.9
|
||||
line height hard max: {if is_modal(card.rule_text) then 1.0 else 1.3 }
|
||||
line height line max: 1.6
|
||||
watermark:
|
||||
left: { if is_reversed() then (if is_spot() then 30 else 20) else if is_spot() then 195 else 188}
|
||||
top: { if is_spot() then 340 else 328}
|
||||
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()) }
|
||||
width: { if is_spot() then 150 else 168}
|
||||
height: { if is_spot() then 130 else 153 }
|
||||
bottom: {if is_spot() then 470 else 481}
|
||||
z index: 1
|
||||
render style: image
|
||||
popup style: in place
|
||||
alignment: middle center
|
||||
include file: /magic-watermarks.mse-include/watermarks
|
||||
watermark 2:
|
||||
left: { if is_reversed() then (if is_spot() then 195 else 188) else if is_spot() then 30 else 20}
|
||||
top: { if is_spot() then 380 else 375}
|
||||
left: { min(page_coords[page_2_side()][(if is_spot() then "spot_watermark" else "watermark")], page_coords[page_3_side()][(if is_spot() then "spot_watermark" else "watermark")]) }
|
||||
top: { page_2_top() }
|
||||
width: { if is_spot() then 154 else 167}
|
||||
height: { if is_spot() then 88 else 108}
|
||||
bottom: {if is_spot() then 470 else 481}
|
||||
z index: 1
|
||||
render style: image
|
||||
popup style: in place
|
||||
@@ -823,16 +1057,50 @@ card style:
|
||||
size: 7
|
||||
color: white
|
||||
weight: bold
|
||||
partition select:
|
||||
left: 24
|
||||
top: 488
|
||||
width: {if not use_auto_numbers() then 0 else if contains(set.card_number_style, match:"/0") then 50 else 35}
|
||||
height: 10
|
||||
z index: 3
|
||||
render style: hidden
|
||||
|
||||
############################################################## Extra card fields
|
||||
extra card field:
|
||||
type: choice
|
||||
name: color page
|
||||
script: card.card_color
|
||||
save value: false
|
||||
editable: false
|
||||
extra card field:
|
||||
type: choice
|
||||
name: backup page
|
||||
script: card.card_color
|
||||
save value: false
|
||||
editable: false
|
||||
extra card field:
|
||||
type: choice
|
||||
name: left decoration
|
||||
script: card.card_color_2
|
||||
save value: false
|
||||
editable: false
|
||||
extra card field:
|
||||
type: choice
|
||||
name: right decoration
|
||||
script: if left_name() then card.card_color_3 else card.card_color_2
|
||||
save value: false
|
||||
editable: false
|
||||
extra card field:
|
||||
type: choice
|
||||
name: binding
|
||||
script: card.card_color
|
||||
save value: false
|
||||
editable: false
|
||||
extra card field:
|
||||
type: text
|
||||
name: card code
|
||||
save value: false
|
||||
script:
|
||||
if set.automatic_card_numbers and not styling.remove_from_autocount then
|
||||
forward_editor(prefix: card_number_m15() + "/" + card_count_m15() + " " + rarity_code() + " ", field: card.card_code_text)
|
||||
else
|
||||
combined_editor(field1: card.custom_card_number, separator: " " + rarity_code() + " ", field2: card.card_code_text)
|
||||
script: card_number_script_core()
|
||||
extra card field:
|
||||
type: choice
|
||||
name: artist arrow
|
||||
@@ -906,6 +1174,12 @@ extra card field:
|
||||
editable: false
|
||||
save value: false
|
||||
show statistics: false
|
||||
extra card field:
|
||||
type: choice
|
||||
name: custom overlay
|
||||
choice: car door
|
||||
save value: false
|
||||
editable: false
|
||||
extra card field:
|
||||
type: choice
|
||||
name: nyx overlay
|
||||
@@ -958,6 +1232,33 @@ extra card field:
|
||||
save value: true
|
||||
editable: true
|
||||
extra card style:
|
||||
color page:
|
||||
left: {page_coords[page_1_side()]["page"]}
|
||||
top: 327
|
||||
width: 170
|
||||
height: 156.5
|
||||
z index: 1
|
||||
render style: image
|
||||
image: {if not left_name() then left_page_img() else right_page_img()}
|
||||
visible: {not (left_name() and right_name())}
|
||||
backup page:
|
||||
left: {page_coords[page_3_side()]["page"]}
|
||||
top: 327
|
||||
width: 170
|
||||
height: 156.5
|
||||
z index: 1
|
||||
render style: image
|
||||
image: {right_page_img()}
|
||||
visible: {not left_name() and not right_name()}
|
||||
binding:
|
||||
left: {if (styling.left_style == "none" and not is_reversed()) or (styling.right_style == "none" and is_reversed()) then 188 else 28 }
|
||||
top: 326
|
||||
width: {if styling.left_style == "none" or styling.right_style == "none" then 160 else 321}
|
||||
height:{if is_spot() then 0 else 10}
|
||||
render style: image
|
||||
z index: -1
|
||||
image: {binding_background()}
|
||||
visible: {not (styling.left_style == "none" and styling.right_style == "none")}
|
||||
card code:
|
||||
left: 24
|
||||
top: 488
|
||||
@@ -996,13 +1297,13 @@ extra card style:
|
||||
z index: 1
|
||||
visible: { card.pt != "" }
|
||||
render style: image
|
||||
image: { if is_spot() then spot_pt() else if is_vehicle() then "vpt.png" else card_ptbox() }
|
||||
image: { if is_spot() then spot_pt() else if is_vehicle() then "pts/vpt.png" else card_ptbox() }
|
||||
stamp:
|
||||
left: 165
|
||||
top: 472
|
||||
width: 46
|
||||
height: 26
|
||||
z index: 1
|
||||
z index: 5
|
||||
render style: image
|
||||
image: { card_stamp() }
|
||||
mask: { if is_spot() then "spotmask.jpg" else "stampmask.jpg"}
|
||||
@@ -1012,7 +1313,7 @@ extra card style:
|
||||
top: 472
|
||||
width: 46
|
||||
height: 26
|
||||
z index: 1
|
||||
z index: 5
|
||||
visible: { is_rare() and styling.use_holofoil_stamps }
|
||||
render style: image
|
||||
image: foil_stamp.png
|
||||
@@ -1026,7 +1327,7 @@ extra card style:
|
||||
image: {if styling.overlay == "" then nil else styling.overlay + "/overlay.png"}
|
||||
mask: { if is_rare() then "foil_mask_rare.png" else "foil_mask.png" }
|
||||
flavor bar:
|
||||
left: { if is_reversed() then 10 else 175}
|
||||
left: { page_coords[page_1_side()]["flavor bar"]}
|
||||
top: { bar_equation() }
|
||||
width: 188
|
||||
height: 1
|
||||
@@ -1035,7 +1336,7 @@ extra card style:
|
||||
image: bar.png
|
||||
visible: { card.rule_text != "" and remove_tags(card.flavor_text) != "" and set.use_flavor_bar }
|
||||
flavor bar 2:
|
||||
left: {if is_reversed() then 175 else 10}
|
||||
left: {page_coords[page_2_side()]["flavor bar"]}
|
||||
top: { bar_equation2() }
|
||||
width: 188
|
||||
height: 1
|
||||
@@ -1061,6 +1362,16 @@ extra card style:
|
||||
image: {"voverlay.png" }
|
||||
z index: 0
|
||||
visible: {is_vehicle()}
|
||||
custom overlay:
|
||||
left: 0
|
||||
top: 0
|
||||
width: 375
|
||||
height: 523
|
||||
render style: image
|
||||
image: { custom_border_blend() }
|
||||
z index: 0
|
||||
visible: {is_custom()}
|
||||
mask: {(if is_vehicle() or is_snow() or is_nyx() then "double_") + "frame_border_mask.png"}
|
||||
nyx overlay:
|
||||
left: 0
|
||||
top: 0
|
||||
@@ -1070,7 +1381,7 @@ extra card style:
|
||||
image: {nyx_background()}
|
||||
z index: 0
|
||||
visible: {is_nyx()}
|
||||
mask: {"nyx/" + (if is_vehicle() or is_snow() then "v_") + "mask.png"}
|
||||
mask: {(if is_vehicle() or is_snow() then "double_") + "frame_border_mask.png"}
|
||||
snow overlay:
|
||||
left: 0
|
||||
top: 0
|
||||
@@ -1080,7 +1391,7 @@ extra card style:
|
||||
image: {snow_background()}
|
||||
z index: 0
|
||||
visible: {is_snow()}
|
||||
mask: {"snow/snow_mask.png"}
|
||||
mask: {"frame_border_mask.png"}
|
||||
evobar:
|
||||
left: 27
|
||||
top: 57
|
||||
@@ -1140,4 +1451,22 @@ extra card style:
|
||||
render style: image
|
||||
choice images:
|
||||
the list: /magic-mainframe-extras.mse-include/mfsfiles/list.png
|
||||
z index: 1
|
||||
left decoration:
|
||||
left: {page_coords["left"]["decoration"]}
|
||||
top: 293
|
||||
width: 200
|
||||
height: 230
|
||||
z index: 4
|
||||
render style: image
|
||||
image: {decoration_background()}
|
||||
visible: {left_name()}
|
||||
right decoration:
|
||||
left: {page_coords["right"]["decoration"]}
|
||||
top: 293
|
||||
width: 200
|
||||
height: 230
|
||||
z index: 4
|
||||
render style: image
|
||||
image: {decoration_background()}
|
||||
visible: {right_name()}
|
||||
|
||||
Reference in New Issue
Block a user