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

@@ -86,20 +86,20 @@ init script:
}
2: textbox_hybrid_2
3: { linear_blend(
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 3] + colors[(to_int(offset) + 1 ) mod 3] ),
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 3] + colors[(to_int(offset) + 1 ) mod 3] ),
x1: 0, y1: 0.55
x2: 0, y2: 0.77
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] ))
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] ))
)}
4: { linear_blend(
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 4] + colors[(to_int(offset) + 1 ) mod 4] ),
image2: textbox_hybrid_2( colors: colors[(to_int(offset) + 3 ) mod 4] + colors[(to_int(offset) + 2 ) mod 4] ),
image2: textbox_hybrid_2( colors: colors[(to_int(offset) + 3 ) mod 4] + colors[(to_int(offset) + 2 ) mod 4] ),
x1: 0, y1: 0.4
x2: 0, y2: 0.62
)}
5: { linear_blend(
image1: linear_blend(
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 5] + colors[(to_int(offset) + 1 ) mod 5] ),
image1: textbox_hybrid_2( colors: colors[(to_int(offset) + 0 ) mod 5] + colors[(to_int(offset) + 1 ) mod 5] ),
image2: textbox_hybrid_2( colors: colors[(to_int(offset) + 4 ) mod 5] + colors[(to_int(offset) + 2 ) mod 5] ),
x1: 0, y1: 0.19
x2: 0, y2: 0.35),
@@ -118,7 +118,7 @@ init script:
x2: 0.4, y2: 0
image2: linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 1 ) mod 3] )),
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] )),
image2: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 3] )),
x1: 0.6, y1: 0
x2: 0.78, y2: 0
))}
@@ -137,15 +137,15 @@ init script:
x2: 0.85, y2: 0
)))}
5: { linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 0 ) mod 5] )),
image1: shorten_textbox_image(template( colors[(to_int(offset) + 0 ) mod 5] )),
x1: 2.0 / 15, y1: 0
x2: 4.0 / 15, y2: 0
image2: linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 1 ) mod 5] )),
image1: shorten_textbox_image(template( colors[(to_int(offset) + 1 ) mod 5] )),
x1: 5.0 / 15, y1: 0
x2: 7.0 / 15, y2: 0
image2: linear_blend(
image1: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 5] )),
image1: shorten_textbox_image(template( colors[(to_int(offset) + 2 ) mod 5] )),
x1: 8.0 / 15, y1: 0
x2: 10.0 / 15, y2: 0
image2: linear_blend(
@@ -609,11 +609,11 @@ card style:
scale down to: 6
alignment:
script:
if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
then "middle center"
else "middle left"
z index: 2