WTS/game/scripts/characters/cho/common.rpy
LoafyLemon bf5710bf10 Bug fixes
* Default renderer to Auto for compatibility reasons
* Fixed animation assignments for dolls
* Fixed missing side images for non-doll speakers
2022-06-24 18:32:41 +01:00

121 lines
3.7 KiB
Plaintext

define cho_face = {
"mouth": {
"neutral": ["base","normal","annoyed"],
"happy": ["base", "smile"],
"naughty": ["base","quiver","horny","soft"],
"horny": ["horny","soft"],
"annoyed": ["annoyed"],
"disgusted": ["disgust","upset"],
"angry": ["angry","clench","mad","upset"]
},
"eyes": {
"neutral": ["base","base","closed"],
"happy": ["base","base","happyCl"],
"naughty": ["narrow"],
"horny": ["narrow"],
"annoyed": ["narrow","narrow","closed"],
"disgusted": ["base","narrow"],
"angry": ["narrow"]
},
"eyebrows": {
"neutral": ["base"],
"happy": ["base"],
"naughty": ["base","raised","worried"],
"horny": ["base","raised"],
"annoyed": ["angry"],
"disgusted": ["base","raised","worried"],
"angry": ["angry"]
},
"pupils": {
"neutral": ["mid","L","R"],
"happy": ["mid","L","R"],
"naughty": ["mid","L","R","down","up"],
"horny": ["mid","L","R","down","up"],
"annoyed": ["mid","L","R","downR"],
"disgusted": ["mid","down"],
"angry": ["mid"]
}
}
label update_cho:
# Chibi Update
$ cho_chibi.update()
$ cho_chibi.position(flip=False)
$ cho.xzoom = 1
hide screen cho_cloth_pile
return
label end_cho_event:
call cho_chibi("hide")
hide cho_main
with d3
pause.5
call update_cho
$ active_girl = None
$ cho_busy = True
$ cho.wear("all")
$ cho.set_cum(None)
$ renpy.stop_predict(cho.get_image())
$ renpy.stop_predict("characters/cho/face/*.webp")
call music_block
jump main_room_menu
define character.cho_say = Character("cho_name", show_icon="cho", dynamic=True)
init python in character:
# Cho's name is short, therefore it needs to be initialised in character scope,
# otherwise we won't be able to use the same name for both Doll and Character calls.
def cho(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None,
emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs):
redraw = False
tag = renpy.store.cho.tag
layer = renpy.store.cho.layer
#showing = renpy.showing(name=tag, layer=layer)
if xpos != None or ypos != None:
xpos = renpy.store.cho.pos[0] if xpos == None else renpy.store.sprite_pos.get("x").get(xpos, xpos)
ypos = renpy.store.cho.pos[1] if ypos == None else renpy.store.sprite_pos.get("y").get(ypos, ypos)
renpy.store.cho.pos = (xpos, ypos)
redraw = True
head_only = renpy.store.cho.pos[1] == renpy.store.sprite_pos.get("y").get("head")
if any((mouth, eyes, eyebrows, pupils, cheeks, tears)):
renpy.store.cho.set_face(mouth=mouth, eyes=eyes, eyebrows=eyebrows, pupils=pupils, cheeks=cheeks, tears=tears)
redraw = True
renpy.store.cho.set_emote(emote)
if animation != False:
renpy.store.cho.animation = animation
redraw = True
if flip != None:
renpy.store.cho.xzoom = -1 if flip else 1
redraw = True
if redraw:
renpy.store.cho.show()
if not renpy.in_rollback():
if trans:
renpy.with_statement(trans)
else:
renpy.with_statement(renpy.store.d2)
if what:
cho_say(what, **kwargs)
if head_only:
renpy.store.cho.hide()