Update Alternate Rarity Color script (#24)
Added Alt Rarity to: - Adventures - Aftermath - Mainframe - M15 Future - Mainframe Planeswalkers - Mainframe DFCs - Paradox - Sagas - Mainframe Splits Added custom fonts to - Adventures - Mainframe - Mainframe Tokens Added Print Fix to - Adventures - Mainframe DFC - Mainframe Planeswalkers - Mainframe Tokens - Paradox - Sagas Close #19
This commit is contained in:
@@ -6,7 +6,7 @@ icon: card-sample.png
|
||||
installer group: magic/m15 style/tokens
|
||||
position hint: 004
|
||||
|
||||
version: 2020-05-10
|
||||
version: 2024-01-05
|
||||
depends on:
|
||||
package: magic.mse-game
|
||||
version: 2014-06-25
|
||||
@@ -112,6 +112,127 @@ init script:
|
||||
white_state_font := {is_weird_token() and contains(styling.other_options, match:"white state text")}
|
||||
archetype_image := {is_archetype() and contains(styling.other_options, match:"archetype image")}
|
||||
use_drop_shadow := {is_weird_token() and contains(styling.other_options, match:"state drop shadow")}
|
||||
|
||||
# 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: if is_archetype() then "Gotham Medium" else if is_copy() or mtgo_abil() then "Beleren Bold" else "Beleren Small Caps Bold"
|
||||
)
|
||||
}
|
||||
name_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_name_font,
|
||||
font_size: if is_archetype() then 9 else if is_copy() or mtgo_abil() then 18 else 19
|
||||
) - shrink_name()
|
||||
}
|
||||
name_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_name_font,
|
||||
font_color: if is_weird_token() then "white" else if is_m20() and card.card_color == "white" and not is_clear() then "black" else if is_m20() then "white" else rgb(255,239,128)
|
||||
)
|
||||
}
|
||||
name_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_name_font
|
||||
)
|
||||
}
|
||||
name_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_name_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: 14
|
||||
) - shrink_type()
|
||||
}
|
||||
type_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_type_font,
|
||||
font_color: if mtgo_abil() then rgb(255,239,128) else "black"
|
||||
)
|
||||
}
|
||||
type_font_vertical := {
|
||||
swap_font_vertical(
|
||||
src: styling.custom_type_font
|
||||
)
|
||||
}
|
||||
type_font_italic := {
|
||||
swap_font_italic(
|
||||
src: styling.custom_type_font
|
||||
)
|
||||
}
|
||||
|
||||
body_font := {
|
||||
swap_font_name(
|
||||
src:styling.custom_body_font,
|
||||
font_name: if is_archetype() then "Gotham Pro" else "MPlantin"
|
||||
)
|
||||
}
|
||||
body_font_size := {
|
||||
swap_font_size(
|
||||
src:styling.custom_body_font,
|
||||
font_size: if styling.shrink_font_size != "" then 14 - to_number(styling.shrink_font_size) else 14
|
||||
)
|
||||
}
|
||||
body_font_color := {
|
||||
swap_font_color(
|
||||
src: styling.custom_body_font,
|
||||
font_color: if white_state_font() then "white" else "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
|
||||
)
|
||||
}
|
||||
############################################################## Set info fields
|
||||
set info style:
|
||||
symbol:
|
||||
@@ -175,6 +296,31 @@ styling field:
|
||||
type: text
|
||||
name: shrink font size
|
||||
description: Reduces the fontsize text N points.
|
||||
styling field:
|
||||
type: text
|
||||
name: alt rarity color
|
||||
description: Use a custom color for the rarity symbol. Formatted as "R1,G1,B1:R2,G2,B2:...:X:" 1 and 2 are fill color, 3 and 4 border color, X is border thickness. For example, rare is 214,196,94:95,84,40:0,0,0:0,0,0:0.07
|
||||
styling field:
|
||||
type: boolean
|
||||
name: apply custom fonts
|
||||
description: Enable to attempt to use custom fonts given below
|
||||
initial: no
|
||||
styling field:
|
||||
type: text
|
||||
name: custom name font
|
||||
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.
|
||||
styling field:
|
||||
type: text
|
||||
name: custom type font
|
||||
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.
|
||||
styling field:
|
||||
type: text
|
||||
name: custom body font
|
||||
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.
|
||||
styling field:
|
||||
type: text
|
||||
name: custom pt font
|
||||
description: Formatted as "font name;font size;font color;vertical offset;italic font name" last 4 are optional. color can be a name or R,G,B,A numbers.
|
||||
styling field:
|
||||
type: text
|
||||
name: popout image style
|
||||
@@ -283,7 +429,7 @@ card style:
|
||||
############################# Name line
|
||||
name:
|
||||
left: { if is_copy() then 32 else 30}
|
||||
top: { if is_archetype() then 10 else if is_copy() then 24 else 26}
|
||||
top: { (if is_archetype() then 10 else if is_copy() then 24 else 26) + name_font_vertical()}
|
||||
width: { 315 - (if is_copy() then card_style.casting_cost.content_width else 0)}
|
||||
height: {if is_archetype() then 14 else 28 - (0.5 * shrink_name())}
|
||||
alignment: { if is_copy() or mtgo_abil() then "bottom shrink-overflow" else "bottom center"}
|
||||
@@ -291,11 +437,11 @@ card style:
|
||||
padding top: 2
|
||||
z index: 5
|
||||
font:
|
||||
name: { if is_archetype() then "Gotham Medium" else if is_copy() or mtgo_abil() then "Beleren Bold" else "Beleren Small Caps Bold" }
|
||||
size: { if is_archetype() then 9 else (if is_copy() or mtgo_abil() then 18 else 19) - shrink_name()}
|
||||
color: {if is_weird_token() then "white" else if is_m20() and card.card_color == "white" and not is_clear() then "black" else if is_m20() then "white" else rgb(255,239,128)}
|
||||
name: { name_font() }
|
||||
italic name: { name_font_italic() }
|
||||
size: { name_font_size() }
|
||||
color: { name_font_color() }
|
||||
weight: {if is_archetype() then "bold" else ""}
|
||||
always symbol: true
|
||||
alias:
|
||||
left: {if is_skinned() then 45 else 19}
|
||||
top: {if is_m20() and is_skinned() then (if is_legend() then 57 else 51) else 52}
|
||||
@@ -352,8 +498,9 @@ card style:
|
||||
else if is_clear() then 354
|
||||
else 354)
|
||||
+ (if is_m20() and is_textless() then 1 else if is_m20() and not is_tall() then 2 else if is_m20() and is_clear() then 2)
|
||||
+ shrink_type()}
|
||||
width: { if is_weird_token() then 0 else 311 - ( if contains(styling.other_options, match:"remove rarity") then 0 else max(22,card_style.rarity.content_width)) }
|
||||
+ shrink_type()
|
||||
+ type_font_vertical()}
|
||||
width: { if is_weird_token() then 0 else 311 - ( if contains(styling.other_options, match:"remove rarity") then 0 else rare_width()) }
|
||||
height: { 20 - shrink_type()}
|
||||
alignment: top shrink-overflow
|
||||
z index: 2
|
||||
@@ -361,9 +508,10 @@ card style:
|
||||
padding bottom: 4
|
||||
padding right: 2
|
||||
font:
|
||||
name: Beleren Bold
|
||||
size: { 14 - shrink_type() }
|
||||
color: { if mtgo_abil() then rgb(255,239,128) else "black"}
|
||||
name: { type_font() }
|
||||
italic name: { type_font_italic() }
|
||||
size: { type_font_size() }
|
||||
color: { type_font_color() }
|
||||
separator color: red
|
||||
rarity:
|
||||
right: 344
|
||||
@@ -385,43 +533,52 @@ card style:
|
||||
basic land:
|
||||
script:
|
||||
if use_main_rarity() then "/magic-mainframe-extras.mse-include/" + un_png(set.mainframe_rarity_name) + "c.png"
|
||||
else if use_alt_rarity() then alt_symbol()
|
||||
else if styling.inverted_common_symbol then symbol_variation(symbol: set.symbol, variation: "invertedcommon")
|
||||
else symbol_variation(symbol: set.symbol, variation: "common")
|
||||
common:
|
||||
script:
|
||||
if use_main_rarity() then "/magic-mainframe-extras.mse-include/" + un_png(set.mainframe_rarity_name) + "c.png"
|
||||
else if use_alt_rarity() then alt_symbol()
|
||||
else if styling.inverted_common_symbol then symbol_variation(symbol: set.symbol, variation: "invertedcommon")
|
||||
else symbol_variation(symbol: set.symbol, variation: "common")
|
||||
uncommon:
|
||||
script:
|
||||
if use_main_rarity() then "/magic-mainframe-extras.mse-include/" + un_png(set.mainframe_rarity_name) + "u.png"
|
||||
else if use_alt_rarity() then alt_symbol()
|
||||
else symbol_variation(symbol: set.symbol, variation: "uncommon")
|
||||
rare:
|
||||
script:
|
||||
if use_main_rarity() then "/magic-mainframe-extras.mse-include/" + un_png(set.mainframe_rarity_name) + "r.png"
|
||||
else if use_alt_rarity() then alt_symbol()
|
||||
else symbol_variation(symbol: set.symbol, variation: "rare")
|
||||
mythic rare:
|
||||
script:
|
||||
if use_main_rarity() then "/magic-mainframe-extras.mse-include/" + un_png(set.mainframe_rarity_name) + "m.png"
|
||||
else if use_alt_rarity() then alt_symbol()
|
||||
else symbol_variation(symbol: set.symbol, variation: "mythic rare")
|
||||
special:
|
||||
script:
|
||||
if use_main_rarity() then "/magic-mainframe-extras.mse-include/" + un_png(set.mainframe_rarity_name) + "s.png"
|
||||
else if use_alt_rarity() then alt_symbol()
|
||||
else symbol_variation(symbol: set.symbol, variation: "special")
|
||||
masterpiece:
|
||||
script:
|
||||
if use_main_rarity() then "/magic-mainframe-extras.mse-include/" + un_png(set.mainframe_rarity_name) + "mp.png"
|
||||
else if use_alt_rarity() then alt_symbol()
|
||||
else symbol_variation(symbol: set.masterpiece_symbol, variation: "mythic rare")
|
||||
############################# Text box
|
||||
text:
|
||||
left: {if is_archetype() then 20 else 29}
|
||||
top:
|
||||
{
|
||||
if is_archetype() then 30
|
||||
(if is_archetype() then 30
|
||||
else if is_state() then 327
|
||||
else if is_tall() then 327
|
||||
else if is_textless() then 459
|
||||
else 388}
|
||||
else 388)
|
||||
+ body_font_vertical()
|
||||
}
|
||||
width: { if is_archetype() then 337 else 315}
|
||||
height:
|
||||
{
|
||||
@@ -429,13 +586,14 @@ card style:
|
||||
else if is_state() then 154
|
||||
else if is_tall() then 154
|
||||
else if is_textless() then 27
|
||||
else 94}
|
||||
else 94
|
||||
}
|
||||
font:
|
||||
name: {if is_archetype() then "Gotham Pro" else "MPlantin"}
|
||||
italic name: MPlantin-Italic
|
||||
size: { if styling.shrink_font_size != "" then 14 - to_number(styling.shrink_font_size) else 14}
|
||||
scale down to: 8
|
||||
color: {if white_state_font() then "white" else "black"}
|
||||
name: { body_font() }
|
||||
italic name: { body_font_italic() }
|
||||
size: { body_font_size() }
|
||||
scale down to: 6
|
||||
color: { body_font_color() }
|
||||
shadow color: {if not use_drop_shadow() then rgba(0,0,0,0) else if white_state_font() then "black" else "white"}
|
||||
shadow displacement x: -1
|
||||
shadow displacement y: 1
|
||||
@@ -515,14 +673,15 @@ card style:
|
||||
pt:
|
||||
z index: 2
|
||||
left: { if center_pt() then 157.5 else 286}
|
||||
top: 469
|
||||
top: {469 + pt_font_vertical()}
|
||||
width: 60
|
||||
height: 28
|
||||
alignment: center middle shrink-overflow
|
||||
font:
|
||||
name: Beleren Bold
|
||||
size: 16
|
||||
color: {if is_vehicle() then "white" else "black"}
|
||||
name: {pt_font()}
|
||||
italic name: {pt_font_italic()}
|
||||
size: {pt_font_size()}
|
||||
color: {pt_font_color()}
|
||||
separator color: red
|
||||
############################# Card sorting / numbering
|
||||
set code:
|
||||
|
||||
Reference in New Issue
Block a user