Layered Parallax Code

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
User avatar
ArizaLuca
Veteran
Posts: 240
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: Layered Parallax Code

#16 Post by ArizaLuca » Wed Oct 16, 2019 12:19 pm

This code seems to give me problems with LayeredImage characters in that, quite often, this error pops up:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/routes/evan.rpy", line 282, in script
    "Evan maneuvered around the mess with the expertise of someone who had been living in it for a long while."
AttributeError: 'NoneType' object has no attribute 'append'

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

Full traceback:
  File "game/routes/evan.rpy", line 282, in script
    "Evan maneuvered around the mess with the expertise of someone who had been living in it for a long while."
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/ast.py", line 706, in execute
    renpy.exports.say(who, what, *args, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/exports.py", line 1336, in say
    who(what, *args, **kwargs)
  File "/Users/arizaluca/Desktop/renpy-6.99.13-sdk/renpy/character.py", line 1139, 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 295, 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 2699, 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 3191, 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 2091, in draw_screen
    renpy.config.screen_height,
  File "render.pyx", line 546, in renpy.display.render.render_screen
  File "render.pyx", line 247, 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 154, in renpy.display.render.render
  File "render.pyx", line 247, 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 154, in renpy.display.render.render
  File "render.pyx", line 247, 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 154, in renpy.display.render.render
  File "render.pyx", line 247, in renpy.display.render.render
  File "accelerator.pyx", line 110, in renpy.display.accelerator.transform_render
  File "render.pyx", line 256, in renpy.display.render.render
AttributeError: 'NoneType' object has no attribute 'append'

Darwin-18.7.0-x86_64-i386-64bit
Ren'Py 7.3.2.320
The Souls in the Seams 1.0
Wed Oct 16 12:16:04 2019
What is up with that?

M-77
Regular
Posts: 51
Joined: Tue Sep 04, 2018 7:58 am
Contact:

Re: Layered Parallax Code

#17 Post by M-77 » Sat Oct 19, 2019 3:54 pm

Hello ArizaLuca, you need to show us the label or at least part of the code this error message came from. Around the line 282 from your script. Maybe you just forgot or deleted some "´" or ":" or "()" symbols while working on the code. I am Renpy amateur, so not sure if I can help you with this, but show us some of your code here.

User avatar
ArizaLuca
Veteran
Posts: 240
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: Layered Parallax Code

#18 Post by ArizaLuca » Sat Oct 19, 2019 9:38 pm

Code: Select all

show evan blink normal frown at left onlayer front
    show doll at right onlayer front
    show playerghost onlayer front
    $ pmood = 'True'
    $ pbrow = 'True'
    $ pmouth = 'True'
    with dissolve

    "Evan maneuvered around the mess with the expertise of someone who had been living in it for a long while." #### <== Here is where the error occurs.

    "He reached a small table and sat his bag- with the doll- on a big pile of crumpled paper and open books."
    
    show evan blink thoughtful frown onlayer front
    with dissolve
'Evan' is defined as a LayeredImage so the face is normal; playerghost is a LiveComposite image. However this works in cases like this:

Code: Select all

show alister at left onlayer front
    show doll at right onlayer front
    show playerghost onlayer front
    $ pmood = 'True'
    $ pbrow = 'True'
    $ pmouth = 'True'
    with dissolve

    p "..."

    $ pmood = 'halfshut'

    p_thought "This place really hasn't changed a bit..."
    
    $ pbrow = 'sad'
    $ pmouth = 'True'
    
    p_thought "... I wonder if he kept my old room."
Which is in the same game, so I don't know what the issue is.

M-77
Regular
Posts: 51
Joined: Tue Sep 04, 2018 7:58 am
Contact:

Re: Layered Parallax Code

#19 Post by M-77 » Sun Oct 20, 2019 6:45 am

Hmm... I not sure, I not remember all the renpy commands, and have not coded much last months.
But possible you need to add a "n" (for the Narrator, so RenPy can recognize it) before your text "Evan maneuvered around the mess with the expertise of someone who had been living in it for a long while."
And before the "label start:" add "define n = Character("Narrator")". You sure know this but maybe overseen or forgot to do.
It looks like Renpy do not know what the line "Evan maneuvered around the mess with the expertise of someone who had been living in it for a long while." is for.

User avatar
isobellesophia
Miko-Class Veteran
Posts: 694
Joined: Mon Jan 07, 2019 2:55 am
Projects: Maddox's Everyday Talk! (13+ Unreal version), Maddox Everyday Talk! (3+ Real-Friendly version)(Upcoming 2020)
Organization: Friendly Teachers series
itch: .......
Location: Philippines, Mindanao
Contact:

Re: Layered Parallax Code

#20 Post by isobellesophia » Sun Oct 20, 2019 8:10 am

As M-77 said, RenPy cannot recognize the different name define and the character dialogue itself. Which is making RenPy confused. Same for the name of the file image. The correct one must be the same as the charcater and the image like... "Character Maria is for 'm'". And "Image for Maria is for 'm background'" So that RenPy can understand. This is just a advice to help.

The charcater and the narration are still the same, just make the narrator as a character, name it a narrator talker. So that the name can be seen.
I am a friendly user, please respect and have a good day..


Working on a talking simulation game for everyone, except children.

Maddox Everyday Talk!
Is my very very main project, not contain 13 below.

Main project here viewtopic.php?f=43&t=56564
Image

Post Reply

Who is online

Users browsing this forum: Ace94