In-game clock based on PC clock.

Notes

WILL be used in a commercial game.


Basically I need an in-game clock that shows the time based on whats on the computers clock. Must be able to set which corner it shows in the script as well as in-game. 

- Must be 12 hour clock and must show AM / PM with the option to switch to 24 hour clock. All in-game.

- Clock color must be configurable in-game.
I just seen somebody post JUST this script on the alternate site. You will have to ask the author if its commercial use...http://www.rpgmakervxace.net/user/36761-demintika/ That is his profile page. 
I just seen somebody post JUST this script on the alternate site. You will have to ask the author if its commercial use...http://www.rpgmakervxace.net/user/36761-demintika/ That is his profile page. 
No, that won't work.

It doesn't have any features I want. Plus it uses military time, Instant turn off. 
No, that won't work.

It doesn't have any features I want. Plus it uses military time, Instant turn off. 
Could you perhaps discuss the possible changes with the creator of the script and see if they will add the extra bits that you need?  Or ask if it would be okay for someone else to take it and modify it for you?
Could you perhaps discuss the possible changes with the creator of the script and see if they will add the extra bits that you need?  Or ask if it would be okay for someone else to take it and modify it for you?
You do realize that is A LOT to ask to add-on for an already existing script right?

I have no experience with scripts, but from my experience with other complex things such as HTML. When adding a lot of new features to a webpage, its better to scrap the entire coding and redo it entirely from scratch.

I know for fact that ruby is a complex form of scripting which is something I lack the patience to learn.

On top of that, I don't know if the script is even allowed in commercial RPGM games.
But have you tried asking?

A well-designed script should be extensible to support new features with relatively little pain. Some refactoring may be required but that should only serve to improve the script.

You have a clock. Now you want to choose between 12H vs 24H. Doesn't sound like something that warrants a re-write.

Code:
# get the meridianHour > 12? PM, else, AM# Display as 12HHour - 12
But have you tried asking?

A well-designed script should be extensible to support new features with relatively little pain. Some refactoring may be required but that should only serve to improve the script.

You have a clock. Now you want to choose between 12H vs 24H. Doesn't sound like something that warrants a re-write.

# get the meridianHour > 12? PM, else, AM# Display as 12HHour - 12
Did you even read everything else I wanted to be added?
Have you asked yet?
Have you asked yet?
Right now I waiting to see if the script is even allowed in commercial RPGM games. I have asked about that. 
Do you want this clock to be shown on the map HUD or somewhere else too?
Do you want this clock to be shown on the map HUD or somewhere else too?
Mostly on the map.  But also the pause / stats screen in it's own "window" under 'game end'.
You do realize that is A LOT to ask to add-on for an already existing script right?
It's alot less than asking someone to reinvent the script themselves without using anything from the existing script.  I've made additions to other people's scripts for HUD before and it might have taken me a couple of hours to find my way around the script and make the change(s) rather than spending days actually creating a new script from scratch.

Did you even read everything else I wanted to be added?
I did 🙂 , so:

1) Must be able to set which corner it shows in the script as well as in-game.

It already does this.  There is a setting to position it in the script, and you use a script call to change the position to any of the available ones.  That is explained in the top of the script.  You could get a small change done to reference a variable instead if you wanted.

2) Must be 12 hour clock and must show AM / PM with the option to switch to 24 hour clock. All in-game.

It already does 24 hour (from what I can see, although not at my VXAce pc so can't check), so just adding in the 12 hour check is virtually as simple as what has been provided, although just needs ways to toggle this in-game (perhaps through a variable again).

3) Clock color must be configurable in-game.

Is that just the text?  Or do you need the window-skin to also be changeable?  If it's just the text, then that's not exactly difficult, but could be more awkward to do the window-skin.  Probably with a variable to set the colour.

4) Mostly on the map.  But also the pause / stats screen in it's own "window" under 'game end'.

We've already covered the first part of this in 1) above, but the rest is something that you never mentioned before.  Probably still not a major thing to do.

So if the creator is okay with commercial usage, and either will make the changes for you or allow someone else to do it then I don't see any of them as anything major (provided that you don't have more changes in mind that you haven't actually included in your posts).
It's alot less than asking someone to reinvent the script themselves without using anything from the existing script.  I've made additions to other people's scripts for HUD before and it might have taken me a couple of hours to find my way around the script and make the change(s) rather than spending days actually creating a new script from scratch.

I did 🙂 , so:

1) Must be able to set which corner it shows in the script as well as in-game.

It already does this.  There is a setting to position it in the script, and you use a script call to change the position to any of the available ones.  That is explained in the top of the script.  You could get a small change done to reference a variable instead if you wanted.

2) Must be 12 hour clock and must show AM / PM with the option to switch to 24 hour clock. All in-game.

It already does 24 hour (from what I can see, although not at my VXAce pc so can't check), so just adding in the 12 hour check is virtually as simple as what has been provided, although just needs ways to toggle this in-game (perhaps through a variable again).

3) Clock color must be configurable in-game.

Is that just the text?  Or do you need the window-skin to also be changeable?  If it's just the text, then that's not exactly difficult, but could be more awkward to do the window-skin.  Probably with a variable to set the colour.

4) Mostly on the map.  But also the pause / stats screen in it's own "window" under 'game end'.

We've already covered the first part of this in 1) above, but the rest is something that you never mentioned before.  Probably still not a major thing to do.

So if the creator is okay with commercial usage, and either will make the changes for you or allow someone else to do it then I don't see any of them as anything major (provided that you don't have more changes in mind that you haven't actually included in your posts).
Seems like you got it all down.

I also would like to add that if a user wants the clock on the map HUD to be visible they should have the option to do that was well as putting it in a window on the map HUD.

Or better yet, have the option to put a black outline around text of the clock as well as putting it in a window if that is even possible with scripting. The options can be enabled individually or together.

Also the setting of the location of the clock is strictly for the map hud.
# get the meridianHour > 12? PM, else, AM# Display as 12HHour - 12
That is not necessary to do at all.

There is a built in Time class, so displaying PC time is a piece of cake.

Many formats are available by default, all waiting to be used by someone!

To my surprise, the script which was mentioned above did not utilize the built in formats, which I find a bit disappointing.

Anyway, here is a little script I made for showing the time on the map:

sixth_pc_timer_display_v_0_1.txt

I wanted to make one anyway for my game. 😀

I will add the clock for the menu too tomorrow, kinda busted for the day now. *-*

Tell me if you want some other things in it!
Looks nice, only I do not see the option to change the position of the clock in-game.

Also there's too much space between the the text and the left and right borders of the window.
You can change the position, text color and window-skin with the script calls mentioned in the header during the game.


You can also change the width of the window in the settings of the window in the script. Decrease it's width and there won't be that much space left and right.


Here is the updated script:


sixth_pc_timer_display_v_1_0.txt


Change Log:


# - Increased efficiency of the update methods (performance fix).


# - Added the clock for the menu.


# - Added button trigger to hide/show the timer on the map.


# - Added background image option for the map timer.


I forgot to disable the background image, so make sure to disable it if you don't want to use that feature. If you want to use it, change the image file name to your image's name.
You can change the position, text color and window-skin with the script calls mentioned in the header during the game.

You can also change the width of the window in the settings of the window in the script. Decrease it's width and there won't be that much space left and right.

Here is the updated script:

attachicon.gif
sixth_pc_timer_display_v_1_0.txt

Change Log:

# - Increased efficiency of the update methods (performance fix).

# - Added the clock for the menu.

# - Added button trigger to hide/show the timer on the map.

# - Added background image option for the map timer.

I forgot to disable the background image, so make sure to disable it if you don't want to use that feature. If you want to use it, change the image file name to your image's name.
Looks good but still lacking some of the features I asked for.

I want it so players are able to change these options via menu in-game not just by some pressing of buttons.
If it is for commercial purposes, and really specific, you might have better luck getting what you need in the classified section.
If it is for commercial purposes, and really specific, you might have better luck getting what you need in the classified section.
I would if I actually had any money.

And YES I do have a job, but since I don't live in my own house, I don't get to keep my own paychecks. They go to my step-mother, the property owner, to pay the bills so I get a measly allowance of $15 a week ($30 during the spring and summer).

I'm bad when it comes to saving up cash.

So I'm asking very nicely to anybody willing to have this done. You will get something out of it. It might be money or something else entirely, but I will come up with something while the game is still in development (or after).

(Also I don't want anyone feeling sorry for me. 🙂 )
So, you want a full menu scene with the options of changing the stuffs you mentioned?


Because you haven't mentioned this yet anywhere...


Are you using an options script? If not, would it be okay if I would make an addon for Yanfly's Options script with the features you want?


I am not up for making a new scene from scratch right now. 😛

Original thread: https://forums.rpgmakerweb.com/threads/in-game-clock-based-on-pc-clock.36579/