查看: 1893|回复: 5

[已经解决] 怎么把这个窗口的弄成透明的

[复制链接]
梦石
0
星屑
647
在线时间
165 小时
注册时间
2012-4-18
回帖
237
发表于 2016-1-25 15:05:03 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 余烬之中 于 2016-8-3 09:37 编辑

如题,装载了MOG的时间系统插件:MOG_TimeSystem.js。它会绘制一个窗口在左上角。如下图:

我想把这个绘制的窗口弄成完全透明的,没有边框,没有半透明背景,但不影响里面的两行文字的显示。达到下图效果:

欸,下面那张图的效果是我把代码写到另一个插件里实现的,确定是不会实时显示当前时间,只有画面刷新的时候会赋值一次,这缺点无敌了= =
求问各路大神有没有什么办法实现这个效果。下面附上原始插件。
  1. //=============================================================================
  2. // MOG_TimeSystem.js
  3. //=============================================================================

  4. /*:
  5. * @plugindesc (v1.2) Sistema dinámico de tempo.
  6. * @author Moghunter
  7. *
  8. * @param >> MAIN ===================
  9. * @desc
  10. * @default
  11. *
  12. * @param Active Time
  13. * @desc Ativar o sistema de tempo em tempo real.
  14. * @default true
  15. *
  16. * @param Stop During EventRunning
  17. * @desc Parar o sistema ativo durante as cenas evento.
  18. * @default true  
  19. *
  20. * @param Stop During Dialogs
  21. * @desc Parar o sistema ativo durante os dialogos.
  22. * @default true
  23. *
  24. * @param Time Speed
  25. * @desc Definição da velocidade do tempo.
  26. * 1 - 3000
  27. * @default 120
  28. *
  29. * @param Tint Screen
  30. * @desc Ativar a tonalidade do tempo.
  31. * @default true   
  32. *
  33. * @param Transition Speed
  34. * @desc Definição da velocidade de transição entre as fases do dia.
  35. * @default 160
  36. *
  37. * @param >> WORDS ===================
  38. * @desc
  39. * @default
  40. *
  41. * @param Day Week Names
  42. * @desc Definição do nome dos dias da semana.
  43. * @default Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
  44. *
  45. * @param Season Names
  46. * @desc Definição do nome das estações do ano.
  47. * @default Spring,Summer,Fall,Winter
  48. *
  49. * @param Month Names
  50. * @desc Definição do nome dos meses do ano.
  51. * @default January,February,March,April,May,June,July,August,September,October,November,December
  52. *
  53. * @param Time Word
  54. * @desc Definição da palavra tempo.
  55. * @default Time
  56. *
  57. * @param Day Word
  58. * @desc Definição da palavra dia.
  59. * @default Day
  60. *
  61. * @param Day Week Word
  62. * @desc Definição da palavra dia da semana.
  63. * @default Day of Week
  64. *
  65. * @param Month Word
  66. * @desc Definição da palavra mês.
  67. * @default Month
  68. *
  69. * @param Season Word
  70. * @desc Definição da palavra estação.
  71. * @default Season
  72. *
  73. * @param Year Word
  74. * @desc Definição da palavra ano.
  75. * @default Year
  76. *
  77. * @param Play Time Word
  78. * @desc Definição da palavra tempo de jogo.
  79. * @default Play Time
  80. *
  81. * @param >> SWITCHES ===================
  82. * @desc
  83. * @default
  84. *
  85. * @param Dawn Switch ID
  86. * @desc Definição da Switch correspondente ao alvorecer.
  87. * @default 21
  88. *
  89. * @param Sunrise Switch ID
  90. * @desc Definição da Switch correspondente ao nascer do sol.
  91. * @default 22
  92. *
  93. * @param Day Switch ID
  94. * @desc Definição da Switch correspondente ao dia.
  95. * @default 23
  96. *
  97. * @param Sunset Switch ID
  98. * @desc Definição da Switch correspondente ao pôr do sol.
  99. * @default 24
  100. *
  101. * @param Dusk Switch ID
  102. * @desc Definição ds Switch correspondente ao crepúsculo.
  103. * @default 25
  104. *
  105. * @param Night Switch ID
  106. * @desc Definição da Switch correspondente a noite.
  107. * @default 26
  108. *
  109. * @param Day Shift Switch ID
  110. * @desc Definição da Switch correspondente do turno do dia.
  111. * @default 27
  112. *
  113. * @param Night Shift Switch ID
  114. * @desc Definição da Switch correspondente do turno da noite.
  115. * @default 28
  116. *
  117. * @param Day Week Switches IDs
  118. * @desc Definição das Switches correspondente aos dias da semana.
  119. * @default 29,30,31,32,33,34,35
  120. *
  121. * @param Month Switches IDs
  122. * @desc Definição das Switches correspondente aos meses.
  123. * @default 40,41,42,43,44,45,46,47,48,49,50,51
  124. *
  125. * @param Season Switches IDs
  126. * @desc Definição das Switches correspondente as estações.
  127. * @default 36,37,38,39
  128. *
  129. * @param >> VARIABLES ===================
  130. * @desc
  131. * @default  
  132. *
  133. * @param Hour Variable ID
  134. * @desc Definição das variável correspondente as horas.
  135. * @default 10  
  136. *
  137. * @param Day Variable ID
  138. * @desc Definição das variável correspondente os dias.
  139. * @default 11
  140. *
  141. * @param Year Variable ID
  142. * @desc Definição das variável correspondente os anos.
  143. * @default 12
  144. *
  145. * @param >> TIME MAX ===================
  146. * @desc
  147. * @default   
  148. *
  149. * @param Max Minute
  150. * @desc Definição dos minutos maximo.
  151. * @default 60
  152. *
  153. * @param Max Day
  154. * @desc Definição dos dias maximo.
  155. * @default 30
  156. *
  157. * @param Max Day Week
  158. * @desc Definição dos dias da semana maximo.
  159. * @default 7
  160. *
  161. * @param Max Month
  162. * @desc Definição dos meses maximo.
  163. * @default 12
  164. *
  165. * @param Max Season
  166. * @desc Definição das estações maxima.
  167. * @default 4
  168. *
  169. * @param Season Interval
  170. * @desc Definição do intervalo de meses para mudar de estação.
  171. * @default 3  
  172. *
  173. * @param >> START TIME ===================
  174. * @desc
  175. * @default
  176. *
  177. * @param Start Hour
  178. * @desc Definição do minuto inicial.
  179. * @default 12
  180. *
  181. * @param Start Day
  182. * @desc Definição do dia inicial.
  183. * @default 1
  184. *
  185. * @param Start Month
  186. * @desc Definição do mês inicial.
  187. * @default 1
  188. *
  189. * @param Start Season
  190. * @desc Definição do estação inicial.
  191. * @default 1  
  192. *
  193. * @param Start Year
  194. * @desc Definição do ano inicial.
  195. * @default 1
  196. *
  197. * @param >> TONES ===================
  198. * @desc
  199. * @default
  200. *
  201. * @param Sunset Tone
  202. * @desc Definição da tonalidade.
  203. * Red,Green,Blue,Alpha      (48,-14,-14,0)
  204. * @default 48,-14,-14,0
  205. *
  206. * @param Dusk Tone
  207. * @desc Definição da tonalidade.
  208. * Red,Green,Blue,Alpha      (-90,-90,-90,0)
  209. * @default -90,-90,-90,0
  210. *
  211. * @param Night Tone
  212. * @desc Definição da tonalidade.
  213. * Red,Green,Blue,Alpha     (-128,-128,-128,0)
  214. * @default -128,-128,-128,0
  215. *
  216. * @param Dawn Tone
  217. * @desc Definição da tonalidade.
  218. * Red,Green,Blue,Alpha       (-90,-90,-90,0)
  219. * @default -90,-90,-90,0
  220. *
  221. * @param Sunrise Tone
  222. * @desc Definição da tonalidade.
  223. * Red,Green,Blue,Alpha      (60,60,60,0)
  224. * @default 60,60,60,0
  225. *
  226. * @param Day Tone
  227. * @desc Definição da tonalidade.
  228. * Red,Green,Blue,Alpha       (0,0,0,0)
  229. * @default 0,0,0,0
  230. *
  231. * @param >> WINDOWS ===================
  232. * @desc
  233. * @default
  234. *
  235. * @param Display PM Mode
  236. * @desc Apresentar as horas no modo AM e PM.
  237. * @default true  
  238. *
  239. * @param Window Time Map Visible
  240. * @desc Apresentar a janela de tempo no mapa.
  241. * @default true
  242. *
  243. * @param Window Time Menu Visible
  244. * @desc Apresentar a janela de tempo no menu.
  245. * @default true
  246. *
  247. * @param Window Time Map X-Axis
  248. * @desc Definição da posição X-axis da janela de tempo.
  249. * @default 576
  250. *
  251. * @param Window Time Map Y-Axis
  252. * @desc Definição da posição Y-axis da janela de tempo.
  253. * @default 0
  254. *
  255. * @param Window Time Menu X-Axis
  256. * @desc Definição da posição X-axis da janela de tempo.
  257. * @default 0
  258. *
  259. * @param Window Time Menu Y-Axis
  260. * @desc Definição da posição Y-axis da janela de tempo.
  261. * @default 324
  262. *
  263. * @help  
  264. * =============================================================================
  265. * +++ MOG Time System (v1.2) +++
  266. * By Moghunter
  267. * [url]https://atelierrgss.wordpress.com/[/url]
  268. * =============================================================================
  269. * Sistema dinámico de tempo com manipulação de switches e variáveis em tempo
  270. * real. O plugin permite criar eventos baseados nas horas ou até mesmo nos
  271. * dias da semana e estações do ano.
  272. * Por exemplo, com plugin é possível criar um evento de uma loja que ficará
  273. * aberto apenas no turno da noite, ou até mesmo criar um festival que ocorrerá
  274. * apenas aos domingos.
  275. * Ainda é possível desativar o sistema de tempo em tempo real e manipular o
  276. * tempo manualmente, usando os comandos de eventos, semelhante ao jogo PERSONA.
  277. * =============================================================================
  278. * NOTA 1 - Tudo é customizável com exceção da quantidade maxima de horas do dia,
  279. * devido ao sistema de fases do dia. (dawn,sunrise,day,sunset,dusk,night)
  280. * NOTA 2 - O comando de evento TINT SCREEN não funciona em mapas com o sistema
  281. * de tint screen de tempo ativado.
  282. * NOTA 3 - O cálculo dos dias da semana é baseado na soma total dos anos,meses,
  283. * e dias do mês.
  284. * =============================================================================
  285. * Para desativar o sistema de tempo em determinados mapas use o comentário
  286. * abaixo na caixa de notas do mapa.
  287. *
  288. * <Disable Time System>
  289. *
  290. * =============================================================================
  291. * Para desativar a tonalidade do tempo em determinados mapas use o comentário
  292. * abaixo na caixa de notas do mapa.
  293. *
  294. * <Disable Tint Screen>
  295. *
  296. * =============================================================================
  297. * Para mostrar ou ocultar a janela use os comandos abaixo através do comando
  298. * Plugin Command.
  299. *
  300. * show_clock
  301. * hide_clock
  302. *
  303. * =============================================================================
  304. * Para forçar ativar ou desativar o sistema de tempo use os comandos abaixo
  305. * através do comando Plugin Command.
  306. *
  307. * enable_time
  308. * disable_time
  309. *
  310. * =============================================================================
  311. * Sistema de fases do dia.  
  312. *
  313. * Dawn        = 3am  - 5am
  314. * Sunrise     = 6am  - 8am
  315. * Day         = 9am  - 14pm
  316. * Sunset      = 15pm - 17pm
  317. * Dusk        = 18pm - 20pm
  318. * Night       = 21pm - 2am
  319. * Day Shift   = 9am  - 18pm
  320. * Night Shift = 21pm - 6am
  321. * =============================================================================
  322. * Para manipular o tempo manualmente use os códigos abaixo através do comando
  323. * chamar script.
  324. *
  325. * $gameSystem.time_system(boolean)
  326. * $gameSystem.tint_screen(boolean)
  327. * $gameSystem.record_tone
  328. * $gameSystem.restore_tone
  329. * $gameSystem.set_time_speed(value)
  330. * $gameSystem.set_minute(value)
  331. * $gameSystem.set_hour(value)
  332. * $gameSystem.set_day(value)
  333. * $gameSystem.set_month(value)
  334. * $gameSystem.set_year(value)
  335. * $gameSystem.set_season(value)
  336. * $gameSystem.add_minute(value)
  337. * $gameSystem.add_hour(value)
  338. * $gameSystem.add_day(value)
  339. * $gameSystem.add_month(value)
  340. * $gameSystem.add_year(value)
  341. * $gameSystem.add_season(value)
  342. *
  343. * =============================================================================
  344. * HISTÓRICO
  345. * =============================================================================
  346. * v1.2 - Correção do efeito blinking da janela durante os dialogos.
  347. *      - Adição de comandos de Plugin de ativar ou desativar o sistema de tempo.
  348. *      - Adição de comandos de Plugin de ativar ou desativar a janela de tempo.
  349. * v1.1 - Correção do texto AM na hora das 12:00 da tarde.
  350. *
  351. */

  352. //=============================================================================
  353. // ** PLUGIN PARAMETERS
  354. //=============================================================================
  355.   var Imported = Imported || {};
  356.   Imported.MOG_TimeSystem = true;
  357.   var Moghunter = Moghunter || {};

  358.     // MAIN
  359.    Moghunter.parameters = PluginManager.parameters('MOG_TimeSystem');
  360.         Moghunter.time_speed = Number(Moghunter.parameters['Time Speed'] || 120);
  361.         Moghunter.day_phase_trspd = Number(Moghunter.parameters['Transition Speed'] || 120);
  362.         Moghunter.time_active_mode = String(Moghunter.parameters['Active Time'] || true);
  363.         Moghunter.time_tint_mode = String(Moghunter.parameters['Tint Screen'] || true);
  364.         Moghunter.time_stop_message = String(Moghunter.parameters['Stop During Dialogs'] || true);
  365.         Moghunter.time_stop_interpreter = String(Moghunter.parameters['Stop During EventRunning'] || true);
  366.        
  367.         // VARIABLES
  368.         Moghunter.sec_variableId = Number(Moghunter.parameters['Second Variable ID'] || 10101);
  369.         Moghunter.min_variableId = Number(Moghunter.parameters['Mininute Variable ID'] || 10102);
  370.         Moghunter.hour_variableId = Number(Moghunter.parameters['Hour Variable ID'] || 10);
  371.         Moghunter.day_variableId = Number(Moghunter.parameters['Day Variable ID'] || 11);
  372.         Moghunter.day_week_variableId = Number(Moghunter.parameters['Day Week Variable ID'] || 10104);
  373.         Moghunter.month_variableId = Number(Moghunter.parameters['Month Variable ID'] || 10005);
  374.         Moghunter.season_variableId = Number(Moghunter.parameters['Season Variable ID'] || 10106);
  375.         Moghunter.year_variableId = Number(Moghunter.parameters['Year Variable ID'] || 12);       
  376.         // SWITCHES
  377.         Moghunter.dawn_switchId = Number(Moghunter.parameters['Dawn Switch ID'] || 21);
  378.         Moghunter.sunrise_switchId = Number(Moghunter.parameters['Sunrise Switch ID'] || 22);
  379.         Moghunter.day_switchId = Number(Moghunter.parameters['Day Switch ID'] || 23);
  380.         Moghunter.sunset_switchId = Number(Moghunter.parameters['Sunset Switch ID'] || 24);
  381.     Moghunter.dusk_switchId = Number(Moghunter.parameters['Dusk Switch ID'] || 25);
  382.         Moghunter.night_switchId = Number(Moghunter.parameters['Night Switch ID'] || 26);       
  383.     Moghunter.day_phase_switchId = Number(Moghunter.parameters['Day Shift Switch ID'] || 27);
  384.         Moghunter.night_phase_switchId = Number(Moghunter.parameters['Night Shift Switch ID'] || 28);       
  385.         Moghunter.day_week_switches = Object(Moghunter.parameters['Day Week Switches IDs'] || []);
  386.         Moghunter.month_switches = Object(Moghunter.parameters['Month Switches IDs'] || []);
  387.         Moghunter.season_switches = Object(Moghunter.parameters['Season Switches IDs'] || []);               
  388.         // START       
  389.         Moghunter.start_minute = Number(Moghunter.parameters['Start Minute'] || 0);
  390.     Moghunter.start_hour = Number(Moghunter.parameters['Start Hour'] || 12);
  391.     Moghunter.start_day = Number(Moghunter.parameters['Start Day'] || 1);
  392.         Moghunter.start_month = Number(Moghunter.parameters['Start Month'] || 1);
  393.         Moghunter.start_year = Number(Moghunter.parameters['Start Year'] || 1);       
  394.         Moghunter.start_day_week = Number(Moghunter.parameters['Start Day Week'] || 1);       
  395.         Moghunter.start_season = Number(Moghunter.parameters['Start Season'] || 1);       
  396.     // MAX       
  397.         Moghunter.min_max = Number(Moghunter.parameters['Max Minute'] || 60);
  398.         Moghunter.hour_max = Number(Moghunter.parameters['Max hour'] || 24);
  399.         Moghunter.day_max = Number(Moghunter.parameters['Max Day'] || 30);
  400.         Moghunter.day_week_max = Number(Moghunter.parameters['Max Day Week'] || 7);
  401.         Moghunter.month_max = Number(Moghunter.parameters['Max Month'] || 12);
  402.         Moghunter.season_max = Number(Moghunter.parameters['Max Season'] || 4);
  403.         Moghunter.season_interval = Number(Moghunter.parameters['Season Interval'] || 3);
  404.         // WORDS
  405.         Moghunter.day_week_names = Object(Moghunter.parameters['Day Week Names'] || "Day Week 1");
  406.         Moghunter.month_names = Object(Moghunter.parameters['Month Names'] || "Month 1");
  407.         Moghunter.season_names = Object(Moghunter.parameters['Season Names'] || "Season 1");
  408.         Moghunter.time_word = Object(Moghunter.parameters['Time Word'] || "Time");
  409.         Moghunter.day_word = Object(Moghunter.parameters['Day Word'] || "Day");
  410.         Moghunter.day_week_word = Object(Moghunter.parameters['Day Week Word'] || "Day of Week");
  411.         Moghunter.month_word = Object(Moghunter.parameters['Month Word'] || "Month");
  412.         Moghunter.season_word = Object(Moghunter.parameters['Season Word'] || "Season");
  413.         Moghunter.year_word = Object(Moghunter.parameters['Year Word'] || "Year");
  414.         Moghunter.play_time_word = Object(Moghunter.parameters['Play Time Word'] || "Play Time");
  415.         // TONES
  416.         Moghunter.sunset_tone = Object(Moghunter.parameters['Sunset Tone'] || null);
  417.         Moghunter.dusk_tone = Object(Moghunter.parameters['Dusk Tone'] || null);
  418.         Moghunter.night_tone = Object(Moghunter.parameters['Night Tone'] || null);
  419.         Moghunter.dawn_tone = Object(Moghunter.parameters['Dawn Tone'] || null);
  420.         Moghunter.sunrise_tone = Object(Moghunter.parameters['Sunrise Tone'] || null);
  421.         Moghunter.day_tone = Object(Moghunter.parameters['Day Tone'] || null);       
  422.         // WINDOWS       
  423.         Moghunter.display_pm_mode = String(Moghunter.parameters['Display PM Mode'] || true);
  424.         Moghunter.timeWindow_map = String(Moghunter.parameters['Window Time Map Visible'] || true);
  425.         Moghunter.timeWindow_menu = String(Moghunter.parameters['Window Time Menu Visible'] || true);
  426.     Moghunter.timeWindow_X = Number(Moghunter.parameters['Window Time Map X-Axis'] || 576);
  427.         Moghunter.timeWindow_Y = Number(Moghunter.parameters['Window Time Map Y-Axis'] || 0);       
  428.     Moghunter.timeWindow_menu_X = Number(Moghunter.parameters['Window Time Menu X-Axis'] || 0);
  429.         Moghunter.timeWindow_menu_Y = Number(Moghunter.parameters['Window Time Menu Y-Axis'] || 324);
  430.        
  431.        
  432. //=============================================================================
  433. // ** Game_Interpreter
  434. //=============================================================================       

  435. //==============================
  436. // * PluginCommand
  437. //==============================
  438. var _alias_mog_timeSystem_pluginCommand = Game_Interpreter.prototype.pluginCommand
  439. Game_Interpreter.prototype.pluginCommand = function(command, args) {
  440.         _alias_mog_timeSystem_pluginCommand.call(this,command, args)
  441.         if (command === "show_clock")  {$gameSystem._time_window_visible = true;};
  442.         if (command === "hide_clock")  {$gameSystem._time_window_visible = false;};
  443.         if (command === "enable_time")  {$gameSystem._time_sys_active = true;};
  444.         if (command === "disable_time")  {$gameSystem._time_sys_active = false;};
  445.         return true;
  446. };
  447.        
  448. //=============================================================================
  449. // ** Game Map
  450. //=============================================================================

  451. //==============================
  452. // * Setup
  453. //==============================
  454. var _alias_mog_timesys_gmap_setup = Game_Map.prototype.setup;
  455. Game_Map.prototype.setup = function(mapId) {
  456.     _alias_mog_timesys_gmap_setup.call(this,mapId)       
  457.         if ($gameSystem._time_data) {this.set_time_sys_map()};
  458. };

  459. //==============================
  460. // * Set Time Sys Map
  461. //==============================
  462. Game_Map.prototype.set_time_sys_map = function(mapId) {       
  463.         $gameSystem._time_data[3] = true;
  464.         $gameSystem._time_data[4] = true;
  465.         $gameScreen._tone = $gameSystem._tone_data;
  466.         this._timesys_tintscreen = true;
  467.     this.notetags().forEach(function(note) {
  468.          if (note === "<Disable Time System>" || String(Moghunter.time_active_mode) != "true") {
  469.                          $gameSystem._time_data[3] = false};
  470.                  if (note === "<Disable Tint Screen>" || String(Moghunter.time_tint_mode) != "true") {
  471.                          $gameScreen.startTint([0,0,0,0], 0); $gameSystem._time_data[4] = false; this._timesys_tintscreen = false;};
  472.         },this);
  473.         if (this._timesys_tintscreen) {$gameSystem.time_system_clear()        };
  474. };

  475. //==============================
  476. // * Notetags
  477. //==============================
  478. Game_Map.prototype.notetags = function() {
  479.         return $dataMap.note.split(/[\r\n]+/);
  480. };

  481. //=============================================================================
  482. // ** Game Interpreter
  483. //=============================================================================

  484. //==============================
  485. // * Command223
  486. //==============================
  487. var _alias_mog_timesys_ginter_command223 = Game_Interpreter.prototype.command223;
  488. Game_Interpreter.prototype.command223 = function() {
  489.         if ($gameMap._timesys_tintscreen) {return true};
  490.     _alias_mog_timesys_ginter_command223.call(this);
  491.         return true;
  492. };

  493. //=============================================================================
  494. // ** Game Switches
  495. //=============================================================================

  496. //==============================
  497. // * OnChange
  498. //==============================
  499. var _alias_mog_timesys_gswtc_onChange = Game_Switches.prototype.onChange
  500. Game_Switches.prototype.onChange = function() {
  501.     _alias_mog_timesys_gswtc_onChange.call(this);
  502.         if ($gameSystem._time_data) {$gameSystem.set_base_time_phase();};
  503. };

  504. //=============================================================================
  505. // ** Game Variables
  506. //=============================================================================

  507. //==============================
  508. // * Set Value
  509. //==============================
  510. var _alias_mog_timesys_variables_setValue = Game_Variables.prototype.setValue
  511. Game_Variables.prototype.setValue = function(variableId, value) {
  512.         _alias_mog_timesys_variables_setValue.call(this,variableId, value);
  513.     if ($gameSystem._time_data && this.is_time_variable(variableId)) {$gameSystem.refresh_time(0,variableId);$gameSystem.set_base_time_phase();};
  514. };

  515. //==============================
  516. // * Is Time Variable
  517. //==============================
  518. Game_Variables.prototype.is_time_variable = function(variableId) {
  519.         if (Moghunter.sec_variableId === variableId) {return true};
  520.         if (Moghunter.min_variableId === variableId) {return true};
  521.         if (Moghunter.hour_variableId === variableId) {return true};
  522.         if (Moghunter.day_variableId === variableId) {return true};
  523.         if (Moghunter.month_variableId === variableId) {return true};
  524.         if (Moghunter.year_variableId === variableId) {return true};
  525.         if (Moghunter.day_week_variableId === variableId) {return true};
  526.         if (Moghunter.season_variableId === variableId) {return true};       
  527.         return false;
  528. };

  529. //=============================================================================
  530. // ** DataManager
  531. //=============================================================================

  532. //==============================
  533. // * Setup New Game
  534. //==============================
  535. var _alias_mog_timesys_dtmag_setupNewGame =  DataManager.setupNewGame
  536. DataManager.setupNewGame = function() {
  537.         _alias_mog_timesys_dtmag_setupNewGame.call(this)
  538.         $gameSystem.setup_time_system();
  539. };

  540. //=============================================================================
  541. // ** Game System
  542. //=============================================================================

  543. //==============================
  544. // * Setup Time System
  545. //==============================
  546. Game_System.prototype.setup_time_system = function() {       
  547.     this._stop_time_message = false;
  548.     this._stop_time_interpreter = false;
  549.         this._time_window_visible = true;
  550.         this._time_sys_active = true;
  551.         if (String(Moghunter.time_stop_message) === "true") {this._stop_time_message = true};
  552.         if (String(Moghunter.time_stop_interpreter) === "true") {this._stop_time_interpreter = true};
  553.         this._old_play_time = this.playtime();
  554.         this._refresh_window_time = false;
  555.         this._time_data = [0,0,-1,true,true];
  556.         this._time_data[0] = Math.min(Math.max(Moghunter.time_speed,1),3000);
  557.         this._time_data[0] *= 2;
  558.         this._time_data[5] = Math.min(Math.max(Moghunter.day_phase_trspd,10),999);
  559.         this.setup_name_tm();
  560.         this.setup_tone_tm();
  561.         this.setup_max_tm();
  562.     this.setup_variable_tm();
  563.         this.setup_switch_tm();
  564.     this.time_system_clear();
  565. };

  566. //==============================
  567. // * Setup Name TM
  568. //==============================
  569. Game_System.prototype.setup_name_tm = function() {
  570.         this._day_week_names = [];
  571.         this._season_names = [];
  572.         this._month_names = [];
  573.     this.set_time_var(this._day_week_names,Moghunter.day_week_names,0);
  574.     this.set_time_var(this._season_names,Moghunter.season_names,0);
  575.         this.set_time_var(this._month_names,Moghunter.month_names,0);       
  576. };

  577. //==============================
  578. // * Setup Tone TM
  579. //==============================
  580. Game_System.prototype.setup_tone_tm = function() {
  581.         this._tone_data = [0,0,0,0];
  582.         this._day_phase_tone = [[],[],[],[],[],[]];
  583.         this.set_time_var(this._day_phase_tone[0],Moghunter.sunset_tone,1);
  584.         this.set_time_var(this._day_phase_tone[1],Moghunter.day_tone,1);
  585.         this.set_time_var(this._day_phase_tone[2],Moghunter.dusk_tone,1);
  586.         this.set_time_var(this._day_phase_tone[3],Moghunter.night_tone,1);
  587.         this.set_time_var(this._day_phase_tone[4],Moghunter.dawn_tone,1);
  588.         this.set_time_var(this._day_phase_tone[5],Moghunter.sunrise_tone,1);
  589. };       

  590. //==============================
  591. // * Setup Max TM
  592. //==============================
  593. Game_System.prototype.setup_max_tm = function() {
  594.         this._min_max = Math.min(Math.max(Moghunter.min_max,1),999);
  595.         this._hour_max = Math.min(Math.max(Moghunter.hour_max,1),999);
  596.         this._day_max  = Math.min(Math.max(Moghunter.day_max + 1,1),999);
  597.         this._day_week_max = Math.min(Math.max(Moghunter.day_week_max,1),999);
  598.         this._month_max =  Math.min(Math.max(Moghunter.month_max,1),999);
  599.         this._season_max = Math.min(Math.max(Moghunter.season_max,1),999);
  600.         this._season_interval = [0, Math.min(Math.max(Moghunter.season_interval,1),999)];
  601.         this._total_days_week = 0;
  602. };

  603. //==============================
  604. // * Setup Variable TM
  605. //==============================
  606. Game_System.prototype.setup_variable_tm = function() {
  607.         this._sec_variableId = Moghunter.sec_variableId;
  608.         this._min_variableId = Moghunter.min_variableId;
  609.         this._hour_variableId = Moghunter.hour_variableId;
  610.         this._day_variableId = Moghunter.day_variableId;
  611.         this._month_variableId = Moghunter.month_variableId;
  612.         this._year_variableId = Moghunter.year_variableId;
  613.         this._day_week_variableId = Moghunter.day_week_variableId;
  614.         this._season_variableId = Moghunter.season_variableId;       
  615.     $gameVariables._data[this._sec_variableId] = 0;
  616.         $gameVariables._data[this._min_variableId] = Math.min(Math.max(Moghunter.start_minute,0),this.max_time(this._min_variableId) - 1);
  617.         $gameVariables._data[this._hour_variableId] = Math.min(Math.max(Moghunter.start_hour,0),this.max_time(this._hour_variableId) - 1);
  618.         $gameVariables._data[this._day_variableId] = Math.min(Math.max(Moghunter.start_day,1),this.max_time(this._month_variableId) - 1);
  619.         $gameVariables._data[this._month_variableId] = Math.min(Math.max(Moghunter.start_month - 1,0),this.max_time(this._year_variableId) - 1);
  620.         $gameVariables._data[this._year_variableId] = Math.min(Math.max(Moghunter.start_year,0),9999);
  621.         $gameVariables._data[this._day_week_variableId] = Math.min(Math.max(Moghunter.start_day_week - 1,0),this.max_time(this._day_week_variableId) - 1);
  622.         $gameVariables._data[this._season_variableId] = Math.min(Math.max(Moghunter.start_season - 1,0),this.max_time(this._season_variableId) - 1);
  623. };

  624. //==============================
  625. // * Setup Switch TM
  626. //==============================
  627. Game_System.prototype.setup_switch_tm = function() {
  628.         this._dawn_switchId = Moghunter.dawn_switchId;
  629.         this._sunrise_switchId = Moghunter.sunrise_switchId;       
  630.         this._day_switchId = Moghunter.day_switchId;
  631.         this._sunset_switchId = Moghunter.sunset_switchId;
  632.         this._dusk_switchId = Moghunter.dusk_switchId;
  633.         this._night_switchId = Moghunter.night_switchId;
  634.         this._day_phase_switchId = Moghunter.day_phase_switchId;
  635.         this._night_phase_switchId = Moghunter.night_phase_switchId;
  636.         this._day_phase_switches = [this._dawn_switchId,this._sunrise_switchId,this._day_switchId,
  637.         this._sunset_switchId,this._dusk_switchId,this._night_switchId,this._day_phase_switchId,
  638.         this._night_phase_switchId];
  639.         this._day_week_switches = [];
  640.         this._month_switches = [];
  641.         this._season_switches = [];
  642.         if (Moghunter.day_week_switches.length > 0){this.set_time_var(this._day_week_switches,Moghunter.day_week_switches,1);};
  643.         if (Moghunter.month_switches.length > 0){this.set_time_var(this._month_switches,Moghunter.month_switches,1);};
  644.         if (Moghunter.season_switches.length > 0){this.set_time_var(this._season_switches,Moghunter.season_switches,1);};
  645.         for (var i = 0; i < this._day_phase_switches.length; i++) {
  646.                  $gameSwitches._data[Number(this._day_phase_switches[i])] = false;
  647.         };       
  648.         for (var i = 0; i < this._day_week_switches.length; i++) {
  649.                  $gameSwitches._data[Number(this._day_week_switches[i])] = false;
  650.         };       
  651.         for (var i = 0; i < this._month_switches.length; i++) {
  652.                  $gameSwitches._data[this._month_switches[i]] = false;
  653.         };               
  654.         for (var i = 0; i < this._season_switches.length; i++) {
  655.                  $gameSwitches._data[this._season_switches[i]] = false;
  656.         };       
  657. };

  658. //==============================
  659. // * Set Time Var
  660. //==============================
  661. Game_System.prototype.set_time_var = function(object,value,type) {
  662.         var s = value.split(',');
  663.         if (type === 0){
  664.                 for (var i = 0; i < s.length; i++) {object.push(String(s[i]));        };
  665.         }
  666.     else {
  667.             for (var i = 0; i < s.length; i++) {object.push(Number(s[i]));        };
  668.    };
  669. };

  670. //==============================
  671. // * Set Base Time
  672. //==============================
  673. Game_System.prototype.set_base_time_phase = function() {
  674.         this.set_day_phase();
  675.         this.set_day_week();
  676.         this.refresh_season();       
  677. };

  678. //==============================
  679. // * Time System Clear
  680. //==============================
  681. Game_System.prototype.time_system_clear = function() {
  682.         this.set_base_time_phase();
  683.     $gameScreen._tone = this.set_tint_phase()
  684.         $gameScreen.startTint(this.set_tint_phase(),1)
  685.         this._refresh_window_time = true;
  686. };

  687. //==============================
  688. // * Restore Tone
  689. //==============================
  690. Game_System.prototype.restore_tone = function() {
  691.         this.set_base_time_phase();
  692.     $gameScreen._tone = this._tone_data;
  693.         $gameScreen.startTint(this._tone_data, 1);
  694.         $gameMap.requestRefresh();
  695. };

  696. //==============================
  697. // * Record Tone
  698. //==============================
  699. Game_System.prototype.record_tone = function() {
  700.     this._tone_data = $gameScreen._tone;
  701. };

  702. //==============================
  703. // * Time System
  704. //==============================
  705. Game_System.prototype.time_system = function(value) {
  706.    this._time_data[3] = value;
  707. };

  708. //==============================
  709. // * Tint Screen
  710. //==============================
  711. Game_System.prototype.tint_screen = function(value) {
  712.    this._time_data[4] = value;
  713. };

  714. //==============================
  715. // * Set Time Speed
  716. //==============================
  717. Game_System.prototype.set_time_speed = function(value) {
  718.         this._time_data[0] = Math.min(Math.max(value,1),3000);
  719.         this._time_data[0] *= 2;
  720. };

  721. //==============================
  722. // * Set Minute
  723. //==============================
  724. Game_System.prototype.set_minute = function(value) {
  725.    var value_real = Math.min(Math.max(value,0),this.max_time(this._min_variableId) - 1);
  726.    $gameVariables._data[this._min_variableId] = value_real;
  727.    this.time_system_clear();
  728. };

  729. //==============================
  730. // * Set Hour
  731. //==============================
  732. Game_System.prototype.set_hour = function(value) {
  733.    var value_real = Math.min(Math.max(value,0),this.max_time(this._hour_variableId) - 1);
  734.    $gameVariables._data[this._hour_variableId] = value_real;
  735.    this.time_system_clear();
  736. };

  737. //==============================
  738. // * Set Day
  739. //==============================
  740. Game_System.prototype.set_day = function(value) {
  741.    var value_real = Math.min(Math.max(value,0),this.max_time(this._day_variableId) - 1);
  742.    $gameVariables._data[this._day_variableId] = value_real;
  743.    this.time_system_clear();
  744. };

  745. //==============================
  746. // * Set Month
  747. //==============================
  748. Game_System.prototype.set_month = function(value) {
  749.    var value_real = Math.min(Math.max(value - 1,0),this.max_time(this._month_variableId) - 1);
  750.    $gameVariables._data[this._month_variableId] = value_real;
  751.    this.time_system_clear();
  752. };

  753. //==============================
  754. // * Set Year
  755. //==============================
  756. Game_System.prototype.set_year = function(value) {
  757.    var value_real = Math.min(Math.max(value - 1,0),this.max_time(this._year_variableId));
  758.    $gameVariables._data[this._year_variableId] = value_real;
  759.    this.time_system_clear();
  760. };

  761. //==============================
  762. // * Set Season
  763. //==============================
  764. Game_System.prototype.set_season = function(value) {
  765.    var value_real = Math.min(Math.max(value - 1,0),this.max_time(this._season_variableId));
  766.    $gameVariables._data[this._season_variableId] = value_real;
  767.    this.time_system_clear();
  768. };

  769. //==============================
  770. // * Add Minute
  771. //==============================
  772. Game_System.prototype.add_minute = function(value) {
  773.    $gameVariables._data[this._min_variableId] += value;
  774.    if ($gameVariables._data[this._min_variableId]  >= this.max_time(this._min_variableId)) {this.refresh_time(1,this._minute_variableId)};
  775.    this.check_max_time(this._min_variableId);   
  776.    this.time_system_clear();
  777. };

  778. //==============================
  779. // * Add Hour
  780. //==============================
  781. Game_System.prototype.add_hour = function(value) {
  782.    $gameVariables._data[this._hour_variableId] += value;
  783.    if ($gameVariables._data[this._hour_variableId]  >= this.max_time(this._hour_variableId)) {this.refresh_time(1,this._hour_variableId)};
  784.    this.check_max_time(this._hour_variableId);   
  785.    this.time_system_clear();
  786. };

  787. //==============================
  788. // * Add Day
  789. //==============================
  790. Game_System.prototype.add_day = function(value) {
  791.    $gameVariables._data[this._day_variableId] += value;
  792.    if ($gameVariables._data[this._day_variableId]  >= this.max_time(this._day_variableId)) {this.refresh_time(1,this._day_variableId);};
  793.    this.check_max_time(this._day_variableId);   
  794.    this.time_system_clear();
  795. };

  796. //==============================
  797. // * Add Month
  798. //==============================
  799. Game_System.prototype.add_month = function(value) {
  800.    $gameVariables._data[this._month_variableId] += value;
  801.    this._season_interval[0] += value - 1;
  802.    this.set_season_par()
  803.    if ($gameVariables._data[this._month_variableId]  >= this.max_time(this._month_variableId)) {this.refresh_time(1,this._month_variableId)};
  804.    this.check_max_time(this._month_variableId);   
  805.    this.time_system_clear();
  806. };

  807. //==============================
  808. // * Add Year
  809. //==============================
  810. Game_System.prototype.add_year = function(value) {
  811.    $gameVariables._data[this._year_variableId] += value;
  812.    this.check_max_time(this._year_variableId);   
  813.    this.time_system_clear();
  814. };

  815. //==============================
  816. // * Add Season
  817. //==============================
  818. Game_System.prototype.add_season = function(value) {
  819.    $gameVariables._data[this._season_variableId] += value;
  820.    if ($gameVariables._data[this._season_variableId]  >= this.max_time(this._season_variableId)) {this.refresh_time(1,this._season_variableId)};
  821.    this.check_max_time(this._season_variableId);   
  822.    this.time_system_clear();
  823. };

  824. //==============================
  825. // * sec
  826. //==============================
  827. Game_System.prototype.second = function() {
  828.     return  Math.floor($gameVariables._data[this._sec_variableId] / 100);
  829. };

  830. //==============================
  831. // * min
  832. //==============================
  833. Game_System.prototype.minute = function() {
  834.     return $gameVariables._data[this._min_variableId];
  835. };

  836. //==============================
  837. // * hour
  838. //==============================
  839. Game_System.prototype.hour = function() {
  840.     return $gameVariables._data[this._hour_variableId];
  841. };

  842. //==============================
  843. // * hour PM
  844. //==============================
  845. Game_System.prototype.hour_pm = function() {
  846.         if (this.hour() > 12) {return this.hour() - 12};
  847.     return this.hour();
  848. };

  849. //==============================
  850. // * Day
  851. //==============================
  852. Game_System.prototype.day = function() {
  853.     return $gameVariables._data[this._day_variableId];
  854. };

  855. //==============================
  856. // * Month
  857. //==============================
  858. Game_System.prototype.month = function() {
  859.     return $gameVariables._data[this._month_variableId] + 1;
  860. };

  861. //==============================
  862. // * Year
  863. //==============================
  864. Game_System.prototype.year = function() {
  865.     return $gameVariables._data[this._year_variableId];
  866. };

  867. //==============================
  868. // * Season
  869. //==============================
  870. Game_System.prototype.season = function() {
  871.         return $gameVariables._data[this._season_variableId] + 1;
  872. };

  873. //==============================
  874. // * Set Season
  875. //==============================
  876. Game_System.prototype.set_season_par = function() {       
  877.         this._season_interval[0] += 1
  878.         if (this._season_interval[0] < 0) {this._season_interval[0] = 0};
  879.         if (this._season_interval[0] >= this._season_interval[1]) {
  880.                 this._season_interval[0] = 0;
  881.              $gameVariables._data[this._season_variableId] += 1;
  882.                 if ($gameVariables._data[this._season_variableId] >= this.max_time(this._season_variableId)) {
  883.                         $gameVariables._data[this._season_variableId] = 0                       
  884.                 };
  885.    };
  886.    this.refresh_season();
  887. };

  888. //==============================
  889. // * Refresh Season
  890. //==============================
  891. Game_System.prototype.refresh_season = function() {       
  892.         for (var i = 0; i < this._season_switches.length; i++) {$gameSwitches._data[Number(this._season_switches[i])] = false};
  893.         $gameSwitches._data[Number(this._season_switches[$gameVariables._data[this._season_variableId]])] = true;
  894.         for (var i = 0; i < this._month_switches.length; i++) {$gameSwitches._data[Number(this._month_switches[i])] = false};
  895.         $gameSwitches._data[Number(this._month_switches[$gameVariables._data[this._month_variableId]])] = true;
  896.         $gameMap.requestRefresh();  
  897. };       

  898. //==============================
  899. // * Set Day Week
  900. //==============================
  901. Game_System.prototype.total_days = function() {
  902.         var months = ($gameVariables._data[this._month_variableId] * this.max_time(this._day_variableId));
  903.         var years = ($gameVariables._data[this._year_variableId] * (this.max_time(this._day_variableId) * this.max_time(this._month_variableId)));
  904.         var days = $gameVariables._data[this._day_variableId];
  905.         this._total_days_week = (months + years + days);
  906.     return this._total_days_week;
  907. }

  908. //==============================
  909. // * Set Day Week
  910. //==============================
  911. Game_System.prototype.set_day_week = function() {
  912.     this.total_days();
  913.         var total_weeks = Math.floor(this._total_days_week / this.max_time(this._day_week_variableId)) * this.max_time(this._day_week_variableId)
  914.         var day = (this._total_days_week - total_weeks)
  915.         $gameVariables._data[this._day_week_variableId] = day;
  916.         for (var i = 0; i < this._day_week_switches.length; i++) {$gameSwitches._data[Number(this._day_week_switches[i])] = false};
  917.         $gameSwitches._data[Number(this._day_week_switches[$gameVariables._data[this._day_week_variableId]])] = true;
  918.         $gameMap.requestRefresh();
  919. };

  920. //==============================
  921. // * Day Week
  922. //==============================
  923. Game_System.prototype.day_week = function() {
  924.          return $gameVariables._data[this._day_week_variableId] + 1;
  925. };

  926. //==============================
  927. // * Day Week Name
  928. //==============================
  929. Game_System.prototype.day_week_name = function() {
  930.          if (this._day_week_names[this.day_week() - 1]) {
  931.              return String(this._day_week_names[this.day_week() - 1])}
  932.          else {return "Day Week " + String(this.day_week()) }
  933. };

  934. //==============================
  935. // * Season Name
  936. //==============================
  937. Game_System.prototype.season_name = function() {
  938.         if (this._season_names[this.season() - 1]) {
  939.         return String(this._season_names[this.season() - 1])}
  940.         else  {return "Season " + String(this.season())};
  941. };

  942. //==============================
  943. // * Month Name
  944. //==============================
  945. Game_System.prototype.month_name = function() {
  946.         if (this._month_names[this.month() - 1]) {
  947.         return String(this._month_names[this.month() - 1])}
  948.         else  {return "Month " + String(this.month()) };
  949. };

  950. //==============================
  951. // * Time Speed
  952. //==============================
  953. Game_System.prototype.time_speed = function() {
  954.     return this._time_data[0];
  955. };

  956. //==============================
  957. // * Day Phase
  958. //==============================
  959. Game_System.prototype.day_phase = function() {
  960.     return this._time_data[1];
  961. };

  962. //==============================
  963. // * Day Phase Old
  964. //==============================
  965. Game_System.prototype.day_phase_old = function() {
  966.     return this._time_data[2];
  967. };

  968. //==============================
  969. // * Time Active
  970. //==============================
  971. Game_System.prototype.time_active = function() {
  972.     return this._time_data[3];
  973. };

  974. //==============================
  975. // * Tint Screen Active
  976. //==============================
  977. Game_System.prototype.tint_screen_active = function() {
  978.     return this._time_data[4];
  979. };

  980. //==============================
  981. // * Day Phase Transition Speed
  982. //==============================
  983. Game_System.prototype.day_phase_transition_speed = function() {
  984.         return this._time_data[5];
  985. };

  986. //==============================
  987. // * Time Flow
  988. //==============================
  989. Game_System.prototype.update_seconds = function() {
  990.         $gameVariables._data[this._sec_variableId] += this.time_speed();
  991.         if ($gameVariables._data[this._sec_variableId]  >= this.max_time(this._sec_variableId)) {this.refresh_time(1,this._min_variableId)};
  992.     this.check_max_time(this._sec_variableId);
  993. };

  994. //==============================
  995. // * Refresh Time
  996. //==============================
  997. Game_System.prototype.refresh_time = function(value,parameter) {
  998.             $gameVariables._data[parameter] += value;
  999.                 if ($gameVariables._data[parameter]  >= this.max_time(parameter)) {
  1000.                         switch (parameter) {
  1001.                         case this._sec_variableId: // sec
  1002.                                 this.refresh_time(1,this._min_variableId);
  1003.                                 break;                               
  1004.                         case this._min_variableId: // min
  1005.                                 this.refresh_time(1,this._hour_variableId);
  1006.                                 $gameMap.requestRefresh();
  1007.                                 break;
  1008.                         case this._hour_variableId: // hour
  1009.                                 this.refresh_time(1,this._day_variableId);
  1010.                                 this.set_day_week();
  1011.                                 $gameMap.requestRefresh();
  1012.                                 break;
  1013.                         case this._day_variableId: // day
  1014.                                 this.refresh_time(1,this._month_variableId);
  1015.                                 this.set_season_par();
  1016.                     $gameMap.requestRefresh();  
  1017.                                 break;
  1018.                         case this._month_variableId: // month
  1019.                                 this.refresh_time(1,this._year_variableId);
  1020.                     $gameMap.requestRefresh();         
  1021.                                 break;
  1022.                         };
  1023.                 };
  1024.             this.check_max_time(parameter);
  1025. };

  1026. //==============================
  1027. // * Check Max Time
  1028. //==============================
  1029. Game_System.prototype.check_max_time = function(parameter) {
  1030.         if ($gameVariables._data[parameter] >= this.max_time(parameter) || $gameVariables._data[parameter] < 0) {$gameVariables._data[parameter] = 0;
  1031.             if (parameter == this._day_variableId) {$gameVariables._data[parameter] = 1};
  1032.                 this.set_day_phase();
  1033.                 this._refresh_window_time = true;
  1034.         };
  1035. };
  1036.   
  1037. //==============================
  1038. // * MaxTime
  1039. //==============================
  1040. Game_System.prototype.max_time = function(parameter) {
  1041.         switch (parameter) {
  1042.                 case this._sec_variableId: // min
  1043.             return 6000;
  1044.             break;                       
  1045.                 case this._min_variableId: // min
  1046.             return this._min_max;
  1047.             break;
  1048.                 case this._hour_variableId: // hour
  1049.             return this._hour_max;
  1050.             break;
  1051.                 case this._day_variableId: // day
  1052.             return this._day_max;
  1053.             break;
  1054.                 case this._month_variableId: // month
  1055.             return this._month_max;
  1056.             break;
  1057.                 case this._year_variableId: // year
  1058.             return 9999;
  1059.             break;
  1060.                 case this._season_variableId: // season
  1061.             return this._season_max;
  1062.             break;
  1063.                 case this._day_week_variableId: // Day Week
  1064.             return this._day_week_max;
  1065.             break;                       
  1066.                 default :
  1067.                return 1;
  1068.            break                               
  1069.                 };  
  1070. };

  1071. //==============================
  1072. // * Day Phase Effect
  1073. //==============================
  1074. Game_System.prototype.day_phase_effect = function() {
  1075.         this._time_data[2] = this._time_data[1];       
  1076.     this.set_switch_phase();
  1077.         if (this.allow_tint_screen()) {$gameScreen.startTint(this.set_tint_phase(), this.day_phase_transition_speed());};
  1078.         $gameMap.requestRefresh();
  1079. };

  1080. //==============================
  1081. // * Day Phase Effect
  1082. //==============================
  1083. Game_System.prototype.set_tint_phase = function() {
  1084.         if (this._day_phase_tone[this.day_phase()]) {
  1085.                 r = Number(this._day_phase_tone[this.day_phase()][0]);
  1086.                 g = Number(this._day_phase_tone[this.day_phase()][1]);
  1087.                 b = Number(this._day_phase_tone[this.day_phase()][2]);
  1088.                 a = Number(this._day_phase_tone[this.day_phase()][3]);
  1089.                 return [r,g,b,a];
  1090.     }
  1091.         else {return [0,0,0,0]};       
  1092. };

  1093. //==============================
  1094. // * Day Phase Effect
  1095. //==============================
  1096. Game_System.prototype.set_switch_phase = function() {
  1097.         for (var i = 0; i < this._day_phase_switches.length; i++) {$gameSwitches._data[Number(this._day_phase_switches[i])] = false;};       
  1098.     $gameSwitches._data[this._day_phase_switchId] = false;
  1099.     $gameSwitches._data[this._night_phase_switchId] = false;
  1100.         switch (this.day_phase()) {
  1101.                 case 0: // Sunset
  1102.                     $gameSwitches._data[Number(this._day_phase_switches[3])] = true;
  1103.             $gameSwitches._data[this._day_phase_switchId] = true;
  1104.             break;
  1105.                 case 2: // Dusk
  1106.                     $gameSwitches._data[Number(this._day_phase_switches[4])] = true;
  1107.             break
  1108.                 case 3: // Night
  1109.                     $gameSwitches._data[Number(this._day_phase_switches[5])] = true;
  1110.                     $gameSwitches._data[this._night_phase_switchId] = true;                       
  1111.             break;
  1112.                 case 4: // Dawn
  1113.                     $gameSwitches._data[Number(this._day_phase_switches[0])] = true;
  1114.             $gameSwitches._data[this._night_phase_switchId] = true;                               
  1115.             break;
  1116.                 case 5: // Sunrise
  1117.                     $gameSwitches._data[Number(this._day_phase_switches[1])] = true;
  1118.             break;
  1119.                 default : // Day
  1120.                     $gameSwitches._data[Number(this._day_phase_switches[2])] = true;
  1121.             $gameSwitches._data[this._day_phase_switchId] = true;
  1122.             break;
  1123.         };
  1124. };

  1125. //==============================
  1126. // * Allow Tint Screen
  1127. //==============================
  1128. Game_System.prototype.allow_tint_screen = function() {
  1129.   if (!this.tint_screen_active()) {return false};
  1130.   return true;
  1131. };

  1132. //==============================
  1133. // * Set Day Phase
  1134. //==============================
  1135. Game_System.prototype.set_day_phase = function() {
  1136.         if (this.hour() >= 21 || this.hour() < 3) {this._time_data[1] = 3} // Night
  1137.         else if (this.hour() >= 18) {this._time_data[1] = 2} //Dusk
  1138.         else if (this.hour() >= 15) {this._time_data[1] = 0} // Sunset
  1139.         else if (this.hour() >= 9) {this._time_data[1] = 1} // Normal
  1140.         else if (this.hour() >= 6) {this._time_data[1] = 5} // Sunrise
  1141.         else if (this.hour() >= 3) {this._time_data[1] = 4} // Dawn
  1142. };

  1143. //==============================
  1144. // * Update Time System
  1145. //==============================
  1146. Game_System.prototype.update_time_system = function() {
  1147.   if (!this.allow_time_system()) {return};       
  1148.   this.update_seconds()        ;   
  1149.   if (this.day_phase() != this.day_phase_old()) {this.day_phase_effect();};
  1150. };

  1151. //==============================
  1152. // * Allow Time System
  1153. //==============================
  1154. Game_System.prototype.allow_time_system = function() {
  1155.   if (!this.time_active()) {return false};
  1156.   if (!this._time_sys_active) {return false};
  1157.   if (SceneManager.isSceneChanging()) {return false};
  1158.   if (this._stop_time_interpreter && $gameMap.isEventRunning()) {return false};
  1159.   if (this._stop_time_message && $gameMessage.isBusy()) {return false}
  1160.   return true;
  1161. };

  1162. //=============================================================================
  1163. // ** Scene Map
  1164. //=============================================================================

  1165. //==============================
  1166. // * createDisplayObjects
  1167. //==============================
  1168. var _alias_mog_timesys_smap_createDisplayObjects = Scene_Map.prototype.createDisplayObjects;
  1169. Scene_Map.prototype.createDisplayObjects = function() {
  1170.         _alias_mog_timesys_smap_createDisplayObjects.call(this);
  1171.    if (Moghunter.timeWindow_map === "true") {this.createTimeStatus();};
  1172. };

  1173. //==============================
  1174. // * create Time Status
  1175. //==============================
  1176. Scene_Map.prototype.createTimeStatus = function() {
  1177.    this._time_status_window = new Window_Time_Status(0);
  1178.    this._time_status_window.x = Moghunter.timeWindow_X;
  1179.    this._time_status_window.y = Moghunter.timeWindow_Y;
  1180.    this._time_status_window.set_window_size();
  1181.    this.addChild(this._time_status_window);       
  1182. };

  1183. //==============================
  1184. // * Update
  1185. //==============================
  1186. var _alias_mog_timesystem_scmap_update = Scene_Map.prototype.update;
  1187. Scene_Map.prototype.update = function() {
  1188.         $gameSystem._refresh_window_time = false;
  1189.         $gameSystem.update_time_system()
  1190.         _alias_mog_timesystem_scmap_update.call(this);               
  1191. };

  1192. //==============================
  1193. // * Terminate
  1194. //==============================
  1195. var _alias_mog_scmap_terminate = Scene_Map.prototype.terminate;
  1196. Scene_Map.prototype.terminate = function() {
  1197.         _alias_mog_scmap_terminate.call(this);
  1198.         if ($gameMap._timesys_tintscreen) {$gameSystem._tone_data = $gameScreen._tone;};
  1199. };

  1200. //=============================================================================
  1201. // ** Game Character Base
  1202. //=============================================================================

  1203. //==============================
  1204. // * Screen RealX
  1205. //==============================
  1206. Game_CharacterBase.prototype.screen_realX = function() {
  1207.     return this.scrolledX() * $gameMap.tileWidth();
  1208. };

  1209. //==============================
  1210. // * Screen RealY
  1211. //==============================
  1212. Game_CharacterBase.prototype.screen_realY = function() {
  1213.     return this.scrolledY() * $gameMap.tileHeight();
  1214. };

  1215. //=============================================================================
  1216. // ** Scene Menu
  1217. //=============================================================================

  1218. //==============================
  1219. // * Create
  1220. //==============================
  1221. var _alias_mog_timesys_scmenu_create = Scene_Menu.prototype.create
  1222. Scene_Menu.prototype.create = function() {
  1223.         _alias_mog_timesys_scmenu_create.call(this);
  1224.     if (Moghunter.timeWindow_menu === "true") {this.createTimeStatus();};
  1225. };

  1226. //==============================
  1227. // * create Time Status
  1228. //==============================
  1229. Scene_Menu.prototype.createTimeStatus = function() {
  1230.    $gameSystem._refresh_window_time = false;
  1231.    this._time_status_window = new Window_Time_Status(1);
  1232.    this._time_status_window.x = Moghunter.timeWindow_menu_X;
  1233.    this._time_status_window.y = Moghunter.timeWindow_menu_Y;
  1234.    this.addChild(this._time_status_window);       
  1235. };

  1236. //=============================================================================
  1237. // ** Window_Time_Status
  1238. //=============================================================================
  1239. function Window_Time_Status() {
  1240.     this.initialize.apply(this, arguments);
  1241. };

  1242. Window_Time_Status.prototype = Object.create(Window_Base.prototype);
  1243. Window_Time_Status.prototype.constructor = Window_Time_Status;

  1244. //==============================
  1245. // * Initialize
  1246. //==============================
  1247. Window_Time_Status.prototype.initialize = function(x, y) {
  1248.         this.pm_mode = false;
  1249.         if (String(Moghunter.display_pm_mode) === "true") {this.pm_mode = true};
  1250.     Window_Base.prototype.initialize.call(this, 0, 0, 240, 228);        //绘制窗口
  1251.         this.contents.fontSize = 12;
  1252.         this._window_size = [-500,-500,0,0];
  1253.     this.refresh();
  1254.         this._old_play_time = $gameSystem.playtime();
  1255.         this._mode = 0;
  1256. };

  1257. //==============================
  1258. // * Set Window Size
  1259. //==============================
  1260. Window_Time_Status.prototype.set_window_size = function() {
  1261.    this.height = 120;
  1262.    this._mode = 1;       
  1263.    this._window_size = [this.x - ($gameMap.tileWidth() / 2),this.y - $gameMap.tileHeight(),
  1264.    this.width + this.x - $gameMap.tileWidth(),this.height + this.y];
  1265.    this.refresh();
  1266. };

  1267. //==============================
  1268. // * Refresh
  1269. //==============================
  1270. Window_Time_Status.prototype.refresh = function() {
  1271.     this.contents.clear();
  1272.         this.draw_time_contents();
  1273. };

  1274. //==============================
  1275. // * Update
  1276. //==============================
  1277. Window_Time_Status.prototype.update = function() {
  1278.         Window_Base.prototype.update.call(this);
  1279.         this.visible = this.need_visible();
  1280.     if ($gameSystem._refresh_window_time) {this.refresh();}
  1281.         if (this.need_fade()) {this.opacity -= 15;}
  1282.         else {this.opacity += 15};
  1283.         this.contentsOpacity = this.opacity;
  1284.         if (this._mode === 0 && this._old_play_time != $gameSystem.playtime()) {this.refresh();this._old_play_time = $gameSystem.playtime()};
  1285. };

  1286. //==============================
  1287. // * Need Visible
  1288. //==============================
  1289. Window_Time_Status.prototype.need_visible = function() {
  1290.         return $gameSystem._time_window_visible;
  1291. };

  1292. //==============================
  1293. // * Need Fade
  1294. //==============================
  1295. Window_Time_Status.prototype.need_fade = function() {
  1296.         if ($gamePlayer.screen_realX() < this._window_size[0]) {return false};
  1297.         if ($gamePlayer.screen_realX() > this._window_size[2]) {return false};
  1298.         if ($gamePlayer.screen_realY() < this._window_size[1]) {return false};
  1299.         if ($gamePlayer.screen_realY() > this._window_size[3]) {return false};
  1300.         if (this.opacity < 100) {return false};
  1301.         return true;       
  1302. };
  1303.        
  1304. //==============================
  1305. // * Draw Time Contents
  1306. //==============================
  1307. Window_Time_Status.prototype.draw_time_contents = function() {
  1308.         var text = "光辉纪元 " + $gameSystem.year() + "年 " + $gameSystem.season_name() + "  " + $gameSystem.month_name() + $gameSystem.day() + "日";
  1309.         this.contents.drawText(text,-29,32,240,32,"right");
  1310.         var text = $gameSystem.day_week_name() + " " + $gameSystem.hour().padZero(2) + "时" + $gameSystem.minute().padZero(2) + "分";
  1311.         this.contents.drawText(text,50,16,160,32,"right");
  1312. };
复制代码
梦石
0
星屑
60
在线时间
306 小时
注册时间
2014-8-5
回帖
403
发表于 2016-1-25 15:23:38 | 显示全部楼层
窗口类的方法this.opacity=0; //不透明度的值
  点我进入    
       ↓      
回复

使用道具 举报

梦石
0
星屑
647
在线时间
165 小时
注册时间
2012-4-18
回帖
237
 楼主| 发表于 2016-1-25 17:07:18 | 显示全部楼层
额= =加在哪里啊= =我加上去之后不是闪烁就是不起作用= =
回复

使用道具 举报

梦石
0
星屑
647
在线时间
165 小时
注册时间
2012-4-18
回帖
237
 楼主| 发表于 2016-1-25 17:26:28 | 显示全部楼层
额= =傻了,原来有配套的插件。MOG_TimeSystem_Hud.js,稍微改了改,已经完成我想要的效果。
另外还把MOG_MapNameHud.js中地图名显示的语句转到这个里面,完善效果。
另外排除一个BUG,一起用MOG_TimeSystem和MOG_TimeSystem_Hud,时,可能会出现按x或者ECS键是显示的菜单界面出现莫名的空白窗口,修正方式是把MOG_TimeSystem里面绘制窗口语句里面的    Window_Base.prototype.initialize.call(this, 0, 0, 240, 228);改为:    Window_Base.prototype.initialize.call(this, 0, 0, 0, 0);
不过还是谢谢二楼的帮助。
回复

使用道具 举报

梦石
0
星屑
80
在线时间
32 小时
注册时间
2016-2-16
回帖
5
发表于 2016-2-19 12:48:06 | 显示全部楼层
楼主,我想问一下你的小地图是怎么做的

点评

没认错的话应该是http://rm.66rpg.com/thread-386155-1-1.html  发表于 2016-2-20 21:20
回复

使用道具 举报

梦石
0
星屑
80
在线时间
32 小时
注册时间
2016-2-16
回帖
5
发表于 2016-2-20 23:16:20 | 显示全部楼层
gagashuobuai 发表于 2016-2-19 12:48
楼主,我想问一下你的小地图是怎么做的

看了一下,链接里的地图是没有外面那个框框的啊

点评

我把读取背景图片(就是那个圈圈图)的那一行屏蔽了,然后自己改了显示的坐标和尺寸  发表于 2016-3-22 23:56
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部