Allow dolls on interface layer while in head position, tweak character transforms, fix male character transforms

This commit is contained in:
LoafyLemon 2024-06-26 16:10:44 +01:00
parent 4cd4648370
commit 0709368ea4
11 changed files with 60 additions and 43 deletions

View File

@ -40,7 +40,7 @@ init python:
def show(): def show():
astoria.show(force=True) astoria.show(force=True)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes temp_face = renpy.game.context().temporary_attributes
@ -79,8 +79,10 @@ init python:
astoria.xzoom = -1 if flip else 1 astoria.xzoom = -1 if flip else 1
redraw = True redraw = True
if redraw: if redraw and not head_only:
show() show()
elif head_only:
astoria.hide()
# Figure out nickname # Figure out nickname
if name_astoria_genie != "Astoria": if name_astoria_genie != "Astoria":
@ -91,10 +93,9 @@ init python:
name_suffix = "" name_suffix = ""
if what: if what:
character.astoria_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) side_doll = At(astoria.image, doll_transform(astoria.pos, astoria.zoom, astoria.xzoom)) if head_only else None
character.astoria_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face: if temp_face:
astoria.set_face(**last_face) astoria.set_face(**last_face)
if head_only:
astoria.hide()

View File

@ -38,7 +38,7 @@ init python in character:
def show(): def show():
renpy.store.cho.show(force=True) renpy.store.cho.show(force=True)
renpy.with_statement({"dolls": trans or renpy.store.d2}) renpy.with_statement({"dolls": trans or renpy.store.d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes temp_face = renpy.game.context().temporary_attributes
@ -77,8 +77,10 @@ init python in character:
renpy.store.cho.xzoom = -1 if flip else 1 renpy.store.cho.xzoom = -1 if flip else 1
redraw = True redraw = True
if redraw: if redraw and not head_only:
show() show()
elif head_only:
renpy.store.cho.hide()
# Figure out nickname # Figure out nickname
if renpy.store.name_cho_genie != "Cho": if renpy.store.name_cho_genie != "Cho":
@ -89,10 +91,8 @@ init python in character:
name_suffix = "" name_suffix = ""
if what: if what:
cho_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) side_doll = At(renpy.store.cho.image, doll_transform(renpy.store.cho.pos, renpy.store.cho.zoom, renpy.store.cho.xzoom)) if head_only else None
cho_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face: if temp_face:
renpy.store.cho.set_face(**last_face) renpy.store.cho.set_face(**last_face)
if head_only:
renpy.store.cho.hide()

View File

@ -36,7 +36,7 @@ init python:
if renpy.showing("genie", layer=layer): if renpy.showing("genie", layer=layer):
renpy.show(variant, layer=layer, tag="genie", at_list=at_list) renpy.show(variant, layer=layer, tag="genie", at_list=at_list)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
if flip is not None: if flip is not None:
states.gen.image.xzoom = -1 if flip else 1 states.gen.image.xzoom = -1 if flip else 1

View File

@ -33,7 +33,7 @@ init python:
def show(): def show():
hermione.show(force=True) hermione.show(force=True)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes temp_face = renpy.game.context().temporary_attributes
@ -72,8 +72,10 @@ init python:
hermione.xzoom = -1 if flip else 1 hermione.xzoom = -1 if flip else 1
redraw = True redraw = True
if redraw: if redraw and not head_only:
show() show()
elif head_only:
hermione.hide()
# Figure out nickname # Figure out nickname
if name_hermione_genie != "Hermione": if name_hermione_genie != "Hermione":
@ -84,13 +86,12 @@ init python:
name_suffix = "" name_suffix = ""
if what: if what:
side_doll = At(hermione.image, doll_transform(hermione.pos, hermione.zoom, hermione.xzoom)) if head_only else None
character.hermione_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) character.hermione_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs)
if temp_face: if temp_face:
hermione.set_face(**last_face) hermione.set_face(**last_face)
if head_only:
hermione.hide()
label too_much: label too_much:
stop music fadeout 2.0 stop music fadeout 2.0

View File

@ -24,7 +24,7 @@ init python:
def show(): def show():
hooch.show(force=True) hooch.show(force=True)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes temp_face = renpy.game.context().temporary_attributes
@ -63,14 +63,15 @@ init python:
hooch.xzoom = -1 if flip else 1 hooch.xzoom = -1 if flip else 1
redraw = True redraw = True
if redraw: if redraw and not head_only:
show() show()
elif head_only:
hooch.hide()
if what: if what:
character.hooch_say(what, **kwargs) side_doll = At(hooch.image, doll_transform(hooch.pos, hooch.zoom, hooch.xzoom)) if head_only else None
character.hooch_say(what, show_side_doll=side_doll, **kwargs)
if temp_face: if temp_face:
hooch.set_face(**last_face) hooch.set_face(**last_face)
if head_only:
hooch.hide()

View File

@ -36,7 +36,7 @@ init python:
def show(): def show():
luna.show(force=True) luna.show(force=True)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes temp_face = renpy.game.context().temporary_attributes
@ -75,8 +75,10 @@ init python:
luna.xzoom = -1 if flip else 1 luna.xzoom = -1 if flip else 1
redraw = True redraw = True
if redraw: if redraw and not head_only:
show() show()
elif head_only:
luna.hide()
# Figure out nickname # Figure out nickname
if name_luna_genie != "Luna": if name_luna_genie != "Luna":
@ -87,10 +89,8 @@ init python:
name_suffix = "" name_suffix = ""
if what: if what:
character.luna_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) side_doll = At(luna.image, doll_transform(luna.pos, luna.zoom, luna.xzoom)) if head_only else None
character.luna_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face: if temp_face:
luna.set_face(**last_face) luna.set_face(**last_face)
if head_only:
luna.hide()

View File

@ -56,7 +56,7 @@ init python:
renpy.show(name=tag, at_list=at_list, layer=layer, what=sprite, zorder=states.sna.image.zorder) renpy.show(name=tag, at_list=at_list, layer=layer, what=sprite, zorder=states.sna.image.zorder)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
if what: if what:
character.snape_say(what, **kwargs) character.snape_say(what, **kwargs)

View File

@ -35,7 +35,7 @@ init python:
def show(): def show():
susan.show(force=True) susan.show(force=True)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes temp_face = renpy.game.context().temporary_attributes
@ -74,8 +74,10 @@ init python:
susan.xzoom = -1 if flip else 1 susan.xzoom = -1 if flip else 1
redraw = True redraw = True
if redraw: if redraw and not head_only:
show() show()
elif head_only:
tonks.hide()
# Figure out nickname # Figure out nickname
if name_susan_genie != "Susan": if name_susan_genie != "Susan":
@ -86,10 +88,9 @@ init python:
name_suffix = "" name_suffix = ""
if what: if what:
character.susan_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) side_doll = At(tonks.image, doll_transform(tonks.pos, tonks.zoom, tonks.xzoom)) if head_only else None
character.susan_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs)
if temp_face: if temp_face:
susan.set_face(**last_face) susan.set_face(**last_face)
if head_only:
susan.hide()

View File

@ -46,7 +46,7 @@ init python:
def show(): def show():
tonks.show(force=True) tonks.show(force=True)
renpy.with_statement({"dolls": trans or d2}) renpy.with_statement({"dolls": trans or d1})
face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears} face = {"mouth": mouth, "eyes": eyes, "eyebrows": eyebrows, "pupils": pupils, "cheeks": cheeks, "tears": tears}
temp_face = renpy.game.context().temporary_attributes temp_face = renpy.game.context().temporary_attributes
@ -94,8 +94,10 @@ init python:
tonks.xzoom = -1 if flip else 1 tonks.xzoom = -1 if flip else 1
redraw = True redraw = True
if redraw: if redraw and not head_only:
show() show()
elif head_only:
tonks.hide()
# Figure out nickname # Figure out nickname
if name_tonks_genie != "Tonks": if name_tonks_genie != "Tonks":
@ -106,7 +108,8 @@ init python:
name_suffix = "" name_suffix = ""
if what: if what:
character.tonks_say(what, who_prefix=name_prefix, who_suffix=name_suffix, **kwargs) side_doll = At(tonks.image, doll_transform(tonks.pos, tonks.zoom, tonks.xzoom)) if head_only else None
character.tonks_say(what, who_prefix=name_prefix, who_suffix=name_suffix, show_side_doll=side_doll, **kwargs) # Weird Engine quirk; `show_` prefix required to pass arguments to screen.
if temp_face: if temp_face:
tonks.set_face(**last_face) tonks.set_face(**last_face)
@ -114,5 +117,3 @@ init python:
if temp_hair: if temp_hair:
tonks.get_equipped("hair").set_color(last_hair) tonks.get_equipped("hair").set_color(last_hair)
if head_only:
tonks.hide()

View File

@ -23,7 +23,7 @@ screen nvl(dialogue, items=None):
# config.all_character_callbacks.append(next_who) # config.all_character_callbacks.append(next_who)
screen say(who, what, side_image=None, icon=None): screen say(who, what, side_doll=None, icon=None):
style_prefix "say" style_prefix "say"
layer "interface" layer "interface"
zorder 0 zorder 0
@ -55,6 +55,17 @@ screen say(who, what, side_image=None, icon=None):
use quickbox use quickbox
# Note: Weird quirk. As per documentation;
# Keyword arguments passed to the say character
# beginning with ``show_`` have the prefix
# stripped off, and are passed to the screen as arguments. For
# example, the value of ``show_myflag`` will become the value of
# the ``myflag`` variable in the screen. (The ``myflag`` variable isn't
# used by default, but can be used by a custom say screen.)
if side_doll:
add side_doll
else:
add SideImage() add SideImage()
screen hider(): screen hider():

View File

@ -127,7 +127,7 @@ define config.fadeout_audio = 1.0
define config.default_music_volume = 0.8 define config.default_music_volume = 0.8
define config.default_sfx_volume = 1.0 define config.default_sfx_volume = 1.0
# Transitions # Transitions & Transforms
define config.enter_transition = None define config.enter_transition = None
define config.exit_transition = None define config.exit_transition = None
define config.intra_transition = d1 define config.intra_transition = d1
@ -145,6 +145,7 @@ define config.exit_yesno_transition = None
define config.enter_replay_transition = None define config.enter_replay_transition = None
define config.exit_replay_transition = None define config.exit_replay_transition = None
define config.say_attribute_transition = None define config.say_attribute_transition = None
define config.side_image_same_transform = d1
# Engine Compatibility # Engine Compatibility
define config.check_conflicting_properties = True define config.check_conflicting_properties = True