Orange Time System

Discussion in 'JS Plugin Releases (RMMV)' started by Hudell, Oct 24, 2015.

  1. Iliketea

    Iliketea Tea lover Veteran

    Messages:
    848
    Likes Received:
    934
    Location:
    Germany
    First Language:
    German
    Whaaa, I just cant get the Self switch thing to work  ;_;


    This is how I set the event up:

    [​IMG]









    And this is the error massage I get: Not only once but again and again!

     [​IMG]







    Please help me  :(


    Never mind, I placed the eventmanager wrong... Put it under the timesystem and now it works ... 
     
    Last edited by a moderator: Jun 3, 2016
    solaris1111 likes this.
  2. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,969
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Also check if you have the latest EventManager, as that error shouldn't have happened. (You can see the version by opening the JS file in a text editor - the latest one is 1.2)
     
  3. Iliketea

    Iliketea Tea lover Veteran

    Messages:
    848
    Likes Received:
    934
    Location:
    Germany
    First Language:
    German
    Downloading the newest version was the first thing I did when I got the error XD
     
  4. solaris1111

    solaris1111 Veteran Veteran

    Messages:
    115
    Likes Received:
    19
    First Language:
    French
    Also, you dont have to put the command in a parralel page 2. In page one, after the harvest, insert the command at the end just before you turn the A self-switch ON., leave the page 2 blank, not on parallel, leave it at "action button".
     
    Iliketea likes this.
  5. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,969
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Yes, if you use a parallel event, you'll be adding a new "disable self switch" command at every frame
     
  6. Iliketea

    Iliketea Tea lover Veteran

    Messages:
    848
    Likes Received:
    934
    Location:
    Germany
    First Language:
    German
    Well that would explain why I got so dayum many error massages XD
     
    solaris1111 likes this.
  7. noctiluca

    noctiluca Veteran Veteran

    Messages:
    187
    Likes Received:
    167
    Location:
    California
    First Language:
    English
    Having an issue with running a common event every x number of minutes...


    I set up a test common event 28 that increases a variable by 1 point.


    And then I had another event that contained the plugin commands, and in a test play I activated it one time:


    RUN COMMON EVENT 28 ON MINUTE 0 SECOND 0
    RUN COMMON EVENT 28 ON MINUTE 15 SECOND 0
    RUN COMMON EVENT 28 ON MINUTE 30 SECOND 0
    RUN COMMON EVENT 28 ON MINUTE 45 SECOND 0


    (I don't know how else to get an event to run only 4 times per hour :/)


    When common event 28 activates every 15 minutes, it actually runs many, many times. With my current plugin settings, it runs 15 times per execution, but on earlier settings it actually ran 30-35 times!


    This is a problem, because instead of a variable increasing by 1 point every 15 minutes, it increases by 15 points every 15 minutes.


    I feel like it has to do with the seconds being 0 (0 seconds could take up 15 frames, which is why the event runs 15 times) but I'm not really sure how else to do this without having common events run every minute and then check what the exact minute is, or something like that.


    Having to have an event run every minute and then checking if the minute is a multiple of 15 feels like overkill to me, I already feel like I have too many events trying to process constantly.
     
    Last edited by a moderator: Jun 4, 2016
  8. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,969
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    I just made a quick change on the main plugin. It may have fixed your problem.


    And another way to have the event running every 15 minutes is to use: "run common event 28 in 15 minutes" inside the common event itself, so that every time it's executed it already schedules the next execution.
     
    Last edited by a moderator: Jun 4, 2016
  9. noctiluca

    noctiluca Veteran Veteran

    Messages:
    187
    Likes Received:
    167
    Location:
    California
    First Language:
    English
    It runs as intended with the fix now, thanks!
     
    Hudell likes this.
  10. PresaDePrata

    PresaDePrata Veteran Veteran

    Messages:
    36
    Likes Received:
    3
    Location:
    Brazil
    First Language:
    Portuguese
    Hi Hudell, nice script man. You did a good job.


    After the flattering, here comes the request (lol): how can i enable the time to pass on battle? If so, can i control how time passes on battle? I just need to control the time variables. It doesn´t have to tint the screen or run event, this all can wait after battle's end. Is it possible?


    E sério, ótimo script. Vou mesclar ele com o teu Hudell Hud pra criar a hud de tempo. 
     
  11. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,969
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    I forgot to add a param for that, but it's just one line to change in the script:


    Line 952:


    } else if (SceneManager._scene instanceof Scene_Map) {




    change to:


    } else if (SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Battle) {




    I'll include a param for this later
     
  12. lordnitemare

    lordnitemare Villager Member

    Messages:
    5
    Likes Received:
    0
    Hi. I am making a simple demo related to, but not actually part of my main game, just so I can work out any kinks with some major features that I need. One is specifically the rather complicated day/night system I need. Your plugin, (awesome work btw), while brilliant, and I will be using it, does not have one feature that I need. Basically, while in the towns and cities, day/night works as normal, but on the world map, it is all dark, apart from the place of about 4-5 tile raidius where the main character is.


    For the sake of simplicity, the main character is of a race of light sources, and allows 'regular' time flow. Everywhere else is subject to eternal night. Towns and cities have a certain structure which acts as a member of the main character's race, but if that structure is damaged in anyway, it does not work. Time still flows, but the day/night does not. As an aside, caves and other places, ruins etc...also are subject to the eternal night. Temples, holy places and travelling merchants etc...generally have either the structure, or a mini-version of the structure to allow day/night. Otherwise monsters, who only come out at night would attack.


    Alas, this is a major feature of the game, and without it, the whole plot will fall apart. Is there anyway this is possible?
     
  13. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,969
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Which lighting system are you using?
     
  14. lordnitemare

    lordnitemare Villager Member

    Messages:
    5
    Likes Received:
    0
    None yet. I'm still in the pre-planning stages atm. Doing research for everything I need. No use getting fully invested if I can't get basically the whole reason for the plot to work. I believe you have a lighting system as well? I haven't had a chance to look yet (am on my iPad in bed atm ^_^), but I will when I get up later.
     
  15. PresaDePrata

    PresaDePrata Veteran Veteran

    Messages:
    36
    Likes Received:
    3
    Location:
    Brazil
    First Language:
    Portuguese
     OK, i've changed to


    if ($.Param.useRealTime) {
          $.loadRealTime();
          $._onUpdateTime();
        } else if (SceneManager._scene instanceof Scene_Map || SceneManager._scene instanceof Scene_Battle) {
          $.seconds += increment;
          $.updateTime();
          $._onChangeSecond();
          $._onChangeTime();
        }
      };




    Hudell, i don't know if what i say is wrong, but the fact that it uses


    $.Param.useRealTime


    will only work for those who has the plugin option to use real time, turned on? Because i use a fantasy time where each day are 24 minutes of real time. Just to be sure.
     
  16. noctiluca

    noctiluca Veteran Veteran

    Messages:
    187
    Likes Received:
    167
    Location:
    California
    First Language:
    English
    It shouldn't be real-time only, it's actually checking in case you aren't using real time.
     
    Last edited by a moderator: Jun 6, 2016
    Hudell likes this.
  17. PresaDePrata

    PresaDePrata Veteran Veteran

    Messages:
    36
    Likes Received:
    3
    Location:
    Brazil
    First Language:
    Portuguese


    OOps my bad. LOL i forgot the if else right there. Thanks @noctiluca


    EDIT: 


    Hudell, it works now. Even on battle the time passes and day night cycle works. It wasn't my intention to the cycle works on battle but i liked.


    I was thinking here, i wanted the time on battle to pass slower than on map. I guess on a second if else the increment on second could be different or the updateTime event could check if it is on battle. Don't know, just some ideas. 
     
    Last edited by a moderator: Jun 6, 2016
  18. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,969
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    My lighting system is just a rewrite of Terrax Lighting, made to be compatible with orange time system. I haven't updated it in a while so it may be lacking features. I'm not sure if I made any feature to help in your case, but it wouldn't be too hard to do so.



    Add this right after the line from before (inside that if):


    if (SceneManager._scene instanceof Scene_Battle) {
    increment /= 2;
    }


    This will make the time be two times slower in battles.
     
  19. PresaDePrata

    PresaDePrata Veteran Veteran

    Messages:
    36
    Likes Received:
    3
    Location:
    Brazil
    First Language:
    Portuguese


    Ok, will do. So it's the increment that regulates time passage. So if i do


    increment /= $gamesVariables(15)


     will it actually divide time passage on battle base on variable 15? If it is so, that will be awesome to do.
     
  20. Hudell

    Hudell Dog Lord Veteran

    Messages:
    3,323
    Likes Received:
    2,969
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Yup.

    Code:
    increment /= $gameVariables.value(15)
     

Share This Page