Files
cajun 8f8d9c637a Indicator update (#76)
* update indicator script and remove color indicator dot styling options

---------

Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
2024-09-24 13:44:27 -05:00

559 lines
17 KiB
Plaintext

mse version: 2.1.2
game: magic
short name: Art Deco PW
full name: Capenna Showcase
icon: card_sample.png
position hint: 095
version: 2024-05-20
depends on:
package: magic.mse-game
version: 2014-06-25
depends on:
package: magic-mana-large.mse-symbol-font
version: 2007-09-23
depends on:
package: magic-mana-small.mse-symbol-font
version: 2007-09-23
depends on:
package: magic-modules.mse-include
version: 2024-05-20
depends on:
package: magic-mainframe-extras.mse-include
version: 2007-09-23
card width: 744
card height: 1039
card dpi: 297
### blanks by Card Conjurer and GenevensiS
### code by GenevensiS
############################################################## Extra scripts
init script:
swap_fonts_body_default :=
[
name: {"MPlantin"},
size: {26.0},
color: { styling.rule_text_color },
vertical: {0},
italic: {"MPlantin-Italic"}
]
typeline_offset_top_1 := { - move_typeline() }
swap_fonts_type_default :=
[
name: {"Beleren Bold"},
size: {26.0},
color: {"white"},
vertical: {0},
italic: {""}
]
move_typeline := { clamp(if styling.move_typeline == "-" then 0 else styling.move_typeline, minimum: -208, maximum: 418) }
transform_symbol_disabled_1 := { true }
swap_fonts_name_default :=
[
name: {"Beleren Bold"},
size: {30.0},
color: {"white"},
vertical: {0},
italic: {""}
]
card_stamp_offset_top_1 := {
if stamp_shape() == "triangle"
then 6
else 0
}
foil_mask_base_image := {
if is_crowned() then "foil_mask_crown.png"
else "foil_mask.png"
}
foil_mask_added_sections := {
output := []
if card.loyalty != "" then output := output + ["foil_mask_loyalty.png"]
output
}@(face:1)
foil_mask_removed_sections := {
output := []
if is_stamped() then output := output + ["foil_mask_round.png"]
output
}@(face:1)
horizontal_card_hybrid_2 :=
{
linear_blend(
image1: template(colors[0]),
image2: template(colors[1]),
x1: 0.45, y1: 0
x2: 0.55, y2: 0
)
}
horizontal_card_hybrid :=
[
0: horizontal_card_hybrid[0]
1: horizontal_card_hybrid[1]
2: horizontal_card_hybrid_2
3: horizontal_card_hybrid[3]
4: horizontal_card_hybrid[4]
5: horizontal_card_hybrid[5]
6: horizontal_card_hybrid[6]
7: horizontal_card_hybrid[7]
]
card_hybrid :=
[
radial: card_hybrid["radial"]
horizontal: horizontal_card_hybrid
overlay: card_hybrid["overlay"]
vertical: card_hybrid["vertical"]
]
template_prefix :=
[
card: "card/",
pinlines_bottom: "pinlines_bottom/",
pinlines_top: "pinlines_top/",
textbox: "textbox/",
crown: "crown/",
stamprim: "stamprim/",
nonstamprim: "nonstamprim/",
identity: "/magic-modules.mse-include/indicators/"
]
template_suffix :=
[
card: "card.png",
pinlines_bottom: "pinlinesbottom.png",
pinlines_top: "pinlinestop.png",
textbox: "textbox.png",
crown: "crown.png",
stamprim: "stamprim.png",
nonstamprim: "nonstamprim.png",
identity: "identity.png"
]
template :=
{
if type == "typeline" then crop_safe("typeline/" + input + "typeline.png", offset_x: 0, offset_y: 500+move_typeline(), width: 744, height: 1039, max_x: 744, max_y: 3000)
else if type == "pinlines_typeline" then crop_safe("pinlines_typeline/" + input + "pinlinestypeline.png", offset_x: 0, offset_y: 500+move_typeline(), width: 744, height: 1039, max_x: 744, max_y: 3000)
else template_prefix[type] + input + template_suffix[type]
}
land_template :=
{
if type == "typeline" then crop_safe("typeline/" + (if input == "a" then "c" else input) + "typeline.png", offset_x: 0, offset_y: 500+move_typeline(), width: 744, height: 1039, max_x: 744, max_y: 3000)
else if type == "pinlines_typeline" then crop_safe("pinlines_typeline/" + (if input == "a" then "c" else input) + "pinlinestypeline.png", offset_x: 0, offset_y: 500+move_typeline(), width: 744, height: 1039, max_x: 744, max_y: 3000)
else template_prefix[type] + (if input == "a" then "c" else input) + template_suffix[type]
}
card_background := { color_background(input: card.card_color, type: "card", base_hybrid: card_hybrid)}@(offset: 0)
card_typeline := { color_background(input: card.card_color, type: "typeline", base_hybrid: card_hybrid)}@(offset: 0)
card_pinlines_typeline := { color_background(input: card.card_color, type: "pinlines_typeline", base_hybrid: card_hybrid)}@(offset: 0)
card_pinlines_bottom := { color_background(input: card.card_color, type: "pinlines_bottom", base_hybrid: card_hybrid)}@(offset: 0)
card_pinlines_top := { color_background(input: card.card_color, type: "pinlines_top", base_hybrid: card_hybrid)}@(offset: 0)
card_textbox := { color_background(input: card.card_color, type: "textbox", base_hybrid: card_hybrid)}@(offset: 0)
card_crown := { color_background(input: card.card_color, type: "crown", base_hybrid: card_hybrid)}@(offset: 0)
card_stamprim := { color_background(input: card.card_color, type: "stamprim", base_hybrid: card_hybrid)}@(offset: 0)
card_nonstamprim := { color_background(input: card.card_color, type: "nonstamprim", base_hybrid: card_hybrid)}@(offset: 0)
pure_colors :=
{
sort_text(
order: if card_is_wedge(input) then "(wbgur)" else "(wubrg)",
(if chosen(card.card_color, choice:"white") then "w") +
(if chosen(card.card_color, choice:"blue") then "u") +
(if chosen(card.card_color, choice:"black") then "b") +
(if chosen(card.card_color, choice:"red") then "r") +
(if chosen(card.card_color, choice:"green") then "g")
)
}
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)) }
chop_top := { split := split_comma(styling.chop_text_box); if length(split) > 0 and split[0] != "" and split[0] != "-" then clamp(split[0], maximum:500, minimum:-500) else 0 }
chop_bottom := { split := split_comma(styling.chop_text_box); if length(split) > 1 and split[1] != "" and split[1] != "-" then clamp(split[1], maximum:500, minimum:-500) else 0 }
chop_right := { split := split_comma(styling.chop_text_box); if length(split) > 2 and split[2] != "" and split[2] != "-" then clamp(split[2], maximum:500, minimum:-500) else 0 }
popout_left := { split := split_comma(styling.popout_art_coordinates); if length(split) > 3 and split.0 != "" then clamp(split.0, minimum: -500, maximum: 1500) else 0 }
popout_top := { split := split_comma(styling.popout_art_coordinates); if length(split) > 3 and split.1 != "" then clamp(split.1, minimum: -500, maximum: 2000) else 0 }
popout_width := { split := split_comma(styling.popout_art_coordinates); if length(split) > 3 and split.2 != "" then clamp(split.2, minimum: 0, maximum: 1500) else 0 }
popout_height := { split := split_comma(styling.popout_art_coordinates); if length(split) > 3 and split.3 != "" then clamp(split.3, minimum: 0, maximum: 2000) else 0 }
card_mask :=
{
if styling.move_typeline == "" then "card_mask.png" else
combine_blend(
image1: combine_blend(
image1: crop_safe("crop_mask_top.png", offset_x: 0, offset_y: 917+move_typeline(), width: 744, height: 1039, max_x: 744, max_y: 3000),
image2: "card_typeline_mask.png",
combine: "multiply"
)
image2: "card_mask.png",
combine: "add"
)
}
pinlines_mask :=
{
combine_blend(
image1: crop_safe("crop_mask_top.png", offset_x: 0, offset_y: 1500-top, width: 744, height: 1039, max_x: 744, max_y: 3000),
image2: crop_safe("crop_mask_bottom.png", offset_x: 0, offset_y: 1500-bottom, width: 744, height: 1039, max_x: 744, max_y: 3000),
combine: "multiply"
)
}
loyalty_textbox_mask_1 :=
{
combine_blend(
image1: crop_safe("crop_mask_top.png", offset_x: 0, offset_y: 849+move_typeline(), width: 744, height: 1039, max_x: 744, max_y: 3000),
image2: "textbox_background_mask.png",
combine: "multiply"
)
}
loyalty_textbox_background_image :=
{
base_image := if styling.textbox_color == rgb(255,255,254) then card_textbox()
else recolor_image("textbox_background.png", color: styling.textbox_color)
set_alpha(base_image, alpha: get_alpha_percentage(styling.textbox_opacity_percentage, default: 70))
}
include file: /magic-modules.mse-include/loyalty/init_script
############################################################## Extra style options
styling field:
type: text
name: popout art coordinates
description: The coordinates for the popout image field, formatted as "left,top,width,height". Used to make the illustration jump in front of the frame.
styling field:
type: boolean
name: stretch art to whole card
description: Make the image span the whole card instead of just the visible part. Use this to help make popout effects.
initial: no
styling field:
type: text
name: move typeline
description: Move the typeline up X pixels. Use negatives to move down.
styling field:
type: choice
name: number of textboxes
description: Number of textboxes for abilities and passives. MODIFY CONTENTS OF TEXTBOXES IF THIS HAS TROUBLE UPDATING AFTER BEING CHANGED.
choice: 1
choice: 2
choice: 3
choice: 4
choice: 5
choice: 6
choice: 7
choice: 8
initial: 3
styling field:
type: text
name: textbox opacity percentage
description: Set the opacity percentage for textboxes. Opaque is 100, transparent is 0, default is 70.
styling field:
type: color
name: textbox color
description: Use the specified color for the textbox background.
choice:
name: black
color: rgb(0,0,0)
choice:
name: white
color: rgb(255,255,255)
choice:
name: use card color
color: rgb(255,255,254)
initial: rgb(255,255,254)
styling field:
type: text
name: stripes opacity percentage
description: Set the opacity percentage for stripes separating abilities. Opaque is 100, transparent is 0, default is 40.
styling field:
type: color
name: stripes color
description: Use the specified color for the textbox background.
choice:
name: black
color: rgb(0,0,0)
choice:
name: white
color: rgb(255,255,255)
initial: rgb(255,255,255)
styling field:
type: text
name: move separators
description: Moves the limits between abilities down by this many pixels. Use negatives to move up. Formatted as "1,2,3,4,5"
styling field:
type: text
name: move loyalty costs
description: Moves loyalty costs down by this many pixels. Use negatives to move up. Formatted as "1,2,3,4,5,6"
styling field:
type: color
name: rule text color
description: Use the specified color for the rule text.
choice:
name: black
color: rgb(0,0,0)
choice:
name: white
color: rgb(255,255,255)
initial: rgb(0,0,0)
include file: /magic-modules.mse-include/texts/styling_fields
styling field:
type: choice
name: legend crown
description: Use the legend crown?
choice: yes
choice: if legendary
choice: no
initial: if legendary
include file: /magic-modules.mse-include/rarities/styling_fields
include file: /magic-modules.mse-include/watermarks/styling_fields
styling field:
type: package choice
name: overlay
description: Should there be an overlay applied, such as foil?
match: magic-overlay-*.mse-include
required: false
include file: /magic-modules.mse-include/information/styling_fields
include file: /magic-modules.mse-include/symbol-fonts/styling_fields
include file: /magic-modules.mse-include/fonts/styling_fields
############################################################## Card fields
include file: /magic-modules.mse-include/loyalty/card_fields
include file: /magic-modules.mse-include/information/card_fields
include file: /magic-modules.mse-include/stamps/card_fields
include file: /magic-modules.mse-include/corners/card_fields
include file: /magic-modules.mse-include/watermarks/card_fields
include file: /magic-modules.mse-include/typelines/card_fields
include file: /magic-modules.mse-include/namelines/card_fields
include file: /magic-modules.mse-include/foils/card_fields
card style:
############################# Background stuff
border color:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 100
mask: border_mask.png
card color:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 210
popup style: in place
render style: image
image: { card_background() }
mask: { card_mask() }
############################# Image
image:
left: { if styling.stretch_art_to_whole_card then 0 else 32 }
top: { if styling.stretch_art_to_whole_card then 0 else 106 }
width: { if styling.stretch_art_to_whole_card then stylesheet.card_width else 680 }
height: { if styling.stretch_art_to_whole_card then stylesheet.card_height else if get_alpha_percentage(styling.textbox_opacity_percentage, default: 70) > 0.995 then 474-move_typeline() else 852 }
z index: 0
mainframe image:
left: { popout_left() }
top: { popout_top() }
width: { popout_width() }
height: { popout_height() }
z index: 1010
############################# Text box
text:
left: 97
top: { 656 - move_typeline() + chop_top() + (if is_stamped() then 7 else 0) + body_font_vertical() }
right: { 677 - chop_right() }
bottom: { 953 - chop_bottom() - if is_stamped() then 7 else 0 }
z index: 900
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: 2.2
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"
font:
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
scale down to: 12
color: { body_font_color() }
symbol font:
name: { styling.text_box_mana_symbols }
size: { body_font_size() }
scale down to: 12
############################################################## Extra card fields
extra card field:
type: choice
name: pinlines top
script: card.card_color
editable: false
save value: false
show statistics: false
extra card field:
type: choice
name: pinlines bottom
script: card.card_color
editable: false
save value: false
show statistics: false
extra card field:
type: choice
name: pinlines typeline
script: card.card_color
editable: false
save value: false
show statistics: false
extra card field:
type: choice
name: typeline
script: card.card_color
editable: false
save value: false
show statistics: false
extra card field:
type: color
name: pinlines border
script: card.border_color
editable: false
save value: false
show statistics: false
extra card field:
type: choice
name: crown
script: card.card_color
editable: false
save value: false
show statistics: false
extra card field:
type: color
name: crown border
script: card.border_color
editable: false
save value: false
show statistics: false
extra card field:
type: choice
name: card stamp rim
script: card.card_color
editable: false
save value: false
show statistics: false
extra card field:
type: color
name: card stamp border
script: card.border_color
editable: false
save value: false
show statistics: false
extra card style:
pinlines top:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 200
render style: image
image: { card_pinlines_top() }
mask: { pinlines_mask(top: 135, bottom: 553-move_typeline()) }
pinlines bottom:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 200
render style: image
image: { card_pinlines_bottom() }
mask: { pinlines_mask(top: 680-move_typeline(), bottom: 883) }
pinlines typeline:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 210
render style: image
image: { card_pinlines_typeline() }
typeline:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 210
render style: image
image: { card_typeline() }
pinlines border:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 100
mask: { crop_safe("border_pinlines_mask.png", offset_x: 0, offset_y: 500+move_typeline(), width: 744, height: 1039, max_x: 744, max_y: 3000) }
crown:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 420
visible: { is_crowned() }
render style: image
image: { card_crown() }
crown border:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 400
visible: { is_crowned() }
mask: border_crown_mask.png
card stamp rim:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 858
render style: image
image: { if is_stamped() then card_stamprim() else card_nonstamprim() }
card stamp border:
left: 0
top: 0
width: { stylesheet.card_width }
height: { stylesheet.card_height }
z index: 855
visible: { is_stamped() }
mask: border_stamp_mask.png