Author Topic: [XP] Global Day-and-Night System for RMX-OS  (Read 22901 times)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
[XP] Global Day-and-Night System for RMX-OS
« on: December 28, 2009, 07:32:04 PM »
Global Day-and-Night System for RMX-OS
Authors: Blizzard
Version: 1.2
Type: RMX-OS plugin
Key Term: RMX-OS Plugin

Introduction

This script utilizes ATES to allow a serverside globally controlled Day-and-Night System in the game

This script is to be distributed under the same terms and conditions like the script it was created for: RMX-OS.

Features

  • easy to configure
  • globally controlled time

Screenshots

N/A for this sort of script.

Demo

N/A

Script

Just make a new script above main and paste this code into it.
(click to show/hide)

Make a new file with an .rb extension in the Extensions folder of RMX-OS and copy-paste this script into it.
(click to show/hide)


Instructions

In the script in the first comment.

Compatibility

Requires RMX-OS to work.
Requires ATES to work.

Credits and Thanks

  • Boris "Blizzard" Mikić

Author's Notes

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
« Last Edit: March 23, 2019, 06:34:13 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #1 on: December 28, 2009, 07:40:42 PM »
darn you beat me to it :P.
oh well i bet you did it better anyway
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Jackolas

  • Ethereal Devastator
  • ****
  • Posts: 499
  • LV: 31
  • Gender: Male
  • Its just me
    • View Profile
    • My Clan
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #2 on: December 28, 2009, 07:41:18 PM »
:bow: this is great!!  :bow:

ATES for RMX-OS

I failed big time trying to get ATES to work on my game :P

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #3 on: December 28, 2009, 08:01:07 PM »
Lol! I made this for Auspiex. There will be another few scripts/RMX-OS plugins coming which I will make because of Auspiex.

EDIT: And the add-ons are always so small. :3
« Last Edit: December 28, 2009, 08:03:10 PM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #4 on: January 03, 2010, 05:07:22 PM »
v1.01 is out. It works properly with RMX-OS v1.08.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline crzyone9584

  • Transcended Spirit
  • ***
  • Posts: 151
  • LV: 3
  • Gender: Male
  • ELLO FOOLS!!
    • View Profile
    • Crzy Productions
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #5 on: February 05, 2010, 06:40:17 AM »
Is there a way to make a 12 hour clock instead of a 24 hour?
« Last Edit: February 05, 2010, 07:23:27 AM by crzyone9584 »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #6 on: February 05, 2010, 05:42:21 PM »
Why would somebody want that? Yes, you can do that by changing the 24.0 in line 61 to 12.0.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline crzyone9584

  • Transcended Spirit
  • ***
  • Posts: 151
  • LV: 3
  • Gender: Male
  • ELLO FOOLS!!
    • View Profile
    • Crzy Productions
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #7 on: February 05, 2010, 07:09:17 PM »
Why would somebody want that? Yes, you can do that by changing the 24.0 in line 61 to 12.0.

Ummm, because its easier on my eyes so i don't have to remember 24 hour clock. and easier for people who don't know 24 hour clock lol. And easier to coordinate events on the server lol

(EDIT: Ok now im really confused i changed the 24.0 to 12.0 it was actually line 60 but now its either saying its 5:16 in the morning at night not sure lol. but the server is 10:34 lol so yea im mad confused.)
« Last Edit: February 05, 2010, 07:34:15 PM by crzyone9584 »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #8 on: February 05, 2010, 09:30:31 PM »
My bad. >.<
Don't worry if there's a line mismatch. It's probably because of the config or something else.

Anyway, change the 12.0 back to 24.0. Find this line (should be 64):

Code: [Select]
$game_system.ates.time = ATES::Time.new(minutes.to_i, hours.to_i)
Change it to this:

Code: [Select]
$game_system.ates.time = ATES::Time.new(minutes.to_i, hours.to_i % 12)
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Lost King

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 0
  • Gender: Male
  • :D
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #9 on: February 06, 2010, 07:12:08 AM »
So I'm pretty sure the problem is coming from this. Anyway, when I go to start a game before anything else, the screen turns solid Yellow and all I can see is the chat box, my name, and the clock. I turn on ATES and to get rid of the yellow I need to turn ATES.tint_off, and while it fixes it, I'd rather like to have a distinguishable difference between night and day.
*Scribble Scribble* Oh right, not that sort of signature.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #10 on: February 06, 2010, 12:10:45 PM »
That can only happen if you didn't configure everything properly.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Lost King

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 0
  • Gender: Male
  • :D
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #11 on: February 06, 2010, 08:25:49 PM »
What exactly do I need to do in configuration? My script setup is as follows:
RPG Maker defaults
ATES
RMX-OS Options
RMX-OS Script
RMX-OS ATES Plugin
RMX-OS Main

I've got the extension file saved in extensions as a .rb, it comes up as open with Ruby so that's saved correctly and I've got it included in the extentions box on the RMX-OS GUI. I changed the time settings in ATES to reflect that of an entire day but for some reason only the minutes show up on the clock and the hour is just 00.
*Scribble Scribble* Oh right, not that sort of signature.

Offline crzyone9584

  • Transcended Spirit
  • ***
  • Posts: 151
  • LV: 3
  • Gender: Male
  • ELLO FOOLS!!
    • View Profile
    • Crzy Productions
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #12 on: February 06, 2010, 09:22:30 PM »
Quote
ATES
RMX-OS Options
RMX-OS Script
RMX-OS ATES Plugin
RMX-OS Main

Thats your problem right there. ATES needs to go under RMX-OS Script. and the ATES Plugin under ATES so should look like this

Quote
RMX-OS Options
RMX-OS Script
ATES
RMX-OS ATES Plugin
RMX-OS Main

Hope that helps. I fixed the yellow for me. Still trying to get the right time lol. for some reason when i change it to 12 hour clock its way to early or late as in at 12 it mid night and midnight is noon lol

Offline Lost King

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 0
  • Gender: Male
  • :D
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #13 on: February 06, 2010, 09:31:28 PM »
Well, changing the script order to that did nothing...
*Scribble Scribble* Oh right, not that sort of signature.

Offline crzyone9584

  • Transcended Spirit
  • ***
  • Posts: 151
  • LV: 3
  • Gender: Male
  • ELLO FOOLS!!
    • View Profile
    • Crzy Productions
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #14 on: February 06, 2010, 10:07:11 PM »
Well thats what fixed my yellow.

also are you running the event that calls the script as auto run or parallel? maybe thats what fixed mine. although i changed both at the same time so im not sure what one fixed it make sure its not auto run event calling the ates system.

Offline Lost King

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 0
  • Gender: Male
  • :D
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #15 on: February 07, 2010, 12:24:26 AM »
I have it run as Parallel Process, but regardless of whether or not I even turn it on, it starts out yellow and stays yellow, I even do the ATES.make_it_night call and it just flashes the night color and goes back to yellow. The only fix I've found was using ATES.tint_off but that kind of makes the whole system lame if I have a clock but nothing to actually distinguish day from night.
*Scribble Scribble* Oh right, not that sort of signature.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #16 on: February 07, 2010, 12:36:08 AM »
did you make sure to erase the parallel event?

ie

ATES.method_call
Erase Event

other wise the parallel process event loops and keeps calling ATES.method_call every frame.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Lost King

  • Awakened Visionist
  • **
  • Posts: 55
  • LV: 0
  • Gender: Male
  • :D
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #17 on: February 07, 2010, 12:39:47 AM »
Yes, I've tried it with and without erasing, I've also tried it as an action button event, ie talking to an NPC, but I still get no difference.
*Scribble Scribble* Oh right, not that sort of signature.

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #18 on: February 07, 2010, 12:44:40 AM »
weird...
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20013
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Global Day-and-Night System for RMX-OS
« Reply #19 on: February 08, 2010, 11:40:08 AM »
It can only be yellow if your server configuration is not matched with the game configuration, that's what I was trying to say. -_-
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.