设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
返回列表
+ 发新帖
查看: 222|回复: 0

[转载发布] Revahar - Plugin JourNuit (day/night) RPGMMV

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    昨天 03:27
  • 签到天数: 222 天

    连续签到: 1 天

    [LV.7]常住居民III

    9102

    主题

    893

    回帖

    7万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 2026-7-29 08:47:23 | 显示全部楼层 |阅读模式
    Hello everyone !

    This is my very first plugin for RPG Maker MV.
    Any question ? Ask me !

    At the moment, I've only been learning JavaScript for 2 months, so if you see any errors, don't hesitate to tell me so that I can correct them.
    This plugin is a first draft. It is not finished but already functional as it is.

    Terms of use :
    - It can be used for commercial and non commercial games.
    - Just add my name in your game/project credits.
    - Please, link back to this post if you want to share it.
    (You can send me en message if you need help
    )

    /!\ Update 1.1 : Now you can set the tints !
    I don't update the demo. You just have to copy paste the code in the spoiler below or go to my github and download the last version of my plugin https://github.com/Revahar/RPG-Maker-MV-Plugin---Systeme-jour-nuit


    --------------------------------------------------------
    Plugin: Day/night system with screen tint management.
    --------------------------------------------------------

    This plugin uses 4 game variables that you can set in the plugin settings.
    These 4 variables will contain the start time of each phase of the day (morning, day, evening, night).
    You can therefore define the ID of the variable to use as well as its content (6, 8, 19, 21).
    In this way, the morning will start at 6 a.m., the day at 8 a.m., the evening at 7 p.m. and the night at 9 p.m.

    This plugin uses a counting system based on the number of frames (X frames = 1 seconds. 60 seconds = 1 minutes. Etc.)
    By default, this value is 5 but can be changed in plugin settings.

    The transition between each phase is done dynamically. By default, the hue transition is done in 600 frames (10 seconds).
    This value can be changed in the plugin settings.

    4 switches are used in this plugin, each switch corresponds to a phase.
    You can thus define the appearance of an event according to the active switch.
    By default, switches 1, 2, 3 and 4 are used but you can change the IDs in the settings.

    If you want the time to scroll but the hue change is no longer activated, then you can use the command
    DisableTint plugin in a parallel event.

    To enable or re-enable tints, use the plugin command EnableTint.
    /!\ Each Map where you want the day/night system to be active must contain an EnableTint.

    To have the tint update instantly when exiting a location where tint management was
    disabled, use the plugin command EnableTintOnExit.
    /!\ To put in the event of the exit door of the building just before or after the teleportation.

    To define the tint of dungeons/caves and other places without light (tint value editable on line 239)
    use the DungeonTint plugin command.
    /!\ To put in a parallel event.

    To enable or re-enable tints, use the plugin command EnableTint.
    /!\ Each Map where you want the day/night system to be active must contain an EnableTint.

    To have the tint update instantly when exiting a location where tint management was
    disabled, use the plugin command EnableTintOnExit.
    /!\ To put in the event of the exit door of the building just before or after the teleportation.

    To define the tint of dungeons/caves and other places without light (tint value editable on line 239)
    use the DungeonTint plugin command.
    /!\ To put in a parallel event.

    Spoiler: Français
    Bonjour à toutes et à tous !

    Voici mon tout premier plugin pour RPG Maker MV.
    Vous pouvez l'utiliser librement. Inscrivez moi juste dans vos crédits.
    À l'heure actuelle, ça ne fait que 2 mois que j'apprend le JavaScript donc si vous voyez des erreurs surtout n'hésitez pas à me le dire pour que je puisse corriger.
    Ce plugin est un premier jet. Il n'est pas terminé mais déjà fonctionnel en l'état.

    Plugin : Système jour/nuit avec gestion des teintes de l'écran.

    Ce plugin utilise 4 variables du jeu que vous pouvez définir dans les paramètres du plugin.
    Ces 4 variables vont contenir  l'heure du début de chaque phase de la journée (matin, journée, soir, nuit).
    Vous pouvez donc définir l'ID de la variable à utiliser ainsi que son contenu (6, 8, 19, 21).
    De cette manière, le matin commencera à 6h, la journée à 8h, le soir à 19h et la nuit à 21h.

    Ce plugin utilise un système de comptage basé sur le nombre de frames (X frames = 1 secondes. 60 secondes = 1 minutes. Etc.)
    Par défaut, cette valeur à est 5 mais peut être modifiée dans les paramètres du plugin.

    La transition entre chaque phase se fait de manière dynamique. Par défaut, la transition de teinte se fait en 600 frames (10 secondes).
    Cette valeur peut être modifiée dans les paramètres du plugin.

    4 switches sont utilisés dans ce plugin, chaque switch correspond à une phase.
    Vous pouvez ainsi définir l'apparition d'un évènement en fonction du switch actif.
    Par défaut, se sont les switch 1, 2, 3 et 4 qui sont utilisés mais vous pouvez modifier les IDs dans les paramètres.

    Si vous souhaitez que le temps défile mais que le changement de teinte ne soit plus activé, alors vous pouvez utiliser la commande
    de plugin DisableTint dans un évènement parallèle.

    Pour activer ou réactiver les teintes, utilisez la commande de plugin EnableTint.
    /!\ Chaque Map où vous souhaitez que le système jour/nuit soit actif doit contenir un EnableTint.

    Pour que la teinte se mette à jour instantanément lors de la sortie d'un lieu où la gestion des teintes était
    désactivée, utilisez la commande de plugin EnableTintOnExit.
    /!\ À mettre dans l'évènement de la porte de sortie du bâtiment juste avant ou après la téléportation.

    Pour définir la teinte des donjons/grottes et autres lieux sans lumière
    utilisez la commande de plugin DungeonTint.
    /!\ À mettre dans un évènement parallèle.
    Spoiler: Demo

    Demo_Day_Night

    MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
                                            www.mediafire.com                               





    Spoiler: Code
                    JavaScript:       




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

    本帖子中包含更多资源

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

    x

    帖子地址: 

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-10-22 03:36 , Processed in 0.113378 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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