card_fields rewrite and magic-modules.mse-include (#21)

Overhauls the card_fields file to allow for template designers more freedom in manipulating data.

Adds magic-modules.mse-include, a large scale include file for building templates in a standardized way. Applying this to existing frames will be coming in future updates.
This commit is contained in:
GenevensiS
2024-05-25 00:57:47 +02:00
committed by GitHub
parent 44b059e2f7
commit fd4b8e4c89
1195 changed files with 13325 additions and 3633 deletions

View File

@@ -0,0 +1,510 @@
include file: /magic-modules.mse-include/information/card_fields_dfc
card style:
set code 3:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
24 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
24 * face_coordinates_map(3).width/375 + face_coordinates_map(3).left + information_codes_offset_left_3()
)
top:
script:
if face_is_rotated(3) then
(
24 * face_coordinates_map(3).height/375 + face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
499 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
40 * face_coordinates_map(3).width/523
) else (
40 * face_coordinates_map(3).width/375
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: middle left
font:
name: Relay-Medium
size: { 7 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
weight: bold
z index: 900
set language 3:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
14 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
24 * face_coordinates_map(3).width/375 + face_coordinates_map(3).left + information_codes_offset_left_3()
)
top:
script:
if face_is_rotated(3) then
(
24 * face_coordinates_map(3).height/375 + face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
509 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
code := if is_masterpiece() then set.masterpiece_set_code else set.set_code
if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) or code == "" then 0
else 40 * face_coordinates_map(3).width/523
) else (
code := if is_masterpiece() then set.masterpiece_set_code else set.set_code
if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) or code == "" then 0
else 40 * face_coordinates_map(3).width/375
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: middle left
font:
name: Relay-Medium
size: { 7 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
weight: bold
z index: 900
card code 3:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
34 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
24 * face_coordinates_map(3).width/375 + face_coordinates_map(3).left + information_codes_offset_left_3()
)
top:
script:
if face_is_rotated(3) then
(
24 * face_coordinates_map(3).height/375 + face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
489 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
120 * face_coordinates_map(3).width/523
) else (
120 * face_coordinates_map(3).width/375
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: middle left
font:
name: Relay-Medium
size: { 7 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
weight: bold
z index: 900
illustrator 3:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
24 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
initial_space := 25 * face_coordinates_map(3).width/375
set_code_space := 4 * face_coordinates_map(3).width/375
set_code_width := if card.set_code_3 == "" then 0 else (set_code_space + card_style.set_code_3.content_width)
set_language_width := if card.set_language_3 == "" then 0 else (set_code_space + card_style.set_language_3.content_width)
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
illustrator_brush_width := (if card.illustrator_brush_3 == "art old" then 31 else if contains(card.illustrator_brush_3, match: "wide") then 17 else 14) * face_coordinates_map(3).width/375
initial_space + set_width + illustrator_brush_width + face_coordinates_map(3).left + information_codes_offset_left_3()
)
top:
script:
if face_is_rotated(3) then
(
initial_space := 25 * face_coordinates_map(3).height/375
set_code_space := 4 * face_coordinates_map(3).height/375
set_code_width := if card.set_code_3 == "" then 0 else (set_code_space + card_style.set_code_3.content_width)
set_language_width := if card.set_language_3 == "" then 0 else (set_code_space + card_style.set_language_3.content_width)
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
illustrator_brush_width := (if card.illustrator_brush_3 == "art old" then 31 else if contains(card.illustrator_brush_3, match: "wide") then 17 else 14) * face_coordinates_map(3).height/375
initial_space + set_width + illustrator_brush_width + face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
499 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
max(50 * face_coordinates_map(3).width/523, card_style.illustrator_3.content_width + 10 * face_coordinates_map(3).width/523)
) else (
max(50 * face_coordinates_map(3).width/375, card_style.illustrator_3.content_width + 10 * face_coordinates_map(3).width/375)
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: middle left
font:
name: Beleren Small Caps Bold
size: { 7.25 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
z index: 900
illustrator brush 3:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
22 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
initial_space := 25 * face_coordinates_map(3).width/375
set_code_space := 4 * face_coordinates_map(3).width/375
set_code_width := if card.set_code_3 == "" then 0 else (set_code_space + card_style.set_code_3.content_width)
set_language_width := if card.set_language_3 == "" then 0 else (set_code_space + card_style.set_language_3.content_width)
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
initial_space + set_width + face_coordinates_map(3).left + information_codes_offset_left_3()
)
top:
script:
if face_is_rotated(3) then
(
initial_space := 25 * face_coordinates_map(3).height/375
set_code_space := 4 * face_coordinates_map(3).height/375
set_code_width := if card.set_code_3 == "" then 0 else (set_code_space + card_style.set_code_3.content_width)
set_language_width := if card.set_language_3 == "" then 0 else (set_code_space + card_style.set_language_3.content_width)
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
initial_space + set_width + face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
501 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
(if card.illustrator_brush_3 == "art old" then 30 else if contains(card.illustrator_brush_3, match: "wide") then 15 else 12) * face_coordinates_map(3).width/523
) else (
(if card.illustrator_brush_3 == "art old" then 30 else if contains(card.illustrator_brush_3, match: "wide") then 15 else 12) * face_coordinates_map(3).width/375
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 7 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 7 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
popup style: in place
include file: /magic.mse-game/information/menu_choice_images
render style: image
image: { illustrator_brush_image(field: 3) }
z index: 900
additional credit 5:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
14 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
initial_space := 25 * face_coordinates_map(3).width/375
set_code_space := 4 * face_coordinates_map(3).width/375
set_code_width := if card.set_code_3 == "" then 0 else (set_code_space + card_style.set_code_3.content_width)
set_language_width := if card.set_language_3 == "" then 0 else (set_code_space + card_style.set_language_3.content_width)
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
additional_credit_brush_width := (if card.additional_credit_brush_5 == "art old" then 31 else if contains(card.additional_credit_brush_5, match: "wide") then 17 else 14) * face_coordinates_map(3).width/375
initial_space + set_width + additional_credit_brush_width + face_coordinates_map(3).left + information_codes_offset_left_3()
)
top:
script:
if face_is_rotated(3) then
(
initial_space := 25 * face_coordinates_map(3).height/375
set_code_space := 4 * face_coordinates_map(3).height/375
set_code_width := if card.set_code_3 == "" then 0 else (set_code_space + card_style.set_code_3.content_width)
set_language_width := if card.set_language_3 == "" then 0 else (set_code_space + card_style.set_language_3.content_width)
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
additional_credit_brush_width := (if card.additional_credit_brush_5 == "art old" then 31 else if contains(card.additional_credit_brush_5, match: "wide") then 17 else 14) * face_coordinates_map(3).height/375
initial_space + set_width + additional_credit_brush_width + face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
509 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then 0 else max(50 * face_coordinates_map(3).width/523, card_style.additional_credit_4.content_width + 10 * face_coordinates_map(3).width/523)
) else (
if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then 0 else max(50 * face_coordinates_map(3).width/375, card_style.additional_credit_4.content_width + 10 * face_coordinates_map(3).width/375)
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: middle left
font:
name: Beleren Small Caps Bold
size: { 7.25 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
z index: 900
additional credit brush 5:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
12 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
initial_space := 25 * face_coordinates_map(3).width/375
set_code_space := 4 * face_coordinates_map(3).width/375
set_code_width := if card.set_code_3 == "" then 0 else set_code_space + card_style.set_code_3.content_width
set_language_width := if card.set_language_3 == "" then 0 else set_code_space + card_style.set_language_3.content_width
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
initial_space + set_width + face_coordinates_map(3).left + information_codes_offset_left_3()
)
top:
script:
if face_is_rotated(3) then
(
initial_space := 25 * face_coordinates_map(3).height/375
set_code_space := 4 * face_coordinates_map(3).height/375
set_code_width := if card.set_code_3 == "" then 0 else set_code_space + card_style.set_code_3.content_width
set_language_width := if card.set_language_3 == "" then 0 else set_code_space + card_style.set_language_3.content_width
set_width := if card.additional_credit_brush_5 == "none" or (not set.adaptive_language_height) then set_code_width else max(set_code_width, set_language_width)
initial_space + set_width + face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
511 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
(if card.additional_credit_brush_5 == "art old" then 30 else if contains(card.additional_credit_brush_5, match: "wide") then 15 else 12) * face_coordinates_map(3).width/523
) else (
(if card.additional_credit_brush_5 == "art old" then 30 else if contains(card.additional_credit_brush_5, match: "wide") then 15 else 12) * face_coordinates_map(3).width/375
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 7 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 7 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
popup style: in place
include file: /magic.mse-game/information/menu_choice_images
render style: image
image: { additional_credit_brush_image(field: 5) }
z index: 900
copyright 3:
angle: { if face_is_rotated(3) then -90 else 0 }
right:
script:
if face_is_rotated(3) then
(
(if card.pt_3 != "" or card.loyalty_3 != "" then 21 + information_secondary_offset_pt_left_3() else if card.secondary_copyright_3 != "" then 23 else 33) * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
351 * face_coordinates_map(3).width/375 + face_coordinates_map(3).left + information_copyright_offset_right_3()
)
top:
script:
if face_is_rotated(3) then
(
351 * face_coordinates_map(3).height/375 + face_coordinates_map(3).top + information_copyright_offset_right_3()
) else (
(if card.pt_3 != "" or card.loyalty_3 != "" then 502 + information_copyright_offset_pt_top_3() else if card.secondary_copyright_3 != "" then 500 else 490) * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
if set.automatic_copyright then 0 else 140 * face_coordinates_map(3).width/523
) else (
if set.automatic_copyright then 0 else 140 * face_coordinates_map(3).width/375
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: middle right shrink-overflow
font:
name: MPlantin
size: { 6.5 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
weight: bold
z index: 900
auto copyright 3:
angle: { if face_is_rotated(3) then -90 else 0 }
right:
script:
if face_is_rotated(3) then
(
(if card.pt_3 != "" or card.loyalty_3 != "" then 21 + information_secondary_offset_pt_left_3() else if card.secondary_copyright_3 != "" then 23 else 33) * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
351 * face_coordinates_map(3).width/375 + face_coordinates_map(3).left + information_copyright_offset_right_3()
)
top:
script:
if face_is_rotated(3) then
(
351 * face_coordinates_map(3).height/375 + face_coordinates_map(3).top + information_copyright_offset_right_3()
) else (
(if card.pt_3 != "" or card.loyalty_3 != "" then 502 + information_copyright_offset_pt_top_3() else if card.secondary_copyright_3 != "" then 500 else 490) * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
if set.automatic_copyright then 140 * face_coordinates_map(3).width/523 else 0
) else (
if set.automatic_copyright then 140 * face_coordinates_map(3).width/375 else 0
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: middle right shrink-overflow
font:
name: MPlantin
size: { 6.5 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
weight: bold
z index: 900
secondary copyright 3:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
33 * face_coordinates_map(3).width/523 + face_coordinates_map(3).left - information_offset_top_3()
) else (
needed := (255 + information_secondary_offset_pt_left_3() - if length(card.secondary_copyright_3) > 9 then 45 else if length(card.secondary_copyright_3) > 6 then 25 else if length(card.secondary_copyright_3) > 4 then 10 else 0) * face_coordinates_map(3).width/375 + face_coordinates_map(3).left
aligned := 351 * face_coordinates_map(3).width/375 + information_copyright_offset_right_3() - (if set.automatic_copyright then card_style.auto_copyright_3.content_width else card_style.copyright_3.content_width) + face_coordinates_map(3).left
max(min(needed, aligned), 211 * face_coordinates_map(3).width/375)
)
top:
script:
if face_is_rotated(3) then
(
211 * face_coordinates_map(3).height/375 + face_coordinates_map(3).top + information_copyright_offset_right_3()
) else (
490 * face_coordinates_map(3).height/523 + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
140 * face_coordinates_map(3).width/523
) else (
needed := (255 + information_secondary_offset_pt_left_3() - if length(card.secondary_copyright_3) > 9 then 45 else if length(card.secondary_copyright_3) > 6 then 25 else if length(card.secondary_copyright_3) > 4 then 10 else 0) * face_coordinates_map(3).width/375 + face_coordinates_map(3).left
aligned := 351 * face_coordinates_map(3).width/375 + information_copyright_offset_right_3() - (if set.automatic_copyright then card_style.auto_copyright_3.content_width else card_style.copyright_3.content_width) + face_coordinates_map(3).left
left := max(min(needed, aligned), 211 * face_coordinates_map(3).width/375)
right := (if card.pt_3 != "" then 279 + information_secondary_offset_pt_left_3() else if card.loyalty_3 != "" then 295 + information_secondary_offset_pt_left_3() else 351) * face_coordinates_map(3).width/375 + face_coordinates_map(3).left + information_copyright_offset_right_3()
right - left
)
height:
script:
if face_is_rotated(3) then
(
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/375
) else (
if information_disabled_3() then 0 else 10 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
alignment: { if card.pt_3 != "" or card.loyalty_3 != "" then "middle left shrink-overflow" else "middle right shrink-overflow" }
font:
name: MPlantin
size: { 6.5 * face_coordinates_map(3).height/(if face_is_rotated(3) then 375 else 523) }
color: { styling.copyright_text_color or else set.copyright_text_color }
weight: bold
z index: 900
the list icon 3:
angle: { if face_is_rotated(3) then -90 else 0 }
left:
script:
if face_is_rotated(3) then
(
face_coordinates_map(3).left - information_offset_top_3()
) else (
face_coordinates_map(3).left + information_codes_offset_left_3()
)
bottom:
script:
if face_is_rotated(3) then
(
face_coordinates_map(3).top + information_codes_offset_left_3()
) else (
face_coordinates_map(3).height + face_coordinates_map(3).top + information_offset_top_3()
)
width:
script:
if face_is_rotated(3) then
(
22 * face_coordinates_map(3).width/523
) else (
22 * face_coordinates_map(3).width/375
)
height:
script:
if face_is_rotated(3) then
(
33 * face_coordinates_map(3).height/375
) else (
33 * face_coordinates_map(3).height/523
)
visible: { not information_disabled_3() }
popup style: in place
include file: /magic.mse-game/information/menu_choice_images_the_list
render style: image
image: { the_list_icon_image(face: 3, field: 3) }
z index: 900