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,89 @@ card dpi: 300
init script:
card_shape := { "adventure" }
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_type3_src := { styling.adventure_name_font }
swap_fonts_type3_default :=
[
name: {"Beleren Bold"},
size: {28},
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_type2_src := { styling.adventure_type_font }
swap_fonts_type2_default :=
[
name: {"Beleren Bold"},
size: {21},
color: {"black"},
vertical: {0},
italic: {""}
]
swap_fonts_body_src := { styling.text_font }
swap_fonts_body_default :=
[
name: {"MPlantin"},
size: {24},
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 +142,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
@@ -772,14 +838,6 @@ set info style:
border color 2: rgb(0, 0, 0)
############################################################## Extra style options
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
@@ -789,14 +847,6 @@ styling field:
# localized description:
# fr: Aligner le nom au milieu de la carte?
initial: no
styling field:
type: text
name: shrink adventure name
description: Reduces the adventure name text's font size by this many points.
# localized caption:
# fr: Rapetisser le nom de l'aventure
# localized description:
# fr: Réduire la taille du nom de l'aventure de N points.
styling field:
type: boolean
name: center adventure name
@@ -806,29 +856,6 @@ styling field:
# localized description:
# fr: Aligner le nom de l'aventure au milieu de la page d'aventure?
initial: no
styling field:
type: color
name: adventure name text color
description: Use the specified color for the name of the adventure.
# localized caption:
# fr: Couleur du nom de l'aventure
# localized description:
# fr: Utiliser la couleur spécifiée pour le texte du nom de l'aventure.
choice:
name: black
color: rgb(0,0,0)
choice:
name: white
color: rgb(255,255,255)
initial: black
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
@@ -838,14 +865,6 @@ styling field:
# localized description:
# fr: Aligner le type au milieu de la carte?
initial: no
styling field:
type: text
name: shrink adventure type
description: Reduces the adventure type text's font size by this many points.
# localized caption:
# fr: Rapetisser le type de l'aventure
# localized description:
# fr: Réduire la taille du type de l'aventure de N points.
styling field:
type: boolean
name: center adventure type
@@ -855,21 +874,6 @@ styling field:
# localized description:
# fr: Aligner le type de l'aventure au milieu de la page d'aventure?
initial: no
styling field:
type: color
name: adventure type text color
description: Use the specified color for the type of the adventure.
# localized caption:
# fr: Couleur du type de l'aventure
# localized description:
# fr: Utiliser la couleur spécifiée pour le texte du type de l'aventure.
choice:
name: black
color: rgb(0,0,0)
choice:
name: white
color: rgb(255,255,255)
initial: black
styling field:
type: text
name: chop rule textbox
@@ -878,14 +882,6 @@ styling field:
# fr: Tronquer le texte de règles
# localized description:
# fr: Réduire la taille du haut, du bas, et de la droite de la zone du texte de règles de N pixels. Format: "1,2,3"
styling field:
type: text
name: rule text font size cap
description: The font size of rule text can't become greater than this. Default is 24.
# localized caption:
# fr: Caper le texte de règles
# localized description:
# fr: Limiter la taille maximale de police des textes de règles. Valeur par défaut: 24.
styling field:
type: choice
name: center rule text
@@ -908,14 +904,6 @@ styling field:
# fr: Tronquer le texte d'ambiance
# localized description:
# fr: Réduire la taille du haut, du bas, et de la droite de la zone du texte d'ambiance de N pixels. Format: "1,2,3"
styling field:
type: text
name: flavor text font size cap
description: The font size of flavor text can't become greater than this. Default is 24.
# localized caption:
# fr: Caper le texte d'ambiance
# localized description:
# fr: Limiter la taille maximale de police du texte d'ambiance. Valeur par défaut: 24.
styling field:
type: choice
name: center flavor text
@@ -1319,27 +1307,67 @@ 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: adventure 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. 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 de l'aventure
# 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: 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: adventure 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 de l'aventure
# 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:
center rule text:
render style: both
@@ -1366,6 +1394,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:
@@ -1390,32 +1421,34 @@ 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() }
name 2:
left: { 70 + if styling.center_adventure_name then (card_style.casting_cost_2.content_width + 2) else 0 }
top: 660
top: { 660 + type3_font_vertical() }
right: { 352 - card_style.casting_cost_2.content_width }
height: 42
alignment: { if styling.center_adventure_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: { 28 - shrink_adventure_name() }
color: { styling.adventure_name_text_color }
name: { type3_font() }
italic name: { type3_font_italic() }
size: { type3_font_size() - 4 }
color: { type3_font_color() }
symbol font:
name: { styling.casting_cost_mana_symbols }
size: { 28 - shrink_adventure_name() }
size: { type3_font_size() }
casting cost:
right: 687
top: 55
@@ -1423,7 +1456,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 }
@@ -1437,7 +1470,7 @@ card style:
height: 42
alignment: middle right
font:
name: { if styling.text_font == "" then "MPlantin" else styling.text_font }
name: { body_font() }
size: 28
symbol font:
name: { styling.casting_cost_mana_symbols }
@@ -1446,15 +1479,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: 42
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:
@@ -1474,27 +1508,29 @@ card style:
############################# Card type
type:
left: { 73 + (if styling.center_type then type_margin() else typeline_left_margin()) }
top: 596
top: { 596 + 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
type 2:
left: { if has_adventure_color_indicator() then 100 else 70 }
top: 713
top: { 713 + type2_font_vertical() }
right: { 354 - if styling.center_adventure_type and has_adventure_color_indicator() then 30 else 0 }
height: 29
alignment: { if styling.center_adventure_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: { 21 - shrink_adventure_type() }
color: { styling.adventure_type_text_color }
name: { type2_font() }
italic name: { type2_font_italic() }
size: { type2_font_size() }
color: { type2_font_color() }
separator color: red
rarity:
left: { 620 - (-chop_rarity_left()) }
@@ -1544,18 +1580,18 @@ card style:
############################# Text boxes
rule text:
left: 399
top: { 659 - (-chop_top()) }
top: { 659 - (-chop_top()) + body_font_vertical() }
width: { 276 - chop_right() }
bottom: { 953 - chop_bot() }
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: { if styling.rule_text_font_size_cap == "" then 24 else to_number(styling.rule_text_font_size_cap) or else 24 }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
scale down to: 12
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { if styling.rule_text_font_size_cap == "" then 24 else to_number(styling.rule_text_font_size_cap) or else 24 }
size: { body_font_size() }
scale down to: 12
alignment:
script:
@@ -1576,18 +1612,18 @@ card style:
line height line max: 1.6
rule text 2:
left: 74
top: 752
top: { 752 + body_font_vertical() }
width: 276
bottom: { if styling.transformation_reminder != "none" and styling.transformation_reminder != "notch" then 940 else 968 }
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: { if styling.rule_text_font_size_cap == "" then 24 else to_number(styling.rule_text_font_size_cap) or else 24 }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
scale down to: 12
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { if styling.rule_text_font_size_cap == "" then 24 else to_number(styling.rule_text_font_size_cap) or else 24 }
size: { body_font_size() }
scale down to: 12
alignment:
script:
@@ -1608,18 +1644,18 @@ card style:
line height line max: 1.6
flavor text:
left: 399
top: { 953 - chop_bot() - (-chop_flavor_top()) }
top: { 953 - chop_bot() - (-chop_flavor_top()) + body_font_vertical() }
width: { 276 - chop_flavor_right() }
bottom: { 970 - chop_flavor_bot() }
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: { if styling.flavor_text_font_size_cap != "" then (to_number(styling.flavor_text_font_size_cap) or else 24) else 24 }
name: { body_font() }
italic name: { body_font_italic() }
size: { body_font_size() }
color: { body_font_color() }
scale down to: 12
color: black
symbol font:
name: { styling.text_box_mana_symbols }
size: { if styling.flavor_text_font_size_cap != "" then (to_number(styling.flavor_text_font_size_cap) or else 24) else 24 }
size: { body_font_size() }
scale down to: 12
alignment:
script:
@@ -1637,33 +1673,36 @@ card style:
line height line max: 1.6
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: 552
top: 950
top: { 950 + 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
@@ -1992,17 +2031,18 @@ extra card style:
image: { reminder_image() }
transformation reminder text:
left: { if styling.transformation_reminder == "notch" then 623 else if styling.transformation_reminder == "short" then 4 else 22 }
top: { if styling.transformation_reminder == "notch" then 905 else 947 }
top: { (if styling.transformation_reminder == "notch" then 905 else 947) + 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 191 else if styling.transformation_reminder == "medium" then 294 else if styling.transformation_reminder == "long" then 404 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 "right middle" else "center middle shrink-overflow" }
transformation reminder pt paste:
left: 456
@@ -2028,20 +2068,21 @@ extra card style:
image: { image("alias", side: "both") }
ascend:
left: 18
top: 147
top: { 147 + name3_font_vertical() }
width: { if styling.banner then 50 else 0 }
height: 424
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: 9