Customizable Sprite with Blinking? [SOLVED]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
User avatar
ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: Customizable Sprite with Blinking?

#31 Post by ArizaLuca » Sat Aug 03, 2019 11:33 am

I do have it as numbers; but why "s_skin" or "s_hair"? The variable that I'm using is just labeled 'skin' and 'hair', and 'eyes'.

Also, I edited it to fit that, and this now popped up:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 119, in script
    with dissolve
Exception: In DynamicImage u'player/player_skin_[s_skin].png': Could not find substitution 's_skin'.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 119, in script
    with dissolve
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/ast.py", line 1375, in execute
    renpy.exports.with_statement(trans, paired)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/exports.py", line 1578, in with_statement
    return renpy.game.interface.do_with(trans, paired, clear=clear)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 2240, in do_with
    clear=clear)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 2690, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 3074, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 534, in visit_all
    d.visit_all(callback, seen)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 524, in visit_all
    for d in self.visit():
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/image.py", line 730, in visit
    self.find_target()
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/image.py", line 626, in find_target
    raise Exception("In DynamicImage %r: Could not find substitution '%s'." % (self.name, unicode(ke.args[0])))
Exception: In DynamicImage u'player/player_skin_[s_skin].png': Could not find substitution 's_skin'.

Darwin-18.0.0-x86_64-i386-64bit
Ren'Py 7.2.2.491
Desruc Dolls 1.0
Sat Aug  3 11:31:51 2019

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Customizable Sprite with Blinking?

#32 Post by namastaii » Sat Aug 03, 2019 1:55 pm

the demo you sent me, I'm looking at the .png files right now and they are as follows: doll_hair_black.png, doll_hair_blonde.png, doll_hair_brown.png. you need to rename these to doll_hair_1.png, doll_hair_2.png and then have the program find "images/doll/doll_hair_[hair].png" it needs to be 100% accurate or it won't work. in your dressup scene, you're currently displaying "doll" which I copy and pasted the livecomposite into and fixed and it works fine. I did it for "player" as well but since you're only displaying doll, I edited that one and looked at the files for "doll"

I looked at a bad example for the s_variable. just put [variable]. I only really do complex visuals with pure python so this is awkward for me to work with haha

User avatar
ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: Customizable Sprite with Blinking?

#33 Post by ArizaLuca » Sat Aug 03, 2019 2:21 pm

Oh– I forgot to rename the files in the example folder, rip. xD The ones in my actual game have been renamed.

The doll isn't what I'm having trouble with; I'm actively trying to fix the player sprite that displays AFTER the doll dressup game, since that sprite is based off the doll.

Ah, okay xD

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Customizable Sprite with Blinking?

#34 Post by namastaii » Sat Aug 03, 2019 2:22 pm

You can use the same exact displayable...why wouldn't you?

User avatar
ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: Customizable Sprite with Blinking?

#35 Post by ArizaLuca » Sat Aug 03, 2019 2:26 pm

Because of story things. The doll is the character that is dressed up but the player is a separate character that happens to look like the doll. It's kind of complicated lol

Can you try to send back the (edited?) code of the example game so I can take a look maybe? Thank you :)

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Customizable Sprite with Blinking?

#36 Post by namastaii » Sat Aug 03, 2019 2:37 pm

Oh if they look different, that makes sense. haha

I had to delete a bunch of stuff (because i don't have the variable definitions for pbrow etc so it's kinda ..messed up but I got the doll to work. If you need the player to be the same it should work just the same. Basically just make sure that hair_1 in the doll folder is the same color or whatever as hair_1 in the player folder. You won't need anything extra, just place the file names and variables the same way except on the doll displayable it's going to be "images/doll/doll_hair_[hair].png" and on the player displayable, it'll be "images/player/player_hair[hair].png" just have them share the exact same variable and there shouldn't be an issue. just look over it slowly and neaten it up and don't move too quickly through it and you should be able to catch any typos etc

User avatar
ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: Customizable Sprite with Blinking?

#37 Post by ArizaLuca » Sat Aug 03, 2019 7:08 pm

Oh! Okay, it kind of works... well, the image displays and then this comes up:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While loading <'FactorScale' <'Image' u'player'> 0.95 0.95 True>:
  File "game/script.rpy", line 121, in script
    p "..."
IOError: Couldn't find file 'player'.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 121, in script
    p "..."
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/ast.py", line 694, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/exports.py", line 1322, in say
    who(what, *args, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/character.py", line 1127, in __call__
    self.do_display(who, what, cb_args=self.cb_args, **display_args)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/character.py", line 842, in do_display
    **display_args)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/character.py", line 591, in display_say
    rv = renpy.ui.interact(mouse='say', type=type, roll_forward=roll_forward)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/ui.py", line 289, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 2690, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 3174, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/core.py", line 2086, in draw_screen
    renpy.config.screen_height,
  File "render.pyx", line 516, in renpy.display.render.render_screen
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/screen.py", line 669, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/layout.py", line 722, in render
    surf = render(child, width, height, cst, cat)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "accelerator.pyx", line 110, in renpy.display.accelerator.transform_render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/image.py", line 500, in render
    return wrap_render(self.target, width, height, st, at)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/image.py", line 306, in wrap_render
    rend = render(child, w, h, st, at)
  File "render.pyx", line 151, in renpy.display.render.render
  File "render.pyx", line 244, in renpy.display.render.render
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/im.py", line 580, in render
    return cache.get(self, render=True)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/im.py", line 266, in get
    surf = image.load()
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/im.py", line 860, in load
    surf = cache.get(self.image)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/im.py", line 266, in get
    surf = image.load()
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/display/im.py", line 625, in load
    surf = renpy.display.pgrender.load_image(renpy.loader.load(self.filename), self.filename)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/loader.py", line 576, in load
    raise IOError("Couldn't find file '%s'." % name)
IOError: Couldn't find file 'player'.

Darwin-18.0.0-x86_64-i386-64bit
Ren'Py 7.2.2.491
Desruc Dolls 1.0
Sat Aug  3 19:06:54 2019
The image IS defined as 'player', so I don't know why the side's misbehaving... I think the only issue is that the side image is not treating it as an image, for some reason.

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Customizable Sprite with Blinking?

#38 Post by namastaii » Sun Aug 04, 2019 10:17 am

take quotations away from "player' and try that.

also with livecomposites, you might have to do something like show_side_image=DynamicDisplayable(player)

User avatar
ArizaLuca
Veteran
Posts: 241
Joined: Tue Feb 20, 2018 12:59 pm
Completed: Through the Screen, Riddle Me This, Trust Fall, Phobias, Another Adventure
Projects: The Souls in the Seams, Fata Morgana, Minecraft: Story Mode - Behind the Scenes
Organization: Astral Autumn Games
Tumblr: astralautumngames
Deviantart: ArizaLuca
itch: astralautumngames
Contact:

Re: Customizable Sprite with Blinking?

#39 Post by ArizaLuca » Sun Aug 04, 2019 7:35 pm

The side image doesn't seem to work with Layered Parallax so I've decided to just give up on it; but the new customized sprite works great! Thank you! :)

Post Reply

Who is online

Users browsing this forum: _ticlock_