RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Steps Calender 1.0

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 75
What the...?
STEPS CALENDER 1.0
by: IXFURU

Introduction
In its basic form, the Steps Calender tracks time based on party footsteps.  But this is just the beginning of the scripts powers.  The script tracks not only hours, days, months and years, it tracks Seasons, Holidays and Birthdays.  It even has a feature known as Lifespan which tracks the amount of days an actor has to live.  When the days run out, the actor is removed from party and can't be added back.  The script also deals with time altered variables which rise and fall when hours, days, months and years change.  There are also four new scenes which have been added.

FEATURES
Spoiler for "some features":
Time:   Time is controlled by a switch you set.  If it's on, then time is tracked, if it's not, it isn't.  Time is broken into four catergories:  Hours, Days, Months and Years.  However, you can name these catergories whatever you want.  In addition, each catergories have their own customizations.  Like hours in a day, months in a year, etc.  You can have 20 months or 2 months.  You can have 4 hours in a day or 100.  It's up to you.

Tinting:   Steps Calender allows you to set the tint of the screen based on what time of day it is.  The time of days are given switches, so you can easily make events act when upon it being a specific time of
            day.

Seasons: Seasons are very customizable.  You can change their names, you can set their game switches.  You can change the months and days during which the season is active.  Currently, there is no graphical changes to maps during Season changes.  But that's not out of the question for later updates.

Birthdays:  Each actor is given a birthday.  On that day, he falls under the birthday state and triggers a switch, which should allow for easy eventing.  There is a scene which deals with birthdays, where an actor's birthday can be set.  On a birthday, the party is given a gift of gold, a common event can be called, a sound effect is played.  When it's an actor's birthday, an icon and string (both customized by you) appear in the status scene.

Holidays:  Holidays are much like birthdays, however there is no state to given to actors.  Nonetheless, there are switches which are triggered when holidays occur.  You can set the day and month of the Holiday, as well as the name of the holiday and the appropriate switch.  There is no limit to the amount of holidays which can be created.

LifeSpan: LifeSpan is like a crystal ball, and like a boundary of time during which actors are allowed to exist.  LifeSpan has a scene, wherein you can view the actor's specific lifespan.  It will show days to live, months to live and years to live.  It is my intention that this part of the script could work well with my Shapeshift Script which alters the actors appearance as they age.  (The jury's still out on that one!)  LifeSpan can be altered with script calls.  You can add to it and subtract from it.  Want beer to take days off the actor's life, this script can do it.  Want a youth elixir to add years, this script can do it. 

Time Altered Variables:  I put this into the script, because I've personally ran into the problem of requiring a way to adjust variables randomly.  This script allows you to set unlimited variables to be added to and subtracted from based on the passage of time.  Hour-based, Month-based, Year-based.

Scene Calender  Scene Calender is one of the coolest parts to the script.  As in all scenes, (except fo the birthday one), you can adjust the colors, text and background of the scene.  However, this scene is special because it not only tells the time and date.  It tells: Birthdays, Holidays, Seasons and Time of Day in optional windows whose positions can be altered and moved around to however you want them.  Also, if seasons are used, you will see the Calender Scene background change according to what season you're in.  The calender scene can be added straight to the menu, or called via script call.

I know there is more to this script than I can think of right now.  But when you try it, you will see.  There's 400 lines of instructions and configuration options.  So take your time and read through them.  And remember, if there's a part of the script you don't want, just disable it in the configurations section.




SCREENSHOTS
Spoiler for "some graphic elements":

This image shows screen tinting due to time progression.


This image shows the calender scene.  Notice the optional windows at the corners.  Also, note the background.  It's Fall.  The image displayed will change according to the season.


HOW TO USE
Grab the script from Pastebin, or the demo below.  Paste the script into your project above main and below materials.  Read carefully through the script's configuration section.  There is much to alter and customize.  Be sure to follow the instructions precisely.

DEMO
http://www.mediafire.com/?d8ih5johedhj8ba

SCRIPT
http://pastebin.com/GHEs0PgE

FAQ
I'm sure there will be some.  Just fire away.  I'll add them if they re-occur.

CREDIT AND THANKS
First off, Credit the following if you take the graphics from the demo.  And if you do, YOU CANNOT USE THEM COMMERCIALLY!:
EvilEagle
Enterbrain
MatsuoKaito
FirstSeed
WallPapersExpress.com
UltimateNatureWallpapers.com

Also, you can credit me, IXFURU, for writing the script.  If you want to use it commercially, hit me up and we'll discuss it. 

AUTHORS NOTES
This script took me an insane amount of time.  I asked a million questions and it would not be right to give some props to ???noBody??? for aiding me in some problems I was having.  I'm not sure I'll ever attempt a script this long again.  It took a lot out of me.  And more than once I contemplated giving up.  But this should be a lesson to all of you who want to script, keep trying.  Dedication to a script will prevail.  At any rate, thanks for your interest in the script.  Be sure to leave me some feedback and some comments.  If something goes bad,  let me know and I'll try to fix it.  If I can't, I'll try to seek help until it's fixed.  I'm not sure about compatibility with this script, as alot of things were aliased.  But I know for a fact that only one method was overwritten, that being the Game_Party.add_actor method.  It will be imperative that if you want me to help you that along with telling me what you need fixed, that you describe the error you receive and tell me  what aspects of the script you are using.  If you're using SEASONS and not LIFESPAN, then provide that information with your question.  Thanks a lot, I hope you enjoy it and that it is worthy of being on the forums.
« Last Edit: September 01, 2012, 06:17:38 PM by IXFURU »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
That sounds pretty neat. I'll have to take a look.

***
Rep:
Level 75
What the...?
@Modern:   I wish I could say it was easy.  But that'd be a lie.   :P   It seems like there is always more to a script than it seems.  I put it through some heavy scrutiny before I released it, but I know people will put it through even more scrutiny than I ever could.  We'll see if it can be compatible with other scripts.  Hopefully it doesn't have any problems, and if it does, I just hope I can fix them.

EDIT:  The links were broken! I just fixed them. 
« Last Edit: September 01, 2012, 06:18:26 PM by IXFURU »

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Wow that's a VERY nice script you've made.

It's actually quite impressive :) If I was concerned with time I'd probably use it.

A little tidbit for you though, you don't have to check if something is true with the == operator.
Code: [Select]
if USE_SEASONS == true

if USE_SEASONS # Works the exact same way

if !USE_SEASONS # Checks if it's false

It's not an issue, but it can save you some time in your future long scripts ;)
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
Rep:
Level 75
What the...?
Hey.  That does help, D&P3.  I didn't know that.  Is that the case with like $game_switches, too?

So I only have to use the comparison if I'm looking for false?

And thanks for checking out the script.
« Last Edit: September 02, 2012, 07:49:50 AM by IXFURU »

*
*crack*
Rep:
Level 64
2012 Best Newbie2012 Most Unsung MemberFor frequently finding and reporting spam and spam bots
Here's an example of how it is used (and yes it does work with game switches as well) :)

Spoiler for:
Spoiler for Your current code:
Code: [Select]
  #=============================================================================
  #             Change Segment Tone
  #=============================================================================
  def change_segment_tone(segment)
    for i in NO_TINT_SWITCHES
      if $game_switches[i] == true
        @tone = Tone.new(0, 0, 0, 0)
        $game_map.screen.start_tone_change(tone, 12)
Spoiler for Without == operator:
Code: [Select]
  #=============================================================================
  #             Change Segment Tone
  #=============================================================================
  def change_segment_tone(segment)
    for i in NO_TINT_SWITCHES
      if $game_switches[i]
        @tone = Tone.new(0, 0, 0, 0)
        $game_map.screen.start_tone_change(tone, 12)

And this would still work as intended

Spoiler for Another section to look at:
When checking if something is not equal to nil, you don't need to use the ' != nil ' statement. nil is just another way of saying something is false, so if that variable you're checking contains anything besides false or nil then it must be true.
Spoiler for Your current code:
Code: [Select]
            if HOLIDAYS[holiday][chkeck][0] != nil
              $game_switches[HOLIDAYS[holiday][check][0]] = true
              if hd_music_played == false
                Audio.me_play('Audio/ME/' + HOLIDAY[holiday][check][2], 80, 100)
                @hd_music_played = true
              end
            end
Spoiler for Difference:
Code: [Select]
            if HOLIDAYS[holiday][chkeck][0] # You don't need to check if it's not nil, if it is nil it will return 'false', so you only need to check it like this.
              $game_switches[HOLIDAYS[holiday][check][0]] = true
             
              if !hd_music_played # put an Exclamation mark in front of the variable name and the if statement will check if it is false rather than true.
                Audio.me_play('Audio/ME/' + HOLIDAY[holiday][check][2], 80, 100)
                @hd_music_played = true
              end
            end

Spoiler for One more thing:
I also noticed that you're using Audio.me_play, this is fine but there are other methods to call the audio.
Spoiler for Your current code:
Code: [Select]
Audio.me_play('Audio/ME/' + HOLIDAY[holiday][check][2], 80, 100)
Spoiler for You could've done this:
Code: [Select]
RPG::ME.new(HOLIDAY[holiday][check][2], 80, 100).play # and by doing it like this you don't have to mention the path folders, since the first place it will check is 'Audio/ME/'

You can also do the same for BGM, SE & ME
Code: [Select]
RPG::BGM.new(FILENAME, VOLUME, PITCH).play
RPG::SE.new(FILENAME, VOLUME, PITCH).play
RPG::ME.new(FILENAME, VOLUME, PITCH).play



As I already said, it's not an issue. Your current code works fine, these are just ways to shorten it if you plan to make a long script again in future. ^-^
« Last Edit: September 02, 2012, 09:42:02 AM by D&P3 »
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

***
Rep:
Level 75
What the...?
Thank you for the insight, D&P3! ;D  This will definitely help me in the future.  I didn't know these things.  So I will definitely refer back to this.  I really appreciate the time you took to explain things to me.  It will only make scripts I write better from here on out.  And it will help me in troubleshooting other people's scripts.