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

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -0,0 +1,12 @@
card style:
card symbol:
left: { card_symbol_left_1() + nameline_offset_left_1() }
top: { card_symbol_top_1() + nameline_offset_top_1() }
width: { card_symbol_width_1() + nameline_offset_height_1() }
height: { if card_symbol_disabled_1() then 0 else card_symbol_height_1() + nameline_offset_height_1() }
visible: { not card_symbol_disabled_1() }
popup style: in place
include file: /magic.mse-game/card-symbols/menu_choice_images
render style: image
image: { card_symbol_image(face: 1) }
z index: 810

View File

@@ -0,0 +1,13 @@
include file: /magic-modules.mse-include/card-symbols/card_fields
card style:
card symbol 2:
left: { card_symbol_left_2() + nameline_offset_left_2() }
top: { card_symbol_top_2() + nameline_offset_top_2() }
width: { card_symbol_width_2() + nameline_offset_height_2() }
height: { if card_symbol_disabled_2() then 0 else card_symbol_height_2() + nameline_offset_height_2() }
visible: { not card_symbol_disabled_2() }
popup style: in place
include file: /magic.mse-game/card-symbols/menu_choice_images
render style: image
image: { card_symbol_image(face: 2) }
z index: 810

View File

@@ -0,0 +1,13 @@
include file: /magic-modules.mse-include/card-symbols/card_fields_dfc
card style:
card symbol 3:
left: { card_symbol_left_3() + nameline_offset_left_3() }
top: { card_symbol_top_3() + nameline_offset_top_3() }
width: { card_symbol_width_3() + nameline_offset_height_3() }
height: { if card_symbol_disabled_3() then 0 else card_symbol_height_3() + nameline_offset_height_3() }
visible: { not card_symbol_disabled_3() }
popup style: in place
include file: /magic.mse-game/card-symbols/menu_choice_images
render style: image
image: { card_symbol_image(face: 3) }
z index: 810

View File

@@ -0,0 +1,4 @@
choice: none
choice: tombstone
choice: alchemy
choice: alchemy old

View File

@@ -0,0 +1,48 @@
#### Consider using the Namelines module instead of this one
#### To use this include in a template, add the following in the template headers:
depends on:
package: magic-modules.mse-include
version: 2024-05-20
#### Also add this, unindented, before the card style section:
include file: /magic-modules.mse-include/card-symbols/card_fields
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
include file: /magic-modules.mse-include/card-symbols/card_fields_dfc
include file: /magic-modules.mse-include/card-symbols/card_fields_tfc
#### Default Field Placement (@375x523, w=1 h=1)
card symbol:
left: (8, +18 if used, +28 with transform symbol)w
top: 21h
width: 23w
height: 21h
#### Customization
#### Optionally, you can adjust global alignment by defining the following functions in the init script,
#### which must return an int corresponding to the number of pixels you want to shift things by:
#### To shift everything up/down:
card_symbol_offset_top_1 := { 0 }
#### To shift everything left/right:
card_symbol_offset_left_1 := { 0 }
#### To increase/decrease the size:
card_symbol_offset_width_1 := { 0 }
card_symbol_offset_height_1 := { 0 }
#### For the other faces on DFCs use:
card_symbol_offset_top_2 := { 0 }
card_symbol_offset_left_2 := { 0 }
card_symbol_offset_width_2 := { 0 }
card_symbol_offset_height_2 := { 0 }
card_symbol_offset_top_3 := { 0 }
card_symbol_offset_left_3 := { 0 }
card_symbol_offset_width_3 := { 0 }
card_symbol_offset_height_3 := { 0 }
#### You can disable the symbols on some of the faces,
#### by adding the following functions in the init script:
card_symbol_disabled_1 := { true }
card_symbol_disabled_2 := { true }
card_symbol_disabled_3 := { true }

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@@ -0,0 +1,18 @@
card style:
casting cost:
right: { casting_cost_right_1() + nameline_offset_left_1() + nameline_offset_width_1() }
top: { casting_cost_top_1() + nameline_offset_top_1() }
width: { casting_cost_width_1() }
height: { casting_cost_height_1() + nameline_offset_height_1() }
alignment: middle right shrink-overflow
visible: { (not nameline_disabled_1()) and not casting_cost_disabled_1() }
always symbol: true
font:
name: MPlantin
italic name: MPlantin-Italic
size: { name_font_size() }
color: black
symbol font:
name: { styling.casting_cost_mana_symbols or else "magic-mana-large" }
size: { name_font_size() }
z index: 920

View File

@@ -0,0 +1,19 @@
include file: /magic-modules.mse-include/casting-costs/card_fields
card style:
casting cost 2:
right: { casting_cost_right_2() + nameline_offset_left_2() + nameline_offset_width_2() }
top: { casting_cost_top_2() + nameline_offset_top_2() }
width: { casting_cost_width_2() }
height: { casting_cost_height_2() + nameline_offset_height_2() }
alignment: middle right shrink-overflow
visible: { (not nameline_disabled_2()) and not casting_cost_disabled_2() }
always symbol: true
font:
name: MPlantin
italic name: MPlantin-Italic
size: { name2_font_size() }
color: black
symbol font:
name: { styling.casting_cost_mana_symbols or else "magic-mana-large" }
size: { name2_font_size() }
z index: 920

View File

@@ -0,0 +1,19 @@
include file: /magic-modules.mse-include/casting-costs/card_fields_dfc
card style:
casting cost 3:
right: { casting_cost_right_3() + nameline_offset_left_3() + nameline_offset_width_3() }
top: { casting_cost_top_3() + nameline_offset_top_3() }
width: { casting_cost_width_3() }
height: { casting_cost_height_3() + nameline_offset_height_3() }
alignment: middle right shrink-overflow
visible: { (not nameline_disabled_3()) and not casting_cost_disabled_3() }
always symbol: true
font:
name: MPlantin
italic name: MPlantin-Italic
size: { name3_font_size() }
color: black
symbol font:
name: { styling.casting_cost_mana_symbols or else "magic-mana-large" }
size: { name3_font_size() }
z index: 920

View File

@@ -0,0 +1,51 @@
#### Consider using the Namelines module instead of this one.
#### To use this include in a template, add the following in the template headers:
depends on:
package: magic-modules.mse-include
version: 2024-05-20
#### Also add this, unindented, before the card style section:
include file: /magic-modules.mse-include/casting-costs/card_fields
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
include file: /magic-modules.mse-include/casting-costs/card_fields_dfc
include file: /magic-modules.mse-include/casting-costs/card_fields_tfc
#### Also add this among the styling field section,
#### (styling fields will appear in the order you place them).
#### This adds a package option to select an alternate mana font for the casting cost.
include file: /magic-modules.mse-include/casting-costs/styling_fields
#### Default Field Placement (@375x523, w=1 h=1)
casting cost:
right: 346w
top: 27h
width: min(30w, content) + 5w
height: 21h
#### Customization
#### Optionally, you can define which face of the card the casting cost should snap to,
#### by defining the following function in the init script:
nameline_face_1 := { 1 }
#### You can also adjust global alignment by defining the following functions, again in the init script,
#### which must return an int corresponding to the number of pixels you want to shift the casting cost by:
#### To shift the casting cost up/down:
casting_cost_offset_top_1 := { 0 }
#### To shift the casting cost left/right:
casting_cost_offset_left_1 := { 0 }
#### To increase/decrease the width and height of the casting cost:
casting_cost_offset_width_1 := { 0 }
casting_cost_offset_height_1 := { 0 }
#### For DFC or TFC templates, use:
casting_cost_offset_top_2 := { 0 }
casting_cost_offset_left_2 := { 0 }
casting_cost_offset_width_2 := { 0 }
casting_cost_offset_height_2 := { 0 }
casting_cost_offset_top_3 := { 0 }
casting_cost_offset_left_3 := { 0 }
casting_cost_offset_width_3 := { 0 }
casting_cost_offset_height_3 := { 0 }

View File

@@ -0,0 +1,4 @@
styling field:
type: package choice
name: casting cost mana symbols
description: Mana symbols used for casting cost, name, banner, fuse and transformation reminder.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@@ -0,0 +1,13 @@
card style:
corners:
left: { face_coordinates_map(1).left }
top: { face_coordinates_map(1).top }
width: { face_coordinates_map(1).width }
height: { face_coordinates_map(1).height }
visible: { not corners_disabled_1() }
popup style: in place
include file: /magic.mse-game/corners/menu_choice_images
render style: image
image: { corners_image(field: 1) }
mask: { corners_mask(field: 1, face: 1) }
z index: 1100

View File

@@ -0,0 +1,14 @@
include file: /magic-modules.mse-include/corners/card_fields
card style:
corners 2:
left: { face_coordinates_map(2).left }
top: { face_coordinates_map(2).top }
width: { face_coordinates_map(2).width }
height: { face_coordinates_map(2).height }
visible: { not corners_disabled_2() }
popup style: in place
include file: /magic.mse-game/corners/menu_choice_images
render style: image
image: { corners_image(field: 2) }
mask: { corners_mask(field: 2, face: 2) }
z index: 1100

View File

@@ -0,0 +1,14 @@
include file: /magic-modules.mse-include/corners/card_fields_dfc
card style:
corners 3:
left: { face_coordinates_map(3).left }
top: { face_coordinates_map(3).top }
width: { face_coordinates_map(3).width }
height: { face_coordinates_map(3).height }
visible: { not corners_disabled_3() }
popup style: in place
include file: /magic.mse-game/corners/menu_choice_images
render style: image
image: { corners_image(field: 3) }
mask: { corners_mask(field: 3, face: 3) }
z index: 1100

View File

@@ -0,0 +1,5 @@
choice: rounded and antialiased
choice: rounded
choice: diagonal
choice: none
choice: invisible

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,10 @@
#### To use this include in a template, add the following in the template headers:
depends on:
package: magic-modules.mse-include
version: 2024-05-20
#### Also add this, unindented, before the card style section:
include file: /magic-modules.mse-include/corners/card_fields
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
include file: /magic-modules.mse-include/corners/card_fields_dfc
include file: /magic-modules.mse-include/corners/card_fields_tfc

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,53 @@
choice:
name: none
line below: true
choice:
name: custom
line below: true
choice: +1/+1
choice: -1/-1
choice: acorn
choice: aether
choice: arrow
choice: awakening
choice: bounty
choice: charge
choice: corpse
choice: deathtouch alt
choice: deathtouch
choice: defender
choice: doom
choice: double strike
choice: egg
choice: energy
choice: experience
choice: finality
choice: first strike
choice: flame
choice: flood
choice: flying
choice: goaded
choice: haste
choice: hexproof alt
choice: hexproof
choice: indestructible
choice: lifelink alt
choice: lifelink
choice: lore
choice: menace
choice: oil
choice: omen
choice: poison
choice: rad
choice: reach
choice: shield
choice: solved
choice: spore
choice: stun
choice: suspected
choice: ticket
choice: time
choice: trample
choice: unlock
choice: vigilance
choice: void

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Some files were not shown because too many files have changed in this diff Show More