Real time day-night cycle

Discussion in 'RGSS Script Requests' started by Andrea87Sky, Aug 28, 2019.

  1. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    There's any script for a real time day-night cycle based on the computer's time? Like the Pokemon Essentials' one, but compatible without the pokemon system 'n stuff.
     
    #1
  2. Choraß

    Choraß Veteran Veteran

    Messages:
    37
    Likes Received:
    16
    First Language:
    German
    Primarily Uses:
    RMMV
    #2
  3. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    The first idk why but it don't work, I tried to use "$game_dnc.enable" in a script call for enable the script but it gives me this error. The second is for VX Ace, this section is for asking XP scripts.
     

    Attached Files:

    #3
  4. callmedan

    callmedan Friendly Stranger Veteran

    Messages:
    562
    Likes Received:
    878
    Location:
    i'm behind you . . .
    First Language:
    Vietnamese
    Primarily Uses:
    RMXP
  5. KK20

    KK20 Just some XP Scripter Veteran

    Messages:
    103
    Likes Received:
    42
    Location:
    Orange County, California
    First Language:
    English
    Primarily Uses:
    RMXP
    As a mod of Chaos Project, I can confirm none of those use a time system that reads the system clock. I have never witnessed any script that does so either. It would just be a matter of calling
    Code:
    Time.now
    and modifying the code from there.
     
    #5
  6. Thefirelion

    Thefirelion Veteran Veteran

    Messages:
    49
    Likes Received:
    11
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    #6
  7. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Hm, seems pretty easy to do actually, thanks! But there's a question about it: how to make check if it's like a specific day or hour? Because if it's possible i wanted to make screen tone changes depending if it's night or day and maybe events like seasons to make trigger when it's a specific day.
     
    #7
  8. Thefirelion

    Thefirelion Veteran Veteran

    Messages:
    49
    Likes Received:
    11
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    Yes, simply configure the variables for what you want to use, then you must add the conversion to an integel (to a number) so that it can be compared by a condition event => ".to_i"

    So in the configuration of the variable (script box) it should look like this: Time.now.strftime ("% I").To_i

    Now you have to do what times or dates you want your events to occur.

    Untitledii.png

    Here the engine will read that it is 12 o'clock (for example)


    then in the conditional event: variable [x] = 12
    do things

    if you want me to check for days or months for LETTERS (not numbers) configure your variable without converting it to an integel and in the conditional event:

    $ game_variables [x] == ("Wednesday") (for example)
    do things
     
    Last edited: Sep 8, 2019
    #8
  9. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Ye sorry for the late reply, I should have replied before you replied to me, anyway I already did it, sorry i'm just stupid i didn't realized about doing it by variables, btw I did a common event that is always active and that updates the variables of the date:

    RPGXP_mrdD24sNfV.png

    And then I tested it on a random event and it works:

    RPGXP_Ly8Ks9tp8R.png

    Thanks so much anyway for the help! ^w^
     
    #9
  10. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    Umh a question, I really wanna share the day-night cycle system I made, but where? I didn't see like an "Events Systems" section or something.
     
    #10
  11. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    314
    Likes Received:
    150
    First Language:
    English
    Primarily Uses:
    RMXP
    #11
  12. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    So I need to explain how I made it or make a tutorial for it? I'm not so good on it sadly, and I don't remember so well some things, it will be more better if I can just upload it like a script, yes of course there will be some instructions of how to use it.. but of how to MAKE it it's quite difficult tbh to explain..
     
    #12
  13. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    314
    Likes Received:
    150
    First Language:
    English
    Primarily Uses:
    RMXP
    Well, when offering a script or system of some sort, you have to give instructions on how one uses it. Installation is one facet, and installing an event system does require more information than just pasting in a script.

    AHH... Try looking at my WAR! topic for ideas... I guess?
     
    #13
  14. Andrea87Sky

    Andrea87Sky Just a random musician/coder. Veteran

    Messages:
    81
    Likes Received:
    1
    Location:
    Sicily
    First Language:
    Italian
    Primarily Uses:
    RMXP
    That's what I said, the tutorial ask me to do a tutorial about it or explain how to MAKE it, but it will be more simple if I can do it as a script and explain only how to USE and INSTALL it. Use, install and make are different things.
    Anyway yeah I looked at the topic, but there's any chance to make it after like years of this site? I mean, RPG Maker is almost dead, this site too tbh, nobody has never mentioned a event systems section and now in 2019 they will make it? I doubt it. I don't even think there are still active admins on this site. I don't want to be mean or something, this is just my opinion. But of course that don't means you have to give up. And I'll help you of course, even if I think it's impossible to make it tho.

    Oh wait the "WAR!" topic is a event system topic on another site, i thought you was mentioning the topic on this site to make an event system section. Nevermind I'm just stupid XD Btw I think I'll try to upload my system on Save Point then until this site will have an Event System section too. ^-^
     
    #14

Share This Page