Double Faced Cards

Login or register to post comments
Tue, 2017-04-18 02:44
Elite Arcanist

I recently installed Modern templates from the Additional Downloads page. I was interested in using double faced cards. They seem to have installed correctly, except that I can't give them any types or subtypes. Has anyone else had this issue? Any suggestions for fixes? Thanks!

Edit: Just noticed that whenever I try to use a double faced card it gives me an error message in the console tab. The message is: "variable not set: has_identity while updating styles for 'type'"

Tue, 2017-04-18 02:59
Cajun
Cajun's picture

has_identity is declared in the script file, so yours is out of date. Downloading M15 styles should fix that without having to edit files directly.

Cajun's Explorations
Planeswalker Template Overhaul
fluffyDeathbringer wrote:
I dunno, Cajun has a habit of doing Dubiously Working new rules stuff

Mon, 2018-01-08 22:33
Mahx Michael
Mahx Michael's picture

I guess this is the correct thread to post this topic (are the rules for posting bug reports still active? Because I'm not sure all have read them...):

I have found a bug in EVERY doublefaced template made to this date. It is located in the alignment script for "text 2" and is only affected when styling.center_text == "short text only":

Description:
When "short text only" is selected, the alignment script is supposed to look for the lenght of the content of the text field, by comparing text.content_lines with 2. For the first text field this works as it should, because it refers to card.text, but a bug appears in "text 2", where the alignment script is an exact copy of the one used in the first text field, so that the script compares card.text instead of card.text_2. The result of this is that wheter the text of textbox 2 is centered or not depends on the content lenght of textbox 1, instead of textbox 2 as was originally intended.

Solution:
I am not sayng that everyone should go back and change every DFC template they have ever made, but for those who are planning to make a template in the future, you should add this little change:
Simply replace "text 2"'s alignment script with the following, and everything is taken care of!

alignment:
	script:
		if (styling.center_text == "short text only" and
		   not contains(match:"\n", card.rule_text_2) and
		   card.flavor_text_2 == "<i-flavor></i-flavor>" and
		   card_style.text_2.content_lines <= 2) or
		   styling.center_text == "always"
		then "middle center"
		else "middle left"

Also, a thing that could help is if the creators of the "main" doublefaced templates, such as Modern Doublefaced, M15 Doublefaced, and the Doublefaced Planeswalker templates could fix those, because I realize that most people that make new templates does so by using a copy of the style file that is closest to what they are going to make, and only changes the parts that are different from the style they are using the style file from. Therefore, noone ever noticed that they vere transfering a bug over to their own template.

I hope you understood anything of what I was trying to share, and I wish you all the best of luck A happy smile