RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Request] Display Day, Month and Date of variable on screen

0 Members and 7 Guests are viewing this topic.

**
Rep:
Level 82
I created a time system for my game that uses variables and common events, I am aware of time system scripts, and the event system I'm using works, so that in itself is not why I'm here.
What I'm looking at is a way to display the text for the day of the week, month and date on the game's screen, but without a message box in the background.

Something like this:
Spoiler for:

Here is the list of variables I'm using:
261: The date for January (1-31)
262: The date for February (1-28)
263: The date for March (1-31)
264: The date for April (1-30)
265: The date for May (1-31)
266: The date for June (1-30)
267: The date for July (1-31)
268: The date for August (1-31)
269: The date for September (1-30)
270: The date for October (1-31)
271: The date for November (1-30)
272: The date for December (1-31)
273: The current month (1-12)
274: The current day of the week (1-7)
275: The total number of years since the game started (not important)
Note, that if the variable for the current month's date is set to 0, then it is not active.

Basically, what I'm looking at is something like this:
If the current day of the week is 3 display: [Tuesday].
If the current month is 6 display: [June] and the current number for the June variable right next to it.

If possible, I'd like to have several different options for the on screen position, that would be assigned to a variable.
Example: If set to 0: disable visibility, if set to 1: appear at the screens X and Y position in the script, if set to 2: appear at another position that is also defined in the script.
Also, though it is not entirely necessary, I'd like for it to use a custom font, size and color if possible.

I've looked around and found similar scripts, but none of them are what I'm looking for.
If anyone is willing to make a script for this, I would be eternally grateful. ^_^
« Last Edit: August 09, 2010, 01:38:36 AM by Palsa »

***
Rep:
Level 81
Monster Hunter
I'm busy making it for you ^^
good training for me :)

EDIT: could you post the set up of your evented system?
it would help me to see how to script it (would go faster)
Thanks and i'll post the script once it's done (let's say 2 days ^^ , i'm a beginner , but i'm not that bad at it  :) )
« Last Edit: August 12, 2010, 05:21:01 PM by Mitsarugi »

**
Rep:
Level 82
I'm busy making it for you ^^
good training for me :)

EDIT: could you post the set up of your evented system?
it would help me to see how to script it (would go faster)
Thanks and i'll post the script once it's done (let's say 2 days ^^ , i'm a beginner , but i'm not that bad at it  :) )

Awesome, and thank you! ^_^
It will take me a few minutes to type up, so I'll edit this post when I'm done.

[Edit]

Basically, I have a common event that I can call to advance the time by 1 day.
I put several conditional branches that effect the variables in that common event.
So, if variable 274 is set to 1, then the current day is Sunday, and if I call the common event a conditional branch with a control variable will change the number to 2, which is Monday.
This process continues until the variable's number reaches 7 (Saturday), where it will reset the number to 1 (Sunday), and starts the whole week over.
The current month's date functions a little differently, instead of setting the number, I use the add command until it reaches the last day of the month, for January it is 31.
So in other words, if the number for the January date variable is between 1 and 31, it will add 1, so when the common event is called up, 1 becomes 2, 2 becomes 3, 3 becomes 4. etc.
After that, I used another conditional branch that is set to the same variable (the date for January), and I have it set to greater then 31.
Then I placed several control variables inside, the first sets variable 262 to 1 (thus starting the date system for the month of February), the next control variable sets 261 to 0 (placing January's date in the inactive position), and the third control variable changes variable 273 (months of the year) to 2, activating the month of February and ending the month of January.
Note, for December, I have an additional control variable that adds 1 to variable 275 (years).
The same basic practice is followed for all of the days and months.
Here is a picture of the common event, it will probably explain things better then I do:
Spoiler for:
I hope that explains things, let me know if you have any particular questions.
« Last Edit: August 13, 2010, 01:08:18 AM by Palsa »

***
Rep:
Level 81
Monster Hunter
wow you still awake? O.O
PS: it's 3h in the morning here ^^

**
Rep:
Level 82
wow you still awake? O.O
PS: it's 3h in the morning here ^^

It's actually 9 pm where I'm at, though I have been known to pull an all nighter on occasion.  ;D

***
Rep:
Level 81
Monster Hunter
thanks this will help ^^

EDIT: Does it need to show the year too?
« Last Edit: August 13, 2010, 01:32:39 AM by Mitsarugi »

**
Rep:
Level 82
thanks this will help ^^

EDIT: Does it need to show the year too?

No, just the day, month and date should be fine.

***
Rep:
Level 81
Monster Hunter
okay ^^
EDIT: Okay , so that is the event that checks the variables, but i would like to see what you used to add to them , manual or auto, parallel?
« Last Edit: August 13, 2010, 03:58:41 AM by Mitsarugi »

**
Rep:
Level 82
okay ^^
EDIT: Okay , so that is the event that checks the variables, but i would like to see what you used to add to them , manual or auto, parallel?

I have the trigger set to none, because it activates in several different ways, so its on manual function.
Here's a brief explanation on that.
First, I have a day to night system that works with parallel processes, but it is only active when the player is on the field, so time resets to day and stops when you enter a town or go to the world map screen.
If the player is on the field, at midnight the day to night parallel process is set to call up the common event which causes the day and date, and depending on what date and month it is, the month and year to advance.
So if the player is on the field during December 31 on a Friday, then at midnight the time will change to January 1 on a Saturday the following year.
I've also placed a call common event with a time of day conditional branch in all of the events that transfer the player out of the field maps.
The conditional branch is set so that if the time of day is between evening and midnight, it will automatically be the next day when the player leaves.
This means that if the player has a deadline, then finishing up on the field and returning before evening will give the player an extra day, where if they leave after evening then they lose an extra day.
Also, since the common event is set to manual, it allows me to advance whenever I want.
The game I'm working on is a fan game of the Atelier series, so I might have it advance a day after synthesizing an item, but I haven't decided on that yet.

***
Rep:
Level 81
Monster Hunter
i'm making it with an auto mode so it would add to the variable by itself ^^
(works with a clock)
if the hours are 24 it adds to the variable and the day would change :)
if the days are the max of the month it starts the new month
and if the months reach there max it changes the year ^^

**
Rep:
Level 82
i'm making it with an auto mode so it would add to the variable by itself ^^
(works with a clock)
if the hours are 24 it adds to the variable and the day would change :)
if the days are the max of the month it starts the new month
and if the months reach there max it changes the year ^^

Sounds cool, but the parallel process already changes the time, and the day to night system I'm using doesn't follow a 24 hour clock, so wouldn't that alter things a bit?  or is it optional?

***
Rep:
Level 81
Monster Hunter
i'm making it with an auto mode so it would add to the variable by itself ^^
(works with a clock)
if the hours are 24 it adds to the variable and the day would change :)
if the days are the max of the month it starts the new month
and if the months reach there max it changes the year ^^

Sounds cool, but the parallel process already changes the time, and the day to night system I'm using doesn't follow a 24 hour clock, so wouldn't that alter things a bit?  or is it optional?

Yeah i'll make it optional ^^
and a switch to use the script or not ^^

EDIT: updated the variables , now uses only 3 :)
« Last Edit: August 15, 2010, 04:53:30 PM by Mitsarugi »

**
Rep:
Level 82
Cool. ^_^

I was just wondering, but would it be possible to have it set so that when the display is disabled, it can be called up for a certain amount of time, maybe 5 seconds, by pressing a key such as 'T'?
If not, then that's ok.

***
Rep:
Level 81
Monster Hunter
Cool. ^_^

I was just wondering, but would it be possible to have it set so that when the display is disabled, it can be called up for a certain amount of time, maybe 5 seconds, by pressing a key such as 'T'?
If not, then that's ok.
i'll try ^^
PS: almost done too :)

**
Rep:
Level 82
Cool. ^_^

I was just wondering, but would it be possible to have it set so that when the display is disabled, it can be called up for a certain amount of time, maybe 5 seconds, by pressing a key such as 'T'?
If not, then that's ok.
i'll try ^^
PS: almost done too :)

Awesome! ^_^

***
Rep:
Level 81
Monster Hunter
Done so far:

261: The date for January (1-31)
262: The date for February (1-28)
263: The date for March (1-31)
264: The date for April (1-30)
265: The date for May (1-31)
266: The date for June (1-30)
267: The date for July (1-31)
268: The date for August (1-31)
269: The date for September (1-30)
270: The date for October (1-31)
271: The date for November (1-30)
272: The date for December (1-31)
^Done Only 1 variable now (cause i'm good with variables :p )
273: The current month (1-12)
^Done
274: The current day of the week (1-7)
^Done
275: The total number of years since the game started (not important)
^ Done
Note, that if the variable for the current month's date is set to 0, then it is not active.
^Done
Basically, what I'm looking at is something like this:
If the current day of the week is 3 display: [Tuesday].
If the current month is 6 display: [June] and the current number for the June variable right next to it.
^Done

If possible, I'd like to have several different options for the on screen position, that would be assigned to a variable.
Example: If set to 0: disable visibility, if set to 1: appear at the screens X and Y position in the script, if set to 2: appear at another position that is also defined in the script.
^I'll add this too ^^
Also, though it is not entirely necessary, I'd like for it to use a custom font, size and color if possible.
^Done

Quote
I was just wondering, but would it be possible to have it set so that when the display is disabled, it can be called up for a certain amount of time, maybe 5 seconds, by pressing a key such as 'T'?
If not, then that's ok.
^Trying to add this :p

EDIT:
Quote
Sounds cool, but the parallel process already changes the time, and the day to night system I'm using doesn't follow a 24 hour clock, so wouldn't that alter things a bit?  or is it optional?

which day to night system? KGC?
« Last Edit: August 17, 2010, 03:41:56 AM by Mitsarugi »

**
Rep:
Level 82
Awesome! ^_^

EDIT:
Quote
Sounds cool, but the parallel process already changes the time, and the day to night system I'm using doesn't follow a 24 hour clock, so wouldn't that alter things a bit?  or is it optional?

which day to night system? KGC?

The day to night system is of my own creation.
I'll see if I can describe how it works.
Basically, I have an event on the field that is set to parallel process.
The event requires two switches to be active, one is the master switch and the other represents the current time of the day.
There are a total of 16 pages in the event, each representing a specific time of the day.
When the event starts, it loads 4 pictures as screen overlays: noon, evening, night and morning, all set to invisible on the first page, and it also loads a 5th picture for the time piece.
The reason I chose picture overlay instead of tint screen is because I like the way it looks more then tint screen.
Though I do use tint screen on some maps, I have to calculate the color change differently for each map.
After the pictures have loaded, it activates several switches for time based events, as well as the transfer event.
The last part of the event has two wait commands set to 500, and one or more picture moves set to adjust the visibility on the picture overlays that has a 500 wait attached to it.
So in total, the waiting time is approximately 1500 between the transitions.
After the transition has finished, it turns on the switch for the next time period and turns of the current, causing the event to move on to the next page, where the display pictures are set in the same manner as the picture moves were at the end of the last page.
The time piece is different for each page, and is actually one of the reasons why I was asking for the text to have more then one display location.
One thing to note, when I created this, I was still learning how to use variables, conditional branches and common events.
So I might redo the entire event so that it will work on a common event instead of a field event, and if so, I'll probably change all of the switches to variables.
Here are some screenshots showing all 16 periods in a full day:
Spoiler for:










***
Rep:
Level 81
Monster Hunter
XP? O.o

EDIT: Could you send me a file with your clock images?
i'll make a little extra for you (you'll see ^^)
PS: i was wanting to request the same thing as you did , till i saw your request and decided to script it on my own :p
« Last Edit: August 17, 2010, 04:25:39 PM by Mitsarugi »

**
Rep:
Level 82
XP? O.o

EDIT: Could you send me a file with your clock images?
i'll make a little extra for you (you'll see ^^)
PS: i was wanting to request the same thing as you did , till i saw your request and decided to script it on my own :p

How about if I just make a quick demo instead?
I'll include all of the graphics of course. ^_^

***
Rep:
Level 81
Monster Hunter
That would be great, but is it XP?

**
Rep:
Level 82
That would be great, but is it XP?

No, I'm using VX, though the sprites are in the XP style.
Will that be a problem?

***
Rep:
Level 81
Monster Hunter
That would be great, but is it XP?

No, I'm using VX, though the sprites are in the XP style.
Will that be a problem?

ah, phew....i almost tought it would be Xp (i can't script for XP)


i'm almost done but if you want i found this one
http://www.rpgmakervx.net/index.php?showtopic=28750&hl=

which i could modifie if needed ^^
« Last Edit: August 20, 2010, 01:56:33 PM by Mitsarugi »

**
Rep:
Level 82
That would be great, but is it XP?

No, I'm using VX, though the sprites are in the XP style.
Will that be a problem?

ah, phew....i almost tought it would be Xp (i can't script for XP)


i'm almost done but if you want i found this one
http://www.rpgmakervx.net/index.php?showtopic=28750&hl=

which i could modifie if needed ^^

Thanks, I've considered using that one, but I've already got the time features integrated through eventing, so all I really need is the display.

***
Rep:
Level 81
Monster Hunter
SOLVED!? ^^

**
Rep:
Level 82