New At Renpy - Concept Idea Of Game

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.
Post Reply
Posts: 5
Joined: Wed Oct 16, 2019 5:10 am

New At Renpy - Concept Idea Of Game

#1 Post by treoes » Thu Oct 17, 2019 9:26 am


as I am totally new in programming (so please don't be too hard on me) and I want to create the following game logic. I read and watched a lot of tutorials and I follow all the instructions.

I was able to get the code and game working (learned how to create map and locations, sublocation menu) but have problems putting all the code together and keep easy add an event system to keep working.

Is the idea bellow ok or do I need to define anything more?

- Define Names, Locations

- Time (position top left, always seen by the player)
> Days Of Week (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)
> Parts of Day (Morning, Afternoon, Evening, Night)
- How Time Forwards
> User Can Skip Parts of Day (button located beside the time)
> Triggered One Time Event


- Map image
> Depending on Part of Day Different Image (Morning, Afternoon, Evening, Night)
- Locations on map
> Icon + Hoover for Text
- Sublocations (displayed on the bottom when the location opened)
> User clicks on location and is moved there. (4 different images for each sublocation depending on Part Of Day (morning, afternoon, evening night))
> Depending on Part of Day Different Image (Morning, Afternoon, Evening, Night)


- One Time Events
> Triggered based on time and location
> Triggered based on time and location and other event was completed
> Can be triggered only once

- Repeating Events
> Repeats based on time and location (every Monday At Afternoon at Library)

If by some miracle I get the upper idea coded and working I would only need to add events to continue the story. Am I right? Is there any example of a framework code for any of the above?

User avatar
Miko-Class Veteran
Posts: 755
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
Deviantart: SophBelle
itch: .......
Location: Philippines, Mindanao

Re: New At Renpy - Concept Idea Of Game

#2 Post by isobellesophia » Thu Oct 17, 2019 10:50 am

treoes wrote:
Thu Oct 17, 2019 9:26 am

I think you were talking about real time events, is it? And for the map, it can be put in variables like..

Code: Select all

label mapdate:
$ map1 = True

label sciencelab:
$ map2 = True

if map1:
show blue with dissolve

if map2:
show red with dissolve
And there are also many things you can do with maps, sorry if i can't give you one, maybe searching is the good idea, and for the time, real time is what i know, not in game time though.

And if you want to show the event once, here is an example.

Code: Select all

label ...:
m "A test for a test that test a test."

Code: Select all

if persistent.test: <--- the if statement for permanent event, which is not the real event.
m "Oh wow! A permanent line!"
jump blah
else: <----- getting this event for the first time, players get this event.
m "Now this is the one time event use."
jump blah

Code: Select all

label blah:
m "Oh wow! Haha"
$ persistent.test = True <----- indicates that when the player get through here, they'll get the permanent event.
For the time ones, maybe you can search or maybe get some help to anyone, since you wanted an easy code.

If you need the REAL WORLD time event function, just ask me, then i'll show you how.
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

Posts: 5
Joined: Wed Oct 16, 2019 5:10 am

Re: New At Renpy - Concept Idea Of Game

#3 Post by treoes » Thu Oct 17, 2019 12:06 pm

@isobellesophia Thank you :) A game clock is probably logical for me - the game will be sandbox type. Except if there is possible to set events based on the day and part (would need define parts of day by hours) - ignore the actual day of the month.

I thought it would be easier to create "fake" clock, time. But now I don't know. :)

If I am correct I need to create the time code fist - as all the other things (locations, events) are depending on the time.

Right now I have this:

Code: Select all

init python:
    class Calendar(object):
        def __init__(self, WeekDays, PartOfDay, Part, Day):
            self.WeekDays = WeekDays
            self.PartOfDay = PartOfDay
            self.Part = Part
            self.Day = Day

        def Output(self):
            return self.WeekDays[self.Day] + " " + self.PartOfDay[self.Part]

        def AddTime(self, hours):
            self.Part += 1
            if self.Part > 4:
                self.Part = 0
                self.Day += 1
            if self.Day > 6:
                self.Day = 0

Code: Select all

   label variables:
        $ calendar = Calendar(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], ["Morning", "Midday", "Afternoon", "Evening", "Night"], 0, 0)

Code: Select all

    label start:
            $ calendar.AddTime(1)
So I added time to my top screen and it moves on like it sould.

- It moves on every click. How to stop this? Removed $ calendar.AddTime(1) and it stoped moving on clicks. That probably solved that (will see when I have first event).

But I still need a manual button for player to skip time (Part Of Day). How to do that? :)

User avatar
Posts: 232
Joined: Sun Oct 26, 2014 1:07 pm
Deviantart: saltome

Re: New At Renpy - Concept Idea Of Game

#4 Post by Saltome » Thu Oct 17, 2019 1:46 pm

Hmm you might wanna consider utilizing the magic of the modulo operator.
Part %= 4

For a button, you can obviously use the button/text button/image button screen keywords. In this case you want to use the Function action, to call the function. ... #Function

As for creating a clock you're best off importing one of the built in Python modules which let you measure time.
Deviant Art: Image

Post Reply

Who is online

Users browsing this forum: CalixtheGreat, rayminator