设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 76|回复: 0

[转载发布] In Game Time System

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7976

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29959
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38829

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    Script NSS_IGT-System V1.1
  • NoShirtStan


  • Introduction
    Hey folks, so I've built my first full functioning plugin. This plugin is an In Game Time System that is fully customizable. After many grueling hours of coding and testing, it is complete. Unlike a normal Time system, this one allows you to set exactly how long you want a day to last in your game. I've included the .js as an attachment for straight download for those who prefer to not download the demo.

    *Updated Jan 25 2021


    Features
    - IRL time limiting. Allows you to set the length of a day in-game via real world minutes. (ex. 40 min real time = 24hours game time.)
    - Full window positioning.
    - Various plugin commands to control the flow of time.
    - 12 hour and 24 hour formatting for time.
    - Custom window Icon function for those who do not wish to use the default.
    - Sunrise/Sunset option that will auto tint the screen at the times set.

    Screenshots
    Spoilerhttps://imageshack.com/i/pmv0UayWp




    How to Use
    Install this plugin underneath all your other plugins. It doesn't use any core functions that affect core engine functionality.

    Demo
    Demo for the plugin is here (hosted by Mediafire.com) Spoilerhttps://www.mediafire.com/file/h5kihlwjy4zhwl3/TimeSystemPlugin.7z/file



    This demo is for the original V1.0 of the script and does not include all features.

    A new script for V1.1 has been attached.

    Script
    Spoiler                Code:       
    1. //=============================================================================
    2. // NSS-IGT_System.js
    3. //=============================================================================
    4. /*:
    5. * @plugindesc V1.1 This plugin, is designed to be an In Game Time system.
    6. *
    7. * @author NoShirtStan
    8. *
    9. * @param -- General --
    10. * @param -- Window Configuration --
    11. * @param -- Time Settings --
    12. *
    13. * @param Visibility
    14. * @desc Choose to display the time window in game. (Time will still start to
    15. * flow with this option off)
    16. * @type select
    17. * @option Show
    18. * @option Hide
    19. * @default Show
    20. * @parent -- General --
    21. *
    22. * @param Start Time On Game Start
    23. * @desc Check to see if time starts with the game.
    24. * @type select
    25. * @option Start With Game
    26. * @option Start With Plugin
    27. * @default Start With Game
    28. * @parent -- General --
    29. *
    30. * @param Length of Day
    31. * @desc Length of day in real time. (Minutes)
    32. * @type number
    33. * @default 40
    34. * @parent -- General --
    35. *
    36. * @param Activate Sunrise/Sunset
    37. * @desc Select whether or not to tint the screen for the sunrise and sunset.
    38. * @type select
    39. * @option Activate
    40. * @option Deativate
    41. * @default Activate
    42. * @parent -- General --
    43. *
    44. * @param Window Name
    45. * @desc Label that appears in the window.
    46. * @type text
    47. * @default Date & Time
    48. * @parent -- Window Configuration --
    49. *
    50. * @param Icon Display
    51. * @desc Set the icon that you wish to display in the window.
    52. * @type number
    53. * @default 220
    54. * @parent -- Window Configuration --
    55. *
    56. * @param Window X Offset
    57. * @desc Window X location.
    58. * @type number
    59. * @default 0
    60. * @parent -- Window Configuration --
    61. *
    62. * @param Window Y Offset
    63. * @desc Window Y Location.
    64. * @type number
    65. * @default 0
    66. * @parent -- Window Configuration --
    67. *
    68. * @param Time Format
    69. * @desc 12 hour format or 24 hour format.
    70. * @type select
    71. * @option 12 Hours
    72. * @option 24 Hours
    73. * @default 12 Hours
    74. * @parent -- Time Settings --
    75. *
    76. * @param Am Pm Default
    77. * @desc Starting Am Pm Settings (true = AM, false = PM).
    78. * @type select
    79. * @option Am
    80. * @option Pm
    81. * @default Am
    82. * @parent -- Time Settings --
    83. *
    84. * @param Minutes Default
    85. * @desc Starting minutes counter.
    86. * @type number
    87. * @min 0
    88. * @max 59
    89. * @default 0
    90. * @parent -- Time Settings --
    91. *
    92. * @param Hours Default
    93. * @desc Starting hours counter. (1-12 for 12 hour format, 1-24 for 24 hour
    94. * format)
    95. * @type number
    96. * @min 1
    97. * @max 24
    98. * @default 1
    99. * @parent -- Time Settings --
    100. *
    101. * @param Days Default
    102. * @desc Starting Days counter.
    103. * @type number
    104. * @min 1
    105. * @max 12
    106. * @default 1
    107. * @parent -- Time Settings --
    108. *
    109. * @param Sunrise Hour
    110. * @desc The hour for when "Sunrise" starts. (1-24)
    111. * @type number
    112. * @min 1
    113. * @max 24
    114. * @default 6
    115. * @parent -- Time Settings --
    116. *
    117. * @param Daylight Hour
    118. * @desc The hour for when "Daylight" starts. (1-24)
    119. * @type number
    120. * @min 1
    121. * @max 24
    122. * @default 7
    123. * @parent -- Time Settings --
    124. *
    125. * @param Sunset Hour
    126. * @desc The hour for when "Sunset starts. (1-24)
    127. * @type number
    128. * @min 1
    129. * @max 24
    130. * @default 19
    131. * @parent -- Time Settings --
    132. *
    133. * @param Night Time Hour
    134. * @desc The hour for when "Night time" starts. (1-24)
    135. * @type number
    136. * @min 1
    137. * @max 24
    138. * @default 20
    139. * @parent -- Time Settings --
    140. *
    141. * @help
    142. *
    143. * TERMS OF USE
    144. *
    145. * This plugin is free for commercial and non-commercial use. A shoutout in
    146. * credits would be nice though. Credit to "NoShirtStan".
    147. *
    148. * COMPATIBILITY
    149. *
    150. * As of yet I have not found any compatibility issues. If you happen to fine
    151. * some please let me know. This plugin can be placed below all other
    152. * plugins.
    153. *
    154. * ==========================================================================
    155. * Explanation
    156. * ==========================================================================
    157. *
    158. * So this plugin was built and designed to be a modifiable In Game Time  
    159. * system. You are able to set the length of time for each day as well as
    160. * position the window where ever you would like.
    161. *
    162. * ==========================================================================
    163. * Parameter Run Down
    164. * ==========================================================================
    165. *
    166. * Most of the parameters you will not need to adjust, but I have added them
    167. * in for those who want 100% control of how the clock operates.
    168. *
    169. * == General ==
    170. *
    171. * -- Visibility --
    172. *
    173. * This option will allow you to choose whether or not to display the clock
    174. * when the game starts up.
    175. *
    176. * -- Start Time On Game Start --
    177. *
    178. * This option allows you to choose whether or not to have the clock start as
    179. * soon as the game is opened. There are plugin commands that will allow you
    180. * to pause and resume the clock as needed.
    181. *
    182. * -- Length of Day --
    183. *
    184. * This will allow you set the duration of the day in real time for the
    185. * clock. The option is set in minutes, and will do all the calculations for
    186. * you.
    187. *
    188. * -- Activate Sunrise/Sunset
    189. *
    190. * This will activate a tinting effect on the screen for certain hours of the
    191. * day. Ex. 8pm or 20h the screen will tint to a sunset style tint.
    192. *
    193. * == Window Configuration ==
    194. *
    195. * -- Window Name --
    196. *
    197. * This option allows you to change the name or phrase for your clock in the
    198. * window. The default is "Date & Time", but you can change it to whatever
    199. * you wish.
    200. *
    201. * -- Icon Display --
    202. *
    203. * This option will allow you to set a custom icon in the Icon position of
    204. * the window.
    205. *
    206. * -- Window X Offset --
    207. *
    208. * This option will allow you to position the window in the X axis.
    209. *
    210. * -- Window Y Offset --
    211. *
    212. * This option will allow you to position the window in the Y axis
    213. *
    214. * == Time Settings ==
    215. *
    216. * -- Time Format --
    217. *
    218. * This will allow you to select a 12hour or 24 hour format for the clock.
    219. *
    220. * -- Am Pm Default --
    221. *
    222. * This will allow you to set whether or not it is Am or Pm when the
    223. * game first starts. This state will only apply if you are in the 12
    224. * hour formatting.
    225. *
    226. * -- Minutes Default --
    227. *
    228. * This parameter sets the default counter for the minutes counter. If for
    229. * some reason you want to change that you can.
    230. *
    231. * -- Hours Default --
    232. *
    233. * Similiar to the last parameter, this will set the default of the hours
    234. * counter.
    235. *
    236. * -- Days Default --
    237. *
    238. * Currently in the plugin, the days are listed as a 7 day week following
    239. * standard day names: Monday, Tuesday etc. Using a value of 1-7 you can
    240. * set what day of the week you wish to start the game at. In order to
    241. * change the number of days, or the names of days, will require excess
    242. * changes to the main script, and I do not recommend doing that.
    243. *
    244. * -- Sunrise Hour --
    245. *
    246. * This will set the time at which the screen will tint to the sunrise tint.
    247. *
    248. * -- Daylight Hour --
    249. *
    250. * This will set the time at which the screen will tint to the daylight
    251. * tint.
    252. *
    253. * -- Sunset Hour --
    254. *
    255. * This will set the time at which the screen will tint to the sunset tint.
    256. *
    257. * -- Night Time Hour --
    258. *
    259. * This will set the time at which the screen will tint to the night time
    260. * tint.
    261. *
    262. * ==========================================================================
    263. * Plugin Commands
    264. * ==========================================================================
    265. *
    266. * I have only added a few plugin commands to this as it is only the first
    267. * version. As I update it, I will add more.
    268. *
    269. * Command: StartClock
    270. *
    271. * This command will start the clock up from either a pause, or a fresh
    272. * start, in the event you do not start the clock on game start.
    273. *
    274. * Command: StopClock
    275. *
    276. * This will stop the clock at its current time.
    277. *
    278. * Command: ClockHide
    279. *
    280. * This will hide the clock from view. Keep in mind that time will continue
    281. * to progress even if it is hidden.
    282. *
    283. * Command: ClockShow
    284. *
    285. * This will bring the clock into view.
    286. *
    287. * Command: AdvanceMinute x
    288. *
    289. * This will advance the clock x amount of minutes.
    290. *
    291. * Command: AdvanceHour x
    292. *
    293. * This will advance the clock x amount of hours.
    294. *
    295. * Command: AdvanceDay x
    296. *
    297. * This will advance the clock x amount of days.
    298. *
    299. * ==========================================================================
    300. * Updates
    301. * ==========================================================================
    302. *
    303. * V1.0 Plugin Released (Yay!)
    304. *
    305. * V1.1 Plugin Update - Jan 25th 2021
    306. * - Added selecteable formatting for 12 hour or 24 hour clock.
    307. * - Added selectable screen Tinting for Dusk/Dawn/Day/Night effect.
    308. * - Cleaned up the parameter options.
    309. * - Recompiled for compatibility against various common plugins.
    310. * - Reformatted the script for easier viewing.
    311. *
    312. */
    复制代码







    Credit and Thanks
    - NoshirtStan
    - Ashtar

    Terms of Use

    This plugin is free for commercial and non-commercial use.


    本贴来自国际rpgmaker官方论坛作者:NoShirtstann处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/in-game-time-system.132567/

    本帖子中包含更多资源

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

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 08:35 , Processed in 0.101028 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表