Ren'Py Navigation, time and event framework

BitterSweep

New Member
Apr 15, 2021
14
1
Hi, I am developing my own first game.
And now I am in need of a simple Day/Afternoon/Night - Mon/Tue... time system
Along with a simple navigation system and of course events system.

I was figuring if there is something already tested that I can use at least as a base.
I came across DonRP/NQTR-toolkit on github but it is way early in development and most features arent even documented, yet I aknowledge it is a good start.

Do you guys write your framework from scratch?
Thank you to anyone that can help
 

MrLuxuria

New Member
Jan 11, 2021
4
6
Hi Bittersweep!

I don't know if I'm allowed to post links yet, but I can still help! I personally take a lot of inspiration and knowledge from over at Lemmasoft forums - they have a "RenPy Cookbook" section of their forum filled with great code examples, and I know I've seen all of those that you mentioned - time, event, and navigation systems - over there!

Even if you decide to write your framework from scratch, checking out the coding samples can at least help you see how others have facilitated similar systems. I think checking out the 'Dating Sim Engine (4.1)' will definitely put you on the right track!

I'm actually tackling the challenge of developing similar systems in my game at the moment, so if you ever want to brainstorm, my Discord is MisterLuxuria#4415 - always happy to help!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,166
14,880
Code:
label kitchen:
    scene kitchen
    $ current_location = "kitchen"
    $ renpy.pause()
    $ renpy.jump(current_location)
Why renpy.jump(current_location) and not simply jump expression current_location ?


The pause followed by the jump will ensure the player remains in this label until we allow them to move around.
Why so complicated ?

Code:
label kitchen:
    scene kitchen
    [do whatever you want]
    call screen navigation( from="kitchen" )

screen navigation_menu( from=None ):
    if from == "kitchen":
        textbutton "Bedroom" action Jump("bedroom")
        textbutton "Living Room" action Jump("living_room")
    elif from == "bedroom":
        textbutton "Kitchen" action Jump("kitchen")
    [...]
And it's done, you've your navigation system without the useless need of a current_location variable, nor the broke use of a couple pause/jump to simulate something that Ren'py do very well by itself.