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: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -0,0 +1,5 @@
choice: Standard, rares holostamped
choice: UB, rares holostamped, others flatstamped
choice: All holostamped
choice: All flatstamped
choice: All unstamped

View File

@@ -0,0 +1,17 @@
choice: standard
choice: none
choice: acorn
choice: heart
choice: universes beyond
choice: alchemy
choice: alchemy old
choice: custom
choice:
name: flatstamped
choice: standard
choice: acorn
choice: heart
choice: universes beyond
choice: alchemy
choice: alchemy old
choice: custom

View File

@@ -0,0 +1,36 @@
card style:
card stamp:
left:
script:
width := face_coordinates_map(1).width
height := face_coordinates_map(1).height
if width > height then face_coordinates_map(1).left + 7 * width/523 + card_stamp_offset_left_1()
else face_coordinates_map(1).left + 166 * width/375 + card_stamp_offset_left_1()
top:
script:
width := face_coordinates_map(1).width
height := face_coordinates_map(1).height
if width > height then face_coordinates_map(1).top + 166 * height/375 + card_stamp_offset_top_1()
else face_coordinates_map(1).top + 473 * height/523 + card_stamp_offset_top_1()
width:
script:
width := face_coordinates_map(1).width
height := face_coordinates_map(1).height
if width > height then 43 * width/523 + card_stamp_offset_width_1()
else 43 * width/375 + card_stamp_offset_width_1()
height:
script:
width := face_coordinates_map(1).width
height := face_coordinates_map(1).height
if width > height then 43 * height/375 + card_stamp_offset_height_1()
else 43 * height/523 + card_stamp_offset_height_1()
visible: { not card_stamp_disabled_1() }
popup style: in place
include file: /magic.mse-game/stamps/menu_choice_images
render style: image
image:
script:
set.stamp_behavior
card.rarity
card_stamp_image(field: 1, face: 1)
z index: 860

View File

@@ -0,0 +1,37 @@
include file: /magic-modules.mse-include/stamps/card_fields
card style:
card stamp 2:
left:
script:
width := face_coordinates_map(2).width
height := face_coordinates_map(2).height
if width > height then face_coordinates_map(2).left + 7 * width/523 + card_stamp_offset_left_2()
else face_coordinates_map(2).left + 166 * width/375 + card_stamp_offset_left_2()
top:
script:
width := face_coordinates_map(2).width
height := face_coordinates_map(2).height
if width > height then face_coordinates_map(2).top + 166 * height/375 + card_stamp_offset_top_2()
else face_coordinates_map(2).top + 473 * height/523 + card_stamp_offset_top_2()
width:
script:
width := face_coordinates_map(2).width
height := face_coordinates_map(2).height
if width > height then 43 * width/523 + card_stamp_offset_width_2()
else 43 * width/375 + card_stamp_offset_width_2()
height:
script:
width := face_coordinates_map(2).width
height := face_coordinates_map(2).height
if width > height then 43 * height/375 + card_stamp_offset_height_2()
else 43 * height/523 + card_stamp_offset_height_2()
visible: { not card_stamp_disabled_2() }
popup style: in place
include file: /magic.mse-game/stamps/menu_choice_images
render style: image
image:
script:
set.stamp_behavior
card.rarity_2
card_stamp_image(field: 2, face: 2)
z index: 860

View File

@@ -0,0 +1,37 @@
include file: /magic-modules.mse-include/stamps/card_fields_dfc
card style:
card stamp 3:
left:
script:
width := face_coordinates_map(3).width
height := face_coordinates_map(3).height
if width > height then face_coordinates_map(3).left + 7 * width/523 + card_stamp_offset_left_3()
else face_coordinates_map(3).left + 166 * width/375 + card_stamp_offset_left_3()
top:
script:
width := face_coordinates_map(3).width
height := face_coordinates_map(3).height
if width > height then face_coordinates_map(3).top + 166 * height/375 + card_stamp_offset_top_3()
else face_coordinates_map(3).top + 473 * height/523 + card_stamp_offset_top_3()
width:
script:
width := face_coordinates_map(3).width
height := face_coordinates_map(3).height
if width > height then 43 * width/523 + card_stamp_offset_width_3()
else 43 * width/375 + card_stamp_offset_width_3()
height:
script:
width := face_coordinates_map(3).width
height := face_coordinates_map(3).height
if width > height then 43 * height/375 + card_stamp_offset_height_3()
else 43 * height/523 + card_stamp_offset_height_3()
visible: { not card_stamp_disabled_3() }
popup style: in place
include file: /magic.mse-game/stamps/menu_choice_images
render style: image
image:
script:
set.stamp_behavior
card.rarity_3
card_stamp_image(field: 3, face: 3)
z index: 860

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -0,0 +1,46 @@
#### 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/stamps/card_fields
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
include file: /magic-modules.mse-include/stamps/card_fields_dfc
include file: /magic-modules.mse-include/stamps/card_fields_tfc
#### Default Field Placement (@375x523, w=1 h=1)
card stamp:
left: 166w
top: 473h
width: 43w
height: 43h
#### 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 the stamp by:
#### To shift the stamp up/down:
card_stamp_offset_top_1 := { 0 }
#### To shift the stamp left/right:
card_stamp_offset_left_1 := { 0 }
#### To increase/decrease the size:
card_stamp_offset_width_1 := { 0 }
card_stamp_offset_height_1 := { 0 }
#### For the other faces on DFCs use:
card_stamp_offset_top_2 := { 0 }
card_stamp_offset_left_2 := { 0 }
card_stamp_offset_width_2 := { 0 }
card_stamp_offset_height_2 := { 0 }
card_stamp_offset_top_3 := { 0 }
card_stamp_offset_left_3 := { 0 }
card_stamp_offset_width_3 := { 0 }
card_stamp_offset_height_3 := { 0 }
#### You can disable the stamp on some of the faces,
#### by adding the following functions in the init script:
card_stamp_disabled_1 := { true }
card_stamp_disabled_2 := { true }
card_stamp_disabled_3 := { true }

View File

@@ -0,0 +1,8 @@
choice: standard
choice: none
choice: acorn
choice: heart
choice: universes beyond
choice: alchemy
choice: alchemy old
choice: custom

View File

@@ -0,0 +1,9 @@
choice: default
choice: standard
choice: none
choice: acorn
choice: heart
choice: universes beyond
choice: alchemy
choice: alchemy old
choice: custom