Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

eharper256's Dynamic Time System VERSION 5.1!!

Dynamic Time System
UPDATED TO VERSION 5.1!!
By eharper256


Hello all, this is a EVENT Based Dynamic Time System that I created. It was created to meet my needs for an adaptable time system which weren't catered for by the currently available systems, scripting based or otherwise. I wanted the ability to alter the speed of times flow, like Calderons time, the adaptive weather of punkids system, and, most importantly, the ability to fiddle with the time of day at will without screwups and have it tell other events via a simple switch whether it was Night, or bad weather, or suchlike.

Features
  • Keeps track of minutes, hours, days, weeks and years through easily alterable variables. As a result of this, you can easily implement things like Inns that add 8 hours to the clock, and such...
  • Automatically checks if its night-time; and if it is, pulls a switch. You can have things like shops closing at night and such through this.
  • Set up default values for the time, like the AMS; and reset them to this value at will by a simple switch pull (hey I can do a Majoras Mask with this and return to the beginning, LOL).
  • Change the speed of times flow by altering a variable. This achieves an effect similar to Calderons Time; you can have time speed by quicker when on the World Map, for instance, or go slower in the Snowfield of Death. There are 5 settings for time flow by default (Normal, Fast, Faster, Uber-Fast and Slow).
  • Changes screen tone according to the hour; and changes it differently whenever one is inside, or when the weather is bad.
  • But there is the easy option to Switch the screen tone change off whenever you need to, whilst keeping time flowing in the background. Useful for cutscenes and places with unusual light conditions.
  • Support for Ccoa's Weather. Checks the weather every hour of game time based on Seasonal evaluation.
  • Much, Much, Much better weather support in version 2! The weather change is no longer quite so random; but more reliant on seasons and their individual likelihood of generating high/low pressure fronts. The system can be turned off at will.
  • Additionally, the weather now works in the same fashion as the tone changer; running then turning itself off every game hour. This has required an additional switch to be added to the line-up, but as a result the whole affair is much more stable and is also less laggy.
  • A final weather based addition: automatic application of appropriate BGS; which stays on (though lessens in volume) when you go inside. This feature is also easy to disable if you want your own BGS.
  • Also, a stupid bug in the demo was quashed. It continued to rain inside because of my lazy event programming before.
  • Much like the night-time check, theres a check for bad weather that pulls a switch. You can have people react differently to bad weather.
  • No big daft clock hangin' around onscreen all the time. I figure that most fantasy characters don't really have digital watches, in any case. ':| As of 5.1, still no big daft clock, HOWEVER, there is a toggle-able time & date window. See below.
  • However, you can tell the time at any time (tongue twister!) by simply calling a common event. This way, your characters can still look at the town clock or use a personal sundial, or something. This clock calling event has support for Dubealex's AMS by default, so the time shows up in a clear text box rather than a message; but if you don't have that, you can remove dependancy on it easily by a quick event modification. (I'm sure its easily changable to Ccoa's UMS as well, but I don't have that)
  • Finally, because of the separated events and conditionals, it does not lag at all. (At least it doesn't on my old laptop, which is a 1.6 GHz Athlon)

Version 3 Adds alot of cool new features!
  • Due to popular demand, I added a feature called FastTone. People didn't seem to like the fact that the tone change was slow when switching between inside and outside. This feature addresses that; it should detect when it is needed, and then make the tone alter considerably quicker.
  • SpecialLight was added. Previously, when you wanted to use a special kind of light not conductive with the typical day/night effect, you would have to apply the Tint Fixer switch and do it manually. SpecialLight addresses this problem by offering a standard library of unique lighting conditions, defined from within the Tint Changing Common Event. Therefore, you can define your special light type there, assigning it a variable value. Then, whenever you need to use that light type, you call upon it in a snap by simply setting the variable to your desired value, flipping a switch and then raising the Tint changing FLAG as normal. The Tint changer will then recognise the need for your Special Light; and it will usurp the typical Day/Night Tint whilst still letting time run and recognising the difference between day and night.
  • Special Light currently has the following default conditions programmed into it: Dark Cave, Sewer, Crystal Caverns (Blue and Purple), Icy Cavern, Fiery Cavern and Forested Canopy. You can add additional types if you have a reasonable proficiency with event programming.
  • Time Based Lighting was added. This basically allows the system to utilise the unique symbiosis of Time and Tint in ways besides the standard day/night cycle. As a result, you can add considerable amounts of atmosphere to your game with very little effort! For example, you can have a eerie dungeon with a pulsating light effect, or have the effects of thunderclaps with lightning flashes without the rain for that mad professors hideout.
  • Time Based Light currently supports the following unique conditions: Slow Strobe Light, Pulsating Light, Intermittant (Flickering) Light, Disco Lights :D , Battlefield effect with explosions, Underwater effect with bubbles, and Lightning Flashes for interiors. If you can think of other effects you'd like, post 'em here and I'll see what I can do.

Version 4 Adds some pretty funky new stuff also!
  • Now using Ccoa's Tileset swap script, the Dynamic Time system can automatically adjust the tileset for you depending on the season! This allows a switch to new tilesets to show the effects of winter, autumn and such more dramatically. In order to utilise this feature, simply adjust the tileset values for seasons in the configuration event. By default, Spring will use the default selected tileset, Summer will add +50 to this number, Autumn will add +100, and Winter will add +150. Hence, if you wanted versions of the RTP grasslands to change season, the spring version would be Database Tileset ID 1, Summer 51, Autumn 101, Winter 151 etc.
  • As mentioned, better customisation was my main goal for this version. To achieve this, the system now makes use of Script Arrays which are fully customisable in the setup event. For example, previous versions didn't recognise the difference between weekdays, and all months were always 30 days long. But no longer! The arrays allow the system to store both important numerical and string related data like the names of weekdays, the lengths of months, etc. without having to use further variables and switches. In a nutshell, this means the system now fully recognises the Date, the Day of the week and the month, and these things are fully changeable to the game-makers needs.
  • By fully customisable, I mean it! You can decide for yourself how many days are in a week, what those days are named in your world, how many weeks are in a month, how many months are in a year, how long each of those months are, and what each of those months is called!
  • As a result of the above change, the Time-Telling common event from before is a little bit more advanced; incorporating a calendar. Hence now when you call the common event that tells you the time, you not only recieve precise information on the time, but also learn what the date, day of the week and month are. Example: "Its 12:31pm! And its Tuesday the 15th of February, 2009!"
  • Another slight change: I've supplied a couple of fogs for this release, which are utilised by The Weather Generator to create further atmosphere. Like all of the other, similar, features, you can choose to deactivate this at will.
  • And finally, this version incorporates the mod I did a while back for Grimreaper; more extensive day period decision. The system automatically pulls switches when its Early Morning, Late Morning, Afternoon, Evening and Night. While this neccesitates a chunk of extra switches; you can use these switches as a comprehensive basis for creating fully scheduled NPC's (i.e. they go shopping in the morning, then go to work in the afternoon, then to the pub for the evening, then into bed for night)
Version 5 Adds THIS Stuff!
  • Stupid Bugfix Sorry guys, version 4 caused stupid errors with savegames due to '[]' not being defined. I didn't notice this until about 3 months after I released since I was using an outdated version 3.5 in my game until then. Then again, no-one gave me any feedback on the issue either...
  • Its gone partly Script-a-licious Partly in order to more easily quash the above bug, and partly to tidy things up a bit, the global settings of the DTS now have their own script class, $JT_DTS.
  • Phased Lighting. The main new feature. Technically an upgrade for the ol' Special Light thats been with the system since V3. Are all caves universally dark throughout? Do you see the glow from lava even on the next floor? Do rooms stay dark even with the lights on? No, of course not. Whilst it is not truly possible to model the advanced lighting of modern games in base RMXP, I thought of Phased Lighting to be a buffer of sorts. Basically, whilst Special Light may provide a 'library' of effects, Phased Light takes this a step beyond and offers the user controlled change of circumstances.
    Change a variable, raise the usual flag, and the properties of the area's light change to match your predefined options. Got closer to that lava? Then make the red saturation of the screen go up! Close to a caves exit? Then it should be brighter, right? Phased Light should be able to do this to create even better atmosphere.
    The DEMO only includes the Fire Cavern Phases. Since I can't anticipate how everyone is gonna want to use various phases, its up to you to actually make them and place them into the Tonal Change event. So this is an intermediate feature; you'll need a small modicum of event programming skill to make it happen.
  • World-Map-Time An additional setting for the time flow module thats been around since the beginning. This changes how the time flow operates from the usual frame based operation to a X-Y co-ordinate operation. In a nutshell, this means every time you move a square on a map, X amount of minutes instantly pass; but time is frozen when you're standing still. This is obviously meant for maps like world maps, where simulating the time it takes to travel large distances is beyond the capabilities of the normal time flow engine: crossing a country should take days, not minutes, after all.
  • Torches that deplete over time. I've had this one on the back burner for a while. Its still not up to my expectations, however, since it has a tendancy to lag behind the player. Lazy light, if you like, lol. Still, irregardless, I'll probably include it in this release. Its now much better since I made it based upon SephirothSpawns Torches, and changed some of the settings, fogs and graphics. It also supports flashlights at a remove, but you'll have to enable those manually.
  • Pre-defined days (holidays, holy days etc.) A Calender addition. Though we've had days of the week already, what if you wanted special stuff to happen in your game on certain days? So it happens to be a festival day in the game, and you want a market to be in town on this day only, etc.
    That said, its up to you actually take a special day and use it so, making this also an intermediate feature.
Version 5.1 Just adds the watch feature!
  • Watch/Dynamic Time Window Initially created by robot79796, this allows a clock and calender to displayed as a window at the top left hand part of the screen, which dynamically updates itself, and like many parts of the system, can be turned on and off at will with a switch.

The Watch & Calender window
Withthewatch.jpg


Worldmaptime in action
Worldmap1.jpg

Notice the fairly short (map-wise) distance to the junction.
Worldmap2.jpg

A fair while has passed getting there, as travelling a world map should do.
Worldmap3.jpg


Phased Light in action
PhaseLight1.jpg

PhaseLight2.jpg

PhaseLight3.jpg

PhaseLight4.jpg


More seasonal stuff
Seasonal1.jpg

Seasonal2.jpg

Seasons
Spring
DTSSpring.jpg

Autumn
DTSAutumn.jpg

Winter
DTSWinter.jpg

Night
DTSNight.jpg

Disco! (looks better in motion)
DTSDisco.jpg

Underwater
DTSUnderwater.jpg

Get the !Updated! Version 5.1 Demo from RAPIDSHARE here:
http://rapidshare.com/files/119548714/DTS-V5-1.exe
Or Get the !Updated! Version 5.1 Demo from MEDIAFIRE here:
http://www.mediafire.com/?fue1fzmjify

Want more mirrors? Just ask!

Get the !Updated! Version 5 Demo from RAPIDSHARE here:
http://rapidshare.com/files/118540685/DTS-V5.exe

---------------------------------------------------------
--------Using Version 4 is not recommended: It has an issue with Savegames...---------
Get the !Updated! Version 4 Demo from RAPIDSHARE here:
http://rapidshare.com/files/38525076/DynamicTime4.exe
Or get the !Updated! Version 4 Demo from MEGAUPLOAD here:
http://www.megaupload.com/?d=AWO9KRTM
--------Using Version 4 is not recommended: It has an issue with Savegames...---------

---------------------------------------------------------
Get the !Updated! Version 3 Demo from RAPIDSHARE here:
http://rapidshare.com/files/26498482/DynamicTime.exe
Or get the !Updated! Version 3 Demo from MEGAUPLOAD here:
http://www.megaupload.com/?d=ZYNSY6ZX[/SIZE]
Or get the !Updated! Version 3 Demo from the RMXP download manager here:
http://www.rmxp.org/forums/downloads.php?do=file&id=832

---------------------------------------------------------
The Old Version (Version 2) is also still available on Rapidshare Here:
http://rapidshare.com/files/16561109/DynamicTime.exe
OR here from the RMXP.org Download Manager:
http://www.rmxp.org/forums/downloads.php?do=file&id=481
---------------------------------------------------------

Enjoy; and feel free to use it in your games with credit.:thumb:

NEED HELP?? Here's a F.A.Q.
Q: How do actually go about adding this to my RMXP project?
A: Check out the Addition Guide I wrote:
viewtopic.php?f=7&t=14739&p=457573#p457573

Q: What the hell do all the switches and variables do?!?
A: Lots of stuff! Studying the comments I made will typically tell you all you need to know.
But, if you want a quick summary of what each component does, check this below post:
viewtopic.php?f=7&t=14739&p=514866#p514866

Q: Does it work with VX?
A: No, sorry, it probably doesn't. But I can't check since I've not had the moolah to buy VX.

Q: Does it work with the SDK/MACL etc.?
A: Yes. It hardly involves any scripting at all, so it'll co-operate with these scripting devkit things without any issues, as far as I'm aware.

Q: I have another question not listed here!
A: Fire away. I'll probably answer. But I'm a lazy & busy git, so don't expect an awesomely quick reply. Sorry.
 
Ugh. Hey guys I'm back. Several... circumstances... have kept me almost exclusively away from the internet for nearly a month and a half. I'd rather not tie myself in knots explaining myself...so I won't. Suffice to say, its complicated.

But anyway, the DTS has suffered the most from this setback, since it was so near to a version 5 fruition before. But, yay! Though much belated, here it is!

RAPIDSHARE: http://rapidshare.com/files/118540685/DTS-V5.exe

Known Issues (all minor):
- The weather fog can occassionally dissappear when tone begins to change. I can't, for the life of me, figure out what the hell causes this. It was an issue with Version 3-4 as well...
- 'Sun spinning syndrome.' Worldmaptime works most excellently, but because time goes by so fast, the change in lighting conditions can be seizure inducing if you're blazing around the world map (The systems going: its day! its night! its day! LOL) . On the World Map, it is recommended that you disable any running modules you might use and perhaps reduce the characters movement speed because of this. I decided not to do this for the demo so you can see what I mean.
- 'TORCH ACTIVE!' pops up twice for some reason whenever you pull a torch out to use in pitch black conditions. I assume one of the events accidently runs twice, but I can't isolate it, and it has no significant effect besides this.
- Using torchlight, your torch might be instantly replenished if the special light effect is switched off and replaced (say, with a strobe light or thunder and lightning effect) Thats because it uses a variable which might be used for other things.

I will be adding an installation guide and screenshots for this version ASAP.
 
Yeah, sorry to keep you waiting, robot. Glad to hear it exceeded your expectations.

Now...to continue working on The Enemy Within with the new system...and actually complete chapter V of that...hehe
 
Goed werk!

The timer/watch feature is pretty awesome. In fact, it helped, since it points out a silly cock-up I made in the world map time code that makes minutes shoot up at an absurd rate (it otherwise has no ill effects on the system, so I didn't notice it).

I've modified it slightly and added it into the DTS properly, with credit to you! Because of this, I'm releasing version 5.1:
http://rapidshare.com/files/119548714/DTS-V5-1.exe

I made the window slightly smaller, translated your comments, and corrected the syntax.

As for raitaime's sun shadows, I thought about adding those in way back in version 3. However, they can cause mighty lag in high traffic areas (since you want to have all of the sprites taking advantage of the system), and it also has some issues with priority tiles: your shadow won't show at all behind a tree, and it wraps around walls and such like... It also doesn't help that most RTP tilesets have the shadows already setup in them (usually with the sun coming from the left)

Because of all of these things, my decision NOT to include this as an integral part of the system still stands.

Oh yeah, and I'm just polishing the install guide...I'll prolly have that up by the end of the day.
 
Addition guide for Version 5.1
This tells you how to add this to your project!!

Installing other versions is basically the same, but the screenshots will not be accurate, as they will be less/different things to transfer.

Obviously, the DTS becomes tougher to integrate into your project the bigger it becomes. If you're late into the development cycle already, you may have already used switches 377 through 400, variables 130-150, and common events 20-28. To save yourself suffering from pointer errors, its best to use these ones, and the guide assumes that you are doing so.

Before you begin:

Tutorial1.jpg


Now open your project in the new instance of RMXP you just started.

Tutorial2.jpg


Tutorial3.jpg


Tutorial4.jpg


Thats the common events done. Now the scripts.

9. Close the Database for both projects, and open the Script editor for both.

Tutorial5.jpg


11. If your project doesn't yet have at least 400 switches and 150 variables open, make sure you use 'Change Maximum' in the same way as you did with common events in step 3. (But you'll need to do that through a normal event, rather than the database, obviously).

12. Finally, this optional, BUT HIGHLY RECOMMENDED, you should rename each of the switches and variables used by the system, so that you know what they do and you aren't going to go over them with something else. The lists for the original project are below:

Switchlist.jpg


Variablelist.jpg


Hope that helps.
 
I feel the same way. It is good that making this system has not gone to waste, even if my audience has been small.

Don't worry about your grammar. I've seen English speaking people who manage far worse than yours! :) (and they don't even have any excuse)
 
Yes, I feel your pain. Its for that primary reason I started this project; to make an easily accessable time system for all that also has loads of cool features. Glad you likes it.

And, wtf, everyone is a mod now? Weird birthday prezzie if you ask me...
 
Hey guys, I apologise for Necroposting my own topic, but I'm adding some new information (I believe thats allowed, right?).

As Langely pointed out in a PM to me, I still haven't actually listed all of the switches and variables of the system and what each one does. So I'll do that now.

SWITCHES

377: Laternlight Active ~ Just used for the Lantern Special Light effect.
378: Seasonal Variations ~ Set up in the script. Determines whether or not you want to use tilesets that change with the season.
379: Seasonal Operator ~ A flag used by the Seasonal system. Leave it alone.
380: Not Used ~ An old feature used it. No longer present. But leave it, just in case I use it eventually (if there's ever a version 6).
381: Show Watch ~ Time window ON/OFF
382: Activate PhaseLight ~ Self Explanitory
383-385: Day periods ~ They are switched on and off by the time event. Use them as keys for your own events. (I.e. A guy only wanders town during the morning? Then make a page on his event with MORNING switch on as the condition.)
386: Day Period Operator ~ A flag used by the Day Period system. Don't touch it manually.
387: Activate TimedLight ~ Self Explanitory
388: FastTone Operator ~ A flag used by the FastTone system. Don't touch it manually.
389: Prevent FastTone ~ If its on, the switch between tones reverts to the old V2 system (much  slower; somewhat dodgy, but slighty more efficient on processing speed)
390: Activate SpecialLight ~ Self Explanitory
391: Weather BGS Mute ~ Don't want the weather system to override your own BGS? Turn this on!
392: Prevent Weather ~ Self Explanitory
393: Its BAD Weather ~ Switched on by the weather generator. Use it like the day period keys for your own events. (Stops stupid civilians saying 'Isn't it a nice day!' in the middle of a blizzard!)
394: Use Weather Fogs ~ Want some extra atmosphere with the weather? Switch this on to allow the DTS to modify your fog based on the weather. Got some funky fogs of your own planned? Don't want the DTS to get involved? Switch this OFF.
395: Weather Check FLAG ~ Want to force the weather to be checked NOW? Wave this Flag!
396: Prevent Tonal Change ~ Got some funky tonal change of your own planned? Don't want the DTS to get involved? Switch this ON. Keep in mind that when this is on, the DTS won't have much visual effect at all (it'll pretty much just keep the time). Remember to switch it off again once you're finished.
397: I'm Inside! ~ Switch this on when you're inside a building. Prevents it from raining inside and other such stupidities. Make sure you use it, since the DTS has no other way of knowing whether a map is an interior one.
398: Tonal Alteration FLAG ~ Want to check the tone NOW? Wave this Flag!
399: Time Reset? ~ Resets time to the default.
400: Time Flowing? ~ The big ON switch. If this is off, the system is off.

VARIABLES
130-131, 133-134: X/Y Dumps ~ All of these are keys for the operational workings of Worldmaptime. They store player co-ordinates and determine the correct timeflow based on that information. Don't fiddle unless you know what you're doing.
132: Phase of Light ~ For use with Phased Light. This is the current Phase. Choose which one you want. Use in conjuction with switch 382, then wave the Tonal Flag (398). See the example map.
135, 137-139, 148: Calculators ~ Used as number dumps by various features. Don't fiddle with them unless you want strange results.
136: Season ~ The current season. 0 is Spring, 1 Summer, 2 Autumn, 3 Winter.
140: Timeflow Speed ~ Rate of times flow. See demo for examples. 0 is standard (40 frames to a minute). If 5, then Worldmaptime becomes active instead.
141-146: Time, Day and Date storage ~ Modify at will, but be sure to raise appropriate flags at the same time.
147: Current Weather ~ A value from 0-91. Usually modified by the Weather Generator, but can be altered manually. See comments for the meaning of values. 91 is Purge all weather.
149: Special Light Variety ~ Choose which one you want. Use in conjuction with switch 390, then wave the Tonal Flag (398). See Tonal operator comments or demo for details.
150: Timed Light Variety ~ Choose which one you want. Use in conjuction with switch 387, then wave the Tonal Flag (398). See Tonal operator comments or demo for details.

There you go. Hopefully that'll clarify for people. Most of this stuff can be figured out by the comments, but its fair enough to prefer this information in a bite sized format since I usually waffle in my comments (rofl).
 
Mr TBB":215k628v said:
HAHAHA SWEET!!
Does your system works with XAS2?
i wish so!
everything is so cool except for the name.. eharper3434390483048286867 is pretty scary
I'm pretty sure this will work with it. It is 97% event based, after all. The only script part I wrote is mainly in its own module, though it does slightly mod saves, so it ~might~ corrupt current saves. Other than that...

I don't have that many numbers after my name 0_o. I have 256 because its easy to remember~ a quarter of a megabyte, 8 x 32 etc. and some sites require numbers and letters in a username.

xgamexfreakx":215k628v said:
I just want to say that I absolutly love your system. I've used v4 for awhile now and am greatly excited to see v5 out. cant wait to try it and see what happens!! Great work on this!!!
Thanks for your support. I hope you like it.
 
revee":1jq09nos said:
is there anyway to count the hours...? like if farming, the plant will mature in 200 hours if watered..... any way to count hours?
revee: Excuse my crap slow reply, been away from internets again for a little while.

No, there's not strictly a means to do this via the DTS; but you can do it in conjuction. It wasn't made specifically with a harvest moon game in mind after all. Nevertheless, you can keep some variables of your own. Personally, for the plant event, what I would do is have a page each to check switches (has plant been watered?) then on paralell process have it check the time and if its been eight hours or whatever, the watered switch turns off, otherwise it adds an hour to a 'growth' variable.

It would end up being a fairly convuluted series of conditional branches. But its doable with some work. Probably best to plan the maths and flowprocess out on paper as well first.

Shadowmaker: Thanks! Good to see you like it!
 

revee

Member

i already think about that..., if i do that, then i must create each variable for each plant isn't it.... >.< crazy... if i has 500 plant = 500 variable.... lol btw, thx for the help...
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top