- Joined
- Jun 9, 2014
- Messages
- 129
- Reaction score
- 21
- First Language
- English
- Primarily Uses
I've set up a simple clock, it counts Seconds, Minutes, Hours, Days, Weeks, Months.
However, just to list the date (i.e. Monday, 1st of January) requires ~360 conditional loop statements! x_x
Is there an easy way to set variables for this? Possibly using a script?
My guess (not ruby code, mind you)
If ($day = 1) {$Wkd = "Sunday"} else { If ($day = 2) {$Wkd = "Monday"} else { If ($day = 3) {$Wkd = "Tuesday"} else { If ($day = 4) {$Wkd = "Wednesday"} else { If ($day = 5) {$Wkd = "Thursday"} else { If ($day = 6) {$Wkd = "Friday"} else { If ($day = 7) {$Wkd = "Saturday"} else { } } } } } }}$date = ($day - 1) + ($week * 7)If $month = 0 {$monthname = January} Else { If $month =1 {$monthname = February} Else { ((ETC))Then on any showtext, I could just use:
"According to this calendar, it's $Wkd, the $date of $MonthName"
Is there a way to do this? I'd really like to set up the game to have some festivals at different times of the year (and yes, because it's MY game, the calendar has exactly 28 days each month to keep things simple) But I dont want to have to write ~360 lines of code for each festival to do it x_x
However, just to list the date (i.e. Monday, 1st of January) requires ~360 conditional loop statements! x_x
Is there an easy way to set variables for this? Possibly using a script?
My guess (not ruby code, mind you)
If ($day = 1) {$Wkd = "Sunday"} else { If ($day = 2) {$Wkd = "Monday"} else { If ($day = 3) {$Wkd = "Tuesday"} else { If ($day = 4) {$Wkd = "Wednesday"} else { If ($day = 5) {$Wkd = "Thursday"} else { If ($day = 6) {$Wkd = "Friday"} else { If ($day = 7) {$Wkd = "Saturday"} else { } } } } } }}$date = ($day - 1) + ($week * 7)If $month = 0 {$monthname = January} Else { If $month =1 {$monthname = February} Else { ((ETC))Then on any showtext, I could just use:
"According to this calendar, it's $Wkd, the $date of $MonthName"
Is there a way to do this? I'd really like to set up the game to have some festivals at different times of the year (and yes, because it's MY game, the calendar has exactly 28 days each month to keep things simple) But I dont want to have to write ~360 lines of code for each festival to do it x_x

