Feelzor

Regular
Regular
Joined
Oct 10, 2017
Messages
92
Reaction score
85
First Language
French
Primarily Uses
RMMV
Lighting and Time Editor v1.7.4
FeelZoR - Originally created by Level No Matter

Free to Use for both Commercial and Non-Commercial projects.
Credits not required but highly appreciated: do not hesitate to also credit Level No Matter (aka Sebastián Cámara).

You can find a more in-depth version of the TOS here.


Introduction
Seeing from the old post that the plugin had some bugs that needed to be solved and the original author seems to have abandoned it, I decided to continue it and share it with you.

This is a plugin that implements a Time System and a Lighting Editor (in game or with events).
You can make a lot of incredible light places with this plugin, and it can give a new dimension to your game!

Features
  • Possibility to enable or disable the Time System.
  • Possibility to change time whenever you want with simple commands.
  • Possibility to set a specific Tint into a map by putting a single line in the Notes: the Time System will be ignored.
  • Possibility to add lights by using the editor in game or with events.

Screenshots
This video has not been updated: it is the same than the one on the original post:


How to Use
To install the plugin:
  • Download the plugin on the given link and click the "Clone or Download" button, then simply click "Download ZIP".
  • Extract the contents of the img folder into the img folder of your project.
  • Extract the contents of the js folder into the js folder of your project.
  • The file ".gitattributes" is not useful for you, you can delete it.
  • Enable the plugins using this order:
    • LNM_GameEditorCore.js
    • LNM_GameTime.js
    • LNM_LightingTool.js
To add a light, you have two ways of doing so:
Using the In Game Editor:
Press TAB and then press over the lamp icon. Then select the type of light you want to add. You can drag and edit your properties at any time.​
Adding default lights from events:
You can create default lights by simply typing Torch, Bonfire or Ambient in the field “Note”.​

Adding custom lights from events:
Simply create an event and then in the field “Note” add the following line:
Light(filename, scale, hue, alpha).addPulse(pulseMin, pulseMax, pulseSpeed).addFlick(flickIntensity, flickSpeed)
  • Filename: (string) Sprite used for the light, located in img/lights/
  • Scale: (float) Scales the sprite. (1.0 = 100%, 0.5 = 50%, ...)
  • Hue: (integer) Tint scale for colors from 0 to 359. For more information visit https://en.wikipedia.org/wiki/File:HueScale.svg
  • Alpha: (float) Transparency of the light, from 0.1 to 1.0
  • pulseMin: (float) Minimum scaling for pulse animation
  • pulseMax: (float) Maximum scaling for pulse animation
  • pulseSpeed: (integer) Speed for pulse animation
  • flickIntensity: (integer) Intensity for flick animation
  • flickSpeed: (integer) Speed for flick animation
You can set the default power status to off by simply adding .turnOff() at the end of the line.

Examples:
Light(default, 5.0, 28, 1.0) - These are the settings used for Ambient lights.
Light(default, 1.0,15, 1.0).addPulse(0.98, 1.02, 7).addFlick(1, 3) - These are the settings used for Torch lights.
Light(default, 1.3, 28, 1.0).addPulse(1.1, 1.3, 15).addFlick(1, 3) - These are the settings used for Bonfire lights.​

Adding custom lights to enemies:
For battles, you may want enemies to hold a light. Simply do so by writing in the notes part <Light:yourLight>. Just replace yourLight with the same pattern than for event lights.

Examples:
<Light:Bonfire>
<Light:Light(default, 5.0, 28, 1.0).addFlick(1, 3)>​

Using the Player Torch:
You can activate or deactivate it using the switch set in the Plugin Manager. Default switch is #0001.

You can also change it to use 4 different directions, like so:
  • From the Plugin Manager, set the "Player Torch 4 Directions" parameter to true.
  • Note the value of the "Player Torch Filename" parameter.
  • Create 4 different files, all starting with the name set in the "Player Torch Filename" parameter, each followed by either "_2", "_4", "_6" or "_8". These will be for respectively Down, Left, Right and Up directions (same as the arrows on a numpad, if it can help).
  • All these files must have the .png extension and should be located in the img/lights/ folder.
For example, if you want to use the default image files provided with the plugin, set the "Player Torch 4 Directions" parameter to true and the "Player Torch Filename" parameter to "player_torch" (without the quotes). Run the game and see what it does!
Light System commands:
For the following commands, light_id is the id of the light. It can be found in the In-Game editor on the top right corner of the screen. For event lights, the id starts with an e and is followed by the id of the event (without the first 0). For example, the light for event 0042 will have id e42.
You can also select multiple ids. Specifying a-b as an id with a and b being integers will select all lights from a to b, inclusive. To select a range of event lights, just specify ea-b, with a and b being integers. Non-existing lights ids will be ignored without any warning.
You can specify a list of ids with [id1, id2, id3], and you can use ranges in that list.
For example, you can select 1-5 for lights from 1 to 5, e4-9 for event lights from 4 to 9 and [1, 4, e6, 9-13, e8-10] to select lights with id 1, 4, 9 to 13 and event lights with id 6 and 8 to 10.​

Light ON light_id
Turns on the specified light. The id can be found while creating or editing a light with the editor, on the top of the screen.
eg: Light ON 1 will turn on the light with id number 1.

Light OFF light_id
Turns off the specified light. The id can be found while creating or editing a light with the editor, on the top of the screen.
eg: Light OFF 10 will turn off the light with id number 10.

Light LIMIT time_begin time_end light_id
Turns on the specified light automatically during the set time.
eg: Light LIMIT 22:30 5:30 1 will turn on the light with id number 1 between 10:30pm and 5:30am. May be useful for city lights, for example.

Light HUE hue_value light_id
Changes the color of the light with the corresponding id temporarily (just in the current save) to the one specified by the hue.
eg: Light HUE 120 4 will make the light with id 4 green

Light HUE RESET light_id
Removes the temporary color of the light with the corresponding id and use the default light color again.
N.B.: REMOVE can be used instead of RESET.
eg: Light HUE RESET 2 will remove the temporary color of the light with id 2

Time System commands:
Time PAUSE
Stops the time. Useful for cutscenes, for example.

Time PLAY
Reactivates the time.

Time SET time
Sets the game's time to a specific time.
eg: Time SET 15:00 will set the time to 3pm.
For retro-compatibility, Time SET 15 0 still works.

Time ADD hours minutes
Advances time.
eg: Time ADD 2 15 will advance the time by 2 hours 15 minutes.

Time SAVE hour_var minutes_var
Saves the current time in the specified variables.
eg: Time SAVE 2 3 will save the hours in the variable #0002 and the minutes in the variable #0003.

Time LIMIT time_begin time_end self_switch
Activates the specified switch only between time_begin and time_end.
eg: Time LIMIT 6:00 13:40 A will activate the self switch A of the event calling the plugin command between 6am and 1:40pm.
eg: Time LIMIT 22:30 5:15 C will activate the self switch C of the event calling the plugin command between 10:30pm and 5:15am.

Tint SET red green blue
Sets the tint of the map to the specified colour.
eg: Tint SET 255 0 0 will set the tint red.

Tint SET tint_number
Sets the tint of the map with a tint from the configuration.
eg: Tint SET 3 will set the tint with the 3rd tint in config.

Tint REMOVE
Resets the tint to the time tint, or removes the tint if the time plugin is disabled.

Clock MOVE x y
Moves the clock window to coordinates (x,y).
A negative coordinate will keep the window at the same position on the axis.
eg: Clock MOVE 0 700 will move the clock window to (0,700)
Clock MOVE 200 -1 will change the horizontal position of the clock window to x=200

Clock REL_MOVE x y
Adds x and y values to the current position.
eg : Clock REL_MOVE 50 0 will move the clock window from 50px to the right.

Clock SHOW [map/menu]
Shows the clock window in the menu or the map.
If you don't specify which window to show, it will show the map window by default.

Clock HIDE [map/menu]
Hides the clock window of the menu or the map.
If you don't specify which window to hide, it will hide the map window by default.

Clock TOGGLE [map/menu]
Toggles the visibility of the clock window in the menu or the map.
If you don't specify which window to toggle, it will toggle the map window by default.
Time System Notetags:
Your must use these tags in the Note part of the map you want to change.

<Tint: Red, Green, Blue>
Ignores the time and sets the map's tint to the specified RGB color (Red, Green Blue). This is useful for darker dungeons where light is not time dependent, or houses, for example.
eg: <Tint: 0, 0, 0> will set the tone totally black, ignoring the time.

<Tint: CustomTintID>
Ignores the time and sets the map's tint to the specified custom tint, defined in the Plugin Manager.
eg: <Tint: 7> will set the screen tone with the Custom Tone 7's value.
Setting Default Time:
To set a default time when the player starts a new game, change the "Default Time" parameter in the Plugin Manager to the time you want.
eg: Setting the parameter "Default Time" to 15:30 will make the game start at 3:30pm.​

Demo
Demo made with RMMV 1.5.2 with plugin v.1.4.1

Script
You can download all the files here.

FAQ
No FAQ yet.
Changelog
Version 1.7.4:
* Correct a bug where the lights cannot be loaded in a deployed game.​

Version 1.7.3:
* Correct a bug where the Light limits are global to all the maps.
* Correct a bug where opening and closing the Game Editor resets the tint.
* Correct a bug where using Time PAUSE and then Time PLAY resets the tint.​

Version 1.7.2:
* Correct a bug where temporary status are applied to all lights with same id, no matter what map they are on.
* Move the buttons on top left of the screen during battle.​

Version 1.7.1:
* Correct a bug where CTRL + Z crashes the game.​

Version 1.7.0:
+ Add the possibility to select multiple lights in Light commands.
+ Add random flick effect: flick doesn't happen at a specified interval.
+ Add the possibility to create lights in battle.
+ Add the possibility to create lights that are turned off by default.
* Correct a bug that corrupt save file if a light limit is set on a light and that light is deleted.
* Correct a bug that causes all the event lights to have id eundefined.
* Correct a bug that causes all the editor lights to have the same id.​

Version 1.6.0:
+ Add the possibility to undo (CTRL + Z) and redo (CTRL + Y) actions in editor.
+ Automatically selects the light when created.
+ Automatically selects the pasted light for edition.
+ Allow number entering when clicking on values while editing light properties.
+ Pulse and Flicker enable setting now loops between true and false, instead of resetting the properties.
+ Support ⌘ in addition to control for Mac users.
* Paste lights next to the player, instead of the position of the copied light.
* Correct a bug where pasting without copying anything crashes.
* Light dragging no longer start if the mouse didn't move​

Version 1.5.0:
+ Add the possibility to use Time SET xx:xx instead of Time SET xx xx
+ Add the possibility to keep the tint during battle (can be disabled in configuration).
* Corrected a bug where required assets weren't taken in account.
* Changed the ids of lights so they don't change when another light is deleted.​

Version 1.4.1:
* Correct a bug where parameters would not be taken in account.​

Version 1.4.0:
+ Add the possibility to use commands on event lights.
+ Add the possibility to set a temporary hue to lights.
* Correct a bug where turned off lights would turn on again after going in the menu.​

GameTime version 1.4.1:
* Correct bug with "Add" plugin command​

GameTime version 1.4.0:
+ Add possibility to move Clock window with configuration
+ Add possibility to move Clock window with plugin commands​

GameTime version 1.3.0
+ Added tint command to set tint through command plugin
+ Added tint command to reset tint to time's tint, or remove tint if time is disabled​

Version 1.3.4
* Solved a bug where Light LIMIT would turn on lights again after a battle, even if they aren't supposed to be turned on.​

Version 1.3.3
+ Added an "Incompatibility" mode for those using, for example, "TDDP Bind Pictures To Map" plugin. This plugin has to be below the problematic plugin in order to function correctly.​

Version 1.3.2
+ Added required assets.
* Corrected a bug where copy/pasting a light would not show flick / pulse animations until game restart.
* Corrected a bug where browser version would crash while loading.
CAREFUL: THE BROWSER VERSION DOES NOT SUPPORT LIGHT CREATION, IT MAY CRASH
* Corrected a bug where using the "Used with MV" plugin would make the game crash. Corrected the same bug for all other "splash screen" plugins.​

Version 1.3.1
+ Added the possibility to activate the time window on the map.
* Modified the parameter that shows the time clock into the menu.
* Some performance improvements.​

Version 1.3.0
+ Now lights linked to events follow them if they move.
+ Added the possibility to turn on and off lights created by the editor.
+ Added the possibility to automatically turn on and off lights created by the editor depending on the time.
* Corrected a bug where null lights wouldn't be loaded correctly at start.
* Corrected a bug where dragging a light on the buttons would change its properties.
* Fixed a bug where deactivating time would make a black screen.
* Fixed a bug where spaces in the <Tint> note were mandatory.​

Version 1.2.0:
+ Added the possibility to store current time into variables.
+ Added a default time value when starting a new game.
+ Added the possibility to change an event's self switch based on time.
+ Added the possibility to Copy and Paste selected light with CTRL + C and CTRL + V
+ Added the possibility to Delete the selected light with the DELETE and the BACKSPACE key.
* Corrected a bug where if two lights were at the same place, dragging one would drag the other.​

Version 1.1.0:
-- FeelZoR continues the project.
+ Added the possibility to make the player torch follow the player's direction.
+ Added the possibility to disable the time system.
* Corrected a bug where the custom tint set to the map would reset after closing a menu.​

Version 1.00:
-- Plugin published.​

Credits and Thanks
- FeelZoR for continuing the plugin.
- Level No Matter for making the plugin.
- Xelion for helping Level No Matter translating everything.

Author's Notes
This plugin wasn't created by me: I only continue it after seeing such a beauty wasn't used because of some bugs. I'll try to make it better and correct all the bugs I find, implement new features and so on. Though I'll need some time to understand all the parts of the code written by Level No Matter.

Do not hesitate to report to me any bug you find!

Incompatibilities
  • This plugin may work with TDDP Bind Pictures To Map if, and only if you put the Lighting Tool below TDDP's plugin and you set the "Incompatibility Mode" to true. To do so, open the plugin manager, double click on LNM_LightingTool and change the parameter "Incompatibility Mode" to true.
 
Last edited:

Feelzor

Regular
Regular
Joined
Oct 10, 2017
Messages
92
Reaction score
85
First Language
French
Primarily Uses
RMMV
Glad to see you like it! :D

EDIT: I've seen a bug where the screen would be black if you disable the time. I don't know if you have it too, but as a temporary fix, use the <Tint: R, G, B> tag into the maps so they won't be fully black. (though it may be nice with the need to use player's torch, or just map lights.)
I won't be able to fix it for a few days.
 
Last edited:

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
I was trying to understand exactly how to do the torch effect for when my character is in a cave or something. I tried to add torch on the NOTE field on the map as the demo has didnt seem to work.... Can you help with this
 

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
Nvm i figured it out. For anyone else a little confused create and event to turn the switch on lol. Sorry been out of rpgmaker for awhile should have guessed that
 
Last edited:

Feelzor

Regular
Regular
Joined
Oct 10, 2017
Messages
92
Reaction score
85
First Language
French
Primarily Uses
RMMV
Version 1.3.0 is out!

+ Now lights follow the events if they move.
+ Added the possibility to turn on and off lights created by the editor.
+ Added the possibility to automatically turn on and off lights created by the editor depending on the time.
* Corrected a bug where null lights wouldn't be loaded correctly at start.
* Corrected a bug where dragging a light on the buttons would change its properties.
* Fixed a bug where deactivating time would make a black screen.
* Fixed a bug where spaces in the <Tint> note were mandatory.
 

microck

Regular
Regular
Joined
Jul 23, 2016
Messages
45
Reaction score
11
Primarily Uses
I will try this one. :o

EDIT: Got little freeze (0,5 secondes) every 10 secs. My game resolution: 1080p.
(I3, geforce 750ti, 8gbram).
 
Last edited:

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
This one does everything you could want. He bug fixes very quickly
 

Feelzor

Regular
Regular
Joined
Oct 10, 2017
Messages
92
Reaction score
85
First Language
French
Primarily Uses
RMMV
I will try this one. :o

EDIT: Got little freeze (0,5 secondes) every 10 secs. My game resolution: 1080p.
(I3, geforce 750ti, 8gbram).
Buy a GTX 1080 Ti :v

I'm joking, I may ask you, do you have other plugins installed? If so, what are they?
Also, did you notice anything particular? For example, freezes only appearing after a certain amount of lights set, freezes only appearing after a particular amount of time, ...
I'll try to see what may causes these freezes, but I cannot guarantee anything right now ^^'

Also, does these freezes appear only during playtest or also on a distributed version (it would be perfect if you could test that for me)? It may help me determine what causes these freezes.

Thanks for reporting it, though!

@cjewell77 thanks for all your support :D it means a lot to see people enjoying your work ^^
 

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
After installing this plugin and doing some random weather eventing it is really working out. The torch effect works awesome when tied to a torch item with a time limit and setting the tint of a cave to pitch black.
 

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
I was wondering if there was a way to put the time on the main screen instead of the menu? I have a basic understanding of java. I have been pouring through the code I cant seem to find where to change what screen the clock is on
 

Feelzor

Regular
Regular
Joined
Oct 10, 2017
Messages
92
Reaction score
85
First Language
French
Primarily Uses
RMMV
I was wondering if there was a way to put the time on the main screen instead of the menu? I have a basic understanding of java. I have been pouring through the code I cant seem to find where to change what screen the clock is on

Yep there is a way to do so ^^ (if I understood you correctly)
By the way, I'm going to tease a bit, but java isn't javascript. MV works with javascript, not java ^^ both are really different languages :D

So, in the LNM_GameTime.js file, you have the class Window_Time at line 768. This is the window you're looking for.
If you wish to remove the time from the menu, just comment the lines 751 to 761.

If you wish to show this window on the map, you'll need to modify the Scene_Map as follows:

Code:
//-----------------------------------------------------------------------------
// Scene_Map
//
// The scene class of the map screen.
var FLZ_GameTime_Scene_Map_create = Scene_Map.prototype.create;
Scene_Map.prototype.create = function() {
 FLZ_GameTime_Scene_Map_create.call(this);
 this._timeWindowShown = null;
}
var FLZ_GameTime_Scene_Map_callMenu = Scene_Map.prototype.callMenu;
Scene_Map.prototype.callMenu = function() {
 FLZ_GameTime_Scene_Map_callMenu.call(this);
 this._timeWindow.hide();
 this._timeWindowShown = false;
}
var FLZ_GameTime_Scene_Map_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function() {
 FLZ_GameTime_Scene_Map_update.call(this);
 if (this._timeWindowShown != null) {
  if (this.isActive() && !this._timeWindowShown) {
   this._timeWindow.show();
   this._timeWindowShown = true;
  }
  
  else if (!this.isActive() && this._timeWindowShown) {
   this._timeWindow.hide();
   this._timeWindowShown = false;
  }
 }
}
var FLZ_GameTime_Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
Scene_Map.prototype.createAllWindows = function() {
    FLZ_GameTime_Scene_Map_createAllWindows.call(this);
    this.createTimeWindow();
}
Scene_Map.prototype.createTimeWindow = function() {
    this._timeWindow = new Window_Time();
    this._timeWindow.x = 0; // You can remove it, or change the 0 to change the top left position on the x axis.
    this._timeWindow.y = 0; // You can remove it, or change the 0 to change the top left position on the y axis.
    this.addWindow(this._timeWindow);
}

I recommend putting these lines under the line 761.

EDIT: Maybe will I keep this code for a future version, so people can show the time while playing if they want.
EDIT2: The window will still be shown while opening the menu, it may be a bit ugly, I'm looking for a way to improve that.
EDIT3: I changed the code so now it hides while opening the menu.
 
Last edited:

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
I was not aware it was a different language. That explains a lot lol. I appreciate your help and pointers. I will try this code out.
What do you use to edit your javascript?
 

Feelzor

Regular
Regular
Joined
Oct 10, 2017
Messages
92
Reaction score
85
First Language
French
Primarily Uses
RMMV
Yeah, it's a different language :p even though has some similarities to Java, both actually have big differences ^^
Though I never learnt javascript, only used my knowledge on other languages and the existing scripts in MV to learn how everything works :p

I hope this code will be enough for you :D I've included it with Plugin Configuration so everyone will be able to use it when I'll make next version available :p

EDIT : I just noticed that the window was sometimes acting a bit weird. It seems it's not always in sync with the in-game time, so it may go from 2:44 to 2:46 after syncing. I don't know where it comes from, and it won't always do it, so I don't know if it'll be easy to solve.
 

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
Yeah, it's a different language :p even though has some similarities to Java, both actually have big differences ^^
Though I never learnt javascript, only used my knowledge on other languages and the existing scripts in MV to learn how everything works :p

I hope this code will be enough for you :D I've included it with Plugin Configuration so everyone will be able to use it when I'll make next version available :p
I will try it when i get home tonight. Somehow my usb backup got deleted.... Not sure how lol but I have 2 backups and my laptop at home.
Thank you again
 

Feelzor

Regular
Regular
Joined
Oct 10, 2017
Messages
92
Reaction score
85
First Language
French
Primarily Uses
RMMV
No problem! I hope that your backup deletion won't be much of an issue for you ^^

EDIT: I'm working on some improvements where I can, currently I have, on my computer, noticed the improvements made the script 1.35x faster on the surface update, from 100µs to 74µs on average.

Before, I could notice best performances around 70µs for a surface update, now it sometimes goes to 50µs. It's probably nothing noticeable, but note that I'm using a computer with a GTX 1060 and an i7 4790.

Also, knowing that you have ~60 updates per second, you go from 6000µs (= 6ms) to 4440µs just for the surface update. Know that there are other updates in the game, such as updates for the lights, for the time, ...

EDIT2: Version 1.3.1 is out!
Be careful if you set the parameter Show Clock to false. It has been changed, so you will have to set it to false again if you still want the clock to disappear in the menu!

+ Added the possibility to activate the time window on the map.
* Modified the parameter that shows the time clock into the menu.
* Some performance improvements
 
Last edited:

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
Yep there is a way to do so ^^ (if I understood you correctly)
By the way, I'm going to tease a bit, but java isn't javascript. MV works with javascript, not java ^^ both are really different languages :D

So, in the LNM_GameTime.js file, you have the class Window_Time at line 768. This is the window you're looking for.
If you wish to remove the time from the menu, just comment the lines 751 to 761.

If you wish to show this window on the map, you'll need to modify the Scene_Map as follows:

Code:
//-----------------------------------------------------------------------------
// Scene_Map
//
// The scene class of the map screen.
var FLZ_GameTime_Scene_Map_create = Scene_Map.prototype.create;
Scene_Map.prototype.create = function() {
 FLZ_GameTime_Scene_Map_create.call(this);
 this._timeWindowShown = null;
}
var FLZ_GameTime_Scene_Map_callMenu = Scene_Map.prototype.callMenu;
Scene_Map.prototype.callMenu = function() {
 FLZ_GameTime_Scene_Map_callMenu.call(this);
 this._timeWindow.hide();
 this._timeWindowShown = false;
}
var FLZ_GameTime_Scene_Map_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function() {
 FLZ_GameTime_Scene_Map_update.call(this);
 if (this._timeWindowShown != null) {
  if (this.isActive() && !this._timeWindowShown) {
   this._timeWindow.show();
   this._timeWindowShown = true;
  }
 
  else if (!this.isActive() && this._timeWindowShown) {
   this._timeWindow.hide();
   this._timeWindowShown = false;
  }
 }
}
var FLZ_GameTime_Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
Scene_Map.prototype.createAllWindows = function() {
    FLZ_GameTime_Scene_Map_createAllWindows.call(this);
    this.createTimeWindow();
}
Scene_Map.prototype.createTimeWindow = function() {
    this._timeWindow = new Window_Time();
    this._timeWindow.x = 0; // You can remove it, or change the 0 to change the top left position on the x axis.
    this._timeWindow.y = 0; // You can remove it, or change the 0 to change the top left position on the y axis.
    this.addWindow(this._timeWindow);
}

I recommend putting these lines under the line 761.

EDIT: Maybe will I keep this code for a future version, so people can show the time while playing if they want.
EDIT2: The window will still be shown while opening the menu, it may be a bit ugly, I'm looking for a way to improve that.
EDIT3: I changed the code so now it hides while opening the menu.


What program are you using to see the line numbers?
 

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
Yep there is a way to do so ^^ (if I understood you correctly)
By the way, I'm going to tease a bit, but java isn't javascript. MV works with javascript, not java ^^ both are really different languages :D

So, in the LNM_GameTime.js file, you have the class Window_Time at line 768. This is the window you're looking for.
If you wish to remove the time from the menu, just comment the lines 751 to 761.

If you wish to show this window on the map, you'll need to modify the Scene_Map as follows:

Code:
//-----------------------------------------------------------------------------
// Scene_Map
//
// The scene class of the map screen.
var FLZ_GameTime_Scene_Map_create = Scene_Map.prototype.create;
Scene_Map.prototype.create = function() {
 FLZ_GameTime_Scene_Map_create.call(this);
 this._timeWindowShown = null;
}
var FLZ_GameTime_Scene_Map_callMenu = Scene_Map.prototype.callMenu;
Scene_Map.prototype.callMenu = function() {
 FLZ_GameTime_Scene_Map_callMenu.call(this);
 this._timeWindow.hide();
 this._timeWindowShown = false;
}
var FLZ_GameTime_Scene_Map_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function() {
 FLZ_GameTime_Scene_Map_update.call(this);
 if (this._timeWindowShown != null) {
  if (this.isActive() && !this._timeWindowShown) {
   this._timeWindow.show();
   this._timeWindowShown = true;
  }
 
  else if (!this.isActive() && this._timeWindowShown) {
   this._timeWindow.hide();
   this._timeWindowShown = false;
  }
 }
}
var FLZ_GameTime_Scene_Map_createAllWindows = Scene_Map.prototype.createAllWindows;
Scene_Map.prototype.createAllWindows = function() {
    FLZ_GameTime_Scene_Map_createAllWindows.call(this);
    this.createTimeWindow();
}
Scene_Map.prototype.createTimeWindow = function() {
    this._timeWindow = new Window_Time();
    this._timeWindow.x = 0; // You can remove it, or change the 0 to change the top left position on the x axis.
    this._timeWindow.y = 0; // You can remove it, or change the 0 to change the top left position on the y axis.
    this.addWindow(this._timeWindow);
}

I recommend putting these lines under the line 761.

EDIT: Maybe will I keep this code for a future version, so people can show the time while playing if they want.
EDIT2: The window will still be shown while opening the menu, it may be a bit ugly, I'm looking for a way to improve that.
EDIT3: I changed the code so now it hides while opening the menu.

That worked perfectly. thank you
 

cjewell77

Regular
Regular
Joined
Nov 4, 2015
Messages
65
Reaction score
3
First Language
English
great update love it
 
Last edited:

Latest Threads

Latest Profile Posts



Boring: Using RPG Maker's default inventory function.
Based: Using SRD's Skill Extender to make submenus that split up items based on their use.

... Also I plan to use this for containing different levels of the same skill into one place.
Couple shots of my own window and button set stuff in action.
Likely Lads.gif
These ones write themselves!
I just saw someone's post that had an instagram link. I have yet to be able to open that site up once, ever, or have an embed of it work (it just straight up won't show either of them). And I haven't really found a reason to try to fix the problem, either XD
I want to go play piano now. This is gonna be my stopping point today (yes, I’m very slow at drafting). Might have a few too many curly Qs? Obviously gotta finish the limbs and clean up. There are a few more outfit details I need to add. Probably going to do a background so that the pose makes sense, LOL.

IMG_0515.jpeg

Forum statistics

Threads
135,053
Messages
1,253,335
Members
178,031
Latest member
A-mn3
Top