Advanced Climate

What else do you want to see?


  • Total voters
    181

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
It's not an unconfusing script!


0 isn't for sunny/normal, the numbers you use in the note field of the map, relate to the # of the climate that that map uses. By default, climate # 0 is set up in a normal way and # 1 is set up in a snowy way.


Assuming the error is through the script call, you can't use nil for the second argument, it has to be a number, but if you are making that call from within a map that has a defined climate then you can drop the last to arguments all together and just do a:


Climate_Control.change_weather:)rain)
 

Abichann

Warper
Member
Joined
Jul 26, 2013
Messages
3
Reaction score
1
First Language
English
Primarily Uses
Thank you! It worked like a charm :D
If you wouldn't mind clarifying a few thin
gs for me, just to be safe? :) I would greatly appreciate it.

AC_WEATHERS = { 0 => [   (This is for normal climates, including raining during Spring, Summer, and Fall, and snowing in Winter.)

      [:none, 0, nil, 6000, 12000, 40, nil, nil],

      [:rain, 5, "Spring", 6000, 12000, 30, ["Rain",100,100], ["Rain",75,100]],

      [:rain, 4, "Summer", 6000, 12000, 30, ["Rain",100,100], ["Rain",75,100]],

      [:rain, 6, "Fall", 6000, 12000, 30, ["Rain",100,100], ["Rain",75,100]],

      [:storm, 6, "Spring", 6000, 12000, 10, ["Storm",100,100], ["Storm",75,100]],

      [:storm, 9, "Summer", 6000, 12000, 10, ["Storm",100,100], ["Storm",75,100]],

      [:snow, 3, "Winter", 6000, 12000, 30, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 10, nil, nil]

      ],

                1 => [   (This is for snowy maps? Since snowing during winter is possible by using the normal climates?)

      [:none, 0, nil, 6000, 12000, 10, nil, nil],

      [:snow, 3, nil, 6000, 12000, 5, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 1, nil, nil]

      ]

              }                 

 

And it is completely random; I don't have to worry about setting which days to do what? Or if I want to set the probability for it to rain more on a certain day(or in general), would that be possible? Do I have to set something up so it would know which season it was; if a season ends after 30 days, would I need to use an event to specify that the previous season had ended? Also if you could explain nil to me; does it stand for something?  >.<  Sorry for my ignorance to these things. Thank you so much for all your help!
 

Lamsah

Villager
Member
Joined
Jun 2, 2013
Messages
26
Reaction score
5
Primarily Uses
If you don't mind me answering this one Vlue since i am using your "ingenious" climate script =D

And it is completely random; I don't have to worry about setting which days to do what? Or if I want to set the probability for it to rain more on a certain day(or in general), would that be possible? Do I have to set something up so it would know which season it was; if a season ends after 30 days, would I need to use an event to specify that the previous season had ended? Also if you could explain nil to me; does it stand for something?  >.<  Sorry for my ignorance to these things. Thank you so much for all your help!
I think what your confused about is that the script uses climate numbers to control each map settings. 

For example of your post:

                1 => [   (This is for snowy maps? Since snowing during winter is possible by using the normal climates?)

      [:none, 0, nil, 6000, 12000, 10, nil, nil],

      [:snow, 3, nil, 6000, 12000, 5, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 1, nil, nil]
You see above where  1 => [   is?

The number 1 is what you put on the map to use those climate you provided on 1 which i see that you have snow with power of 3 and another snow of power of 9. So, to use this, heres what you put on the map notetag C=1

So now, when you enter the map with notetag of C=1  the map will only use the climate you provided in number 1. Since you have put it for "Winter" usage only, then that map will only wait tell "Winter" season before it will execute to use those climate you provided on the map with C=1. So with these settings, it will continue to use the above setting for that map only with the number 1 climate, however, you cannot do like change weather when using call script of: Climate_Control.change_weather:)rain)  the map provided with number 1 settings that does not have :rain climate in it cannot change weather of rain. Enable to make the Climate_Control.change_weather:)rain)  true, then you will need to add :rain settings in the number 1 climate so you may be able to change the map weather with the map notetagged C=1.  

You can however have different days to play different weather as long as you have those weather you want to run are placed on the climate numbers for example: 

Say you want certain day like Monday to rain on your above provided settings....

then what you do is change your 1 => [    to this below

                1 => [   (This is for snowy maps? Since snowing during winter is possible by using the normal climates?)

      [:none, 0, nil, 6000, 12000, 10, nil, nil],

      [:rain, 3, nil, 6000, 12000, 5, ["Rain",75,75], ["Rain",25,75]],

      [:snow, 3, nil, 6000, 12000, 5, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 1, nil, nil]

      ]

Now when you place C=1 in the map notetag, you can now change the weather with a script call of Climate_Control.change_weather:)rain) 

It will now rain because you provided Climate 1 which is referred to as C=1 in the map notetag with a "rain" weather. To change it to rain on Monday on that particular map with the notetag of C=1

GameTime.day_week? == 1       <---- which the value for one i believe is Monday and value of 0 is Sunday i believe but i havent checked it but i believe value of 1 is for Monday.

So when you have that for conditional branch set, then put Climate_Control.change_weather:)rain)   in the true area. I think your gonna have to use parallel process trigger so it will not be overwritten by the climate provided on the map but thats that! Hope that helped. XD

EDIT1:

OPPPS, sorry, i forgot to mention that you cannot do a script call of GameTime.day_week? == 1   if your not using Vlue's time system script LoL!  Phewww.... hope that clarifys any error you get if you dont use his time script which is veeeeery critical to get a real control of "Realistic" environment =P

EDIT2:

OOPPS again, (slaps own face), you asked what "nil" means, well, that means its not using anything. for example:

I have added       [:rain, 3, nil, 6000, 12000, 5, ["Rain",75,75], ["Rain",25,75]],  to your new climate but now it doesnt have "nil" on it. Well, thats because you are now using a sound to go with the weather aside from having it "nil" which means nothing is being used.  rain 75,75 means that its being used when you tag a map with C="whatever climate goes here ex: C=1"   when you provided a map tag of

C=1

inside

this means that it will use the second background sound which i have provided Rain 25,75. The first value 25 means the volume control and the 75 is the pitch of the sound. Hope that makes some sense, LoL.  Okay, i think i explained everything =D
 
Last edited by a moderator:

Abichann

Warper
Member
Joined
Jul 26, 2013
Messages
3
Reaction score
1
First Language
English
Primarily Uses
Thankyou so much Lamsah! That cleared it up! You guys are amazing :)
I really appreciate how helpful you all are to someone as novice and ignorant to scripting as I :D
 

Oniro

Warper
Member
Joined
Jul 29, 2013
Messages
4
Reaction score
0
First Language
French
Primarily Uses
Hi Vlue, i need to say that your scripts are awesome!
Now the reason why i'm here: I want to disable rain/snow inside my buildings. \!/NOOB ALERT\!/ And i don't know how to do that. Some help?
 

Lamsah

Villager
Member
Joined
Jun 2, 2013
Messages
26
Reaction score
5
Primarily Uses
Hi Vlue, i need to say that your scripts are awesome!Now the reason why i'm here: I want to disable rain/snow inside my buildings. \!/NOOB ALERT\!/ And i don't know how to do that. Some help?
Just simply do a script call:

Climate_Control.change_weather:)none)

OR

you can put whichever climate you plan in using for your map to be tagged on the notetag with C=?

For example in the script editor where you will find this:

AC_WEATHERS = { 0 => [

      [:none, 0, nil, 6000, 12000, 40, nil, nil],

      [:c_rain, 5, "Spring", 300, 900, 100, ["Rain",100,100], ["Rain",75,100]],

      [:c_storm, 25, "Spring", 600, 900, 100, ["Rain",100,100], ["Rain",75,100]],

      [:rain, 6, "Fall", 6000, 12000, 30, ["Rain",100,100], ["Rain",75,100]],

      [:storm, 6, "Spring", 6000, 12000, 10, ["Storm",100,100], ["Storm",75,100]],

      [:storm, 9, "Summer", 6000, 12000, 10, ["Storm",100,100], ["Storm",75,100]],

      [:snow, 3, "Winter", 6000, 12000, 30, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 10, nil, nil]

      ],

                1 => [

      [:none, 0, nil, 6000, 12000, 10, nil, nil],

      [:snow, 3, nil, 6000, 12000, 5, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 1, nil, nil]

      ]

              }

 

Notice the blue colored values, thats what your gonna put in the map notetag. Example, i will use climate 0 then i place this on the notetag C=0   if i wanna use the climate 1 then tag the map note with C=1

 

The script call i provided up top which is Climate_Control.change_weather:)none)  means that you will manually change the weather to nothing. However, you can still use the weather sound if your map is made for the purpose of a building. For example, you want to use climate 1 for your map which is made for the purpose of a building then you need to tag your map with:

 

C=1

inside

 

Now, what will happen is that it will use climate 1 sound effects but you will not see the weather. However, there is one thing that you must take into mind, when i said that you can use a script call of  Climate_Control.change_weather:)none) to change the weather to clear or nothing, you must have the clear or nothing weather which is referred to as  [:none, 0, nil, 6000, 12000, 10, nil, nil],

the red color font that calls it clear to be set in the climate. Persay, if i wanted to make my custom climate of 2 since 0 and 1 is already taken, i would simply make these settings:

 

 

  2 => [

      [:snow, 3, nil, 6000, 12000, 5, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 1, nil, nil]

      ]

 

Notice on my setting in climate 2 that it doesnt have :none on this setting which means if i tag my map with C=2 on the notetag then i cannot do a script call of  Climate_Control.change_weather:)none) on that map thats tagged C=2 because there i did not include the :none weather which is referred to as clear or nothing. So, in conclusion, if you want to change the weather effects to rain, storm, or snow you have to make sure you include them in the climate. Well, i hope that clears that confusion.  :D

 

I'm using Vlues climate so i have a slight idea on how to answer these questions   :rock-left:   :rock-right:

 

EDIT1:

 

OPPPS, i forgot to mention that when adding an extra climate like i had mentioned up above which is:

 

  2 => [

      [:snow, 3, nil, 6000, 12000, 5, nil, nil],

      [:snow, 9, "Winter", 6000, 12000, 1, nil, nil]

      ]

 

In able for me to use the setting number 2, i must change the AC_CLIMATES = 2 thats on the script to AC_CLIMATES = 3 since there is now 3 climates on the setting which are 0,1,2 equals 3 value. If you dont change the AC_CLIMATES =  it will cause an error at start. So, hope that clears the error that may occur if you add an extra settings  :rock-left:   :rock-right:
 
Last edited by a moderator:

Oniro

Warper
Member
Joined
Jul 29, 2013
Messages
4
Reaction score
0
First Language
French
Primarily Uses
Thanks Lamsah for that quick answer!
 

RetroSoldier

Villager
Member
Joined
Jul 17, 2013
Messages
26
Reaction score
5
First Language
English
Primarily Uses
Quick problem. It seems when I use this script, any BGS I set through a map's Map Properties menu will start up for one second, and then suddenly go quiet.

I *can* still activate BGSs through events without issue so this is easily worked around, but I thought I'd get this issue out there anyway.  

(I have also confirmed that it's only this script, as I've found that it's repeatable with Advanced Climate being the only custom script in the game.) 
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Indeed! Updated the pastebin to work around that and not explode. Hopefully not explode.
 

Lamsah

Villager
Member
Joined
Jun 2, 2013
Messages
26
Reaction score
5
Primarily Uses
Quick problem. It seems when I use this script, any BGS I set through a map's Map Properties menu will start up for one second, and then suddenly go quiet.I *can* still activate BGSs through events without issue so this is easily worked around, but I thought I'd get this issue out there anyway.  
Hmm, i wonder whats causing that issue. I am too using this script but i never had my BGS do that. Thats very weird i tell ya  :p

Indeed! Updated the pastebin to work around that and not explode. Hopefully not explode. 
I hope it won't explode on me when i plug in the new update >_>
 

gecebd

Villager
Member
Joined
Oct 6, 2012
Messages
16
Reaction score
0
First Language
French
Primarily Uses
Hi,

How can I do if I only want the climate to be outside ? I don't want the rain when I'm in my home, haha !
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
Right click said inside map and go to properties, then just put

inside

in the note box there. Then that map will have no rainy rain effects.
 

gecebd

Villager
Member
Joined
Oct 6, 2012
Messages
16
Reaction score
0
First Language
French
Primarily Uses
ok, great, thank you very much !
 

SilhouetteNoir

Villager
Member
Joined
Sep 22, 2012
Messages
15
Reaction score
2
First Language
English
Primarily Uses
how about lightning flashes while storming?
 
Last edited by a moderator:

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
You can run a parallel process common event with a conditional branch to check if it's storming, then playing lightning flashes if it is, with a few waits thrown in there to set them apart. Can be all

Climate_Control.current_weather == 2

(or whatever number storm is) in the conditional branch's script check.
 

Roxas162

Game Designer
Veteran
Joined
Sep 19, 2013
Messages
33
Reaction score
1
First Language
English
Primarily Uses
Hey Vlue when you were talking about the Battle Tint for the Day/Night what line is it on?

I have bad eyesight and i can find it.... ;_;
 

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
The option to turn tinting in battle on/off is on line 130
 

Roxas162

Game Designer
Veteran
Joined
Sep 19, 2013
Messages
33
Reaction score
1
First Language
English
Primarily Uses
thx but why cant i use script calls to bring forth the weather?
 
Last edited by a moderator:

Vlue

Talent Extraordinaire
Member
Joined
Mar 13, 2012
Messages
589
Reaction score
378
First Language
English
Primarily Uses
It does explain under usage how you can change the weather using a script call, the short of it is however:


Climate_Control.change_weather:)weather,duration(optional),climate(optional))


For example, to change the weather to rain, for 18000 frames, for the climate on that map, the script call would be:


Climate_Control.change_weather:)rain,18000)
 

Roxas162

Game Designer
Veteran
Joined
Sep 19, 2013
Messages
33
Reaction score
1
First Language
English
Primarily Uses
I tried that..and it didn't work. That's why i posted
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,867
Messages
1,017,062
Members
137,575
Latest member
akekaphol101
Top