Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
82
First Language
English
Primarily Uses
Assuming you're using a new project and not the demo as a base(demo works fine), by default unless you changed some options, time should only stop under the following conditions.

Map/Tileset has the <stop_time> notetag

Switch 1 is On/True

A game_message is displayed

An event is activated

There are similar rules for tone changes and weather showing.  Not knowing how exactly you set up your project I don't know what could be causing your problems.  Best case scenario I can think of is Variable/Switch ID conflicts since you mentioned Yanfly's scripts, Make sure each script's designated Switches/Variables do not clash.
 

Tomigutt

Warper
Member
Joined
Mar 1, 2014
Messages
4
Reaction score
0
First Language
Norwegian
Primarily Uses
Hello

First off , the scrips is awesome and has opened up loads of ideas and uses for me.

Being quite new to this however, I ran into a roadblock :

I did not start a new project, but tried to incorporate this into my existing one.

Everything went really well until I playtested it. The clock runs fine, but I just can't seem to "control" the day night cycle according to the clock.

I used the demo from Steam ( very nice ) 

When I "copied" the variables ( Selchar hour (V) " etc, i entered these into the 0061-0080 series (in case that matters?)  I tried to make an activateable event to force the time to another hour, but I can't seem to "make contact" with the clock.

I just can't seem to grasp any differences between the script,variables,vommon events and switch from the demo to my game. except for the variables/switch/common events to be in other lines as my 001 and 002 etc was taken already.

Hope this makes sense, I'm sure its all me.. I just cant see where.

*edit*

I tried making a new project, that worked fine. could make events and change the clock all over the place.

It does not even work to press F9 and change the variable on the clock on my original project, or rather.. it works, just have no effect.

My "Hour" Command just does not do anything.

*edit*

Ok, tried to copy all variables into the same positions on my new poject as in the one where it doen not work.

Could not duplicate the error.
 
Last edited by a moderator:

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
82
First Language
English
Primarily Uses
If I understand what you said correctly, then I think know what you're doing wrong.  Scripts that incorporate switches/variables require you to edit the script to set the ones said script uses to unused ones in your project.  Near the top of my calendar script you should see...

module HM_SEL #What variables will be used MIN = 1 #Minute Variable HOUR = 2 #Hour variable, actual/military time. 0 = 12 AM, 13 = 1 PM DAYA = 3 #Day of the Week variable, 1 for Monday, 7 for Sunday DAYB = 4 #Day of the Month variable, you can find a use for it I'm sure. DAYC = 5 #Day of the Year variable, used for festival day checks. MONTH = 6 #Month Variable YEAR = 7 #Year Variable WEATHA = 8 #Current Weather WEATHB = 9 #Tomorrow's WeatherThese are the default settings, it says minute is reserved for variable 1, hour is reserved in variable 2, etc...  If you wanted them to be reserved in say 61+ variables, then you would change these lines in the code to be...

module HM_SEL #What variables will be used MIN = 61 #Minute Variable HOUR = 62 #Hour variable, actual/military time. 0 = 12 AM, 13 = 1 PM DAYA = 63 #Day of the Week variable, 1 for Monday, 7 for Sunday DAYB = 64 #Day of the Month variable, you can find a use for it I'm sure. DAYC = 65 #Day of the Year variable, used for festival day checks. MONTH = 66 #Month Variable YEAR = 67 #Year Variable WEATHA = 68 #Current Weather WEATHB = 69 #Tomorrow's WeatherLet me know if that was your problem.
 

Tomigutt

Warper
Member
Joined
Mar 1, 2014
Messages
4
Reaction score
0
First Language
Norwegian
Primarily Uses
That is so awesome :)

Thank you for your time and effort ! Problem solved !

Now I am going to make sweet make up love to your script ^^

*edit*

Ok, guess I was getting some mixed signals, the clock workes like a charm now, I can control the hour.

However, the day /night cylce does not seem to be following the idea.

i start at 6am, it turns dark at 7am .. and just sort of stays that way throughout the day.

The crickets and the lights follow the time, but the light just goes its own path..

Are there more places that I should change some variables? I think I understand enough that the issue is with my common events.

my common events are from 004(afternoon) to 011(resume) 

I guess this mess it up, but I just can't see where i change it.

Sorry for being such a mess up.

*edit*

Sorry, I got it ..  it was the #Hour => [Minute, ID], I had to change the ID 
 
Last edited by a moderator:

tommy61157

Warper
Member
Joined
Mar 7, 2014
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Assuming you're using a new project and not the demo as a base(demo works fine), by default unless you changed some options, time should only stop under the following conditions.

Map/Tileset has the <stop_time> notetag

Switch 1 is On/True

A game_message is displayed

An event is activated

There are similar rules for tone changes and weather showing.  Not knowing how exactly you set up your project I don't know what could be causing your problems.  Best case scenario I can think of is Variable/Switch ID conflicts since you mentioned Yanfly's scripts, Make sure each script's designated Switches/Variables do not clash.
How do I check for variables and Switch ID's and what are they exactly? Sorry, I'm brand new to all this.
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
82
First Language
English
Primarily Uses
Check the configuration for each individual script, I posted the main variable portion for my calendar up above for the other person, tho there are a few more settings immediately after such as...

STOP_TIME = 1

NO_TONE = 2

INSIDE_SWITCH = 3

DISABLE_WEATHER = 4

 

These are the default switch settings.  If you turn switch 1 On, then time will stop,  If I changed STOP_TIME = 1 to STOP_TIME = 61, then turning on switch 1 won't do anything(where this script is involved), but switch 61 will set time to stop.  It's important to know what switches/variables the scripts you use set aside so that you don't accidentally change something unnecessary while setting up your events.

Not knowing what Yanfly scripts you're using, I can't give you exactly what you need, same with how you're using your events.  Just remember to read a script's instructions so that you don't miss small details like this.
 

Paladin Ramos

Warper
Member
Joined
Apr 6, 2014
Messages
3
Reaction score
8
First Language
Portuguese
Primarily Uses
Hello, im relative new to scripts but im managing to get by, however...

I'm having trouble with the hour_range script call and my objective is fairly simple..... Shops business hours! While the result is false theres no problem, but once its true... for some reason i'm geting a "Script 'Game_Interpreter' line 450: TypeError ocurred. can't convert true into integer".

Now im wondering if im calling the code right, i use an event (door) with a conditional branch calling the script with the exemple presented - HM_SEL::hour_range(9, 21). Is this how it's suposed to be? Tried to begin a clean project but it still remais.... so im guessing I am the error.

Can you help me? Thnx in advance.
 

Paladin Ramos

Warper
Member
Joined
Apr 6, 2014
Messages
3
Reaction score
8
First Language
Portuguese
Primarily Uses
Bump!

edit:

I managed to get arround by using common events and switchs, but it would just be simpler to use and "if true" sentence, so my call for help stil remains.
 
Last edited by a moderator:

cfoolz

Warper
Member
Joined
Apr 18, 2014
Messages
1
Reaction score
0
First Language
english
Primarily Uses
Hi..im new at scripting and i love your calendar script. i also have made a simple bank event and i am trying to add a interest system where if you had  X amount in you bank  you would get X amount of gold every week or month...or both. please help i have been trying to make this and have had no luck

game freezes every time. thanks
 

AnchyMorgan

Warper
Member
Joined
Feb 27, 2014
Messages
2
Reaction score
1
First Language
English
Primarily Uses
How do I make festivals? I'd be interested in knowing how.
 
Last edited by a moderator:

namelessCiel

Villager
Member
Joined
Jun 29, 2014
Messages
6
Reaction score
0
First Language
Spanish
Primarily Uses
Is there a way to make it so that the game warps you to a different map depending on the time of the day? Similar to how time is handled in Ocarina of Time; when you arrive at night you see a night version of the town where time is frozen. When you get out and back in during the day you'll see the day version.

Yet more ambitious, is it possible for different troops to appear depending on the time of the day?
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
For someone being really new and hearing all about switches.

  STOP_TIME = 1

  NO_TONE = 2

  INSIDE_SWITCH = 3

  DISABLE_WEATHER = 4

 

Where and how do I add one of these switches to a Map? Do they conflict with other scripts that might have switches 1-4?


Any and all information would be wonderful. 

 

 

EDIT: Also to make life simple. How can I make fresh games start at like 8am rather then midnight? For testing it gets a bit annoying :)

Solved: $game_variables[HOUR] = 8 # set start time. (With all the other variables)

 

 

Edit 2: Also I guess while I am at it.. Trying make script that you can go to sleep but it has to be during the night and not the day time. So people not skipping days left and right none stop. 
 
Last edited by a moderator:
Joined
Jun 22, 2014
Messages
2
Reaction score
0
First Language
English
Primarily Uses
Having placed this script in my game, every time the opening map begins (there is a blank, black map before for naming your character and for opening story stuff), I am getting this error:

Script 'Weather and Seasons' line 311: NoMethod Error occurred.

undefined method `[]' for nil:NilClass

Below are lines 302 through 311. I am a noob, and therefore utterly clueless as to what I should do.

 def self.show_weather(dura = 300)

    unless no_weather?

      temp = WEATHER[$game_variables[MONTH]]

      unless inside?

        case $game_variables[WEATHA]

        when 1  #Sun

          $game_map.screen.change_weather:)none, 0, dura)

          Audio.bgs_stop

        else

          $game_map.screen.change_weather(temp[1], 5, dura)
 

Dafrag

Warper
Member
Joined
Aug 18, 2013
Messages
1
Reaction score
0
First Language
German
Primarily Uses
Okay, i'm making a nice Intro but the Clock(ADDON) is still visible on my Intro! How i can hide/toggle the Clock without pressing a button ?¿
 
Joined
Jul 7, 2014
Messages
1
Reaction score
0
First Language
English
Primarily Uses
I have a major issue, the game that I am working on relies heavily on the atmosphere of the natural surroundings. This means that almost every map has some kind of background sound that plays automatically. My issue is that the moment I installed this script into my game it will no longer automatically play those BGMs. Why is that and how do I fix it?

BTW thanks for the response in advance and Great Script!!(minus my one issue)
 

Martin923

Warper
Member
Joined
Jul 28, 2014
Messages
2
Reaction score
0
First Language
Hungarian
Primarily Uses
  FESTIVALDAYS = {
  #Day => Variable,
  1 => 0,
  2 => 0,
  }#Please do not remove

What this does? I can't really understand.
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
82
First Language
English
Primarily Uses
#Used to determine if the currend day is flagged as a festival. 0 means it's

#a normal day, and you can set different values for different days in the

#FESTIVALDAYS hash below.

FESTIVAL_VAR = 22

The hash you posted is used alongside this variable that's set aside

FESTIVALDAYS = {

#Day => Variable,
1 => 0,
2 => 0,
}#Please do not remove

On the left side of the => is the day in the year. By default there are 4 months and 28 days per month, so if you were to set aside the 3rd day of the 2nd month, it would be

31 => SomeVariable,

Where SomeVariable would be a number that you choose to have the designated variable change to.

In order to actually use it you would use that variable in a conditional branch or multiple conditional branches to multiple days set aside for festivals.  You can have npcs have different text, give them a unique sprite, go to a completely different yet identical for eventing convenience map where you hose the festival(and maybe a game... or not).

That's how it's meant to be used, just an aid to simplify making certain days of the year different or special.
 

Martin923

Warper
Member
Joined
Jul 28, 2014
Messages
2
Reaction score
0
First Language
Hungarian
Primarily Uses
Oh... Ok... It feels like I am an idiot... But I can understand it! Thank you, and keep up the good work!
 

RupamOntherocks

Villager
Member
Joined
Jan 18, 2014
Messages
24
Reaction score
4
First Language
Bengali
Primarily Uses
Can you please make a supporting script which will run the game even if we are not playing the game.. i mean if a crop takes 1hr to grow then it will grow after 1hr even if the game is switched off..just like real time farming games in facebook, android etc...
 
Joined
Jan 23, 2014
Messages
171
Reaction score
24
First Language
English
Primarily Uses
RMMZ
Hello Selchar,

I love your script. I decided to go with it more to Vlue's Advanced Clock. (It was a tough choice) Found here: http://www.rpgmakervxace.net/topic/6145-advanced-game-time/

Here's a couple of my issues, Hopefully it's a fix that can be done.

1.) I was wondering if you can toggle this in the main menu to appear like Vlue has it, near the bottom of the screen.

2.) I would also ask how I would go about tinting the battle screen. (I found that this was actually kind of cool and could couple this with Yanfly's Field States, dark room, if you can't see you get lower chance to attack?)

3.) Changing the position of the clock, the way you have it set is believed to be the default. But what if I want to do 640 x 480. I know there are methods to do this but I don't know the exact. I'll play around with this one with franken-scripting! Solved this one. :)

Also I love the work you do Selchar, along with other scripters. I'm a frankenscripter, but hope to someday make my own scripts!
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Reading about metaverses recently. I can totally imagine myself in the future, logging in with VR glasses to a virtual beach villa sitting in a virtual chair, with a virtual laptop facing the sea...coding 16-bit RM.
Mod name: "[Game name] Gameplay Overhaul"
What they actually mean: "Here is a mod that makes the game harder."
I decided to reinstall one of my most favourite game of all times, Gothic 2. Time to get back to Khorinis!
So much game make... I needs to rest. The foods call.
-Casino with bunnysuit green check.png
1638563168795.png

Forum statistics

Threads
117,171
Messages
1,105,124
Members
153,261
Latest member
balthubu
Top