[XP] Advanced Time and Environment System

Started by fugibo, March 09, 2008, 11:08:36 pm

Previous topic - Next topic

stripe103

I don't think that is possible to do. So it is either a parallel common event or a script that checks instead of the common event. It may be less laggy, but I'm not sure. That would be a script like this

# The id for the common event that is going to start
EVENT = 1
class Scene_Map
 alias :ori_update :update
 def update
   if $game_system.ates.time.hour == 0 && $game_system.ates.time.min == 0
      common_event = $data_common_events[EVENT]
      $game_system.map_interpreter.setup(common_event.list, 0)
    end
   ori_update
 end
end

I don't know if it works, but I think it does. But I don't know if it is less laggy.

happyman

I realized that my game isn't laggy because it's constantly checking for midnight. It's laggy because I have too many parallel common events running at the same time (Just 3, but apparently that's enough).

So, about this bit of script you posted...  I knew it would be just a few lines, and it looks good.  Would this be an entirely new script (that I post under MAIN), or do I plug it into the ATES script somewhere?  And if I wanted to call common event number 2 at midnight, what do I have to edit?

stripe103

It should be inserted in a new script section below ATES.
The second line (EVENT = 1) change it into what common event you would like to run.

happyman


ojp2010

I installed the script runs fine. However, I can't get the clock not to show. I am using ATES and the RMX-OS addon for it. Also the screen doesn't change tint from night to day. When the game starts up the screen is tinited for night, but it never changes, anyone help me?

Magus

Okay, maybe this question was asked before, but I can't find it in the thread. (So, I guess it doesn't hurt to ask anyone a simple question; after all, its just a question and its not hurting anything xD)

Question:   Okay, this thing is beyond amazing, however, the counter on the clock is counting by "20's"  I really wouldn't mind slowing down the time. Like maybe have it count by one's or two's. ANYTHING is better than having a "20 second day and 3 second night :/"

I tried increasing the "length" but of course found out that was a bad idea since the counter didn't go beyond 23 and so that idea destroyed night and caused it to flash a strange yellow.

So anyway... I'd rather have  longer times... May I ask of anyone's assistance please? Thanks very much ^_^
LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />

Blizzard

Make sure that you properly configured everything. It seems to me that you didn't configure everything properly. Read the instructions again and see which option does what.
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.

Magus

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 # switch ID of the "day" switch
 DSWITCH = 51
 # switch ID of the "night" switch
 NSWITCH = 52
 # length of a day in seconds in-game, can't be less than 36, is being
 # quantized into intervals of 36 seconds
 LENGTH = 70
 # how much time is it when the "day" starts
 DAY_START = 1
 # how much time is it when the "night" starts
 NIGHT_START = 40
 # makes the screen brighter during "summer" days
 OVERLIGHTING = true
 # makes the screen darker during the night, not recommended
 OVERDARKENING = false
 # display HUD clock
 SHOW_CLOCK = true


^That's how I thought it could be set up, but the 36 rule is absolute, which makes it impossible to have longer days and longer nights
LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />

Magus

I know double posting fails, but I really wouldn't mind having longer days and night: however, whenever I set the length any longer, the game deletes night.
LEVEL ME DOWN. THE ANTI-BLIZZ GROUP IS AMONG YOU... Do it for the chick below...She watches..<br />

RenegadeNick27

i am having the same problem. i have it set up so every second, another minute is added to the clock. (+00:01) but every time i start the clock, the screen fills with an solid yellow tint.

Here are my stats

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  # switch ID of the "day" switch
  DSWITCH = 51
  # switch ID of the "night" switch
  NSWITCH = 52
  # length of a day in seconds in-game, can't be less than 36, is being
  # quantized into intervals of 36 seconds
  LENGTH = 1440
  # how much time is it when the "day" starts
  DAY_START = 320
  # how much time is it when the "night" starts
  NIGHT_START = 800
  # makes the screen brighter during "summer" days
  OVERLIGHTING = false
  # makes the screen darker during the night, not recommended
  OVERDARKENING = false
  # display HUD clock
  SHOW_CLOCK = true


I dont know if i have to change the DSWITCH and NSWITCH. how do i fix this so i can see the game in day and night. :???:

Blizzard

Why do your day and night start at 320:00 and 800:00 hours respectively?
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.

RenegadeNick27

WHAT :^_^': i thought that i should have multiplied them the same amount as i did the seconds/per day. do you thin if i change them back to 8 and 20 it will balance out again?

Blizzard

December 01, 2010, 10:31:25 am #192 Last Edit: December 01, 2010, 10:33:07 am by Blizzard
It should. I set it to hours so it's easier to configure and you don't have to calculate. You can also use 6 and 19 or whatever you like.
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.

crow5derlock

is there a way to change how fast the game minutes go by in the script? :???:


i apologize if this has already been answered but i'm kinda in a hurry.

Andreavnn

April 23, 2012, 10:16:55 pm #194 Last Edit: April 24, 2012, 01:14:11 pm by Andreavnn
I've looked and searched, does the night and day time monsters work with BABS? Sorry to nerco   :facepalm:

*EDIT* Is the time settings real time or game time, there seems to be a lot of discuss about this and I got lost. I am wanting to know because I am going to event random weather condition and fogs for each period and I need to know how long to make the effects last and the wait times.  Unless I am missing something and that can be done with the script. I am still playing with and learning it.

Blizzard

It can be real time if you want to (you just have to configure it properly), but I suggest you use game time. Real time in game never worked out too well since people don't usually spend that many hours playing a game. Also, "real time" doesn't take your PC's actual time, it only advanced like real time i.e. a second in the game takes an actual second in real life (as opposed to e.g. a minute in game takes a second in real life).

Day and night time monsters should work with Blizz-ABS if you use the switches that have been assigned in ATES as day and night switches.
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.

Andreavnn

Okay, sweet that is what I wanted to know. I will have to play with it when I get home from work. Another quick question when I have monster for Day and Night, when night occurs will the day monster "de-spawn" or disappear from the view of the player? Or will they stay on screen just "sleeping" and not attacking or moving?   

Blizzard

That depends on how you implement it. For example, if you want enemies to fall asleep and wake up, you should probably use a common event that inflicts a special "sleep" on all enemies that have certain IDs (i.e. an array of IDs of enemies that sleep during the night) during day and night, depending on the switches. Blizz-ABS has all necessary script calls for you, but it would be good if you asked somebody to put those script calls together as it gets a bit complicated if you want something like this. It's not too difficult, it only requires some careful eventing and obviously the script calls to put a certain set of enemies to sleep or wake them up.
For other enemies, you can just make them vanish. e.g. if you have some ghosts, you can simply put a night switch on them and they will literally disappear during the day. It all depends on how you want things to work.
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.

Andreavnn

April 24, 2012, 02:52:58 pm #198 Last Edit: April 24, 2012, 10:12:18 pm by Andreavnn
Thanks Blizz, once I get my enemies made I will make a request. Of course after I try to mess it all up myself first  ;)

*EDIT* So I am looking at something like this. A common event that checks rather ATES.night? (don't remember the actually commands name) is true if so effect all enemies with ID 1-8 with sleep and switch out their events for enemies ID 8-16 then the new enemies will "spawned" in their place. Their place being the normal start point of the day time monsters. Something along those lines? I am going to differently try to do this on my own first.

I can see why this would take very careful eventing.

**EDIT**

This is what I came up with so far, not much and I've tested it yet. Don't think it is correct anyways. Needs a bit of work still, but I need to get the special commands from BABS.

Event of Map
Spoiler: ShowHide


Common Event
Spoiler: ShowHide


State "Sleep" I named them Night and Day. Night being a state where day monsters are asleep and day being a state where night monsters are asleep.
Spoiler: ShowHide

Blizzard

You don't need the first one. Simply use the switches assigned to ATES.

  # switch ID of the "day" switch
  DSWITCH = 51
  # switch ID of the "night" switch
  NSWITCH = 52


As you can see, by default they are #51 and #52. Obviously you can change that to suit your needs.

As for the second event, in Blizz-ABS you can't inflict a state to an enemy like that. Look up in the manual how it's done.

And you only need one state for sleep during day and night since it does the same thing.
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.