Gen modules integration (#54)

genevensis frames magic-modules integration
This commit is contained in:
GenevensiS
2024-09-17 18:05:00 +02:00
committed by GitHub
parent 8350a8663e
commit e77bb8ec38
3657 changed files with 1911 additions and 1398 deletions

View File

@@ -15,6 +15,9 @@ depends on:
depends on:
package: magic-watermarks.mse-include
version: 2001-01-01
depends on:
package: magic-modules.mse-include
version: 2024-05-20
depends on:
package: magic-mana-large.mse-symbol-font
version: 2001-01-01
@@ -40,11 +43,69 @@ card dpi: 300
init script:
card_shape := { "saga" }
guild_mana := { styling.use_guild_mana_symbols }
corners_default := { "diagonal" }
ancestral_mana := { false }
swap_font := { true }
mana_t := { "new" }
swap_fonts_name_src := { styling.name_font }
swap_fonts_name_default :=
[
name: {"Beleren Bold"},
size: {32},
color: {"black"},
vertical: {0},
italic: {""}
]
swap_fonts_type_src := { styling.type_font }
swap_fonts_type_default :=
[
name: {"Beleren Bold"},
size: {25},
color: {"black"},
vertical: {0},
italic: {""}
]
swap_fonts_body_src := { styling.text_font }
swap_fonts_body_default :=
[
name: {"MPlantin"},
size: {if styling.font_size == "" then 26 else to_number_lax(styling.font_size) or else 26},
color: {"black"},
vertical: {0},
italic: {"MPlantin-Italic"}
]
swap_fonts_pt_src := { styling.PT_font }
swap_fonts_pt_default :=
[
name: {"Beleren Bold"},
size: {32},
color: {"black"},
vertical: {0},
italic: {""}
]
swap_fonts_name2_src := { styling.alias_font }
swap_fonts_name2_default :=
[
name: {"Beleren Bold"},
size: {18},
color: {"black"},
vertical: {0},
italic: {""}
]
swap_fonts_name3_src := { styling.auxiliary_font }
swap_fonts_name3_default :=
[
name: {"Beleren Bold"},
size: {30},
color: {"black"},
vertical: {0},
italic: {""}
]
mana_sort := sort_text@(order: "\\?XYZI[0123456789]VLHFDSCAIEP(WUBRG)")
mana_sort_wedge := sort_text@(order: "\\?XYZI[0123456789]VLHFDSCAIEP(WBGUR)")
@@ -61,21 +122,6 @@ init script:
styling.remove_from_autocount
}
shrink_type :=
{
if styling.shrink_type == "-" then 0
else if styling.shrink_type != "" then (clamp(to_int(styling.shrink_type), minimum: -40, maximum: 24) or else 0)
else if length(remove_tags(card.type)) > 41 then 2
else if length(remove_tags(card.type)) > 38 then 1
else 0
}
shrink_name :=
{
if styling.shrink_name == "-" then 0
else clamp(to_int(styling.shrink_name), minimum: -40, maximum: 31) or else 0
}
shrink_reminder :=
{
if styling.shrink_transformation_reminder_text == "-" then 0
@@ -547,8 +593,6 @@ init script:
if text_size > 9 then "long" else if text_size < 7 then "short" else "medium"
}
font_size := { if styling.font_size == "" then 26 else to_number(styling.font_size) or else 26 }
split_comma := split_text@(match: " *, *")
#break_hard_line := break_text@(match: "\\n")
@@ -580,7 +624,6 @@ init script:
textbox_heights :=
{
###force proper initialization of card_style values
hack_to_force_update := card_style.level_1_text.content_width
active_count := active_abilities() - 1
@@ -797,14 +840,6 @@ styling field:
# fr: Taille du texte
# localized description:
# fr: Fixer la taille de la police pour toutes les abilités. Doit être modifiée manuellement si il n'y a pas assez de place sur la carte. Valeur par défaut: 26.
styling field:
type: text
name: shrink name
description: Reduces the name text's font size by this many points.
# localized caption:
# fr: Rapetisser le nom
# localized description:
# fr: Réduire la taille du nom de N points.
styling field:
type: boolean
name: center name
@@ -814,14 +849,6 @@ styling field:
# localized description:
# fr: Aligner le nom au milieu de la carte?
initial: no
styling field:
type: text
name: shrink type
description: Reduces the type text's font size by this many points.
# localized caption:
# fr: Rapetisser le type
# localized description:
# fr: Réduire la taille du type de N points.
styling field:
type: boolean
name: center type
@@ -1214,27 +1241,51 @@ styling field:
styling field:
type: text
name: name font
description: Font used for the name, alias, type, pt, fuse, transformation reminder, and banner. Hover your mouse over the font file to see it's details, and write it's Title here.
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. Hover your mouse over the font file to see it's details, it's Title is it's name.
# localized caption:
# fr: Police du nom
# localized description:
# fr: Police utilisée pour le nom, alias, type, et force/endurance. Survolez le fichier de police avec la souris pour voir ses informations, et écrivez son titre ici.
# fr: Format: "nom de la police;taille;couleur;décalage vertical;nom de la police italique". Les 4 derniers sont optionnels. Format couleur: "R,G,B,A". Survolez le fichier de police avec la souris pour voir son titre, qui est son nom.
styling field:
type: text
name: 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. Hover your mouse over the font file to see it's details, and write it's Title here.
# localized caption:
# fr: Police du type
# localized description:
# fr: Format: "nom de la police;taille;couleur;décalage vertical;nom de la police italique". Les 4 derniers sont optionnels. Format couleur: "R,G,B,A". Survolez le fichier de police avec la souris pour voir son titre, qui est son nom.
styling field:
type: text
name: text font
description: Font used for the rule text. Hover your mouse over the font file to see it's details, and write it's Title here.
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. Hover your mouse over the font file to see it's details, and write it's Title here.
# localized caption:
# fr: Police du texte des règles
# localized description:
# fr: Police utilisée pour le texte des règles. Survolez le fichier de police avec la souris pour voir ses informations, et écrivez son titre ici.
# fr: Format: "nom de la police;taille;couleur;décalage vertical;nom de la police italique". Les 4 derniers sont optionnels. Format couleur: "R,G,B,A". Survolez le fichier de police avec la souris pour voir son titre, qui est son nom.
styling field:
type: text
name: text italic font
description: Font used for the flavor text and reminder texts. Hover your mouse over the font file to see it's details, and write it's Title here.
name: 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. Hover your mouse over the font file to see it's details, and write it's Title here.
# localized caption:
# fr: Police du texte d'ambiance
# fr: Police de force et endurance
# localized description:
# fr: Police utilisée pour le text d'ambiance. Survolez le fichier de police avec la souris pour voir ses informations, et écrivez son titre ici.
# fr: Format: "nom de la police;taille;couleur;décalage vertical;nom de la police italique". Les 4 derniers sont optionnels. Format couleur: "R,G,B,A". Survolez le fichier de police avec la souris pour voir son titre, qui est son nom.
styling field:
type: text
name: alias 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. Hover your mouse over the font file to see it's details, and write it's Title here.
# localized caption:
# fr: Police de l'alias
# localized description:
# fr: Format: "nom de la police;taille;couleur;décalage vertical;nom de la police italique". Les 4 derniers sont optionnels. Format couleur: "R,G,B,A". Survolez le fichier de police avec la souris pour voir son titre, qui est son nom.
styling field:
type: text
name: auxiliary font
description: Font used for the transformation reminder, fuse, choice bar and banner. 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.
# localized caption:
# fr: Police auxiliaire
# localized description:
# fr: Police utilisée pour la bannière, la fusion, la barre de choix et le rappel de transformation. Format: "nom de la police;taille;couleur;décalage vertical;nom de la police italique". Les 4 derniers sont optionnels. Format couleur: "R,G,B,A".
styling style:
use guild mana symbols:
render style: both
@@ -1247,6 +1298,9 @@ styling style:
yes: { symbol_variation(symbol: set.symbol, variation: "invertedcommon") }
############################################################## Card fields
include file: /magic-modules.mse-include/corners/card_fields
card style:
############################# Background
card color:
@@ -1262,18 +1316,19 @@ card style:
############################# Name line
name:
left: { 64 + (if styling.center_name then name_margin() else nameline_left_margin()) }
top: 55
top: { 55 + name_font_vertical() }
right: { 686 - (if styling.center_name then name_margin() else nameline_right_margin()) }
height: 48
alignment: { if styling.center_name then "center middle shrink-overflow" else "left middle shrink-overflow" }
z index: 42
font:
name: { if styling.name_font == "" then "Beleren Bold" else styling.name_font }
size: { 32 - shrink_name() }
color: black
name: { name_font() }
italic name: { name_font_italic() }
size: { name_font_size() }
color: { name_font_color() }
symbol font:
name: { styling.casting_cost_mana_symbols }
size: { 32 - shrink_name() }
size: { name_font_size() }
casting cost:
right: 687
top: 55
@@ -1281,7 +1336,7 @@ card style:
height: 48
alignment: middle right
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
name: { body_font() }
size: 32
symbol font:
name: { styling.casting_cost_mana_symbols }
@@ -1290,15 +1345,16 @@ card style:
z index: 42
alias:
left: 149
top: 117
top: { 117 + name2_font_vertical() }
width: 452
height: 24
alignment: center middle shrink-overflow
z index: 46
font:
name: { if styling.name_font == "" then "Beleren Bold" else styling.name_font }
size: 18
color: black
name: { name2_font() }
italic name: { name2_font_italic() }
size: { name2_font_size() }
color: { name2_font_color() }
############################# Image
image:
@@ -1318,15 +1374,16 @@ card style:
############################# Card type
type:
left: { 73 + (if styling.center_type then type_margin() else typeline_left_margin()) }
top: 926
top: { 926 + type_font_vertical() }
right: { 677 - (if styling.center_type then type_margin() else typeline_right_margin()) }
height: 44
alignment: { if styling.center_type then "center middle shrink-overflow" else "left middle shrink-overflow" }
z index: 42
font:
name: { if styling.name_font == "" then "Beleren Bold" else styling.name_font }
size: { 25 - shrink_type() }
color: black
name: { type_font() }
italic name: { type_font_italic() }
size: { type_font_size() }
color: { type_font_color() }
separator color: red
rarity:
left: { 620 - (-chop_rarity_left()) }
@@ -1376,18 +1433,19 @@ card style:
############################# Text boxes
level 1 text:
left: 76
top: { if card.alias != "" then 149 else 123 }
top: { (if card.alias != "" then 149 else 123) }
width: 287
height: { textbox_heights()[0] - (-textbox_move1()) }
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
italic name: { if styling.text_italic_font == "" then "MPlantin-Italic" else styling.text_italic_font }
size: { font_size() }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
#scale down to: 20
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { font_size() }
size: { body_font_size() }
#scale down to: 20
alignment: middle left
z index: 44
line height hard: 1.2
@@ -1402,14 +1460,15 @@ card style:
width: 287
height: { if active_abilities() > 1 then textbox_heights()[1] - (-textbox_move2()) else 0 }
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
italic name: { if styling.text_italic_font == "" then "MPlantin-Italic" else styling.text_italic_font }
size: { font_size() }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
#scale down to: 20
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { font_size() }
size: { body_font_size() }
#scale down to: 20
alignment: middle left
z index: 44
line height hard: 1.2
@@ -1424,14 +1483,15 @@ card style:
width: 287
height: { if active_abilities() > 2 then textbox_heights()[2] - (-textbox_move3()) else 0 }
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
italic name: { if styling.text_italic_font == "" then "MPlantin-Italic" else styling.text_italic_font }
size: { font_size() }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
#scale down to: 20
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { font_size() }
size: { body_font_size() }
#scale down to: 20
alignment: middle left
z index: 44
line height hard: 1.2
@@ -1446,14 +1506,15 @@ card style:
width: 287
height: { if active_abilities() > 3 then textbox_heights()[3] - (-textbox_move4()) else 0 }
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
italic name: { if styling.text_italic_font == "" then "MPlantin-Italic" else styling.text_italic_font }
size: { font_size() }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
#scale down to: 20
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { font_size() }
size: { body_font_size() }
#scale down to: 20
alignment: middle left
z index: 44
line height hard: 1.2
@@ -1468,14 +1529,15 @@ card style:
width: 287
height: { if active_abilities() > 4 then textbox_heights()[4] - (-textbox_move5()) else 0 }
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
italic name: { if styling.text_italic_font == "" then "MPlantin-Italic" else styling.text_italic_font }
size: { font_size() }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
#scale down to: 20
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { font_size() }
size: { body_font_size() }
#scale down to: 20
alignment: middle left
z index: 44
line height hard: 1.2
@@ -1490,14 +1552,15 @@ card style:
width: 287
height: { if active_abilities() > 5 then textbox_heights()[5] - (-textbox_move6()) else 0 }
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
italic name: { if styling.text_italic_font == "" then "MPlantin-Italic" else styling.text_italic_font }
size: { font_size() }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
#scale down to: 20
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { font_size() }
size: { body_font_size() }
#scale down to: 20
alignment: middle left
z index: 44
line height hard: 1.2
@@ -1512,14 +1575,15 @@ card style:
width: 287
height: { if active_abilities() > 6 then textbox_heights()[6] - (-textbox_move7()) else 0 }
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
italic name: { if styling.text_italic_font == "" then "MPlantin-Italic" else styling.text_italic_font }
size: { font_size() }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
#scale down to: 20
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { font_size() }
size: { body_font_size() }
#scale down to: 20
alignment: middle left
z index: 44
line height hard: 1.2
@@ -1530,33 +1594,36 @@ card style:
line height soft max: 0.9
rule text 3:
left: { (if contains(styling.fuse, match: "right") then 750 else 0) - (if length(remove_tags(card.rule_text_3)) > 9 then 22 else 0) - 128 + 36 }
top: 521
top: { 521 + name3_font_vertical() }
width: { if styling.fuse != "none" then (if length(remove_tags(card.rule_text_3)) > 9 then 228 else 184) else 0 }
height: 54
z index: 160
alignment: center middle shrink-overflow
font:
name: { if styling.name_font == "" then "Beleren Bold" else styling.name_font }
size: 30
name: { name3_font() }
italic name: { name3_font_italic() }
size: { name3_font_size() }
color: { name3_font_color() }
scale down to: 12
color: black
symbol font:
name: { styling.casting_cost_mana_symbols }
size: 30
name: { styling.text_box_mana_symbols }
size: { name3_font_size() }
scale down to: 12
############################# PT
pt:
z index: 46
left: 549
top: 861
top: { 861 + pt_font_vertical() }
width: 120
height: 56
alignment: center middle shrink-overflow
font:
name: { if styling.name_font == "" then "Beleren Bold" else styling.name_font }
size: 32
color: black
name: { pt_font() }
italic name: { pt_font_italic() }
size: { pt_font_size() }
color: { pt_font_color() }
scale down to: 12
separator color: red
############################# Copyright stuff
@@ -2010,17 +2077,18 @@ extra card style:
image: { reminder_image() }
transformation reminder text:
left: { if styling.transformation_reminder == "notch" then 55 else 6 }
top: { if styling.transformation_reminder == "notch" then 858 else 857 }
top: { (if styling.transformation_reminder == "notch" then 858 else 857) + name3_font_vertical() }
height: { if styling.transformation_reminder == "notch" then 30 else 60 }
width: { if styling.transformation_reminder == "notch" then 75 else if styling.transformation_reminder == "short" then 298 else if styling.transformation_reminder == "medium" then 356 else if styling.transformation_reminder == "long" then 462 else 0 }
z index: 46
font:
name: { if styling.name_font == "" then (if styling.transformation_reminder == "notch" then "ModMatrix" else "Beleren Bold") else styling.name_font }
size: { (if styling.transformation_reminder == "notch" then 27 else 30) - shrink_reminder() }
color: black
name: { if styling.auxiliary_font == "" then (if styling.transformation_reminder == "notch" then "ModMatrix" else "Beleren Bold") else name3_font() }
italic name: { if styling.auxiliary_font == "" then (if styling.transformation_reminder == "notch" then "ModMatrix" else "Beleren Bold") else name3_font_italic() }
size: { name3_font_size() - (if styling.transformation_reminder == "notch" then 3 else 0) - shrink_reminder() }
color: { name3_font_color() }
symbol font:
name: { styling.casting_cost_mana_symbols }
size: { (if styling.transformation_reminder == "notch" then 27 else 30) - shrink_reminder() }
size: { name3_font_size() - (if styling.transformation_reminder == "notch" then 3 else 0) - shrink_reminder() }
alignment: { if styling.transformation_reminder == "notch" then "left middle" else "center middle shrink-overflow" }
transformation reminder pt paste:
left: 496
@@ -2042,20 +2110,21 @@ extra card style:
image: { image("alias", side: "both") }
ascend:
left: 682
top: 147
top: { 147 + name3_font_vertical() }
width: { if styling.banner then 50 else 0 }
height: 754
direction: vertical
z index: 42
alignment: center middle
font:
name: { if styling.name_font == "" then "Beleren Bold" else styling.name_font }
size: 18
name: { name3_font() }
italic name: { name3_font_italic() }
size: { name3_font_size() - 12 }
color: { name3_font_color() }
scale down to: 12
color: black
symbol font:
name: { styling.casting_cost_mana_symbols }
size: 18
size: { name3_font_size() - 12 }
scale down to: 12
ascend box:
left: 673