I'm helping redeyesblackpanda with coding Witch Apprentice, and the first day I got my hand on the code there were lines of unnecessary defining images everywhere. I managed to cut down the code by loads, but the thing with WA is that there's a side image of Adriana no matter who the speaker is, even during narration. Here's an example of the code they're running:
Code: Select all
init:
$ narrator = Character(None,
color="#c8ffc8",
show_side_image=ConditionSwitch(
"aemo == 'neutral'", "a/a neutral.png",
"aemo == 'awkward'", "a/a awkward-smile.png",
"aemo == 'grin'", "a/a big_grin.png",
"aemo == 'eh'", "a/a cocked-brow.png",
"aemo == 'ugh'", "a/a grimace.png",
"aemo == 'surprise'", "a/a surprised.png",
"aemo == 'sigh'", "a/a sigh.png",
"aemo == 'blush'", "a/a sweet_blush.png",
"aemo == 'serious'", "a/a very-serious.png",
"aemo == 'happy'", "a/a happy.png",
"aemo == 'plain'", "a/a melancholy.png", xalign=0.0, yalign=1.0,
)
)
define npc = DynamicCharacter('npcname',
color="#c8ffc8",
show_side_image=ConditionSwitch(
"aemo == 'neutral'", "a/a neutral.png",
"aemo == 'awkward'", "a/a awkward-smile.png",
"aemo == 'grin'", "a/a big_grin.png",
"aemo == 'eh'", "a/a cocked-brow.png",
"aemo == 'ugh'", "a/a grimace.png",
"aemo == 'surprise'", "a/a surprised.png",
"aemo == 'sigh'", "a/a sigh.png",
"aemo == 'blush'", "a/a sweet_blush.png",
"aemo == 'serious'", "a/a very-serious.png",
"aemo == 'happy'", "a/a happy.png",
"aemo == 'plain'", "a/a melancholy.png", xalign=0.0, yalign=1.0,
)
)
#etc.
label day_1:
$ aemo = "plain"
"Text and stuff, I'm at the left."
Code: Select all
init python:
config.side_image_tag = "a"
config.side_image_only_not_showing = False
init:
$ narrator = Character(None,
color="#c8ffc8")
label day_1:
$ aemo = "plain"
"Text and stuff, I'm at the left."
Rather than spend my time trying to figure out how to trim down the code, I'd rather get to renaming all the files. Can someone help me out with this?