Fan Art Dating My Daughter: Fan Art

5.00 star(s) 2 Votes

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,852
29,774
Anyone who knows their way around Renpy?

I kinda need a calender system in my game (monday to sunday, also counting months).

Need it for my D game ^^
If you are just displaying the current day, but want a date system, take a look at Lab Rats (the first one). It's been a while, but I did some personal tweaking under the hood there, and it had not only a day system, but also had multiple time periods for each day.

I haven't peeked under the hood of Lab Rats 2, so I don't know what calendar system Vren is using for that.

There's probably an old post here somewhere, in which I mentioned a 'cleaner' way to code the day of week variables in LR, but it's been a long while since I was following that game.

Edit: OK, so to 'parse out' the day of week from the current day:
Code:
    $ day_number = (day%7)
 
    $ day_name_values = ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
 
    $ day_name = day_name_values[day_number]
In this case, the game begins on Day 0 or 1 (or any day really), and the day%7 'subtracts' multiples of 7 from the current day value, assigning a value of 1 to 7 (or 0 to 6, don't remember now) to day_number, which will then 'pick' the day name from the variable string using the above code.

Then just use day_name in your UI to display Sunday, etc.

LR1 didn't bother with months, but you could do something along the lines of
'if day < 32, Month = July, day_displayed = day - 3
if 31 < day < 63, Month = August, day_displayed = day -34
etc.'
Using proper 'if' statement coding of course! It's been too long since I messed with Renpy.

So, using the above variables, and assuming that start day is 3 (or 4), since July 1 falls on a Wednesday this year, to display:
Saturday, July 3rd
you'd arrange the variables as follows in your UI
day_name, month, day_displayed
would generate that string (if properly coded in Renpy, of course).
OR, you could just re-arrange the day_name_values string to start on Wednesday instead of Sunday for Day 1, and lose the -3 adjustment on the day displayed thing...


If you are looking for a displayable calendar, that's a different story. I'd suggest posting up in the Programming and Development thread with what you are looking for - I'm sure that people will have a few ideas.
 
  • Like
Reactions: Heisemberg

Catoblepas

Member
Feb 9, 2017
254
457
One of the features that MeshedVR is working on for Virt-A-Mate is model and texture import. What this means is that soon we'll be able to interact (*ahem*) with D virtually. Or characters from any other VNs with fan threads, Big Brother etc.

That's if any of the D models in this forum are Gen 2 (Gen 3 comes later), and creators are willing to share.

 
  • Like
Reactions: John Doe Jr.

Magixian

Member
Feb 2, 2017
219
315
Upgraded from the toaster i usually render on. Happy Summer ^^
A Look that kills. Dirty Smile. A dress straight from my dreams. In all, an amazing Render =) Good job, and thanks for sharing.
Just... That is way too much clothes for a summer like this :cool:
 
  • Like
Reactions: oldje
5.00 star(s) 2 Votes