[BUG] multilevel use/transclude

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
drKlauz
Veteran
Posts: 239
Joined: Mon Oct 12, 2015 3:04 pm
Contact:

[BUG] multilevel use/transclude

#1 Post by drKlauz »

Got hit by weird bug, using rather complex screen with multiple levels of use/transclude, below is simplified example.
Adding $pass to certain place fixes it.
Tested on 7.4.6 and 11-sep nightly.

Code: Select all

## how to replicate: open "Help" screen, click left "Increase" button, see variable not changing

screen box2():
  vbox:
    align (0.25,0.5)
#    $pass
    transclude

screen box1():
  use box2:
    transclude

screen box2x():
  vbox:
    align (0.75,0.5)
    $pass
    transclude

screen box1x():
  use box2x:
    transclude

screen help():
  tag menu
  default some_var=1
  default some_varx=9001
  use box1:
    vbox:
      text "BUGGED: [some_var]"
      textbutton "Increase" action SetScreenVariable("some_var",some_var+1)
  use box1x:
    vbox:
      text "WORKING: [some_varx]"
      textbutton "Increase" action SetScreenVariable("some_varx",some_varx+1)
  textbutton "Return":
    action Return()
    keysym "game_menu"

label start:
  "test"
  return
P.S.: While at this, is there any chance of allowing recursive screens? For example complex layout where some parts may contain similar sublayouts, using recursive approach it would require single screen.
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: [BUG] multilevel use/transclude

#2 Post by PyTom »

There is no chance of allowing recursive screens, as doing so would create loops that would prevent Ren'Py from coming up with a defined order in which it could analyze screens.

I'm tracking this as https://github.com/renpy/renpy/issues/3034 , at least until I figure out what's going on.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

drKlauz
Veteran
Posts: 239
Joined: Mon Oct 12, 2015 3:04 pm
Contact:

Re: [BUG] multilevel use/transclude

#3 Post by drKlauz »

Make sense.
Thanks.
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350

Post Reply

Who is online

Users browsing this forum: No registered users