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