[XP] Complete Climate and Time System (CCTS)

Started by ForeverZer0, May 12, 2010, 06:08:20 pm

Previous topic - Next topic

ForeverZer0

May 12, 2010, 06:08:20 pm Last Edit: May 11, 2017, 09:12:49 am by ForeverZer0
Complete Climate and Time System (CCTS)
Authors: ForeverZer0
Version: 1.2.2
Type: Dynamic Environment System
Key Term: Custom Environment System



Introduction

  This script will give you TOTAL control of weather and time in your game. It will allow you to set up different climates that use different weather patterns, tints, sounds, and effects. It is also a complete Time System that gives you full control of, and keeps track of, time, with every possible configuration at your disposal. Note this script comes with a preset config that will be suitable for most's needs, but it can be configured to the most extreme level if so desired, which will require more work. It is not necessary to do this, but the ability is there.


Features


  • Automatic weather control with defined types, frequency, probabilities, tints, and sounds for any and every map in your game.

  • Weather tint and BGS will fade in/out smoothly with the weather for a very realistic feel

  • Configurable screen tints for every climate, month, and hour that will smoothly transition over the course of each hour, not transition to day or night in matter of seconds.

  • Completely configurable calendar system that can use custom names for days and months, custom month lengths, etc.

  • Can easily use configurable switches and variables for event conditions based off the hour of the day, the season of the year, or the current weather.

  • Comes with a clock that can be toggled on/off by the player, with custom location, opacity, and font name/size options.

  • Also have option to use an analog clock.

  • Complete control to freeze the time, screen tone, weather, or time speed, separately or together, with simple script calls.

  • Comes with error checking and a debugger for easily testing your own customization, and to help understand the system.

  • Short, simple script calls for easy manipulation

  • Compatible with Zer0 Advanced Weather and MAWS (v.1.2 or higher)

  • Much more!




Screenshots
Game
 

Configuration
   



Demo

Here's the demo.



Script

Here's the script.
KK20 addressed a bug in the time advancement calls. That can be found here.



Instructions

Place script below default scripts, and above "Main".

I have created an application to create the scripts as well. It will output the scripts, as well as allow you to use a Window's interface to make the configuration file. It will be much easier for to configure for those who are unsure of how to properly set up the script.
It can be downloaded here:

CCTS Configuration App (1.33 MB)

The configuration application requires that you have Microsoft's .NET Framework 2.0 (22.96 MB) installed to work. Most users with modern PCs will likely have this on their systems already. If you need to download the framework, I would suggest that you download Microsoft's .NET Framework 4.0 (49.27 MB). It is a larger download, but offers the same features as 2.0 and much more.

See script for the big evil instructions if you choose not to use the configuration program.



Compatibility

High probability of issues with scripts that try to change the screen tinting and weather. This system will likely totally override any script that even thinks about it.



Credits and Thanks


  • ForeverZer0, for the script.




Author's Notes

Please report any bugs/issues/suggestions. I will be happy to fix them.
Enjoy!
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

Post is a bit messed up. Not sure if you noticed. Try using pastebin.com paste your scripts there. Then link them here. Which is probably whats causing the problem.

ForeverZer0

Quote from: game_guy on May 12, 2010, 06:35:26 pm
Post is a bit messed up. Not sure if you noticed. Try using pastebin.com paste your scripts there. Then link them here. Which is probably whats causing the problem.


No, I didn't notice. Thank you.
I seem to always mess these things up  :wacko:

All better now.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

There we go, ATES just went down the drain. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

ForeverZer0

Quote from: Blizzard on May 12, 2010, 07:13:54 pm
There we go, ATES just went down the drain. xD


Was ATES ever finished?
I used some it for inspiration for the use of switches and what not.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

WhiteRose

Fantastic as usual, however, if you open and close the menu, the clock disappears.

ForeverZer0

Quote from: WhiteRose on May 12, 2010, 09:26:14 pm
Fantastic as usual, however, if you open and close the menu, the clock disappears.


Yeah, I was being lazy. I'll fix that and update here soon.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Wizered67

if this had a plug-in for rmxos to make it global like ATES does, I would so use this!

ForeverZer0

Quote from: Wizered67 on May 12, 2010, 10:56:25 pm
if this had a plug-in for rmxos to make it global like ATES does, I would so use this!


To be honest, I haven't messed with RMX-OS yet, I might include that once I experiment around with it a little.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

Alton Wyte

What coding would I use to show the time and date in the playtime window instead of the playtime? I had it working with ATES but this is so much better so I had to switch.

ForeverZer0

Quote from: Alton Wyte on May 13, 2010, 05:23:57 pm
What coding would I use to show the time and date in the playtime window instead of the playtime? I had it working with ATES but this is so much better so I had to switch.


I'll include that in the next update. I didn't think of that.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

You should totally make a RMX-OS plugin for this so people don't have to put up with ATES anymore (since it was never really finished).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


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

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

ForeverZer0

May 19, 2010, 05:58:52 pm #13 Last Edit: May 19, 2010, 07:58:12 pm by ForeverZero
Quote from: Blizzard on May 14, 2010, 06:14:46 pm
You should totally make a RMX-OS plugin for this so people don't have to put up with ATES anymore (since it was never really finished).


Not really familiar with RMX-OS. If somebody could create one for me, I'd be happy to include it, with credits, of course.

On a side note, I found one minor issue. The debugger has an attr_reader that has to be with the system, not just the debugger. I havn't changed the download yet, but all you have to do is add this:

attr_reader :speed_frozen


...with all the other attrs of the Time_System class. It works fine if you use the debugger, but if you erase that, the system will freeze. Sorry! :P

Also, if you would like the 'playtime window' on the menu to display the time, and not playtime, place this anywhere below Window_PlayTime.

Spoiler: ShowHide
#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
#  This window displays play time on the menu screen.
#  It doesn't do this no more.
#  It will now display the current time of CCST
#==============================================================================

class Window_PlayTime < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   @minute = $game_system.time.minute
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 120, 32, 'Time')
   hour = $game_system.time.hour
   @minute = $game_system.time.minute
   text = sprintf('%02d:%02d', hour, @minute)
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, text, 2)
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   super
   # To make time pass on the menu, erase the ## from the following line.
   ##$game_system.time.update  # <---
   if @minute != $game_system.time.minute
     refresh
   end
 end
end
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Agckuu Coceg

Not a new version ATES? No way! I'm fan of ATES!!!  :haha:

About script: FZ released a new toy for makers. And again + + +
I'm not retarded, but I'm busy. Sorry for patience.


Shining Riku

May 21, 2010, 04:53:38 pm #15 Last Edit: May 21, 2010, 05:18:36 pm by Shining Riku
How do I make it so a certain climate rains 100% of the time?

I set everything up fine but I don't have any weather. at all.

Checked the true/false things and everything. There's no reason for it not to work : /

EDIT: My new climate doesn't work at all. The tinting is ignored, weather is ignored, only thing that works is the time passage speed.

RE-EDIT: Fixed the tinting

EDIT: I'm sorry.....Finally understand how EVERYTHING works and why so I got it figured out now.

CountVlad

I love this script! It's way better than my Event based one.
Is there a way to set a variable to store the date (just the day number) in? It's just that I need to process a common event once a day and I can't think of anything else that would work. It was simple with my event system, but now I have no idea how to do it.

Shining Riku

Unfortunately I looked at the script and I didn't see a way to set up something like that.  :P

Maybe you could PM ForeverZer0 about the script?

ForeverZer0

Quote from: CountVlad on May 23, 2010, 05:00:12 pm
I love this script! It's way better than my Event based one.
Is there a way to set a variable to store the date (just the day number) in? It's just that I need to process a common event once a day and I can't think of anything else that would work. It was simple with my event system, but now I have no idea how to do it.


If mean just the date, like 1-31, use...
$your_variable = $game_system.time.day
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Agckuu Coceg

Incidentally, this method $game_system.time. is the biggest problem. A similar method .time is used in many scripts that call to them incompatible with your script. Take a note about this.
I'm not retarded, but I'm busy. Sorry for patience.