MV How to get the day-week variable from mog time system.js

Hello!
I use mog time system.js

$gameVariables.setValue(41, $gameSystem. hour());
$gameVariables.setValue(42, $gameSystem. day());
$gameVariables.setValue(44, $gameSystem. month());

\v[44]month \v[42]day \v[41]time

In this way, I knew how to assign variables to time, date, and month and get them.
But I don't know how the day of the week is displayed.
I would like to have you say the month, date, time, and day of the week when you talk to npc without displaying the clock on the screen. Can you tell me how?
in a lot of ways, that depends on how your game calendar is setup.
how many days does a month have and which is the starting weekday and so on.

basically day variable mod 7 gives a result between 0 and 6 (modulo is one of the control variable operations that is very usefull in game development despite being almost unused in the real world)
and then you need to know which weekday the month started with to determine which number is which weekday.

unfortunately the last one (which weekday) depends on your game configuration and I can't tell you that.
if it's not there, you can make it on your own.
its done through this function:

$gameSystem.set_time_var(object,value,type)

object is the week, but also done by switches, which you want to target.
you can set those switches inside a variable and check the variable value
of the choses switch.
I recommend reading the help files of any plugins you use, the answers to such questions can often be found there.

In this case, you can get it with $gameSystem.day_week_name().
I recommend reading the help files of any plugins you use, the answers to such questions can often be found there.

In this case, you can get it with $gameSystem.day_week_name().
Hi. I saw that code in help but I don't know how to use it to get npc to speak. Can you please let me know? Sorry I'm still a beginner.
the simplest way is the same way as you use the other functions:
assign them to a variable with control variable script and then use the variable in showtext.

there are other ways but they would probably only confuse you if you don't already know them.
the simplest way is the same way as you use the other functions:
assign them to a variable with control variable script and then use the variable in showtext.

there are other ways but they would probably only confuse you if you don't already know them.
Oh, this works. Thank you so much!!!!!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-the-day-week-variable-from-mog-time-system-js.168036/