[XP] Complete Climate and Time System (CCTS)

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

Previous topic - Next topic

ForeverZer0

It depends how you configure it, You can do whatever you please with the tints, and set the target tint for each hour of the 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.

Vexus

I'm using the one in the demo didn't edit much as I have few experience with scripts didn't want to make it wrong.

So which line exactly is the night tint if you don't mind?

Also does the advanced weather inside the demo work randomly like the climate or only with a script call?

Thanks.
Current Project/s:

ForeverZer0

The demo setup is simply a generic setup that provides some very basic climates. The line that changes it is going to depend totally on the config. I suggest reading the instructions in the script, or using the included configuration program, which will hopefully take a lot of the confusion out of it. I admit the config is not the most user friendly thing in the world, which is my reason for making the small app.
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.

Vexus

January 04, 2012, 10:02:22 pm #203 Last Edit: January 06, 2012, 09:12:25 am by Vexus
I'm having some weird problems with the script :S

1 - The biggest problem is I am starting infront of a house and the weather is clear, if I enter and exit the house (Once or twice) it starts raining. When it's already raining and I enter/exit the house again it starts raining heavily.

Any idea what's the problem here?

I configured the maps and obviously inside houses they are set 1 as indoors but why is it updating most of the times when I exit a house?

Any idea what could be my problem for these errors?

Thanks.

[Edit]

Nevermind the tinting problem seems to have been fixed putting the advanced script over the climate instead of under it.

Still 1 tiny problem I'm having is that I test the game and it's sunny then when I enter a house a go out it starts raining BUT if I remain outside it won't start raining so fast.
Current Project/s:

Trollses

Hey!
Everytime i try to use the * time.change_speed() command i get an: "SyntaxError occured while running script."
I have tried everything but i cant seem to get it to work :( I'm a noob at scripting though:P

Poe

January 07, 2012, 01:06:00 pm #205 Last Edit: January 07, 2012, 01:08:43 pm by Poe
Quote from: Trollses on January 06, 2012, 04:45:09 pm
Hey!
Everytime i try to use the * time.change_speed() command i get an: "SyntaxError occured while running script."
I have tried everything but i cant seem to get it to work :( I'm a noob at scripting though:P

remove the * and it'll work.


ForeverZer0, is it possible this system conflicts with fog graphics? i added a fog graphic of clouds to the advanced weather system, using $game_map.start_fog_opacity_change() to make them transition smoothly, then a boolean to true so it doesn't keep changing the opacity every update. when the weather ends, it again uses $game_map.start_fog_opacity_change() to fade the graphic out until it's invisible. if new weather starts right away, it keeps the graphic instead of defining a new one.

the problem is after a couple weather changes, the screen tone becomes increasingly bright until there's only a white glare.O_O fog opacity has nothing to do with screen tone does it? any ideas what is causing this?

Trollses


Vexus

How would I go on making a switch go off when a day has passed?

I'm making an inn in my game and I want to make it that the room you rent lasts you a whole day before having to rent another room.

I tried using that variable for the day but have no idea how to make it work for this type of event.

In my game a day lasts 24 minutes (IRL) but I need it that the room keeps rented to you till day switch is switched on again. (But the thing is that the inn is open 24/7 so you can rent a room during the day when the day switch is on resulting in a simple conditional if switch is on useless.)

Current Project/s:

ForeverZer0

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.

Vexus

In a conditional branch?

Say:

If hour variable is equal to xxx?

I started using variables today lol have very basic knowledge on them (Tough managed to make randomise room between 1 to 5 for your character)
Current Project/s:

ForeverZer0

Yes, for instance, say you don't want the player to be able to sleep at an inn until 16 hours have passed since his last visit. Create a variable, called "Inn Wait" or whatever. Then, in the end of the sleeping event, have set the variable to something like this:

Script:
(time.hour + 16) % 24


This will add 16 hours to the current time, and then take the remainder of it after being divided by 24. That will ensure that is always an actual hour of the 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.

Vexus

Current Project/s:

Poe

January 08, 2012, 03:06:32 pm #212 Last Edit: January 08, 2012, 04:12:40 pm by Poe
i think i figured it out, but it's not something i did, it's in your demo as well.:/ if you let it run for a couple hours, the screen tone will have completely turned black or completely white. according to my observations, my guess would be that if new weather follows directly, instead of fading out and returning to 0 weather, the tint is added/substracted again without resetting the screen to the original tone first.

it's hard to believe no one noticed this before, especially after being out there so long...could you please check this?

Vexus

January 08, 2012, 03:55:46 pm #213 Last Edit: January 09, 2012, 12:57:22 pm by Vexus
Well no one I know would run a demo for an hour or 2 so they wouldn't find out about the tinting.

I tried it on my project and in the night it gets very dark almost black on trees at around 2-4 am didn't check it during the day.

[Edit]

Fixed it.
Current Project/s:

Poe

January 08, 2012, 04:12:11 pm #214 Last Edit: January 09, 2012, 02:42:54 pm by Poe
i meant ingame hours lol. but yeah that makes sense.

this is how it looks if you start the demo time on 19h:
Spoiler: ShowHide


and this is how it looks after it's been running since 14h:
Spoiler: ShowHide

ForeverZer0

I'm gonna fix the errors in this script once and for all. It will likely be a complete re-write, because I have some ideas that will make it much more modular and efficient, while maintaining nearly all the same features and power.  Looking back now, how I implemented the tone changing is quite ugly, and it bugs me. I'll likely make a new config program as well, and improve upon that as well. The config program was my very first C# app, so needless to say I have learned quite a bit since then.

Not quite sure when I'll get the time to do it, but I should manage to squeeze it in between other things throughout the next week or so, so be ready for the all new 2.0 version. 8)
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.

Poe

in that case, there's also something strange going on using it with advanced weather and setting variations. at the end of the weather, it switches to the "0 variation" for a bit. ie white sparkles weather becomes blue sparkles for a couple seconds before ending. not sure if this is due to the ccts but that's where i've seen it happening. just thought i'd put it out there:p

i'm glad you're redoing this. i learn by looking through scripts to see how they do things, i found this a bit messy and hard to understand what i was looking at, at times, especially the tinting parts.

ForeverZer0

The problem with the tinting is its a bit too precise, more so than it has to be or that makes any significant difference. I sacrificed too much efficiency without getting a lot of benefit, but  I devised a new method that allows for nearly the same smoothness of transition, but is many times better on performance. Instead of every frame calculating tint, I chose to simply limit hourly transition periods to 10 seconds, and use built-in methods to actually make the change.
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.

TheCableGuy

Could anyone tell me why the Time/Date isn't being displayed on the Digital Display? Would display in neither the Demo nor my project.


ForeverZer0

The font needs set to a different face. I believe it is set to Calibri, which you must not have installed.
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.